@oktis-works/admin 0.6.2 → 0.6.4

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 (42) hide show
  1. package/dist/client/_astro/BaseLayout.C5FQIBTO.css +1 -0
  2. package/dist/client/_astro/{DashboardLayout.CFs1AQvN.css → DashboardLayout.D8yM8shT.css} +1 -1
  3. package/dist/client/_astro/GeneralSettings.DLGEYL2s.js +1 -0
  4. package/dist/client/_astro/{PluginManager.Duzn64IF.js → PluginManager.BD3pUiUf.js} +4 -17
  5. package/dist/client/_astro/PostTypesManager.XE7f2dd_.js +1 -0
  6. package/dist/client/_astro/TaxonomiesManager.l-VE1kOd.js +1 -0
  7. package/dist/client/_astro/{ThemeManager.CAGeBTsz.js → ThemeManager.Dke-fCUr.js} +4 -17
  8. package/dist/client/_astro/WebhooksManager.VZx9QiC8.js +1 -0
  9. package/dist/server/chunks/{ContentEditor_DHLG9D_a.mjs → ContentEditor_DMVzxYM3.mjs} +1 -1
  10. package/dist/server/chunks/{DashboardLayout_CzbHdD1U.mjs → DashboardLayout_CxF4A5fT.mjs} +3 -3
  11. package/dist/server/chunks/{MediaLibrary_CAZSrGLn.mjs → MediaLibrary_BfcwqGB5.mjs} +1 -1
  12. package/dist/server/chunks/{_id__iTRZzP-1.mjs → _id__DBcDdXDz.mjs} +1 -1
  13. package/dist/server/chunks/{_slug__C2O2GFFM.mjs → _slug__CBBdtW4f.mjs} +1 -1
  14. package/dist/server/chunks/{access_BY3_0wIu.mjs → access_zWELX1DY.mjs} +1 -1
  15. package/dist/server/chunks/{custom-fields_Cg_q1GrK.mjs → custom-fields_Dl_2hcKc.mjs} +1 -1
  16. package/dist/server/chunks/{edit_8qloFmq5.mjs → edit_CszxmxU3.mjs} +2 -2
  17. package/dist/server/chunks/{general_CYOs6irJ.mjs → general_DMnFCUSV.mjs} +3 -4
  18. package/dist/server/chunks/{index_S156XcPz.mjs → index_Bx2PLm7m.mjs} +2 -2
  19. package/dist/server/chunks/{index_CCZEHuP4.mjs → index_CuvqzuDM.mjs} +1 -1
  20. package/dist/server/chunks/{index_orC0wc4u.mjs → index_DewdO8JW.mjs} +2 -2
  21. package/dist/server/chunks/{index_Awb7e4pK.mjs → index_DxCC3xhW.mjs} +1 -1
  22. package/dist/server/chunks/{index_BZCmvPyi.mjs → index_M0hQB5Kg.mjs} +1 -1
  23. package/dist/server/chunks/{login_CNRlK7LB.mjs → login_6cSPvTAd.mjs} +1 -1
  24. package/dist/server/chunks/{logs_DSBXEeyV.mjs → logs_D44q1BKd.mjs} +1 -1
  25. package/dist/server/chunks/{menus_Dc2yjwRj.mjs → menus_mYL4br_7.mjs} +1 -1
  26. package/dist/server/chunks/{new_DU_c1dev.mjs → new_DhJ9z0KU.mjs} +1 -1
  27. package/dist/server/chunks/{new_bfakZUNE.mjs → new_PgjA_xKX.mjs} +2 -2
  28. package/dist/server/chunks/{plugins_BVgJly0v.mjs → plugins_DMkIoKkp.mjs} +5 -7
  29. package/dist/server/chunks/{post-types_DEVTlb0x.mjs → post-types_CniodN8U.mjs} +5 -10
  30. package/dist/server/chunks/{taxonomies_fbQ3ESKZ.mjs → taxonomies_DHq9oeGP.mjs} +6 -11
  31. package/dist/server/chunks/{taxonomy_D3jvdH6n.mjs → taxonomy_NpxQtrjC.mjs} +1 -1
  32. package/dist/server/chunks/{themes_C0i421iU.mjs → themes_JuTMnUhW.mjs} +5 -7
  33. package/dist/server/chunks/{upload_PzeHNIsa.mjs → upload_DWBjLCP7.mjs} +2 -2
  34. package/dist/server/chunks/{webhooks_DDYWqsx2.mjs → webhooks_Z1sOZUKw.mjs} +3 -4
  35. package/dist/server/entry.mjs +24 -24
  36. package/package.json +1 -1
  37. package/dist/client/_astro/BaseLayout.Cb-QSCvc.css +0 -1
  38. package/dist/client/_astro/GeneralSettings.Bh29xgDk.js +0 -1
  39. package/dist/client/_astro/PostTypesManager.BHKbIEwD.js +0 -1
  40. package/dist/client/_astro/TaxonomiesManager.DEwFIIP9.js +0 -1
  41. package/dist/client/_astro/WebhooksManager.B-g7Wbit.js +0 -1
  42. /package/dist/server/chunks/{BaseLayout_vNs_yXMd.mjs → BaseLayout_CJj2PysL.mjs} +0 -0
@@ -1 +0,0 @@
1
- :root{--color-primary:#d8b45e;--color-primary-hover:#b99542;--color-primary-light:#f3e7c5;--color-primary-soft:#faf5e8;--color-primary-contrast:#0a0a0a;--color-ink:#0a0a0a;--color-surface-dark:#171717;--color-white:#fff;--color-background:#f6f7f7;--color-border:#dcdcde;--color-text:#2c3338;--color-muted:#646970;--color-success:#22c55e;--color-success-soft:#22c55e1f;--color-warning:#f59e0b;--color-warning-soft:#f59e0b1f;--color-danger:#ef4444;--color-danger-soft:#ef44441f;--color-error:#ef4444;--color-error-soft:#ef44441f;--color-muted-soft:#eceef0;--color-surface:#fff;--color-surface-hover:#f6f7f7;--color-surface-active:#f3e7c5;--color-surface-muted:#eceef0;--color-bg:#f6f7f7;--color-bg-secondary:#fff;--color-bg-tertiary:#eceef0;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-full:9999px;--shadow-sm:0 1px 2px 0 #0000000d;--shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;--focus-ring:0 0 0 2px var(--color-primary-soft), 0 0 0 4px var(--color-primary)}*{box-sizing:border-box;margin:0;padding:0}html{color:var(--color-text);background:var(--color-background);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif}body{min-height:100vh}a{color:var(--color-primary);text-decoration:none}a:hover{color:var(--color-primary-hover)}button{cursor:pointer;font-family:inherit}input,textarea,select{font-family:inherit;font-size:inherit}.container{max-width:1280px;margin:0 auto;padding:0 1rem}.flex{display:flex}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.text-sm{font-size:.875rem}.text-lg{font-size:1.125rem}.font-bold{font-weight:600}.btn{border-radius:var(--radius-md);cursor:pointer;white-space:nowrap;border:1px solid #0000;justify-content:center;align-items:center;gap:.5rem;padding:.5rem 1rem;font-size:.875rem;font-weight:500;transition:all .15s;display:inline-flex}.btn:focus-visible{box-shadow:var(--focus-ring);outline:none}.btn-primary{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-ink)}.btn-primary:hover{background:var(--color-primary-hover);border-color:var(--color-primary-hover)}.btn-secondary{background:var(--color-surface);border-color:var(--color-border);color:var(--color-text)}.btn-secondary:hover{background:var(--color-surface-hover);border-color:var(--color-text)}.btn-danger{background:var(--color-danger);border-color:var(--color-danger);color:var(--color-white)}.btn-danger:hover{background:#dc2626;border-color:#dc2626}.btn-sm{padding:.375rem .75rem;font-size:.8125rem}.btn:disabled{opacity:.5;cursor:not-allowed}.card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:1.5rem}.card-header{border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:center;margin-bottom:1rem;padding-bottom:1rem;display:flex}.input{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);width:100%;color:var(--color-text);padding:.5rem .75rem;transition:border-color .15s,box-shadow .15s}.input:focus{border-color:var(--color-primary);box-shadow:0 0 0 1px var(--color-primary);outline:none}.input::placeholder{color:var(--color-muted)}.input:disabled{background:var(--color-background);color:var(--color-muted);cursor:not-allowed}select.input{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23646970' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-position:right .75rem center;background-repeat:no-repeat;padding-right:2.5rem}.table th,.table td{text-align:left;border-bottom:1px solid var(--color-border);padding:.75rem 1rem}.table th{color:var(--color-muted);text-transform:uppercase;letter-spacing:.04em;background:var(--color-background);font-size:.75rem;font-weight:600}.table tbody tr:hover{background:var(--color-surface-hover)}.table tbody tr:last-child td{border-bottom:none}.badge{border-radius:var(--radius-sm);text-transform:uppercase;letter-spacing:.02em;align-items:center;padding:.1875rem .5rem;font-size:.6875rem;font-weight:600;display:inline-flex}.badge-success{color:#166534;background:#22c55e1a}.badge-warning{color:#854d0e;background:#f59e0b1a}.badge-danger{color:#991b1b;background:#ef44441a}.badge-secondary{background:var(--color-border);color:var(--color-muted)}.badge-primary{background:var(--color-primary-soft);color:var(--color-primary-hover)}.modal-overlay{backdrop-filter:blur(2px);z-index:1000;background:#0a0a0a99;justify-content:center;align-items:center;padding:1rem;display:flex;position:fixed;inset:0}.modal{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-xl);width:100%;max-width:560px;max-height:90vh;box-shadow:var(--shadow-xl);padding:1.5rem;overflow-y:auto}.modal-header{border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:center;margin-bottom:1rem;padding-bottom:1rem;display:flex}.toast{border-radius:var(--radius-md);background:var(--color-surface);border:1px solid var(--color-border);box-shadow:var(--shadow-xl);z-index:1100;padding:.75rem 1rem;animation:.2s ease-out slideIn;position:fixed;bottom:1.5rem;right:1.5rem}@keyframes slideIn{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}.toast-success{border-left:4px solid var(--color-success)}.toast-error{border-left:4px solid var(--color-danger)}.toast-warning{border-left:4px solid var(--color-warning)}.toast-info{border-left:4px solid var(--color-primary)}.spinner{border:2px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;width:1.25rem;height:1.25rem;animation:.75s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.muted{color:var(--color-muted);font-size:.875rem}.notice{border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text);margin-bottom:1rem;padding:.75rem 1rem}.notice--error{border-color:var(--color-danger);color:var(--color-danger);background:#ef44440d}.notice--success{border-color:var(--color-success);color:var(--color-success);background:#22c55e0d}.toolbar{flex-wrap:wrap;gap:.5rem;margin:1rem 0;display:flex}.toolbar .input{flex:1;min-width:200px}.pagination{justify-content:center;align-items:center;gap:.5rem;margin-top:1.5rem;display:flex}.upload-zone{border:2px dashed var(--color-border);border-radius:var(--radius-xl);background:var(--color-surface);text-align:center;flex-direction:column;align-items:center;gap:.75rem;padding:2.5rem 1.5rem;transition:border-color .15s,background .15s;display:flex}.upload-zone--active{border-color:var(--color-primary);background:var(--color-primary-soft)}.media-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.75rem;display:grid}.media-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);cursor:pointer;color:var(--color-text);font:inherit;flex-direction:column;gap:.5rem;padding:.5rem;transition:all .15s;display:flex}.media-card:hover{border-color:var(--color-primary);box-shadow:var(--shadow-md)}.media-card--selected{border-color:var(--color-primary);box-shadow:0 0 0 2px var(--color-primary-soft), 0 0 0 4px var(--color-primary)}.media-card__preview{aspect-ratio:4/3;border-radius:var(--radius-md);background:var(--color-background);justify-content:center;align-items:center;display:flex;overflow:hidden}.media-card__preview img{object-fit:cover;width:100%;height:100%}.media-card__ext{color:var(--color-muted);letter-spacing:.05em;text-align:center;padding:1rem;font-weight:700}.media-card__meta{flex-direction:column;gap:.125rem;display:flex}.media-card__name{white-space:nowrap;text-overflow:ellipsis;font-size:.8125rem;font-weight:500;overflow:hidden}.media-details{flex-direction:column;gap:.75rem;margin-top:1.5rem;display:flex;position:sticky;bottom:0}.media-details__preview img{border-radius:var(--radius-lg);object-fit:contain;background:var(--color-background);max-width:100%;max-height:280px}.media-details__list{grid-template-columns:100px 1fr;gap:.35rem .75rem;margin:0;display:grid}.media-details__list dt{color:var(--color-muted);font-size:.8125rem}.media-details__list dd{overflow-wrap:anywhere;margin:0;font-size:.875rem}.media-details__url{align-items:center;gap:.5rem;display:flex}.media-details__url code{background:var(--color-background);border-radius:var(--radius-sm);padding:.125rem .375rem;font-size:.75rem}.media-details__actions{flex-wrap:wrap;gap:.5rem;display:flex}.media-library .modal{max-width:min(1120px,96vw)}.media-modal{flex-direction:column;gap:1rem;display:flex}.media-modal__preview{border:1px solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-background);justify-content:center;align-items:center;min-height:280px;max-height:460px;display:flex;overflow:hidden}.media-modal__preview img,.media-modal__preview video{object-fit:contain;max-width:100%;max-height:440px}.media-modal__preview audio{width:min(560px,90%)}.media-modal__preview iframe{border:0;width:100%;height:440px}.media-modal__file-icon{font-size:2rem}.media-modal__layout{grid-template-columns:minmax(0,1fr) minmax(280px,.9fr);gap:1.25rem;display:grid}.media-modal__fields{flex-direction:column;gap:.75rem;display:flex}.media-modal__textarea{resize:vertical;min-height:120px;font:inherit}.media-modal__facts{border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-background);align-content:start;padding:.85rem}.media-modal__replace{flex-wrap:wrap;align-items:center;gap:.75rem;padding-top:.25rem;display:flex}@media (width<=720px){.media-modal__layout{grid-template-columns:1fr}.media-modal__preview{min-height:200px}}.users-table{border-collapse:collapse;background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);width:100%;overflow:hidden}.users-table th,.users-table td{text-align:left;border-bottom:1px solid var(--color-border);padding:.75rem 1rem;font-size:.875rem}.users-table th{background:var(--color-background);color:var(--color-muted);text-transform:uppercase;letter-spacing:.04em;font-size:.75rem;font-weight:600}.users-table tr:last-child td{border-bottom:none}.users-table__row--selected td{background:var(--color-primary-soft)}.users-table__actions{white-space:nowrap;justify-content:flex-end;gap:.375rem;display:flex}.status-dot{background:var(--color-danger);border-radius:50%;flex-shrink:0;width:8px;height:8px;margin-right:.5rem;display:inline-block}.status-dot--active{background:var(--color-success)}.user-details{flex-direction:column;gap:.75rem;margin-top:1.25rem;display:flex}.dashboard-home{flex-direction:column;gap:1.5rem;display:flex}.stats-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;display:grid}.stat-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-lg);text-align:center;padding:1.5rem;transition:all .15s}.stat-card:hover{border-color:var(--color-primary);box-shadow:var(--shadow-md)}.stat-label{color:var(--color-muted);text-transform:uppercase;letter-spacing:.04em;margin-bottom:.5rem;font-size:.8125rem;font-weight:500}.stat-value{color:var(--color-primary);font-size:2.5rem;font-weight:700;line-height:1.2}.login-page{background:var(--color-background);justify-content:center;align-items:center;min-height:100vh;padding:2rem 1rem;display:flex}.login-card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-xl);width:100%;max-width:420px;box-shadow:var(--shadow-lg);padding:2.5rem 2rem}.login-header{text-align:center;margin-bottom:2rem}.login-header .logo{background:linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);border-radius:var(--radius-xl);width:72px;height:72px;box-shadow:0 4px 14px -2px var(--color-primary);justify-content:center;align-items:center;margin-bottom:1rem;display:inline-flex}.login-header .logo svg{width:40px;height:40px;color:var(--color-ink)}.login-header h1{color:var(--color-text);margin-bottom:.375rem;font-size:1.5rem;font-weight:600}.login-header p{color:var(--color-muted);font-size:.9375rem}.login-form{flex-direction:column;gap:1.25rem;display:flex}.form-group{flex-direction:column;gap:.5rem;display:flex}.form-group label{color:var(--color-text);font-size:.8125rem;font-weight:500}.form-group .input{padding:.625rem .875rem;font-size:.9375rem}.form-group .input::placeholder{color:var(--color-muted)}.form-actions{gap:.5rem;margin-top:.5rem;display:flex}.form-actions .btn{flex:1}.empty-state,.skeleton{text-align:center;color:var(--color-muted);padding:2rem}.login-form .btn-primary{margin-top:.5rem;padding:.75rem 1.5rem;font-size:.9375rem;font-weight:600}.login-form .btn-primary:focus-visible{box-shadow:0 0 0 3px var(--color-primary-soft), 0 0 0 5px var(--color-primary)}.error-message{border-radius:var(--radius-md);border:1px solid var(--color-danger);color:var(--color-danger);background:#ef444414;padding:.75rem 1rem;font-size:.875rem}[dir=rtl]{direction:rtl}[dir=rtl] .table th,[dir=rtl] .table td,[dir=rtl] .users-table th,[dir=rtl] .users-table td{text-align:right}[dir=rtl] .toolbar{flex-direction:row-reverse}[dir=rtl] .toolbar .input{text-align:right}[dir=rtl] .form-grid,[dir=rtl] .form-grid label{direction:rtl}[dir=rtl] .card-header,[dir=rtl] .modal-header,[dir=rtl] .toolbar,[dir=rtl] .toolbar{flex-direction:row-reverse}[dir=rtl] .badge{direction:rtl}[dir=rtl] .toast{left:1.5rem;right:auto}[dir=rtl] .media-grid{direction:rtl}[dir=rtl] .media-card__meta{text-align:right}[dir=rtl] .media-details__list{direction:rtl}[dir=rtl] .media-details__url{flex-direction:row-reverse}[dir=rtl] .user-details .form-grid{direction:rtl}[dir=rtl] .user-details .media-details__actions{flex-direction:row-reverse}[dir=rtl] .notice{direction:rtl}[dir=rtl] .pagination{flex-direction:row-reverse}[dir=rtl] input,[dir=rtl] textarea,[dir=rtl] select,[dir=rtl] input::placeholder,[dir=rtl] textarea::placeholder{text-align:right}[dir=rtl] .chevron{transform:scaleX(-1)}[dir=rtl] .language-trigger[aria-expanded=true] .chevron{transform:scaleX(-1)rotate(180deg)}[dir=rtl] .users-table__actions{justify-content:flex-start}[dir=rtl] .media-details__actions{flex-direction:row-reverse}[dir=rtl] .media-details__preview{margin-left:auto;margin-right:0}[dir=rtl] .login-card{direction:rtl}[dir=rtl] .login-form .form-group label,[dir=rtl] .login-header{text-align:right}[dir=rtl] .settings-cards{direction:rtl}[dir=rtl] .settings-card{text-align:right}[dir=rtl] .action-card,[dir=rtl] .media-card__name{direction:rtl}[dir=rtl] .login-form .form-group{text-align:right}[dir=rtl] select.input{background-position:.75rem;padding-left:2.5rem;padding-right:.75rem}[dir=rtl] .status-dot{margin-left:.4rem;margin-right:0}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--color-background)}::-webkit-scrollbar-thumb{background:var(--color-border);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--color-muted)}.resource-hub{gap:1rem;display:grid}.resource-tabs,.resource-actions{flex-wrap:wrap;gap:.5rem;display:flex}.resource-form,.term-form{gap:.75rem;margin:1rem 0;display:grid}.resource-form label{gap:.35rem;display:grid}.resource-form textarea,.term-form{width:100%}.card-header-row{justify-content:space-between;align-items:flex-start;gap:1rem;display:flex}.card-header-row p{color:var(--color-muted);margin:.35rem 0 0}.logs-retention-form{flex-wrap:wrap;align-items:end;gap:.75rem;display:flex}.logs-retention-form label{min-width:220px}.logs-filters{flex-wrap:wrap;gap:.5rem;margin:1rem 0;display:flex}.logs-filters .input{min-width:200px}.table-scroll{overflow-x:auto}.webhooks-manager select[multiple]{min-height:9rem}.webhooks-manager .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;display:grid}.access-grid{grid-template-columns:repeat(auto-fit,minmax(360px,1fr));gap:1rem;display:grid}.table{border-collapse:collapse;width:100%}.table th,.table td{border-bottom:1px solid var(--color-border);text-align:left;vertical-align:middle;padding:.65rem}.terms-panel{gap:.75rem;display:grid}.content-list__heading,.classic-editor__topbar{justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem;display:flex}.content-list__heading h2,.classic-editor__topbar h2{color:var(--color-ink);font-size:1.5rem}.content-list__heading p{margin-top:.25rem}.classic-editor__eyebrow{color:var(--color-primary-hover);letter-spacing:.08em;text-transform:uppercase;font-size:.75rem;font-weight:700;display:block}.classic-editor__actions{gap:.5rem;display:flex}.classic-editor__columns{grid-template-columns:minmax(0,1fr) 290px;align-items:start;gap:1rem;display:grid}.classic-editor__main,.classic-editor__sidebar{gap:1rem;min-width:0;display:grid}.classic-editor__canvas-card{padding:1.25rem}.classic-editor__title{width:100%;color:var(--color-ink);border:0;outline:0;padding:.25rem 0 .75rem;font-size:clamp(1.75rem,3vw,2.4rem);font-weight:600;line-height:1.2}.classic-editor__title::placeholder{color:#9ca3af}.classic-editor__permalink{color:var(--color-muted);border-bottom:1px solid var(--color-border);align-items:center;gap:.5rem;padding-bottom:1rem;font-size:.8125rem;display:flex}.classic-editor__permalink .input{max-width:420px;padding:.3rem .5rem}.classic-editor__toolbar{border:1px solid var(--color-border);background:#f0f0f1;border-bottom:0;flex-wrap:wrap;align-items:center;gap:.25rem;margin-top:1rem;padding:.45rem;display:flex}.classic-editor__toolbar button{border-radius:var(--radius-sm);min-width:2rem;min-height:2rem;color:var(--color-text);background:0 0;border:1px solid #0000;padding:.25rem .45rem}.classic-editor__toolbar button:hover{border-color:var(--color-border);background:var(--color-white)}.classic-editor__toolbar-divider{background:var(--color-border);width:1px;height:1.5rem;margin:0 .25rem}.classic-editor__body{border:1px solid var(--color-border);background:var(--color-white);min-height:360px;color:var(--color-text);outline:none;padding:1rem;font-size:1rem;line-height:1.7}.classic-editor__body:focus{border-color:var(--color-primary);box-shadow:0 0 0 1px var(--color-primary)}.classic-editor__body:empty:before{content:attr(data-placeholder);color:var(--color-muted)}.classic-editor__body blockquote{border-left:3px solid var(--color-primary);color:var(--color-muted);margin:1rem 0;padding-left:1rem}.classic-editor__excerpt{gap:.4rem;margin-top:1rem;display:grid}.classic-editor__panel{gap:.75rem;display:grid}.classic-editor__panel h3{border-bottom:1px solid var(--color-border);color:var(--color-ink);padding-bottom:.65rem;font-size:.95rem}.classic-editor__full-button{width:100%}@media (width<=720px){.access-grid{grid-template-columns:1fr}.table{display:block;overflow-x:auto}.content-list__heading,.classic-editor__topbar{flex-direction:column}.classic-editor__columns{grid-template-columns:1fr}.classic-editor__sidebar{order:-1}}.fb-eyebrow{color:var(--color-primary);letter-spacing:.08em;text-transform:uppercase;margin-bottom:.25rem;font-size:.72rem;font-weight:700;display:block}.fb-back-link{color:var(--color-primary-hover);cursor:pointer;background:0 0;border:0;margin-bottom:.5rem;padding:0;font-size:.85rem;display:inline-block}.fb-back-link:hover{color:var(--color-ink);text-decoration:underline}.fb-icon-button{color:var(--color-muted);cursor:pointer;background:0 0;border:0;font-size:1.6rem;line-height:1}.fb-icon-button:hover{color:var(--color-ink)}.editor-actions{align-items:center;gap:.6rem;display:flex}.fb-panel{box-shadow:var(--shadow-sm);margin-bottom:1.25rem;overflow:hidden}.fb-panel__header{border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:center;gap:1rem;padding:1.1rem 1.35rem;display:flex}.fb-panel__header h3{color:var(--color-ink);margin:0;font-size:1.08rem}.fb-panel__header p{margin:.3rem 0 0}.fb-panel__body{padding:1.35rem}.fb-list__header,.fb-editor__header{justify-content:space-between;align-items:flex-end;gap:1rem;margin-bottom:1.5rem;display:flex}.fb-list__header h2,.fb-editor__header h2{color:var(--color-ink);margin:.3rem 0 0;font-size:clamp(1.4rem,2vw,1.85rem);font-weight:600}.fb-list__header p{margin:.35rem 0 0}.fb-list__toolbar{border:1px solid var(--color-border);background:var(--color-surface);border-bottom:0;border-radius:.55rem .55rem 0 0;align-items:flex-end;gap:1rem;margin-bottom:1rem;padding:.9rem 1rem;display:flex}.fb-list__filter{align-items:center;gap:.6rem;display:flex}.fb-list__filter>span{color:var(--color-muted);white-space:nowrap;font-size:.8rem;font-weight:600}.fb-list__search{max-width:320px;margin-left:auto}.fb-groups-table{border-radius:.55rem;padding:0;overflow:hidden}.fb-groups-table__head,.fb-groups-table__row{grid-template-columns:minmax(200px,1.6fr) minmax(140px,1fr) minmax(140px,1fr) 70px 100px minmax(180px,auto);align-items:center;gap:1rem;display:grid}.fb-groups-table__head{background:var(--color-background);color:var(--color-muted);letter-spacing:.05em;text-transform:uppercase;padding:.7rem 1.1rem;font-size:.72rem;font-weight:700}.fb-groups-table__row{border-top:1px solid var(--color-border);background:var(--color-surface);cursor:pointer;min-height:4.4rem;padding:.85rem 1.1rem;transition:background .15s}.fb-groups-table__row:hover{background:var(--color-primary-soft)}.fb-groups-table__title{gap:.15rem;min-width:0;display:grid}.fb-groups-table__title strong{color:var(--color-primary-hover);font-size:.95rem}.fb-groups-table__title code{color:var(--color-muted);text-overflow:ellipsis;font-size:.72rem;overflow:hidden}.fb-groups-table__desc{text-overflow:ellipsis;white-space:nowrap;font-size:.8rem;overflow:hidden}.fb-groups-table__location,.fb-groups-table__count{color:var(--color-muted);font-size:.85rem}.fb-groups-table__actions{opacity:.8;justify-content:flex-end;gap:.5rem;display:flex}.fb-groups-table__row:hover .fb-groups-table__actions{opacity:1}.fb-row-action{color:var(--color-primary-hover);cursor:pointer;white-space:nowrap;background:0 0;border:0;padding:0;font-size:.78rem}.fb-row-action:hover{text-decoration:underline}.fb-row-action.is-danger{color:var(--color-danger)}.fb-empty-groups{text-align:center;padding:3.5rem 1.25rem}.fb-empty-icon{color:var(--color-primary);margin-bottom:.6rem;display:inline-flex}.fb-empty-icon svg{width:2.75rem;height:2.75rem}.fb-empty-groups h4{margin:0 0 .35rem}.fb-empty-groups .btn{margin-top:1rem}.fb-editor__footer{justify-content:flex-end;margin-top:1.25rem}.fb-identity{align-items:flex-end;gap:1rem;display:flex}.fb-group-title{max-width:720px;min-height:2.6rem;font-size:1.1rem}.fb-identity__key{color:var(--color-muted);padding-bottom:.5rem;font-size:.8rem}.fb-tabs__list{border-bottom:1px solid var(--color-border);gap:.25rem;display:flex;overflow-x:auto}.fb-tabs__tab{color:var(--color-muted);white-space:nowrap;cursor:pointer;background:0 0;border:0;align-items:center;gap:.4rem;padding:.7rem .9rem;font-size:.86rem;font-weight:500;display:inline-flex;position:relative}.fb-tabs__tab:hover{color:var(--color-ink)}.fb-tabs__tab.is-active{color:var(--color-primary-hover);font-weight:600}.fb-tabs__tab.is-active:after{background:var(--color-primary);content:"";border-radius:3px 3px 0 0;height:3px;position:absolute;bottom:-1px;left:.4rem;right:.4rem}.fb-tabs__tab.is-disabled{opacity:.5;cursor:not-allowed}.fb-tabs__badge{border-radius:var(--radius-sm);background:var(--color-primary-soft);color:var(--color-primary);text-transform:uppercase;padding:.05rem .4rem;font-size:.66rem;font-weight:700}.fb-tabs__panel{padding-top:1.25rem}.fb-field-list{position:relative}.fb-sortable-list{display:grid}.fb-sortable-list--sub{border-left:3px solid var(--color-primary-soft);background:var(--color-background);margin-top:.5rem;padding-left:.75rem}.fb-sortable-empty{min-height:0}.fb-sortable-item{position:relative}.fb-sortable-item.is-dragging{opacity:.4}.fb-sortable-item.is-drop-target:before{z-index:3;background:var(--color-primary);content:"";border-radius:3px;height:3px;position:absolute;top:-1px;left:.25rem;right:.25rem}.fb-field-row{border:1px solid var(--color-border);background:var(--color-surface);border-radius:0}.fb-field-row:first-child{border-radius:.35rem .35rem 0 0}.fb-field-row:last-child{border-radius:0 0 .35rem .35rem}.fb-field-row+.fb-field-row{border-top:0}.fb-field-row.is-expanded{border-color:var(--color-primary);box-shadow:0 0 0 1px var(--color-primary);z-index:1}.fb-field-row__header{grid-template-columns:1.9rem 2.1rem minmax(160px,1.5fr) minmax(120px,1fr) minmax(120px,1fr) minmax(90px,.7fr) auto auto;align-items:center;min-height:3.9rem;display:grid}.fb-field-row__header:hover,.fb-field-row.is-expanded .fb-field-row__header{background:var(--color-primary-soft)}.fb-field-row__handle{width:1.9rem;color:var(--color-muted);cursor:grab;background:0 0;border:0;justify-content:center;align-self:stretch;align-items:center;display:flex}.fb-field-row__handle:hover{color:var(--color-primary-hover)}.fb-field-row__handle:active{cursor:grabbing}.fb-field-row__handle svg{width:1.05rem;height:1.05rem}.fb-field-row__toggle{cursor:pointer;text-align:left;color:var(--color-text);background:0 0;border:0;display:contents}.fb-field-row__order{background:var(--color-background);width:1.55rem;height:1.55rem;color:var(--color-muted);border-radius:50%;justify-content:center;align-items:center;margin-left:.35rem;font-size:.72rem;font-weight:700;display:inline-flex}.fb-field-row__label{align-items:center;gap:.55rem;min-width:0;padding-left:.6rem;display:inline-flex}.fb-field-row__label strong{color:var(--color-primary-hover);text-overflow:ellipsis;white-space:nowrap;font-size:.92rem;font-weight:600;overflow:hidden}.fb-field-row__type-icon{width:1rem;height:1rem;color:var(--color-primary);flex:none}.fb-field-row__name,.fb-field-row__key{color:var(--color-muted);text-overflow:ellipsis;white-space:nowrap;font-size:.82rem;overflow:hidden}.fb-field-row__type{color:var(--color-text);font-size:.8rem}.fb-field-row__actions{align-items:center;gap:.55rem;padding:0 .7rem;display:flex}.fb-field-row__chevron{color:var(--color-muted);cursor:pointer;background:0 0;border:0;padding:0 .6rem}.fb-field-row__chevron svg{width:1rem;height:1rem}.fb-field-row__body{border-top:1px solid var(--color-border);background:var(--color-surface);gap:1.25rem;padding:1.35rem;display:grid}.fb-settings-grid{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem;display:grid}.fb-setting{flex-direction:column;gap:.35rem;min-width:0;display:flex}.fb-setting--wide{grid-column:1/-1}.fb-setting--inline{flex-direction:row;align-items:center;gap:.6rem}.fb-setting__label{color:var(--color-text);font-size:.82rem;font-weight:600}.fb-setting__hint{color:var(--color-muted);font-size:.74rem}.fb-setting__hint code{background:var(--color-background);border-radius:var(--radius-sm);padding:0 .25rem}.fb-settings-grid textarea{resize:vertical}.fb-input-append-wrap{align-items:center;display:flex;position:relative}.fb-input-append-wrap .input{padding-right:2.2rem}.fb-append-suffix{color:var(--color-muted);pointer-events:none;font-size:.82rem;position:absolute;right:.65rem}.fb-switch{cursor:pointer;align-items:center;gap:.5rem;display:inline-flex}.fb-checkbox-grid{flex-wrap:wrap;gap:.55rem 1.1rem;display:flex}.fb-checkbox{align-items:center;gap:.4rem;font-size:.82rem;display:inline-flex}.fb-subfields{border:1px dashed var(--color-border);border-radius:var(--radius-md);background:var(--color-background);padding:1rem}.fb-subfields--layout{margin-top:.75rem}.fb-subfields__header{justify-content:space-between;align-items:center;gap:1rem;margin-bottom:.75rem;display:flex}.fb-subfields__header h5{margin:0}.fb-layouts{border:1px dashed var(--color-border);border-radius:var(--radius-md);background:var(--color-background);gap:.85rem;padding:1rem;display:grid}.fb-layout-card{border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);gap:.85rem;padding:.9rem;display:grid}.fb-layout-card__header{align-items:center;gap:.6rem;display:flex}.fb-layout-card__header strong{color:var(--color-primary-hover)}.fb-layout-card__display{color:var(--color-muted);margin-left:auto;font-size:.75rem}.fb-layout-card__settings{padding:.25rem 0}.fb-empty-fields{text-align:center;color:var(--color-muted);padding:1.5rem .5rem .35rem}.fb-list-footer{justify-content:flex-end;margin-top:.85rem;display:flex}.fb-add-field{border:1px solid var(--color-primary);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-primary-hover);cursor:pointer;padding:.55rem .9rem;font-size:.85rem;font-weight:600}.fb-add-field:hover{background:var(--color-primary-soft)}.fb-rule-editor{gap:1rem;display:grid}.fb-rule-editor__toggle{cursor:pointer;align-items:center;gap:.5rem;font-weight:600;display:inline-flex}.fb-rule-groups{gap:.75rem;display:grid}.fb-rule-group{border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-background);gap:.55rem;padding:.85rem;display:grid}.fb-rule-group__connector{color:var(--color-muted);text-align:center;font-size:.75rem;font-weight:700}.fb-rule-group__header{color:var(--color-text);font-size:.8rem;font-weight:700}.fb-rule-group__actions{align-items:center;gap:.6rem;margin-top:.2rem;display:flex}.fb-rule-group__and{color:var(--color-muted);font-size:.72rem}.fb-rule-row{grid-template-columns:minmax(160px,1.2fr) minmax(140px,.9fr) minmax(160px,1.2fr) auto;align-items:center;gap:.55rem;display:grid}.fb-rule-row__spacer{display:block}.fb-rule-remove{color:var(--color-danger);cursor:pointer;background:0 0;border:0;font-size:1.1rem}.fb-rule-add-group{justify-self:start}.fb-modal-backdrop{z-index:1000;background:#0a0a0a80;place-items:center;padding:1rem;display:grid;position:fixed;inset:0}.fb-browse-modal{border:1px solid var(--color-border);background:var(--color-surface);width:min(920px,100%);max-height:min(720px,100vh - 2rem);box-shadow:var(--shadow-xl);border-radius:.55rem;grid-template-rows:auto auto auto 1fr auto;display:grid;overflow:hidden}.fb-browse-modal__header{border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:flex-start;gap:1rem;padding:1.1rem 1.35rem;display:flex}.fb-browse-modal__header h3{color:var(--color-ink);margin:.15rem 0 0}.fb-browse-modal__search{padding:.9rem 1.35rem .5rem}.fb-browse-modal__search .input{max-width:380px}.fb-browse-modal__tabs{border-bottom:1px solid var(--color-border);gap:1.1rem;padding:0 1.35rem;display:flex;overflow-x:auto}.fb-browse-modal__tabs button{color:var(--color-muted);white-space:nowrap;cursor:pointer;background:0 0;border:0;padding:.6rem 0 .55rem;position:relative}.fb-browse-modal__tabs button.is-active{color:var(--color-primary-hover);font-weight:600}.fb-browse-modal__tabs button.is-active:after{background:var(--color-primary);content:"";height:3px;position:absolute;bottom:-1px;left:0;right:0}.fb-browse-modal__body{grid-template-columns:minmax(0,1fr) 230px;min-height:300px;display:grid;overflow:auto}.fb-browse-grid{grid-template-columns:repeat(auto-fill,minmax(128px,1fr));align-content:start;gap:.75rem;padding:1.25rem;display:grid}.fb-browse-tile{border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);min-height:108px;color:var(--color-text);text-align:center;cursor:pointer;place-items:center;gap:.35rem;padding:.8rem;transition:border-color .15s,background .15s,box-shadow .15s;display:grid}.fb-browse-tile:hover,.fb-browse-tile.is-selected{border-color:var(--color-primary);background:var(--color-primary-soft);box-shadow:0 0 0 1px var(--color-primary)}.fb-browse-tile__icon{border:1px solid var(--color-primary);width:2.1rem;height:2.1rem;color:var(--color-primary-hover);border-radius:.4rem;place-items:center;display:grid}.fb-browse-tile__icon svg{width:1.2rem;height:1.2rem}.fb-browse-tile small{color:var(--color-muted);font-size:.7rem}.fb-browse-preview{border-left:1px solid var(--color-border);background:var(--color-background);flex-direction:column;align-items:flex-start;gap:.6rem;padding:1.5rem 1.25rem;display:flex}.fb-browse-preview__icon{border:1px solid var(--color-primary);width:2.5rem;height:2.5rem;color:var(--color-primary-hover);border-radius:.45rem;place-items:center;display:grid}.fb-browse-preview__icon svg{width:1.4rem;height:1.4rem}.fb-browse-preview h4{color:var(--color-ink);margin:0}.fb-browse-empty{text-align:center;grid-column:1/-1;padding:2rem}.fb-browse-modal__footer{border-top:1px solid var(--color-border);justify-content:space-between;align-items:flex-end;gap:1rem;padding:1.1rem 1.35rem;display:flex}.fb-browse-modal__label{flex:1;gap:.3rem;max-width:340px;display:grid}.fb-page-header{flex-direction:column;gap:1rem;margin-bottom:1.5rem;display:flex}.fb-page-header__main{flex-direction:column;gap:.35rem;display:flex}.fb-page-header__main .fb-eyebrow{margin-bottom:.25rem}.fb-page-header__main h1{color:var(--color-ink);margin:.3rem 0 0;font-size:clamp(1.4rem,2vw,1.85rem);font-weight:600}.fb-page-header__main p{margin:.35rem 0 0}.fb-page-header__actions{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.fb-page-header__toolbar{border:1px solid var(--color-border);background:var(--color-surface);border-bottom:0;border-radius:.55rem .55rem 0 0;align-items:flex-end;gap:1rem;margin-bottom:1rem;padding:.9rem 1rem;display:flex}.fb-toolbar{flex-wrap:wrap;align-items:flex-end;gap:1rem;display:flex}.fb-toolbar__filter{align-items:center;gap:.6rem;display:flex}.fb-toolbar__filter>span{color:var(--color-muted);white-space:nowrap;font-size:.8rem;font-weight:600}.fb-toolbar__search{max-width:320px;margin-left:auto}.fb-page-content{flex:1 0 auto;min-width:0}.card{background:var(--color-surface);border:1px solid var(--color-border);border-radius:.55rem;overflow:hidden}.card--padded{padding:0}@media (width<=900px){.fb-groups-table__head{display:none}.fb-groups-table__row{grid-template-columns:1fr 1fr;gap:.55rem}.fb-groups-table__title,.fb-groups-table__actions{grid-column:1/-1}.fb-groups-table__actions{justify-content:flex-start}.fb-field-row__header{grid-template-columns:1.9rem 2.1rem minmax(0,1fr) auto auto}.fb-field-row__name,.fb-field-row__key,.fb-field-row__type{display:none}.fb-rule-row,.fb-browse-modal__body{grid-template-columns:1fr}.fb-browse-preview{display:none}.fb-browse-modal__footer{flex-direction:column;align-items:stretch}.fb-browse-modal__label{width:100%;max-width:none}.fb-list__header,.fb-editor__header,.fb-list__toolbar{flex-direction:column;align-items:stretch}.fb-list__search{max-width:none;margin-left:0}.fb-page-header__toolbar{flex-direction:column;align-items:stretch}.fb-toolbar__search{max-width:none;margin-left:0}}.fb-list__header-actions{align-items:center;gap:.5rem;display:flex}.fb-import-btn{display:inline-flex}.fb-import-btn input{opacity:0;width:0;height:0;position:absolute}.fb-btn-icon{vertical-align:middle;width:1rem;height:1rem;margin-right:.35rem;display:inline-flex}.fb-modal{border:1px solid var(--color-border);background:var(--color-surface);width:min(560px,100%);max-height:calc(100vh - 2rem);box-shadow:var(--shadow-xl);border-radius:.55rem;overflow:hidden}.fb-modal__header{border-bottom:1px solid var(--color-border);justify-content:space-between;align-items:center;padding:1.1rem 1.35rem;display:flex}.fb-modal__header h3{color:var(--color-ink);margin:0}.fb-modal__close{width:2rem;height:2rem;color:var(--color-muted);border-radius:var(--radius-sm);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;display:flex}.fb-modal__close:hover{background:var(--color-primary-soft);color:var(--color-primary-hover)}.fb-modal__body{padding:1.35rem}.fb-import-dropzone{border:2px dashed var(--color-border);border-radius:var(--radius-md);background:var(--color-background);min-height:140px;color:var(--color-text);cursor:pointer;flex-direction:column;justify-content:center;align-items:center;gap:.75rem;transition:border-color .15s,background .15s;display:flex}.fb-import-dropzone:hover{border-color:var(--color-primary);background:var(--color-primary-soft)}.fb-dropzone-icon{width:3rem;height:3rem;color:var(--color-primary)}.fb-import-hint{text-align:center;margin-top:.5rem;font-size:.8rem}.fb-modal__footer{border-top:1px solid var(--color-border);justify-content:flex-end;align-items:center;gap:.5rem;padding:1rem 1.35rem;display:flex}
@@ -1 +0,0 @@
1
- import{i as e,p as t,s as n,u as r,v as i}from"./solid.8gBSxpeo.js";import{a,c as o,i as s,m as c,s as l}from"./web.DwNv8rLL.js";import{n as u}from"./i18n.3zKFZ7KU.js";import{t as d}from"./api.CGA0D2A2.js";import{i as f,n as p,r as m,s as h}from"./src.BJaHBCQK.js";var g=c(`<div class="notice notice--error">`),_=c(`<div class=notice>`),v=c(`<form><h3></h3><div class=form-grid></div><div class=media-details__actions>`),y=c(`<div class=general-settings><!$><!/><!$><!/><!$><!/>`),b=c(`<p class=muted>`);function x(){let{t:c}=u(),[x,S]=t({}),[C,w]=t(!1),[T,E]=t(``),[D,O]=t(``),[k,A]=t(!1),j=r(()=>[{key:`siteTitle`,label:c(`settings.general.fields.siteTitle`),type:`text`,placeholder:c(`settings.general.fields.siteTitlePlaceholder`)},{key:`siteDescription`,label:c(`settings.general.fields.siteDescription`),type:`text`,placeholder:c(`settings.general.fields.siteDescriptionPlaceholder`)},{key:`language`,label:c(`settings.general.fields.language`),type:`select`,options:[`pt-BR`,`en-US`,`es-ES`]},{key:`timezone`,label:c(`settings.general.fields.timezone`),type:`text`,placeholder:c(`settings.general.fields.timezonePlaceholder`)}]);i(async()=>{try{let e=await d.getSettings(`general`),t={};for(let n of e)t[n.key]=typeof n.value==`string`?n.value:JSON.stringify(n.value??``);for(let e of j())t[e.key]===void 0&&(t[e.key]=``);S(t),w(!0)}catch(e){E(e instanceof Error?e.message:String(e))}});let M=async e=>{e.preventDefault(),E(``),O(``),A(!0);try{let e=await d.getSettings(`general`),t=new Map(e.map(e=>[e.key,e]));await d.updateSettings(j().map(e=>{let n=t.get(e.key);return{key:e.key,value:x()[e.key]??``,group:n?.group??`general`,type:n?.type??`string`}})),O(c(`settings.general.saved`))}catch(e){E(e instanceof Error?e.message:String(e))}finally{A(!1)}};return(()=>{var t=s(y),r=t.firstChild,[i,u]=a(r.nextSibling),d=i.nextSibling,[w,E]=a(d.nextSibling),O=w.nextSibling,[A,N]=a(O.nextSibling);return l(t,n(e,{get when(){return T()},get children(){var e=s(g);return l(e,T),e}}),i,u),l(t,n(e,{get when(){return D()},get children(){var e=s(_);return l(e,D),e}}),w,E),l(t,n(e,{get when(){return C()},get fallback(){return(()=>{var e=s(b);return l(e,()=>c(`settings.general.loading`)),e})()},get children(){return n(m,{get children(){var e=s(v),t=e.firstChild,r=t.nextSibling,i=r.nextSibling;return e.addEventListener(`submit`,M),l(t,()=>c(`settings.general.title`)),l(r,()=>j().map(e=>e.type===`select`?n(h,{get name(){return e.key},get label(){return e.label},get value(){return x()[e.key]??``},get options(){return o(()=>`options`in e)()?e.options.map(e=>({value:e,label:e})):[]},onChange:t=>S({...x(),[e.key]:t})}):n(f,{get name(){return e.key},get label(){return e.label},get placeholder(){return o(()=>`placeholder`in e)()?e.placeholder:``},get value(){return x()[e.key]??``},onInput:t=>S({...x(),[e.key]:t})}))),l(i,n(p,{variant:`primary`,type:`submit`,get disabled(){return k()},get loading(){return k()},get children(){return c(`settings.general.save`)}})),e}})}}),A,N),t})()}export{x as GeneralSettings};
@@ -1 +0,0 @@
1
- import{d as e,i as t,p as n,r,s as i,u as a,v as o}from"./solid.8gBSxpeo.js";import{a as s,c,d as l,f as u,i as d,m as f,r as p,s as m,u as h}from"./web.DwNv8rLL.js";import{n as g}from"./i18n.3zKFZ7KU.js";import{t as _}from"./api.CGA0D2A2.js";var v=f(`<div class="notice notice--error">`),y=f(`<button type=button class="btn btn-secondary">`),b=f(`<div class=post-types-manager><!$><!/><form class=card><h3></h3><div class=form-grid><label><!$><!/><input class=input required pattern=[a-z0-9_]+></label><label><!$><!/><input class=input required></label><label><!$><!/><input class=input required></label><label><!$><!/><input class=input placeholder=box><small class=muted></small></label></div><fieldset class=supports><legend></legend><!$><!/><label><input type=checkbox> <!$><!/></label><label><input type=checkbox> <!$><!/></label></fieldset><button type=submit class="btn btn-primary"></button><!$><!/></form><table class=table><thead><tr><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),x=f(`<label><input type=checkbox> <!$><!/>`),ee=f(`<button type=button class="btn btn-danger">`),te=f(`<tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><button type=button class="btn btn-secondary"></button> <!$><!/>`);function S(){let{t:f}=g(),[p,S]=n([]),[C,w]=n(``),[ne,T]=n(!1),[E,D]=n(null),re=a(()=>[{value:`title`,label:f(`settings.postTypes.form.supportsOptions.title`)},{value:`editor`,label:f(`settings.postTypes.form.supportsOptions.editor`)},{value:`thumbnail`,label:f(`settings.postTypes.form.supportsOptions.thumbnail`)},{value:`excerpt`,label:f(`settings.postTypes.form.supportsOptions.excerpt`)},{value:`revisions`,label:f(`settings.postTypes.form.supportsOptions.revisions`)}]),[O,k]=n({name:``,slug:``,singularLabel:``,pluralLabel:``,hasArchive:!1,singleton:!1,menuIcon:`box`,supports:[`title`,`editor`]}),A=()=>{D(null),k({name:``,slug:``,singularLabel:``,pluralLabel:``,hasArchive:!1,singleton:!1,menuIcon:`box`,supports:[`title`,`editor`]})},j=async()=>{try{S(await _.getContentTypes())}catch(e){w(e instanceof Error?e.message:String(e))}};o(j);let ie=async e=>{e.preventDefault(),w(``),T(!0);try{let e={name:O().name||O().slug,slug:O().slug,singularLabel:O().singularLabel,pluralLabel:O().pluralLabel,hasArchive:O().hasArchive,singleton:O().singleton,menuIcon:O().menuIcon||`box`,supports:O().supports};E()?await _.updateContentType(E(),e):await _.createContentType(e),A(),await j(),window.dispatchEvent(new Event(`okcms:content-models-changed`))}catch(e){w(e instanceof Error?e.message:String(e))}finally{T(!1)}},ae=e=>{D(e.slug),k({name:e.name,slug:e.slug,singularLabel:e.singularLabel,pluralLabel:e.pluralLabel,hasArchive:e.hasArchive??!1,singleton:e.singleton??!1,menuIcon:e.menuIcon??`box`,supports:[...e.supports??[`title`,`editor`]]})},oe=async e=>{try{await _.deleteContentType(e),await j(),window.dispatchEvent(new Event(`okcms:content-models-changed`))}catch(e){w(e instanceof Error?e.message:String(e))}};return(()=>{var n=d(b),a=n.firstChild,[o,g]=s(a.nextSibling),_=o.nextSibling,S=_.firstChild,w=S.nextSibling,T=w.firstChild,D=T.firstChild,[j,se]=s(D.nextSibling),M=j.nextSibling,N=T.nextSibling,ce=N.firstChild,[P,le]=s(ce.nextSibling),F=P.nextSibling,I=N.nextSibling,ue=I.firstChild,[L,de]=s(ue.nextSibling),R=L.nextSibling,z=I.nextSibling,fe=z.firstChild,[B,pe]=s(fe.nextSibling),V=B.nextSibling,me=V.nextSibling,H=w.nextSibling,U=H.firstChild,he=U.nextSibling,[W,ge]=s(he.nextSibling),G=W.nextSibling,K=G.firstChild,_e=K.nextSibling.nextSibling,[ve,ye]=s(_e.nextSibling),q=G.nextSibling,J=q.firstChild,be=J.nextSibling.nextSibling,[xe,Se]=s(be.nextSibling),Y=H.nextSibling,Ce=Y.nextSibling,[we,Te]=s(Ce.nextSibling),X=_.nextSibling.firstChild,Z=X.firstChild.firstChild,Q=Z.nextSibling,$=Q.nextSibling,Ee=$.nextSibling,De=Ee.nextSibling,Oe=De.nextSibling,ke=Oe.nextSibling,Ae=ke.nextSibling,je=X.nextSibling;return m(n,i(t,{get when(){return C()},get children(){var e=d(v);return m(e,C),e}}),o,g),_.addEventListener(`submit`,ie),m(S,(()=>{var e=c(()=>!!E());return()=>e()?f(`settings.postTypes.form.editTitle`):f(`settings.postTypes.form.title`)})()),m(T,()=>f(`settings.postTypes.form.slug`),j,se),M.$$input=e=>k({...O(),slug:e.currentTarget.value}),m(N,()=>f(`settings.postTypes.form.singular`),P,le),F.$$input=e=>k({...O(),singularLabel:e.currentTarget.value}),m(I,()=>f(`settings.postTypes.form.plural`),L,de),R.$$input=e=>k({...O(),pluralLabel:e.currentTarget.value}),m(z,()=>f(`settings.postTypes.form.icon`),B,pe),V.$$input=e=>k({...O(),menuIcon:e.currentTarget.value}),m(me,()=>f(`settings.postTypes.form.iconHint`)),m(U,()=>f(`settings.postTypes.form.supports`)),m(H,i(r,{get each(){return re()},children:t=>(()=>{var n=d(x),r=n.firstChild,i=r.nextSibling.nextSibling,[a,o]=s(i.nextSibling);return r.addEventListener(`change`,e=>k({...O(),supports:e.currentTarget.checked?[...O().supports,t.value]:O().supports.filter(e=>e!==t.value)})),m(n,()=>t.label,a,o),e(()=>u(r,`checked`,O().supports.includes(t.value))),n})()}),W,ge),K.addEventListener(`change`,e=>k({...O(),hasArchive:e.currentTarget.checked})),m(G,()=>f(`settings.postTypes.form.hasArchive`),ve,ye),J.addEventListener(`change`,e=>k({...O(),singleton:e.currentTarget.checked})),m(q,()=>f(`settings.postTypes.form.singleton`),xe,Se),m(Y,(()=>{var e=c(()=>!!E());return()=>e()?f(`settings.postTypes.form.update`):f(`settings.postTypes.form.create`)})()),m(_,i(t,{get when(){return E()},get children(){var e=d(y);return e.$$click=A,m(e,()=>f(`settings.postTypes.form.cancel`)),h(),e}}),we,Te),m(Z,()=>f(`settings.postTypes.table.slug`)),m(Q,()=>f(`settings.postTypes.table.singular`)),m($,()=>f(`settings.postTypes.table.plural`)),m(Ee,()=>f(`settings.postTypes.table.source`)),m(De,()=>f(`settings.postTypes.table.supports`)),m(Oe,()=>f(`settings.postTypes.table.archive`)),m(ke,()=>f(`settings.postTypes.table.mode`)),m(Ae,()=>f(`settings.postTypes.table.icon`)),m(je,i(r,{get each(){return p()},children:e=>(()=>{var n=d(te),r=n.firstChild,a=r.nextSibling,o=a.nextSibling,l=o.nextSibling,u=l.nextSibling,p=u.nextSibling,g=p.nextSibling,_=g.nextSibling,v=_.nextSibling,y=v.firstChild,b=y.nextSibling.nextSibling,[x,S]=s(b.nextSibling);return m(r,()=>e.slug),m(a,()=>e.singularLabel),m(o,()=>e.pluralLabel),m(l,()=>e.source??f(`settings.postTypes.sources.admin`)),m(u,()=>(e.supports??[]).join(`, `)),m(p,(()=>{var t=c(()=>!!e.hasArchive);return()=>t()?f(`common.yes`):f(`common.no`)})()),m(g,(()=>{var t=c(()=>!!e.singleton);return()=>t()?f(`settings.postTypes.table.singleton`):f(`settings.postTypes.table.collection`)})()),m(_,()=>e.menuIcon??`box`),y.$$click=()=>ae(e),m(y,()=>f(`settings.postTypes.table.actions.edit`)),m(v,i(t,{get when(){return e.source!==`CORE`},get children(){var t=d(ee);return t.$$click=()=>oe(e.slug),m(t,()=>f(`settings.postTypes.table.actions.remove`)),h(),t}}),x,S),h(),n})()})),e(e=>{var t=f(`settings.postTypes.form.slugHint`),n=ne();return t!==e.e&&l(M,`title`,e.e=t),n!==e.t&&u(Y,`disabled`,e.t=n),e},{e:void 0,t:void 0}),e(()=>u(M,`value`,O().slug)),e(()=>u(F,`value`,O().singularLabel)),e(()=>u(R,`value`,O().pluralLabel)),e(()=>u(V,`value`,O().menuIcon)),e(()=>u(K,`checked`,O().hasArchive)),e(()=>u(J,`checked`,O().singleton)),h(),n})()}p([`input`,`click`]);export{S as PostTypesManager};
@@ -1 +0,0 @@
1
- import{d as e,i as t,p as n,r,s as i,v as a}from"./solid.8gBSxpeo.js";import{a as o,c as s,d as c,f as l,i as u,m as d,r as f,s as p,u as m}from"./web.DwNv8rLL.js";import{n as h}from"./i18n.3zKFZ7KU.js";import{t as g}from"./api.CGA0D2A2.js";var _=d(`<div class="notice notice--error">`),v=d(`<div class=taxonomies-manager><!$><!/><form class=card><h3></h3><div class=form-grid><label><!$><!/><input class=input required></label><label><!$><!/><input class=input pattern=[a-z0-9_]*></label><label><input type=checkbox> <!$><!/></label></div><fieldset><legend></legend><!$><!/></fieldset><button type=submit class="btn btn-primary"></button></form><table class=table><thead><tr><th></th><th></th><th></th><th></th></tr></thead><tbody>`),y=d(`<label><input type=checkbox> <!$><!/> (<!$><!/>)`),b=d(`<button type=button class="btn btn-danger">`),x=d(`<tr><td><!$><!/> (<!$><!/>)</td><td></td><td></td><td>`),ee=d(`<label style=margin-right:0.75rem><input type=checkbox> <!$><!/>`);function S(){let{t:d}=h(),[f,S]=n([]),[C,w]=n([]),[T,E]=n(``),[D,O]=n(!1),[k,A]=n({name:``,slug:``,hierarchical:!1,attachTo:[]}),j=async()=>{try{let[e,t]=await Promise.all([g.getTaxonomies(),g.getContentTypes()]);S(e),w(t)}catch(e){E(e instanceof Error?e.message:String(e))}};a(j);let M=async e=>{e.preventDefault(),E(``),O(!0);try{await g.createTaxonomy({name:k().name,slug:k().slug||void 0,hierarchical:k().hierarchical,attachTo:k().attachTo,labels:{singular_name:k().name}}),A({name:``,slug:``,hierarchical:!1,attachTo:[]}),await j(),window.dispatchEvent(new Event(`okcms:content-models-changed`))}catch(e){E(e instanceof Error?e.message:String(e))}finally{O(!1)}},N=async(e,t)=>{let n=e.attachTo?.includes(t);try{n?await g.detachTaxonomy(e.slug,t):await g.attachTaxonomy(e.slug,t),await j(),window.dispatchEvent(new Event(`okcms:content-models-changed`))}catch(e){E(e instanceof Error?e.message:String(e))}},P=async e=>{try{await g.deleteTaxonomy(e),await j(),window.dispatchEvent(new Event(`okcms:content-models-changed`))}catch(e){E(e instanceof Error?e.message:String(e))}};return(()=>{var n=u(v),a=n.firstChild,[h,g]=o(a.nextSibling),S=h.nextSibling,w=S.firstChild,E=w.nextSibling,O=E.firstChild,j=O.firstChild,[F,I]=o(j.nextSibling),L=F.nextSibling,R=O.nextSibling,z=R.firstChild,[B,V]=o(z.nextSibling),H=B.nextSibling,U=R.nextSibling,W=U.firstChild,G=W.nextSibling.nextSibling,[K,q]=o(G.nextSibling),J=E.nextSibling,Y=J.firstChild,te=Y.nextSibling,[ne,re]=o(te.nextSibling),X=J.nextSibling,Z=S.nextSibling.firstChild,Q=Z.firstChild.firstChild,$=Q.nextSibling,ie=$.nextSibling,ae=Z.nextSibling;return p(n,i(t,{get when(){return T()},get children(){var e=u(_);return p(e,T),e}}),h,g),S.addEventListener(`submit`,M),p(w,()=>d(`settings.taxonomies.form.title`)),p(O,()=>d(`settings.taxonomies.form.name`),F,I),L.$$input=e=>A({...k(),name:e.currentTarget.value}),p(R,()=>d(`settings.taxonomies.form.slug`),B,V),H.$$input=e=>A({...k(),slug:e.currentTarget.value}),W.addEventListener(`change`,e=>A({...k(),hierarchical:e.currentTarget.checked})),p(U,()=>d(`settings.taxonomies.form.hierarchical`),K,q),p(Y,()=>d(`settings.taxonomies.form.attachTo`)),p(J,i(r,{get each(){return C()},children:t=>(()=>{var n=u(y),r=n.firstChild,i=r.nextSibling.nextSibling,[a,s]=o(i.nextSibling),c=a.nextSibling.nextSibling,[d,f]=o(c.nextSibling);return d.nextSibling,r.addEventListener(`change`,e=>A({...k(),attachTo:e.currentTarget.checked?[...k().attachTo,t.slug]:k().attachTo.filter(e=>e!==t.slug)})),p(n,()=>t.pluralLabel,a,s),p(n,()=>t.slug,d,f),e(()=>l(r,`checked`,k().attachTo.includes(t.slug))),n})()}),ne,re),p(X,()=>d(`settings.taxonomies.form.create`)),p(Q,()=>d(`settings.taxonomies.table.taxonomy`)),p($,()=>d(`settings.taxonomies.table.hierarchical`)),p(ie,()=>d(`settings.taxonomies.table.attachedTypes`)),p(ae,i(r,{get each(){return f()},children:n=>(()=>{var a=u(x),c=a.firstChild,f=c.firstChild,[h,g]=o(f.nextSibling),_=h.nextSibling.nextSibling,[v,y]=o(_.nextSibling);v.nextSibling;var S=c.nextSibling,w=S.nextSibling,T=w.nextSibling;return p(c,()=>n.name,h,g),p(c,()=>n.slug,v,y),p(S,(()=>{var e=s(()=>!!n.hierarchical);return()=>e()?d(`common.yes`):d(`common.no`)})()),p(w,i(r,{get each(){return C()},children:t=>(()=>{var r=u(ee),i=r.firstChild,a=i.nextSibling.nextSibling,[s,c]=o(a.nextSibling);return i.addEventListener(`change`,()=>N(n,t.slug)),p(r,()=>t.slug,s,c),e(()=>l(i,`checked`,n.attachTo?.includes(t.slug)??!1)),r})()})),p(T,i(t,{get when(){return n.source!==`CORE`},get children(){var e=u(b);return e.$$click=()=>P(n.slug),p(e,()=>d(`settings.taxonomies.table.actions.remove`)),m(),e}})),a})()})),e(e=>{var t=d(`settings.taxonomies.form.slugHint`),n=D();return t!==e.e&&c(H,`title`,e.e=t),n!==e.t&&l(X,`disabled`,e.t=n),e},{e:void 0,t:void 0}),e(()=>l(L,`value`,k().name)),e(()=>l(H,`value`,k().slug)),e(()=>l(W,`checked`,k().hierarchical)),m(),n})()}f([`input`,`click`]);export{S as TaxonomiesManager};
@@ -1 +0,0 @@
1
- import{_ as e,d as t,i as n,p as r,r as i,s as a,v as o}from"./solid.8gBSxpeo.js";import{a as s,c,d as l,f as u,h as d,i as f,m as p,r as m,s as h,u as g}from"./web.DwNv8rLL.js";import{n as _}from"./i18n.3zKFZ7KU.js";import{t as v}from"./api.CGA0D2A2.js";var y=p(`<div class=webhook-event-select__dropdown role=listbox><input class=input><div class=webhook-event-select__options>`),b=p(`<div class=webhook-event-select><button type=button class="input webhook-event-select__trigger"aria-haspopup=listbox><span></span><span aria-hidden=true>⌄</span></button><!$><!/><div class=webhook-event-select__chips>`),x=p(`<span class=muted>`),S=p(`<label class=webhook-event-option><input type=checkbox><span><!$><!/><small>`),C=p(`<button type=button class=webhook-event-chip><!$><!/> ×`),w=p(`<div class="notice notice--error">`),T=p(`<div class=table-scroll><table class=table><thead><tr><th></th><th></th><th></th><th></th><th></th></tr></thead><tbody>`),E=p(`<div class="resource-hub webhooks-manager"><!$><!/><div class=card-header-row><div><h3></h3><p></p></div><button class="btn btn-primary"type=button></button></div><!$><!/><section class=card></section><style>.webhook-event-select{position:relative}.webhook-event-select__trigger{width:100%;display:flex;justify-content:space-between;align-items:center;text-align:left;cursor:pointer}.webhook-event-select__dropdown{position:absolute;z-index:20;top:calc(100% + .25rem);left:0;right:0;background:var(--color-surface,#fff);border:1px solid var(--color-border,#dcdcde);box-shadow:0 8px 22px rgba(0,0,0,.14);padding:.6rem}.webhook-event-select__options{max-height:240px;overflow:auto;margin-top:.5rem;display:grid;gap:.2rem}.webhook-event-option{display:flex!important;align-items:flex-start;gap:.5rem!important;padding:.45rem;border-radius:4px;cursor:pointer}.webhook-event-option:hover{background:var(--color-surface-muted,#f5f5f5)}.webhook-event-option span{display:grid;gap:.12rem}.webhook-event-option small{color:var(--color-muted);font-size:.75rem}.webhook-event-select__chips{display:flex;flex-wrap:wrap;gap:.35rem;margin-top:.4rem}.webhook-event-chip{border:1px solid var(--color-border,#dcdcde);background:var(--color-surface-muted,#f5f5f5);border-radius:999px;padding:.2rem .55rem;cursor:pointer;font-size:.78rem}`),D=p(`<label><!$><!/><input class=input type=password>`),O=p(`<div class=form-grid><label><!$><!/><input class=input></label><label><!$><!/><input class=input type=password>`),k=p(`<div class=form-grid><label><!$><!/><input class=input type=password></label><label><!$><!/><input class=input>`),A=p(`<section class=card><h3></h3><form class=resource-form><label><!$><!/><input class=input required type=url></label><label><!$><!/><!$><!/></label><label><!$><!/><select class=input><option value=none></option><option value=bearer></option><option value=basic></option><option value=api_key></option><option value=hmac_sha256></option></select></label><!$><!/><!$><!/><!$><!/><!$><!/><label class=checkbox-label><input type=checkbox> <!$><!/></label><div><button class="btn btn-primary"type=submit></button> <button class=btn type=button>`),j=p(`<p>`),M=p(`<tr><td></td><td></td><td></td><td></td><td><button class=btn type=button></button> <button class="btn btn-danger"type=button>`),N=()=>({url:``,events:[],active:!0,auth_type:`hmac_sha256`,auth_config:{signatureHeader:`X-Webhook-Signature`}});function P(p){let[m,_]=r(!1),[v,w]=r(``),T;o(()=>{let t=e=>{T&&!T.contains(e.target)&&_(!1)};document.addEventListener(`mousedown`,t),e(()=>document.removeEventListener(`mousedown`,t))});let E=()=>p.options.filter(e=>`${e.label} ${e.value}`.toLowerCase().includes(v().toLowerCase())),D=e=>p.onChange(p.value.includes(e)?p.value.filter(t=>t!==e):[...p.value,e]);return(()=>{var e=f(b),r=e.firstChild,o=r.firstChild,O=r.nextSibling,[k,A]=s(O.nextSibling),j=k.nextSibling,M=T;return typeof M==`function`?d(M,e):T=e,r.$$click=()=>_(!m()),h(o,(()=>{var e=c(()=>p.value.length>0);return()=>e()?`${p.value.length} selecionado(s)`:p.placeholder})()),h(e,a(n,{get when(){return m()},get children(){var e=f(y),r=e.firstChild,o=r.nextSibling;return r.$$input=e=>w(e.currentTarget.value),h(o,a(n,{get when(){return E().length>0},get fallback(){return(()=>{var e=f(x);return h(e,()=>p.empty),e})()},get children(){return a(i,{get each(){return E()},children:e=>(()=>{var n=f(S),r=n.firstChild,i=r.nextSibling,a=i.firstChild,[o,c]=s(a.nextSibling),l=o.nextSibling;return r.addEventListener(`change`,()=>D(e.value)),h(i,()=>e.label,o,c),h(l,()=>e.value),t(()=>u(r,`checked`,p.value.includes(e.value))),n})()})}})),t(()=>l(r,`placeholder`,p.searchPlaceholder)),t(()=>u(r,`value`,v())),g(),e}}),k,A),h(j,a(i,{get each(){return p.value},children:e=>(()=>{var t=f(C),n=t.firstChild,[r,i]=s(n.nextSibling);return r.nextSibling,t.$$click=()=>D(e),h(t,()=>p.options.find(t=>t.value===e)?.label??e,r,i),g(),t})()})),t(()=>l(r,`aria-expanded`,m())),g(),e})()}function F(){let{t:e}=_(),[d,p]=r([]),[m,y]=r([]),[b,x]=r(null),[S,C]=r(``),[F,I]=r(!0),L=async()=>{I(!0);try{let[e,t]=await Promise.all([v.getWebhooks(),v.getWebhookEvents()]);p(e),y(t)}catch(e){C(e instanceof Error?e.message:String(e))}finally{I(!1)}};o(L);let R=e=>{if(!e){x(N());return}x({...e,events:[...e.events??[]],auth_type:e.auth_type??`hmac_sha256`,auth_config:{...e.auth_config??{}}})},z=(t,n)=>{let r=b();if(r){if(!r.events||r.events.length===0){C(e(`webhooks.eventsRequired`));return}x({...r,auth_config:{...r.auth_config,[t]:n}})}},B=async e=>{e.preventDefault();let t=b();if(!t)return;let n=Object.fromEntries(Object.entries(t.auth_config).filter(([,e])=>e));try{t.id?await v.updateWebhook(t.id,{...t,auth_config:n}):await v.createWebhook({...t,auth_config:n}),x(null),await L()}catch(e){C(e instanceof Error?e.message:String(e))}};return(()=>{var r=f(E),o=r.firstChild,[p,_]=s(o.nextSibling),y=p.nextSibling,C=y.firstChild,N=C.firstChild,I=N.nextSibling,V=C.nextSibling,H=y.nextSibling,[U,W]=s(H.nextSibling),G=U.nextSibling;return h(r,a(n,{get when(){return S()},get children(){var e=f(w);return h(e,S),e}}),p,_),h(N,()=>e(`webhooks.listTitle`)),h(I,()=>e(`webhooks.description`)),V.$$click=()=>R(),h(V,()=>e(`webhooks.new`)),h(r,a(n,{get when(){return b()},children:r=>(()=>{var i=f(A),o=i.firstChild,d=o.nextSibling,p=d.firstChild,_=p.firstChild,[v,y]=s(_.nextSibling),b=v.nextSibling,S=p.nextSibling,C=S.firstChild,[w,T]=s(C.nextSibling),E=w.nextSibling,[j,M]=s(E.nextSibling),N=S.nextSibling,F=N.firstChild,[I,L]=s(F.nextSibling),R=I.nextSibling,V=R.firstChild,H=V.nextSibling,U=H.nextSibling,W=U.nextSibling,G=W.nextSibling,ee=N.nextSibling,[K,te]=s(ee.nextSibling),ne=K.nextSibling,[q,re]=s(ne.nextSibling),ie=q.nextSibling,[J,ae]=s(ie.nextSibling),oe=J.nextSibling,[Y,se]=s(oe.nextSibling),X=Y.nextSibling,Z=X.firstChild,ce=Z.nextSibling.nextSibling,[le,ue]=s(ce.nextSibling),Q=X.nextSibling.firstChild,$=Q.nextSibling.nextSibling;return h(o,(()=>{var t=c(()=>!!r().id);return()=>t()?e(`webhooks.edit`):e(`webhooks.create`)})()),d.addEventListener(`submit`,B),h(p,()=>e(`webhooks.url`),v,y),b.$$input=e=>x({...r(),url:e.currentTarget.value}),h(S,()=>e(`webhooks.events`),w,T),h(S,a(P,{get options(){return m()},get value(){return r().events??[]},onChange:e=>x({...r(),events:e}),get placeholder(){return e(`webhooks.selectEvents`)},get searchPlaceholder(){return e(`webhooks.searchEvents`)},get empty(){return e(`webhooks.noEvents`)}}),j,M),h(N,()=>e(`webhooks.authentication`),I,L),R.addEventListener(`change`,e=>x({...r(),auth_type:e.currentTarget.value,auth_config:{}})),h(V,()=>e(`webhooks.auth.none`)),h(H,()=>e(`webhooks.auth.bearer`)),h(U,()=>e(`webhooks.auth.basic`)),h(W,()=>e(`webhooks.auth.apiKey`)),h(G,()=>e(`webhooks.auth.hmac_sha256`)),h(d,a(n,{get when(){return r().auth_type===`bearer`},get children(){var n=f(D),i=n.firstChild,[a,o]=s(i.nextSibling),c=a.nextSibling;return h(n,()=>e(`webhooks.token`),a,o),c.$$input=e=>z(`token`,e.currentTarget.value),t(()=>l(c,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(c,`value`,r().auth_config.token??``)),g(),n}}),K,te),h(d,a(n,{get when(){return r().auth_type===`basic`},get children(){var n=f(O),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.username`),o,c),d.$$input=e=>z(`username`,e.currentTarget.value),h(p,()=>e(`webhooks.password`),_,v),y.$$input=e=>z(`password`,e.currentTarget.value),t(()=>l(y,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(d,`value`,r().auth_config.username??``)),t(()=>u(y,`value`,r().auth_config.password??``)),g(),n}}),q,re),h(d,a(n,{get when(){return r().auth_type===`api_key`},get children(){var n=f(O),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.headerName`),o,c),d.$$input=e=>z(`headerName`,e.currentTarget.value),h(p,()=>e(`webhooks.apiKeyValue`),_,v),y.$$input=e=>z(`value`,e.currentTarget.value),t(()=>l(y,`placeholder`,r().id?e(`webhooks.keepExisting`):``)),t(()=>u(d,`value`,r().auth_config.headerName??``)),t(()=>u(y,`value`,r().auth_config.value??``)),g(),n}}),J,ae),h(d,a(n,{get when(){return r().auth_type===`hmac_sha256`},get children(){var n=f(k),i=n.firstChild,a=i.firstChild,[o,c]=s(a.nextSibling),d=o.nextSibling,p=i.nextSibling,m=p.firstChild,[_,v]=s(m.nextSibling),y=_.nextSibling;return h(i,()=>e(`webhooks.secret`),o,c),d.$$input=e=>z(`secret`,e.currentTarget.value),h(p,()=>e(`webhooks.signatureHeader`),_,v),y.$$input=e=>z(`signatureHeader`,e.currentTarget.value),t(t=>{var n=!r().id,i=r().id?e(`webhooks.keepExisting`):``;return n!==t.e&&u(d,`required`,t.e=n),i!==t.t&&l(d,`placeholder`,t.t=i),t},{e:void 0,t:void 0}),t(()=>u(d,`value`,r().auth_config.secret??``)),t(()=>u(y,`value`,r().auth_config.signatureHeader??`X-Webhook-Signature`)),g(),n}}),Y,se),Z.addEventListener(`change`,e=>x({...r(),active:e.currentTarget.checked})),h(X,()=>e(`webhooks.active`),le,ue),h(Q,()=>e(`common.save`)),$.$$click=()=>x(null),h($,()=>e(`common.cancel`)),t(()=>u(b,`value`,r().url??``)),t(()=>u(R,`value`,r().auth_type)),t(()=>u(Z,`checked`,r().active??!0)),g(),i})()}),U,W),h(G,a(n,{get when(){return!F()},get fallback(){return(()=>{var t=f(j);return h(t,()=>e(`webhooks.loading`)),t})()},get children(){return a(n,{get when(){return d().length>0},get fallback(){return(()=>{var t=f(j);return h(t,()=>e(`webhooks.empty`)),t})()},get children(){var t=f(T),n=t.firstChild.firstChild,r=n.firstChild.firstChild,o=r.nextSibling,s=o.nextSibling,l=s.nextSibling,u=l.nextSibling,p=n.nextSibling;return h(r,()=>e(`webhooks.url`)),h(o,()=>e(`webhooks.events`)),h(s,()=>e(`webhooks.authentication`)),h(l,()=>e(`webhooks.active`)),h(u,()=>e(`common.actions`)),h(p,a(i,{get each(){return d()},children:t=>(()=>{var n=f(M),r=n.firstChild,i=r.nextSibling,a=i.nextSibling,o=a.nextSibling,s=o.nextSibling.firstChild,l=s.nextSibling.nextSibling;return h(r,()=>t.url),h(i,()=>(t.events??[]).join(`, `)),h(a,()=>e(`webhooks.auth.${t.auth_type??`hmac_sha256`}`)),h(o,(()=>{var n=c(()=>!!t.active);return()=>n()?e(`common.yes`):e(`common.no`)})()),s.$$click=()=>R(t),h(s,()=>e(`common.edit`)),l.$$click=()=>t.id&&void v.deleteWebhook(t.id).then(L),h(l,()=>e(`common.delete`)),g(),n})()})),t}})}})),g(),r})()}m([`click`,`input`]);export{F as WebhooksManager};