diff --git a/src/Frontend_Identity/public/login.js b/src/Frontend_Identity/public/login.js index 011561c..3c5ea89 100644 --- a/src/Frontend_Identity/public/login.js +++ b/src/Frontend_Identity/public/login.js @@ -108,11 +108,18 @@ document.getElementById('loginForm').addEventListener('submit', function (event) xhr.onload = function () { if (xhr.status === 200) { - const token = JSON.parse(xhr.responseText)['X-MiniAuth-Token']; - if (token!=undefined && token!=null ) - localStorage.setItem('X-MiniAuth-Token', token); - - window.location.href = returnUrl; + const data = JSON.parse(xhr.responseText); + if (data.ok === false) { + document.getElementById('message').textContent = 'Login failed. Please check your credentials.'; + return; + } + if (data.data.accessToken!=undefined && data.data.accessToken!=null) { + localStorage.setItem('X-MiniAuth-Token', data.data.accessToken); + } + // after 1 second then redirect to returnUrl + setTimeout(function () { + window.location.href = returnUrl; + }, 1000); } else { document.getElementById('message').textContent = 'Login failed. Please check your credentials.'; } diff --git a/src/Frontend_Identity/src/axios/service.ts b/src/Frontend_Identity/src/axios/service.ts index 0169f89..e3db70b 100644 --- a/src/Frontend_Identity/src/axios/service.ts +++ b/src/Frontend_Identity/src/axios/service.ts @@ -15,7 +15,8 @@ const service = axios.create({ service.interceptors.request.use( config => { if (localStorage.getItem('X-MiniAuth-Token')) { - config.headers['X-MiniAuth-Token'] = localStorage.getItem('X-MiniAuth-Token'); + // authorization header token = localStorage.getItem('X-MiniAuth-Token') + config.headers['Authorization'] = 'Bearer ' + localStorage.getItem('X-MiniAuth-Token'); } showLoading(); return config; diff --git a/src/MiniAuth.IdentityAuth/MiniAuthIdentityEndpoints.cs b/src/MiniAuth.IdentityAuth/MiniAuthIdentityEndpoints.cs index dd1b2bf..b76e4e2 100644 --- a/src/MiniAuth.IdentityAuth/MiniAuthIdentityEndpoints.cs +++ b/src/MiniAuth.IdentityAuth/MiniAuthIdentityEndpoints.cs @@ -17,6 +17,7 @@ using MiniAuth.IdentityAuth.Models; using System; using System.Collections.Concurrent; +using System.Data; using System.IdentityModel.Tokens.Jwt; using System.IO; using System.Linq; @@ -76,37 +77,43 @@ TDbContext _dbContext context.Response.StatusCode = StatusCodes.Status401Unauthorized; return; } + // Payload issuer + + + var claims = new List { - new Claim(ClaimTypes.Name, user.UserName), - new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString()), + new Claim(ClaimTypes.NameIdentifier, user.Id), + new Claim(ClaimTypes.Name, user.UserName) }; + //var userRoles = _dbContext.UserRoles.Where(w => w.UserId == user.Id).Select(s => s.RoleId).ToArray(); + // get userRoles Name var userRoles = _dbContext.UserRoles.Where(w => w.UserId == user.Id).Select(s => s.RoleId).ToArray(); - foreach (var userRole in userRoles) + var rolesName = _dbContext.Roles.Where(w => userRoles.Contains(w.Id)).Select(s => s.Name).ToArray(); + foreach (var item in rolesName) + claims.Add(new Claim(ClaimTypes.Role, item)); + claims.Add(new Claim("sub", user.UserName)); + + + var secretkey = MiniAuthOptions.IssuerSigningKey; + var credentials = new SigningCredentials(secretkey, SecurityAlgorithms.HmacSha256); + var tokenDescriptor = new SecurityTokenDescriptor() { - claims.Add(new Claim(ClaimTypes.Role, userRole)); - } - var jwtToken = new JwtSecurityTokenHandler().WriteToken(CreateToken(claims, MiniAuthOptions.TokenExpiresIn)); + Subject = new ClaimsIdentity(claims), + Expires = DateTime.UtcNow.AddSeconds(MiniAuthOptions.TokenExpiresIn), + Issuer = MiniAuthOptions.Issuer, + SigningCredentials = credentials + + }; + var tokenHandler = new JwtSecurityTokenHandler(); + var tokenJwt = tokenHandler.CreateToken(tokenDescriptor); + var token = tokenHandler.WriteToken(tokenJwt); var result = new { tokenType = "Bearer", - accessToken = jwtToken, + accessToken = token, expiresIn = MiniAuthOptions.TokenExpiresIn, - //refreshToken = refreshToken }; - /* -e.g. -{ - "ok": true, - "code": 200, - "message": null, - "data": { - "tokenType": "Bearer", - "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTgxMTkzMzh9.I-tm9436GEXyETgUSzL7KeX5RvyN8X_4rLAKLDMZnZk", - "expiresIn": 900 - } -} - */ await OkResult(context, result.ToJson()); return; @@ -492,17 +499,6 @@ TDbContext _dbContext } } } - private JwtSecurityToken CreateToken(List claims,int expires) - { - var secretkey = MiniAuthOptions.IssuerSigningKey; - var credentials = new SigningCredentials(secretkey, SecurityAlgorithms.HmacSha256); - var token = new JwtSecurityToken( - expires: DateTime.Now.AddSeconds(expires), - signingCredentials: credentials - ); - - return token; - } private static string GetNewPassword() { return $"{Guid.NewGuid().ToString().Substring(0, 10).ToUpper()}@{Guid.NewGuid().ToString().Substring(0, 5)}"; diff --git a/src/MiniAuth.IdentityAuth/MiniAuthIdentityServiceExtensions.cs b/src/MiniAuth.IdentityAuth/MiniAuthIdentityServiceExtensions.cs index 2d26dc5..ad3a039 100644 --- a/src/MiniAuth.IdentityAuth/MiniAuthIdentityServiceExtensions.cs +++ b/src/MiniAuth.IdentityAuth/MiniAuthIdentityServiceExtensions.cs @@ -88,22 +88,22 @@ public static IServiceCollection AddMiniAuth { - options.IncludeErrorDetails = true; + options.IncludeErrorDetails = true; options.TokenValidationParameters = new TokenValidationParameters { - NameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier", - RoleClaimType = "http://schemas.microsoft.com/ws/2008/06/identity/claims/role", ValidateIssuer = true, - ValidIssuer = "User", + ValidIssuer = MiniAuthOptions.Issuer, ValidateAudience = false, ValidateLifetime = true, ValidateIssuerSigningKey = false, - IssuerSigningKey =MiniAuth.MiniAuthOptions.IssuerSigningKey + IssuerSigningKey = MiniAuth.MiniAuthOptions.IssuerSigningKey }; - }); + }) + ; } } else diff --git a/src/MiniAuth.IdentityAuth/MiniAuthOptions.cs b/src/MiniAuth.IdentityAuth/MiniAuthOptions.cs index 5fc3e36..6fda658 100644 --- a/src/MiniAuth.IdentityAuth/MiniAuthOptions.cs +++ b/src/MiniAuth.IdentityAuth/MiniAuthOptions.cs @@ -20,5 +20,6 @@ public enum AuthType /// Seconds /// public static int TokenExpiresIn = 15*60; + public static string Issuer = "MiniAuth"; } } diff --git a/src/MiniAuth.IdentityAuth/wwwroot/assets/EndpointsView-JWuXtHar.js b/src/MiniAuth.IdentityAuth/wwwroot/assets/EndpointsView-QB8GhhFN.js similarity index 73% rename from src/MiniAuth.IdentityAuth/wwwroot/assets/EndpointsView-JWuXtHar.js rename to src/MiniAuth.IdentityAuth/wwwroot/assets/EndpointsView-QB8GhhFN.js index ddb8e24..09e8911 100644 --- a/src/MiniAuth.IdentityAuth/wwwroot/assets/EndpointsView-JWuXtHar.js +++ b/src/MiniAuth.IdentityAuth/wwwroot/assets/EndpointsView-QB8GhhFN.js @@ -1 +1 @@ -import{s as c}from"./service-LZZpIdq7.js";import{u as p,r as a,o as _,a as s,c as n,b as t,t as e,F as h,d as m}from"./index-7uhYHvCj.js";const b={class:"scrollable-container"},f={class:"table table-hover"},g={class:"table-dark"},E={__name:"EndpointsView",setup(v){p(),a("EndPoints");const l=a([]),i=a([]),u=async()=>{l.value=await c.get("api/getAllEndpoints"),i.value=await c.get("api/getRoles")};return _(async()=>{await u()}),(o,y)=>(s(),n("div",b,[t("table",f,[t("thead",null,[t("tr",g,[t("th",null,e(o.$t("Name")),1),t("th",null,e(o.$t("Route")),1)])]),t("tbody",null,[(s(!0),n(h,null,m(l.value,(r,d)=>(s(),n("tr",{key:d},[t("td",null,e(r.Name),1),t("td",null,e(r.Route),1)]))),128))])])]))}};export{E as default}; +import{s as c}from"./service-m5cBW5EV.js";import{u as p,r as a,o as _,a as s,c as n,b as t,t as e,F as h,d as m}from"./index-wtJzGEvf.js";const b={class:"scrollable-container"},f={class:"table table-hover"},g={class:"table-dark"},E={__name:"EndpointsView",setup(v){p(),a("EndPoints");const l=a([]),i=a([]),u=async()=>{l.value=await c.get("api/getAllEndpoints"),i.value=await c.get("api/getRoles")};return _(async()=>{await u()}),(o,y)=>(s(),n("div",b,[t("table",f,[t("thead",null,[t("tr",g,[t("th",null,e(o.$t("Name")),1),t("th",null,e(o.$t("Route")),1)])]),t("tbody",null,[(s(!0),n(h,null,m(l.value,(r,d)=>(s(),n("tr",{key:d},[t("td",null,e(r.Name),1),t("td",null,e(r.Route),1)]))),128))])])]))}};export{E as default}; diff --git a/src/MiniAuth.IdentityAuth/wwwroot/assets/RolesView-3q8bOyk1.js b/src/MiniAuth.IdentityAuth/wwwroot/assets/RolesView-uMrrH1Bj.js similarity index 94% rename from src/MiniAuth.IdentityAuth/wwwroot/assets/RolesView-3q8bOyk1.js rename to src/MiniAuth.IdentityAuth/wwwroot/assets/RolesView-uMrrH1Bj.js index b13124b..cf956b9 100644 --- a/src/MiniAuth.IdentityAuth/wwwroot/assets/RolesView-3q8bOyk1.js +++ b/src/MiniAuth.IdentityAuth/wwwroot/assets/RolesView-uMrrH1Bj.js @@ -1 +1 @@ -import{u as v,r as h,o as k,a as d,c,b as t,t as l,F as y,d as w,w as r,v as p,e as g}from"./index-7uhYHvCj.js";import{_ as x,a as V}from"./delete-xH6gjfA0.js";import{s as u}from"./service-LZZpIdq7.js";const R={class:"row",style:{"padding-bottom":"10px","padding-top":"10px"}},C={class:"col-sm-8"},M=["title"],$=t("svg",{width:"40px",height:"40px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M7 12L12 12M12 12L17 12M12 12V7M12 12L12 17",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("circle",{cx:"12",cy:"12",r:"9",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),I=t("span",{class:"visually-hidden"},"Insert",-1),U=[$,I],B=["title"],E=t("svg",{fill:"#000000",width:"40px",height:"40px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z"})],-1),L=t("span",{class:"visually-hidden"},"Insert",-1),N=[E,L],T=t("div",{class:"col-sm-4"},null,-1),D={class:"table table-hover"},j={class:"table-dark"},A=t("th",null,"#",-1),F=["disabled","onUpdate:modelValue"],z={class:"form-check form-switch"},H=["disabled","onUpdate:modelValue"],S=["onUpdate:modelValue"],q=["disabled","onClick"],G=t("img",{src:x},null,-1),J=[G],K=["disabled","onClick"],O=t("img",{src:V},null,-1),P=[O],tt={__name:"RolesView",setup(Q){const{t:n}=v();h("Roles");const a=h([]),i=async()=>{a.value=await u.get("api/getRoles")},m=async()=>{confirm(n("please_confirm"))&&a.value.push({Id:null,Name:"",Enable:!0})},b=async s=>{confirm(n("please_confirm"))&&await u.post("api/deleteRole",{Id:s}).then(async()=>{alert(n("updated_successfully")),await i()})},f=async s=>{confirm(n("please_confirm"))&&await u.post("api/saveRole",s).then(async()=>{alert(n("updated_successfully"))})};return k(async()=>{await i()}),(s,W)=>(d(),c("div",null,[t("div",R,[t("div",C,[t("button",{title:s.$t("add"),onClick:m,class:"btn",type:"button"},U,8,M),t("button",{title:s.$t("refresh"),onClick:i,class:"btn",type:"button"},N,8,B)]),T]),t("table",D,[t("thead",null,[t("tr",j,[A,t("th",null,l(s.$t("Name")),1),t("th",null,l(s.$t("Enable")),1),t("th",null,l(s.$t("Remark")),1),t("th",null,l(s.$t("Action")),1)])]),t("tbody",null,[(d(!0),c(y,null,w(a.value,(e,_)=>(d(),c("tr",{key:_},[t("td",null,l(_+1),1),t("td",null,[r(t("input",{class:"input_no_border form-control",disabled:e.Type=="miniauth",type:"text","onUpdate:modelValue":o=>e.Name=o},null,8,F),[[p,e.Name]])]),t("td",null,[t("div",z,[r(t("input",{disabled:e.Type=="miniauth",class:"form-check-input",type:"checkbox","onUpdate:modelValue":o=>e.Enable=o},null,8,H),[[g,e.Enable]])])]),t("td",null,[r(t("input",{class:"input_no_border form-control",type:"text","onUpdate:modelValue":o=>e.Remark=o},null,8,S),[[p,e.Remark]])]),t("td",null,[t("button",{disabled:e.Type=="miniauth",class:"btn",onClick:o=>f(e)},J,8,q),t("button",{disabled:e.Type=="miniauth",class:"btn",onClick:o=>b(e.Id)},P,8,K)])]))),128))])])]))}};export{tt as default}; +import{u as v,r as h,o as k,a as d,c,b as t,t as l,F as y,d as w,w as r,v as p,e as g}from"./index-wtJzGEvf.js";import{_ as x,a as V}from"./delete-xH6gjfA0.js";import{s as u}from"./service-m5cBW5EV.js";const R={class:"row",style:{"padding-bottom":"10px","padding-top":"10px"}},C={class:"col-sm-8"},M=["title"],$=t("svg",{width:"40px",height:"40px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M7 12L12 12M12 12L17 12M12 12V7M12 12L12 17",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),t("circle",{cx:"12",cy:"12",r:"9",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),I=t("span",{class:"visually-hidden"},"Insert",-1),U=[$,I],B=["title"],E=t("svg",{fill:"#000000",width:"40px",height:"40px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z"})],-1),L=t("span",{class:"visually-hidden"},"Insert",-1),N=[E,L],T=t("div",{class:"col-sm-4"},null,-1),D={class:"table table-hover"},j={class:"table-dark"},A=t("th",null,"#",-1),F=["disabled","onUpdate:modelValue"],z={class:"form-check form-switch"},H=["disabled","onUpdate:modelValue"],S=["onUpdate:modelValue"],q=["disabled","onClick"],G=t("img",{src:x},null,-1),J=[G],K=["disabled","onClick"],O=t("img",{src:V},null,-1),P=[O],tt={__name:"RolesView",setup(Q){const{t:n}=v();h("Roles");const a=h([]),i=async()=>{a.value=await u.get("api/getRoles")},m=async()=>{confirm(n("please_confirm"))&&a.value.push({Id:null,Name:"",Enable:!0})},b=async s=>{confirm(n("please_confirm"))&&await u.post("api/deleteRole",{Id:s}).then(async()=>{alert(n("updated_successfully")),await i()})},f=async s=>{confirm(n("please_confirm"))&&await u.post("api/saveRole",s).then(async()=>{alert(n("updated_successfully"))})};return k(async()=>{await i()}),(s,W)=>(d(),c("div",null,[t("div",R,[t("div",C,[t("button",{title:s.$t("add"),onClick:m,class:"btn",type:"button"},U,8,M),t("button",{title:s.$t("refresh"),onClick:i,class:"btn",type:"button"},N,8,B)]),T]),t("table",D,[t("thead",null,[t("tr",j,[A,t("th",null,l(s.$t("Name")),1),t("th",null,l(s.$t("Enable")),1),t("th",null,l(s.$t("Remark")),1),t("th",null,l(s.$t("Action")),1)])]),t("tbody",null,[(d(!0),c(y,null,w(a.value,(e,_)=>(d(),c("tr",{key:_},[t("td",null,l(_+1),1),t("td",null,[r(t("input",{class:"input_no_border form-control",disabled:e.Type=="miniauth",type:"text","onUpdate:modelValue":o=>e.Name=o},null,8,F),[[p,e.Name]])]),t("td",null,[t("div",z,[r(t("input",{disabled:e.Type=="miniauth",class:"form-check-input",type:"checkbox","onUpdate:modelValue":o=>e.Enable=o},null,8,H),[[g,e.Enable]])])]),t("td",null,[r(t("input",{class:"input_no_border form-control",type:"text","onUpdate:modelValue":o=>e.Remark=o},null,8,S),[[p,e.Remark]])]),t("td",null,[t("button",{disabled:e.Type=="miniauth",class:"btn",onClick:o=>f(e)},J,8,q),t("button",{disabled:e.Type=="miniauth",class:"btn",onClick:o=>b(e.Id)},P,8,K)])]))),128))])])]))}};export{tt as default}; diff --git a/src/MiniAuth.IdentityAuth/wwwroot/assets/UsersView-VAWIrR_a.js b/src/MiniAuth.IdentityAuth/wwwroot/assets/UsersView-5yFV_8JA.js similarity index 99% rename from src/MiniAuth.IdentityAuth/wwwroot/assets/UsersView-VAWIrR_a.js rename to src/MiniAuth.IdentityAuth/wwwroot/assets/UsersView-5yFV_8JA.js index 13a7e48..6327a9b 100644 --- a/src/MiniAuth.IdentityAuth/wwwroot/assets/UsersView-VAWIrR_a.js +++ b/src/MiniAuth.IdentityAuth/wwwroot/assets/UsersView-5yFV_8JA.js @@ -1 +1 @@ -import{u as z,r as p,f as B,o as j,a as i,c,b as e,w as n,v as u,g as q,t as a,F as g,d as C,n as M,h as x,e as m,i as P,j as D,p as H,k as K}from"./index-7uhYHvCj.js";import{_ as O,a as Z}from"./delete-xH6gjfA0.js";import{s as U}from"./service-LZZpIdq7.js";const G="data:image/svg+xml,%3csvg%20fill='%23000000'%20xmlns='http://www.w3.org/2000/svg'%20width='20px'%20height='20px'%20viewBox='0%200%2052%2052'%20enable-background='new%200%200%2052%2052'%20xml:space='preserve'%3e%3cg%3e%3cpath%20d='M42,23H10c-2.2,0-4,1.8-4,4v19c0,2.2,1.8,4,4,4h32c2.2,0,4-1.8,4-4V27C46,24.8,44.2,23,42,23z%20M31,44.5%20c-1.5,1-3.2,1.5-5,1.5c-0.6,0-1.2-0.1-1.8-0.2c-2.4-0.5-4.4-1.8-5.7-3.8l3.3-2.2c0.7,1.1,1.9,1.9,3.2,2.1c1.3,0.3,2.6,0,3.8-0.8%20c2.3-1.5,2.9-4.7,1.4-6.9c-0.7-1.1-1.9-1.9-3.2-2.1c-1.3-0.3-2.6,0-3.8,0.8c-0.3,0.2-0.5,0.4-0.7,0.6L26,37h-9v-9l2.6,2.6%20c0.4-0.4,0.9-0.8,1.3-1.1c2-1.3,4.4-1.8,6.8-1.4c2.4,0.5,4.4,1.8,5.7,3.8C36.2,36.1,35.1,41.7,31,44.5z'%20/%3e%3cpath%20d='M10,18.1v0.4C10,18.4,10,18.3,10,18.1C10,18.1,10,18.1,10,18.1z'%20/%3e%3cpath%20d='M11,19h4c0.6,0,1-0.3,1-0.9V18c0-5.7,4.9-10.4,10.7-10C32,8.4,36,13,36,18.4v-0.3c0,0.6,0.4,0.9,1,0.9h4%20c0.6,0,1-0.3,1-0.9V18c0-9.1-7.6-16.4-16.8-16c-8.5,0.4-15,7.6-15.2,16.1C10.1,18.6,10.5,19,11,19z'%20/%3e%3c/g%3e%3c/svg%3e",J=(_,v)=>{const f=_.__vccOpts||_;for(const[k,y]of v)f[k]=y;return f},h=_=>(H("data-v-edb65bec"),_=_(),K(),_),Q={class:"scrollable-container"},W={class:"row",style:{"padding-bottom":"10px","padding-top":"10px"}},X={class:"col-sm-12"},Y=["title"],ee=h(()=>e("svg",{width:"40px",height:"40px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M7 12L12 12M12 12L17 12M12 12V7M12 12L12 17",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("circle",{cx:"12",cy:"12",r:"9",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),te=h(()=>e("span",{class:"visually-hidden"},"Insert",-1)),oe=[ee,te],le=["title"],se=h(()=>e("svg",{fill:"#000000",width:"40px",height:"40px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z"})],-1)),ae=h(()=>e("span",{class:"visually-hidden"},"Insert",-1)),ne=[se,ae],de=h(()=>e("div",{class:"col-sm-4"},null,-1)),ie={class:"table table-hover"},ce={class:"table-dark"},ue=["title","onClick"],re=h(()=>e("img",{src:O},null,-1)),pe=[re],he=["onClick"],me=h(()=>e("img",{src:G},null,-1)),_e=[me],ve=["disabled","onClick"],be=h(()=>e("img",{src:Z},null,-1)),fe=[be],ke=["onUpdate:modelValue"],ye={class:"hover"},we={class:"hover-default"},ge={key:0},Ce={key:0},Ue={class:"hover-show"},Ve=["disabled","value","onUpdate:modelValue"],$e=["for"],Ee=["onUpdate:modelValue"],Ne=["onUpdate:modelValue"],Me=["onUpdate:modelValue"],xe=["onUpdate:modelValue"],Le=["onUpdate:modelValue"],Pe={class:"form-check form-switch"},Ie=["onUpdate:modelValue"],Fe={class:"form-check form-switch"},Se=["onUpdate:modelValue"],Re={class:"form-check form-switch"},Te=["onUpdate:modelValue"],Ae={class:"form-check form-switch"},ze=["onUpdate:modelValue"],Be={class:"form-check form-switch"},je=["onUpdate:modelValue"],qe=["onUpdate:modelValue"],De=["onUpdate:modelValue"],He={"aria-label":"Page navigation"},Ke={class:"pagination justify-content-center"},Oe=["onClick"],Ze={class:"modal fade",id:"editmodal",tabindex:"-1","aria-labelledby":"myModalLabel","aria-hidden":"true"},Ge={class:"modal-dialog modal-dialog-centered"},Je={class:"modal-content"},Qe=D('',1),We={class:"modal-body"},Xe={key:0},Ye={for:"userName"},et={for:"roles"},tt={style:{height:"100px","scroll-behavior":"smooth","overflow-y":"auto"}},ot=["disabled","value"],lt=["for"],st={for:"firstName"},at={for:"lastName"},nt=h(()=>e("label",{for:"email"},"Email:",-1)),dt={for:"empNo"},it={for:"enable"},ct={class:"form-check form-switch"},ut={class:"modal-footer"},rt={type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"},pt={__name:"UsersView",setup(_){const{t:v}=z();p("Users");const f=p([]),k=p([]),y=p(10),b=p(0),$=p(0),E=p(""),N=o=>{b.value=o,w()},I=B(()=>{const o=Math.ceil($.value/y.value);return Array.from({length:o},(s,t)=>t)}),w=async()=>{await U.post("api/getUsers",{pageSize:y.value,pageIndex:b.value,search:E.value}).then(o=>($.value=o.totalItems,f.value=o.users,o.users)),k.value=await U.get("api/getRoles")},F=p(!1),d=p(null),S=async()=>{confirm("Are you sure you want to insert?")&&f.value.push({Id:null,Enable:!0,Roles:[]})},R=async o=>{confirm("Are you sure you want to delete?")&&await U.post("api/deleteUser",{Id:o}).then(async()=>{alert("Delete successfully"),await w()})},L=async o=>{confirm(v("please_confirm"))&&await U.post("api/saveUser",o).then(async s=>{alert(v("updated_successfully")),(o.Id==null||o.Id==null)&&(alert(v("new_password",[s.newPassword])),navigator.clipboard.writeText(s.newPassword))})},T=async o=>{confirm(v("resetPasswordConfirm"))&&await U.post("api/resetPassword",o).then(async s=>{alert(v("new_password",[s.newPassword])),navigator.clipboard.writeText(s.newPassword)})};return j(async()=>{await w()}),(o,s)=>(i(),c("div",Q,[e("div",W,[e("div",X,[e("button",{title:o.$t("add"),onClick:S,class:"btn",type:"button"},oe,8,Y),e("button",{title:o.$t("refresh"),onClick:w,class:"btn",type:"button"},ne,8,le),n(e("input",{style:{float:"right",height:"40px",border:"0","border-bottom":"1px solid black",outline:"0"},type:"text",placeholder:"Search","aria-label":"Search","onUpdate:modelValue":s[0]||(s[0]=t=>E.value=t),onKeyup:s[1]||(s[1]=q(t=>w(),["enter"]))},null,544),[[u,E.value]])]),de]),e("table",ie,[e("thead",null,[e("tr",ce,[e("th",null,a(o.$t("Action")),1),e("th",null,a(o.$t("UserName")),1),e("th",null,a(o.$t("Roles")),1),e("th",null,a(o.$t("Email")),1),e("th",null,a(o.$t("PhoneNumber")),1),e("th",null,a(o.$t("FirstName")),1),e("th",null,a(o.$t("LastName")),1),e("th",null,a(o.$t("Employee_Number")),1),e("th",null,a(o.$t("Enable")),1),e("th",null,a(o.$t("Email Confirmed")),1),e("th",null,a(o.$t("PhoneNumber Confirmed")),1),e("th",null,a(o.$t("Two Factor Enabled")),1),e("th",null,a(o.$t("Lockout Enabled")),1),e("th",null,a(o.$t("Lockout End")),1),e("th",null,a(o.$t("Access Failed Count")),1)])]),e("tbody",null,[(i(!0),c(g,null,C(f.value,(t,r)=>(i(),c("tr",{key:r},[e("td",null,[e("button",{title:o.$t("Save"),class:"btn",onClick:l=>L(t)},pe,8,ue),e("button",{class:"btn",onClick:l=>T(t)},_e,8,he),e("button",{disabled:(t==null?void 0:t.Type)=="miniauth",class:"btn",onClick:l=>R(t.Id)},fe,8,ve)]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.Username=l},null,8,ke),[[u,t.Username]])]),e("td",null,[e("div",ye,[e("div",we,[t.Roles.length==0?(i(),c("div",ge,"N/A")):(i(!0),c(g,{key:1},C(k.value,(l,V)=>(i(),c("div",{key:V},[t.Roles.includes(l.Id)?(i(),c("span",Ce,a(l.Name),1)):P("",!0)]))),128))]),e("div",Ue,[(i(!0),c(g,null,C(k.value,(l,V)=>(i(),c("div",{class:"form-check",key:V},[n(e("input",{disabled:t.Type=="miniauth"||l.Enable==!1,class:"role_checkbox form-check-input",type:"checkbox",value:l.Id,"onUpdate:modelValue":A=>t.Roles=A},null,8,Ve),[[m,t.Roles]]),e("label",{class:"form-check-label",for:"role_"+V},a(l.Name),9,$e)]))),128))])])]),e("td",null,[n(e("input",{class:"input_no_border",type:"mail","onUpdate:modelValue":l=>t.Mail=l},null,8,Ee),[[u,t.Mail]])]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.PhoneNumber=l},null,8,Ne),[[u,t.PhoneNumber]])]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.First_name=l},null,8,Me),[[u,t.First_name]])]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.Last_name=l},null,8,xe),[[u,t.Last_name]])]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.Emp_no=l},null,8,Le),[[u,t.Emp_no]])]),e("td",null,[e("div",Pe,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.Enable=l},null,8,Ie),[[m,t.Enable]])])]),e("td",null,[e("div",Fe,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.EmailConfirmed=l},null,8,Se),[[m,t.EmailConfirmed]])])]),e("td",null,[e("div",Re,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.PhoneNumberConfirmed=l},null,8,Te),[[m,t.PhoneNumberConfirmed]])])]),e("td",null,[e("div",Ae,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.TwoFactorEnabled=l},null,8,ze),[[m,t.TwoFactorEnabled]])])]),e("td",null,[e("div",Be,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.LockoutEnabled=l},null,8,je),[[m,t.LockoutEnabled]])])]),e("td",null,[n(e("input",{class:"input_no_border",type:"datetime-local","onUpdate:modelValue":l=>t.LockoutEnd=l},null,8,qe),[[u,t.LockoutEnd]])]),e("td",null,[n(e("input",{readonly:"",class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.AccessFailedCount=l},null,8,De),[[u,t.AccessFailedCount]])])]))),128))])]),e("nav",He,[e("ul",Ke,[e("li",{class:M(["page-item",{disabled:b.value===0}])},[e("button",{class:"page-link",onClick:s[2]||(s[2]=x(t=>N(b.value-1),["prevent"]))},a(o.$t("Previous")),1)],2),(i(!0),c(g,null,C(I.value,(t,r)=>(i(),c("li",{class:M(["page-item",{active:b.value===r}]),key:r},[e("button",{class:"page-link",onClick:x(l=>N(r),["prevent"])},a(r+1),9,Oe)],2))),128)),e("li",{class:M(["page-item",{disabled:b.value>=Math.ceil($.value/y.value)-1}])},[e("button",{class:"page-link",onClick:s[3]||(s[3]=x(t=>N(b.value+1),["prevent"]))},a(o.$t("Next")),1)],2)])]),e("div",null,[e("div",Ze,[e("div",Ge,[e("div",Je,[Qe,e("div",We,[F.value?(i(),c("form",Xe,[e("label",Ye,a(o.$t("UserName"))+":",1),n(e("input",{class:"form-control",type:"text","onUpdate:modelValue":s[4]||(s[4]=t=>d.value.Username=t),id:"userName",required:""},null,512),[[u,d.value.Username]]),e("label",et,a(o.$t("Roles"))+":",1),e("div",tt,[(i(!0),c(g,null,C(k.value,(t,r)=>(i(),c("div",{class:"form-check",key:r},[n(e("input",{disabled:d.value.Type=="miniauth"||t.Enable==!1,class:"role_checkbox form-check-input",type:"checkbox",value:t.Id,"onUpdate:modelValue":s[5]||(s[5]=l=>d.value.Roles=l)},null,8,ot),[[m,d.value.Roles]]),e("label",{class:"form-check-label",for:"role_"+r},a(t.Name),9,lt)]))),128))]),e("label",st,a(o.$t("FirstName"))+":",1),n(e("input",{class:"form-control",type:"text","onUpdate:modelValue":s[6]||(s[6]=t=>d.value.First_name=t),id:"firstName",required:""},null,512),[[u,d.value.First_name]]),e("label",at,a(o.$t("LastName"))+":",1),n(e("input",{class:"form-control",type:"text","onUpdate:modelValue":s[7]||(s[7]=t=>d.value.Last_name=t),id:"lastName",required:""},null,512),[[u,d.value.Last_name]]),nt,n(e("input",{class:"form-control",type:"email","onUpdate:modelValue":s[8]||(s[8]=t=>d.value.Mail=t),id:"email",required:""},null,512),[[u,d.value.Mail]]),e("label",dt,a(o.$t("Employee_Number"))+":",1),n(e("input",{class:"form-control",type:"text","onUpdate:modelValue":s[9]||(s[9]=t=>d.value.Emp_no=t),id:"empNo",required:""},null,512),[[u,d.value.Emp_no]]),e("label",it,a(o.$t("Enable"))+":",1),e("div",ct,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[10]||(s[10]=t=>d.value.Enable=t)},null,512),[[m,d.value.Enable]])])])):P("",!0)]),e("div",ut,[e("button",rt,a(o.$t("Cancel")),1),e("button",{type:"button",onClick:s[11]||(s[11]=t=>L(d.value)),class:"btn btn-primary"},a(o.$t("Save")),1)])])])])])]))}},vt=J(pt,[["__scopeId","data-v-edb65bec"]]);export{vt as default}; +import{u as z,r as p,f as B,o as j,a as i,c,b as e,w as n,v as u,g as q,t as a,F as g,d as C,n as M,h as x,e as m,i as P,j as D,p as H,k as K}from"./index-wtJzGEvf.js";import{_ as O,a as Z}from"./delete-xH6gjfA0.js";import{s as U}from"./service-m5cBW5EV.js";const G="data:image/svg+xml,%3csvg%20fill='%23000000'%20xmlns='http://www.w3.org/2000/svg'%20width='20px'%20height='20px'%20viewBox='0%200%2052%2052'%20enable-background='new%200%200%2052%2052'%20xml:space='preserve'%3e%3cg%3e%3cpath%20d='M42,23H10c-2.2,0-4,1.8-4,4v19c0,2.2,1.8,4,4,4h32c2.2,0,4-1.8,4-4V27C46,24.8,44.2,23,42,23z%20M31,44.5%20c-1.5,1-3.2,1.5-5,1.5c-0.6,0-1.2-0.1-1.8-0.2c-2.4-0.5-4.4-1.8-5.7-3.8l3.3-2.2c0.7,1.1,1.9,1.9,3.2,2.1c1.3,0.3,2.6,0,3.8-0.8%20c2.3-1.5,2.9-4.7,1.4-6.9c-0.7-1.1-1.9-1.9-3.2-2.1c-1.3-0.3-2.6,0-3.8,0.8c-0.3,0.2-0.5,0.4-0.7,0.6L26,37h-9v-9l2.6,2.6%20c0.4-0.4,0.9-0.8,1.3-1.1c2-1.3,4.4-1.8,6.8-1.4c2.4,0.5,4.4,1.8,5.7,3.8C36.2,36.1,35.1,41.7,31,44.5z'%20/%3e%3cpath%20d='M10,18.1v0.4C10,18.4,10,18.3,10,18.1C10,18.1,10,18.1,10,18.1z'%20/%3e%3cpath%20d='M11,19h4c0.6,0,1-0.3,1-0.9V18c0-5.7,4.9-10.4,10.7-10C32,8.4,36,13,36,18.4v-0.3c0,0.6,0.4,0.9,1,0.9h4%20c0.6,0,1-0.3,1-0.9V18c0-9.1-7.6-16.4-16.8-16c-8.5,0.4-15,7.6-15.2,16.1C10.1,18.6,10.5,19,11,19z'%20/%3e%3c/g%3e%3c/svg%3e",J=(_,v)=>{const f=_.__vccOpts||_;for(const[k,y]of v)f[k]=y;return f},h=_=>(H("data-v-edb65bec"),_=_(),K(),_),Q={class:"scrollable-container"},W={class:"row",style:{"padding-bottom":"10px","padding-top":"10px"}},X={class:"col-sm-12"},Y=["title"],ee=h(()=>e("svg",{width:"40px",height:"40px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M7 12L12 12M12 12L17 12M12 12V7M12 12L12 17",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),e("circle",{cx:"12",cy:"12",r:"9",stroke:"#000000","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1)),te=h(()=>e("span",{class:"visually-hidden"},"Insert",-1)),oe=[ee,te],le=["title"],se=h(()=>e("svg",{fill:"#000000",width:"40px",height:"40px",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z"})],-1)),ae=h(()=>e("span",{class:"visually-hidden"},"Insert",-1)),ne=[se,ae],de=h(()=>e("div",{class:"col-sm-4"},null,-1)),ie={class:"table table-hover"},ce={class:"table-dark"},ue=["title","onClick"],re=h(()=>e("img",{src:O},null,-1)),pe=[re],he=["onClick"],me=h(()=>e("img",{src:G},null,-1)),_e=[me],ve=["disabled","onClick"],be=h(()=>e("img",{src:Z},null,-1)),fe=[be],ke=["onUpdate:modelValue"],ye={class:"hover"},we={class:"hover-default"},ge={key:0},Ce={key:0},Ue={class:"hover-show"},Ve=["disabled","value","onUpdate:modelValue"],$e=["for"],Ee=["onUpdate:modelValue"],Ne=["onUpdate:modelValue"],Me=["onUpdate:modelValue"],xe=["onUpdate:modelValue"],Le=["onUpdate:modelValue"],Pe={class:"form-check form-switch"},Ie=["onUpdate:modelValue"],Fe={class:"form-check form-switch"},Se=["onUpdate:modelValue"],Re={class:"form-check form-switch"},Te=["onUpdate:modelValue"],Ae={class:"form-check form-switch"},ze=["onUpdate:modelValue"],Be={class:"form-check form-switch"},je=["onUpdate:modelValue"],qe=["onUpdate:modelValue"],De=["onUpdate:modelValue"],He={"aria-label":"Page navigation"},Ke={class:"pagination justify-content-center"},Oe=["onClick"],Ze={class:"modal fade",id:"editmodal",tabindex:"-1","aria-labelledby":"myModalLabel","aria-hidden":"true"},Ge={class:"modal-dialog modal-dialog-centered"},Je={class:"modal-content"},Qe=D('',1),We={class:"modal-body"},Xe={key:0},Ye={for:"userName"},et={for:"roles"},tt={style:{height:"100px","scroll-behavior":"smooth","overflow-y":"auto"}},ot=["disabled","value"],lt=["for"],st={for:"firstName"},at={for:"lastName"},nt=h(()=>e("label",{for:"email"},"Email:",-1)),dt={for:"empNo"},it={for:"enable"},ct={class:"form-check form-switch"},ut={class:"modal-footer"},rt={type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"},pt={__name:"UsersView",setup(_){const{t:v}=z();p("Users");const f=p([]),k=p([]),y=p(10),b=p(0),$=p(0),E=p(""),N=o=>{b.value=o,w()},I=B(()=>{const o=Math.ceil($.value/y.value);return Array.from({length:o},(s,t)=>t)}),w=async()=>{await U.post("api/getUsers",{pageSize:y.value,pageIndex:b.value,search:E.value}).then(o=>($.value=o.totalItems,f.value=o.users,o.users)),k.value=await U.get("api/getRoles")},F=p(!1),d=p(null),S=async()=>{confirm("Are you sure you want to insert?")&&f.value.push({Id:null,Enable:!0,Roles:[]})},R=async o=>{confirm("Are you sure you want to delete?")&&await U.post("api/deleteUser",{Id:o}).then(async()=>{alert("Delete successfully"),await w()})},L=async o=>{confirm(v("please_confirm"))&&await U.post("api/saveUser",o).then(async s=>{alert(v("updated_successfully")),(o.Id==null||o.Id==null)&&(alert(v("new_password",[s.newPassword])),navigator.clipboard.writeText(s.newPassword))})},T=async o=>{confirm(v("resetPasswordConfirm"))&&await U.post("api/resetPassword",o).then(async s=>{alert(v("new_password",[s.newPassword])),navigator.clipboard.writeText(s.newPassword)})};return j(async()=>{await w()}),(o,s)=>(i(),c("div",Q,[e("div",W,[e("div",X,[e("button",{title:o.$t("add"),onClick:S,class:"btn",type:"button"},oe,8,Y),e("button",{title:o.$t("refresh"),onClick:w,class:"btn",type:"button"},ne,8,le),n(e("input",{style:{float:"right",height:"40px",border:"0","border-bottom":"1px solid black",outline:"0"},type:"text",placeholder:"Search","aria-label":"Search","onUpdate:modelValue":s[0]||(s[0]=t=>E.value=t),onKeyup:s[1]||(s[1]=q(t=>w(),["enter"]))},null,544),[[u,E.value]])]),de]),e("table",ie,[e("thead",null,[e("tr",ce,[e("th",null,a(o.$t("Action")),1),e("th",null,a(o.$t("UserName")),1),e("th",null,a(o.$t("Roles")),1),e("th",null,a(o.$t("Email")),1),e("th",null,a(o.$t("PhoneNumber")),1),e("th",null,a(o.$t("FirstName")),1),e("th",null,a(o.$t("LastName")),1),e("th",null,a(o.$t("Employee_Number")),1),e("th",null,a(o.$t("Enable")),1),e("th",null,a(o.$t("Email Confirmed")),1),e("th",null,a(o.$t("PhoneNumber Confirmed")),1),e("th",null,a(o.$t("Two Factor Enabled")),1),e("th",null,a(o.$t("Lockout Enabled")),1),e("th",null,a(o.$t("Lockout End")),1),e("th",null,a(o.$t("Access Failed Count")),1)])]),e("tbody",null,[(i(!0),c(g,null,C(f.value,(t,r)=>(i(),c("tr",{key:r},[e("td",null,[e("button",{title:o.$t("Save"),class:"btn",onClick:l=>L(t)},pe,8,ue),e("button",{class:"btn",onClick:l=>T(t)},_e,8,he),e("button",{disabled:(t==null?void 0:t.Type)=="miniauth",class:"btn",onClick:l=>R(t.Id)},fe,8,ve)]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.Username=l},null,8,ke),[[u,t.Username]])]),e("td",null,[e("div",ye,[e("div",we,[t.Roles.length==0?(i(),c("div",ge,"N/A")):(i(!0),c(g,{key:1},C(k.value,(l,V)=>(i(),c("div",{key:V},[t.Roles.includes(l.Id)?(i(),c("span",Ce,a(l.Name),1)):P("",!0)]))),128))]),e("div",Ue,[(i(!0),c(g,null,C(k.value,(l,V)=>(i(),c("div",{class:"form-check",key:V},[n(e("input",{disabled:t.Type=="miniauth"||l.Enable==!1,class:"role_checkbox form-check-input",type:"checkbox",value:l.Id,"onUpdate:modelValue":A=>t.Roles=A},null,8,Ve),[[m,t.Roles]]),e("label",{class:"form-check-label",for:"role_"+V},a(l.Name),9,$e)]))),128))])])]),e("td",null,[n(e("input",{class:"input_no_border",type:"mail","onUpdate:modelValue":l=>t.Mail=l},null,8,Ee),[[u,t.Mail]])]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.PhoneNumber=l},null,8,Ne),[[u,t.PhoneNumber]])]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.First_name=l},null,8,Me),[[u,t.First_name]])]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.Last_name=l},null,8,xe),[[u,t.Last_name]])]),e("td",null,[n(e("input",{class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.Emp_no=l},null,8,Le),[[u,t.Emp_no]])]),e("td",null,[e("div",Pe,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.Enable=l},null,8,Ie),[[m,t.Enable]])])]),e("td",null,[e("div",Fe,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.EmailConfirmed=l},null,8,Se),[[m,t.EmailConfirmed]])])]),e("td",null,[e("div",Re,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.PhoneNumberConfirmed=l},null,8,Te),[[m,t.PhoneNumberConfirmed]])])]),e("td",null,[e("div",Ae,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.TwoFactorEnabled=l},null,8,ze),[[m,t.TwoFactorEnabled]])])]),e("td",null,[e("div",Be,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":l=>t.LockoutEnabled=l},null,8,je),[[m,t.LockoutEnabled]])])]),e("td",null,[n(e("input",{class:"input_no_border",type:"datetime-local","onUpdate:modelValue":l=>t.LockoutEnd=l},null,8,qe),[[u,t.LockoutEnd]])]),e("td",null,[n(e("input",{readonly:"",class:"input_no_border",type:"text","onUpdate:modelValue":l=>t.AccessFailedCount=l},null,8,De),[[u,t.AccessFailedCount]])])]))),128))])]),e("nav",He,[e("ul",Ke,[e("li",{class:M(["page-item",{disabled:b.value===0}])},[e("button",{class:"page-link",onClick:s[2]||(s[2]=x(t=>N(b.value-1),["prevent"]))},a(o.$t("Previous")),1)],2),(i(!0),c(g,null,C(I.value,(t,r)=>(i(),c("li",{class:M(["page-item",{active:b.value===r}]),key:r},[e("button",{class:"page-link",onClick:x(l=>N(r),["prevent"])},a(r+1),9,Oe)],2))),128)),e("li",{class:M(["page-item",{disabled:b.value>=Math.ceil($.value/y.value)-1}])},[e("button",{class:"page-link",onClick:s[3]||(s[3]=x(t=>N(b.value+1),["prevent"]))},a(o.$t("Next")),1)],2)])]),e("div",null,[e("div",Ze,[e("div",Ge,[e("div",Je,[Qe,e("div",We,[F.value?(i(),c("form",Xe,[e("label",Ye,a(o.$t("UserName"))+":",1),n(e("input",{class:"form-control",type:"text","onUpdate:modelValue":s[4]||(s[4]=t=>d.value.Username=t),id:"userName",required:""},null,512),[[u,d.value.Username]]),e("label",et,a(o.$t("Roles"))+":",1),e("div",tt,[(i(!0),c(g,null,C(k.value,(t,r)=>(i(),c("div",{class:"form-check",key:r},[n(e("input",{disabled:d.value.Type=="miniauth"||t.Enable==!1,class:"role_checkbox form-check-input",type:"checkbox",value:t.Id,"onUpdate:modelValue":s[5]||(s[5]=l=>d.value.Roles=l)},null,8,ot),[[m,d.value.Roles]]),e("label",{class:"form-check-label",for:"role_"+r},a(t.Name),9,lt)]))),128))]),e("label",st,a(o.$t("FirstName"))+":",1),n(e("input",{class:"form-control",type:"text","onUpdate:modelValue":s[6]||(s[6]=t=>d.value.First_name=t),id:"firstName",required:""},null,512),[[u,d.value.First_name]]),e("label",at,a(o.$t("LastName"))+":",1),n(e("input",{class:"form-control",type:"text","onUpdate:modelValue":s[7]||(s[7]=t=>d.value.Last_name=t),id:"lastName",required:""},null,512),[[u,d.value.Last_name]]),nt,n(e("input",{class:"form-control",type:"email","onUpdate:modelValue":s[8]||(s[8]=t=>d.value.Mail=t),id:"email",required:""},null,512),[[u,d.value.Mail]]),e("label",dt,a(o.$t("Employee_Number"))+":",1),n(e("input",{class:"form-control",type:"text","onUpdate:modelValue":s[9]||(s[9]=t=>d.value.Emp_no=t),id:"empNo",required:""},null,512),[[u,d.value.Emp_no]]),e("label",it,a(o.$t("Enable"))+":",1),e("div",ct,[n(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[10]||(s[10]=t=>d.value.Enable=t)},null,512),[[m,d.value.Enable]])])])):P("",!0)]),e("div",ut,[e("button",rt,a(o.$t("Cancel")),1),e("button",{type:"button",onClick:s[11]||(s[11]=t=>L(d.value)),class:"btn btn-primary"},a(o.$t("Save")),1)])])])])])]))}},vt=J(pt,[["__scopeId","data-v-edb65bec"]]);export{vt as default}; diff --git a/src/MiniAuth.IdentityAuth/wwwroot/assets/index-7uhYHvCj.js b/src/MiniAuth.IdentityAuth/wwwroot/assets/index-wtJzGEvf.js similarity index 99% rename from src/MiniAuth.IdentityAuth/wwwroot/assets/index-7uhYHvCj.js rename to src/MiniAuth.IdentityAuth/wwwroot/assets/index-wtJzGEvf.js index 2ba5de4..2049389 100644 --- a/src/MiniAuth.IdentityAuth/wwwroot/assets/index-7uhYHvCj.js +++ b/src/MiniAuth.IdentityAuth/wwwroot/assets/index-wtJzGEvf.js @@ -24,10 +24,10 @@ * vue-i18n v9.10.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. - */const om="9.10.2";function am(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(pt().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(pt().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(pt().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(pt().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(pt().__INTLIFY_PROD_DEVTOOLS__=!1)}const za=Hd.__EXTEND_POINT__,ht=Ws(za);ht(),ht(),ht(),ht(),ht(),ht(),ht(),ht(),ht();const Za=Qe.__EXTEND_POINT__,De=Ws(Za),Te={UNEXPECTED_RETURN_TYPE:Za,INVALID_ARGUMENT:De(),MUST_BE_CALL_SETUP_TOP:De(),NOT_INSTALLED:De(),NOT_AVAILABLE_IN_LEGACY_MODE:De(),REQUIRED_VALUE:De(),INVALID_VALUE:De(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:De(),NOT_INSTALLED_WITH_PROVIDE:De(),UNEXPECTED_ERROR:De(),NOT_COMPATIBLE_LEGACY_VUE_I18N:De(),BRIDGE_SUPPORT_VUE_2_ONLY:De(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:De(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:De(),__EXTEND_POINT__:De()};function Oe(e,...t){return _n(e,null,void 0)}const cs=At("__translateVNode"),us=At("__datetimeParts"),fs=At("__numberParts"),ei=At("__setPluralRules"),ti=At("__injectWithOption"),ds=At("__dispose");function Fn(e){if(!oe(e))return e;for(const t in e)if(ar(e,t))if(!t.includes("."))oe(e[t])&&Fn(e[t]);else{const n=t.split("."),r=n.length-1;let l=e,s=!1;for(let o=0;o{if("locale"in i&&"resource"in i){const{locale:a,resource:f}=i;a?(o[a]=o[a]||{},Qn(f,o[a])):Qn(f,o)}else U(i)&&Qn(JSON.parse(i),o)}),l==null&&s)for(const i in o)ar(o,i)&&Fn(o[i]);return o}function ni(e){return e.type}function ri(e,t,n){let r=oe(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=Cr(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const l=Object.keys(r);l.length&&l.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(oe(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(o=>{e.mergeDateTimeFormat(o,t.datetimeFormats[o])})}if(oe(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(o=>{e.mergeNumberFormat(o,t.numberFormats[o])})}}}function ho(e){return Ne(xn,null,e,0)}const _o="__INTLIFY_META__",po=()=>[],im=()=>!1;let go=0;function Eo(e){return(t,n,r,l)=>e(n,r,wn()||void 0,l)}const cm=()=>{const e=wn();let t=null;return e&&(t=ni(e)[_o])?{[_o]:t}:null};function Ks(e={},t){const{__root:n,__injectWithOption:r}=e,l=n===void 0,s=e.flatJson,o=or?ot:Ps,i=!!e.translateExistCompatible;let a=te(e.inheritLocale)?e.inheritLocale:!0;const f=o(n&&a?n.locale.value:U(e.locale)?e.locale:un),d=o(n&&a?n.fallbackLocale.value:U(e.fallbackLocale)||he(e.fallbackLocale)||J(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:f.value),m=o(Cr(f.value,e)),h=o(J(e.datetimeFormats)?e.datetimeFormats:{[f.value]:{}}),b=o(J(e.numberFormats)?e.numberFormats:{[f.value]:{}});let C=n?n.missingWarn:te(e.missingWarn)||Rt(e.missingWarn)?e.missingWarn:!0,O=n?n.fallbackWarn:te(e.fallbackWarn)||Rt(e.fallbackWarn)?e.fallbackWarn:!0,R=n?n.fallbackRoot:te(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,N=ue(e.missing)?e.missing:null,P=ue(e.missing)?Eo(e.missing):null,v=ue(e.postTranslation)?e.postTranslation:null,k=n?n.warnHtmlMessage:te(e.warnHtmlMessage)?e.warnHtmlMessage:!0,M=!!e.escapeParameter;const V=n?n.modifiers:J(e.modifiers)?e.modifiers:{};let Q=e.pluralRules||n&&n.pluralRules,$;$=(()=>{l&&so(null);const y={version:om,locale:f.value,fallbackLocale:d.value,messages:m.value,modifiers:V,pluralRules:Q,missing:P===null?void 0:P,missingWarn:C,fallbackWarn:O,fallbackFormat:g,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:k,escapeParameter:M,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};y.datetimeFormats=h.value,y.numberFormats=b.value,y.__datetimeFormatters=J($)?$.__datetimeFormatters:void 0,y.__numberFormatters=J($)?$.__numberFormatters:void 0;const I=zd(y);return l&&so(I),I})(),bn($,f.value,d.value);function ve(){return[f.value,d.value,m.value,h.value,b.value]}const de=be({get:()=>f.value,set:y=>{f.value=y,$.locale=f.value}}),_e=be({get:()=>d.value,set:y=>{d.value=y,$.fallbackLocale=d.value,bn($,f.value,y)}}),je=be(()=>m.value),Ve=be(()=>h.value),ae=be(()=>b.value);function re(){return ue(v)?v:null}function ne(y){v=y,$.postTranslation=y}function Ae(){return N}function Fe(y){y!==null&&(P=Eo(y)),N=y,$.missing=P}const pe=(y,I,K,z,ye,Ge)=>{ve();let ft;try{__INTLIFY_PROD_DEVTOOLS__,l||($.fallbackContext=n?Qd():void 0),ft=y($)}finally{__INTLIFY_PROD_DEVTOOLS__,l||($.fallbackContext=void 0)}if(K!=="translate exists"&&Le(ft)&&ft===Tr||K==="translate exists"&&!ft){const[St,Pr]=I();return n&&R?z(n):ye(St)}else{if(Ge(ft))return ft;throw Oe(Te.UNEXPECTED_RETURN_TYPE)}};function Ee(...y){return pe(I=>Reflect.apply(io,null,[I,...y]),()=>os(...y),"translate",I=>Reflect.apply(I.t,I,[...y]),I=>I,I=>U(I))}function Ke(...y){const[I,K,z]=y;if(z&&!oe(z))throw Oe(Te.INVALID_ARGUMENT);return Ee(I,K,Pe({resolvedMessage:!0},z||{}))}function $e(...y){return pe(I=>Reflect.apply(co,null,[I,...y]),()=>as(...y),"datetime format",I=>Reflect.apply(I.d,I,[...y]),()=>to,I=>U(I))}function tt(...y){return pe(I=>Reflect.apply(fo,null,[I,...y]),()=>is(...y),"number format",I=>Reflect.apply(I.n,I,[...y]),()=>to,I=>U(I))}function ge(y){return y.map(I=>U(I)||Le(I)||te(I)?ho(String(I)):I)}const x={normalize:ge,interpolate:y=>y,type:"vnode"};function D(...y){return pe(I=>{let K;const z=I;try{z.processor=x,K=Reflect.apply(io,null,[z,...y])}finally{z.processor=null}return K},()=>os(...y),"translate",I=>I[cs](...y),I=>[ho(I)],I=>he(I))}function W(...y){return pe(I=>Reflect.apply(fo,null,[I,...y]),()=>is(...y),"number format",I=>I[fs](...y),po,I=>U(I)||he(I))}function ee(...y){return pe(I=>Reflect.apply(co,null,[I,...y]),()=>as(...y),"datetime format",I=>I[us](...y),po,I=>U(I)||he(I))}function p(y){Q=y,$.pluralRules=Q}function c(y,I){return pe(()=>{if(!y)return!1;const K=U(I)?I:f.value,z=E(K),ye=$.messageResolver(z,y);return i?ye!=null:fn(ye)||Ye(ye)||U(ye)},()=>[y],"translate exists",K=>Reflect.apply(K.te,K,[y,I]),im,K=>te(K))}function u(y){let I=null;const K=Wa($,d.value,f.value);for(let z=0;z{a&&(f.value=y,$.locale=y,bn($,f.value,d.value))}),It(n.fallbackLocale,y=>{a&&(d.value=y,$.fallbackLocale=y,bn($,f.value,d.value))}));const j={id:go,locale:de,fallbackLocale:_e,get inheritLocale(){return a},set inheritLocale(y){a=y,y&&n&&(f.value=n.locale.value,d.value=n.fallbackLocale.value,bn($,f.value,d.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:je,get modifiers(){return V},get pluralRules(){return Q||{}},get isGlobal(){return l},get missingWarn(){return C},set missingWarn(y){C=y,$.missingWarn=C},get fallbackWarn(){return O},set fallbackWarn(y){O=y,$.fallbackWarn=O},get fallbackRoot(){return R},set fallbackRoot(y){R=y},get fallbackFormat(){return g},set fallbackFormat(y){g=y,$.fallbackFormat=g},get warnHtmlMessage(){return k},set warnHtmlMessage(y){k=y,$.warnHtmlMessage=y},get escapeParameter(){return M},set escapeParameter(y){M=y,$.escapeParameter=y},t:Ee,getLocaleMessage:E,setLocaleMessage:L,mergeLocaleMessage:A,getPostTranslationHandler:re,setPostTranslationHandler:ne,getMissingHandler:Ae,setMissingHandler:Fe,[ei]:p};return j.datetimeFormats=Ve,j.numberFormats=ae,j.rt=Ke,j.te=c,j.tm=_,j.d=$e,j.n=tt,j.getDateTimeFormat=S,j.setDateTimeFormat=F,j.mergeDateTimeFormat=w,j.getNumberFormat=B,j.setNumberFormat=H,j.mergeNumberFormat=Y,j[ti]=r,j[cs]=D,j[us]=ee,j[fs]=W,j}function um(e){const t=U(e.locale)?e.locale:un,n=U(e.fallbackLocale)||he(e.fallbackLocale)||J(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=ue(e.missing)?e.missing:void 0,l=te(e.silentTranslationWarn)||Rt(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=te(e.silentFallbackWarn)||Rt(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=te(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,a=J(e.modifiers)?e.modifiers:{},f=e.pluralizationRules,d=ue(e.postTranslation)?e.postTranslation:void 0,m=U(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,b=te(e.sync)?e.sync:!0;let C=e.messages;if(J(e.sharedMessages)){const M=e.sharedMessages;C=Object.keys(M).reduce((Q,$)=>{const ce=Q[$]||(Q[$]={});return Pe(ce,M[$]),Q},C||{})}const{__i18n:O,__root:R,__injectWithOption:g}=e,N=e.datetimeFormats,P=e.numberFormats,v=e.flatJson,k=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:C,flatJson:v,datetimeFormats:N,numberFormats:P,missing:r,missingWarn:l,fallbackWarn:s,fallbackRoot:o,fallbackFormat:i,modifiers:a,pluralRules:f,postTranslation:d,warnHtmlMessage:m,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:b,translateExistCompatible:k,__i18n:O,__root:R,__injectWithOption:g}}function ms(e={},t){{const n=Ks(um(e)),{__extender:r}=e,l={id:n.id,get locale(){return n.locale.value},set locale(s){n.locale.value=s},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(s){n.fallbackLocale.value=s},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(s){},get missing(){return n.getMissingHandler()},set missing(s){n.setMissingHandler(s)},get silentTranslationWarn(){return te(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(s){n.missingWarn=te(s)?!s:s},get silentFallbackWarn(){return te(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(s){n.fallbackWarn=te(s)?!s:s},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(s){n.fallbackFormat=s},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(s){n.setPostTranslationHandler(s)},get sync(){return n.inheritLocale},set sync(s){n.inheritLocale=s},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){n.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(s){n.escapeParameter=s},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(s){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...s){const[o,i,a]=s,f={};let d=null,m=null;if(!U(o))throw Oe(Te.INVALID_ARGUMENT);const h=o;return U(i)?f.locale=i:he(i)?d=i:J(i)&&(m=i),he(a)?d=a:J(a)&&(m=a),Reflect.apply(n.t,n,[h,d||m||{},f])},rt(...s){return Reflect.apply(n.rt,n,[...s])},tc(...s){const[o,i,a]=s,f={plural:1};let d=null,m=null;if(!U(o))throw Oe(Te.INVALID_ARGUMENT);const h=o;return U(i)?f.locale=i:Le(i)?f.plural=i:he(i)?d=i:J(i)&&(m=i),U(a)?f.locale=a:he(a)?d=a:J(a)&&(m=a),Reflect.apply(n.t,n,[h,d||m||{},f])},te(s,o){return n.te(s,o)},tm(s){return n.tm(s)},getLocaleMessage(s){return n.getLocaleMessage(s)},setLocaleMessage(s,o){n.setLocaleMessage(s,o)},mergeLocaleMessage(s,o){n.mergeLocaleMessage(s,o)},d(...s){return Reflect.apply(n.d,n,[...s])},getDateTimeFormat(s){return n.getDateTimeFormat(s)},setDateTimeFormat(s,o){n.setDateTimeFormat(s,o)},mergeDateTimeFormat(s,o){n.mergeDateTimeFormat(s,o)},n(...s){return Reflect.apply(n.n,n,[...s])},getNumberFormat(s){return n.getNumberFormat(s)},setNumberFormat(s,o){n.setNumberFormat(s,o)},mergeNumberFormat(s,o){n.mergeNumberFormat(s,o)},getChoiceIndex(s,o){return-1}};return l.__extender=r,l}}const Bs={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function fm({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,l)=>[...r,...l.type===Be?l.children:[l]],[]):t.reduce((n,r)=>{const l=e[r];return l&&(n[r]=l()),n},{})}function si(e){return Be}const dm=hn({name:"i18n-t",props:Pe({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Le(e)||!isNaN(e)}},Bs),setup(e,t){const{slots:n,attrs:r}=t,l=e.i18n||Ir({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(m=>m!=="_"),o={};e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=U(e.plural)?+e.plural:e.plural);const i=fm(t,s),a=l[cs](e.keypath,i,o),f=Pe({},r),d=U(e.tag)||oe(e.tag)?e.tag:si();return yr(d,f,a)}}}),bo=dm;function mm(e){return he(e)&&!U(e[0])}function li(e,t,n,r){const{slots:l,attrs:s}=t;return()=>{const o={part:!0};let i={};e.locale&&(o.locale=e.locale),U(e.format)?o.key=e.format:oe(e.format)&&(U(e.format.key)&&(o.key=e.format.key),i=Object.keys(e.format).reduce((h,b)=>n.includes(b)?Pe({},h,{[b]:e.format[b]}):h,{}));const a=r(e.value,o,i);let f=[o.key];he(a)?f=a.map((h,b)=>{const C=l[h.type],O=C?C({[h.type]:h.value,index:b,parts:a}):[h.value];return mm(O)&&(O[0].key=`${h.type}-${b}`),O}):U(a)&&(f=[a]);const d=Pe({},s),m=U(e.tag)||oe(e.tag)?e.tag:si();return yr(m,d,f)}}const hm=hn({name:"i18n-n",props:Pe({value:{type:Number,required:!0},format:{type:[String,Object]}},Bs),setup(e,t){const n=e.i18n||Ir({useScope:"parent",__useComponent:!0});return li(e,t,Qa,(...r)=>n[fs](...r))}}),vo=hm,_m=hn({name:"i18n-d",props:Pe({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Bs),setup(e,t){const n=e.i18n||Ir({useScope:"parent",__useComponent:!0});return li(e,t,Ja,(...r)=>n[us](...r))}}),yo=_m;function pm(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function gm(e){const t=o=>{const{instance:i,modifiers:a,value:f}=o;if(!i||!i.$)throw Oe(Te.UNEXPECTED_ERROR);const d=pm(e,i.$),m=No(f);return[Reflect.apply(d.t,d,[...Lo(m)]),d]};return{created:(o,i)=>{const[a,f]=t(i);or&&e.global===f&&(o.__i18nWatcher=It(f.locale,()=>{i.instance&&i.instance.$forceUpdate()})),o.__composer=f,o.textContent=a},unmounted:o=>{or&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:i})=>{if(o.__composer){const a=o.__composer,f=No(i);o.textContent=Reflect.apply(a.t,a,[...Lo(f)])}},getSSRProps:o=>{const[i]=t(o);return{textContent:i}}}}function No(e){if(U(e))return{path:e};if(J(e)){if(!("path"in e))throw Oe(Te.REQUIRED_VALUE,"path");return e}else throw Oe(Te.INVALID_VALUE)}function Lo(e){const{path:t,locale:n,args:r,choice:l,plural:s}=e,o={},i=r||{};return U(n)&&(o.locale=n),Le(l)&&(o.plural=l),Le(s)&&(o.plural=s),[t,i,o]}function Em(e,t,...n){const r=J(n[0])?n[0]:{},l=!!r.useI18nComponentName;(te(r.globalInstall)?r.globalInstall:!0)&&([l?"i18n":bo.name,"I18nT"].forEach(o=>e.component(o,bo)),[vo.name,"I18nN"].forEach(o=>e.component(o,vo)),[yo.name,"I18nD"].forEach(o=>e.component(o,yo))),e.directive("t",gm(t))}function bm(e,t,n){return{beforeCreate(){const r=wn();if(!r)throw Oe(Te.UNEXPECTED_ERROR);const l=this.$options;if(l.i18n){const s=l.i18n;if(l.__i18n&&(s.__i18n=l.__i18n),s.__root=t,this===this.$root)this.$i18n=To(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=ms(s);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(l.__i18n)if(this===this.$root)this.$i18n=To(e,l);else{this.$i18n=ms({__i18n:l.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;l.__i18nGlobal&&ri(t,l,l),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,o)=>this.$i18n.te(s,o),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=wn();if(!r)throw Oe(Te.UNEXPECTED_ERROR);const l=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,l.__disposer&&(l.__disposer(),delete l.__disposer,delete l.__extender),n.__deleteInstance(r),delete this.$i18n}}}function To(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[ei](t.pluralizationRules||e.pluralizationRules);const n=Cr(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const vm=At("global-vue-i18n");function ym(e={},t){const n=__VUE_I18N_LEGACY_API__&&te(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=te(e.globalInjection)?e.globalInjection:!0,l=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,s=new Map,[o,i]=Nm(e,n),a=At("");function f(h){return s.get(h)||null}function d(h,b){s.set(h,b)}function m(h){s.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return l},async install(b,...C){if(b.__VUE_I18N_SYMBOL__=a,b.provide(b.__VUE_I18N_SYMBOL__,h),J(C[0])){const g=C[0];h.__composerExtend=g.__composerExtend,h.__vueI18nExtend=g.__vueI18nExtend}let O=null;!n&&r&&(O=wm(b,h.global)),__VUE_I18N_FULL_INSTALL__&&Em(b,h,...C),__VUE_I18N_LEGACY_API__&&n&&b.mixin(bm(i,i.__composer,h));const R=b.unmount;b.unmount=()=>{O&&O(),h.dispose(),R()}},get global(){return i},dispose(){o.stop()},__instances:s,__getInstance:f,__setInstance:d,__deleteInstance:m};return h}}function Ir(e={}){const t=wn();if(t==null)throw Oe(Te.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Oe(Te.NOT_INSTALLED);const n=Lm(t),r=Cm(n),l=ni(t),s=Tm(e,l);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Oe(Te.NOT_AVAILABLE_IN_LEGACY_MODE);return Rm(t,s,r,e)}if(s==="global")return ri(r,e,l),r;if(s==="parent"){let a=Im(n,t,e.__useComponent);return a==null&&(a=r),a}const o=n;let i=o.__getInstance(t);if(i==null){const a=Pe({},e);"__i18n"in l&&(a.__i18n=l.__i18n),r&&(a.__root=r),i=Ks(a),o.__composerExtend&&(i[ds]=o.__composerExtend(i)),Pm(o,t,i),o.__setInstance(t,i)}return i}function Nm(e,t,n){const r=Mo();{const l=__VUE_I18N_LEGACY_API__&&t?r.run(()=>ms(e)):r.run(()=>Ks(e));if(l==null)throw Oe(Te.UNEXPECTED_ERROR);return[r,l]}}function Lm(e){{const t=Ze(e.isCE?vm:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Oe(e.isCE?Te.NOT_INSTALLED_WITH_PROVIDE:Te.UNEXPECTED_ERROR);return t}}function Tm(e,t){return Lr(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Cm(e){return e.mode==="composition"?e.global:e.global.__composer}function Im(e,t,n=!1){let r=null;const l=t.root;let s=Om(t,n);for(;s!=null;){const o=e;if(e.mode==="composition")r=o.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const i=o.__getInstance(s);i!=null&&(r=i.__composer,n&&r&&!r[ti]&&(r=null))}if(r!=null||l===s)break;s=s.parent}return r}function Om(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Pm(e,t,n){tr(()=>{},t),ws(()=>{const r=n;e.__deleteInstance(t);const l=r[ds];l&&(l(),delete r[ds])},t)}function Rm(e,t,n,r={}){const l=t==="local",s=Ps(null);if(l&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Oe(Te.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=te(r.inheritLocale)?r.inheritLocale:!U(r.locale),i=ot(!l||o?n.locale.value:U(r.locale)?r.locale:un),a=ot(!l||o?n.fallbackLocale.value:U(r.fallbackLocale)||he(r.fallbackLocale)||J(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:i.value),f=ot(Cr(i.value,r)),d=ot(J(r.datetimeFormats)?r.datetimeFormats:{[i.value]:{}}),m=ot(J(r.numberFormats)?r.numberFormats:{[i.value]:{}}),h=l?n.missingWarn:te(r.missingWarn)||Rt(r.missingWarn)?r.missingWarn:!0,b=l?n.fallbackWarn:te(r.fallbackWarn)||Rt(r.fallbackWarn)?r.fallbackWarn:!0,C=l?n.fallbackRoot:te(r.fallbackRoot)?r.fallbackRoot:!0,O=!!r.fallbackFormat,R=ue(r.missing)?r.missing:null,g=ue(r.postTranslation)?r.postTranslation:null,N=l?n.warnHtmlMessage:te(r.warnHtmlMessage)?r.warnHtmlMessage:!0,P=!!r.escapeParameter,v=l?n.modifiers:J(r.modifiers)?r.modifiers:{},k=r.pluralRules||l&&n.pluralRules;function M(){return[i.value,a.value,f.value,d.value,m.value]}const V=be({get:()=>s.value?s.value.locale.value:i.value,set:u=>{s.value&&(s.value.locale.value=u),i.value=u}}),Q=be({get:()=>s.value?s.value.fallbackLocale.value:a.value,set:u=>{s.value&&(s.value.fallbackLocale.value=u),a.value=u}}),$=be(()=>s.value?s.value.messages.value:f.value),ce=be(()=>d.value),ve=be(()=>m.value);function de(){return s.value?s.value.getPostTranslationHandler():g}function _e(u){s.value&&s.value.setPostTranslationHandler(u)}function je(){return s.value?s.value.getMissingHandler():R}function Ve(u){s.value&&s.value.setMissingHandler(u)}function ae(u){return M(),u()}function re(...u){return s.value?ae(()=>Reflect.apply(s.value.t,null,[...u])):ae(()=>"")}function ne(...u){return s.value?Reflect.apply(s.value.rt,null,[...u]):""}function Ae(...u){return s.value?ae(()=>Reflect.apply(s.value.d,null,[...u])):ae(()=>"")}function Fe(...u){return s.value?ae(()=>Reflect.apply(s.value.n,null,[...u])):ae(()=>"")}function pe(u){return s.value?s.value.tm(u):{}}function Ee(u,_){return s.value?s.value.te(u,_):!1}function Ke(u){return s.value?s.value.getLocaleMessage(u):{}}function $e(u,_){s.value&&(s.value.setLocaleMessage(u,_),f.value[u]=_)}function tt(u,_){s.value&&s.value.mergeLocaleMessage(u,_)}function ge(u){return s.value?s.value.getDateTimeFormat(u):{}}function T(u,_){s.value&&(s.value.setDateTimeFormat(u,_),d.value[u]=_)}function x(u,_){s.value&&s.value.mergeDateTimeFormat(u,_)}function D(u){return s.value?s.value.getNumberFormat(u):{}}function W(u,_){s.value&&(s.value.setNumberFormat(u,_),m.value[u]=_)}function ee(u,_){s.value&&s.value.mergeNumberFormat(u,_)}const p={get id(){return s.value?s.value.id:-1},locale:V,fallbackLocale:Q,messages:$,datetimeFormats:ce,numberFormats:ve,get inheritLocale(){return s.value?s.value.inheritLocale:o},set inheritLocale(u){s.value&&(s.value.inheritLocale=u)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(f.value)},get modifiers(){return s.value?s.value.modifiers:v},get pluralRules(){return s.value?s.value.pluralRules:k},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:h},set missingWarn(u){s.value&&(s.value.missingWarn=u)},get fallbackWarn(){return s.value?s.value.fallbackWarn:b},set fallbackWarn(u){s.value&&(s.value.missingWarn=u)},get fallbackRoot(){return s.value?s.value.fallbackRoot:C},set fallbackRoot(u){s.value&&(s.value.fallbackRoot=u)},get fallbackFormat(){return s.value?s.value.fallbackFormat:O},set fallbackFormat(u){s.value&&(s.value.fallbackFormat=u)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:N},set warnHtmlMessage(u){s.value&&(s.value.warnHtmlMessage=u)},get escapeParameter(){return s.value?s.value.escapeParameter:P},set escapeParameter(u){s.value&&(s.value.escapeParameter=u)},t:re,getPostTranslationHandler:de,setPostTranslationHandler:_e,getMissingHandler:je,setMissingHandler:Ve,rt:ne,d:Ae,n:Fe,tm:pe,te:Ee,getLocaleMessage:Ke,setLocaleMessage:$e,mergeLocaleMessage:tt,getDateTimeFormat:ge,setDateTimeFormat:T,mergeDateTimeFormat:x,getNumberFormat:D,setNumberFormat:W,mergeNumberFormat:ee};function c(u){u.locale.value=i.value,u.fallbackLocale.value=a.value,Object.keys(f.value).forEach(_=>{u.mergeLocaleMessage(_,f.value[_])}),Object.keys(d.value).forEach(_=>{u.mergeDateTimeFormat(_,d.value[_])}),Object.keys(m.value).forEach(_=>{u.mergeNumberFormat(_,m.value[_])}),u.escapeParameter=P,u.fallbackFormat=O,u.fallbackRoot=C,u.fallbackWarn=b,u.missingWarn=h,u.warnHtmlMessage=N}return ca(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Oe(Te.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const u=s.value=e.proxy.$i18n.__composer;t==="global"?(i.value=u.locale.value,a.value=u.fallbackLocale.value,f.value=u.messages.value,d.value=u.datetimeFormats.value,m.value=u.numberFormats.value):l&&c(u)}),p}const Am=["locale","fallbackLocale","availableLocales"],Co=["t","rt","d","n","tm","te"];function wm(e,t){const n=Object.create(null);return Am.forEach(l=>{const s=Object.getOwnPropertyDescriptor(t,l);if(!s)throw Oe(Te.UNEXPECTED_ERROR);const o=Me(s.value)?{get(){return s.value.value},set(i){s.value.value=i}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,l,o)}),e.config.globalProperties.$i18n=n,Co.forEach(l=>{const s=Object.getOwnPropertyDescriptor(t,l);if(!s||!s.value)throw Oe(Te.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${l}`,s)}),()=>{delete e.config.globalProperties.$i18n,Co.forEach(l=>{delete e.config.globalProperties[`$${l}`]})}}am();__INTLIFY_JIT_COMPILATION__?ro(tm):ro(em);Gd(Pd);Xd(Wa);if(__INTLIFY_PROD_DEVTOOLS__){const e=pt();e.__INTLIFY__=!0,xd(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const Sm={en_us:{UserName:"User Name",Next:"Next",FirstName:"First Name",LastName:"Last Name",Name:"Name",Action:"Action",Enable:"Enable",Redirect:"Redirect",Route:"Route",Endpoints:"Endpoints",Users:"Users",Roles:"Roles",Lang:"Lang",Logout:"Logout",Management:"Management",LogoutMessage:"Are you sure you want to logout?",Previous:"Previous",updated_successfully:"Updated successfully",please_confirm:"Please confirm this operation",resetPasswordConfirm:"Are you sure you want to reset password?",new_password:"New Password {0} and copied to clipboard",Employee_Number:"Employee Number",Cancel:"Cancel",Save:"Save",add:"Add",refresh:"Refresh",PhoneNumber:"Phone Number","Lockout End":"Lockout End","Lockout Enabled":"Lockout Enabled","Email Confirmed":"Email Confirmed","PhoneNumber Confirmed":"Phone Number Confirmed","Two Factor Enabled":"Two Factor Enabled","Access Failed Count":"Access Failed Count",Email:"Email",Remark:"Remark"},zh_cn:{UserName:"用户名",Next:"下一页",FirstName:"名字",LastName:"姓氏",Name:"名称",Action:"操作",Enable:"启用",Redirect:"重定向",Route:"路由",Endpoints:"端点",Users:"用户",Roles:"角色",Lang:"语言",Logout:"退出",Management:"管理",LogoutMessage:"确定要退出吗?",Previous:"上一页",updated_successfully:"更新成功",please_confirm:"请确认此次操作",resetPasswordConfirm:"确定要重置密码吗?",new_password:"新密码 {0} (已复制到剪贴板)",Employee_Number:"员工编号",Cancel:"取消",Save:"保存",add:"添加",refresh:"刷新",PhoneNumber:"电话号码","Lockout End":"锁定结束","Lockout Enabled":"锁定启用","Email Confirmed":"电子邮件已确认","PhoneNumber Confirmed":"电话号码已确认","Two Factor Enabled":"双因素认证已启用","Access Failed Count":"访问失败次数",Email:"电子邮件",Remark:"备注"},zh_hant:{UserName:"使用者名稱",Next:"下一頁",FirstName:"名字",LastName:"姓氏",Name:"名稱",Action:"操作",Enable:"啟用",Redirect:"重新導向",Route:"路由",Endpoints:"端點",Users:"使用者",Roles:"角色",Lang:"語言",Logout:"登出",Management:"管理",LogoutMessage:"確定要登出吗?",Previous:"上一頁",updated_successfully:"更新成功",please_confirm:"請確認此次操作",resetPasswordConfirm:"確定要重設密碼嗎?",new_password:"新密碼 {0} (已複製到剪貼簿)",Employee_Number:"員工編號",Cancel:"取消",Save:"保存",add:"添加",refresh:"刷新",PhoneNumber:"電話號碼","Lockout End":"鎖定結束","Lockout Enabled":"鎖定啟用","Email Confirmed":"電子郵件已確認","PhoneNumber Confirmed":"電話號碼已確認","Two Factor Enabled":"雙因素驗證已啟用","Access Failed Count":"訪問失敗次數",Email:"電子郵件",Remark:"備註"},es:{UserName:"Nombre de usuario",Next:"Siguiente",FirstName:"Nombre",LastName:"Apellidos",Name:"Nombre",Action:"Acción",Enable:"Activar",Redirect:"Redirección",Route:"Ruta",Endpoints:"Puntos finales",Users:"Usuarios",Roles:"Roles",Lang:"Idioma",Logout:"Cerrar sesión",Management:"Gestión",LogoutMessage:"¿Está seguro de que quiere cerrar sesión?",Previous:"Anterior",updated_successfully:"Actualización exitosa",please_confirm:"Por favor, confirme esta acción",resetPasswordConfirm:"¿Está seguro de que quiere restablecer la contraseña?",new_password:"Nueva contraseña {0} (ya se ha copiado al portapapeles)",Employee_Number:"Número de empleado",Cancel:"Cancelar",Save:"Guardar",add:"Añadir",refresh:"Refrescar",PhoneNumber:"Número de teléfono","Lockout End":"Fin de bloqueo","Lockout Enabled":"Bloqueo habilitado","Email Confirmed":"Correo electrónico confirmado","PhoneNumber Confirmed":"Número de teléfono confirmado","Two Factor Enabled":"Autenticación de dos factores habilitada","Access Failed Count":"Recuento de accesos fallidos",Email:"Correo electrónico",Remark:"Observación"},ko:{UserName:"사용자 이름",Next:"다음 페이지",FirstName:"이름",LastName:"성",Name:"이름",Action:"조작",Enable:"활성화",Redirect:"리다이렉션",Route:"라우팅",Endpoints:"엔드포인트",Users:"사용자",Roles:"역할",Lang:"언어",Logout:"로그아웃",Management:"관리",LogoutMessage:"로그아웃 하시겠습니까?",Previous:"이전 페이지",updated_successfully:"업데이트 성공",please_confirm:"이 조작을 확인해 주세요",resetPasswordConfirm:"비밀번호를 재설정하시겠습니까?",new_password:"새 비밀번호 {0} (클립보드에 복사됨)",Employee_Number:"직원 번호",Cancel:"취소",Save:"저장",add:"추가",refresh:"새로 고침",PhoneNumber:"전화 번호","Lockout End":"잠금 종료","Lockout Enabled":"잠금 활성화","Email Confirmed":"이메일 확인됨","PhoneNumber Confirmed":"전화 번호 확인됨","Two Factor Enabled":"이중 인증 활성화","Access Failed Count":"액세스 실패 횟수",Email:"이메일",Remark:"비고"},ja:{UserName:"ユーザー名",Next:"次のページ",FirstName:"名",LastName:"姓",Name:"名前",Action:"操作",Enable:"有効にする",Redirect:"リダイレクト",Route:"ルート",Endpoints:"エンドポイント",Users:"ユーザー",Roles:"役割",Lang:"言語",Logout:"ログアウト",Management:"管理",LogoutMessage:"本当にログアウトしますか?",Previous:"前のページ",updated_successfully:"更新に成功しました",please_confirm:"この操作を確認してください",resetPasswordConfirm:"パスワードをリセットしますか?",new_password:"新しいパスワード {0} (クリップボードにコピーされました)",Employee_Number:"社員番号",Cancel:"キャンセル",Save:"保存",add:"追加",refresh:"リフレッシュ",PhoneNumber:"電話番号","Lockout End":"ロック解除","Lockout Enabled":"ロック解除有効","Email Confirmed":"メールアドレス確認済み","PhoneNumber Confirmed":"電話番号確認済み","Two Factor Enabled":"二要素認証有効","Access Failed Count":"アクセス失敗回数",Email:"メール",Remark:"備考"},ru:{UserName:"Имя пользователя",Next:"Следующая страница",FirstName:"Имя",LastName:"Фамилия",Name:"Наименование",Action:"Действие",Enable:"Включить",Redirect:"Перенаправление",Route:"Маршрут",Endpoints:"Конечные точки",Users:"Пользователи",Roles:"Роли",Lang:"Язык",Logout:"Выход",Management:"Управление",LogoutMessage:"Вы уверены, что хотите выйти?",Previous:"Предыдущая страница",updated_successfully:"Обновление успешно",please_confirm:"Пожалуйста, подтвердите это действие",resetPasswordConfirm:"Вы уверены, что хотите сбросить пароль?",new_password:"Новый пароль {0} (уже скопирован в буфер обмена)",Employee_Number:"Табельный номер",Cancel:"Отмена",Save:"Сохранить",add:"Добавить",refresh:"Обновить",PhoneNumber:"Номер телефона","Lockout End":"Окончание блокировки","Lockout Enabled":"Блокировка включена","Email Confirmed":"Электронная почта подтверждена","PhoneNumber Confirmed":"Номер телефона подтвержден","Two Factor Enabled":"Двухфакторная аутентификация включена","Access Failed Count":"Количество неудачных попыток доступа",Email:"Электронная почта",Remark:"Примечание"},fr:{UserName:"Nom d'utilisateur",Next:"Page suivante",FirstName:"Prénom",LastName:"Nom de famille",Name:"Nom",Action:"Action",Enable:"Activer",Redirect:"Redirection",Route:"Itinéraire",Endpoints:"Points de terminaison",Users:"Utilisateurs",Roles:"Rôles",Lang:"Langue",Logout:"Déconnexion",Management:"Gestion",LogoutMessage:"Êtes-vous sûr de vouloir déconnecter?",Previous:"Page précédente",updated_successfully:"Mise à jour réussie",please_confirm:"Veuillez confirmer cette opération",resetPasswordConfirm:"Êtes-vous sûr de vouloir réinitialiser le mot de passe?",new_password:"Nouveau mot de passe {0} (déjà copié dans le presse-papier)",Employee_Number:"Numéro d'employé",Cancel:"Annuler",Save:"Enregistrer",add:"Ajouter",refresh:"Actualiser",PhoneNumber:"Numéro de téléphone","Lockout End":"Fin de blocage","Lockout Enabled":"Blocage activé","Email Confirmed":"E-mail confirmé","PhoneNumber Confirmed":"Numéro de téléphone confirmé","Two Factor Enabled":"Authentification à deux facteurs activée","Access Failed Count":"Nombre d'échecs d'accès",Email:"Email",Remark:"Remarque"}},hs=ym({legacy:!1,allowComposition:!0,globalInjection:!0,locale:localStorage.getItem("locale")??"en_us",fallbackLocale:"en_us",messages:Sm}),km={class:"navbar navbar-expand-lg navbar-dark bg-dark"},Mm={class:"container"},Fm=q("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarNav","aria-controls":"navbarNav","aria-expanded":"false","aria-label":"Toggle navigation"},[q("span",{class:"navbar-toggler-icon"})],-1),Dm={class:"collapse navbar-collapse",id:"navbarNav"},xm={class:"navbar-nav"},Um={class:"nav-item"},$m={class:"nav-item"},Wm={class:"nav-item"},Hm={class:"navbar-nav ms-auto"},jm={class:"navbar-nav"},Vm={class:"nav-item dropdown"},Km={class:"nav-link dropdown-toggle",href:"#",id:"navbarDropdownMenuLink",role:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},Bm={class:"dropdown-menu","aria-labelledby":"navbarDropdownMenuLink"},Ym={class:"container scrollable-container"},Gm={class:"row",style:{"padding-bottom":"10px","padding-top":"10px"}},Xm={class:"col-sm-8"},qm=q("div",{class:"col-sm-4"},null,-1),Jm=q("div",{id:"loading-mask"},[q("div",{class:"preloader"},[q("div",{class:"c-three-dots-loader"})])],-1),Qm=[Jm],zm=hn({__name:"App",setup(e){const{t}=Ir(),n=Ff(),r=ot("");tr(()=>{r.value=(n.meta.title??"").toString()}),It(()=>n.name,a=>{r.value=(a==null?void 0:a.toString())??""});const l=()=>{confirm(t("LogoutMessage"))&&(localStorage.removeItem("X-MiniAuth-Token"),window.location.href="logout")},s=a=>{hs.global.locale.value=a??"en_us",localStorage.setItem("lang",hs.global.locale.value)},o=ot(!1);Kl.on("showLoading",()=>{o.value=!0}),Kl.on("closeLoading",()=>{o.value=!1});const i=()=>{const a=navigator.language||navigator.userLanguage,f=localStorage.getItem("lang"),d="en_us",m=a.toLowerCase().replace("-","_"),h=m.split("_")[0];if(f){s(f);return}if(m==="zh_cn"||m==="zh_hans"){s("zh_cn");return}if(h==="zh"){s("zh_hant");return}if(h==="en"){s("en_us");return}if(h==="ja"){s("ja");return}if(h==="ko"){s("ko");return}if(h==="es"){s("es");return}if(h==="fr"){s("fr");return}if(h==="ru"){s("ru");return}s(d)};return tr(()=>{i()}),(a,f)=>{const d=tc("router-link");return Ea(),xc(Be,null,[q("div",null,[q("div",null,[q("div",null,[q("div",null,[q("nav",km,[q("div",Mm,[Ne(d,{class:"navbar-brand",to:"/"},{default:yn(()=>[Xt(" MiniAuth ")]),_:1}),Fm,q("div",Dm,[q("ul",xm,[q("li",Um,[Ne(d,{class:"nav-link",to:"/"},{default:yn(()=>[Xt(kt(a.$t("Endpoints")),1)]),_:1})]),q("li",$m,[Ne(d,{class:"nav-link",to:"/Users"},{default:yn(()=>[Xt(kt(a.$t("Users")),1)]),_:1})]),q("li",Wm,[Ne(d,{class:"nav-link",to:"/Roles"},{default:yn(()=>[Xt(kt(a.$t("Roles")),1)]),_:1})])]),q("div",Hm,[q("ul",jm,[q("li",Vm,[q("a",Km,kt(a.$t("Lang")),1),q("ul",Bm,[q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[0]||(f[0]=m=>s("en_us"))},"English")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[1]||(f[1]=m=>s("zh_cn"))},"简体中文")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[2]||(f[2]=m=>s("zh_hant"))},"繁體中文")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[3]||(f[3]=m=>s("ja"))},"日本語")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[4]||(f[4]=m=>s("ko"))},"한국어")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[5]||(f[5]=m=>s("es"))},"Español")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[6]||(f[6]=m=>s("fr"))},"Français")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[7]||(f[7]=m=>s("ru"))},"Русский")])])])]),q("div",{onClick:l,class:"nav-item nav-link",style:{cursor:"pointer"}},kt(a.$t("Logout")),1)])])])])]),q("main",Ym,[q("div",Gm,[q("div",Xm,[q("h2",null,[q("b",null,kt(r.value),1),Xt(" "+kt(a.$t("Management")),1)])]),qm]),q("div",null,[Ne(jt(Ma))])])])])]),ac(q("div",null,Qm,512),[[su,o.value]])],64)}}}),Zm="modulepreload",eh=function(e){return"/miniauth/"+e},Io={},Wr=function(t,n,r){let l=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");l=Promise.all(n.map(o=>{if(o=eh(o),o in Io)return;Io[o]=!0;const i=o.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(!!r)for(let m=s.length-1;m>=0;m--){const h=s[m];if(h.href===o&&(!i||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const d=document.createElement("link");if(d.rel=i?"stylesheet":Zm,i||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),i)return new Promise((m,h)=>{d.addEventListener("load",m),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})}))}return l.then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},th=[{path:"/",name:"Endpoints",component:()=>Wr(()=>import("./EndpointsView-JWuXtHar.js"),__vite__mapDeps([0,1])),meta:{title:"Endpoints"}},{path:"/roles",name:"Roles",component:()=>Wr(()=>import("./RolesView-3q8bOyk1.js"),__vite__mapDeps([2,3,1])),meta:{title:"Roles"}},{path:"/users",name:"Users",component:()=>Wr(()=>import("./UsersView-VAWIrR_a.js"),__vite__mapDeps([4,3,1,5])),meta:{title:"Users"}}],oi=kf({history:qu("/miniauth/"),routes:th,scrollBehavior(e,t,n){return n??{left:0,top:0}}});oi.beforeEach((e,t,n)=>{n()});const Or=Iu(zm);Or.use(hs);Or.use(Au());Or.use(oi);Or.mount("#app");export{Be as F,Ea as a,q as b,xc as c,sh as d,ih as e,be as f,uh as g,ch as h,oh as i,lh as j,rh as k,Kl as l,vs as n,tr as o,nh as p,ot as r,kt as t,Ir as u,ah as v,ac as w}; + */const om="9.10.2";function am(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(pt().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(pt().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_JIT_COMPILATION__!="boolean"&&(pt().__INTLIFY_JIT_COMPILATION__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(pt().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(pt().__INTLIFY_PROD_DEVTOOLS__=!1)}const za=Hd.__EXTEND_POINT__,ht=Ws(za);ht(),ht(),ht(),ht(),ht(),ht(),ht(),ht(),ht();const Za=Qe.__EXTEND_POINT__,De=Ws(Za),Te={UNEXPECTED_RETURN_TYPE:Za,INVALID_ARGUMENT:De(),MUST_BE_CALL_SETUP_TOP:De(),NOT_INSTALLED:De(),NOT_AVAILABLE_IN_LEGACY_MODE:De(),REQUIRED_VALUE:De(),INVALID_VALUE:De(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:De(),NOT_INSTALLED_WITH_PROVIDE:De(),UNEXPECTED_ERROR:De(),NOT_COMPATIBLE_LEGACY_VUE_I18N:De(),BRIDGE_SUPPORT_VUE_2_ONLY:De(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:De(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:De(),__EXTEND_POINT__:De()};function Oe(e,...t){return _n(e,null,void 0)}const cs=At("__translateVNode"),us=At("__datetimeParts"),fs=At("__numberParts"),ei=At("__setPluralRules"),ti=At("__injectWithOption"),ds=At("__dispose");function Fn(e){if(!oe(e))return e;for(const t in e)if(ar(e,t))if(!t.includes("."))oe(e[t])&&Fn(e[t]);else{const n=t.split("."),r=n.length-1;let l=e,s=!1;for(let o=0;o{if("locale"in i&&"resource"in i){const{locale:a,resource:f}=i;a?(o[a]=o[a]||{},Qn(f,o[a])):Qn(f,o)}else U(i)&&Qn(JSON.parse(i),o)}),l==null&&s)for(const i in o)ar(o,i)&&Fn(o[i]);return o}function ni(e){return e.type}function ri(e,t,n){let r=oe(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=Cr(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const l=Object.keys(r);l.length&&l.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(oe(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(o=>{e.mergeDateTimeFormat(o,t.datetimeFormats[o])})}if(oe(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(o=>{e.mergeNumberFormat(o,t.numberFormats[o])})}}}function ho(e){return Ne(xn,null,e,0)}const _o="__INTLIFY_META__",po=()=>[],im=()=>!1;let go=0;function Eo(e){return(t,n,r,l)=>e(n,r,wn()||void 0,l)}const cm=()=>{const e=wn();let t=null;return e&&(t=ni(e)[_o])?{[_o]:t}:null};function Ks(e={},t){const{__root:n,__injectWithOption:r}=e,l=n===void 0,s=e.flatJson,o=or?ot:Ps,i=!!e.translateExistCompatible;let a=te(e.inheritLocale)?e.inheritLocale:!0;const f=o(n&&a?n.locale.value:U(e.locale)?e.locale:un),d=o(n&&a?n.fallbackLocale.value:U(e.fallbackLocale)||he(e.fallbackLocale)||J(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:f.value),m=o(Cr(f.value,e)),h=o(J(e.datetimeFormats)?e.datetimeFormats:{[f.value]:{}}),b=o(J(e.numberFormats)?e.numberFormats:{[f.value]:{}});let C=n?n.missingWarn:te(e.missingWarn)||Rt(e.missingWarn)?e.missingWarn:!0,O=n?n.fallbackWarn:te(e.fallbackWarn)||Rt(e.fallbackWarn)?e.fallbackWarn:!0,R=n?n.fallbackRoot:te(e.fallbackRoot)?e.fallbackRoot:!0,g=!!e.fallbackFormat,N=ue(e.missing)?e.missing:null,P=ue(e.missing)?Eo(e.missing):null,v=ue(e.postTranslation)?e.postTranslation:null,k=n?n.warnHtmlMessage:te(e.warnHtmlMessage)?e.warnHtmlMessage:!0,M=!!e.escapeParameter;const V=n?n.modifiers:J(e.modifiers)?e.modifiers:{};let Q=e.pluralRules||n&&n.pluralRules,$;$=(()=>{l&&so(null);const y={version:om,locale:f.value,fallbackLocale:d.value,messages:m.value,modifiers:V,pluralRules:Q,missing:P===null?void 0:P,missingWarn:C,fallbackWarn:O,fallbackFormat:g,unresolving:!0,postTranslation:v===null?void 0:v,warnHtmlMessage:k,escapeParameter:M,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};y.datetimeFormats=h.value,y.numberFormats=b.value,y.__datetimeFormatters=J($)?$.__datetimeFormatters:void 0,y.__numberFormatters=J($)?$.__numberFormatters:void 0;const I=zd(y);return l&&so(I),I})(),bn($,f.value,d.value);function ve(){return[f.value,d.value,m.value,h.value,b.value]}const de=be({get:()=>f.value,set:y=>{f.value=y,$.locale=f.value}}),_e=be({get:()=>d.value,set:y=>{d.value=y,$.fallbackLocale=d.value,bn($,f.value,y)}}),je=be(()=>m.value),Ve=be(()=>h.value),ae=be(()=>b.value);function re(){return ue(v)?v:null}function ne(y){v=y,$.postTranslation=y}function Ae(){return N}function Fe(y){y!==null&&(P=Eo(y)),N=y,$.missing=P}const pe=(y,I,K,z,ye,Ge)=>{ve();let ft;try{__INTLIFY_PROD_DEVTOOLS__,l||($.fallbackContext=n?Qd():void 0),ft=y($)}finally{__INTLIFY_PROD_DEVTOOLS__,l||($.fallbackContext=void 0)}if(K!=="translate exists"&&Le(ft)&&ft===Tr||K==="translate exists"&&!ft){const[St,Pr]=I();return n&&R?z(n):ye(St)}else{if(Ge(ft))return ft;throw Oe(Te.UNEXPECTED_RETURN_TYPE)}};function Ee(...y){return pe(I=>Reflect.apply(io,null,[I,...y]),()=>os(...y),"translate",I=>Reflect.apply(I.t,I,[...y]),I=>I,I=>U(I))}function Ke(...y){const[I,K,z]=y;if(z&&!oe(z))throw Oe(Te.INVALID_ARGUMENT);return Ee(I,K,Pe({resolvedMessage:!0},z||{}))}function $e(...y){return pe(I=>Reflect.apply(co,null,[I,...y]),()=>as(...y),"datetime format",I=>Reflect.apply(I.d,I,[...y]),()=>to,I=>U(I))}function tt(...y){return pe(I=>Reflect.apply(fo,null,[I,...y]),()=>is(...y),"number format",I=>Reflect.apply(I.n,I,[...y]),()=>to,I=>U(I))}function ge(y){return y.map(I=>U(I)||Le(I)||te(I)?ho(String(I)):I)}const x={normalize:ge,interpolate:y=>y,type:"vnode"};function D(...y){return pe(I=>{let K;const z=I;try{z.processor=x,K=Reflect.apply(io,null,[z,...y])}finally{z.processor=null}return K},()=>os(...y),"translate",I=>I[cs](...y),I=>[ho(I)],I=>he(I))}function W(...y){return pe(I=>Reflect.apply(fo,null,[I,...y]),()=>is(...y),"number format",I=>I[fs](...y),po,I=>U(I)||he(I))}function ee(...y){return pe(I=>Reflect.apply(co,null,[I,...y]),()=>as(...y),"datetime format",I=>I[us](...y),po,I=>U(I)||he(I))}function p(y){Q=y,$.pluralRules=Q}function c(y,I){return pe(()=>{if(!y)return!1;const K=U(I)?I:f.value,z=E(K),ye=$.messageResolver(z,y);return i?ye!=null:fn(ye)||Ye(ye)||U(ye)},()=>[y],"translate exists",K=>Reflect.apply(K.te,K,[y,I]),im,K=>te(K))}function u(y){let I=null;const K=Wa($,d.value,f.value);for(let z=0;z{a&&(f.value=y,$.locale=y,bn($,f.value,d.value))}),It(n.fallbackLocale,y=>{a&&(d.value=y,$.fallbackLocale=y,bn($,f.value,d.value))}));const j={id:go,locale:de,fallbackLocale:_e,get inheritLocale(){return a},set inheritLocale(y){a=y,y&&n&&(f.value=n.locale.value,d.value=n.fallbackLocale.value,bn($,f.value,d.value))},get availableLocales(){return Object.keys(m.value).sort()},messages:je,get modifiers(){return V},get pluralRules(){return Q||{}},get isGlobal(){return l},get missingWarn(){return C},set missingWarn(y){C=y,$.missingWarn=C},get fallbackWarn(){return O},set fallbackWarn(y){O=y,$.fallbackWarn=O},get fallbackRoot(){return R},set fallbackRoot(y){R=y},get fallbackFormat(){return g},set fallbackFormat(y){g=y,$.fallbackFormat=g},get warnHtmlMessage(){return k},set warnHtmlMessage(y){k=y,$.warnHtmlMessage=y},get escapeParameter(){return M},set escapeParameter(y){M=y,$.escapeParameter=y},t:Ee,getLocaleMessage:E,setLocaleMessage:L,mergeLocaleMessage:A,getPostTranslationHandler:re,setPostTranslationHandler:ne,getMissingHandler:Ae,setMissingHandler:Fe,[ei]:p};return j.datetimeFormats=Ve,j.numberFormats=ae,j.rt=Ke,j.te=c,j.tm=_,j.d=$e,j.n=tt,j.getDateTimeFormat=S,j.setDateTimeFormat=F,j.mergeDateTimeFormat=w,j.getNumberFormat=B,j.setNumberFormat=H,j.mergeNumberFormat=Y,j[ti]=r,j[cs]=D,j[us]=ee,j[fs]=W,j}function um(e){const t=U(e.locale)?e.locale:un,n=U(e.fallbackLocale)||he(e.fallbackLocale)||J(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=ue(e.missing)?e.missing:void 0,l=te(e.silentTranslationWarn)||Rt(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=te(e.silentFallbackWarn)||Rt(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,o=te(e.fallbackRoot)?e.fallbackRoot:!0,i=!!e.formatFallbackMessages,a=J(e.modifiers)?e.modifiers:{},f=e.pluralizationRules,d=ue(e.postTranslation)?e.postTranslation:void 0,m=U(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,b=te(e.sync)?e.sync:!0;let C=e.messages;if(J(e.sharedMessages)){const M=e.sharedMessages;C=Object.keys(M).reduce((Q,$)=>{const ce=Q[$]||(Q[$]={});return Pe(ce,M[$]),Q},C||{})}const{__i18n:O,__root:R,__injectWithOption:g}=e,N=e.datetimeFormats,P=e.numberFormats,v=e.flatJson,k=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:C,flatJson:v,datetimeFormats:N,numberFormats:P,missing:r,missingWarn:l,fallbackWarn:s,fallbackRoot:o,fallbackFormat:i,modifiers:a,pluralRules:f,postTranslation:d,warnHtmlMessage:m,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:b,translateExistCompatible:k,__i18n:O,__root:R,__injectWithOption:g}}function ms(e={},t){{const n=Ks(um(e)),{__extender:r}=e,l={id:n.id,get locale(){return n.locale.value},set locale(s){n.locale.value=s},get fallbackLocale(){return n.fallbackLocale.value},set fallbackLocale(s){n.fallbackLocale.value=s},get messages(){return n.messages.value},get datetimeFormats(){return n.datetimeFormats.value},get numberFormats(){return n.numberFormats.value},get availableLocales(){return n.availableLocales},get formatter(){return{interpolate(){return[]}}},set formatter(s){},get missing(){return n.getMissingHandler()},set missing(s){n.setMissingHandler(s)},get silentTranslationWarn(){return te(n.missingWarn)?!n.missingWarn:n.missingWarn},set silentTranslationWarn(s){n.missingWarn=te(s)?!s:s},get silentFallbackWarn(){return te(n.fallbackWarn)?!n.fallbackWarn:n.fallbackWarn},set silentFallbackWarn(s){n.fallbackWarn=te(s)?!s:s},get modifiers(){return n.modifiers},get formatFallbackMessages(){return n.fallbackFormat},set formatFallbackMessages(s){n.fallbackFormat=s},get postTranslation(){return n.getPostTranslationHandler()},set postTranslation(s){n.setPostTranslationHandler(s)},get sync(){return n.inheritLocale},set sync(s){n.inheritLocale=s},get warnHtmlInMessage(){return n.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){n.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return n.escapeParameter},set escapeParameterHtml(s){n.escapeParameter=s},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(s){},get pluralizationRules(){return n.pluralRules||{}},__composer:n,t(...s){const[o,i,a]=s,f={};let d=null,m=null;if(!U(o))throw Oe(Te.INVALID_ARGUMENT);const h=o;return U(i)?f.locale=i:he(i)?d=i:J(i)&&(m=i),he(a)?d=a:J(a)&&(m=a),Reflect.apply(n.t,n,[h,d||m||{},f])},rt(...s){return Reflect.apply(n.rt,n,[...s])},tc(...s){const[o,i,a]=s,f={plural:1};let d=null,m=null;if(!U(o))throw Oe(Te.INVALID_ARGUMENT);const h=o;return U(i)?f.locale=i:Le(i)?f.plural=i:he(i)?d=i:J(i)&&(m=i),U(a)?f.locale=a:he(a)?d=a:J(a)&&(m=a),Reflect.apply(n.t,n,[h,d||m||{},f])},te(s,o){return n.te(s,o)},tm(s){return n.tm(s)},getLocaleMessage(s){return n.getLocaleMessage(s)},setLocaleMessage(s,o){n.setLocaleMessage(s,o)},mergeLocaleMessage(s,o){n.mergeLocaleMessage(s,o)},d(...s){return Reflect.apply(n.d,n,[...s])},getDateTimeFormat(s){return n.getDateTimeFormat(s)},setDateTimeFormat(s,o){n.setDateTimeFormat(s,o)},mergeDateTimeFormat(s,o){n.mergeDateTimeFormat(s,o)},n(...s){return Reflect.apply(n.n,n,[...s])},getNumberFormat(s){return n.getNumberFormat(s)},setNumberFormat(s,o){n.setNumberFormat(s,o)},mergeNumberFormat(s,o){n.mergeNumberFormat(s,o)},getChoiceIndex(s,o){return-1}};return l.__extender=r,l}}const Bs={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function fm({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,l)=>[...r,...l.type===Be?l.children:[l]],[]):t.reduce((n,r)=>{const l=e[r];return l&&(n[r]=l()),n},{})}function si(e){return Be}const dm=hn({name:"i18n-t",props:Pe({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Le(e)||!isNaN(e)}},Bs),setup(e,t){const{slots:n,attrs:r}=t,l=e.i18n||Ir({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(m=>m!=="_"),o={};e.locale&&(o.locale=e.locale),e.plural!==void 0&&(o.plural=U(e.plural)?+e.plural:e.plural);const i=fm(t,s),a=l[cs](e.keypath,i,o),f=Pe({},r),d=U(e.tag)||oe(e.tag)?e.tag:si();return yr(d,f,a)}}}),bo=dm;function mm(e){return he(e)&&!U(e[0])}function li(e,t,n,r){const{slots:l,attrs:s}=t;return()=>{const o={part:!0};let i={};e.locale&&(o.locale=e.locale),U(e.format)?o.key=e.format:oe(e.format)&&(U(e.format.key)&&(o.key=e.format.key),i=Object.keys(e.format).reduce((h,b)=>n.includes(b)?Pe({},h,{[b]:e.format[b]}):h,{}));const a=r(e.value,o,i);let f=[o.key];he(a)?f=a.map((h,b)=>{const C=l[h.type],O=C?C({[h.type]:h.value,index:b,parts:a}):[h.value];return mm(O)&&(O[0].key=`${h.type}-${b}`),O}):U(a)&&(f=[a]);const d=Pe({},s),m=U(e.tag)||oe(e.tag)?e.tag:si();return yr(m,d,f)}}const hm=hn({name:"i18n-n",props:Pe({value:{type:Number,required:!0},format:{type:[String,Object]}},Bs),setup(e,t){const n=e.i18n||Ir({useScope:"parent",__useComponent:!0});return li(e,t,Qa,(...r)=>n[fs](...r))}}),vo=hm,_m=hn({name:"i18n-d",props:Pe({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Bs),setup(e,t){const n=e.i18n||Ir({useScope:"parent",__useComponent:!0});return li(e,t,Ja,(...r)=>n[us](...r))}}),yo=_m;function pm(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function gm(e){const t=o=>{const{instance:i,modifiers:a,value:f}=o;if(!i||!i.$)throw Oe(Te.UNEXPECTED_ERROR);const d=pm(e,i.$),m=No(f);return[Reflect.apply(d.t,d,[...Lo(m)]),d]};return{created:(o,i)=>{const[a,f]=t(i);or&&e.global===f&&(o.__i18nWatcher=It(f.locale,()=>{i.instance&&i.instance.$forceUpdate()})),o.__composer=f,o.textContent=a},unmounted:o=>{or&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:i})=>{if(o.__composer){const a=o.__composer,f=No(i);o.textContent=Reflect.apply(a.t,a,[...Lo(f)])}},getSSRProps:o=>{const[i]=t(o);return{textContent:i}}}}function No(e){if(U(e))return{path:e};if(J(e)){if(!("path"in e))throw Oe(Te.REQUIRED_VALUE,"path");return e}else throw Oe(Te.INVALID_VALUE)}function Lo(e){const{path:t,locale:n,args:r,choice:l,plural:s}=e,o={},i=r||{};return U(n)&&(o.locale=n),Le(l)&&(o.plural=l),Le(s)&&(o.plural=s),[t,i,o]}function Em(e,t,...n){const r=J(n[0])?n[0]:{},l=!!r.useI18nComponentName;(te(r.globalInstall)?r.globalInstall:!0)&&([l?"i18n":bo.name,"I18nT"].forEach(o=>e.component(o,bo)),[vo.name,"I18nN"].forEach(o=>e.component(o,vo)),[yo.name,"I18nD"].forEach(o=>e.component(o,yo))),e.directive("t",gm(t))}function bm(e,t,n){return{beforeCreate(){const r=wn();if(!r)throw Oe(Te.UNEXPECTED_ERROR);const l=this.$options;if(l.i18n){const s=l.i18n;if(l.__i18n&&(s.__i18n=l.__i18n),s.__root=t,this===this.$root)this.$i18n=To(e,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=ms(s);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(l.__i18n)if(this===this.$root)this.$i18n=To(e,l);else{this.$i18n=ms({__i18n:l.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;l.__i18nGlobal&&ri(t,l,l),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,o)=>this.$i18n.te(s,o),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=wn();if(!r)throw Oe(Te.UNEXPECTED_ERROR);const l=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,l.__disposer&&(l.__disposer(),delete l.__disposer,delete l.__extender),n.__deleteInstance(r),delete this.$i18n}}}function To(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[ei](t.pluralizationRules||e.pluralizationRules);const n=Cr(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach(r=>e.mergeLocaleMessage(r,n[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const vm=At("global-vue-i18n");function ym(e={},t){const n=__VUE_I18N_LEGACY_API__&&te(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=te(e.globalInjection)?e.globalInjection:!0,l=__VUE_I18N_LEGACY_API__&&n?!!e.allowComposition:!0,s=new Map,[o,i]=Nm(e,n),a=At("");function f(h){return s.get(h)||null}function d(h,b){s.set(h,b)}function m(h){s.delete(h)}{const h={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return l},async install(b,...C){if(b.__VUE_I18N_SYMBOL__=a,b.provide(b.__VUE_I18N_SYMBOL__,h),J(C[0])){const g=C[0];h.__composerExtend=g.__composerExtend,h.__vueI18nExtend=g.__vueI18nExtend}let O=null;!n&&r&&(O=wm(b,h.global)),__VUE_I18N_FULL_INSTALL__&&Em(b,h,...C),__VUE_I18N_LEGACY_API__&&n&&b.mixin(bm(i,i.__composer,h));const R=b.unmount;b.unmount=()=>{O&&O(),h.dispose(),R()}},get global(){return i},dispose(){o.stop()},__instances:s,__getInstance:f,__setInstance:d,__deleteInstance:m};return h}}function Ir(e={}){const t=wn();if(t==null)throw Oe(Te.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Oe(Te.NOT_INSTALLED);const n=Lm(t),r=Cm(n),l=ni(t),s=Tm(e,l);if(__VUE_I18N_LEGACY_API__&&n.mode==="legacy"&&!e.__useComponent){if(!n.allowComposition)throw Oe(Te.NOT_AVAILABLE_IN_LEGACY_MODE);return Rm(t,s,r,e)}if(s==="global")return ri(r,e,l),r;if(s==="parent"){let a=Im(n,t,e.__useComponent);return a==null&&(a=r),a}const o=n;let i=o.__getInstance(t);if(i==null){const a=Pe({},e);"__i18n"in l&&(a.__i18n=l.__i18n),r&&(a.__root=r),i=Ks(a),o.__composerExtend&&(i[ds]=o.__composerExtend(i)),Pm(o,t,i),o.__setInstance(t,i)}return i}function Nm(e,t,n){const r=Mo();{const l=__VUE_I18N_LEGACY_API__&&t?r.run(()=>ms(e)):r.run(()=>Ks(e));if(l==null)throw Oe(Te.UNEXPECTED_ERROR);return[r,l]}}function Lm(e){{const t=Ze(e.isCE?vm:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Oe(e.isCE?Te.NOT_INSTALLED_WITH_PROVIDE:Te.UNEXPECTED_ERROR);return t}}function Tm(e,t){return Lr(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Cm(e){return e.mode==="composition"?e.global:e.global.__composer}function Im(e,t,n=!1){let r=null;const l=t.root;let s=Om(t,n);for(;s!=null;){const o=e;if(e.mode==="composition")r=o.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const i=o.__getInstance(s);i!=null&&(r=i.__composer,n&&r&&!r[ti]&&(r=null))}if(r!=null||l===s)break;s=s.parent}return r}function Om(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Pm(e,t,n){tr(()=>{},t),ws(()=>{const r=n;e.__deleteInstance(t);const l=r[ds];l&&(l(),delete r[ds])},t)}function Rm(e,t,n,r={}){const l=t==="local",s=Ps(null);if(l&&e.proxy&&!(e.proxy.$options.i18n||e.proxy.$options.__i18n))throw Oe(Te.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const o=te(r.inheritLocale)?r.inheritLocale:!U(r.locale),i=ot(!l||o?n.locale.value:U(r.locale)?r.locale:un),a=ot(!l||o?n.fallbackLocale.value:U(r.fallbackLocale)||he(r.fallbackLocale)||J(r.fallbackLocale)||r.fallbackLocale===!1?r.fallbackLocale:i.value),f=ot(Cr(i.value,r)),d=ot(J(r.datetimeFormats)?r.datetimeFormats:{[i.value]:{}}),m=ot(J(r.numberFormats)?r.numberFormats:{[i.value]:{}}),h=l?n.missingWarn:te(r.missingWarn)||Rt(r.missingWarn)?r.missingWarn:!0,b=l?n.fallbackWarn:te(r.fallbackWarn)||Rt(r.fallbackWarn)?r.fallbackWarn:!0,C=l?n.fallbackRoot:te(r.fallbackRoot)?r.fallbackRoot:!0,O=!!r.fallbackFormat,R=ue(r.missing)?r.missing:null,g=ue(r.postTranslation)?r.postTranslation:null,N=l?n.warnHtmlMessage:te(r.warnHtmlMessage)?r.warnHtmlMessage:!0,P=!!r.escapeParameter,v=l?n.modifiers:J(r.modifiers)?r.modifiers:{},k=r.pluralRules||l&&n.pluralRules;function M(){return[i.value,a.value,f.value,d.value,m.value]}const V=be({get:()=>s.value?s.value.locale.value:i.value,set:u=>{s.value&&(s.value.locale.value=u),i.value=u}}),Q=be({get:()=>s.value?s.value.fallbackLocale.value:a.value,set:u=>{s.value&&(s.value.fallbackLocale.value=u),a.value=u}}),$=be(()=>s.value?s.value.messages.value:f.value),ce=be(()=>d.value),ve=be(()=>m.value);function de(){return s.value?s.value.getPostTranslationHandler():g}function _e(u){s.value&&s.value.setPostTranslationHandler(u)}function je(){return s.value?s.value.getMissingHandler():R}function Ve(u){s.value&&s.value.setMissingHandler(u)}function ae(u){return M(),u()}function re(...u){return s.value?ae(()=>Reflect.apply(s.value.t,null,[...u])):ae(()=>"")}function ne(...u){return s.value?Reflect.apply(s.value.rt,null,[...u]):""}function Ae(...u){return s.value?ae(()=>Reflect.apply(s.value.d,null,[...u])):ae(()=>"")}function Fe(...u){return s.value?ae(()=>Reflect.apply(s.value.n,null,[...u])):ae(()=>"")}function pe(u){return s.value?s.value.tm(u):{}}function Ee(u,_){return s.value?s.value.te(u,_):!1}function Ke(u){return s.value?s.value.getLocaleMessage(u):{}}function $e(u,_){s.value&&(s.value.setLocaleMessage(u,_),f.value[u]=_)}function tt(u,_){s.value&&s.value.mergeLocaleMessage(u,_)}function ge(u){return s.value?s.value.getDateTimeFormat(u):{}}function T(u,_){s.value&&(s.value.setDateTimeFormat(u,_),d.value[u]=_)}function x(u,_){s.value&&s.value.mergeDateTimeFormat(u,_)}function D(u){return s.value?s.value.getNumberFormat(u):{}}function W(u,_){s.value&&(s.value.setNumberFormat(u,_),m.value[u]=_)}function ee(u,_){s.value&&s.value.mergeNumberFormat(u,_)}const p={get id(){return s.value?s.value.id:-1},locale:V,fallbackLocale:Q,messages:$,datetimeFormats:ce,numberFormats:ve,get inheritLocale(){return s.value?s.value.inheritLocale:o},set inheritLocale(u){s.value&&(s.value.inheritLocale=u)},get availableLocales(){return s.value?s.value.availableLocales:Object.keys(f.value)},get modifiers(){return s.value?s.value.modifiers:v},get pluralRules(){return s.value?s.value.pluralRules:k},get isGlobal(){return s.value?s.value.isGlobal:!1},get missingWarn(){return s.value?s.value.missingWarn:h},set missingWarn(u){s.value&&(s.value.missingWarn=u)},get fallbackWarn(){return s.value?s.value.fallbackWarn:b},set fallbackWarn(u){s.value&&(s.value.missingWarn=u)},get fallbackRoot(){return s.value?s.value.fallbackRoot:C},set fallbackRoot(u){s.value&&(s.value.fallbackRoot=u)},get fallbackFormat(){return s.value?s.value.fallbackFormat:O},set fallbackFormat(u){s.value&&(s.value.fallbackFormat=u)},get warnHtmlMessage(){return s.value?s.value.warnHtmlMessage:N},set warnHtmlMessage(u){s.value&&(s.value.warnHtmlMessage=u)},get escapeParameter(){return s.value?s.value.escapeParameter:P},set escapeParameter(u){s.value&&(s.value.escapeParameter=u)},t:re,getPostTranslationHandler:de,setPostTranslationHandler:_e,getMissingHandler:je,setMissingHandler:Ve,rt:ne,d:Ae,n:Fe,tm:pe,te:Ee,getLocaleMessage:Ke,setLocaleMessage:$e,mergeLocaleMessage:tt,getDateTimeFormat:ge,setDateTimeFormat:T,mergeDateTimeFormat:x,getNumberFormat:D,setNumberFormat:W,mergeNumberFormat:ee};function c(u){u.locale.value=i.value,u.fallbackLocale.value=a.value,Object.keys(f.value).forEach(_=>{u.mergeLocaleMessage(_,f.value[_])}),Object.keys(d.value).forEach(_=>{u.mergeDateTimeFormat(_,d.value[_])}),Object.keys(m.value).forEach(_=>{u.mergeNumberFormat(_,m.value[_])}),u.escapeParameter=P,u.fallbackFormat=O,u.fallbackRoot=C,u.fallbackWarn=b,u.missingWarn=h,u.warnHtmlMessage=N}return ca(()=>{if(e.proxy==null||e.proxy.$i18n==null)throw Oe(Te.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const u=s.value=e.proxy.$i18n.__composer;t==="global"?(i.value=u.locale.value,a.value=u.fallbackLocale.value,f.value=u.messages.value,d.value=u.datetimeFormats.value,m.value=u.numberFormats.value):l&&c(u)}),p}const Am=["locale","fallbackLocale","availableLocales"],Co=["t","rt","d","n","tm","te"];function wm(e,t){const n=Object.create(null);return Am.forEach(l=>{const s=Object.getOwnPropertyDescriptor(t,l);if(!s)throw Oe(Te.UNEXPECTED_ERROR);const o=Me(s.value)?{get(){return s.value.value},set(i){s.value.value=i}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,l,o)}),e.config.globalProperties.$i18n=n,Co.forEach(l=>{const s=Object.getOwnPropertyDescriptor(t,l);if(!s||!s.value)throw Oe(Te.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${l}`,s)}),()=>{delete e.config.globalProperties.$i18n,Co.forEach(l=>{delete e.config.globalProperties[`$${l}`]})}}am();__INTLIFY_JIT_COMPILATION__?ro(tm):ro(em);Gd(Pd);Xd(Wa);if(__INTLIFY_PROD_DEVTOOLS__){const e=pt();e.__INTLIFY__=!0,xd(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const Sm={en_us:{UserName:"User Name",Next:"Next",FirstName:"First Name",LastName:"Last Name",Name:"Name",Action:"Action",Enable:"Enable",Redirect:"Redirect",Route:"Route",Endpoints:"Endpoints",Users:"Users",Roles:"Roles",Lang:"Lang",Logout:"Logout",Management:"Management",LogoutMessage:"Are you sure you want to logout?",Previous:"Previous",updated_successfully:"Updated successfully",please_confirm:"Please confirm this operation",resetPasswordConfirm:"Are you sure you want to reset password?",new_password:"New Password {0} and copied to clipboard",Employee_Number:"Employee Number",Cancel:"Cancel",Save:"Save",add:"Add",refresh:"Refresh",PhoneNumber:"Phone Number","Lockout End":"Lockout End","Lockout Enabled":"Lockout Enabled","Email Confirmed":"Email Confirmed","PhoneNumber Confirmed":"Phone Number Confirmed","Two Factor Enabled":"Two Factor Enabled","Access Failed Count":"Access Failed Count",Email:"Email",Remark:"Remark"},zh_cn:{UserName:"用户名",Next:"下一页",FirstName:"名字",LastName:"姓氏",Name:"名称",Action:"操作",Enable:"启用",Redirect:"重定向",Route:"路由",Endpoints:"端点",Users:"用户",Roles:"角色",Lang:"语言",Logout:"退出",Management:"管理",LogoutMessage:"确定要退出吗?",Previous:"上一页",updated_successfully:"更新成功",please_confirm:"请确认此次操作",resetPasswordConfirm:"确定要重置密码吗?",new_password:"新密码 {0} (已复制到剪贴板)",Employee_Number:"员工编号",Cancel:"取消",Save:"保存",add:"添加",refresh:"刷新",PhoneNumber:"电话号码","Lockout End":"锁定结束","Lockout Enabled":"锁定启用","Email Confirmed":"电子邮件已确认","PhoneNumber Confirmed":"电话号码已确认","Two Factor Enabled":"双因素认证已启用","Access Failed Count":"访问失败次数",Email:"电子邮件",Remark:"备注"},zh_hant:{UserName:"使用者名稱",Next:"下一頁",FirstName:"名字",LastName:"姓氏",Name:"名稱",Action:"操作",Enable:"啟用",Redirect:"重新導向",Route:"路由",Endpoints:"端點",Users:"使用者",Roles:"角色",Lang:"語言",Logout:"登出",Management:"管理",LogoutMessage:"確定要登出吗?",Previous:"上一頁",updated_successfully:"更新成功",please_confirm:"請確認此次操作",resetPasswordConfirm:"確定要重設密碼嗎?",new_password:"新密碼 {0} (已複製到剪貼簿)",Employee_Number:"員工編號",Cancel:"取消",Save:"保存",add:"添加",refresh:"刷新",PhoneNumber:"電話號碼","Lockout End":"鎖定結束","Lockout Enabled":"鎖定啟用","Email Confirmed":"電子郵件已確認","PhoneNumber Confirmed":"電話號碼已確認","Two Factor Enabled":"雙因素驗證已啟用","Access Failed Count":"訪問失敗次數",Email:"電子郵件",Remark:"備註"},es:{UserName:"Nombre de usuario",Next:"Siguiente",FirstName:"Nombre",LastName:"Apellidos",Name:"Nombre",Action:"Acción",Enable:"Activar",Redirect:"Redirección",Route:"Ruta",Endpoints:"Puntos finales",Users:"Usuarios",Roles:"Roles",Lang:"Idioma",Logout:"Cerrar sesión",Management:"Gestión",LogoutMessage:"¿Está seguro de que quiere cerrar sesión?",Previous:"Anterior",updated_successfully:"Actualización exitosa",please_confirm:"Por favor, confirme esta acción",resetPasswordConfirm:"¿Está seguro de que quiere restablecer la contraseña?",new_password:"Nueva contraseña {0} (ya se ha copiado al portapapeles)",Employee_Number:"Número de empleado",Cancel:"Cancelar",Save:"Guardar",add:"Añadir",refresh:"Refrescar",PhoneNumber:"Número de teléfono","Lockout End":"Fin de bloqueo","Lockout Enabled":"Bloqueo habilitado","Email Confirmed":"Correo electrónico confirmado","PhoneNumber Confirmed":"Número de teléfono confirmado","Two Factor Enabled":"Autenticación de dos factores habilitada","Access Failed Count":"Recuento de accesos fallidos",Email:"Correo electrónico",Remark:"Observación"},ko:{UserName:"사용자 이름",Next:"다음 페이지",FirstName:"이름",LastName:"성",Name:"이름",Action:"조작",Enable:"활성화",Redirect:"리다이렉션",Route:"라우팅",Endpoints:"엔드포인트",Users:"사용자",Roles:"역할",Lang:"언어",Logout:"로그아웃",Management:"관리",LogoutMessage:"로그아웃 하시겠습니까?",Previous:"이전 페이지",updated_successfully:"업데이트 성공",please_confirm:"이 조작을 확인해 주세요",resetPasswordConfirm:"비밀번호를 재설정하시겠습니까?",new_password:"새 비밀번호 {0} (클립보드에 복사됨)",Employee_Number:"직원 번호",Cancel:"취소",Save:"저장",add:"추가",refresh:"새로 고침",PhoneNumber:"전화 번호","Lockout End":"잠금 종료","Lockout Enabled":"잠금 활성화","Email Confirmed":"이메일 확인됨","PhoneNumber Confirmed":"전화 번호 확인됨","Two Factor Enabled":"이중 인증 활성화","Access Failed Count":"액세스 실패 횟수",Email:"이메일",Remark:"비고"},ja:{UserName:"ユーザー名",Next:"次のページ",FirstName:"名",LastName:"姓",Name:"名前",Action:"操作",Enable:"有効にする",Redirect:"リダイレクト",Route:"ルート",Endpoints:"エンドポイント",Users:"ユーザー",Roles:"役割",Lang:"言語",Logout:"ログアウト",Management:"管理",LogoutMessage:"本当にログアウトしますか?",Previous:"前のページ",updated_successfully:"更新に成功しました",please_confirm:"この操作を確認してください",resetPasswordConfirm:"パスワードをリセットしますか?",new_password:"新しいパスワード {0} (クリップボードにコピーされました)",Employee_Number:"社員番号",Cancel:"キャンセル",Save:"保存",add:"追加",refresh:"リフレッシュ",PhoneNumber:"電話番号","Lockout End":"ロック解除","Lockout Enabled":"ロック解除有効","Email Confirmed":"メールアドレス確認済み","PhoneNumber Confirmed":"電話番号確認済み","Two Factor Enabled":"二要素認証有効","Access Failed Count":"アクセス失敗回数",Email:"メール",Remark:"備考"},ru:{UserName:"Имя пользователя",Next:"Следующая страница",FirstName:"Имя",LastName:"Фамилия",Name:"Наименование",Action:"Действие",Enable:"Включить",Redirect:"Перенаправление",Route:"Маршрут",Endpoints:"Конечные точки",Users:"Пользователи",Roles:"Роли",Lang:"Язык",Logout:"Выход",Management:"Управление",LogoutMessage:"Вы уверены, что хотите выйти?",Previous:"Предыдущая страница",updated_successfully:"Обновление успешно",please_confirm:"Пожалуйста, подтвердите это действие",resetPasswordConfirm:"Вы уверены, что хотите сбросить пароль?",new_password:"Новый пароль {0} (уже скопирован в буфер обмена)",Employee_Number:"Табельный номер",Cancel:"Отмена",Save:"Сохранить",add:"Добавить",refresh:"Обновить",PhoneNumber:"Номер телефона","Lockout End":"Окончание блокировки","Lockout Enabled":"Блокировка включена","Email Confirmed":"Электронная почта подтверждена","PhoneNumber Confirmed":"Номер телефона подтвержден","Two Factor Enabled":"Двухфакторная аутентификация включена","Access Failed Count":"Количество неудачных попыток доступа",Email:"Электронная почта",Remark:"Примечание"},fr:{UserName:"Nom d'utilisateur",Next:"Page suivante",FirstName:"Prénom",LastName:"Nom de famille",Name:"Nom",Action:"Action",Enable:"Activer",Redirect:"Redirection",Route:"Itinéraire",Endpoints:"Points de terminaison",Users:"Utilisateurs",Roles:"Rôles",Lang:"Langue",Logout:"Déconnexion",Management:"Gestion",LogoutMessage:"Êtes-vous sûr de vouloir déconnecter?",Previous:"Page précédente",updated_successfully:"Mise à jour réussie",please_confirm:"Veuillez confirmer cette opération",resetPasswordConfirm:"Êtes-vous sûr de vouloir réinitialiser le mot de passe?",new_password:"Nouveau mot de passe {0} (déjà copié dans le presse-papier)",Employee_Number:"Numéro d'employé",Cancel:"Annuler",Save:"Enregistrer",add:"Ajouter",refresh:"Actualiser",PhoneNumber:"Numéro de téléphone","Lockout End":"Fin de blocage","Lockout Enabled":"Blocage activé","Email Confirmed":"E-mail confirmé","PhoneNumber Confirmed":"Numéro de téléphone confirmé","Two Factor Enabled":"Authentification à deux facteurs activée","Access Failed Count":"Nombre d'échecs d'accès",Email:"Email",Remark:"Remarque"}},hs=ym({legacy:!1,allowComposition:!0,globalInjection:!0,locale:localStorage.getItem("locale")??"en_us",fallbackLocale:"en_us",messages:Sm}),km={class:"navbar navbar-expand-lg navbar-dark bg-dark"},Mm={class:"container"},Fm=q("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarNav","aria-controls":"navbarNav","aria-expanded":"false","aria-label":"Toggle navigation"},[q("span",{class:"navbar-toggler-icon"})],-1),Dm={class:"collapse navbar-collapse",id:"navbarNav"},xm={class:"navbar-nav"},Um={class:"nav-item"},$m={class:"nav-item"},Wm={class:"nav-item"},Hm={class:"navbar-nav ms-auto"},jm={class:"navbar-nav"},Vm={class:"nav-item dropdown"},Km={class:"nav-link dropdown-toggle",href:"#",id:"navbarDropdownMenuLink",role:"button","data-bs-toggle":"dropdown","aria-expanded":"false"},Bm={class:"dropdown-menu","aria-labelledby":"navbarDropdownMenuLink"},Ym={class:"container scrollable-container"},Gm={class:"row",style:{"padding-bottom":"10px","padding-top":"10px"}},Xm={class:"col-sm-8"},qm=q("div",{class:"col-sm-4"},null,-1),Jm=q("div",{id:"loading-mask"},[q("div",{class:"preloader"},[q("div",{class:"c-three-dots-loader"})])],-1),Qm=[Jm],zm=hn({__name:"App",setup(e){const{t}=Ir(),n=Ff(),r=ot("");tr(()=>{r.value=(n.meta.title??"").toString()}),It(()=>n.name,a=>{r.value=(a==null?void 0:a.toString())??""});const l=()=>{confirm(t("LogoutMessage"))&&(localStorage.removeItem("X-MiniAuth-Token"),window.location.href="logout")},s=a=>{hs.global.locale.value=a??"en_us",localStorage.setItem("lang",hs.global.locale.value)},o=ot(!1);Kl.on("showLoading",()=>{o.value=!0}),Kl.on("closeLoading",()=>{o.value=!1});const i=()=>{const a=navigator.language||navigator.userLanguage,f=localStorage.getItem("lang"),d="en_us",m=a.toLowerCase().replace("-","_"),h=m.split("_")[0];if(f){s(f);return}if(m==="zh_cn"||m==="zh_hans"){s("zh_cn");return}if(h==="zh"){s("zh_hant");return}if(h==="en"){s("en_us");return}if(h==="ja"){s("ja");return}if(h==="ko"){s("ko");return}if(h==="es"){s("es");return}if(h==="fr"){s("fr");return}if(h==="ru"){s("ru");return}s(d)};return tr(()=>{i()}),(a,f)=>{const d=tc("router-link");return Ea(),xc(Be,null,[q("div",null,[q("div",null,[q("div",null,[q("div",null,[q("nav",km,[q("div",Mm,[Ne(d,{class:"navbar-brand",to:"/"},{default:yn(()=>[Xt(" MiniAuth ")]),_:1}),Fm,q("div",Dm,[q("ul",xm,[q("li",Um,[Ne(d,{class:"nav-link",to:"/"},{default:yn(()=>[Xt(kt(a.$t("Endpoints")),1)]),_:1})]),q("li",$m,[Ne(d,{class:"nav-link",to:"/Users"},{default:yn(()=>[Xt(kt(a.$t("Users")),1)]),_:1})]),q("li",Wm,[Ne(d,{class:"nav-link",to:"/Roles"},{default:yn(()=>[Xt(kt(a.$t("Roles")),1)]),_:1})])]),q("div",Hm,[q("ul",jm,[q("li",Vm,[q("a",Km,kt(a.$t("Lang")),1),q("ul",Bm,[q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[0]||(f[0]=m=>s("en_us"))},"English")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[1]||(f[1]=m=>s("zh_cn"))},"简体中文")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[2]||(f[2]=m=>s("zh_hant"))},"繁體中文")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[3]||(f[3]=m=>s("ja"))},"日本語")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[4]||(f[4]=m=>s("ko"))},"한국어")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[5]||(f[5]=m=>s("es"))},"Español")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[6]||(f[6]=m=>s("fr"))},"Français")]),q("li",null,[q("a",{class:"btn dropdown-item",onClick:f[7]||(f[7]=m=>s("ru"))},"Русский")])])])]),q("div",{onClick:l,class:"nav-item nav-link",style:{cursor:"pointer"}},kt(a.$t("Logout")),1)])])])])]),q("main",Ym,[q("div",Gm,[q("div",Xm,[q("h2",null,[q("b",null,kt(r.value),1),Xt(" "+kt(a.$t("Management")),1)])]),qm]),q("div",null,[Ne(jt(Ma))])])])])]),ac(q("div",null,Qm,512),[[su,o.value]])],64)}}}),Zm="modulepreload",eh=function(e){return"/miniauth/"+e},Io={},Wr=function(t,n,r){let l=Promise.resolve();if(n&&n.length>0){const s=document.getElementsByTagName("link");l=Promise.all(n.map(o=>{if(o=eh(o),o in Io)return;Io[o]=!0;const i=o.endsWith(".css"),a=i?'[rel="stylesheet"]':"";if(!!r)for(let m=s.length-1;m>=0;m--){const h=s[m];if(h.href===o&&(!i||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const d=document.createElement("link");if(d.rel=i?"stylesheet":Zm,i||(d.as="script",d.crossOrigin=""),d.href=o,document.head.appendChild(d),i)return new Promise((m,h)=>{d.addEventListener("load",m),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})}))}return l.then(()=>t()).catch(s=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=s,window.dispatchEvent(o),!o.defaultPrevented)throw s})},th=[{path:"/",name:"Endpoints",component:()=>Wr(()=>import("./EndpointsView-QB8GhhFN.js"),__vite__mapDeps([0,1])),meta:{title:"Endpoints"}},{path:"/roles",name:"Roles",component:()=>Wr(()=>import("./RolesView-uMrrH1Bj.js"),__vite__mapDeps([2,3,1])),meta:{title:"Roles"}},{path:"/users",name:"Users",component:()=>Wr(()=>import("./UsersView-5yFV_8JA.js"),__vite__mapDeps([4,3,1,5])),meta:{title:"Users"}}],oi=kf({history:qu("/miniauth/"),routes:th,scrollBehavior(e,t,n){return n??{left:0,top:0}}});oi.beforeEach((e,t,n)=>{n()});const Or=Iu(zm);Or.use(hs);Or.use(Au());Or.use(oi);Or.mount("#app");export{Be as F,Ea as a,q as b,xc as c,sh as d,ih as e,be as f,uh as g,ch as h,oh as i,lh as j,rh as k,Kl as l,vs as n,tr as o,nh as p,ot as r,kt as t,Ir as u,ah as v,ac as w}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["assets/EndpointsView-JWuXtHar.js","assets/service-LZZpIdq7.js","assets/RolesView-3q8bOyk1.js","assets/delete-xH6gjfA0.js","assets/UsersView-VAWIrR_a.js","assets/UsersView-Hpoy62lu.css"] + __vite__mapDeps.viteFileDeps = ["assets/EndpointsView-QB8GhhFN.js","assets/service-m5cBW5EV.js","assets/RolesView-uMrrH1Bj.js","assets/delete-xH6gjfA0.js","assets/UsersView-5yFV_8JA.js","assets/UsersView-Hpoy62lu.css"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } diff --git a/src/MiniAuth.IdentityAuth/wwwroot/assets/service-LZZpIdq7.js b/src/MiniAuth.IdentityAuth/wwwroot/assets/service-m5cBW5EV.js similarity index 93% rename from src/MiniAuth.IdentityAuth/wwwroot/assets/service-LZZpIdq7.js rename to src/MiniAuth.IdentityAuth/wwwroot/assets/service-m5cBW5EV.js index 7f98310..7c718d4 100644 --- a/src/MiniAuth.IdentityAuth/wwwroot/assets/service-LZZpIdq7.js +++ b/src/MiniAuth.IdentityAuth/wwwroot/assets/service-m5cBW5EV.js @@ -1,6 +1,6 @@ -import{l as Ee}from"./index-7uhYHvCj.js";function we(e,t){return function(){return e.apply(t,arguments)}}const{toString:qe}=Object.prototype,{getPrototypeOf:ee}=Object,H=(e=>t=>{const n=qe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),A=e=>(e=e.toLowerCase(),t=>H(t)===e),M=e=>t=>typeof t===e,{isArray:C}=Array,F=M("undefined");function ze(e){return e!==null&&!F(e)&&e.constructor!==null&&!F(e.constructor)&&R(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const be=A("ArrayBuffer");function Je(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&be(e.buffer),t}const Ve=M("string"),R=M("function"),Se=M("number"),q=e=>e!==null&&typeof e=="object",$e=e=>e===!0||e===!1,B=e=>{if(H(e)!=="object")return!1;const t=ee(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},We=A("Date"),Ke=A("File"),Xe=A("Blob"),Ge=A("FileList"),ve=e=>q(e)&&R(e.pipe),Qe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||R(e.append)&&((t=H(e))==="formdata"||t==="object"&&R(e.toString)&&e.toString()==="[object FormData]"))},Ze=A("URLSearchParams"),Ye=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function L(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),C(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Oe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ae=e=>!F(e)&&e!==Oe;function X(){const{caseless:e}=Ae(this)&&this||{},t={},n=(r,s)=>{const o=e&&Re(t,s)||s;B(t[o])&&B(r)?t[o]=X(t[o],r):B(r)?t[o]=X({},r):C(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r(L(t,(s,o)=>{n&&R(s)?e[o]=we(s,n):e[o]=s},{allOwnKeys:r}),e),tt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},rt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&ee(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},st=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ot=e=>{if(!e)return null;if(C(e))return e;let t=e.length;if(!Se(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},it=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ee(Uint8Array)),at=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},ct=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ut=A("HTMLFormElement"),lt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),ie=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ft=A("RegExp"),Te=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};L(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},dt=e=>{Te(e,(t,n)=>{if(R(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(R(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return C(e)?r(e):r(String(e).split(t)),n},ht=()=>{},mt=(e,t)=>(e=+e,Number.isFinite(e)?e:t),V="abcdefghijklmnopqrstuvwxyz",ae="0123456789",ge={DIGIT:ae,ALPHA:V,ALPHA_DIGIT:V+V.toUpperCase()+ae},yt=(e=16,t=ge.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Et(e){return!!(e&&R(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const wt=e=>{const t=new Array(10),n=(r,s)=>{if(q(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=C(r)?[]:{};return L(r,(i,c)=>{const p=n(i,s+1);!F(p)&&(o[c]=p)}),t[s]=void 0,o}}return r};return n(e,0)},bt=A("AsyncFunction"),St=e=>e&&(q(e)||R(e))&&R(e.then)&&R(e.catch),a={isArray:C,isArrayBuffer:be,isBuffer:ze,isFormData:Qe,isArrayBufferView:Je,isString:Ve,isNumber:Se,isBoolean:$e,isObject:q,isPlainObject:B,isUndefined:F,isDate:We,isFile:Ke,isBlob:Xe,isRegExp:ft,isFunction:R,isStream:ve,isURLSearchParams:Ze,isTypedArray:it,isFileList:Ge,forEach:L,merge:X,extend:et,trim:Ye,stripBOM:tt,inherits:nt,toFlatObject:rt,kindOf:H,kindOfTest:A,endsWith:st,toArray:ot,forEachEntry:at,matchAll:ct,isHTMLForm:ut,hasOwnProperty:ie,hasOwnProp:ie,reduceDescriptors:Te,freezeMethods:dt,toObjectSet:pt,toCamelCase:lt,noop:ht,toFiniteNumber:mt,findKey:Re,global:Oe,isContextDefined:Ae,ALPHABET:ge,generateString:yt,isSpecCompliantForm:Et,toJSONObject:wt,isAsyncFn:bt,isThenable:St};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Pe=m.prototype,xe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xe[e]={value:e}});Object.defineProperties(m,xe);Object.defineProperty(Pe,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,o)=>{const i=Object.create(Pe);return a.toFlatObject(e,i,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Rt=null;function G(e){return a.isPlainObject(e)||a.isArray(e)}function Ne(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function ce(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ne(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Ot(e){return a.isArray(e)&&!e.some(G)}const At=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function z(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,w){return!a.isUndefined(w[d])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function h(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(!p&&a.isBlob(f))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?p&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,d,w){let b=f;if(f&&!w&&typeof f=="object"){if(a.endsWith(d,"{}"))d=r?d:d.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&Ot(f)||(a.isFileList(f)||a.endsWith(d,"[]"))&&(b=a.toArray(f)))return d=Ne(d),b.forEach(function(P,Me){!(a.isUndefined(P)||P===null)&&t.append(i===!0?ce([d],Me,o):i===null?d:d+"[]",h(P))}),!1}return G(f)?!0:(t.append(ce(w,d,o),h(f)),!1)}const u=[],E=Object.assign(At,{defaultVisitor:l,convertValue:h,isVisitable:G});function S(f,d){if(!a.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+d.join("."));u.push(f),a.forEach(f,function(b,g){(!(a.isUndefined(b)||b===null)&&s.call(t,b,a.isString(g)?g.trim():g,d,E))===!0&&S(b,d?d.concat(g):[g])}),u.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function ue(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function te(e,t){this._pairs=[],e&&z(e,this,t)}const Ce=te.prototype;Ce.append=function(t,n){this._pairs.push([t,n])};Ce.toString=function(t){const n=t?function(r){return t.call(this,r,ue)}:ue;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Tt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _e(e,t,n){if(!t)return e;const r=n&&n.encode||Tt,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new te(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class gt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const le=gt,Fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Pt=typeof URLSearchParams<"u"?URLSearchParams:te,xt=typeof FormData<"u"?FormData:null,Nt=typeof Blob<"u"?Blob:null,Ct={isBrowser:!0,classes:{URLSearchParams:Pt,FormData:xt,Blob:Nt},protocols:["http","https","file","blob","url","data"]},Le=typeof window<"u"&&typeof document<"u",_t=(e=>Le&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Ft=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Le,hasStandardBrowserEnv:_t,hasStandardBrowserWebWorkerEnv:Ft},Symbol.toStringTag,{value:"Module"})),O={...Lt,...Ct};function Ut(e,t){return z(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Bt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dt(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&a.isArray(s)?s.length:i,p?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Dt(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Bt(r),s,n,0)}),n}return null}function kt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ne={transitional:Fe,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Ue(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ut(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return z(c?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),kt(t)):t}],transformResponse:[function(t){const n=this.transitional||ne.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{ne.headers[e]={}});const re=ne,jt=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),It=e=>{const t={};let n,r,s;return e&&e.split(` -`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&jt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},fe=Symbol("internals");function _(e){return e&&String(e).trim().toLowerCase()}function D(e){return e===!1||e==null?e:a.isArray(e)?e.map(D):String(e)}function Ht(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Mt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function $(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function qt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zt(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class J{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,p,h){const l=_(p);if(!l)throw new Error("header name must be a non-empty string");const u=a.findKey(s,l);(!u||s[u]===void 0||h===!0||h===void 0&&s[u]!==!1)&&(s[u||p]=D(c))}const i=(c,p)=>a.forEach(c,(h,l)=>o(h,l,p));return a.isPlainObject(t)||t instanceof this.constructor?i(t,n):a.isString(t)&&(t=t.trim())&&!Mt(t)?i(It(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=_(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Ht(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=_(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||$(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=_(i),i){const c=a.findKey(r,i);c&&(!n||$(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||$(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=D(s),delete n[o];return}const c=t?qt(o):String(o).trim();c!==o&&delete n[o],n[c]=D(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +import{l as Ee}from"./index-wtJzGEvf.js";function we(e,t){return function(){return e.apply(t,arguments)}}const{toString:Me}=Object.prototype,{getPrototypeOf:ee}=Object,H=(e=>t=>{const n=Me.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),A=e=>(e=e.toLowerCase(),t=>H(t)===e),q=e=>t=>typeof t===e,{isArray:C}=Array,F=q("undefined");function ze(e){return e!==null&&!F(e)&&e.constructor!==null&&!F(e.constructor)&&R(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const be=A("ArrayBuffer");function Je(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&be(e.buffer),t}const Ve=q("string"),R=q("function"),Se=q("number"),M=e=>e!==null&&typeof e=="object",$e=e=>e===!0||e===!1,B=e=>{if(H(e)!=="object")return!1;const t=ee(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},We=A("Date"),Ke=A("File"),Xe=A("Blob"),Ge=A("FileList"),ve=e=>M(e)&&R(e.pipe),Qe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||R(e.append)&&((t=H(e))==="formdata"||t==="object"&&R(e.toString)&&e.toString()==="[object FormData]"))},Ze=A("URLSearchParams"),Ye=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function L(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),C(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const Oe=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ae=e=>!F(e)&&e!==Oe;function X(){const{caseless:e}=Ae(this)&&this||{},t={},n=(r,s)=>{const o=e&&Re(t,s)||s;B(t[o])&&B(r)?t[o]=X(t[o],r):B(r)?t[o]=X({},r):C(r)?t[o]=r.slice():t[o]=r};for(let r=0,s=arguments.length;r(L(t,(s,o)=>{n&&R(s)?e[o]=we(s,n):e[o]=s},{allOwnKeys:r}),e),tt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),nt=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},rt=(e,t,n,r)=>{let s,o,i;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!c[i]&&(t[i]=e[i],c[i]=!0);e=n!==!1&&ee(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},st=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ot=e=>{if(!e)return null;if(C(e))return e;let t=e.length;if(!Se(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},it=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ee(Uint8Array)),at=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},ct=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ut=A("HTMLFormElement"),lt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),ie=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ft=A("RegExp"),Te=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};L(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},dt=e=>{Te(e,(t,n)=>{if(R(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(R(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},pt=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return C(e)?r(e):r(String(e).split(t)),n},ht=()=>{},mt=(e,t)=>(e=+e,Number.isFinite(e)?e:t),V="abcdefghijklmnopqrstuvwxyz",ae="0123456789",ge={DIGIT:ae,ALPHA:V,ALPHA_DIGIT:V+V.toUpperCase()+ae},yt=(e=16,t=ge.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Et(e){return!!(e&&R(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const wt=e=>{const t=new Array(10),n=(r,s)=>{if(M(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const o=C(r)?[]:{};return L(r,(i,c)=>{const p=n(i,s+1);!F(p)&&(o[c]=p)}),t[s]=void 0,o}}return r};return n(e,0)},bt=A("AsyncFunction"),St=e=>e&&(M(e)||R(e))&&R(e.then)&&R(e.catch),a={isArray:C,isArrayBuffer:be,isBuffer:ze,isFormData:Qe,isArrayBufferView:Je,isString:Ve,isNumber:Se,isBoolean:$e,isObject:M,isPlainObject:B,isUndefined:F,isDate:We,isFile:Ke,isBlob:Xe,isRegExp:ft,isFunction:R,isStream:ve,isURLSearchParams:Ze,isTypedArray:it,isFileList:Ge,forEach:L,merge:X,extend:et,trim:Ye,stripBOM:tt,inherits:nt,toFlatObject:rt,kindOf:H,kindOfTest:A,endsWith:st,toArray:ot,forEachEntry:at,matchAll:ct,isHTMLForm:ut,hasOwnProperty:ie,hasOwnProp:ie,reduceDescriptors:Te,freezeMethods:dt,toObjectSet:pt,toCamelCase:lt,noop:ht,toFiniteNumber:mt,findKey:Re,global:Oe,isContextDefined:Ae,ALPHABET:ge,generateString:yt,isSpecCompliantForm:Et,toJSONObject:wt,isAsyncFn:bt,isThenable:St};function m(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}a.inherits(m,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Pe=m.prototype,xe={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{xe[e]={value:e}});Object.defineProperties(m,xe);Object.defineProperty(Pe,"isAxiosError",{value:!0});m.from=(e,t,n,r,s,o)=>{const i=Object.create(Pe);return a.toFlatObject(e,i,function(p){return p!==Error.prototype},c=>c!=="isAxiosError"),m.call(i,e.message,t,n,r,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const Rt=null;function G(e){return a.isPlainObject(e)||a.isArray(e)}function Ne(e){return a.endsWith(e,"[]")?e.slice(0,-2):e}function ce(e,t,n){return e?e.concat(t).map(function(s,o){return s=Ne(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function Ot(e){return a.isArray(e)&&!e.some(G)}const At=a.toFlatObject(a,{},null,function(t){return/^is[A-Z]/.test(t)});function z(e,t,n){if(!a.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=a.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(d,w){return!a.isUndefined(w[d])});const r=n.metaTokens,s=n.visitor||l,o=n.dots,i=n.indexes,p=(n.Blob||typeof Blob<"u"&&Blob)&&a.isSpecCompliantForm(t);if(!a.isFunction(s))throw new TypeError("visitor must be a function");function h(f){if(f===null)return"";if(a.isDate(f))return f.toISOString();if(!p&&a.isBlob(f))throw new m("Blob is not supported. Use a Buffer instead.");return a.isArrayBuffer(f)||a.isTypedArray(f)?p&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,d,w){let b=f;if(f&&!w&&typeof f=="object"){if(a.endsWith(d,"{}"))d=r?d:d.slice(0,-2),f=JSON.stringify(f);else if(a.isArray(f)&&Ot(f)||(a.isFileList(f)||a.endsWith(d,"[]"))&&(b=a.toArray(f)))return d=Ne(d),b.forEach(function(P,qe){!(a.isUndefined(P)||P===null)&&t.append(i===!0?ce([d],qe,o):i===null?d:d+"[]",h(P))}),!1}return G(f)?!0:(t.append(ce(w,d,o),h(f)),!1)}const u=[],E=Object.assign(At,{defaultVisitor:l,convertValue:h,isVisitable:G});function S(f,d){if(!a.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+d.join("."));u.push(f),a.forEach(f,function(b,g){(!(a.isUndefined(b)||b===null)&&s.call(t,b,a.isString(g)?g.trim():g,d,E))===!0&&S(b,d?d.concat(g):[g])}),u.pop()}}if(!a.isObject(e))throw new TypeError("data must be an object");return S(e),t}function ue(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function te(e,t){this._pairs=[],e&&z(e,this,t)}const Ce=te.prototype;Ce.append=function(t,n){this._pairs.push([t,n])};Ce.toString=function(t){const n=t?function(r){return t.call(this,r,ue)}:ue;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Tt(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _e(e,t,n){if(!t)return e;const r=n&&n.encode||Tt,s=n&&n.serialize;let o;if(s?o=s(t,n):o=a.isURLSearchParams(t)?t.toString():new te(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class gt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){a.forEach(this.handlers,function(r){r!==null&&t(r)})}}const le=gt,Fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Pt=typeof URLSearchParams<"u"?URLSearchParams:te,xt=typeof FormData<"u"?FormData:null,Nt=typeof Blob<"u"?Blob:null,Ct={isBrowser:!0,classes:{URLSearchParams:Pt,FormData:xt,Blob:Nt},protocols:["http","https","file","blob","url","data"]},Le=typeof window<"u"&&typeof document<"u",_t=(e=>Le&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Ft=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Lt=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Le,hasStandardBrowserEnv:_t,hasStandardBrowserWebWorkerEnv:Ft},Symbol.toStringTag,{value:"Module"})),O={...Lt,...Ct};function Ut(e,t){return z(e,new O.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,o){return O.isNode&&a.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Bt(e){return a.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Dt(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r=n.length;return i=!i&&a.isArray(s)?s.length:i,p?(a.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!c):((!s[i]||!a.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&a.isArray(s[i])&&(s[i]=Dt(s[i])),!c)}if(a.isFormData(e)&&a.isFunction(e.entries)){const n={};return a.forEachEntry(e,(r,s)=>{t(Bt(r),s,n,0)}),n}return null}function kt(e,t,n){if(a.isString(e))try{return(t||JSON.parse)(e),a.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ne={transitional:Fe,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=a.isObject(t);if(o&&a.isHTMLForm(t)&&(t=new FormData(t)),a.isFormData(t))return s?JSON.stringify(Ue(t)):t;if(a.isArrayBuffer(t)||a.isBuffer(t)||a.isStream(t)||a.isFile(t)||a.isBlob(t))return t;if(a.isArrayBufferView(t))return t.buffer;if(a.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ut(t,this.formSerializer).toString();if((c=a.isFileList(t))||r.indexOf("multipart/form-data")>-1){const p=this.env&&this.env.FormData;return z(c?{"files[]":t}:t,p&&new p,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),kt(t)):t}],transformResponse:[function(t){const n=this.transitional||ne.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&a.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(i)throw c.name==="SyntaxError"?m.from(c,m.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:O.classes.FormData,Blob:O.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};a.forEach(["delete","get","head","post","put","patch"],e=>{ne.headers[e]={}});const re=ne,jt=a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),It=e=>{const t={};let n,r,s;return e&&e.split(` +`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&jt[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},fe=Symbol("internals");function _(e){return e&&String(e).trim().toLowerCase()}function D(e){return e===!1||e==null?e:a.isArray(e)?e.map(D):String(e)}function Ht(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const qt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function $(e,t,n,r,s){if(a.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!a.isString(t)){if(a.isString(r))return t.indexOf(r)!==-1;if(a.isRegExp(r))return r.test(t)}}function Mt(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zt(e,t){const n=a.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}class J{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(c,p,h){const l=_(p);if(!l)throw new Error("header name must be a non-empty string");const u=a.findKey(s,l);(!u||s[u]===void 0||h===!0||h===void 0&&s[u]!==!1)&&(s[u||p]=D(c))}const i=(c,p)=>a.forEach(c,(h,l)=>o(h,l,p));return a.isPlainObject(t)||t instanceof this.constructor?i(t,n):a.isString(t)&&(t=t.trim())&&!qt(t)?i(It(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=_(t),t){const r=a.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Ht(s);if(a.isFunction(n))return n.call(this,s,r);if(a.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=_(t),t){const r=a.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||$(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=_(i),i){const c=a.findKey(r,i);c&&(!n||$(r,r[c],c,n))&&(delete r[c],s=!0)}}return a.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||$(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return a.forEach(this,(s,o)=>{const i=a.findKey(r,o);if(i){n[i]=D(s),delete n[o];return}const c=t?Mt(o):String(o).trim();c!==o&&delete n[o],n[c]=D(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return a.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&a.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[fe]=this[fe]={accessors:{}}).accessors,s=this.prototype;function o(i){const c=_(i);r[c]||(zt(s,i),r[c]=!0)}return a.isArray(t)?t.forEach(o):o(t),this}}J.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);a.reduceDescriptors(J.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});a.freezeMethods(J);const T=J;function W(e,t){const n=this||re,r=t||n,s=T.from(r.headers);let o=r.data;return a.forEach(e,function(c){o=c.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Be(e){return!!(e&&e.__CANCEL__)}function U(e,t,n){m.call(this,e??"canceled",m.ERR_CANCELED,t,n),this.name="CanceledError"}a.inherits(U,m,{__CANCEL__:!0});function Jt(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new m("Request failed with status code "+n.status,[m.ERR_BAD_REQUEST,m.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Vt=O.hasStandardBrowserEnv?{write(e,t,n,r,s,o){const i=[e+"="+encodeURIComponent(t)];a.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),a.isString(r)&&i.push("path="+r),a.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $t(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Wt(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function De(e,t){return e&&!$t(t)?Wt(e,t):t}const Kt=O.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(i){const c=a.isString(i)?s(i):i;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}();function Xt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Gt(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(p){const h=Date.now(),l=r[o];i||(i=h),n[s]=p,r[s]=h;let u=o,E=0;for(;u!==s;)E+=n[u++],u=u%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),h-i{const o=s.loaded,i=s.lengthComputable?s.total:void 0,c=o-n,p=r(c),h=o<=i;n=o;const l={loaded:o,total:i,progress:i?o/i:void 0,bytes:c,rate:p||void 0,estimated:p&&i&&h?(i-o)/p:void 0,event:s};l[t?"download":"upload"]=!0,e(l)}}const vt=typeof XMLHttpRequest<"u",Qt=vt&&function(e){return new Promise(function(n,r){let s=e.data;const o=T.from(e.headers).normalize();let{responseType:i,withXSRFToken:c}=e,p;function h(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}let l;if(a.isFormData(s)){if(O.hasStandardBrowserEnv||O.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((l=o.getContentType())!==!1){const[d,...w]=l?l.split(";").map(b=>b.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...w].join("; "))}}let u=new XMLHttpRequest;if(e.auth){const d=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(d+":"+w))}const E=De(e.baseURL,e.url);u.open(e.method.toUpperCase(),_e(E,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function S(){if(!u)return;const d=T.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),b={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:d,config:e,request:u};Jt(function(P){n(P),h()},function(P){r(P),h()},b),u=null}if("onloadend"in u?u.onloadend=S:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(S)},u.onabort=function(){u&&(r(new m("Request aborted",m.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new m("Network Error",m.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||Fe;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),r(new m(w,b.clarifyTimeoutError?m.ETIMEDOUT:m.ECONNABORTED,e,u)),u=null},O.hasStandardBrowserEnv&&(c&&a.isFunction(c)&&(c=c(e)),c||c!==!1&&Kt(E))){const d=e.xsrfHeaderName&&e.xsrfCookieName&&Vt.read(e.xsrfCookieName);d&&o.set(e.xsrfHeaderName,d)}s===void 0&&o.setContentType(null),"setRequestHeader"in u&&a.forEach(o.toJSON(),function(w,b){u.setRequestHeader(b,w)}),a.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&i!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",de(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",de(e.onUploadProgress)),(e.cancelToken||e.signal)&&(p=d=>{u&&(r(!d||d.type?new U(null,e,u):d),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p)));const f=Xt(E);if(f&&O.protocols.indexOf(f)===-1){r(new m("Unsupported protocol "+f+":",m.ERR_BAD_REQUEST,e));return}u.send(s||null)})},v={http:Rt,xhr:Qt};a.forEach(v,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const pe=e=>`- ${e}`,Zt=e=>a.isFunction(e)||e===null||e===!1,ke={getAdapter:e=>{e=a.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let o=0;o`adapter ${c} `+(p===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since : `+o.map(pe).join(` `):" "+pe(o[0]):"as no adapter specified";throw new m("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:v};function K(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new U(null,e)}function he(e){return K(e),e.headers=T.from(e.headers),e.data=W.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ke.getAdapter(e.adapter||re.adapter)(e).then(function(r){return K(e),r.data=W.call(e,e.transformResponse,r),r.headers=T.from(r.headers),r},function(r){return Be(r)||(K(e),r&&r.response&&(r.response.data=W.call(e,e.transformResponse,r.response),r.response.headers=T.from(r.response.headers))),Promise.reject(r)})}const me=e=>e instanceof T?e.toJSON():e;function N(e,t){t=t||{};const n={};function r(h,l,u){return a.isPlainObject(h)&&a.isPlainObject(l)?a.merge.call({caseless:u},h,l):a.isPlainObject(l)?a.merge({},l):a.isArray(l)?l.slice():l}function s(h,l,u){if(a.isUndefined(l)){if(!a.isUndefined(h))return r(void 0,h,u)}else return r(h,l,u)}function o(h,l){if(!a.isUndefined(l))return r(void 0,l)}function i(h,l){if(a.isUndefined(l)){if(!a.isUndefined(h))return r(void 0,h)}else return r(void 0,l)}function c(h,l,u){if(u in t)return r(h,l);if(u in e)return r(void 0,h)}const p={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(h,l)=>s(me(h),me(l),!0)};return a.forEach(Object.keys(Object.assign({},e,t)),function(l){const u=p[l]||s,E=u(e[l],t[l],l);a.isUndefined(E)&&u!==c||(n[l]=E)}),n}const je="1.6.7",se={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{se[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ye={};se.transitional=function(t,n,r){function s(o,i){return"[Axios v"+je+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,c)=>{if(t===!1)throw new m(s(i," has been removed"+(n?" in "+n:"")),m.ERR_DEPRECATED);return n&&!ye[i]&&(ye[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,c):!0}};function Yt(e,t,n){if(typeof e!="object")throw new m("options must be an object",m.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const c=e[o],p=c===void 0||i(c,o,e);if(p!==!0)throw new m("option "+o+" must be "+p,m.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new m("Unknown option "+o,m.ERR_BAD_OPTION)}}const Q={assertOptions:Yt,validators:se},x=Q.validators;class j{constructor(t){this.defaults=t,this.interceptors={request:new le,response:new le}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s;Error.captureStackTrace?Error.captureStackTrace(s={}):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=N(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Q.assertOptions(r,{silentJSONParsing:x.transitional(x.boolean),forcedJSONParsing:x.transitional(x.boolean),clarifyTimeoutError:x.transitional(x.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:Q.assertOptions(s,{encode:x.function,serialize:x.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),n.headers=T.concat(i,o);const c=[];let p=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(n)===!1||(p=p&&d.synchronous,c.unshift(d.fulfilled,d.rejected))});const h=[];this.interceptors.response.forEach(function(d){h.push(d.fulfilled,d.rejected)});let l,u=0,E;if(!p){const f=[he.bind(this),void 0];for(f.unshift.apply(f,c),f.push.apply(f,h),E=f.length,l=Promise.resolve(n);u{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new U(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new oe(function(s){t=s}),cancel:t}}}const en=oe;function tn(e){return function(n){return e.apply(null,n)}}function nn(e){return a.isObject(e)&&e.isAxiosError===!0}const Z={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Z).forEach(([e,t])=>{Z[t]=e});const rn=Z;function Ie(e){const t=new k(e),n=we(k.prototype.request,t);return a.extend(n,k.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ie(N(e,s))},n}const y=Ie(re);y.Axios=k;y.CanceledError=U;y.CancelToken=en;y.isCancel=Be;y.VERSION=je;y.toFormData=z;y.AxiosError=m;y.Cancel=y.CanceledError;y.all=function(t){return Promise.all(t)};y.spread=tn;y.isAxiosError=nn;y.mergeConfig=N;y.AxiosHeaders=T;y.formToJSON=e=>Ue(a.isHTMLForm(e)?new FormData(e):e);y.getAdapter=ke.getAdapter;y.HttpStatusCode=rn;y.default=y;const sn=y;class on{static get VITE_DEBUG(){return"false"}static get VITE_APP_BASE_API(){return"/MiniAuth/"}}const He=sn.create({baseURL:on.VITE_APP_BASE_API,timeout:5e4,headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},withCredentials:!0});He.interceptors.request.use(e=>(localStorage.getItem("X-MiniAuth-Token")&&(e.headers["X-MiniAuth-Token"]=localStorage.getItem("X-MiniAuth-Token")),an(),e),e=>(Y(),alert(e.message||"Error"),console.error("Error:",e),Promise.reject(e)));He.interceptors.response.use(e=>{Y();const t=e.data;return e.status!==200||t.code!==200?(alert(t.message||"Error"),Promise.reject(new Error(t.message||"Error"))):e.data.data||e.data},e=>{Y();const t=e.response;if(e.response.status===401){alert("Unauthorized"),localStorage.removeItem("X-MiniAuth-Token");const n=t.headers.RedirectUri||t.headers.redirectUri||t.headers.Location||t.headers.location;if(n){const r=new URL(n);r.searchParams.delete("ReturnUrl"),window.location.replace(r.toString());return}window.location.href="login.html";return}if(e.response.status===403){alert("Forbidden");return}return alert(t.data.message||e.message||"Error"),console.error("Error:",e),Promise.reject(e)});let I=0;const an=()=>{I++,I>0&&Ee.emit("showLoading")},Y=()=>{I--,I<=0&&Ee.emit("closeLoading")};export{He as s}; +`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=N(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Q.assertOptions(r,{silentJSONParsing:x.transitional(x.boolean),forcedJSONParsing:x.transitional(x.boolean),clarifyTimeoutError:x.transitional(x.boolean)},!1),s!=null&&(a.isFunction(s)?n.paramsSerializer={serialize:s}:Q.assertOptions(s,{encode:x.function,serialize:x.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&a.merge(o.common,o[n.method]);o&&a.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),n.headers=T.concat(i,o);const c=[];let p=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(n)===!1||(p=p&&d.synchronous,c.unshift(d.fulfilled,d.rejected))});const h=[];this.interceptors.response.forEach(function(d){h.push(d.fulfilled,d.rejected)});let l,u=0,E;if(!p){const f=[he.bind(this),void 0];for(f.unshift.apply(f,c),f.push.apply(f,h),E=f.length,l=Promise.resolve(n);u{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(c=>{r.subscribe(c),o=c}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,c){r.reason||(r.reason=new U(o,i,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new oe(function(s){t=s}),cancel:t}}}const en=oe;function tn(e){return function(n){return e.apply(null,n)}}function nn(e){return a.isObject(e)&&e.isAxiosError===!0}const Z={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Z).forEach(([e,t])=>{Z[t]=e});const rn=Z;function Ie(e){const t=new k(e),n=we(k.prototype.request,t);return a.extend(n,k.prototype,t,{allOwnKeys:!0}),a.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Ie(N(e,s))},n}const y=Ie(re);y.Axios=k;y.CanceledError=U;y.CancelToken=en;y.isCancel=Be;y.VERSION=je;y.toFormData=z;y.AxiosError=m;y.Cancel=y.CanceledError;y.all=function(t){return Promise.all(t)};y.spread=tn;y.isAxiosError=nn;y.mergeConfig=N;y.AxiosHeaders=T;y.formToJSON=e=>Ue(a.isHTMLForm(e)?new FormData(e):e);y.getAdapter=ke.getAdapter;y.HttpStatusCode=rn;y.default=y;const sn=y;class on{static get VITE_DEBUG(){return"false"}static get VITE_APP_BASE_API(){return"/MiniAuth/"}}const He=sn.create({baseURL:on.VITE_APP_BASE_API,timeout:5e4,headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},withCredentials:!0});He.interceptors.request.use(e=>(localStorage.getItem("X-MiniAuth-Token")&&(e.headers.Authorization="Bearer "+localStorage.getItem("X-MiniAuth-Token")),an(),e),e=>(Y(),alert(e.message||"Error"),console.error("Error:",e),Promise.reject(e)));He.interceptors.response.use(e=>{Y();const t=e.data;return e.status!==200||t.code!==200?(alert(t.message||"Error"),Promise.reject(new Error(t.message||"Error"))):e.data.data||e.data},e=>{Y();const t=e.response;if(e.response.status===401){alert("Unauthorized"),localStorage.removeItem("X-MiniAuth-Token");const n=t.headers.RedirectUri||t.headers.redirectUri||t.headers.Location||t.headers.location;if(n){const r=new URL(n);r.searchParams.delete("ReturnUrl"),window.location.replace(r.toString());return}window.location.href="login.html";return}if(e.response.status===403){alert("Forbidden");return}return alert(t.data.message||e.message||"Error"),console.error("Error:",e),Promise.reject(e)});let I=0;const an=()=>{I++,I>0&&Ee.emit("showLoading")},Y=()=>{I--,I<=0&&Ee.emit("closeLoading")};export{He as s}; diff --git a/src/MiniAuth.IdentityAuth/wwwroot/index.html b/src/MiniAuth.IdentityAuth/wwwroot/index.html index 492e534..e700bdf 100644 --- a/src/MiniAuth.IdentityAuth/wwwroot/index.html +++ b/src/MiniAuth.IdentityAuth/wwwroot/index.html @@ -7,7 +7,7 @@ MiniAuth - + diff --git a/src/MiniAuth.IdentityAuth/wwwroot/login.js b/src/MiniAuth.IdentityAuth/wwwroot/login.js index ac3c5bb..ed343a4 100644 --- a/src/MiniAuth.IdentityAuth/wwwroot/login.js +++ b/src/MiniAuth.IdentityAuth/wwwroot/login.js @@ -108,11 +108,18 @@ document.getElementById('loginForm').addEventListener('submit', function (event) xhr.onload = function () { if (xhr.status === 200) { - const token = JSON.parse(xhr.responseText)['X-MiniAuth-Token']; - if (token!=undefined && token!=null ) - localStorage.setItem('X-MiniAuth-Token', token); - - window.location.href = returnUrl; + const data = JSON.parse(xhr.responseText); + if (data.ok === false) { + document.getElementById('message').textContent = 'Login failed. Please check your credentials.'; + return; + } + if (data.data.accessToken!=undefined && data.data.accessToken!=null) { + localStorage.setItem('X-MiniAuth-Token', data.data.accessToken); + } + // after 1 second then redirect to returnUrl + setTimeout(function () { + window.location.href = returnUrl; + }, 1000); } else { document.getElementById('message').textContent = 'Login failed. Please check your credentials.'; } diff --git a/tests/TestBearer/TestBearer/Program.cs b/tests/TestBearer/TestBearer/Program.cs index 5fc8d67..00f19ba 100644 --- a/tests/TestBearer/TestBearer/Program.cs +++ b/tests/TestBearer/TestBearer/Program.cs @@ -11,6 +11,7 @@ public static void Main(string[] args) var builder = WebApplication.CreateBuilder(args); MiniAuthOptions.AuthenticationType = MiniAuthOptions.AuthType.BearerJwt; + MiniAuthOptions.TokenExpiresIn = 30; builder.Services.AddMiniAuth(); var app = builder.Build(); diff --git a/tests/TestBearer/TestBearer/TestBearer.csproj b/tests/TestBearer/TestBearer/TestBearer.csproj index 67e2fa3..540424d 100644 --- a/tests/TestBearer/TestBearer/TestBearer.csproj +++ b/tests/TestBearer/TestBearer/TestBearer.csproj @@ -1,10 +1,11 @@ - + net8.0 enable enable - + 6974a48a-2e04-4751-9b7f-b33cd2b4d80a + diff --git a/tests/TestBearer/TestBearer/appsettings.Development.json b/tests/TestBearer/TestBearer/appsettings.Development.json index 0c208ae..02a3fe8 100644 --- a/tests/TestBearer/TestBearer/appsettings.Development.json +++ b/tests/TestBearer/TestBearer/appsettings.Development.json @@ -4,5 +4,17 @@ "Default": "Information", "Microsoft.AspNetCore": "Warning" } + }, + "Authentication": { + "Schemes": { + "Bearer": { + "ValidAudiences": [ + "http://localhost:64331", + "https://localhost:0", + "http://localhost:5014" + ], + "ValidIssuer": "dotnet-user-jwts" + } + } } -} +} \ No newline at end of file