@oktis-works/admin 0.5.4 → 0.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/_astro/{ActivityWidget.BNFwjO71.js → ActivityWidget.CLFjbNJf.js} +1 -1
- package/dist/client/_astro/{AdminBar.DRgRB1PC.js → AdminBar.CKYNoMCz.js} +1 -1
- package/dist/client/_astro/{AtGlanceWidget.h60KI_JU.js → AtGlanceWidget.rW3GsIjs.js} +1 -1
- package/dist/client/_astro/{ContentEditor.BDb6qSSI.js → ContentEditor.BmpwqkNT.js} +1 -1
- package/dist/client/_astro/ContentEditor.saSUoKf0.js +1 -0
- package/dist/client/_astro/ContentTypeWorkspace.00bHkcJD.js +1 -0
- package/dist/client/_astro/{DashboardHome.1vPxu78E.js → DashboardHome.DCz0EiH2.js} +1 -1
- package/dist/client/_astro/{DashboardLayout.astro_astro_type_script_index_0_lang.D3odZySo.js → DashboardLayout.astro_astro_type_script_index_0_lang.DdRNBOsR.js} +1 -1
- package/dist/client/_astro/{FieldGroupEditor.C9U6-zxk.js → FieldGroupEditor.Bdm2FW0L.js} +1 -1
- package/dist/client/_astro/{FieldGroupList.DYFBUBY7.js → FieldGroupList.BaNTs6an.js} +1 -1
- package/dist/client/_astro/{Footer.BwLmoHuk.js → Footer.BqulPU-0.js} +1 -1
- package/dist/client/_astro/GeneralSettings.BH-f6pL0.js +1 -0
- package/dist/client/_astro/{LogsManager.CBwBkCUP.js → LogsManager.1c_AlgX8.js} +1 -1
- package/dist/client/_astro/MediaLibrary.DH7eqign.js +1 -0
- package/dist/client/_astro/{MenuManager.BhYhygsR.js → MenuManager.CLPv5Ths.js} +1 -1
- package/dist/client/_astro/{PluginManager.DxAKvMfM.js → PluginManager.Duzn64IF.js} +1 -1
- package/dist/client/_astro/{PostTypesManager.DLymaQPT.js → PostTypesManager.BHKbIEwD.js} +1 -1
- package/dist/client/_astro/{QuickDraftWidget.CfUR8qmY.js → QuickDraftWidget.DLKpQRu8.js} +1 -1
- package/dist/client/_astro/{ResourceHubs.BnINa0O3.js → ResourceHubs.CL3KxW6a.js} +1 -1
- package/dist/client/_astro/{TaxonomiesManager.1EZYO2u5.js → TaxonomiesManager.DEwFIIP9.js} +1 -1
- package/dist/client/_astro/{TaxonomyTermsManager.YXbuam33.js → TaxonomyTermsManager.DWljfgZH.js} +1 -1
- package/dist/client/_astro/{ThemeManager.EFMZJdmx.js → ThemeManager.CAGeBTsz.js} +1 -1
- package/dist/client/_astro/{UserCreateForm.C_m7ovUU.js → UserCreateForm.wCOVD_YS.js} +1 -1
- package/dist/client/_astro/UsersManager.RHbgYhoE.js +1 -0
- package/dist/client/_astro/{WebhooksManager.CKRtabi3.js → WebhooksManager.B-g7Wbit.js} +1 -1
- package/dist/client/_astro/api.CGA0D2A2.js +1 -0
- package/dist/client/_astro/extensions.CKCZC04g.js +1 -0
- package/dist/client/_astro/{i18n.EKfvSb1v.js → i18n.3zKFZ7KU.js} +1 -1
- package/dist/client/_astro/{login.astro_astro_type_script_index_0_lang.D8XVBan6.js → login.astro_astro_type_script_index_0_lang.DzXBvx_L.js} +1 -1
- package/dist/client/_astro/src.DQwsXUur.js +1 -0
- package/dist/client/_astro/{version.B4bPYHRP.js → version.DMCc00VQ.js} +1 -1
- package/dist/server/chunks/{ContentEditor_DfYDk5IM.mjs → ContentEditor_BJIimcCo.mjs} +525 -2
- package/dist/server/chunks/{DashboardLayout_7Gcd6oTS.mjs → DashboardLayout_65mMCENw.mjs} +9 -6
- package/dist/server/chunks/{MediaLibrary_fu8AtNog.mjs → MediaLibrary_C0RSa4ta.mjs} +2 -2
- package/dist/server/chunks/{_id__BVLdyCKg.mjs → _id__DxVKarzj.mjs} +2 -2
- package/dist/server/chunks/{_slug__DG6xjEan.mjs → _slug__CzAHP75q.mjs} +1 -1
- package/dist/server/chunks/{access_B8fU0pWq.mjs → access_Ckqo1E-w.mjs} +2 -2
- package/dist/server/chunks/{custom-fields_BOqCiSPQ.mjs → custom-fields_Bahyrq-n.mjs} +2 -2
- package/dist/server/chunks/{dist_D98LO9y-.mjs → dist_CP9QIrJI.mjs} +2 -1394
- package/dist/server/chunks/{edit_C27RHq7N.mjs → edit_D5xfX3vT.mjs} +2 -2
- package/dist/server/chunks/{general_TSviTaPT.mjs → general_Cl6S80ws.mjs} +2 -2
- package/dist/server/chunks/{i18n_Co0XNC0I.mjs → i18n_B-Vk5esc.mjs} +4 -1
- package/dist/server/chunks/{index_BwaqRmvv.mjs → index_-cQPQBUp.mjs} +2 -2
- package/dist/server/chunks/{index_t5k7sOZ8.mjs → index_BHrQe5Hj.mjs} +3 -3
- package/dist/server/chunks/{index_CCNhQxvS.mjs → index_C2ozXuTS.mjs} +2 -2
- package/dist/server/chunks/{index_40l_yCUu.mjs → index_C58uHJZI.mjs} +1 -1
- package/dist/server/chunks/{index_CRSTdqw0.mjs → index_DqA4Ie-S.mjs} +2 -2
- package/dist/server/chunks/{logs_DrjJ6S6J.mjs → logs_Bf4fqT8n.mjs} +2 -2
- package/dist/server/chunks/{menus_DjfOcrez.mjs → menus_Cq6sQKRq.mjs} +2 -2
- package/dist/server/chunks/{new_DNNbQ1Zw.mjs → new_B-geMMoa.mjs} +2 -2
- package/dist/server/chunks/{new_B484WwaA.mjs → new_DM3-Wq-j.mjs} +2 -2
- package/dist/server/chunks/{node_CECPlmah.mjs → node_kWZa8y--.mjs} +1 -1
- package/dist/server/chunks/{plugins_Bhuk-oUR.mjs → plugins_BnnK185w.mjs} +2 -2
- package/dist/server/chunks/{post-types_BtisIanW.mjs → post-types_BJz6Zjgo.mjs} +2 -2
- package/dist/server/chunks/semver_WbqCUY_o.mjs +1395 -0
- package/dist/server/chunks/{sharp_DQfjpH-u.mjs → sharp_37gnUicY.mjs} +2 -2
- package/dist/server/chunks/{taxonomies_CHJK2gT1.mjs → taxonomies_ygpYI9wq.mjs} +2 -2
- package/dist/server/chunks/{taxonomy_DboKpEOu.mjs → taxonomy_b8pfYEmY.mjs} +2 -2
- package/dist/server/chunks/{themes_MC8vERGL.mjs → themes_M56sjN9n.mjs} +2 -2
- package/dist/server/chunks/{upload_BMoVV-rt.mjs → upload_B2dn_wjn.mjs} +2 -2
- package/dist/server/chunks/{webhooks_EHN9q7Yv.mjs → webhooks_BlAAcsf_.mjs} +2 -2
- package/dist/server/entry.mjs +24 -24
- package/dist/server/virtual_astro_middleware.mjs +1 -1
- package/package.json +5 -5
- package/dist/client/_astro/ContentEditor.QGAstGzA.js +0 -1
- package/dist/client/_astro/ContentTypeWorkspace.K35mfD2P.js +0 -1
- package/dist/client/_astro/GeneralSettings.EU3z_sSD.js +0 -1
- package/dist/client/_astro/MediaLibrary.D56bkgPF.js +0 -1
- package/dist/client/_astro/UsersManager.t4-9GwDK.js +0 -1
- package/dist/client/_astro/api.CM0tblEa.js +0 -1
- package/dist/client/_astro/dist.D-evrPNi.js +0 -1
- package/dist/client/_astro/extensions.OpEcHTzv.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./rolldown-runtime.BpQH8Ho1.js";import{_ as t,d as n,i as r,l as i,r as a,s as o}from"./solid.8gBSxpeo.js";import{a as s,c,d as l,f as u,i as d,m as f,n as p,p as m,r as h,s as g,u as _}from"./web.DwNv8rLL.js";var v=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}})),y=e(((e,t)=>{t.exports=typeof process==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),b=e(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=v(),a=y();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*$`)})),x=e(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),S=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)}})),C=e(((e,t)=>{var n=y(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=v(),{safeRe:a,t:o}=b(),s=x(),{compareIdentifiers:c}=S(),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}}})),w=e(((e,t)=>{var n=C();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}}})),T=e(((e,t)=>{var n=w();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),E=e(((e,t)=>{var n=w();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),D=e(((e,t)=>{var n=C();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}}})),O=e(((e,t)=>{var n=w();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`}})),k=e(((e,t)=>{var n=C();t.exports=(e,t)=>new n(e,t).major})),A=e(((e,t)=>{var n=C();t.exports=(e,t)=>new n(e,t).minor})),j=e(((e,t)=>{var n=C();t.exports=(e,t)=>new n(e,t).patch})),M=e(((e,t)=>{var n=w();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),N=e(((e,t)=>{var n=C();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),P=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>n(t,e,r)})),F=e(((e,t)=>{var n=N();t.exports=(e,t)=>n(e,t,!0)})),I=e(((e,t)=>{var n=C();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),L=e(((e,t)=>{var n=I();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),ee=e(((e,t)=>{var n=I();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),R=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>n(e,t,r)>0})),z=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>n(e,t,r)<0})),B=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>n(e,t,r)===0})),V=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>n(e,t,r)!==0})),H=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>n(e,t,r)>=0})),U=e(((e,t)=>{var n=N();t.exports=(e,t,r)=>n(e,t,r)<=0})),W=e(((e,t)=>{var n=B(),r=V(),i=R(),a=H(),o=z(),s=U();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}`)}}})),te=e(((e,t)=>{var n=C(),r=w(),{safeRe:i,t:a}=b();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)}})),ne=e(((e,t)=>{var n=w(),r=v(),i=C(),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})),re=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}}})),G=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=>!_(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&&S(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(g,``);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 v=new Map,y=l.map(e=>new a(e,this.options));for(let e of y){if(_(e))return[e];v.set(e.value,e)}v.size>1&&v.has(``)&&v.delete(``);let b=[...v.values()];return r.set(t,b),b}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(re()),i=x(),a=K(),o=y(),s=C(),{safeRe:c,src:l,t:u,comparatorTrimReplace:d,tildeTrimReplace:f,caretTrimReplace:p}=b(),{FLAG_INCLUDE_PRERELEASE:m,FLAG_LOOSE:h}=v(),g=new RegExp(l[u.BUILD],`g`),_=e=>e.value===`<0.0.0-0`,S=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}})),K=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=x(),{safeRe:i,t:a}=b(),o=W(),s=y(),c=C(),l=G()})),q=e(((e,t)=>{var n=G();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),ie=e(((e,t)=>{var n=G();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),ae=e(((e,t)=>{var n=C(),r=G();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}})),J=e(((e,t)=>{var n=C(),r=G();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}})),oe=e(((e,t)=>{var n=C(),r=G(),i=R();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}})),se=e(((e,t)=>{var n=G();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),Y=e(((e,t)=>{var n=C(),r=K(),{ANY:i}=r,a=G(),o=q(),s=R(),c=z(),l=U(),u=H();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}})),ce=e(((e,t)=>{var n=Y();t.exports=(e,t,r)=>n(e,t,`>`,r)})),le=e(((e,t)=>{var n=Y();t.exports=(e,t,r)=>n(e,t,`<`,r)})),ue=e(((e,t)=>{var n=G();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),de=e(((e,t)=>{var n=q(),r=N();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}})),fe=e(((e,t)=>{var n=G(),r=K(),{ANY:i}=r,a=q(),o=N(),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=b(),r=v(),i=C(),a=S();t.exports={parse:w(),valid:T(),clean:E(),inc:D(),diff:O(),major:k(),minor:A(),patch:j(),prerelease:M(),compare:N(),rcompare:P(),compareLoose:F(),compareBuild:I(),sort:L(),rsort:ee(),gt:R(),lt:z(),eq:B(),neq:V(),gte:H(),lte:U(),cmp:W(),coerce:te(),truncate:ne(),Comparator:K(),Range:G(),satisfies:q(),toComparators:ie(),maxSatisfying:ae(),minSatisfying:J(),minVersion:oe(),validRange:se(),outside:Y(),gtr:ce(),ltr:le(),intersects:ue(),simplifyRange:de(),subset:fe(),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 pe=f(`<span class=spinner aria-label=Carregando>`),me=f(`<button>`),he=f(`<label class=field__label><!$><!/><!$><!/><input class=input>`),ge=f(`<input class=input>`),_e=f(`<p class="field__error notice--error">`),ve=f(`<div><!$><!/><!$><!/><!$><!/>`),ye=f(`<span aria-hidden=true> *`),X=f(`<option value>`),be=f(`<label class=field__label><!$><!/><select class=input><!$><!/><!$><!/>`),xe=f(`<select class=input><!$><!/><!$><!/>`),Z=f(`<div><!$><!/><!$><!/>`),Q=f(`<option>`),Se=f(`<div class=card-header><h3>`),Ce=f(`<span>`),we=f(`<div class=modal-overlay><div class=modal role=dialog aria-modal=true><div class=modal-header><h3></h3><button type=button class="btn btn-ghost btn-sm"aria-label=Fechar>×</button></div><div class=modal-body>`),Te=f(`<table class=table><thead><tr></tr></thead><tbody>`),Ee=f(`<div class=table-loading><span class=spinner aria-label=Carregando>`),De=f(`<p class=muted>`),Oe=f(`<th>`),$=f(`<tr>`),ke=f(`<td>`),Ae=f(`<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 →`),je=[`primary`,`secondary`,`danger`,`ghost`];function Me(e){let t=je.includes(e.variant)?e.variant:`secondary`,i=()=>[`btn`,`btn-${t}`,e.size===`sm`?`btn-sm`:``,e.class??``].filter(Boolean).join(` `);return(()=>{var t=d(me);return t.$$click=()=>e.onClick?.(),g(t,o(r,{get when(){return e.loading},get fallback(){return e.children},get children(){return d(pe)}})),n(n=>{var r=e.type??`button`,a=i(),o=e.disabled||e.loading;return r!==n.e&&l(t,`type`,n.e=r),a!==n.t&&p(t,n.t=a),o!==n.a&&u(t,`disabled`,n.a=o),n},{e:void 0,t:void 0,a:void 0}),_(),t})()}function Ne(e){let t=t=>{e.onInput?.(t.currentTarget.value)};return(()=>{var i=d(ve),a=i.firstChild,[f,m]=s(a.nextSibling),h=f.nextSibling,[v,y]=s(h.nextSibling),b=v.nextSibling,[x,S]=s(b.nextSibling);return g(i,o(r,{get when(){return e.label},get children(){var r=d(he),i=r.firstChild,[a,o]=s(i.nextSibling),f=a.nextSibling,[p,m]=s(f.nextSibling),h=p.nextSibling;return g(r,()=>e.label,a,o),g(r,(()=>{var t=c(()=>!!e.required);return()=>t()?d(ye):null})(),p,m),h.$$input=t,n(t=>{var n=e.type??`text`,r=e.name,i=e.placeholder,a=e.disabled,o=e.required;return n!==t.e&&l(h,`type`,t.e=n),r!==t.t&&l(h,`name`,t.t=r),i!==t.a&&l(h,`placeholder`,t.a=i),a!==t.o&&u(h,`disabled`,t.o=a),o!==t.i&&u(h,`required`,t.i=o),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),n(()=>u(h,`value`,e.value??``)),_(),r}}),f,m),g(i,o(r,{get when(){return!e.label},get children(){var r=d(ge);return r.$$input=t,n(t=>{var n=e.type??`text`,i=e.name,a=e.placeholder,o=e.disabled,s=e.required;return n!==t.e&&l(r,`type`,t.e=n),i!==t.t&&l(r,`name`,t.t=i),a!==t.a&&l(r,`placeholder`,t.a=a),o!==t.o&&u(r,`disabled`,t.o=o),s!==t.i&&u(r,`required`,t.i=s),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),n(()=>u(r,`value`,e.value??``)),_(),r}}),v,y),g(i,o(r,{get when(){return e.error},get children(){var t=d(_e);return g(t,()=>e.error),t}}),x,S),n(()=>p(i,`field ${e.class??``}`.trim())),i})()}function Pe(e){let t=e.options;return(()=>{var i=d(Z),c=i.firstChild,[f,m]=s(c.nextSibling),h=f.nextSibling,[_,v]=s(h.nextSibling);return g(i,o(r,{get when(){return e.label},get children(){var i=d(be),c=i.firstChild,[f,p]=s(c.nextSibling),m=f.nextSibling,h=m.firstChild,[_,v]=s(h.nextSibling),y=_.nextSibling,[b,x]=s(y.nextSibling);return g(i,()=>e.label,f,p),m.addEventListener(`change`,t=>e.onChange?.(t.currentTarget.value)),g(m,o(r,{get when(){return e.placeholder},get children(){var t=d(X);return g(t,()=>e.placeholder),t}}),_,v),g(m,o(a,{each:t,children:e=>(()=>{var t=d(Q);return g(t,()=>e.label),n(()=>u(t,`value`,e.value)),t})()}),b,x),n(t=>{var n=e.name,r=e.disabled;return n!==t.e&&l(m,`name`,t.e=n),r!==t.t&&u(m,`disabled`,t.t=r),t},{e:void 0,t:void 0}),n(()=>u(m,`value`,e.value??``)),i}}),f,m),g(i,o(r,{get when(){return!e.label},get children(){var i=d(xe),c=i.firstChild,[f,p]=s(c.nextSibling),m=f.nextSibling,[h,_]=s(m.nextSibling);return i.addEventListener(`change`,t=>e.onChange?.(t.currentTarget.value)),g(i,o(r,{get when(){return e.placeholder},get children(){var t=d(X);return g(t,()=>e.placeholder),t}}),f,p),g(i,o(a,{each:t,children:e=>(()=>{var t=d(Q);return g(t,()=>e.label),n(()=>u(t,`value`,e.value)),t})()}),h,_),n(t=>{var n=e.name,r=e.disabled;return n!==t.e&&l(i,`name`,t.e=n),r!==t.t&&u(i,`disabled`,t.t=r),t},{e:void 0,t:void 0}),n(()=>u(i,`value`,e.value??``)),i}}),_,v),n(()=>p(i,`field ${e.class??``}`.trim())),i})()}function Fe(e){return(()=>{var t=d(Z),i=t.firstChild,[a,c]=s(i.nextSibling),l=a.nextSibling,[u,f]=s(l.nextSibling);return g(t,o(r,{get when(){return e.title},get children(){var t=d(Se),n=t.firstChild;return g(n,()=>e.title),t}}),a,c),g(t,()=>e.children,u,f),n(()=>p(t,`card ${e.class??``}`.trim())),t})()}function Ie(e){let t=e.variant??`secondary`;return(()=>{var n=d(Ce);return p(n,`badge badge-${t}`),g(n,()=>e.children),n})()}function Le(e){let a=t=>{t.key===`Escape`&&e.onClose()};return i(()=>{e.open?document.addEventListener(`keydown`,a):document.removeEventListener(`keydown`,a)}),t(()=>document.removeEventListener(`keydown`,a)),o(r,{get when(){return e.open},get children(){var t=d(we),r=t.firstChild,i=r.firstChild,a=i.firstChild,o=a.nextSibling,s=i.nextSibling;return t.$$click=t=>{t.target===t.currentTarget&&e.onClose()},g(a,()=>e.title),o.$$click=()=>e.onClose(),g(s,()=>e.children),n(()=>l(r,`aria-label`,e.title)),_(),t}})}function Re(e){let t=e.columns;return o(r,{get when(){return!e.loading},get fallback(){return d(Ee)},get children(){return o(r,{get when(){return e.data.length>0},get fallback(){return(()=>{var t=d(De);return g(t,()=>e.emptyMessage??`Nenhum registro.`),t})()},get children(){var i=d(Te),s=i.firstChild,c=s.firstChild,l=s.nextSibling;return g(c,o(a,{each:t,children:e=>(()=>{var t=d(Oe);return g(t,()=>e.label),n(n=>m(t,e.width?{width:e.width}:void 0,n)),t})()})),g(l,o(a,{get each(){return e.data},children:e=>(()=>{var n=d($);return g(n,o(a,{each:t,children:t=>(()=>{var n=d(ke);return g(n,o(r,{get when(){return t.render},get fallback(){return String(e[t.key]??``)},get children(){return t.render?.(e[t.key],e)}})),n})()})),n})()})),i}})}})}function ze(e){let t=()=>Math.max(1,Math.ceil(e.total/Math.max(1,e.limit)));return o(r,{get when(){return t()>1},get children(){var r=d(Ae),i=r.firstChild,a=i.nextSibling,o=a.firstChild.nextSibling,[c,l]=s(o.nextSibling),f=c.nextSibling.nextSibling,[p,m]=s(f.nextSibling),h=a.nextSibling;return i.$$click=()=>e.onPageChange(e.page-1),g(a,()=>e.page,c,l),g(a,t,p,m),h.$$click=()=>e.onPageChange(e.page+1),n(n=>{var r=e.page<=1,a=e.page>=t();return r!==n.e&&u(i,`disabled`,n.e=r),a!==n.t&&u(h,`disabled`,n.t=a),n},{e:void 0,t:void 0}),_(),r}})}h([`click`,`input`]);export{Le as a,Re as c,Ne as i,Me as n,ze as o,Fe as r,Pe as s,Ie as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={name:`okcms`,version:`0.5.
|
|
1
|
+
var e={name:`okcms`,version:`0.5.6`,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:{"@oktis-works/cms":`^0.5.5`,"@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,7 +1,530 @@
|
|
|
1
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
2
|
-
import { a as For2, f as createMemo$1,
|
|
1
|
+
import { n as useTranslation, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
2
|
+
import { a as For2, f as createMemo$1, p as createSignal$1, u as Show2 } from "./DashboardLayout_65mMCENw.mjs";
|
|
3
3
|
import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey } from "solid-js/web";
|
|
4
4
|
import { For, Show, createMemo, createSignal, onMount } from "solid-js";
|
|
5
|
+
//#region ../../packages/validation/dist/client-validate.js
|
|
6
|
+
function isEmptyValue(value) {
|
|
7
|
+
if (value === null || value === void 0) return true;
|
|
8
|
+
if (typeof value === "string") return value.trim() === "";
|
|
9
|
+
if (Array.isArray(value)) return value.length === 0;
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
function checkRequired(value, required, field, errors) {
|
|
13
|
+
if (!required) return true;
|
|
14
|
+
if (isEmptyValue(value)) {
|
|
15
|
+
errors.push({
|
|
16
|
+
field,
|
|
17
|
+
code: "REQUIRED",
|
|
18
|
+
message: `${field} é obrigatório`
|
|
19
|
+
});
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
function validateTextLike(value, config, field, errors) {
|
|
25
|
+
if (isEmptyValue(value)) return;
|
|
26
|
+
const str = String(value);
|
|
27
|
+
const minLength = config["minLength"] ?? config["minimum"];
|
|
28
|
+
const characterLimit = config["characterLimit"] ?? config["maxLength"];
|
|
29
|
+
if (minLength !== void 0 && str.length < minLength) errors.push({
|
|
30
|
+
field,
|
|
31
|
+
code: "MIN_LENGTH",
|
|
32
|
+
message: `${field} deve ter pelo menos ${minLength} caracteres`
|
|
33
|
+
});
|
|
34
|
+
if (characterLimit !== void 0 && str.length > characterLimit) errors.push({
|
|
35
|
+
field,
|
|
36
|
+
code: "CHARACTER_LIMIT",
|
|
37
|
+
message: `${field} excede o limite de ${characterLimit} caracteres`
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function validateEmail(value, field, errors) {
|
|
41
|
+
if (isEmptyValue(value)) return;
|
|
42
|
+
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(value))) errors.push({
|
|
43
|
+
field,
|
|
44
|
+
code: "INVALID_EMAIL",
|
|
45
|
+
message: `${field} não é um e-mail válido`
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function validateUrl(value, field, errors) {
|
|
49
|
+
if (isEmptyValue(value)) return;
|
|
50
|
+
try {
|
|
51
|
+
const parsed = new URL(String(value));
|
|
52
|
+
if (!["http:", "https:"].includes(parsed.protocol)) throw new Error("protocol");
|
|
53
|
+
} catch {
|
|
54
|
+
errors.push({
|
|
55
|
+
field,
|
|
56
|
+
code: "INVALID_URL",
|
|
57
|
+
message: `${field} não é uma URL válida (http/https)`
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function validateNumber(value, config, field, errors) {
|
|
62
|
+
if (isEmptyValue(value)) return;
|
|
63
|
+
const num = Number(value);
|
|
64
|
+
if (Number.isNaN(num)) {
|
|
65
|
+
errors.push({
|
|
66
|
+
field,
|
|
67
|
+
code: "NOT_A_NUMBER",
|
|
68
|
+
message: `${field} deve ser um número`
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const minValue = config["minValue"] ?? config["min"];
|
|
73
|
+
const maxValue = config["maxValue"] ?? config["max"];
|
|
74
|
+
const step = config["step"];
|
|
75
|
+
if (minValue !== void 0 && num < minValue) errors.push({
|
|
76
|
+
field,
|
|
77
|
+
code: "MIN_VALUE",
|
|
78
|
+
message: `${field} deve ser maior ou igual a ${minValue}`
|
|
79
|
+
});
|
|
80
|
+
if (maxValue !== void 0 && num > maxValue) errors.push({
|
|
81
|
+
field,
|
|
82
|
+
code: "MAX_VALUE",
|
|
83
|
+
message: `${field} deve ser menor ou igual a ${maxValue}`
|
|
84
|
+
});
|
|
85
|
+
if (step !== void 0 && step > 0) {
|
|
86
|
+
const base = minValue ?? 0;
|
|
87
|
+
if (Math.abs((num - base) / step - Math.round((num - base) / step)) > 1e-9) errors.push({
|
|
88
|
+
field,
|
|
89
|
+
code: "STEP_MISMATCH",
|
|
90
|
+
message: `${field} deve seguir o incremento de ${step}`
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function getValidChoiceValues(config) {
|
|
95
|
+
const choices = config["choices"] ?? [];
|
|
96
|
+
return new Set(choices.map((c) => String(c.value)));
|
|
97
|
+
}
|
|
98
|
+
function checkClosedSet(value, valid, allowCustom, field, errors) {
|
|
99
|
+
if (allowCustom) return;
|
|
100
|
+
if (!valid.has(String(value))) errors.push({
|
|
101
|
+
field,
|
|
102
|
+
code: "INVALID_CHOICE",
|
|
103
|
+
message: `${field} contém um valor fora das opções permitidas`
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function checkSelectionCount(values, config, field, errors) {
|
|
107
|
+
const min = config["minSelections"];
|
|
108
|
+
const max = config["maxSelections"];
|
|
109
|
+
if (min !== void 0 && values.length < min) errors.push({
|
|
110
|
+
field,
|
|
111
|
+
code: "MIN_SELECTIONS",
|
|
112
|
+
message: `${field} requer no mínimo ${min} seleção(ões)`
|
|
113
|
+
});
|
|
114
|
+
if (max !== void 0 && values.length > max) errors.push({
|
|
115
|
+
field,
|
|
116
|
+
code: "MAX_SELECTIONS",
|
|
117
|
+
message: `${field} permite no máximo ${max} seleção(ões)`
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
function validateSelect(value, config, field, errors) {
|
|
121
|
+
if (isEmptyValue(value)) return;
|
|
122
|
+
const multiple = Boolean(config["multiple"]);
|
|
123
|
+
const allowCustom = Boolean(config["allowCustom"] ?? false);
|
|
124
|
+
const valid = getValidChoiceValues(config);
|
|
125
|
+
if (multiple) {
|
|
126
|
+
if (!Array.isArray(value)) {
|
|
127
|
+
errors.push({
|
|
128
|
+
field,
|
|
129
|
+
code: "NOT_ARRAY",
|
|
130
|
+
message: `${field} deve ser uma lista`
|
|
131
|
+
});
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
if (!allowCustom) for (const item of value) checkClosedSet(item, valid, false, field, errors);
|
|
135
|
+
checkSelectionCount(value, config, field, errors);
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
checkClosedSet(value, valid, allowCustom, field, errors);
|
|
139
|
+
if (Array.isArray(value)) errors.push({
|
|
140
|
+
field,
|
|
141
|
+
code: "SINGLE_ONLY",
|
|
142
|
+
message: `${field} aceita apenas um valor`
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function validateCheckbox(value, config, field, errors) {
|
|
146
|
+
if (isEmptyValue(value)) return;
|
|
147
|
+
if (!Array.isArray(value)) {
|
|
148
|
+
errors.push({
|
|
149
|
+
field,
|
|
150
|
+
code: "NOT_ARRAY",
|
|
151
|
+
message: `${field} deve ser uma lista de valores`
|
|
152
|
+
});
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
const valid = getValidChoiceValues(config);
|
|
156
|
+
for (const item of value) checkClosedSet(item, valid, true, field, errors);
|
|
157
|
+
checkSelectionCount(value, config, field, errors);
|
|
158
|
+
}
|
|
159
|
+
function validateRadio(value, config, field, errors) {
|
|
160
|
+
if (isEmptyValue(value)) return;
|
|
161
|
+
checkClosedSet(value, getValidChoiceValues(config), Boolean(config["allowCustom"]), field, errors);
|
|
162
|
+
}
|
|
163
|
+
function validateTrueFalse(value, field, errors) {
|
|
164
|
+
if (value === null || value === void 0) return;
|
|
165
|
+
if (!(typeof value === "boolean" || value === 0 || value === 1 || value === "0" || value === "1")) errors.push({
|
|
166
|
+
field,
|
|
167
|
+
code: "NOT_BOOLEAN",
|
|
168
|
+
message: `${field} deve ser verdadeiro ou falso`
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
function validateMediaItem(item, config, field, errors) {
|
|
172
|
+
if (typeof item !== "object" || item === null || Array.isArray(item)) {
|
|
173
|
+
errors.push({
|
|
174
|
+
field,
|
|
175
|
+
code: "INVALID_MEDIA",
|
|
176
|
+
message: `${field} deve referenciar uma mídia válida`
|
|
177
|
+
});
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
const media = item;
|
|
181
|
+
const mimeTypes = config["mimeTypes"] ?? [];
|
|
182
|
+
if (mimeTypes.length > 0 && media.mimeType) {
|
|
183
|
+
if (!mimeTypes.map((m) => m.toLowerCase()).includes(media.mimeType.toLowerCase())) errors.push({
|
|
184
|
+
field,
|
|
185
|
+
code: "INVALID_MIME",
|
|
186
|
+
message: `${field} não aceita arquivos do tipo ${media.mimeType}`
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
const maxSize = config["maxSize"];
|
|
190
|
+
const minSize = config["minSize"];
|
|
191
|
+
if (media.size !== void 0) {
|
|
192
|
+
if (maxSize !== void 0 && media.size > maxSize) errors.push({
|
|
193
|
+
field,
|
|
194
|
+
code: "FILE_TOO_LARGE",
|
|
195
|
+
message: `${field} excede o tamanho máximo de ${Math.round(maxSize / 1024)}KB`
|
|
196
|
+
});
|
|
197
|
+
if (minSize !== void 0 && media.size < minSize) errors.push({
|
|
198
|
+
field,
|
|
199
|
+
code: "FILE_TOO_SMALL",
|
|
200
|
+
message: `${field} está abaixo do tamanho mínimo de ${Math.round(minSize / 1024)}KB`
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
if (media.width !== void 0 && media.height !== void 0) {
|
|
204
|
+
const minWidth = config["minWidth"];
|
|
205
|
+
const maxWidth = config["maxWidth"];
|
|
206
|
+
const minHeight = config["minHeight"];
|
|
207
|
+
const maxHeight = config["maxHeight"];
|
|
208
|
+
if (minWidth !== void 0 && media.width < minWidth) errors.push({
|
|
209
|
+
field,
|
|
210
|
+
code: "MIN_WIDTH",
|
|
211
|
+
message: `${field} requer largura mínima de ${minWidth}px`
|
|
212
|
+
});
|
|
213
|
+
if (maxWidth !== void 0 && media.width > maxWidth) errors.push({
|
|
214
|
+
field,
|
|
215
|
+
code: "MAX_WIDTH",
|
|
216
|
+
message: `${field} permite largura máxima de ${maxWidth}px`
|
|
217
|
+
});
|
|
218
|
+
if (minHeight !== void 0 && media.height < minHeight) errors.push({
|
|
219
|
+
field,
|
|
220
|
+
code: "MIN_HEIGHT",
|
|
221
|
+
message: `${field} requer altura mínima de ${minHeight}px`
|
|
222
|
+
});
|
|
223
|
+
if (maxHeight !== void 0 && media.height > maxHeight) errors.push({
|
|
224
|
+
field,
|
|
225
|
+
code: "MAX_HEIGHT",
|
|
226
|
+
message: `${field} permite altura máxima de ${maxHeight}px`
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function validateImage(value, config, field, errors) {
|
|
231
|
+
if (isEmptyValue(value)) return;
|
|
232
|
+
validateMediaItem(value, config, field, errors);
|
|
233
|
+
}
|
|
234
|
+
function validateFile(value, config, field, errors) {
|
|
235
|
+
if (isEmptyValue(value)) return;
|
|
236
|
+
validateMediaItem(value, config, field, errors);
|
|
237
|
+
}
|
|
238
|
+
function validateGallery(value, config, field, errors) {
|
|
239
|
+
if (value === null || value === void 0) return;
|
|
240
|
+
if (!Array.isArray(value)) {
|
|
241
|
+
errors.push({
|
|
242
|
+
field,
|
|
243
|
+
code: "NOT_ARRAY",
|
|
244
|
+
message: `${field} deve ser uma lista de imagens`
|
|
245
|
+
});
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
const hasLimits = config["minSelections"] !== void 0 || config["maxSelections"] !== void 0;
|
|
249
|
+
if (value.length === 0 && !hasLimits) return;
|
|
250
|
+
const minSelections = config["minSelections"];
|
|
251
|
+
const maxSelections = config["maxSelections"];
|
|
252
|
+
if (minSelections !== void 0 && value.length < minSelections) errors.push({
|
|
253
|
+
field,
|
|
254
|
+
code: "MIN_SELECTIONS",
|
|
255
|
+
message: `${field} requer no mínimo ${minSelections} imagem(ns)`
|
|
256
|
+
});
|
|
257
|
+
if (maxSelections !== void 0 && value.length > maxSelections) errors.push({
|
|
258
|
+
field,
|
|
259
|
+
code: "MAX_SELECTIONS",
|
|
260
|
+
message: `${field} permite no máximo ${maxSelections} imagem(ns)`
|
|
261
|
+
});
|
|
262
|
+
for (const item of value) validateMediaItem(item, config, field, errors);
|
|
263
|
+
}
|
|
264
|
+
function validateRelationshipIds(value, config, field, errors) {
|
|
265
|
+
if (isEmptyValue(value)) return;
|
|
266
|
+
const multiple = config["multiple"] !== false;
|
|
267
|
+
const minSelections = config["minSelections"];
|
|
268
|
+
const maxSelections = config["maxSelections"];
|
|
269
|
+
const ids = Array.isArray(value) ? value : [value];
|
|
270
|
+
for (const id of ids) if (typeof id !== "string" && typeof id !== "number") {
|
|
271
|
+
errors.push({
|
|
272
|
+
field,
|
|
273
|
+
code: "INVALID_ID",
|
|
274
|
+
message: `${field} contém um identificador inválido`
|
|
275
|
+
});
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
if (multiple) {
|
|
279
|
+
if (maxSelections !== void 0 && ids.length > maxSelections) errors.push({
|
|
280
|
+
field,
|
|
281
|
+
code: "MAX_SELECTIONS",
|
|
282
|
+
message: `${field} permite no máximo ${maxSelections} seleção(ões)`
|
|
283
|
+
});
|
|
284
|
+
if (minSelections !== void 0 && ids.length < minSelections) errors.push({
|
|
285
|
+
field,
|
|
286
|
+
code: "MIN_SELECTIONS",
|
|
287
|
+
message: `${field} requer no mínimo ${minSelections} seleção(ões)`
|
|
288
|
+
});
|
|
289
|
+
} else if (ids.length > 1) errors.push({
|
|
290
|
+
field,
|
|
291
|
+
code: "SINGLE_ONLY",
|
|
292
|
+
message: `${field} aceita apenas um valor`
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
function validateLink(value, field, errors) {
|
|
296
|
+
if (isEmptyValue(value)) return;
|
|
297
|
+
if (typeof value !== "object" || value === null) {
|
|
298
|
+
errors.push({
|
|
299
|
+
field,
|
|
300
|
+
code: "INVALID_LINK",
|
|
301
|
+
message: `${field} deve ser um objeto de link`
|
|
302
|
+
});
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
const link = value;
|
|
306
|
+
if (!link.url || typeof link.url !== "string") {
|
|
307
|
+
errors.push({
|
|
308
|
+
field,
|
|
309
|
+
code: "LINK_URL_REQUIRED",
|
|
310
|
+
message: `${field} requer uma URL`
|
|
311
|
+
});
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
try {
|
|
315
|
+
const parsed = new URL(link.url);
|
|
316
|
+
if (![
|
|
317
|
+
"http:",
|
|
318
|
+
"https:",
|
|
319
|
+
"mailto:",
|
|
320
|
+
"tel:"
|
|
321
|
+
].includes(parsed.protocol) && !link.url.startsWith("#") && !link.url.startsWith("/")) throw new Error("protocol");
|
|
322
|
+
} catch {
|
|
323
|
+
if (!link.url.startsWith("#") && !link.url.startsWith("/") && !link.url.startsWith("?")) errors.push({
|
|
324
|
+
field,
|
|
325
|
+
code: "INVALID_URL",
|
|
326
|
+
message: `${field} contém uma URL inválida`
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
if (link.target !== void 0 && !["_self", "_blank"].includes(String(link.target))) errors.push({
|
|
330
|
+
field,
|
|
331
|
+
code: "INVALID_TARGET",
|
|
332
|
+
message: `${field} aceita apenas _self ou _blank`
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
function validateGoogleMap(value, field, errors) {
|
|
336
|
+
if (isEmptyValue(value)) return;
|
|
337
|
+
if (typeof value !== "object" || value === null) {
|
|
338
|
+
errors.push({
|
|
339
|
+
field,
|
|
340
|
+
code: "INVALID_MAP",
|
|
341
|
+
message: `${field} deve conter endereço e coordenadas`
|
|
342
|
+
});
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
const map = value;
|
|
346
|
+
if (isEmptyValue(map.address)) errors.push({
|
|
347
|
+
field,
|
|
348
|
+
code: "ADDRESS_REQUIRED",
|
|
349
|
+
message: `${field} requer um endereço`
|
|
350
|
+
});
|
|
351
|
+
const lat = Number(map.lat);
|
|
352
|
+
const lng = Number(map.lng);
|
|
353
|
+
if (!Number.isFinite(lat) || lat < -90 || lat > 90) errors.push({
|
|
354
|
+
field,
|
|
355
|
+
code: "INVALID_LATITUDE",
|
|
356
|
+
message: `${field} contém latitude inválida (-90 a 90)`
|
|
357
|
+
});
|
|
358
|
+
if (!Number.isFinite(lng) || lng < -180 || lng > 180) errors.push({
|
|
359
|
+
field,
|
|
360
|
+
code: "INVALID_LONGITUDE",
|
|
361
|
+
message: `${field} contém longitude inválida (-180 a 180)`
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
var HEX_PATTERN = /^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
|
|
365
|
+
function validateColorPicker(value, config, field, errors) {
|
|
366
|
+
if (isEmptyValue(value)) return;
|
|
367
|
+
const color = String(value);
|
|
368
|
+
const isRgba = color.startsWith("rgba(");
|
|
369
|
+
if (isRgba && !config["enableOpacity"]) {
|
|
370
|
+
errors.push({
|
|
371
|
+
field,
|
|
372
|
+
code: "OPACITY_DISABLED",
|
|
373
|
+
message: `${field} não permite transparência`
|
|
374
|
+
});
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
if (!isRgba && !HEX_PATTERN.test(color)) {
|
|
378
|
+
errors.push({
|
|
379
|
+
field,
|
|
380
|
+
code: "INVALID_COLOR",
|
|
381
|
+
message: `${field} deve ser uma cor em formato hexadecimal válido`
|
|
382
|
+
});
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
const palette = config["palette"] ?? [];
|
|
386
|
+
if (palette.length > 0) {
|
|
387
|
+
if (!palette.map((e) => e.toLowerCase()).includes(color.toLowerCase())) errors.push({
|
|
388
|
+
field,
|
|
389
|
+
code: "NOT_IN_PALETTE",
|
|
390
|
+
message: `${field} deve usar uma cor da paleta definida`
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Valida um único campo no cliente e retorna a primeira mensagem de erro
|
|
396
|
+
* ou null quando válido. Não considera lógica condicional.
|
|
397
|
+
*/
|
|
398
|
+
function validateFieldClient(field, value) {
|
|
399
|
+
if (field.type === "clone" || field.type === "repeater" || field.type === "group" || field.type === "flexible_content") return null;
|
|
400
|
+
const config = field.config ?? {};
|
|
401
|
+
const errors = [];
|
|
402
|
+
checkRequired(value, field.required, field.label, errors);
|
|
403
|
+
switch (field.type) {
|
|
404
|
+
case "text":
|
|
405
|
+
case "textarea":
|
|
406
|
+
case "password":
|
|
407
|
+
validateTextLike(value, config, field.label, errors);
|
|
408
|
+
break;
|
|
409
|
+
case "slug":
|
|
410
|
+
validateTextLike(value, config, field.label, errors);
|
|
411
|
+
if (!isEmptyValue(value) && !/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(String(value))) errors.push({
|
|
412
|
+
field: field.label,
|
|
413
|
+
code: "INVALID_SLUG",
|
|
414
|
+
message: `${field.label} deve ser um slug válido (a-z, 0-9 e hífens)`
|
|
415
|
+
});
|
|
416
|
+
break;
|
|
417
|
+
case "email":
|
|
418
|
+
validateEmail(value, field.label, errors);
|
|
419
|
+
break;
|
|
420
|
+
case "url":
|
|
421
|
+
case "oembed":
|
|
422
|
+
validateUrl(value, field.label, errors);
|
|
423
|
+
break;
|
|
424
|
+
case "number":
|
|
425
|
+
case "range":
|
|
426
|
+
validateNumber(value, config, field.label, errors);
|
|
427
|
+
break;
|
|
428
|
+
case "wysiwyg":
|
|
429
|
+
validateTextLike(value, config, field.label, errors);
|
|
430
|
+
break;
|
|
431
|
+
case "select":
|
|
432
|
+
validateSelect(value, config, field.label, errors);
|
|
433
|
+
break;
|
|
434
|
+
case "checkbox":
|
|
435
|
+
validateCheckbox(value, config, field.label, errors);
|
|
436
|
+
break;
|
|
437
|
+
case "radio":
|
|
438
|
+
validateRadio(value, config, field.label, errors);
|
|
439
|
+
break;
|
|
440
|
+
case "true_false":
|
|
441
|
+
validateTrueFalse(value, field.label, errors);
|
|
442
|
+
break;
|
|
443
|
+
case "image":
|
|
444
|
+
validateImage(value, config, field.label, errors);
|
|
445
|
+
break;
|
|
446
|
+
case "file":
|
|
447
|
+
validateFile(value, config, field.label, errors);
|
|
448
|
+
break;
|
|
449
|
+
case "gallery":
|
|
450
|
+
validateGallery(value, config, field.label, errors);
|
|
451
|
+
break;
|
|
452
|
+
case "link":
|
|
453
|
+
validateLink(value, field.label, errors);
|
|
454
|
+
break;
|
|
455
|
+
case "page_link":
|
|
456
|
+
case "post_object":
|
|
457
|
+
case "relationship":
|
|
458
|
+
case "taxonomy":
|
|
459
|
+
case "user":
|
|
460
|
+
validateRelationshipIds(value, config, field.label, errors);
|
|
461
|
+
break;
|
|
462
|
+
case "google_map":
|
|
463
|
+
validateGoogleMap(value, field.label, errors);
|
|
464
|
+
break;
|
|
465
|
+
case "color_picker": validateColorPicker(value, config, field.label, errors);
|
|
466
|
+
}
|
|
467
|
+
return errors[0]?.message ?? null;
|
|
468
|
+
}
|
|
469
|
+
//#endregion
|
|
470
|
+
//#region ../../packages/validation/dist/clone.js
|
|
471
|
+
/**
|
|
472
|
+
* Expande campos do tipo `clone` nas definições alvo.
|
|
473
|
+
*
|
|
474
|
+
* - `display: 'seamless'` (default): os campos referenciados entram
|
|
475
|
+
* diretamente na lista, com os mesmos nomes (valores "inline").
|
|
476
|
+
* - `display: 'group'`: os campos viram subcampos de um pseudo-group com o
|
|
477
|
+
* nome do clone, e os nomes internos recebem o prefixo `{clone}_`
|
|
478
|
+
* (valores aninhados em data[clone.name]).
|
|
479
|
+
*
|
|
480
|
+
* Referências inexistentes são ignoradas; clones de clones não são
|
|
481
|
+
* resolvidos recursivamente (profundidade 1).
|
|
482
|
+
*/
|
|
483
|
+
function expandCloneFields(fields) {
|
|
484
|
+
const byName = /* @__PURE__ */ new Map();
|
|
485
|
+
for (const field of fields) byName.set(field.name, field);
|
|
486
|
+
const result = [];
|
|
487
|
+
const emittedNames = /* @__PURE__ */ new Set();
|
|
488
|
+
const emit = (field) => {
|
|
489
|
+
if (emittedNames.has(field.name)) return;
|
|
490
|
+
emittedNames.add(field.name);
|
|
491
|
+
result.push(field);
|
|
492
|
+
};
|
|
493
|
+
for (const field of fields) {
|
|
494
|
+
if (field.type !== "clone") {
|
|
495
|
+
emit(field);
|
|
496
|
+
continue;
|
|
497
|
+
}
|
|
498
|
+
const config = field.config ?? {};
|
|
499
|
+
const display = config["display"] ?? "seamless";
|
|
500
|
+
const targets = config["clone"] ?? [];
|
|
501
|
+
const resolved = [];
|
|
502
|
+
for (const targetName of targets) {
|
|
503
|
+
const target = byName.get(targetName);
|
|
504
|
+
if (!target || target.type === "clone") continue;
|
|
505
|
+
resolved.push(target);
|
|
506
|
+
}
|
|
507
|
+
if (resolved.length === 0) continue;
|
|
508
|
+
if (display === "group") {
|
|
509
|
+
emit({
|
|
510
|
+
...field,
|
|
511
|
+
type: "group",
|
|
512
|
+
name: field.name,
|
|
513
|
+
label: field.label,
|
|
514
|
+
required: false,
|
|
515
|
+
conditionalLogic: void 0,
|
|
516
|
+
subFields: resolved.map((target) => ({
|
|
517
|
+
...target,
|
|
518
|
+
name: `${field.name}_${target.name}`
|
|
519
|
+
}))
|
|
520
|
+
});
|
|
521
|
+
continue;
|
|
522
|
+
}
|
|
523
|
+
for (const target of resolved) emit(target);
|
|
524
|
+
}
|
|
525
|
+
return result;
|
|
526
|
+
}
|
|
527
|
+
//#endregion
|
|
5
528
|
//#region src/lib/sanitize.ts
|
|
6
529
|
/**
|
|
7
530
|
* Sanitizador de HTML em allowlist para pontos de injeção (innerHTML).
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import "./rolldown-runtime_BMI-E3GI.mjs";
|
|
1
2
|
import { S as createAstro, d as maybeRenderHead, i as renderComponent, p as addAttribute, s as renderSlot, u as renderTemplate } from "./server_B5N27szj.mjs";
|
|
2
3
|
import { t as createComponent$1 } from "./compiler_O7J1rlsi.mjs";
|
|
3
4
|
import { n as renderScript, t as $$BaseLayout } from "./BaseLayout_CHj9u5wO.mjs";
|
|
4
|
-
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./
|
|
5
|
+
import { a as LOCALE_LABELS, i as LOCALE_FLAGS, n as useTranslation, o as SUPPORTED_LOCALES, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
6
|
+
import { t as require_semver } from "./semver_WbqCUY_o.mjs";
|
|
5
7
|
import { createComponent, escape, ssr, ssrAttribute, ssrHydrationKey, ssrStyle } from "solid-js/web";
|
|
6
8
|
import { For, For as For2, Show, Show as Show2, createEffect, createMemo as createMemo$1, createSignal, createSignal as createSignal$1, onCleanup, onMount, onMount as onMount$1 } from "solid-js";
|
|
7
|
-
|
|
8
|
-
//#
|
|
9
|
+
require_semver();
|
|
10
|
+
//#endregion
|
|
11
|
+
//#region ../../packages/ui/dist/server.js
|
|
9
12
|
var _tmpl$$7 = ["<span", " class=\"spinner\" aria-label=\"Carregando\"></span>"];
|
|
10
13
|
var _tmpl$2$6 = [
|
|
11
14
|
"<button",
|
|
@@ -607,7 +610,7 @@ function AdminBar(props) {
|
|
|
607
610
|
/** Versão do release atual (ex.: "0.4.0"). */
|
|
608
611
|
var APP_VERSION = {
|
|
609
612
|
name: "okcms",
|
|
610
|
-
version: "0.5.
|
|
613
|
+
version: "0.5.6",
|
|
611
614
|
"private": true,
|
|
612
615
|
description: "Hybrid, modular, API-first CMS",
|
|
613
616
|
engines: {
|
|
@@ -634,7 +637,7 @@ var APP_VERSION = {
|
|
|
634
637
|
"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"
|
|
635
638
|
},
|
|
636
639
|
devDependencies: {
|
|
637
|
-
"@oktis-works/cms": "^0.
|
|
640
|
+
"@oktis-works/cms": "^0.5.5",
|
|
638
641
|
"@changesets/changelog-github": "^1.0.1",
|
|
639
642
|
"@changesets/cli": "^3.0.3",
|
|
640
643
|
"@types/node": "22.0.0",
|
|
@@ -1085,4 +1088,4 @@ var $$DashboardLayout = createComponent$1(($$result, $$props, $$slots) => {
|
|
|
1085
1088
|
})}</div>` })}${renderScript($$result, "/home/runner/work/cms/cms/apps/admin/src/layouts/DashboardLayout.astro?astro&type=script&index=0&lang.ts")}`;
|
|
1086
1089
|
}, "/home/runner/work/cms/cms/apps/admin/src/layouts/DashboardLayout.astro", void 0);
|
|
1087
1090
|
//#endregion
|
|
1088
|
-
export { For2 as a, Pagination as c, Table as d, createMemo$1 as f,
|
|
1091
|
+
export { For2 as a, Pagination as c, Table as d, createMemo$1 as f, Card as i, Select as l, onMount$1 as m, Badge as n, Input as o, createSignal$1 as p, Button as r, Modal as s, $$DashboardLayout as t, Show2 as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as useTranslation, r as apiClient } from "./
|
|
2
|
-
import { a as For2, c as Pagination,
|
|
1
|
+
import { n as useTranslation, r as apiClient } from "./i18n_B-Vk5esc.mjs";
|
|
2
|
+
import { a as For2, c as Pagination, l as Select, m as onMount, o as Input, p as createSignal, r as Button, s as Modal, u as Show2 } from "./DashboardLayout_65mMCENw.mjs";
|
|
3
3
|
import { createComponent, escape, memo, ssr, ssrAttribute, ssrHydrationKey, ssrStyleProperty } from "solid-js/web";
|
|
4
4
|
//#region src/components/media/MediaLibrary.tsx
|
|
5
5
|
var _tmpl$ = [
|