@oktis-works/admin 0.4.15 → 0.4.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/dist/client/_astro/{ActivityWidget.B83CLwGG.js → ActivityWidget.BoV5JMFM.js} +1 -1
  2. package/dist/client/_astro/{AdminBar.BNESswxs.js → AdminBar.Bzzeux86.js} +1 -1
  3. package/dist/client/_astro/{AtGlanceWidget.Cqbb9anJ.js → AtGlanceWidget.BIHmD0Mp.js} +1 -1
  4. package/dist/client/_astro/{ContentEditor.CBH227Ni.js → ContentEditor.Bdh3rpdn.js} +1 -1
  5. package/dist/client/_astro/{ContentList.hmLCz5_S.js → ContentList.D1XcWg2t.js} +1 -1
  6. package/dist/client/_astro/{CustomFieldsManager.Dzhp_sZl.js → CustomFieldsManager.6c3e_83f.js} +1 -1
  7. package/dist/client/_astro/{DashboardHome.DawF-CZ9.js → DashboardHome.C0c91P5X.js} +1 -1
  8. package/dist/client/_astro/{DashboardLayout.astro_astro_type_script_index_0_lang.Ckp0okyg.js → DashboardLayout.astro_astro_type_script_index_0_lang.CMtAy9r3.js} +1 -1
  9. package/dist/client/_astro/{Footer.dcA-nmBA.js → Footer.LI6Cpgg_.js} +1 -1
  10. package/dist/client/_astro/{GeneralSettings.DdAwp-oL.js → GeneralSettings.BFAXjOA2.js} +1 -1
  11. package/dist/client/_astro/{MediaLibrary.B9SPVPYH.js → MediaLibrary.BvtJOo5A.js} +1 -1
  12. package/dist/client/_astro/{PluginManager.DN5xhAsV.js → PluginManager.BYI4SRec.js} +1 -1
  13. package/dist/client/_astro/{PostTypesManager.BZH1eM3c.js → PostTypesManager.bQc6yww5.js} +1 -1
  14. package/dist/client/_astro/{QuickDraftWidget.DBvLubay.js → QuickDraftWidget.Cjm5_7y-.js} +1 -1
  15. package/dist/client/_astro/{ResourceHubs.BvrE39A0.js → ResourceHubs.MrbWi-Z_.js} +1 -1
  16. package/dist/client/_astro/{TaxonomiesManager.BrjG05jb.js → TaxonomiesManager.kwogAOFS.js} +1 -1
  17. package/dist/client/_astro/{ThemeManager.CsrK3HXj.js → ThemeManager.Hw1k4IW5.js} +1 -1
  18. package/dist/client/_astro/{UserCreateForm.Dxq80Bqx.js → UserCreateForm.CHb7uDCX.js} +1 -1
  19. package/dist/client/_astro/{UsersManager.DmBadxWw.js → UsersManager.Btde4I0r.js} +1 -1
  20. package/dist/client/_astro/api.DD5u5p4h.js +1 -0
  21. package/dist/client/_astro/{extensions.C6GOqTCd.js → extensions.Y_1XaoRs.js} +1 -1
  22. package/dist/client/_astro/{i18n.B4BuieMb.js → i18n.RrM42yx5.js} +1 -1
  23. package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.yH8kNMtD.js → login.astro_astro_type_script_index_0_lang.BPE3sVZJ.js} +1 -1
  24. package/dist/client/_astro/{src.HVGUo-fm.js → src.B10HDgSa.js} +1 -1
  25. package/dist/client/_astro/{version.CilNJ_fk.js → version.B9EoEAbb.js} +1 -1
  26. package/dist/client/favicon.svg +10 -0
  27. package/dist/server/chunks/{BaseLayout_BmkfK9tu.mjs → BaseLayout_D1PbsjNG.mjs} +6 -5
  28. package/dist/server/chunks/{ContentEditor_C-kz5cS4.mjs → ContentEditor_B_alLPkZ.mjs} +2 -2
  29. package/dist/server/chunks/{DashboardLayout_KIUq60Dv.mjs → DashboardLayout_B1lpShsT.mjs} +3 -3
  30. package/dist/server/chunks/{MediaLibrary_C-lJBpPG.mjs → MediaLibrary_B_mkxyGz.mjs} +2 -2
  31. package/dist/server/chunks/{ResourceHubs_T-WuZoVF.mjs → ResourceHubs_SnzUKv2d.mjs} +1 -1
  32. package/dist/server/chunks/{_slug__DjcyD19w.mjs → _slug__DK1dX6Cc.mjs} +1 -1
  33. package/dist/server/chunks/{access_Bjuw_Gvp.mjs → access_BXua9HeF.mjs} +2 -2
  34. package/dist/server/chunks/{custom-fields_CxntKU56.mjs → custom-fields_DZxzXn_Y.mjs} +2 -2
  35. package/dist/server/chunks/{edit_CFKKfQux.mjs → edit_DMCL0nv5.mjs} +2 -2
  36. package/dist/server/chunks/{general_CVsJAP2e.mjs → general_DY6nfeME.mjs} +2 -2
  37. package/dist/server/chunks/{i18n_CH59YTvE.mjs → i18n_BZdCNETS.mjs} +8 -1
  38. package/dist/server/chunks/{index_TyNyWm6y.mjs → index_BAVyaaWE.mjs} +1 -1
  39. package/dist/server/chunks/{index_Bb3w_UqS.mjs → index_BZU6TG9K.mjs} +2 -2
  40. package/dist/server/chunks/{index_G7lx2uke.mjs → index_Bn9LjtxA.mjs} +2 -2
  41. package/dist/server/chunks/{index_2Y9ZC7Gs.mjs → index_D0YtPHrm.mjs} +2 -2
  42. package/dist/server/chunks/{index_BqyoH4bc.mjs → index_eIvtdujt.mjs} +2 -2
  43. package/dist/server/chunks/{login_BCjtaOE9.mjs → login_xmDNRy6-.mjs} +1 -1
  44. package/dist/server/chunks/{new_BZOJIQfZ.mjs → new_DjeZ5fm2.mjs} +2 -2
  45. package/dist/server/chunks/{new_DkHY3O0r.mjs → new_vDml0n9D.mjs} +2 -2
  46. package/dist/server/chunks/{operations_DYc6rwSI.mjs → operations_wkXdEoy9.mjs} +2 -2
  47. package/dist/server/chunks/{plugins_p805vlEb.mjs → plugins_BwmcMrFa.mjs} +2 -2
  48. package/dist/server/chunks/{post-types_C7YAi_V0.mjs → post-types_Di0TnpMF.mjs} +2 -2
  49. package/dist/server/chunks/{resources_BVP5krU_.mjs → resources_BZh_dXsF.mjs} +2 -2
  50. package/dist/server/chunks/{taxonomies_CWhPYZDq.mjs → taxonomies_CuEyvskw.mjs} +2 -2
  51. package/dist/server/chunks/{themes_iwb1637h.mjs → themes_DZ9w9ECK.mjs} +2 -2
  52. package/dist/server/chunks/{upload_BE7qzxe7.mjs → upload_Bp9adHy4.mjs} +2 -2
  53. package/dist/server/entry.mjs +21 -21
  54. package/dist/server/virtual_astro_middleware.mjs +3 -2
  55. package/package.json +1 -1
  56. package/dist/client/_astro/api.BfxYC8bU.js +0 -1
@@ -1 +1 @@
1
- import{t as e}from"./i18n.B4BuieMb.js";import{C as t,S as n,T as r,_ as i,b as a,d as o,g as s,i as c,l,n as u,o as d,p as f,r as p,s as m}from"./web.D_vCtCLj.js";import{t as h}from"./api.BfxYC8bU.js";var ee=f(`<div class="notice notice--error">`),g=f(`<div class=user-create><!$><!/><form class=card><h3></h3><div class=form-grid><label><!$><!/><input class=input required></label><label><!$><!/><input class=input type=email required></label><label><!$><!/><span class=muted></span><input class=input type=password required minlength=8></label><label><!$><!/><select class=input><option value></option><!$><!/></select></label></div><p class=muted><!$><!/> <!$><!/> — <!$><!/> <!$><!/>.</p><div class=media-details__actions><button class="btn btn-primary"type=submit></button><a class="btn btn-secondary"href=/users>`),te=f(`<option><!$><!/> (<!$><!/>)`);function _(){let{t:u}=e(),[f,_]=t(``),[v,ne]=t(``),[y,re]=t(``),[b,x]=t(``),[S,C]=t([]),[w,T]=t(``),[E,D]=t(!1);r(async()=>{try{let e=await h.listRoles();C(e),x(e.find(e=>e.slug===`EDITOR`)?.id??e[0]?.id??``)}catch{}});let O=async e=>{if(e.preventDefault(),T(``),y().length<8){T(u(`users.detail.passwordError`));return}D(!0);try{await h.createUser({name:f(),email:v(),password:y(),roleId:b()||void 0}),window.location.href=`/users`}catch(e){T(e instanceof Error?e.message:String(e)),D(!1)}};return(()=>{var e=p(g),t=e.firstChild,[r,h]=c(t.nextSibling),C=r.nextSibling,T=C.firstChild,D=T.nextSibling,k=D.firstChild,ie=k.firstChild,[A,j]=c(ie.nextSibling),M=A.nextSibling,N=k.nextSibling,P=N.firstChild,[F,ae]=c(P.nextSibling),I=F.nextSibling,L=N.nextSibling,oe=L.firstChild,[R,z]=c(oe.nextSibling),B=R.nextSibling,V=B.nextSibling,H=L.nextSibling,U=H.firstChild,[W,G]=c(U.nextSibling),K=W.nextSibling,q=K.firstChild,se=q.nextSibling,[ce,le]=c(se.nextSibling),J=D.nextSibling,ue=J.firstChild,[Y,de]=c(ue.nextSibling),fe=Y.nextSibling.nextSibling,[X,pe]=c(fe.nextSibling),me=X.nextSibling.nextSibling,[Z,he]=c(me.nextSibling),ge=Z.nextSibling.nextSibling,[Q,_e]=c(ge.nextSibling);Q.nextSibling;var $=J.nextSibling.firstChild,ve=$.nextSibling;return d(e,a(i,{get when(){return w()},get children(){var e=p(ee);return d(e,w),e}}),r,h),C.addEventListener(`submit`,O),d(T,()=>u(`users.new`)),d(k,()=>u(`users.detail.fields.name`),A,j),M.$$input=e=>_(e.currentTarget.value),d(N,()=>u(`users.detail.fields.email`),F,ae),I.$$input=e=>ne(e.currentTarget.value),d(L,()=>u(`users.detail.fields.password`),R,z),d(B,()=>u(`users.detail.passwordPrompt`,{email:``})),V.$$input=e=>re(e.currentTarget.value),d(H,()=>u(`users.detail.fields.role`),W,G),K.addEventListener(`change`,e=>x(e.currentTarget.value)),d(q,()=>u(`users.detail.rolePlaceholder`)),d(K,a(s,{get each(){return S()},children:e=>(()=>{var t=p(te),r=t.firstChild,[i,a]=c(r.nextSibling),s=i.nextSibling.nextSibling,[l,u]=c(s.nextSibling);return l.nextSibling,d(t,()=>e.name,i,a),d(t,()=>e.slug,l,u),n(()=>o(t,`value`,e.id)),t})()}),ce,le),d(J,()=>u(`common.save`),Y,de),d(J,()=>u(`users.new`).toLowerCase(),X,pe),d(J,()=>u(`users.detail.fields.role`),Z,he),d(J,()=>u(`users.toolbar.newBtn`).toLowerCase(),Q,_e),d($,(()=>{var e=m(()=>!!E());return()=>e()?u(`common.loading`):u(`common.create`)})()),d(ve,()=>u(`common.back`)),n(()=>o($,`disabled`,E())),n(()=>o(M,`value`,f())),n(()=>o(I,`value`,v())),n(()=>o(V,`value`,y())),n(()=>o(K,`value`,b())),l(),e})()}u([`input`]);export{_ as UserCreateForm};
1
+ import{t as e}from"./i18n.RrM42yx5.js";import{C as t,S as n,T as r,_ as i,b as a,d as o,g as s,i as c,l,n as u,o as d,p as f,r as p,s as m}from"./web.D_vCtCLj.js";import{t as h}from"./api.DD5u5p4h.js";var ee=f(`<div class="notice notice--error">`),g=f(`<div class=user-create><!$><!/><form class=card><h3></h3><div class=form-grid><label><!$><!/><input class=input required></label><label><!$><!/><input class=input type=email required></label><label><!$><!/><span class=muted></span><input class=input type=password required minlength=8></label><label><!$><!/><select class=input><option value></option><!$><!/></select></label></div><p class=muted><!$><!/> <!$><!/> — <!$><!/> <!$><!/>.</p><div class=media-details__actions><button class="btn btn-primary"type=submit></button><a class="btn btn-secondary"href=/users>`),te=f(`<option><!$><!/> (<!$><!/>)`);function _(){let{t:u}=e(),[f,_]=t(``),[v,ne]=t(``),[y,re]=t(``),[b,x]=t(``),[S,C]=t([]),[w,T]=t(``),[E,D]=t(!1);r(async()=>{try{let e=await h.listRoles();C(e),x(e.find(e=>e.slug===`EDITOR`)?.id??e[0]?.id??``)}catch{}});let O=async e=>{if(e.preventDefault(),T(``),y().length<8){T(u(`users.detail.passwordError`));return}D(!0);try{await h.createUser({name:f(),email:v(),password:y(),roleId:b()||void 0}),window.location.href=`/users`}catch(e){T(e instanceof Error?e.message:String(e)),D(!1)}};return(()=>{var e=p(g),t=e.firstChild,[r,h]=c(t.nextSibling),C=r.nextSibling,T=C.firstChild,D=T.nextSibling,k=D.firstChild,ie=k.firstChild,[A,j]=c(ie.nextSibling),M=A.nextSibling,N=k.nextSibling,P=N.firstChild,[F,ae]=c(P.nextSibling),I=F.nextSibling,L=N.nextSibling,oe=L.firstChild,[R,z]=c(oe.nextSibling),B=R.nextSibling,V=B.nextSibling,H=L.nextSibling,U=H.firstChild,[W,G]=c(U.nextSibling),K=W.nextSibling,q=K.firstChild,se=q.nextSibling,[ce,le]=c(se.nextSibling),J=D.nextSibling,ue=J.firstChild,[Y,de]=c(ue.nextSibling),fe=Y.nextSibling.nextSibling,[X,pe]=c(fe.nextSibling),me=X.nextSibling.nextSibling,[Z,he]=c(me.nextSibling),ge=Z.nextSibling.nextSibling,[Q,_e]=c(ge.nextSibling);Q.nextSibling;var $=J.nextSibling.firstChild,ve=$.nextSibling;return d(e,a(i,{get when(){return w()},get children(){var e=p(ee);return d(e,w),e}}),r,h),C.addEventListener(`submit`,O),d(T,()=>u(`users.new`)),d(k,()=>u(`users.detail.fields.name`),A,j),M.$$input=e=>_(e.currentTarget.value),d(N,()=>u(`users.detail.fields.email`),F,ae),I.$$input=e=>ne(e.currentTarget.value),d(L,()=>u(`users.detail.fields.password`),R,z),d(B,()=>u(`users.detail.passwordPrompt`,{email:``})),V.$$input=e=>re(e.currentTarget.value),d(H,()=>u(`users.detail.fields.role`),W,G),K.addEventListener(`change`,e=>x(e.currentTarget.value)),d(q,()=>u(`users.detail.rolePlaceholder`)),d(K,a(s,{get each(){return S()},children:e=>(()=>{var t=p(te),r=t.firstChild,[i,a]=c(r.nextSibling),s=i.nextSibling.nextSibling,[l,u]=c(s.nextSibling);return l.nextSibling,d(t,()=>e.name,i,a),d(t,()=>e.slug,l,u),n(()=>o(t,`value`,e.id)),t})()}),ce,le),d(J,()=>u(`common.save`),Y,de),d(J,()=>u(`users.new`).toLowerCase(),X,pe),d(J,()=>u(`users.detail.fields.role`),Z,he),d(J,()=>u(`users.toolbar.newBtn`).toLowerCase(),Q,_e),d($,(()=>{var e=m(()=>!!E());return()=>e()?u(`common.loading`):u(`common.create`)})()),d(ve,()=>u(`common.back`)),n(()=>o($,`disabled`,E())),n(()=>o(M,`value`,f())),n(()=>o(I,`value`,v())),n(()=>o(V,`value`,y())),n(()=>o(K,`value`,b())),l(),e})()}u([`input`]);export{_ as UserCreateForm};
@@ -1 +1 @@
1
- import{t as e}from"./i18n.B4BuieMb.js";import{C as t,S as n,T as r,_ as i,b as a,d as o,g as s,i as c,l,n as u,o as d,p as f,r as p}from"./web.D_vCtCLj.js";import{t as m}from"./api.BfxYC8bU.js";import{a as h,i as g,n as _,o as v,t as y}from"./src.HVGUo-fm.js";var b=f(`<div class="notice notice--error">`),x=f(`<div class=notice>`),S=f(`<table class=users-table><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),C=f(`<div class=users-manager><!$><!/><!$><!/><div class=toolbar><!$><!/><!$><!/><a class="btn btn-primary"href=/users/new></a><!$><!/></div><!$><!/><!$><!/><!$><!/>`),w=f(`<p class=muted>`),T=f(`<tr><td></td><td class=muted></td><td></td><td><span class=status-dot></span><!$><!/></td><td class=muted></td><td class=users-table__actions><!$><!/><!$><!/>`),E=f(`<span class=muted>`),D=f(`<div class="card user-details"><h3></h3><div class=form-grid><label><!$><!/><input class=input></label><label><!$><!/><input class=input type=email></label><label><!$><!/><select class=input><option value=ACTIVE></option><option value=INACTIVE></option></select></label><label><!$><!/><select class=input><option value></option><!$><!/></select></label></div><p class=muted></p><div class=media-details__actions><!$><!/><!$><!/><!$><!/>`),O=f(`<option><!$><!/> (<!$><!/>)`);function k(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:t.toLocaleString(`pt-BR`)}function A(){let{t:u}=e(),[f,A]=t([]),[j,M]=t([]),[N,P]=t(0),[F,I]=t(1),[L,R]=t(``),[z,B]=t(``),[V,H]=t(``),[U,W]=t(``),[G,K]=t(null),[q,J]=t(!1),Y=async()=>{try{let e=await m.listUsers({page:F(),limit:20,search:L()||void 0,status:z()||void 0});A(e.data??[]),P(e.total??0)}catch(e){H(e instanceof Error?e.message:String(e))}};r(async()=>{await Y();try{M(await m.listRoles())}catch{}});let X=async()=>{I(1),await Y()},ee=async(e,t)=>{if(t){J(!0),H(``);try{let n=await m.assignRole(e.id,t);K({...e,roles:n.roles}),W(u(`users.detail.toasts.roleUpdated`,{name:e.name})),await Y()}catch(e){H(e instanceof Error?e.message:String(e))}finally{J(!1)}}},te=async e=>{let t=prompt(u(`users.detail.passwordPrompt`,{email:e.email}));if(t){if(t.length<8){H(u(`users.detail.passwordError`));return}J(!0),H(``);try{await m.setUserPassword(e.id,t),W(u(`users.detail.toasts.passwordChanged`,{name:e.name}))}catch(e){H(e instanceof Error?e.message:String(e))}finally{J(!1)}}},ne=async e=>{J(!0),H(``);try{await m.updateUser(e.id,{name:e.name,email:e.email,status:e.status}),W(u(`users.detail.toasts.saved`,{name:e.name})),K(null),await Y()}catch(e){H(e instanceof Error?e.message:String(e))}finally{J(!1)}},re=async e=>{if(confirm(u(`users.detail.confirmDelete`,{email:e.email}))){J(!0),H(``);try{await m.deleteUser(e.id),G()?.id===e.id&&K(null),W(u(`users.detail.toasts.deleted`,{name:e.name})),await Y()}catch(e){H(e instanceof Error?e.message:String(e))}finally{J(!1)}}},ie=e=>j().find(t=>t.slug===e.roles[0]);return(()=>{var e=p(C),t=e.firstChild,[r,m]=c(t.nextSibling),A=r.nextSibling,[M,P]=c(A.nextSibling),H=M.nextSibling,W=H.firstChild,[J,Z]=c(W.nextSibling),ae=J.nextSibling,[Q,oe]=c(ae.nextSibling),$=Q.nextSibling,se=$.nextSibling,[ce,le]=c(se.nextSibling),ue=H.nextSibling,[de,fe]=c(ue.nextSibling),pe=de.nextSibling,[me,he]=c(pe.nextSibling),ge=me.nextSibling,[_e,ve]=c(ge.nextSibling);return d(e,a(i,{get when(){return V()},get children(){var e=p(b);return d(e,V),e}}),r,m),d(e,a(i,{get when(){return U()},get children(){var e=p(x);return d(e,U),e}}),M,P),d(H,a(g,{name:`user-search`,get placeholder(){return u(`users.toolbar.search`)},get value(){return L()},onInput:e=>{R(e),X()}}),J,Z),d(H,a(v,{name:`user-status`,get placeholder(){return u(`users.toolbar.allStatus`)},get value(){return z()},get options(){return[{value:`ACTIVE`,label:u(`users.toolbar.active`)},{value:`INACTIVE`,label:u(`users.toolbar.inactive`)}]},onChange:e=>{B(e),X()}}),Q,oe),d($,()=>u(`users.toolbar.newBtn`)),d(H,a(_,{variant:`secondary`,onClick:()=>void X(),get children(){return u(`users.toolbar.searchBtn`)}}),ce,le),d(e,a(i,{get when(){return f().length>0},get fallback(){return(()=>{var e=p(w);return d(e,()=>u(`users.empty`)),e})()},get children(){var e=p(S),t=e.firstChild,r=t.firstChild.firstChild,o=r.nextSibling,l=o.nextSibling,m=l.nextSibling,h=m.nextSibling,g=t.nextSibling;return d(r,()=>u(`users.table.name`)),d(o,()=>u(`users.table.email`)),d(l,()=>u(`users.table.role`)),d(m,()=>u(`users.table.status`)),d(h,()=>u(`users.table.lastAccess`)),d(g,a(s,{get each(){return f()},children:e=>(()=>{var t=p(T),r=t.firstChild,o=r.nextSibling,s=o.nextSibling,l=s.nextSibling,f=l.firstChild,m=f.nextSibling,[h,g]=c(m.nextSibling),v=l.nextSibling,b=v.nextSibling,x=b.firstChild,[S,C]=c(x.nextSibling),w=S.nextSibling,[D,O]=c(w.nextSibling);return d(r,()=>e.name),d(o,()=>e.email),d(s,a(i,{get when(){return e.roles.length>0},get fallback(){return(()=>{var e=p(E);return d(e,()=>u(`users.noRole`)),e})()},get children(){return a(y,{get children(){return e.roles.join(`, `)}})}})),d(l,()=>u(`common.status.`+e.status.toLowerCase()),h,g),d(v,()=>k(e.last_login_at)),d(b,a(_,{variant:`secondary`,size:`sm`,onClick:()=>K(e),get children(){return u(`users.table.actions.manage`)}}),S,C),d(b,a(_,{variant:`danger`,size:`sm`,onClick:()=>void re(e),get children(){return u(`users.table.actions.delete`)}}),D,O),n(n=>{var r=G()?.id===e.id,i=e.status===`ACTIVE`;return r!==n.e&&t.classList.toggle(`users-table__row--selected`,n.e=r),i!==n.t&&f.classList.toggle(`status-dot--active`,n.t=i),n},{e:void 0,t:void 0}),t})()})),e}}),de,fe),d(e,a(h,{get page(){return F()},limit:20,get total(){return N()},onPageChange:e=>{I(e),Y()}}),me,he),d(e,a(i,{get when(){return G()},children:e=>(()=>{var t=p(D),r=t.firstChild,i=r.nextSibling,f=i.firstChild,m=f.firstChild,[h,g]=c(m.nextSibling),v=h.nextSibling,y=f.nextSibling,b=y.firstChild,[x,S]=c(b.nextSibling),C=x.nextSibling,w=y.nextSibling,T=w.firstChild,[E,A]=c(T.nextSibling),M=E.nextSibling,N=M.firstChild,P=N.nextSibling,F=w.nextSibling,I=F.firstChild,[L,R]=c(I.nextSibling),z=L.nextSibling,B=z.firstChild,V=B.nextSibling,[H,U]=c(V.nextSibling),W=i.nextSibling,G=W.nextSibling,J=G.firstChild,[Y,X]=c(J.nextSibling),re=Y.nextSibling,[Z,ae]=c(re.nextSibling),Q=Z.nextSibling,[oe,$]=c(Q.nextSibling);return d(r,()=>u(`users.detail.title`)),d(f,()=>u(`users.detail.fields.name`),h,g),v.$$input=t=>K({...e(),name:t.currentTarget.value}),d(y,()=>u(`users.detail.fields.email`),x,S),C.$$input=t=>K({...e(),email:t.currentTarget.value}),d(w,()=>u(`users.detail.fields.status`),E,A),M.addEventListener(`change`,t=>K({...e(),status:t.currentTarget.value})),d(N,()=>u(`users.detail.statusOptions.active`)),d(P,()=>u(`users.detail.statusOptions.inactive`)),d(F,()=>u(`users.detail.fields.role`),L,R),z.addEventListener(`change`,t=>void ee(e(),t.currentTarget.value)),d(B,()=>u(`users.detail.rolePlaceholder`)),d(z,a(s,{get each(){return j()},children:e=>(()=>{var t=p(O),r=t.firstChild,[i,a]=c(r.nextSibling),s=i.nextSibling.nextSibling,[l,u]=c(s.nextSibling);return l.nextSibling,d(t,()=>e.name,i,a),d(t,()=>e.slug,l,u),n(()=>o(t,`value`,e.id)),t})()}),H,U),d(W,()=>u(`users.detail.meta`,{created:k(e().created_at),lastAccess:k(e().last_login_at)})),d(G,a(_,{variant:`primary`,get disabled(){return q()},get loading(){return q()},onClick:()=>void ne(e()),get children(){return u(`users.detail.actions.save`)}}),Y,X),d(G,a(_,{variant:`secondary`,get disabled(){return q()},onClick:()=>void te(e()),get children(){return u(`users.detail.actions.resetPassword`)}}),Z,ae),d(G,a(_,{variant:`secondary`,onClick:()=>K(null),get children(){return u(`users.detail.actions.close`)}}),oe,$),n(()=>o(z,`disabled`,q())),n(()=>o(v,`value`,e().name)),n(()=>o(C,`value`,e().email)),n(()=>o(M,`value`,e().status)),n(()=>o(z,`value`,ie(e())?.id??``)),l(),t})()}),_e,ve),e})()}u([`input`]);export{A as UsersManager};
1
+ import{t as e}from"./i18n.RrM42yx5.js";import{C as t,S as n,T as r,_ as i,b as a,d as o,g as s,i as c,l,n as u,o as d,p as f,r as p}from"./web.D_vCtCLj.js";import{t as m}from"./api.DD5u5p4h.js";import{a as h,i as g,n as _,o as v,t as y}from"./src.B10HDgSa.js";var b=f(`<div class="notice notice--error">`),x=f(`<div class=notice>`),S=f(`<table class=users-table><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),C=f(`<div class=users-manager><!$><!/><!$><!/><div class=toolbar><!$><!/><!$><!/><a class="btn btn-primary"href=/users/new></a><!$><!/></div><!$><!/><!$><!/><!$><!/>`),w=f(`<p class=muted>`),T=f(`<tr><td></td><td class=muted></td><td></td><td><span class=status-dot></span><!$><!/></td><td class=muted></td><td class=users-table__actions><!$><!/><!$><!/>`),E=f(`<span class=muted>`),D=f(`<div class="card user-details"><h3></h3><div class=form-grid><label><!$><!/><input class=input></label><label><!$><!/><input class=input type=email></label><label><!$><!/><select class=input><option value=ACTIVE></option><option value=INACTIVE></option></select></label><label><!$><!/><select class=input><option value></option><!$><!/></select></label></div><p class=muted></p><div class=media-details__actions><!$><!/><!$><!/><!$><!/>`),O=f(`<option><!$><!/> (<!$><!/>)`);function k(e){if(!e)return`—`;let t=new Date(e);return Number.isNaN(t.getTime())?`—`:t.toLocaleString(`pt-BR`)}function A(){let{t:u}=e(),[f,A]=t([]),[j,M]=t([]),[N,P]=t(0),[F,I]=t(1),[L,R]=t(``),[z,B]=t(``),[V,H]=t(``),[U,W]=t(``),[G,K]=t(null),[q,J]=t(!1),Y=async()=>{try{let e=await m.listUsers({page:F(),limit:20,search:L()||void 0,status:z()||void 0});A(e.data??[]),P(e.total??0)}catch(e){H(e instanceof Error?e.message:String(e))}};r(async()=>{await Y();try{M(await m.listRoles())}catch{}});let X=async()=>{I(1),await Y()},ee=async(e,t)=>{if(t){J(!0),H(``);try{let n=await m.assignRole(e.id,t);K({...e,roles:n.roles}),W(u(`users.detail.toasts.roleUpdated`,{name:e.name})),await Y()}catch(e){H(e instanceof Error?e.message:String(e))}finally{J(!1)}}},te=async e=>{let t=prompt(u(`users.detail.passwordPrompt`,{email:e.email}));if(t){if(t.length<8){H(u(`users.detail.passwordError`));return}J(!0),H(``);try{await m.setUserPassword(e.id,t),W(u(`users.detail.toasts.passwordChanged`,{name:e.name}))}catch(e){H(e instanceof Error?e.message:String(e))}finally{J(!1)}}},ne=async e=>{J(!0),H(``);try{await m.updateUser(e.id,{name:e.name,email:e.email,status:e.status}),W(u(`users.detail.toasts.saved`,{name:e.name})),K(null),await Y()}catch(e){H(e instanceof Error?e.message:String(e))}finally{J(!1)}},re=async e=>{if(confirm(u(`users.detail.confirmDelete`,{email:e.email}))){J(!0),H(``);try{await m.deleteUser(e.id),G()?.id===e.id&&K(null),W(u(`users.detail.toasts.deleted`,{name:e.name})),await Y()}catch(e){H(e instanceof Error?e.message:String(e))}finally{J(!1)}}},ie=e=>j().find(t=>t.slug===e.roles[0]);return(()=>{var e=p(C),t=e.firstChild,[r,m]=c(t.nextSibling),A=r.nextSibling,[M,P]=c(A.nextSibling),H=M.nextSibling,W=H.firstChild,[J,Z]=c(W.nextSibling),ae=J.nextSibling,[Q,oe]=c(ae.nextSibling),$=Q.nextSibling,se=$.nextSibling,[ce,le]=c(se.nextSibling),ue=H.nextSibling,[de,fe]=c(ue.nextSibling),pe=de.nextSibling,[me,he]=c(pe.nextSibling),ge=me.nextSibling,[_e,ve]=c(ge.nextSibling);return d(e,a(i,{get when(){return V()},get children(){var e=p(b);return d(e,V),e}}),r,m),d(e,a(i,{get when(){return U()},get children(){var e=p(x);return d(e,U),e}}),M,P),d(H,a(g,{name:`user-search`,get placeholder(){return u(`users.toolbar.search`)},get value(){return L()},onInput:e=>{R(e),X()}}),J,Z),d(H,a(v,{name:`user-status`,get placeholder(){return u(`users.toolbar.allStatus`)},get value(){return z()},get options(){return[{value:`ACTIVE`,label:u(`users.toolbar.active`)},{value:`INACTIVE`,label:u(`users.toolbar.inactive`)}]},onChange:e=>{B(e),X()}}),Q,oe),d($,()=>u(`users.toolbar.newBtn`)),d(H,a(_,{variant:`secondary`,onClick:()=>void X(),get children(){return u(`users.toolbar.searchBtn`)}}),ce,le),d(e,a(i,{get when(){return f().length>0},get fallback(){return(()=>{var e=p(w);return d(e,()=>u(`users.empty`)),e})()},get children(){var e=p(S),t=e.firstChild,r=t.firstChild.firstChild,o=r.nextSibling,l=o.nextSibling,m=l.nextSibling,h=m.nextSibling,g=t.nextSibling;return d(r,()=>u(`users.table.name`)),d(o,()=>u(`users.table.email`)),d(l,()=>u(`users.table.role`)),d(m,()=>u(`users.table.status`)),d(h,()=>u(`users.table.lastAccess`)),d(g,a(s,{get each(){return f()},children:e=>(()=>{var t=p(T),r=t.firstChild,o=r.nextSibling,s=o.nextSibling,l=s.nextSibling,f=l.firstChild,m=f.nextSibling,[h,g]=c(m.nextSibling),v=l.nextSibling,b=v.nextSibling,x=b.firstChild,[S,C]=c(x.nextSibling),w=S.nextSibling,[D,O]=c(w.nextSibling);return d(r,()=>e.name),d(o,()=>e.email),d(s,a(i,{get when(){return e.roles.length>0},get fallback(){return(()=>{var e=p(E);return d(e,()=>u(`users.noRole`)),e})()},get children(){return a(y,{get children(){return e.roles.join(`, `)}})}})),d(l,()=>u(`common.status.`+e.status.toLowerCase()),h,g),d(v,()=>k(e.last_login_at)),d(b,a(_,{variant:`secondary`,size:`sm`,onClick:()=>K(e),get children(){return u(`users.table.actions.manage`)}}),S,C),d(b,a(_,{variant:`danger`,size:`sm`,onClick:()=>void re(e),get children(){return u(`users.table.actions.delete`)}}),D,O),n(n=>{var r=G()?.id===e.id,i=e.status===`ACTIVE`;return r!==n.e&&t.classList.toggle(`users-table__row--selected`,n.e=r),i!==n.t&&f.classList.toggle(`status-dot--active`,n.t=i),n},{e:void 0,t:void 0}),t})()})),e}}),de,fe),d(e,a(h,{get page(){return F()},limit:20,get total(){return N()},onPageChange:e=>{I(e),Y()}}),me,he),d(e,a(i,{get when(){return G()},children:e=>(()=>{var t=p(D),r=t.firstChild,i=r.nextSibling,f=i.firstChild,m=f.firstChild,[h,g]=c(m.nextSibling),v=h.nextSibling,y=f.nextSibling,b=y.firstChild,[x,S]=c(b.nextSibling),C=x.nextSibling,w=y.nextSibling,T=w.firstChild,[E,A]=c(T.nextSibling),M=E.nextSibling,N=M.firstChild,P=N.nextSibling,F=w.nextSibling,I=F.firstChild,[L,R]=c(I.nextSibling),z=L.nextSibling,B=z.firstChild,V=B.nextSibling,[H,U]=c(V.nextSibling),W=i.nextSibling,G=W.nextSibling,J=G.firstChild,[Y,X]=c(J.nextSibling),re=Y.nextSibling,[Z,ae]=c(re.nextSibling),Q=Z.nextSibling,[oe,$]=c(Q.nextSibling);return d(r,()=>u(`users.detail.title`)),d(f,()=>u(`users.detail.fields.name`),h,g),v.$$input=t=>K({...e(),name:t.currentTarget.value}),d(y,()=>u(`users.detail.fields.email`),x,S),C.$$input=t=>K({...e(),email:t.currentTarget.value}),d(w,()=>u(`users.detail.fields.status`),E,A),M.addEventListener(`change`,t=>K({...e(),status:t.currentTarget.value})),d(N,()=>u(`users.detail.statusOptions.active`)),d(P,()=>u(`users.detail.statusOptions.inactive`)),d(F,()=>u(`users.detail.fields.role`),L,R),z.addEventListener(`change`,t=>void ee(e(),t.currentTarget.value)),d(B,()=>u(`users.detail.rolePlaceholder`)),d(z,a(s,{get each(){return j()},children:e=>(()=>{var t=p(O),r=t.firstChild,[i,a]=c(r.nextSibling),s=i.nextSibling.nextSibling,[l,u]=c(s.nextSibling);return l.nextSibling,d(t,()=>e.name,i,a),d(t,()=>e.slug,l,u),n(()=>o(t,`value`,e.id)),t})()}),H,U),d(W,()=>u(`users.detail.meta`,{created:k(e().created_at),lastAccess:k(e().last_login_at)})),d(G,a(_,{variant:`primary`,get disabled(){return q()},get loading(){return q()},onClick:()=>void ne(e()),get children(){return u(`users.detail.actions.save`)}}),Y,X),d(G,a(_,{variant:`secondary`,get disabled(){return q()},onClick:()=>void te(e()),get children(){return u(`users.detail.actions.resetPassword`)}}),Z,ae),d(G,a(_,{variant:`secondary`,onClick:()=>K(null),get children(){return u(`users.detail.actions.close`)}}),oe,$),n(()=>o(z,`disabled`,q())),n(()=>o(v,`value`,e().name)),n(()=>o(C,`value`,e().email)),n(()=>o(M,`value`,e().status)),n(()=>o(z,`value`,ie(e())?.id??``)),l(),t})()}),_e,ve),e})()}u([`input`]);export{A as UsersManager};
@@ -0,0 +1 @@
1
+ function e(){if(typeof document<`u`){let e=document.querySelector(`meta[name="okcms-api-url"]`)?.getAttribute(`content`)?.trim();if(e)return e.replace(/\/$/,``)}return``}var t=e(),n=new class{baseUrl;csrfToken=null;refreshPromise=null;refreshOwner=typeof globalThis.crypto?.randomUUID==`function`?globalThis.crypto.randomUUID():Math.random().toString(36).slice(2);refreshLockKey=`okcms:auth:refresh-lock`;constructor(e=t){this.baseUrl=e}async init(){try{await this.ensureCsrfToken()}catch{}}async isLoggedIn(){try{return await this.request(`GET`,`/api/v1/auth/me`),!0}catch{return!1}}async getTenantId(){try{return(await this.request(`GET`,`/api/v1/auth/me`)).tenantId??null}catch{return null}}async getUserLocale(){try{return(await this.request(`GET`,`/api/v1/users/me/locale`)).locale??`pt-BR`}catch{return`pt-BR`}}async setUserLocale(e){await this.request(`PUT`,`/api/v1/users/me/locale`,{locale:e})}async getMe(){return this.request(`GET`,`/api/v1/auth/me`)}async getAuditLogs(e=8){return this.request(`GET`,`/api/v1/audit-logs?limit=${e}`)}async login(e){return await this.ensureCsrfToken(),await this.request(`POST`,`/api/v1/auth/login`,e)}async logout(){await this.request(`POST`,`/api/v1/auth/logout`,{}),this.csrfToken=null}async refreshTokens(){return this.refreshPromise||=this.refreshWithCrossTabLock().finally(()=>{this.refreshPromise=null}),this.refreshPromise}async refreshWithCrossTabLock(){if(typeof window>`u`||typeof localStorage>`u`){await this.request(`POST`,`/api/v1/auth/refresh`,{},void 0,{skipRefresh:!0});return}let e=Date.now(),t;try{t=JSON.parse(localStorage.getItem(this.refreshLockKey)??`null`)}catch{await this.request(`POST`,`/api/v1/auth/refresh`,{},void 0,{skipRefresh:!0});return}if(t?.owner&&t.owner!==this.refreshOwner&&Number(t.expiresAt)>e){await this.waitForOtherTabRefresh(Number(t.expiresAt));return}try{localStorage.setItem(this.refreshLockKey,JSON.stringify({owner:this.refreshOwner,expiresAt:e+1e4}))}catch{await this.request(`POST`,`/api/v1/auth/refresh`,{},void 0,{skipRefresh:!0});return}try{await this.request(`POST`,`/api/v1/auth/refresh`,{},void 0,{skipRefresh:!0})}finally{try{JSON.parse(localStorage.getItem(this.refreshLockKey)??`null`)?.owner===this.refreshOwner&&localStorage.removeItem(this.refreshLockKey)}catch{}}}async waitForOtherTabRefresh(e){for(;Date.now()<Math.min(e,Date.now()+1e4);){await new Promise(e=>setTimeout(e,100));try{let e=JSON.parse(localStorage.getItem(this.refreshLockKey)??`null`);if(!e||Number(e.expiresAt)<=Date.now())return}catch{return}}}async request(e,t,n,r,i){let a=`${this.baseUrl}${t}`,o=async()=>{let t={"Content-Type":`application/json`,...r};if(![`GET`,`HEAD`,`OPTIONS`].includes(e.toUpperCase())){let e=await this.ensureCsrfToken();e&&(t[`x-csrf-token`]=e)}return fetch(a,{method:e,headers:t,credentials:`include`,body:n?JSON.stringify(n):void 0})},s=await o();if(s.status===401&&!i?.skipRefresh&&!t.includes(`/auth/refresh`)&&!t.includes(`/auth/logout`)&&(await this.refreshTokens(),s=await o()),s.status===403&&!i?.skipCsrfRecovery){let e=``;try{e=(await(typeof s.clone==`function`?s.clone():s).json()).error??``}catch{}e===`CSRF_TOKEN_INVALID`&&(await this.ensureCsrfToken(!0),s=await o())}if(!s.ok){let e=await s.json().catch(()=>({error:`Request failed`}));throw Error(e.error??`Request failed: ${s.status}`)}return s.json()}async ensureCsrfToken(e=!1){let t=this.readCsrfCookie();if(!e&&t)return this.csrfToken=t,t;if(!e&&this.csrfToken)return this.csrfToken;try{let e=await fetch(`${this.baseUrl}/api/v1/auth/csrf`,{credentials:`include`,headers:{Accept:`application/json`}});if(!e.ok)return this.csrfToken;let t=await e.json();this.csrfToken=t.csrfToken??this.readCsrfCookie()}catch{}return this.csrfToken}readCsrfCookie(){if(typeof document<`u`){let e=document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/);if(e?.[1])return e[1]}return this.csrfToken}async getContent(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.type&&t.set(`type`,e.type),e?.status&&t.set(`status`,e.status),e?.search&&t.set(`search`,e.search),this.request(`GET`,`/api/v1/content?${t.toString()}`)}async getContentById(e){return this.request(`GET`,`/api/v1/content/${e}`)}async createContent(e){return this.request(`POST`,`/api/v1/content`,e)}async updateContent(e,t){return this.request(`PUT`,`/api/v1/content/${e}`,t)}async deleteContent(e){await this.request(`DELETE`,`/api/v1/content/${e}`)}async publishContent(e){let t=await this.request(`POST`,`/api/v1/content/${e}/publish`);return`content`in t?t.content:t}async unpublishContent(e){let t=await this.request(`POST`,`/api/v1/content/${e}/unpublish`);return`content`in t?t.content:t}async publishToggle(e,t){return t?this.unpublishContent(e):this.publishContent(e)}async getContentTypes(){return this.request(`GET`,`/api/v1/content-types`)}async createContentType(e){return this.request(`POST`,`/api/v1/content-types`,e)}async updateContentType(e,t){return this.request(`PUT`,`/api/v1/content-types/${e}`,t)}async deleteContentType(e){await this.request(`DELETE`,`/api/v1/content-types/${e}`)}async getTaxonomies(){return this.request(`GET`,`/api/v1/taxonomies`)}async createTaxonomy(e){return this.request(`POST`,`/api/v1/taxonomies`,e)}async attachTaxonomy(e,t){await this.request(`POST`,`/api/v1/taxonomies/${e}/attach`,{contentType:t})}async detachTaxonomy(e,t){await this.request(`POST`,`/api/v1/taxonomies/${e}/detach`,{contentType:t})}async deleteTaxonomy(e){await this.request(`DELETE`,`/api/v1/taxonomies/${e}`)}async getTaxonomyTerms(e){return this.request(`GET`,`/api/v1/taxonomies/${encodeURIComponent(e)}/terms`)}async createTaxonomyTerm(e,t){return this.request(`POST`,`/api/v1/taxonomies/${encodeURIComponent(e)}/terms`,t)}async updateTaxonomyTerm(e,t,n){return this.request(`PUT`,`/api/v1/taxonomies/${encodeURIComponent(e)}/terms/${t}`,n)}async deleteTaxonomyTerm(e,t){await this.request(`DELETE`,`/api/v1/taxonomies/${encodeURIComponent(e)}/terms/${t}`)}async getCategories(){return this.request(`GET`,`/api/v1/categories`)}async createCategory(e){return this.request(`POST`,`/api/v1/categories`,e)}async updateCategory(e,t){return this.request(`PUT`,`/api/v1/categories/${e}`,t)}async deleteCategory(e){await this.request(`DELETE`,`/api/v1/categories/${e}`)}async getTags(){return this.request(`GET`,`/api/v1/tags`)}async createTag(e){return this.request(`POST`,`/api/v1/tags`,e)}async updateTag(e,t){return this.request(`PUT`,`/api/v1/tags/${e}`,t)}async deleteTag(e){await this.request(`DELETE`,`/api/v1/tags/${e}`)}async getMenus(){return this.request(`GET`,`/api/v1/menus`)}async createMenu(e){return this.request(`POST`,`/api/v1/menus`,e)}async updateMenu(e,t){return this.request(`PUT`,`/api/v1/menus/${e}`,t)}async deleteMenu(e){await this.request(`DELETE`,`/api/v1/menus/${e}`)}async getFieldGroups(e){if(e?.type){let t=new URLSearchParams({type:e.type});for(let[n,r]of Object.entries(e))n!==`type`&&r&&t.set(n,r);return this.request(`GET`,`/api/v1/field-groups?${t.toString()}`)}return this.request(`GET`,`/api/v1/field-groups`)}async getFieldGroup(e){return this.request(`GET`,`/api/v1/field-groups/${e}`)}async createFieldGroup(e){return this.request(`POST`,`/api/v1/field-groups`,e)}async updateFieldGroup(e,t){return this.request(`PUT`,`/api/v1/field-groups/${e}`,t)}async deleteFieldGroup(e){await this.request(`DELETE`,`/api/v1/field-groups/${e}`)}async getFieldTypes(e){let t=e?`?category=${encodeURIComponent(e)}`:``;return this.request(`GET`,`/api/v1/field-types${t}`)}async getWebhooks(){return this.request(`GET`,`/api/v1/webhooks`)}async createWebhook(e){return this.request(`POST`,`/api/v1/webhooks`,e)}async updateWebhook(e,t){return this.request(`PUT`,`/api/v1/webhooks/${e}`,t)}async deleteWebhook(e){await this.request(`DELETE`,`/api/v1/webhooks/${e}`)}async getBuilds(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.status&&t.set(`status`,e.status),this.request(`GET`,`/api/v1/builds?${t.toString()}`)}async createBuild(e){return this.request(`POST`,`/api/v1/builds`,e)}async getDeployments(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.status&&t.set(`status`,e.status),this.request(`GET`,`/api/v1/deployments?${t.toString()}`)}async createDeployment(e){return this.request(`POST`,`/api/v1/deployments`,e)}async rollbackDeployment(e,t){return this.request(`POST`,`/api/v1/deployments/${e}/rollback`,{rollbackToId:t})}async getEvents(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.type&&t.set(`type`,e.type),this.request(`GET`,`/api/v1/events?${t.toString()}`)}async listMedia(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.mimeType&&t.set(`mimeType`,e.mimeType),e?.search&&t.set(`search`,e.search),this.request(`GET`,`/api/v1/media?${t.toString()}`)}async getMedia(e){return this.request(`GET`,`/api/v1/media/${e}`)}async uploadMedia(e,t){let n=new FormData;n.append(`file`,e),t?.alt&&n.append(`alt`,t.alt),t?.caption&&n.append(`caption`,t.caption);let r=`${this.baseUrl}/api/v1/media/upload`,i=async()=>{let e=await this.ensureCsrfToken(),t={};return e&&(t[`x-csrf-token`]=e),fetch(r,{method:`POST`,headers:t,credentials:`include`,body:n})},a=await i();if(a.status===401&&(await this.refreshTokens(),a=await i()),a.status===403){let e=``;try{e=(await a.clone().json()).error??``}catch{}e===`CSRF_TOKEN_INVALID`&&(await this.ensureCsrfToken(!0),a=await i())}if(!a.ok){let e=await a.json().catch(()=>({error:`Upload failed: ${a.status}`}));throw Error(e.error??`Upload failed: ${a.status}`)}return a.json()}async updateMedia(e,t){return this.request(`PUT`,`/api/v1/media/${e}`,t)}async deleteMedia(e){await this.request(`DELETE`,`/api/v1/media/${e}`)}async listUsers(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.search&&t.set(`search`,e.search),e?.status&&t.set(`status`,e.status),this.request(`GET`,`/api/v1/users?${t.toString()}`)}async getUser(e){return this.request(`GET`,`/api/v1/users/${e}`)}async createUser(e){return this.request(`POST`,`/api/v1/users`,e)}async updateUser(e,t){return this.request(`PUT`,`/api/v1/users/${e}`,t)}async deleteUser(e){await this.request(`DELETE`,`/api/v1/users/${e}`)}async setUserPassword(e,t){await this.request(`PUT`,`/api/v1/users/${e}/password`,{password:t})}async assignRole(e,t){return this.request(`POST`,`/api/v1/users/${e}/roles`,{roleId:t})}async removeRole(e,t){return this.request(`DELETE`,`/api/v1/users/${e}/roles/${t}`)}async listRoles(){return this.request(`GET`,`/api/v1/roles`)}async createRole(e){return this.request(`POST`,`/api/v1/roles`,e)}async updateRole(e,t){return this.request(`PUT`,`/api/v1/roles/${e}`,t)}async deleteRole(e){await this.request(`DELETE`,`/api/v1/roles/${e}`)}async listTenants(e){let t=new URLSearchParams;return e?.page&&t.set(`page`,String(e.page)),e?.limit&&t.set(`limit`,String(e.limit)),e?.search&&t.set(`search`,e.search),this.request(`GET`,`/api/v1/tenants?${t.toString()}`)}async createTenant(e){return this.request(`POST`,`/api/v1/tenants`,e)}async updateTenant(e,t){return this.request(`PUT`,`/api/v1/tenants/${e}`,t)}async deleteTenant(e){await this.request(`DELETE`,`/api/v1/tenants/${e}`)}async getSettings(e){let t=e?`?group=${encodeURIComponent(e)}`:``;return this.request(`GET`,`/api/v1/settings${t}`)}async updateSettings(e){await this.request(`PUT`,`/api/v1/settings`,e)}async healthCheck(){return this.request(`GET`,`/health`)}async getThemes(){return(await this.request(`GET`,`/api/v1/themes`)).map(e=>({id:String(e.id??``),name:String(e.name??``),version:e.version?String(e.version):void 0,status:String(e.status??`INSTALLED`),manifest:e.manifest??null}))}async activateTheme(e){return this.request(`POST`,`/api/v1/themes/${e}/activate`)}async deactivateTheme(e){return this.request(`POST`,`/api/v1/themes/${e}/deactivate`)}async installTheme(e){return this.request(`POST`,`/api/v1/themes/install`,e)}async uninstallTheme(e){await this.request(`DELETE`,`/api/v1/themes/${e}`)}async getPlugins(){return(await this.request(`GET`,`/api/v1/plugins`)).map(e=>({id:String(e.id??``),name:String(e.name??``),version:String(e.version??``),status:String(e.status??`INSTALLED`),manifest:e.manifest??null}))}async activatePlugin(e){return this.request(`POST`,`/api/v1/plugins/${e}/activate`)}async deactivatePlugin(e){return this.request(`POST`,`/api/v1/plugins/${e}/deactivate`)}async installPlugin(e){return this.request(`POST`,`/api/v1/plugins/install`,e)}async uninstallPlugin(e){await this.request(`DELETE`,`/api/v1/plugins/${e}`)}};export{n as t};
@@ -1 +1 @@
1
- import{C as e,S as t,T as n,_ as r,b as i,g as a,i as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./web.D_vCtCLj.js";import{t as m}from"./api.BfxYC8bU.js";import"./src.HVGUo-fm.js";var h=l(`<a class=sidebar__link><!$><!/> <!$><!/>`),g=l(`<span aria-hidden=true>`);function _(e){let n=()=>e.extensions.menuPages.filter(t=>e.can(t.capability??`read`));return i(a,{get each(){return n()},children:e=>(()=>{var n=u(h),r=n.firstChild,[i,a]=o(r.nextSibling),s=i.nextSibling.nextSibling,[l,f]=o(s.nextSibling);return c(n,(()=>{var t=d(()=>!!e.icon);return()=>t()?(()=>{var t=u(g);return c(t,()=>e.icon),t})():null})(),i,a),c(n,()=>e.label,l,f),t(()=>p(n,`href`,`/plugins/${e.slug}`)),n})()})}s([`click`]);var v=l(`<div class=sidebar-plugins data-extensions=sidebar><!$><!/><!$><!/>`),y=l(`<div><span>`);function b(){return{menuPages:[],submenuPages:[],dashboardWidgets:[],metaBoxes:[],notices:[],columns:{},columnRenderers:{},actionLinks:[]}}function x(e){let t=b();for(let n of e){if(n.status!==`ACTIVE`&&n.status!==`ACTIVATED`)continue;let e=n.manifest?.admin;if(!e)continue;let r=n.slug??n.name;t.menuPages.push(...e.menuPages?.map(e=>({...e,slug:e.slug.startsWith(`${r}/`)?e.slug:`${r}/${e.slug}`}))??[]),t.dashboardWidgets.push(...e.dashboardWidgets?.map(e=>({...e,id:e.id.includes(`:`)?e.id:`${r}:${e.id}`,componentId:e.componentId.includes(`:`)?e.componentId:`${r}:${e.componentId}`}))??[]),t.notices.push(...e.notices?.map(e=>({...e,id:e.id.includes(`:`)?e.id:`${r}:${e.id}`}))??[])}return t}function S(){let[s,l]=e(b());n(async()=>{try{let e=await m.getPlugins();l(x(e))}catch{}});let d=()=>!0;return i(r,{get when(){return s().menuPages.length>0},get children(){var e=u(v),n=e.firstChild,[r,l]=o(n.nextSibling),m=r.nextSibling,[h,g]=o(m.nextSibling);return c(e,i(a,{get each(){return s().notices},children:e=>(()=>{var n=u(y),r=n.firstChild;return c(r,()=>e.message),t(t=>{var r=`notice notice--${e.level}`,i=e.id.split(`:`)[0];return r!==t.e&&f(n,t.e=r),i!==t.t&&p(n,`data-plugin`,t.t=i),t},{e:void 0,t:void 0}),n})()}),r,l),c(e,i(_,{get extensions(){return s()},can:d}),h,g),e}})}export{S as PluginExtensionsSlot,b as emptyExtensionsState,x as extensionsFromPlugins};
1
+ import{C as e,S as t,T as n,_ as r,b as i,g as a,i as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./web.D_vCtCLj.js";import{t as m}from"./api.DD5u5p4h.js";import"./src.B10HDgSa.js";var h=l(`<a class=sidebar__link><!$><!/> <!$><!/>`),g=l(`<span aria-hidden=true>`);function _(e){let n=()=>e.extensions.menuPages.filter(t=>e.can(t.capability??`read`));return i(a,{get each(){return n()},children:e=>(()=>{var n=u(h),r=n.firstChild,[i,a]=o(r.nextSibling),s=i.nextSibling.nextSibling,[l,f]=o(s.nextSibling);return c(n,(()=>{var t=d(()=>!!e.icon);return()=>t()?(()=>{var t=u(g);return c(t,()=>e.icon),t})():null})(),i,a),c(n,()=>e.label,l,f),t(()=>p(n,`href`,`/plugins/${e.slug}`)),n})()})}s([`click`]);var v=l(`<div class=sidebar-plugins data-extensions=sidebar><!$><!/><!$><!/>`),y=l(`<div><span>`);function b(){return{menuPages:[],submenuPages:[],dashboardWidgets:[],metaBoxes:[],notices:[],columns:{},columnRenderers:{},actionLinks:[]}}function x(e){let t=b();for(let n of e){if(n.status!==`ACTIVE`&&n.status!==`ACTIVATED`)continue;let e=n.manifest?.admin;if(!e)continue;let r=n.slug??n.name;t.menuPages.push(...e.menuPages?.map(e=>({...e,slug:e.slug.startsWith(`${r}/`)?e.slug:`${r}/${e.slug}`}))??[]),t.dashboardWidgets.push(...e.dashboardWidgets?.map(e=>({...e,id:e.id.includes(`:`)?e.id:`${r}:${e.id}`,componentId:e.componentId.includes(`:`)?e.componentId:`${r}:${e.componentId}`}))??[]),t.notices.push(...e.notices?.map(e=>({...e,id:e.id.includes(`:`)?e.id:`${r}:${e.id}`}))??[])}return t}function S(){let[s,l]=e(b());n(async()=>{try{let e=await m.getPlugins();l(x(e))}catch{}});let d=()=>!0;return i(r,{get when(){return s().menuPages.length>0},get children(){var e=u(v),n=e.firstChild,[r,l]=o(n.nextSibling),m=r.nextSibling,[h,g]=o(m.nextSibling);return c(e,i(a,{get each(){return s().notices},children:e=>(()=>{var n=u(y),r=n.firstChild;return c(r,()=>e.message),t(t=>{var r=`notice notice--${e.level}`,i=e.id.split(`:`)[0];return r!==t.e&&f(n,t.e=r),i!==t.t&&p(n,`data-plugin`,t.t=i),t},{e:void 0,t:void 0}),n})()}),r,l),c(e,i(_,{get extensions(){return s()},can:d}),h,g),e}})}export{S as PluginExtensionsSlot,b as emptyExtensionsState,x as extensionsFromPlugins};
@@ -1 +1 @@
1
- import{C as e,T as t}from"./web.D_vCtCLj.js";import{t as n}from"./api.BfxYC8bU.js";var r=Object.defineProperty,i=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),a=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:`Module`}),n},o=[`pt-BR`,`en`,`es-ES`,`ru`,`uk`,`tr`,`he`,`it`,`pl`,`zh-CN`,`ja`,`ar`,`sw`,`yo`,`zu`,`am`,`ha`,`ig`],s={"pt-BR":`Português (Brasil)`,en:`English`,"es-ES":`Español`,ru:`Русский`,uk:`Українська`,tr:`Türkçe`,he:`עברית`,it:`Italiano`,pl:`Polski`,"zh-CN":`中文 (简体)`,ja:`日本語`,ar:`العربية`,sw:`Kiswahili`,yo:`Yorùbá`,zu:`isiZulu`,am:`አማርኛ`,ha:`Hausa`,ig:`Igbo`},c={"pt-BR":`🇧🇷`,en:`🇺🇸`,"es-ES":`🇪🇸`,ru:`🇷🇺`,uk:`🇺🇦`,tr:`🇹🇷`,he:`🇮🇱`,it:`🇮🇹`,pl:`🇵🇱`,"zh-CN":`🇨🇳`,ja:`🇯🇵`,ar:`🇸🇦`,sw:`🇹🇿`,yo:`🇳🇬`,zu:`🇿🇦`,am:`🇪🇹`,ha:`🇳🇬`,ig:`🇳🇬`},l=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},u=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),d=function(e){return`/`+e},f={},ee=function(e){return e.pathname.endsWith(`.css`)},p=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=d(t,n);let r=s(t);if(r.href in f)return;f[r.href]=!0;let i=ee(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:u,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},m=new Map;async function h(e){if(m.has(e))return m.get(e);try{let t=await l(Object.assign({"./locales/ar.json":()=>p(()=>import(`./ar.DsV0P0EN.js`),[]),"./locales/en.json":()=>p(()=>Promise.resolve().then(()=>te),void 0),"./locales/es-ES.json":()=>p(()=>import(`./es-ES.etPSaiLd.js`),[]),"./locales/he.json":()=>p(()=>import(`./he.U1Vtp3zT.js`),[]),"./locales/it.json":()=>p(()=>import(`./it.DJuI8oO_.js`),[]),"./locales/ja.json":()=>p(()=>import(`./ja.Cw8I_NUV.js`),[]),"./locales/pl.json":()=>p(()=>import(`./pl.Dsz-4G_z.js`),[]),"./locales/pt-BR.json":()=>p(()=>import(`./pt-BR.CyQAHnXs.js`),[]),"./locales/ru.json":()=>p(()=>import(`./ru.CwIIcTdy.js`),[]),"./locales/sw.json":()=>p(()=>import(`./sw.DwpL3sb6.js`),[]),"./locales/tr.json":()=>p(()=>import(`./tr.CY2JWJ7Y.js`),[]),"./locales/uk.json":()=>p(()=>import(`./uk.BudEWIU8.js`),[]),"./locales/yo.json":()=>p(()=>import(`./yo.BmoZs0fO.js`),[]),"./locales/zh-CN.json":()=>p(()=>import(`./zh-CN.khaXV6fv.js`),[])}),`./locales/${e}.json`,3),n=t.default??t;return m.set(e,n),n}catch{return e===`en`?{}:h(`en`)}}var g=`admin_locale`;function _(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(?:^|; )${g}=([^;]+)`));return e?.[1]&&o.includes(e[1])?e[1]:null}function v(e){typeof document<`u`&&(document.cookie=`${g}=${e}; path=/; max-age=31536000; SameSite=Lax`)}function y(){if(typeof navigator>`u`)return`en`;let e=navigator.language?.split(`-`)[0]?.toLowerCase(),t=navigator.language?.toLowerCase();for(let n of o)if(n.toLowerCase()===t||n.split(`-`)[0]===e)return n;return`en`}async function b(){try{let e=await n.getUserLocale();if(e&&o.includes(e))return e}catch{}return null}async function x(e){await n.setUserLocale(e)}async function S(){return _()||await b()||y()||`en`}async function C(e){v(e);try{await x(e)}catch{}}var te=a({access:()=>j,activity:()=>L,adminBar:()=>R,common:()=>I,content:()=>E,dashboard:()=>T,default:()=>H,footer:()=>z,helpTabs:()=>B,layout:()=>w,login:()=>F,media:()=>D,operations:()=>M,plugins:()=>N,resources:()=>A,screenOptions:()=>V,settings:()=>k,themes:()=>P,users:()=>O}),w={appName:`OkCMS`,admin:`Admin`,nav:{dashboard:`Dashboard`,content:`Content`,media:`Media`,users:`Users`,settings:`Settings`,plugins:`Plugins`,themes:`Themes`},actions:{logout:`Logout`,newPost:`New Post`,uploadMedia:`Upload Media`,addUser:`Add User`,openSettings:`Settings`}},T={title:`Dashboard`,stats:{totalContent:`Total Content`,published:`Published`,drafts:`Drafts`,mediaFiles:`Media Files`,users:`Users`},recent:{title:`Recent Content`,viewAll:`View All`,empty:`No content yet — create your first!`,columns:{title:`Title`,type:`Type`,status:`Status`,updated:`Updated`}},widgets:{atGlance:`At a Glance`,posts:`Posts`,postsDesc:`Published / Drafts / Trash`,pages:`Pages`,pagesDesc:`Published / Drafts / Trash`,media:`Media`,mediaDesc:`Files in the library`,users:`Users`,usersDesc:`Total / Active / Inactive`,version:`Version`,storage:`Storage`,quickDraft:{title:`Quick Draft`,heading:`Title`,headingPlaceholder:`Give your draft a title`,content:`Content`,contentPlaceholder:`What's on your mind?`,save:`Save Draft`,yourDrafts:`Your Drafts`,noDrafts:`No drafts yet.`},activity:{title:`Activity`,empty:`No activity yet.`}}},E={list:{title:`Content`,description:`Search, filter, edit and publish your content.`,columns:{title:`Title`,type:`Type`,status:`Status`,updated:`Updated`},actions:{edit:`Edit`,publish:`Publish`,unpublish:`Unpublish`,delete:`Delete`},filters:{search:`Search content…`,allTypes:`All types`,allStatus:`All status`},buttons:{new:`+ New content`,search:`Search`},empty:`No content found.`,statuses:{draft:`Draft`,published:`Published`,archived:`Archived`},confirmDelete:`Delete "{title}"?`,toasts:{published:`Content published ✓`,unpublished:`Content unpublished ✓`}},editor:{type:`Type`,title:`Title`,slug:`Slug`,excerpt:`Excerpt`,featuredImage:`Featured Image (media ID)`,status:`Status`,statusOptions:{draft:`Draft`,published:`Published`,archived:`Archived`},layout:`Layout`,layoutAuto:`Automatic (theme hierarchy)`,customFields:`Custom Fields`,inspectTypes:`Inspect available types`,save:`Save`,saved:`Content saved successfully.`}},D={title:`Media Library`,description:"Upload and manage images, videos and documents. Files are stored in `uploads/` and served publicly.",upload:{dropzone:`Drop files here or`,select:`Select files`,uploading:`Uploading…`,hint:`Images, videos, audio and documents · up to 25MB per file`},toolbar:{search:`Search by name or alt…`,allTypes:`All types`,searchBtn:`Search`},mimeTypes:{png:`PNG`,jpeg:`JPEG`,gif:`GIF`,webp:`WebP`,svg:`SVG`,pdf:`PDF`,mp4:`MP4`,mp3:`MP3`},empty:`No files yet. Upload the first one!`,details:{title:`Details`,file:`File`,type:`Type`,size:`Size`,url:`URL`,copy:`Copy`,alt:`Alt text`,caption:`Caption`,save:`Save details`,delete:`Delete`,close:`Close`,confirmDelete:`Delete "{filename}"? The file will be removed from disk.`,saved:`Details saved ✓`,copied:`URL copied ✓`,copyError:`Could not copy URL`},toasts:{uploaded:`{count} file(s) uploaded ✓`}},O={title:`Users`,description:`Manage accounts, roles and project access.`,new:`New User`,toolbar:{search:`Search by name or email…`,allStatus:`All status`,active:`Active`,inactive:`Inactive`,newBtn:`+ New user`,searchBtn:`Search`},table:{name:`Name`,email:`Email`,role:`Role`,status:`Status`,lastAccess:`Last access`,actions:{manage:`Manage`,delete:`Delete`}},empty:`No users found.`,noRole:`No role`,detail:{title:`Manage user`,fields:{name:`Name`,email:`Email`,status:`Status`,role:`Role`,password:`Password`},statusOptions:{active:`Active`,inactive:`Inactive`},rolePlaceholder:`— no role —`,meta:`Created on {created} · last access {lastAccess}`,actions:{save:`Save`,resetPassword:`Reset password`,close:`Close`},passwordPrompt:`New password for {email} (minimum 8 chars):`,passwordError:`Password must be at least 8 characters`,toasts:{roleUpdated:`Role for {name} updated ✓`,passwordChanged:`Password for {name} changed ✓`,saved:`User {name} saved ✓`,deleted:`User {name} deleted ✓`},confirmDelete:`Delete user {email}?`}},k={general:{title:`General`,description:`Basic information displayed on the site.`,back:`← All settings`,fields:{siteTitle:`Site Title`,siteTitlePlaceholder:`My Site`,siteDescription:`Description`,siteDescriptionPlaceholder:`A new site built with OkCMS`,language:`Language`,timezone:`Timezone`,timezonePlaceholder:`America/Sao_Paulo`},saved:`Settings saved ✓`,loading:`Loading…`,save:`Save`},postTypes:{title:`Content Types`,description:`Create custom content types (CPTs) beyond Posts and Pages.`,form:{title:`Create Content Type`,slug:`Slug (singular, e.g.: portfolio)`,slugHint:`Only lowercase letters, numbers and underscore`,singular:`Singular name`,plural:`Plural name`,supports:`Supports`,supportsOptions:{title:`Title`,editor:`Editor`,thumbnail:`Featured Image`,excerpt:`Excerpt`,revisions:`Revisions`},hasArchive:`Has public archive (/slug)`,create:`Create`},table:{slug:`Slug`,singular:`Singular`,plural:`Plural`,source:`Source`,supports:`Supports`,archive:`Archive`,actions:{remove:`Remove`}},sources:{admin:`Admin`,core:`Core`}},taxonomies:{title:`Taxonomies`,description:`Create custom taxonomies and link them to content types.`,form:{title:`Create Taxonomy`,name:`Name (e.g.: Genre)`,slug:`Slug (optional, generated from name)`,slugHint:`Only lowercase letters, numbers and underscore`,hierarchical:`Hierarchical (allows parent/child terms)`,attachTo:`Link to content types`,create:`Create`},table:{taxonomy:`Taxonomy`,hierarchical:`Hierarchical`,attachedTypes:`Linked content types`,actions:{remove:`Remove`}}},customFields:{title:`Custom Fields`,description:`Create field groups, arrange fields and choose which standard fields are visible for each content type.`,contentType:`Content type`,location:{title:`Location rules`,description:`Choose where this field group appears. Rules in the same group use AND; groups use OR.`,parameter:`Location parameter`,operator:`Operator`,chooseValue:`Choose a value`,valuePlaceholder:`Enter a value or slug`,required:`Add a value to every location rule.`,addRule:`Add condition`,addGroup:`Add OR group`,remove:`Remove`,and:`AND`,or:`OR`,params:{content_type:`Post type`,content_slug:`Post slug`,taxonomy:`Taxonomy`,term:`Term slug`,user_role:`User role`,page_template:`Page template`,post_status:`Post status`},operators:{eq:`is`,neq:`is not`}},standard:{title:`Standard fields`,description:`Title and slug are required. The other standard fields can be enabled or disabled.`,enabled:`Enabled`,locked:`Required`,fields:{title:`Title`,slug:`Slug`,content:`Content`,excerpt:`Excerpt`,featured_image:`Featured image`,seo_title:`SEO title`,seo_description:`SEO description`,status:`Status`,author:`Author`}},groups:{title:`Field groups`,new:`New field group`,empty:`No custom field groups yet.`,fields:`fields`,edit:`Edit`,active:`Active`,inactive:`Inactive`},form:{createTitle:`Create field group`,editTitle:`Edit field group`,title:`Group name`,titlePlaceholder:`Example: Product details`,position:`Position`,positions:{normal:`Normal`,side:`Sidebar`,acf_after_title:`After title`},displayStyle:`Display style`,displayStyles:{standard:`Standard`,seamless:`Seamless`,grouped:`Grouped`},field:`Field`,fieldName:`Name/key`,fieldNamePlaceholder:`product_code`,fieldLabel:`Label`,fieldLabelPlaceholder:`Product code`,fieldType:`Type`,instructions:`Instructions`,instructionsPlaceholder:`Optional help text for editors`,required:`Required`,options:`Options`,optionsHint:`One option per line: value|Label`,addField:`Add field`,removeField:`Remove`,dragHint:`Drag to reorder`,save:`Save group`,cancel:`Cancel`,newFieldDefault:`New field`,saved:`Field group saved.`,deleted:`Field group deleted.`},actions:{delete:`Delete`,confirmDelete:`Delete this field group?`},loading:`Loading custom fields…`,loadError:`Could not load custom fields.`}},A={title:`Content Resources`,description:`Description`,tabs:{category:`Categories`,tag:`Tags`,menu:`Menus`},new:`New resource`,name:`Name`,slug:`Slug`,items:`Menu items (JSON)`,saved:`Resource saved.`,confirmDelete:`Delete this resource?`,form:{new:`Create resource`,edit:`Edit resource`},terms:{title:`Taxonomy terms`,choose:`Choose a taxonomy`,new:`New term`}},j={title:`Access`,description:`Manage roles, permissions and tenants.`,roles:`Roles`,tenants:`Tenants`,permissions:`Permissions (comma separated)`,domain:`Domain`},M={title:`Operations`,description:`Manage webhooks, builds, deployments and events.`,webhooks:`Webhooks`,events:`Events`,secret:`Secret`,builds:`Builds`,deployments:`Deployments`,createBuild:`Create build`,deploy:`Deploy`},N={title:`Plugins`,description:`Manage installed plugins.`,columns:{name:`Name`,version:`Version`,status:`Status`,actions:`Actions`},status:{active:`Active`,installed:`Installed`,inactive:`Inactive`},activate:`Activate`,deactivate:`Deactivate`,install:`Install plugin`,uninstall:`Uninstall`,confirmUninstall:`Uninstall {name}?`,name:`Plugin name`,version:`Version`,manifest:`Manifest (JSON)`,loadError:`Could not load plugins.`,activateError:`Could not activate the plugin.`,deactivateError:`Could not deactivate the plugin.`,installError:`Could not install the plugin.`,uninstallError:`Could not uninstall the plugin.`,empty:`No plugins installed.`},P={title:`Themes`,description:`Manage installed themes.`,version:`Version`,active:`Active`,status:{active:`Active`,installed:`Installed`,inactive:`Inactive`},activate:`Activate`,deactivate:`Deactivate`,install:`Install theme`,uninstall:`Uninstall`,confirmUninstall:`Uninstall {name}?`,name:`Theme name`,manifest:`Manifest (JSON)`,loadError:`Could not load themes.`,activateError:`Could not activate the theme.`,deactivateError:`Could not deactivate the theme.`,installError:`Could not install the theme.`,uninstallError:`Could not uninstall the theme.`,empty:`No themes installed.`},F={title:`Login`,subtitle:`Sign in to your account`,email:`Email`,password:`Password`,submit:`Sign In`,failed:`Invalid email or password`},I={save:`Save`,cancel:`Cancel`,delete:`Delete`,edit:`Edit`,close:`Close`,confirm:`Confirm`,loading:`Loading…`,yes:`Yes`,no:`No`,search:`Search`,filter:`Filter`,create:`Create`,update:`Update`,remove:`Remove`,viewAll:`View All`,back:`Back`,next:`Next`,previous:`Previous`,page:`Page`,of:`of`,items:`items`,item:`item`,empty:`No {items} found.`,toast:{success:`✓`,error:`Error: {message}`},status:{active:`Active`,inactive:`Inactive`,draft:`Draft`,published:`Published`,archived:`Archived`,locked:`Locked`},language:`Language`},L={justNow:`just now`,minAgo:`minutes ago`,ago:`ago`,published:`Published`,updated:`Updated`,newUser:`New user: {name}`},R={mainMenu:`Main menu`,notifications:`Notifications`,notificationsEmpty:`No recent activity`,settings:`Settings`,toggleSidebar:`Toggle sidebar`,userMenu:`User menu`},z={copyright:`© 2026 OkCMS. All rights reserved.`,links:`Links`,website:`Website`,github:`GitHub`,docs:`Documentation`,community:`Community`,poweredBy:`Powered by OkCMS`},B={title:`Help`,label:`Help`,tabs:`Help topics`,topics:{overview:{label:`Overview`,content:`<h4>Welcome to the OkCMS Dashboard</h4><p>This dashboard gives you an overview of your site's content and activity.</p><h4>Available Widgets</h4><ul><li><strong>At a Glance:</strong> overview of posts, pages, media, and users</li><li><strong>Quick Draft:</strong> save drafts quickly from the dashboard</li><li><strong>Activity:</strong> recent site activity and updates</li></ul>`},content:{label:`Content Management`,content:`<h4>Managing Content</h4><p>Create, edit, and publish content from the Content section.</p><h4>Quick Actions</h4><ul><li>Click "New Content" to create a new post or page</li><li>Use filters to find specific content</li><li>Bulk actions available for multiple items</li></ul>`},media:{label:`Media Library`,content:`<h4>Managing Media</h4><p>Upload and manage images, videos, and documents.</p><h4>Tips</h4><ul><li>Drag and drop files to upload</li><li>Add alt text for accessibility</li><li>Organize with folders (coming soon)</li></ul>`}}},V={title:`Screen Options`,label:`Screen Options`,showOnScreen:`Show on screen`},H={layout:w,dashboard:T,content:E,media:D,users:O,settings:k,resources:A,access:j,operations:M,plugins:N,themes:P,login:F,common:I,activity:L,adminBar:R,footer:z,helpTabs:B,screenOptions:V},U=new Map,W=H,[G,K]=e(0),q=null;function J(e){return(e.split(`.`).at(-1)??e).replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).replace(/\s+/g,` `).trim().replace(/^\w/,e=>e.toUpperCase())}function Y(e,t){return function(n,r){let i=n.split(`.`),a=e;for(let e of i)if(a&&typeof a==`object`&&e in a)a=a[e];else{a=t;for(let e of i)if(a&&typeof a==`object`&&e in a)a=a[e];else return J(n);break}return typeof a==`string`?r?a.replace(/\{(\w+)\}/g,(e,t)=>String(r[t]??``)):a:J(n)}}async function X(e){if(U.has(e))return U.get(e);let[t,n]=await Promise.all([h(e),h(`en`)]),r=Y(t,n);return U.set(e,r),r}var Z=Y(W,W),Q=`en`,$=!0;function ne(e){return t(async()=>{$&&(q||=(async()=>{let t=e??await S();Q=t,Z=await X(t),$=!1,K(e=>e+1)})(),await q)}),{t:(e,t)=>(G(),Z(e,t)),get locale(){return Q},changeLocale:async e=>{$=!0,await C(e),Q=e,Z=await X(e),$=!1,K(e=>e+1)},get loading(){return $}}}export{i as a,o as i,c as n,s as r,ne as t};
1
+ import{C as e,T as t}from"./web.D_vCtCLj.js";import{t as n}from"./api.DD5u5p4h.js";var r=Object.defineProperty,i=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),a=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:`Module`}),n},o=[`pt-BR`,`en`,`es-ES`,`ru`,`uk`,`tr`,`he`,`it`,`pl`,`zh-CN`,`ja`,`ar`,`sw`,`yo`,`zu`,`am`,`ha`,`ig`],s={"pt-BR":`Português (Brasil)`,en:`English`,"es-ES":`Español`,ru:`Русский`,uk:`Українська`,tr:`Türkçe`,he:`עברית`,it:`Italiano`,pl:`Polski`,"zh-CN":`中文 (简体)`,ja:`日本語`,ar:`العربية`,sw:`Kiswahili`,yo:`Yorùbá`,zu:`isiZulu`,am:`አማርኛ`,ha:`Hausa`,ig:`Igbo`},c={"pt-BR":`🇧🇷`,en:`🇺🇸`,"es-ES":`🇪🇸`,ru:`🇷🇺`,uk:`🇺🇦`,tr:`🇹🇷`,he:`🇮🇱`,it:`🇮🇹`,pl:`🇵🇱`,"zh-CN":`🇨🇳`,ja:`🇯🇵`,ar:`🇸🇦`,sw:`🇹🇿`,yo:`🇳🇬`,zu:`🇿🇦`,am:`🇪🇹`,ha:`🇳🇬`,ig:`🇳🇬`},l=(e,t,n)=>{let r=t.lastIndexOf(`?`),i=e[r===-1||r<t.lastIndexOf(`/`)?t:t.slice(0,r)];return i?typeof i==`function`?i():Promise.resolve(i):new Promise((e,r)=>{(typeof queueMicrotask==`function`?queueMicrotask:setTimeout)(r.bind(null,Error(`Unknown variable dynamic import: `+t+(t.split(`/`).length===n?``:`. Note that variables only represent file names one level deep.`))))})},u=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),d=function(e){return`/`+e},f={},ee=function(e){return e.pathname.endsWith(`.css`)},p=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=d(t,n);let r=s(t);if(r.href in f)return;f[r.href]=!0;let i=ee(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:u,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},m=new Map;async function h(e){if(m.has(e))return m.get(e);try{let t=await l(Object.assign({"./locales/ar.json":()=>p(()=>import(`./ar.DsV0P0EN.js`),[]),"./locales/en.json":()=>p(()=>Promise.resolve().then(()=>te),void 0),"./locales/es-ES.json":()=>p(()=>import(`./es-ES.etPSaiLd.js`),[]),"./locales/he.json":()=>p(()=>import(`./he.U1Vtp3zT.js`),[]),"./locales/it.json":()=>p(()=>import(`./it.DJuI8oO_.js`),[]),"./locales/ja.json":()=>p(()=>import(`./ja.Cw8I_NUV.js`),[]),"./locales/pl.json":()=>p(()=>import(`./pl.Dsz-4G_z.js`),[]),"./locales/pt-BR.json":()=>p(()=>import(`./pt-BR.CyQAHnXs.js`),[]),"./locales/ru.json":()=>p(()=>import(`./ru.CwIIcTdy.js`),[]),"./locales/sw.json":()=>p(()=>import(`./sw.DwpL3sb6.js`),[]),"./locales/tr.json":()=>p(()=>import(`./tr.CY2JWJ7Y.js`),[]),"./locales/uk.json":()=>p(()=>import(`./uk.BudEWIU8.js`),[]),"./locales/yo.json":()=>p(()=>import(`./yo.BmoZs0fO.js`),[]),"./locales/zh-CN.json":()=>p(()=>import(`./zh-CN.khaXV6fv.js`),[])}),`./locales/${e}.json`,3),n=t.default??t;return m.set(e,n),n}catch{return e===`en`?{}:h(`en`)}}var g=`admin_locale`;function _(){if(typeof document>`u`)return null;let e=document.cookie.match(RegExp(`(?:^|; )${g}=([^;]+)`));return e?.[1]&&o.includes(e[1])?e[1]:null}function v(e){typeof document<`u`&&(document.cookie=`${g}=${e}; path=/; max-age=31536000; SameSite=Lax`)}function y(){if(typeof navigator>`u`)return`en`;let e=navigator.language?.split(`-`)[0]?.toLowerCase(),t=navigator.language?.toLowerCase();for(let n of o)if(n.toLowerCase()===t||n.split(`-`)[0]===e)return n;return`en`}async function b(){try{let e=await n.getUserLocale();if(e&&o.includes(e))return e}catch{}return null}async function x(e){await n.setUserLocale(e)}async function S(){return _()||await b()||y()||`en`}async function C(e){v(e);try{await x(e)}catch{}}var te=a({access:()=>j,activity:()=>L,adminBar:()=>R,common:()=>I,content:()=>E,dashboard:()=>T,default:()=>H,footer:()=>z,helpTabs:()=>B,layout:()=>w,login:()=>F,media:()=>D,operations:()=>M,plugins:()=>N,resources:()=>A,screenOptions:()=>V,settings:()=>k,themes:()=>P,users:()=>O}),w={appName:`OkCMS`,admin:`Admin`,nav:{dashboard:`Dashboard`,content:`Content`,media:`Media`,users:`Users`,settings:`Settings`,plugins:`Plugins`,themes:`Themes`},actions:{logout:`Logout`,newPost:`New Post`,uploadMedia:`Upload Media`,addUser:`Add User`,openSettings:`Settings`}},T={title:`Dashboard`,stats:{totalContent:`Total Content`,published:`Published`,drafts:`Drafts`,mediaFiles:`Media Files`,users:`Users`},recent:{title:`Recent Content`,viewAll:`View All`,empty:`No content yet — create your first!`,columns:{title:`Title`,type:`Type`,status:`Status`,updated:`Updated`}},widgets:{atGlance:`At a Glance`,posts:`Posts`,postsDesc:`Published / Drafts / Trash`,pages:`Pages`,pagesDesc:`Published / Drafts / Trash`,media:`Media`,mediaDesc:`Files in the library`,users:`Users`,usersDesc:`Total / Active / Inactive`,version:`Version`,storage:`Storage`,quickDraft:{title:`Quick Draft`,heading:`Title`,headingPlaceholder:`Give your draft a title`,content:`Content`,contentPlaceholder:`What's on your mind?`,save:`Save Draft`,yourDrafts:`Your Drafts`,noDrafts:`No drafts yet.`},activity:{title:`Activity`,empty:`No activity yet.`}}},E={list:{title:`Content`,description:`Search, filter, edit and publish your content.`,columns:{title:`Title`,type:`Type`,status:`Status`,updated:`Updated`},actions:{edit:`Edit`,publish:`Publish`,unpublish:`Unpublish`,delete:`Delete`},filters:{search:`Search content…`,allTypes:`All types`,allStatus:`All status`},buttons:{new:`+ New content`,search:`Search`},empty:`No content found.`,statuses:{draft:`Draft`,published:`Published`,archived:`Archived`},confirmDelete:`Delete "{title}"?`,toasts:{published:`Content published ✓`,unpublished:`Content unpublished ✓`}},editor:{type:`Type`,title:`Title`,slug:`Slug`,excerpt:`Excerpt`,featuredImage:`Featured Image (media ID)`,status:`Status`,statusOptions:{draft:`Draft`,published:`Published`,archived:`Archived`},layout:`Layout`,layoutAuto:`Automatic (theme hierarchy)`,customFields:`Custom Fields`,inspectTypes:`Inspect available types`,save:`Save`,saved:`Content saved successfully.`}},D={title:`Media Library`,description:"Upload and manage images, videos and documents. Files are stored in `uploads/` and served publicly.",upload:{dropzone:`Drop files here or`,select:`Select files`,uploading:`Uploading…`,hint:`Images, videos, audio and documents · up to 25MB per file`},toolbar:{search:`Search by name or alt…`,allTypes:`All types`,searchBtn:`Search`},mimeTypes:{png:`PNG`,jpeg:`JPEG`,gif:`GIF`,webp:`WebP`,svg:`SVG`,pdf:`PDF`,mp4:`MP4`,mp3:`MP3`},empty:`No files yet. Upload the first one!`,details:{title:`Details`,file:`File`,type:`Type`,size:`Size`,url:`URL`,copy:`Copy`,alt:`Alt text`,caption:`Caption`,save:`Save details`,delete:`Delete`,close:`Close`,confirmDelete:`Delete "{filename}"? The file will be removed from disk.`,saved:`Details saved ✓`,copied:`URL copied ✓`,copyError:`Could not copy URL`},toasts:{uploaded:`{count} file(s) uploaded ✓`}},O={title:`Users`,description:`Manage accounts, roles and project access.`,new:`New User`,toolbar:{search:`Search by name or email…`,allStatus:`All status`,active:`Active`,inactive:`Inactive`,newBtn:`+ New user`,searchBtn:`Search`},table:{name:`Name`,email:`Email`,role:`Role`,status:`Status`,lastAccess:`Last access`,actions:{manage:`Manage`,delete:`Delete`}},empty:`No users found.`,noRole:`No role`,detail:{title:`Manage user`,fields:{name:`Name`,email:`Email`,status:`Status`,role:`Role`,password:`Password`},statusOptions:{active:`Active`,inactive:`Inactive`},rolePlaceholder:`— no role —`,meta:`Created on {created} · last access {lastAccess}`,actions:{save:`Save`,resetPassword:`Reset password`,close:`Close`},passwordPrompt:`New password for {email} (minimum 8 chars):`,passwordError:`Password must be at least 8 characters`,toasts:{roleUpdated:`Role for {name} updated ✓`,passwordChanged:`Password for {name} changed ✓`,saved:`User {name} saved ✓`,deleted:`User {name} deleted ✓`},confirmDelete:`Delete user {email}?`}},k={general:{title:`General`,description:`Basic information displayed on the site.`,back:`← All settings`,fields:{siteTitle:`Site Title`,siteTitlePlaceholder:`My Site`,siteDescription:`Description`,siteDescriptionPlaceholder:`A new site built with OkCMS`,language:`Language`,timezone:`Timezone`,timezonePlaceholder:`America/Sao_Paulo`},saved:`Settings saved ✓`,loading:`Loading…`,save:`Save`},postTypes:{title:`Content Types`,description:`Create custom content types (CPTs) beyond Posts and Pages.`,form:{title:`Create Content Type`,slug:`Slug (singular, e.g.: portfolio)`,slugHint:`Only lowercase letters, numbers and underscore`,singular:`Singular name`,plural:`Plural name`,supports:`Supports`,supportsOptions:{title:`Title`,editor:`Editor`,thumbnail:`Featured Image`,excerpt:`Excerpt`,revisions:`Revisions`},hasArchive:`Has public archive (/slug)`,create:`Create`},table:{slug:`Slug`,singular:`Singular`,plural:`Plural`,source:`Source`,supports:`Supports`,archive:`Archive`,actions:{remove:`Remove`}},sources:{admin:`Admin`,core:`Core`}},taxonomies:{title:`Taxonomies`,description:`Create custom taxonomies and link them to content types.`,form:{title:`Create Taxonomy`,name:`Name (e.g.: Genre)`,slug:`Slug (optional, generated from name)`,slugHint:`Only lowercase letters, numbers and underscore`,hierarchical:`Hierarchical (allows parent/child terms)`,attachTo:`Link to content types`,create:`Create`},table:{taxonomy:`Taxonomy`,hierarchical:`Hierarchical`,attachedTypes:`Linked content types`,actions:{remove:`Remove`}}},customFields:{title:`Custom Fields`,description:`Create field groups, arrange fields and choose which standard fields are visible for each content type.`,contentType:`Content type`,location:{title:`Location rules`,description:`Choose where this field group appears. Rules in the same group use AND; groups use OR.`,parameter:`Location parameter`,operator:`Operator`,chooseValue:`Choose a value`,valuePlaceholder:`Enter a value or slug`,required:`Add a value to every location rule.`,addRule:`Add condition`,addGroup:`Add OR group`,remove:`Remove`,and:`AND`,or:`OR`,params:{content_type:`Post type`,content_slug:`Post slug`,taxonomy:`Taxonomy`,term:`Term slug`,user_role:`User role`,page_template:`Page template`,post_status:`Post status`},operators:{eq:`is`,neq:`is not`}},standard:{title:`Standard fields`,description:`Title and slug are required. The other standard fields can be enabled or disabled.`,enabled:`Enabled`,locked:`Required`,fields:{title:`Title`,slug:`Slug`,content:`Content`,excerpt:`Excerpt`,featured_image:`Featured image`,seo_title:`SEO title`,seo_description:`SEO description`,status:`Status`,author:`Author`}},groups:{title:`Field groups`,new:`New field group`,empty:`No custom field groups yet.`,fields:`fields`,edit:`Edit`,active:`Active`,inactive:`Inactive`},form:{createTitle:`Create field group`,editTitle:`Edit field group`,title:`Group name`,titlePlaceholder:`Example: Product details`,position:`Position`,positions:{normal:`Normal`,side:`Sidebar`,acf_after_title:`After title`},displayStyle:`Display style`,displayStyles:{standard:`Standard`,seamless:`Seamless`,grouped:`Grouped`},field:`Field`,fieldName:`Name/key`,fieldNamePlaceholder:`product_code`,fieldLabel:`Label`,fieldLabelPlaceholder:`Product code`,fieldType:`Type`,instructions:`Instructions`,instructionsPlaceholder:`Optional help text for editors`,required:`Required`,options:`Options`,optionsHint:`One option per line: value|Label`,addField:`Add field`,removeField:`Remove`,dragHint:`Drag to reorder`,save:`Save group`,cancel:`Cancel`,newFieldDefault:`New field`,saved:`Field group saved.`,deleted:`Field group deleted.`},actions:{delete:`Delete`,confirmDelete:`Delete this field group?`},loading:`Loading custom fields…`,loadError:`Could not load custom fields.`}},A={title:`Content Resources`,description:`Description`,tabs:{category:`Categories`,tag:`Tags`,menu:`Menus`},new:`New resource`,name:`Name`,slug:`Slug`,items:`Menu items (JSON)`,saved:`Resource saved.`,confirmDelete:`Delete this resource?`,form:{new:`Create resource`,edit:`Edit resource`},terms:{title:`Taxonomy terms`,choose:`Choose a taxonomy`,new:`New term`}},j={title:`Access`,description:`Manage roles, permissions and tenants.`,roles:`Roles`,tenants:`Tenants`,permissions:`Permissions (comma separated)`,domain:`Domain`},M={title:`Operations`,description:`Manage webhooks, builds, deployments and events.`,webhooks:`Webhooks`,events:`Events`,secret:`Secret`,builds:`Builds`,deployments:`Deployments`,createBuild:`Create build`,deploy:`Deploy`},N={title:`Plugins`,description:`Manage installed plugins.`,columns:{name:`Name`,version:`Version`,status:`Status`,actions:`Actions`},status:{active:`Active`,installed:`Installed`,inactive:`Inactive`},activate:`Activate`,deactivate:`Deactivate`,install:`Install plugin`,uninstall:`Uninstall`,confirmUninstall:`Uninstall {name}?`,name:`Plugin name`,version:`Version`,manifest:`Manifest (JSON)`,loadError:`Could not load plugins.`,activateError:`Could not activate the plugin.`,deactivateError:`Could not deactivate the plugin.`,installError:`Could not install the plugin.`,uninstallError:`Could not uninstall the plugin.`,empty:`No plugins installed.`},P={title:`Themes`,description:`Manage installed themes.`,version:`Version`,active:`Active`,status:{active:`Active`,installed:`Installed`,inactive:`Inactive`},activate:`Activate`,deactivate:`Deactivate`,install:`Install theme`,uninstall:`Uninstall`,confirmUninstall:`Uninstall {name}?`,name:`Theme name`,manifest:`Manifest (JSON)`,loadError:`Could not load themes.`,activateError:`Could not activate the theme.`,deactivateError:`Could not deactivate the theme.`,installError:`Could not install the theme.`,uninstallError:`Could not uninstall the theme.`,empty:`No themes installed.`},F={title:`Login`,subtitle:`Sign in to your account`,email:`Email`,password:`Password`,submit:`Sign In`,failed:`Invalid email or password`},I={save:`Save`,cancel:`Cancel`,delete:`Delete`,edit:`Edit`,close:`Close`,confirm:`Confirm`,loading:`Loading…`,yes:`Yes`,no:`No`,search:`Search`,filter:`Filter`,create:`Create`,update:`Update`,remove:`Remove`,viewAll:`View All`,back:`Back`,next:`Next`,previous:`Previous`,page:`Page`,of:`of`,items:`items`,item:`item`,empty:`No {items} found.`,toast:{success:`✓`,error:`Error: {message}`},status:{active:`Active`,inactive:`Inactive`,draft:`Draft`,published:`Published`,archived:`Archived`,locked:`Locked`},language:`Language`},L={justNow:`just now`,minAgo:`minutes ago`,ago:`ago`,published:`Published`,updated:`Updated`,newUser:`New user: {name}`},R={mainMenu:`Main menu`,notifications:`Notifications`,notificationsEmpty:`No recent activity`,settings:`Settings`,toggleSidebar:`Toggle sidebar`,userMenu:`User menu`},z={copyright:`© 2026 OkCMS. All rights reserved.`,links:`Links`,website:`Website`,github:`GitHub`,docs:`Documentation`,community:`Community`,poweredBy:`Powered by OkCMS`},B={title:`Help`,label:`Help`,tabs:`Help topics`,topics:{overview:{label:`Overview`,content:`<h4>Welcome to the OkCMS Dashboard</h4><p>This dashboard gives you an overview of your site's content and activity.</p><h4>Available Widgets</h4><ul><li><strong>At a Glance:</strong> overview of posts, pages, media, and users</li><li><strong>Quick Draft:</strong> save drafts quickly from the dashboard</li><li><strong>Activity:</strong> recent site activity and updates</li></ul>`},content:{label:`Content Management`,content:`<h4>Managing Content</h4><p>Create, edit, and publish content from the Content section.</p><h4>Quick Actions</h4><ul><li>Click "New Content" to create a new post or page</li><li>Use filters to find specific content</li><li>Bulk actions available for multiple items</li></ul>`},media:{label:`Media Library`,content:`<h4>Managing Media</h4><p>Upload and manage images, videos, and documents.</p><h4>Tips</h4><ul><li>Drag and drop files to upload</li><li>Add alt text for accessibility</li><li>Organize with folders (coming soon)</li></ul>`}}},V={title:`Screen Options`,label:`Screen Options`,showOnScreen:`Show on screen`},H={layout:w,dashboard:T,content:E,media:D,users:O,settings:k,resources:A,access:j,operations:M,plugins:N,themes:P,login:F,common:I,activity:L,adminBar:R,footer:z,helpTabs:B,screenOptions:V},U=new Map,W=H,[G,K]=e(0),q=null;function J(e){return(e.split(`.`).at(-1)??e).replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).replace(/\s+/g,` `).trim().replace(/^\w/,e=>e.toUpperCase())}function Y(e,t){return function(n,r){let i=n.split(`.`),a=e;for(let e of i)if(a&&typeof a==`object`&&e in a)a=a[e];else{a=t;for(let e of i)if(a&&typeof a==`object`&&e in a)a=a[e];else return J(n);break}return typeof a==`string`?r?a.replace(/\{(\w+)\}/g,(e,t)=>String(r[t]??``)):a:J(n)}}async function X(e){if(U.has(e))return U.get(e);let[t,n]=await Promise.all([h(e),h(`en`)]),r=Y(t,n);return U.set(e,r),r}var Z=Y(W,W),Q=`en`,$=!0;function ne(e){return t(async()=>{$&&(q||=(async()=>{let t=e??await S();Q=t,Z=await X(t),$=!1,K(e=>e+1)})(),await q)}),{t:(e,t)=>(G(),Z(e,t)),get locale(){return Q},changeLocale:async e=>{$=!0,await C(e),Q=e,Z=await X(e),$=!1,K(e=>e+1)},get loading(){return $}}}export{i as a,o as i,c as n,s as r,ne as t};
@@ -1 +1 @@
1
- import{t as e}from"./api.BfxYC8bU.js";var n=document.getElementById(`login-form`),r=document.getElementById(`error-message`),i=document.getElementById(`submit-text`),a=document.getElementById(`submit-spinner`);n?.addEventListener(`submit`,async o=>{o.preventDefault();let s=new FormData(n),c=s.get(`email`),l=s.get(`password`);i.style.display=`none`,a.style.display=`inline-block`,r.style.display=`none`;try{await e.login({email:c,password:l}),window.location.href=`/`}catch(e){r.textContent=e instanceof Error?e.message:t(`login.failed`),r.style.display=`block`}finally{i.style.display=`inline`,a.style.display=`none`}});
1
+ import{t as e}from"./api.DD5u5p4h.js";var n=document.getElementById(`login-form`),r=document.getElementById(`error-message`),i=document.getElementById(`submit-text`),a=document.getElementById(`submit-spinner`);n?.addEventListener(`submit`,async o=>{o.preventDefault();let s=new FormData(n),c=s.get(`email`),l=s.get(`password`);i.style.display=`none`,a.style.display=`inline-block`,r.style.display=`none`;try{await e.login({email:c,password:l}),window.location.href=`/`}catch(e){r.textContent=e instanceof Error?e.message:t(`login.failed`),r.style.display=`block`}finally{i.style.display=`inline`,a.style.display=`none`}});
@@ -1 +1 @@
1
- import{a as e}from"./i18n.B4BuieMb.js";import{S as t,_ as n,b as r,d as i,f as a,g as o,i as s,l as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./web.D_vCtCLj.js";var g=e(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),_=e(((e,t)=>{t.exports=typeof process==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),v=e(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=g(),a=_();e=t.exports={};var o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),y=e(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),b=e(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),x=e(((e,t)=>{var n=_(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=g(),{safeRe:a,t:o}=v(),s=y(),{compareIdentifiers:c}=b(),l=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(c(e[t],n[t])!==0)return!1;return!0};t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);this.prerelease=l[4]?l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e!==i)return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e!==i)return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),l(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),S=e(((e,t)=>{var n=x();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),C=e(((e,t)=>{var n=S();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),w=e(((e,t)=>{var n=S();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),T=e(((e,t)=>{var n=x();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),E=e(((e,t)=>{var n=S();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),D=e(((e,t)=>{var n=x();t.exports=(e,t)=>new n(e,t).major})),O=e(((e,t)=>{var n=x();t.exports=(e,t)=>new n(e,t).minor})),k=e(((e,t)=>{var n=x();t.exports=(e,t)=>new n(e,t).patch})),A=e(((e,t)=>{var n=S();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),j=e(((e,t)=>{var n=x();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),M=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(t,e,r)})),N=e(((e,t)=>{var n=j();t.exports=(e,t)=>n(e,t,!0)})),P=e(((e,t)=>{var n=x();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),F=e(((e,t)=>{var n=P();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),I=e(((e,t)=>{var n=P();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),L=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)>0})),R=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)<0})),z=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)===0})),B=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)!==0})),V=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)>=0})),H=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)<=0})),U=e(((e,t)=>{var n=z(),r=B(),i=L(),a=V(),o=R(),s=H();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),ee=e(((e,t)=>{var n=x(),r=S(),{safeRe:i,t:a}=v();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),te=e(((e,t)=>{var n=S(),r=g(),i=x(),a=(e,t,n)=>{if(!r.RELEASE_TYPES.includes(t))return null;let i=o(e,n);return i&&s(i,t)},o=(e,t)=>n(e instanceof i?e.version:e,t),s=(e,t)=>{if(c(t))return e.version;switch(e.prerelease=[],t){case`major`:e.minor=0,e.patch=0;break;case`minor`:e.patch=0}return e.format()},c=e=>e.startsWith(`pre`);t.exports=a})),ne=e(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),W=e(((e,t)=>{var n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!S(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&C(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(b,``);let t=((this.options.includePrerelease&&m)|(this.options.loose&&h))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(s,I(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[u.COMPARATORTRIM],d),o(`comparator trim`,e),e=e.replace(c[u.TILDETRIM],f),o(`tilde trim`,e),e=e.replace(c[u.CARETTRIM],p),o(`caret trim`,e);let l=e.split(` `).map(e=>T(e,this.options)).join(` `).split(/\s+/).map(e=>F(e,this.options));i&&(l=l.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[u.COMPARATORLOOSE])))),o(`range list`,l);let g=new Map,_=l.map(e=>new a(e,this.options));for(let e of _){if(S(e))return[e];g.set(e.value,e)}g.size>1&&g.has(``)&&g.delete(``);let v=[...g.values()];return r.set(t,v),v}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>w(e,n)&&t.set.some(t=>w(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(L(this.set[t],e,this.options))return!0;return!1}};var r=new(ne()),i=y(),a=G(),o=_(),s=x(),{safeRe:c,src:l,t:u,comparatorTrimReplace:d,tildeTrimReplace:f,caretTrimReplace:p}=v(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:h}=g(),b=new RegExp(l[u.BUILD],`g`),S=e=>e.value===`<0.0.0-0`,C=e=>e.value===``,w=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},T=(e,t)=>(e=e.replace(c[u.BUILD],``),o(`comp`,e,t),e=A(e,t),o(`caret`,e),e=O(e,t),o(`tildes`,e),e=M(e,t),o(`xrange`,e),e=P(e,t),o(`stars`,e),e),E=e=>!e||e.toLowerCase()===`x`||e===`*`,D=(e,t,n)=>E(e)&&!E(t)||E(t)&&n&&!E(n),O=(e,t)=>e.trim().split(/\s+/).map(e=>k(e,t)).join(` `),k=(e,t)=>{let n=t.loose?c[u.TILDELOOSE]:c[u.TILDE],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`tilde`,e,t,n,i,a,s);let c;return E(n)?c=``:E(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?c=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:s?(o(`replaceTilde pr`,s),c=`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`):c=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,o(`tilde return`,c),c})},A=(e,t)=>e.trim().split(/\s+/).map(e=>j(e,t)).join(` `),j=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return E(n)?c=``:E(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},M=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>N(e,t)).join(` `)),N=(e,t)=>{e=e.trim();let n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{if(o(`xRange`,e,n,r,i,a,s,c),D(i,a,s))return e;let l=E(i),u=l||E(a),d=u||E(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},P=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[u.STAR],``)),F=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],``)),I=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=E(r)?``:E(i)?`>=${r}.0.0${e?`-0`:``}`:E(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=E(l)?``:E(u)?`<${+l+1}.0.0-0`:E(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),L=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),G=e(((e,t)=>{var n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),this.semver=r[2]?new c(r[2],this.options.loose):n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new l(t.value,n).test(this.value):t.operator===``?t.value===``||new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var r=y(),{safeRe:i,t:a}=v(),o=U(),s=_(),c=x(),l=W()})),K=e(((e,t)=>{var n=W();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),re=e(((e,t)=>{var n=W();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),ie=e(((e,t)=>{var n=x(),r=W();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),ae=e(((e,t)=>{var n=x(),r=W();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),q=e(((e,t)=>{var n=x(),r=W(),i=L();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),J=e(((e,t)=>{var n=W();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Y=e(((e,t)=>{var n=x(),r=G(),{ANY:i}=r,a=W(),o=K(),s=L(),c=R(),l=H(),u=V();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),oe=e(((e,t)=>{var n=Y();t.exports=(e,t,r)=>n(e,t,`>`,r)})),se=e(((e,t)=>{var n=Y();t.exports=(e,t,r)=>n(e,t,`<`,r)})),ce=e(((e,t)=>{var n=W();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),le=e(((e,t)=>{var n=K(),r=j();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),ue=e(((e,t)=>{var n=W(),r=G(),{ANY:i}=r,a=K(),o=j(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!e.test(s.semver))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!e.test(u.semver))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s}));e(((e,t)=>{var n=v(),r=g(),i=x(),a=b();t.exports={parse:S(),valid:C(),clean:w(),inc:T(),diff:E(),major:D(),minor:O(),patch:k(),prerelease:A(),compare:j(),rcompare:M(),compareLoose:N(),compareBuild:P(),sort:F(),rsort:I(),gt:L(),lt:R(),eq:z(),neq:B(),gte:V(),lte:H(),cmp:U(),coerce:ee(),truncate:te(),Comparator:G(),Range:W(),satisfies:K(),toComparators:re(),maxSatisfying:ie(),minSatisfying:ae(),minVersion:q(),validRange:J(),outside:Y(),gtr:oe(),ltr:se(),intersects:ce(),simplifyRange:le(),subset:ue(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))();var de=d(`<span class=spinner aria-label=Carregando>`),fe=d(`<button>`),pe=d(`<label class=field__label><!$><!/><!$><!/><input class=input>`),me=d(`<input class=input>`),he=d(`<p class="field__error notice--error">`),ge=d(`<div><!$><!/><!$><!/><!$><!/>`),_e=d(`<span aria-hidden=true> *`),X=d(`<option value>`),ve=d(`<label class=field__label><!$><!/><select class=input><!$><!/><!$><!/>`),ye=d(`<select class=input><!$><!/><!$><!/>`),Z=d(`<div><!$><!/><!$><!/>`),Q=d(`<option>`),be=d(`<div class=card-header><h3>`),xe=d(`<span>`),Se=d(`<table class=table><thead><tr></tr></thead><tbody>`),Ce=d(`<div class=table-loading><span class=spinner aria-label=Carregando>`),we=d(`<p class=muted>`),Te=d(`<th>`),Ee=d(`<tr>`),De=d(`<td>`),$=d(`<div class=pagination><button class="btn btn-secondary btn-sm"type=button>← Anterior</button><span class=muted>Página <!$><!/> de <!$><!/></span><button class="btn btn-secondary btn-sm"type=button>Próxima →`),Oe=[`primary`,`secondary`,`danger`,`ghost`];function ke(e){let a=Oe.includes(e.variant)?e.variant:`secondary`,o=()=>[`btn`,`btn-${a}`,e.size===`sm`?`btn-sm`:``,e.class??``].filter(Boolean).join(` `);return(()=>{var a=f(fe);return a.$$click=()=>e.onClick?.(),u(a,r(n,{get when(){return e.loading},get fallback(){return e.children},get children(){return f(de)}})),t(t=>{var n=e.type??`button`,r=o(),s=e.disabled||e.loading;return n!==t.e&&h(a,`type`,t.e=n),r!==t.t&&m(a,t.t=r),s!==t.a&&i(a,`disabled`,t.a=s),t},{e:void 0,t:void 0,a:void 0}),c(),a})()}function Ae(e){let a=t=>{e.onInput?.(t.currentTarget.value)};return(()=>{var o=f(ge),l=o.firstChild,[d,g]=s(l.nextSibling),_=d.nextSibling,[v,y]=s(_.nextSibling),b=v.nextSibling,[x,S]=s(b.nextSibling);return u(o,r(n,{get when(){return e.label},get children(){var n=f(pe),r=n.firstChild,[o,l]=s(r.nextSibling),d=o.nextSibling,[m,g]=s(d.nextSibling),_=m.nextSibling;return u(n,()=>e.label,o,l),u(n,(()=>{var t=p(()=>!!e.required);return()=>t()?f(_e):null})(),m,g),_.$$input=a,t(t=>{var n=e.type??`text`,r=e.name,a=e.placeholder,o=e.disabled,s=e.required;return n!==t.e&&h(_,`type`,t.e=n),r!==t.t&&h(_,`name`,t.t=r),a!==t.a&&h(_,`placeholder`,t.a=a),o!==t.o&&i(_,`disabled`,t.o=o),s!==t.i&&i(_,`required`,t.i=s),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t(()=>i(_,`value`,e.value??``)),c(),n}}),d,g),u(o,r(n,{get when(){return!e.label},get children(){var n=f(me);return n.$$input=a,t(t=>{var r=e.type??`text`,a=e.name,o=e.placeholder,s=e.disabled,c=e.required;return r!==t.e&&h(n,`type`,t.e=r),a!==t.t&&h(n,`name`,t.t=a),o!==t.a&&h(n,`placeholder`,t.a=o),s!==t.o&&i(n,`disabled`,t.o=s),c!==t.i&&i(n,`required`,t.i=c),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t(()=>i(n,`value`,e.value??``)),c(),n}}),v,y),u(o,r(n,{get when(){return e.error},get children(){var t=f(he);return u(t,()=>e.error),t}}),x,S),t(()=>m(o,`field ${e.class??``}`.trim())),o})()}function je(e){let a=e.options;return(()=>{var c=f(Z),l=c.firstChild,[d,p]=s(l.nextSibling),g=d.nextSibling,[_,v]=s(g.nextSibling);return u(c,r(n,{get when(){return e.label},get children(){var c=f(ve),l=c.firstChild,[d,p]=s(l.nextSibling),m=d.nextSibling,g=m.firstChild,[_,v]=s(g.nextSibling),y=_.nextSibling,[b,x]=s(y.nextSibling);return u(c,()=>e.label,d,p),m.addEventListener(`change`,t=>e.onChange?.(t.currentTarget.value)),u(m,r(n,{get when(){return e.placeholder},get children(){var t=f(X);return u(t,()=>e.placeholder),t}}),_,v),u(m,r(o,{each:a,children:e=>(()=>{var n=f(Q);return u(n,()=>e.label),t(()=>i(n,`value`,e.value)),n})()}),b,x),t(t=>{var n=e.name,r=e.disabled;return n!==t.e&&h(m,`name`,t.e=n),r!==t.t&&i(m,`disabled`,t.t=r),t},{e:void 0,t:void 0}),t(()=>i(m,`value`,e.value??``)),c}}),d,p),u(c,r(n,{get when(){return!e.label},get children(){var c=f(ye),l=c.firstChild,[d,p]=s(l.nextSibling),m=d.nextSibling,[g,_]=s(m.nextSibling);return c.addEventListener(`change`,t=>e.onChange?.(t.currentTarget.value)),u(c,r(n,{get when(){return e.placeholder},get children(){var t=f(X);return u(t,()=>e.placeholder),t}}),d,p),u(c,r(o,{each:a,children:e=>(()=>{var n=f(Q);return u(n,()=>e.label),t(()=>i(n,`value`,e.value)),n})()}),g,_),t(t=>{var n=e.name,r=e.disabled;return n!==t.e&&h(c,`name`,t.e=n),r!==t.t&&i(c,`disabled`,t.t=r),t},{e:void 0,t:void 0}),t(()=>i(c,`value`,e.value??``)),c}}),_,v),t(()=>m(c,`field ${e.class??``}`.trim())),c})()}function Me(e){return(()=>{var i=f(Z),a=i.firstChild,[o,c]=s(a.nextSibling),l=o.nextSibling,[d,p]=s(l.nextSibling);return u(i,r(n,{get when(){return e.title},get children(){var t=f(be),n=t.firstChild;return u(n,()=>e.title),t}}),o,c),u(i,()=>e.children,d,p),t(()=>m(i,`card ${e.class??``}`.trim())),i})()}function Ne(e){let t=e.variant??`secondary`;return(()=>{var n=f(xe);return m(n,`badge badge-${t}`),u(n,()=>e.children),n})()}function Pe(e){let i=e.columns;return r(n,{get when(){return!e.loading},get fallback(){return f(Ce)},get children(){return r(n,{get when(){return e.data.length>0},get fallback(){return(()=>{var t=f(we);return u(t,()=>e.emptyMessage??`Nenhum registro.`),t})()},get children(){var s=f(Se),c=s.firstChild,l=c.firstChild,d=c.nextSibling;return u(l,r(o,{each:i,children:e=>(()=>{var n=f(Te);return u(n,()=>e.label),t(t=>a(n,e.width?{width:e.width}:void 0,t)),n})()})),u(d,r(o,{get each(){return e.data},children:e=>(()=>{var t=f(Ee);return u(t,r(o,{each:i,children:t=>(()=>{var i=f(De);return u(i,r(n,{get when(){return t.render},get fallback(){return String(e[t.key]??``)},get children(){return t.render?.(e[t.key],e)}})),i})()})),t})()})),s}})}})}function Fe(e){let a=()=>Math.max(1,Math.ceil(e.total/Math.max(1,e.limit)));return r(n,{get when(){return a()>1},get children(){var n=f($),r=n.firstChild,o=r.nextSibling,l=o.firstChild.nextSibling,[d,p]=s(l.nextSibling),m=d.nextSibling.nextSibling,[h,g]=s(m.nextSibling),_=o.nextSibling;return r.$$click=()=>e.onPageChange(e.page-1),u(o,()=>e.page,d,p),u(o,a,h,g),_.$$click=()=>e.onPageChange(e.page+1),t(t=>{var n=e.page<=1,o=e.page>=a();return n!==t.e&&i(r,`disabled`,t.e=n),o!==t.t&&i(_,`disabled`,t.t=o),t},{e:void 0,t:void 0}),c(),n}})}l([`click`,`input`]);export{Fe as a,Ae as i,ke as n,je as o,Me as r,Pe as s,Ne as t};
1
+ import{a as e}from"./i18n.RrM42yx5.js";import{S as t,_ as n,b as r,d as i,f as a,g as o,i as s,l as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./web.D_vCtCLj.js";var g=e(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),_=e(((e,t)=>{t.exports=typeof process==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),v=e(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=g(),a=_();e=t.exports={};var o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),y=e(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),b=e(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),x=e(((e,t)=>{var n=_(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=g(),{safeRe:a,t:o}=v(),s=y(),{compareIdentifiers:c}=b(),l=(e,t)=>{let n=t.split(`.`);if(n.length>e.length)return!1;for(let t=0;t<n.length;t++)if(c(e[t],n[t])!==0)return!1;return!0};t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);this.prerelease=l[4]?l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e!==i)return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e!==i)return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];if(n===!1&&(r=[t]),l(this.prerelease,t)){let e=this.prerelease[t.split(`.`).length];isNaN(e)&&(this.prerelease=r)}else this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),S=e(((e,t)=>{var n=x();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),C=e(((e,t)=>{var n=S();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),w=e(((e,t)=>{var n=S();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),T=e(((e,t)=>{var n=x();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),E=e(((e,t)=>{var n=S();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),D=e(((e,t)=>{var n=x();t.exports=(e,t)=>new n(e,t).major})),O=e(((e,t)=>{var n=x();t.exports=(e,t)=>new n(e,t).minor})),k=e(((e,t)=>{var n=x();t.exports=(e,t)=>new n(e,t).patch})),A=e(((e,t)=>{var n=S();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),j=e(((e,t)=>{var n=x();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),M=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(t,e,r)})),N=e(((e,t)=>{var n=j();t.exports=(e,t)=>n(e,t,!0)})),P=e(((e,t)=>{var n=x();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),F=e(((e,t)=>{var n=P();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),I=e(((e,t)=>{var n=P();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),L=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)>0})),R=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)<0})),z=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)===0})),B=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)!==0})),V=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)>=0})),H=e(((e,t)=>{var n=j();t.exports=(e,t,r)=>n(e,t,r)<=0})),U=e(((e,t)=>{var n=z(),r=B(),i=L(),a=V(),o=R(),s=H();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),ee=e(((e,t)=>{var n=x(),r=S(),{safeRe:i,t:a}=v();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),te=e(((e,t)=>{var n=S(),r=g(),i=x(),a=(e,t,n)=>{if(!r.RELEASE_TYPES.includes(t))return null;let i=o(e,n);return i&&s(i,t)},o=(e,t)=>n(e instanceof i?e.version:e,t),s=(e,t)=>{if(c(t))return e.version;switch(e.prerelease=[],t){case`major`:e.minor=0,e.patch=0;break;case`minor`:e.patch=0}return e.format()},c=e=>e.startsWith(`pre`);t.exports=a})),ne=e(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),W=e(((e,t)=>{var n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!S(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&C(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){e=e.replace(b,``);let t=((this.options.includePrerelease&&m)|(this.options.loose&&h))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(s,I(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[u.COMPARATORTRIM],d),o(`comparator trim`,e),e=e.replace(c[u.TILDETRIM],f),o(`tilde trim`,e),e=e.replace(c[u.CARETTRIM],p),o(`caret trim`,e);let l=e.split(` `).map(e=>T(e,this.options)).join(` `).split(/\s+/).map(e=>F(e,this.options));i&&(l=l.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[u.COMPARATORLOOSE])))),o(`range list`,l);let g=new Map,_=l.map(e=>new a(e,this.options));for(let e of _){if(S(e))return[e];g.set(e.value,e)}g.size>1&&g.has(``)&&g.delete(``);let v=[...g.values()];return r.set(t,v),v}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>w(e,n)&&t.set.some(t=>w(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(L(this.set[t],e,this.options))return!0;return!1}};var r=new(ne()),i=y(),a=G(),o=_(),s=x(),{safeRe:c,src:l,t:u,comparatorTrimReplace:d,tildeTrimReplace:f,caretTrimReplace:p}=v(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:h}=g(),b=new RegExp(l[u.BUILD],`g`),S=e=>e.value===`<0.0.0-0`,C=e=>e.value===``,w=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},T=(e,t)=>(e=e.replace(c[u.BUILD],``),o(`comp`,e,t),e=A(e,t),o(`caret`,e),e=O(e,t),o(`tildes`,e),e=M(e,t),o(`xrange`,e),e=P(e,t),o(`stars`,e),e),E=e=>!e||e.toLowerCase()===`x`||e===`*`,D=(e,t,n)=>E(e)&&!E(t)||E(t)&&n&&!E(n),O=(e,t)=>e.trim().split(/\s+/).map(e=>k(e,t)).join(` `),k=(e,t)=>{let n=t.loose?c[u.TILDELOOSE]:c[u.TILDE],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`tilde`,e,t,n,i,a,s);let c;return E(n)?c=``:E(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?c=`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:s?(o(`replaceTilde pr`,s),c=`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`):c=`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`,o(`tilde return`,c),c})},A=(e,t)=>e.trim().split(/\s+/).map(e=>j(e,t)).join(` `),j=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[u.CARETLOOSE]:c[u.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return E(n)?c=``:E(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},M=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>N(e,t)).join(` `)),N=(e,t)=>{e=e.trim();let n=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{if(o(`xRange`,e,n,r,i,a,s,c),D(i,a,s))return e;let l=E(i),u=l||E(a),d=u||E(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},P=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[u.STAR],``)),F=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],``)),I=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=E(r)?``:E(i)?`>=${r}.0.0${e?`-0`:``}`:E(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=E(l)?``:E(u)?`<${+l+1}.0.0-0`:E(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),L=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),G=e(((e,t)=>{var n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.value=this.semver===n?``:this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),this.semver=r[2]?new c(r[2],this.options.loose):n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new l(t.value,n).test(this.value):t.operator===``?t.value===``||new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var r=y(),{safeRe:i,t:a}=v(),o=U(),s=_(),c=x(),l=W()})),K=e(((e,t)=>{var n=W();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),re=e(((e,t)=>{var n=W();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),ie=e(((e,t)=>{var n=x(),r=W();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),ae=e(((e,t)=>{var n=x(),r=W();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),q=e(((e,t)=>{var n=x(),r=W(),i=L();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),J=e(((e,t)=>{var n=W();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Y=e(((e,t)=>{var n=x(),r=G(),{ANY:i}=r,a=W(),o=K(),s=L(),c=R(),l=H(),u=V();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),oe=e(((e,t)=>{var n=Y();t.exports=(e,t,r)=>n(e,t,`>`,r)})),se=e(((e,t)=>{var n=Y();t.exports=(e,t,r)=>n(e,t,`<`,r)})),ce=e(((e,t)=>{var n=W();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),le=e(((e,t)=>{var n=K(),r=j();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),ue=e(((e,t)=>{var n=W(),r=G(),{ANY:i}=r,a=K(),o=j(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!e.test(s.semver))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!e.test(u.semver))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s}));e(((e,t)=>{var n=v(),r=g(),i=x(),a=b();t.exports={parse:S(),valid:C(),clean:w(),inc:T(),diff:E(),major:D(),minor:O(),patch:k(),prerelease:A(),compare:j(),rcompare:M(),compareLoose:N(),compareBuild:P(),sort:F(),rsort:I(),gt:L(),lt:R(),eq:z(),neq:B(),gte:V(),lte:H(),cmp:U(),coerce:ee(),truncate:te(),Comparator:G(),Range:W(),satisfies:K(),toComparators:re(),maxSatisfying:ie(),minSatisfying:ae(),minVersion:q(),validRange:J(),outside:Y(),gtr:oe(),ltr:se(),intersects:ce(),simplifyRange:le(),subset:ue(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))();var de=d(`<span class=spinner aria-label=Carregando>`),fe=d(`<button>`),pe=d(`<label class=field__label><!$><!/><!$><!/><input class=input>`),me=d(`<input class=input>`),he=d(`<p class="field__error notice--error">`),ge=d(`<div><!$><!/><!$><!/><!$><!/>`),_e=d(`<span aria-hidden=true> *`),X=d(`<option value>`),ve=d(`<label class=field__label><!$><!/><select class=input><!$><!/><!$><!/>`),ye=d(`<select class=input><!$><!/><!$><!/>`),Z=d(`<div><!$><!/><!$><!/>`),Q=d(`<option>`),be=d(`<div class=card-header><h3>`),xe=d(`<span>`),Se=d(`<table class=table><thead><tr></tr></thead><tbody>`),Ce=d(`<div class=table-loading><span class=spinner aria-label=Carregando>`),we=d(`<p class=muted>`),Te=d(`<th>`),Ee=d(`<tr>`),De=d(`<td>`),$=d(`<div class=pagination><button class="btn btn-secondary btn-sm"type=button>← Anterior</button><span class=muted>Página <!$><!/> de <!$><!/></span><button class="btn btn-secondary btn-sm"type=button>Próxima →`),Oe=[`primary`,`secondary`,`danger`,`ghost`];function ke(e){let a=Oe.includes(e.variant)?e.variant:`secondary`,o=()=>[`btn`,`btn-${a}`,e.size===`sm`?`btn-sm`:``,e.class??``].filter(Boolean).join(` `);return(()=>{var a=f(fe);return a.$$click=()=>e.onClick?.(),u(a,r(n,{get when(){return e.loading},get fallback(){return e.children},get children(){return f(de)}})),t(t=>{var n=e.type??`button`,r=o(),s=e.disabled||e.loading;return n!==t.e&&h(a,`type`,t.e=n),r!==t.t&&m(a,t.t=r),s!==t.a&&i(a,`disabled`,t.a=s),t},{e:void 0,t:void 0,a:void 0}),c(),a})()}function Ae(e){let a=t=>{e.onInput?.(t.currentTarget.value)};return(()=>{var o=f(ge),l=o.firstChild,[d,g]=s(l.nextSibling),_=d.nextSibling,[v,y]=s(_.nextSibling),b=v.nextSibling,[x,S]=s(b.nextSibling);return u(o,r(n,{get when(){return e.label},get children(){var n=f(pe),r=n.firstChild,[o,l]=s(r.nextSibling),d=o.nextSibling,[m,g]=s(d.nextSibling),_=m.nextSibling;return u(n,()=>e.label,o,l),u(n,(()=>{var t=p(()=>!!e.required);return()=>t()?f(_e):null})(),m,g),_.$$input=a,t(t=>{var n=e.type??`text`,r=e.name,a=e.placeholder,o=e.disabled,s=e.required;return n!==t.e&&h(_,`type`,t.e=n),r!==t.t&&h(_,`name`,t.t=r),a!==t.a&&h(_,`placeholder`,t.a=a),o!==t.o&&i(_,`disabled`,t.o=o),s!==t.i&&i(_,`required`,t.i=s),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t(()=>i(_,`value`,e.value??``)),c(),n}}),d,g),u(o,r(n,{get when(){return!e.label},get children(){var n=f(me);return n.$$input=a,t(t=>{var r=e.type??`text`,a=e.name,o=e.placeholder,s=e.disabled,c=e.required;return r!==t.e&&h(n,`type`,t.e=r),a!==t.t&&h(n,`name`,t.t=a),o!==t.a&&h(n,`placeholder`,t.a=o),s!==t.o&&i(n,`disabled`,t.o=s),c!==t.i&&i(n,`required`,t.i=c),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),t(()=>i(n,`value`,e.value??``)),c(),n}}),v,y),u(o,r(n,{get when(){return e.error},get children(){var t=f(he);return u(t,()=>e.error),t}}),x,S),t(()=>m(o,`field ${e.class??``}`.trim())),o})()}function je(e){let a=e.options;return(()=>{var c=f(Z),l=c.firstChild,[d,p]=s(l.nextSibling),g=d.nextSibling,[_,v]=s(g.nextSibling);return u(c,r(n,{get when(){return e.label},get children(){var c=f(ve),l=c.firstChild,[d,p]=s(l.nextSibling),m=d.nextSibling,g=m.firstChild,[_,v]=s(g.nextSibling),y=_.nextSibling,[b,x]=s(y.nextSibling);return u(c,()=>e.label,d,p),m.addEventListener(`change`,t=>e.onChange?.(t.currentTarget.value)),u(m,r(n,{get when(){return e.placeholder},get children(){var t=f(X);return u(t,()=>e.placeholder),t}}),_,v),u(m,r(o,{each:a,children:e=>(()=>{var n=f(Q);return u(n,()=>e.label),t(()=>i(n,`value`,e.value)),n})()}),b,x),t(t=>{var n=e.name,r=e.disabled;return n!==t.e&&h(m,`name`,t.e=n),r!==t.t&&i(m,`disabled`,t.t=r),t},{e:void 0,t:void 0}),t(()=>i(m,`value`,e.value??``)),c}}),d,p),u(c,r(n,{get when(){return!e.label},get children(){var c=f(ye),l=c.firstChild,[d,p]=s(l.nextSibling),m=d.nextSibling,[g,_]=s(m.nextSibling);return c.addEventListener(`change`,t=>e.onChange?.(t.currentTarget.value)),u(c,r(n,{get when(){return e.placeholder},get children(){var t=f(X);return u(t,()=>e.placeholder),t}}),d,p),u(c,r(o,{each:a,children:e=>(()=>{var n=f(Q);return u(n,()=>e.label),t(()=>i(n,`value`,e.value)),n})()}),g,_),t(t=>{var n=e.name,r=e.disabled;return n!==t.e&&h(c,`name`,t.e=n),r!==t.t&&i(c,`disabled`,t.t=r),t},{e:void 0,t:void 0}),t(()=>i(c,`value`,e.value??``)),c}}),_,v),t(()=>m(c,`field ${e.class??``}`.trim())),c})()}function Me(e){return(()=>{var i=f(Z),a=i.firstChild,[o,c]=s(a.nextSibling),l=o.nextSibling,[d,p]=s(l.nextSibling);return u(i,r(n,{get when(){return e.title},get children(){var t=f(be),n=t.firstChild;return u(n,()=>e.title),t}}),o,c),u(i,()=>e.children,d,p),t(()=>m(i,`card ${e.class??``}`.trim())),i})()}function Ne(e){let t=e.variant??`secondary`;return(()=>{var n=f(xe);return m(n,`badge badge-${t}`),u(n,()=>e.children),n})()}function Pe(e){let i=e.columns;return r(n,{get when(){return!e.loading},get fallback(){return f(Ce)},get children(){return r(n,{get when(){return e.data.length>0},get fallback(){return(()=>{var t=f(we);return u(t,()=>e.emptyMessage??`Nenhum registro.`),t})()},get children(){var s=f(Se),c=s.firstChild,l=c.firstChild,d=c.nextSibling;return u(l,r(o,{each:i,children:e=>(()=>{var n=f(Te);return u(n,()=>e.label),t(t=>a(n,e.width?{width:e.width}:void 0,t)),n})()})),u(d,r(o,{get each(){return e.data},children:e=>(()=>{var t=f(Ee);return u(t,r(o,{each:i,children:t=>(()=>{var i=f(De);return u(i,r(n,{get when(){return t.render},get fallback(){return String(e[t.key]??``)},get children(){return t.render?.(e[t.key],e)}})),i})()})),t})()})),s}})}})}function Fe(e){let a=()=>Math.max(1,Math.ceil(e.total/Math.max(1,e.limit)));return r(n,{get when(){return a()>1},get children(){var n=f($),r=n.firstChild,o=r.nextSibling,l=o.firstChild.nextSibling,[d,p]=s(l.nextSibling),m=d.nextSibling.nextSibling,[h,g]=s(m.nextSibling),_=o.nextSibling;return r.$$click=()=>e.onPageChange(e.page-1),u(o,()=>e.page,d,p),u(o,a,h,g),_.$$click=()=>e.onPageChange(e.page+1),t(t=>{var n=e.page<=1,o=e.page>=a();return n!==t.e&&i(r,`disabled`,t.e=n),o!==t.t&&i(_,`disabled`,t.t=o),t},{e:void 0,t:void 0}),c(),n}})}l([`click`,`input`]);export{Fe as a,Ae as i,ke as n,je as o,Me as r,Pe as s,Ne as t};
@@ -1 +1 @@
1
- var e={name:`okcms`,version:`0.4.15`,private:!0,description:`Hybrid, modular, API-first CMS`,engines:{node:`>=20.0.0`,bun:`>=1.3.0`},workspaces:[`apps/*`,`packages/*`,`plugins/*`,`themes/*`],overrides:{ioredis:`5.3.0`},scripts:{dev:`bun run --filter '@oktis-works/*' dev`,build:`bun run --filter '@oktis-works/*' build`,test:`vitest`,"test:run":`vitest run`,lint:`eslint .`,typecheck:`tsc --noEmit`,clean:`rm -rf node_modules apps/*/node_modules packages/*/node_modules`,changeset:`changeset`,"version-packages":`changeset version`,"publish:all":`node scripts/prepare-publish.mjs && for pkg in packages/* apps/api apps/admin apps/web apps/worker; do [ -f "$pkg/package.json" ] || continue; echo "→ publishing $pkg"; (cd "$pkg" && npm publish --access public) || exit 1; done`},devDependencies:{"@changesets/changelog-github":`^1.0.1`,"@changesets/cli":`^3.0.3`,"@types/node":`22.0.0`,"@types/semver":`7.7.0`,"@typescript-eslint/eslint-plugin":`^8.71.0`,"@typescript-eslint/parser":`8.0.0`,autoprefixer:`^10.6.1`,eslint:`9.0.0`,playwright:`1.59.1`,"playwright-core":`1.59.1`,postcss:`^8.5.28`,sass:`^1.105.1`,tailwindcss:`^4.3.3`,typescript:`5.7.3`,"typescript-eslint":`8.31.0`,vitest:`3.0.0`},packageManager:`bun@1.3.14`}.version;export{e as t};
1
+ var e={name:`okcms`,version:`0.4.17`,private:!0,description:`Hybrid, modular, API-first CMS`,engines:{node:`>=20.0.0`,bun:`>=1.3.0`},workspaces:[`apps/*`,`packages/*`,`plugins/*`,`themes/*`],overrides:{ioredis:`5.3.0`},scripts:{dev:`bun run --filter '@oktis-works/*' dev`,build:`bun run --filter '@oktis-works/*' build`,test:`vitest`,"test:run":`vitest run`,lint:`eslint .`,typecheck:`tsc --noEmit`,clean:`rm -rf node_modules apps/*/node_modules packages/*/node_modules`,changeset:`changeset`,"version-packages":`changeset version`,"publish:all":`node scripts/prepare-publish.mjs && for pkg in packages/* apps/api apps/admin apps/web apps/worker; do [ -f "$pkg/package.json" ] || continue; echo "→ publishing $pkg"; (cd "$pkg" && npm publish --access public) || exit 1; done`},devDependencies:{"@changesets/changelog-github":`^1.0.1`,"@changesets/cli":`^3.0.3`,"@types/node":`22.0.0`,"@types/semver":`7.7.0`,"@typescript-eslint/eslint-plugin":`^8.71.0`,"@typescript-eslint/parser":`8.0.0`,autoprefixer:`^10.6.1`,eslint:`9.0.0`,playwright:`1.59.1`,"playwright-core":`1.59.1`,postcss:`^8.5.28`,sass:`^1.105.1`,tailwindcss:`^4.3.3`,typescript:`5.7.3`,"typescript-eslint":`8.31.0`,vitest:`3.0.0`},packageManager:`bun@1.3.14`}.version;export{e as t};
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" role="img" aria-label="OkCMS">
2
+ <defs>
3
+ <linearGradient id="gold" x1="0" y1="0" x2="32" y2="32" gradientUnits="userSpaceOnUse">
4
+ <stop offset="0" stop-color="#D8B45E"/>
5
+ <stop offset="1" stop-color="#B99542"/>
6
+ </linearGradient>
7
+ </defs>
8
+ <rect width="32" height="32" rx="8" fill="url(#gold)"/>
9
+ <path d="M8 10h16M8 16h12M8 22h8" fill="none" stroke="#0A0A0A" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
10
+ </svg>
@@ -20,13 +20,14 @@ async function renderScript(result, id) {
20
20
  //#region src/layouts/BaseLayout.astro
21
21
  createAstro("https://astro.build");
22
22
  var $$BaseLayout = createComponent(($$result, $$props, $$slots) => {
23
- const Astro = $$result.createAstro($$props, $$slots);
24
- Astro.self = $$BaseLayout;
25
- const { title, description } = Astro.props;
26
- const { locale, isRTL } = Astro.locals;
23
+ const Astro2 = $$result.createAstro($$props, $$slots);
24
+ Astro2.self = $$BaseLayout;
25
+ const { title, description } = Astro2.props;
26
+ const { locale, isRTL } = Astro2.locals;
27
27
  const htmlLang = locale ?? "en";
28
28
  const dir = isRTL ? "rtl" : "ltr";
29
- return renderTemplate`<html${addAttribute(htmlLang, "lang")}${addAttribute(dir, "dir")}><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description"${addAttribute(description ?? "OkCMS Admin Dashboard", "content")}><title>${title} | OkCMS</title><link rel="icon" type="image/svg+xml" href="/favicon.svg">${renderHead($$result)}</head><body>${renderSlot($$result, $$slots["default"])}</body></html>`;
29
+ const runtimeApiUrl = (typeof process !== "undefined" ? process.env.PUBLIC_API_URL?.trim() : "") || "";
30
+ return renderTemplate`<html${addAttribute(htmlLang, "lang")}${addAttribute(dir, "dir")}><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="description"${addAttribute(description ?? "OkCMS Admin Dashboard", "content")}><meta name="okcms-api-url"${addAttribute(runtimeApiUrl, "content")}><title>${title} | OkCMS</title><link rel="icon" type="image/svg+xml" href="/favicon.svg">${renderHead($$result)}</head><body>${renderSlot($$result, $$slots["default"])}</body></html>`;
30
31
  }, "/home/runner/work/cms/cms/apps/admin/src/layouts/BaseLayout.astro", void 0);
31
32
  //#endregion
32
33
  export { renderScript as n, $$BaseLayout as t };
@@ -1,5 +1,5 @@
1
- import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
2
- import { a as For2, d as createMemo$1, f as createSignal$1, l as Show2 } from "./DashboardLayout_KIUq60Dv.mjs";
1
+ import { n as useTranslation, r as apiClient } from "./i18n_BZdCNETS.mjs";
2
+ import { a as For2, d as createMemo$1, f as createSignal$1, l as Show2 } from "./DashboardLayout_B1lpShsT.mjs";
3
3
  import { t as FieldTypePicker } from "./FieldTypePicker_CXwpmcQ3.mjs";
4
4
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
5
5
  import { For, Show, createMemo, createSignal, onMount } from "solid-js";
@@ -1,8 +1,8 @@
1
1
  import "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, p as addAttribute, s as renderSlot, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_BmkfK9tu.mjs";
5
- import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_CH59YTvE.mjs";
4
+ import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_D1PbsjNG.mjs";
5
+ import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_BZdCNETS.mjs";
6
6
  import { t as require_semver } from "./semver_WbqCUY_o.mjs";
7
7
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey, ssrStyle } from "solid-js/web";
8
8
  import { For, For as For2, Show, Show as Show2, createMemo as createMemo$1, createSignal, createSignal as createSignal$1, onMount, onMount as onMount$1 } from "solid-js";
@@ -585,7 +585,7 @@ function AdminBar(props) {
585
585
  /** Versão do release atual (ex.: "0.4.0"). */
586
586
  var APP_VERSION = {
587
587
  name: "okcms",
588
- version: "0.4.15",
588
+ version: "0.4.17",
589
589
  "private": true,
590
590
  description: "Hybrid, modular, API-first CMS",
591
591
  engines: {
@@ -1,5 +1,5 @@
1
- import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
2
- import { a as For2, c as Select, f as createSignal, l as Show2, o as Input, p as onMount, r as Button, s as Pagination } from "./DashboardLayout_KIUq60Dv.mjs";
1
+ import { n as useTranslation, r as apiClient } from "./i18n_BZdCNETS.mjs";
2
+ import { a as For2, c as Select, f as createSignal, l as Show2, o as Input, p as onMount, r as Button, s as Pagination } from "./DashboardLayout_B1lpShsT.mjs";
3
3
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey, ssrStyleProperty } from "solid-js/web";
4
4
  //#region src/components/media/MediaLibrary.tsx
5
5
  var _tmpl$ = [
@@ -1,4 +1,4 @@
1
- import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
1
+ import { n as useTranslation, r as apiClient } from "./i18n_BZdCNETS.mjs";
2
2
  import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
3
3
  import { For, Show, createSignal, onMount } from "solid-js";
4
4
  //#region src/components/apps/settings/ResourceHubs.tsx
@@ -1,7 +1,7 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, p as addAttribute, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
4
+ import { t as $$DashboardLayout } from "./DashboardLayout_B1lpShsT.mjs";
5
5
  //#region src/pages/plugins/[slug].astro
6
6
  var _slug__exports = /* @__PURE__ */ __exportAll({
7
7
  default: () => $$Slug,
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
5
- import { t as AccessManager } from "./ResourceHubs_T-WuZoVF.mjs";
4
+ import { t as $$DashboardLayout } from "./DashboardLayout_B1lpShsT.mjs";
5
+ import { t as AccessManager } from "./ResourceHubs_SnzUKv2d.mjs";
6
6
  //#region src/pages/settings/access.astro
7
7
  var access_exports = /* @__PURE__ */ __exportAll({
8
8
  default: () => $$Access,
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
5
- import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_BZdCNETS.mjs";
5
+ import { t as $$DashboardLayout } from "./DashboardLayout_B1lpShsT.mjs";
6
6
  import { t as FieldTypePicker } from "./FieldTypePicker_CXwpmcQ3.mjs";
7
7
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
8
8
  import { For, Show, createMemo, createSignal, onMount } from "solid-js";
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
5
- import { t as ContentEditor } from "./ContentEditor_C-kz5cS4.mjs";
4
+ import { t as $$DashboardLayout } from "./DashboardLayout_B1lpShsT.mjs";
5
+ import { t as ContentEditor } from "./ContentEditor_B_alLPkZ.mjs";
6
6
  //#region src/pages/content/edit.astro
7
7
  var edit_exports = /* @__PURE__ */ __exportAll({
8
8
  default: () => $$Edit,
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
5
- import { c as Select, d as createMemo, f as createSignal, i as Card, l as Show2, o as Input, p as onMount, r as Button, t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_BZdCNETS.mjs";
5
+ import { c as Select, d as createMemo, f as createSignal, i as Card, l as Show2, o as Input, p as onMount, r as Button, t as $$DashboardLayout } from "./DashboardLayout_B1lpShsT.mjs";
6
6
  import { createComponent, escape, memo, ssr, ssrHydrationKey } from "solid-js/web";
7
7
  //#region src/components/apps/settings/GeneralSettings.tsx
8
8
  var _tmpl$ = [
@@ -108,7 +108,14 @@ async function loadLocale(locale) {
108
108
  }
109
109
  //#endregion
110
110
  //#region src/lib/api.ts
111
- var API_BASE = "";
111
+ function resolveApiBase() {
112
+ if (typeof document !== "undefined") {
113
+ const runtimeUrl = document.querySelector("meta[name=\"okcms-api-url\"]")?.getAttribute("content")?.trim();
114
+ if (runtimeUrl) return runtimeUrl.replace(/\/$/, "");
115
+ }
116
+ return "";
117
+ }
118
+ var API_BASE = resolveApiBase();
112
119
  var ApiClient = class {
113
120
  baseUrl;
114
121
  csrfToken = null;
@@ -1,7 +1,7 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
4
+ import { t as $$DashboardLayout } from "./DashboardLayout_B1lpShsT.mjs";
5
5
  //#region src/pages/settings/index.astro
6
6
  var settings_exports = /* @__PURE__ */ __exportAll({
7
7
  default: () => $$Index,
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent } from "./compiler_O7J1rlsi.mjs";
4
- import { t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
5
- import { t as MediaLibrary } from "./MediaLibrary_C-lJBpPG.mjs";
4
+ import { t as $$DashboardLayout } from "./DashboardLayout_B1lpShsT.mjs";
5
+ import { t as MediaLibrary } from "./MediaLibrary_B_mkxyGz.mjs";
6
6
  //#region src/pages/media/index.astro
7
7
  var media_exports = /* @__PURE__ */ __exportAll({
8
8
  default: () => $$Index,
@@ -1,8 +1,8 @@
1
1
  import { r as __exportAll } from "./rolldown-runtime_BMI-E3GI.mjs";
2
2
  import { S as createAstro, d as maybeRenderHead, i as renderComponent, u as renderTemplate } from "./server_B5N27szj.mjs";
3
3
  import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
4
- import { n as useTranslation, r as apiClient } from "./i18n_CH59YTvE.mjs";
5
- import { a as For2, c as Select, f as createSignal, l as Show2, n as Badge, o as Input, p as onMount, r as Button, s as Pagination, t as $$DashboardLayout } from "./DashboardLayout_KIUq60Dv.mjs";
4
+ import { n as useTranslation, r as apiClient } from "./i18n_BZdCNETS.mjs";
5
+ import { a as For2, c as Select, f as createSignal, l as Show2, n as Badge, o as Input, p as onMount, r as Button, s as Pagination, t as $$DashboardLayout } from "./DashboardLayout_B1lpShsT.mjs";
6
6
  import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
7
7
  //#region src/components/apps/users/UsersManager.tsx
8
8
  var _tmpl$ = [