Superuser
This commit is contained in:
1 parent
9133928401
commit
f0b1ca4b68
18 files changed
+864
-187
No files matched your search
@@ -1,3 +1,7 @@
|
||||
PORTAINER_URL=Your_Portainer_Server_Adress
|
||||
PORTAINER_API_KEY=Your_Portainer_API_Key
|
||||
PORTAINER_ENDPOINT_ID=Your_Portainer_Endpoint_ID
|
||||
SUPERUSER_USERNAME=Your_Superuser_Username (optional)
|
||||
SUPERUSER_EMAIL=Your_Superuser_Email (optional)
|
||||
SUPERUSER_PASSWORD=Your_Superuser_Password (optional)
|
||||
SELF_STACK_ID=Your_StackPulse_Stack_ID
|
||||
@@ -0,0 +1,212 @@
|
||||
import crypto from 'crypto';
|
||||
import { db } from '../db/index.js';
|
||||
|
||||
export const SUPERUSER_GROUP_NAME = 'superuser';
|
||||
|
||||
const selectGroupByName = db.prepare('SELECT * FROM user_groups WHERE name = ?');
|
||||
const insertGroup = db.prepare('INSERT INTO user_groups (name, description) VALUES (?, ?)');
|
||||
|
||||
const selectSuperuser = db.prepare(`
|
||||
SELECT u.*
|
||||
FROM users u
|
||||
INNER JOIN user_group_memberships m ON m.user_id = u.id
|
||||
INNER JOIN user_groups g ON g.id = m.group_id
|
||||
WHERE g.name = ?
|
||||
LIMIT 1
|
||||
`);
|
||||
|
||||
const selectUserByUsername = db.prepare('SELECT * FROM users WHERE username = ?');
|
||||
const selectUserByEmail = db.prepare('SELECT * FROM users WHERE email = ?');
|
||||
const selectUserById = db.prepare('SELECT * FROM users WHERE id = ?');
|
||||
|
||||
const insertUser = db.prepare(`
|
||||
INSERT INTO users (username, email, password_hash, password_salt, is_active, created_at, updated_at)
|
||||
VALUES (?, ?, ?, ?, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
|
||||
`);
|
||||
|
||||
const updateUser = db.prepare(`
|
||||
UPDATE users
|
||||
SET username = ?, email = ?, password_hash = ?, password_salt = ?, is_active = 1, updated_at = CURRENT_TIMESTAMP
|
||||
WHERE id = ?
|
||||
`);
|
||||
|
||||
const insertMembership = db.prepare(`
|
||||
INSERT OR IGNORE INTO user_group_memberships (user_id, group_id, role)
|
||||
VALUES (?, ?, ?)
|
||||
`);
|
||||
|
||||
const removeMembershipsForGroup = db.prepare(`
|
||||
DELETE FROM user_group_memberships
|
||||
WHERE group_id = ?
|
||||
`);
|
||||
|
||||
const selectUserIdsForGroup = db.prepare(`
|
||||
SELECT u.id
|
||||
FROM users u
|
||||
INNER JOIN user_group_memberships m ON m.user_id = u.id
|
||||
WHERE m.group_id = ?
|
||||
`);
|
||||
|
||||
const deleteUserById = db.prepare('DELETE FROM users WHERE id = ?');
|
||||
const deleteGroupById = db.prepare('DELETE FROM user_groups WHERE id = ?');
|
||||
|
||||
const countSuperusers = db.prepare(`
|
||||
SELECT COUNT(*) as count
|
||||
FROM user_group_memberships m
|
||||
INNER JOIN user_groups g ON g.id = m.group_id
|
||||
WHERE g.name = ?
|
||||
`);
|
||||
|
||||
const creationTransaction = db.transaction(({ username, email, passwordHash, passwordSalt, groupId }) => {
|
||||
const existingUser = selectUserByUsername.get(username) || selectUserByEmail.get(email);
|
||||
|
||||
let userId;
|
||||
if (existingUser) {
|
||||
updateUser.run(username, email, passwordHash, passwordSalt, existingUser.id);
|
||||
userId = existingUser.id;
|
||||
} else {
|
||||
const result = insertUser.run(username, email, passwordHash, passwordSalt);
|
||||
userId = result.lastInsertRowid;
|
||||
}
|
||||
|
||||
removeMembershipsForGroup.run(groupId);
|
||||
insertMembership.run(userId, groupId, SUPERUSER_GROUP_NAME);
|
||||
|
||||
return selectUserById.get(userId);
|
||||
});
|
||||
|
||||
function hashPassword(password) {
|
||||
if (!password || typeof password !== 'string') {
|
||||
throw new Error('INVALID_PASSWORD');
|
||||
}
|
||||
const trimmed = password.trim();
|
||||
if (trimmed.length < 8) {
|
||||
throw new Error('PASSWORD_TOO_SHORT');
|
||||
}
|
||||
const salt = crypto.randomBytes(16).toString('hex');
|
||||
const hash = crypto.pbkdf2Sync(trimmed, salt, 120000, 64, 'sha512').toString('hex');
|
||||
return { salt, hash };
|
||||
}
|
||||
|
||||
function ensureGroup(name, description = null) {
|
||||
let group = selectGroupByName.get(name);
|
||||
if (group) return group;
|
||||
insertGroup.run(name, description);
|
||||
group = selectGroupByName.get(name);
|
||||
return group;
|
||||
}
|
||||
|
||||
export function hasSuperuser() {
|
||||
const { count } = countSuperusers.get(SUPERUSER_GROUP_NAME);
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
function createOrUpdateSuperuser({ username, email, password }) {
|
||||
const normalizedUsername = String(username || '').trim();
|
||||
const normalizedEmail = String(email || '').trim().toLowerCase();
|
||||
|
||||
if (!normalizedUsername) {
|
||||
throw new Error('USERNAME_REQUIRED');
|
||||
}
|
||||
|
||||
if (!normalizedEmail || !normalizedEmail.includes('@')) {
|
||||
throw new Error('EMAIL_INVALID');
|
||||
}
|
||||
|
||||
const { hash, salt } = hashPassword(password);
|
||||
const group = ensureGroup(SUPERUSER_GROUP_NAME, 'System Superuser');
|
||||
|
||||
const user = creationTransaction({
|
||||
username: normalizedUsername,
|
||||
email: normalizedEmail,
|
||||
passwordHash: hash,
|
||||
passwordSalt: salt,
|
||||
groupId: group.id
|
||||
});
|
||||
|
||||
return {
|
||||
id: user.id,
|
||||
username: user.username,
|
||||
email: user.email
|
||||
};
|
||||
}
|
||||
|
||||
const deletionTransaction = db.transaction((groupId) => {
|
||||
const members = selectUserIdsForGroup.all(groupId);
|
||||
|
||||
members.forEach(({ id }) => {
|
||||
deleteUserById.run(id);
|
||||
});
|
||||
|
||||
const { changes: groupChanges } = deleteGroupById.run(groupId);
|
||||
|
||||
return {
|
||||
usersRemoved: members.length,
|
||||
groupRemoved: groupChanges > 0
|
||||
};
|
||||
});
|
||||
|
||||
export function ensureSuperuserFromEnv() {
|
||||
const username = process.env.SUPERUSER_USERNAME;
|
||||
const email = process.env.SUPERUSER_EMAIL;
|
||||
const password = process.env.SUPERUSER_PASSWORD;
|
||||
|
||||
if (hasSuperuser()) {
|
||||
if (username || email || password) {
|
||||
console.log('ℹ️ Superuser existiert bereits - Umgebungsvariablen werden ignoriert.');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!username || !email || !password) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
createOrUpdateSuperuser({ username, email, password });
|
||||
console.log('✅ Superuser aus Umgebungsvariablen angelegt.');
|
||||
return true;
|
||||
} catch (error) {
|
||||
console.error('⚠️ Superuser konnte nicht aus Umgebungsvariablen erzeugt werden:', error.message);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export function registerSuperuser({ username, email, password }) {
|
||||
if (hasSuperuser()) {
|
||||
const err = new Error('SUPERUSER_ALREADY_EXISTS');
|
||||
err.code = 'SUPERUSER_ALREADY_EXISTS';
|
||||
throw err;
|
||||
}
|
||||
|
||||
try {
|
||||
return createOrUpdateSuperuser({ username, email, password });
|
||||
} catch (error) {
|
||||
if (error.message === 'USERNAME_REQUIRED' || error.message === 'EMAIL_INVALID' || error.message === 'PASSWORD_TOO_SHORT') {
|
||||
error.code = error.message;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
export function removeSuperuser() {
|
||||
const group = selectGroupByName.get(SUPERUSER_GROUP_NAME);
|
||||
|
||||
if (!group) {
|
||||
const error = new Error('SUPERUSER_NOT_FOUND');
|
||||
error.code = 'SUPERUSER_NOT_FOUND';
|
||||
throw error;
|
||||
}
|
||||
|
||||
return deletionTransaction(group.id);
|
||||
}
|
||||
|
||||
export function getSuperuserSummary() {
|
||||
const user = selectSuperuser.get(SUPERUSER_GROUP_NAME);
|
||||
if (!user) return null;
|
||||
return {
|
||||
id: user.id,
|
||||
username: user.username,
|
||||
email: user.email
|
||||
};
|
||||
}
|
||||
+67
-9
@@ -1,5 +1,7 @@
|
||||
import { db } from './index.js';
|
||||
|
||||
db.exec('PRAGMA foreign_keys = ON;');
|
||||
|
||||
const createRedeployLogsTable = `
|
||||
CREATE TABLE IF NOT EXISTS redeploy_logs (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
@@ -13,7 +15,60 @@ CREATE TABLE IF NOT EXISTS redeploy_logs (
|
||||
);
|
||||
`;
|
||||
|
||||
const createSettingsTable = `
|
||||
CREATE TABLE IF NOT EXISTS settings (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT,
|
||||
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
`;
|
||||
|
||||
const createUsersTable = `
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
username TEXT NOT NULL UNIQUE,
|
||||
email TEXT NOT NULL UNIQUE,
|
||||
password_hash TEXT NOT NULL,
|
||||
password_salt TEXT,
|
||||
is_active INTEGER NOT NULL DEFAULT 1,
|
||||
last_login DATETIME,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
`;
|
||||
|
||||
const createUserGroupsTable = `
|
||||
CREATE TABLE IF NOT EXISTS user_groups (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
name TEXT NOT NULL UNIQUE,
|
||||
description TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
`;
|
||||
|
||||
const createUserGroupMembershipsTable = `
|
||||
CREATE TABLE IF NOT EXISTS user_group_memberships (
|
||||
user_id INTEGER NOT NULL,
|
||||
group_id INTEGER NOT NULL,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (user_id, group_id),
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
|
||||
FOREIGN KEY (group_id) REFERENCES user_groups(id) ON DELETE CASCADE
|
||||
);
|
||||
`;
|
||||
|
||||
const createUserSettingsTable = `
|
||||
CREATE TABLE IF NOT EXISTS user_settings (
|
||||
user_id INTEGER NOT NULL,
|
||||
setting_key TEXT NOT NULL,
|
||||
setting_value TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY (user_id, setting_key),
|
||||
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
|
||||
);
|
||||
`;
|
||||
|
||||
db.exec(createRedeployLogsTable);
|
||||
|
||||
@@ -30,17 +85,20 @@ try {
|
||||
|
||||
console.log('✅ redeploy_logs table ready');
|
||||
|
||||
const createSettingsTable = `
|
||||
CREATE TABLE IF NOT EXISTS settings (
|
||||
key TEXT PRIMARY KEY,
|
||||
value TEXT,
|
||||
updated_at TEXT DEFAULT CURRENT_TIMESTAMP
|
||||
)
|
||||
`;
|
||||
|
||||
db.exec(createSettingsTable);
|
||||
|
||||
console.log('✅ settings table ready');
|
||||
|
||||
db.exec(createUsersTable);
|
||||
console.log('✅ users table ready');
|
||||
|
||||
db.exec(createUserGroupsTable);
|
||||
console.log('✅ user_groups table ready');
|
||||
|
||||
db.exec(createUserGroupMembershipsTable);
|
||||
console.log('✅ user_group_memberships table ready');
|
||||
|
||||
db.exec(createUserSettingsTable);
|
||||
console.log('✅ user_settings table ready');
|
||||
|
||||
|
||||
db.close();
|
||||
@@ -11,6 +11,7 @@ import os from 'os';
|
||||
import crypto from 'crypto';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { db } from './db/index.js';
|
||||
import { ensureSuperuserFromEnv, getSuperuserSummary, hasSuperuser, registerSuperuser, removeSuperuser } from './auth/superuser.js';
|
||||
import {
|
||||
logRedeployEvent,
|
||||
buildLogFilter,
|
||||
@@ -23,6 +24,8 @@ import { activateMaintenanceMode, deactivateMaintenanceMode, getMaintenanceState
|
||||
|
||||
dotenv.config();
|
||||
|
||||
ensureSuperuserFromEnv();
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
@@ -1115,6 +1118,61 @@ const redeployStackById = async (stackId, redeployType) => {
|
||||
|
||||
// --- API Endpoints ---
|
||||
|
||||
// Superuser Setup
|
||||
app.get('/api/auth/superuser/status', (req, res) => {
|
||||
const exists = hasSuperuser();
|
||||
const user = exists ? getSuperuserSummary() : null;
|
||||
res.json({ exists, user });
|
||||
});
|
||||
|
||||
app.post('/api/auth/superuser/register', (req, res) => {
|
||||
if (hasSuperuser()) {
|
||||
return res.status(409).json({ error: 'SUPERUSER_EXISTS' });
|
||||
}
|
||||
|
||||
const { username, email, password } = req.body || {};
|
||||
|
||||
if (!username || !email || !password) {
|
||||
return res.status(400).json({ error: 'MISSING_FIELDS' });
|
||||
}
|
||||
|
||||
try {
|
||||
const user = registerSuperuser({ username, email, password });
|
||||
res.status(201).json({ user });
|
||||
} catch (error) {
|
||||
switch (error.code) {
|
||||
case 'USERNAME_REQUIRED':
|
||||
return res.status(400).json({ error: 'USERNAME_REQUIRED' });
|
||||
case 'EMAIL_INVALID':
|
||||
return res.status(400).json({ error: 'EMAIL_INVALID' });
|
||||
case 'PASSWORD_TOO_SHORT':
|
||||
return res.status(400).json({ error: 'PASSWORD_TOO_SHORT' });
|
||||
case 'SUPERUSER_ALREADY_EXISTS':
|
||||
return res.status(409).json({ error: 'SUPERUSER_EXISTS' });
|
||||
default:
|
||||
console.error('⚠️ Fehler beim Registrieren des Superusers:', error);
|
||||
return res.status(500).json({ error: 'INTERNAL_ERROR' });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
app.delete('/api/auth/superuser', (req, res) => {
|
||||
if (!hasSuperuser()) {
|
||||
return res.status(404).json({ error: 'SUPERUSER_NOT_FOUND' });
|
||||
}
|
||||
|
||||
try {
|
||||
const result = removeSuperuser();
|
||||
res.json({ success: true, usersRemoved: result.usersRemoved, groupRemoved: result.groupRemoved });
|
||||
} catch (error) {
|
||||
if (error.code === 'SUPERUSER_NOT_FOUND') {
|
||||
return res.status(404).json({ error: 'SUPERUSER_NOT_FOUND' });
|
||||
}
|
||||
console.error('⚠️ Fehler beim Löschen des Superusers:', error);
|
||||
res.status(500).json({ error: 'INTERNAL_ERROR' });
|
||||
}
|
||||
});
|
||||
|
||||
// Stacks abrufen
|
||||
app.get('/api/stacks', maintenanceGuard, async (req, res) => {
|
||||
console.log("ℹ️ [API] GET /api/stacks: Abruf gestartet");
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
function RR(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(n,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();function xx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ts(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var _x={exports:{}},sd={},Tx={exports:{}},lt={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Cs=Symbol.for("react.element"),NR=Symbol.for("react.portal"),jR=Symbol.for("react.fragment"),AR=Symbol.for("react.strict_mode"),MR=Symbol.for("react.profiler"),IR=Symbol.for("react.provider"),DR=Symbol.for("react.context"),LR=Symbol.for("react.forward_ref"),FR=Symbol.for("react.suspense"),VR=Symbol.for("react.memo"),zR=Symbol.for("react.lazy"),Nm=Symbol.iterator;function BR(e){return e===null||typeof e!="object"?null:(e=Nm&&e[Nm]||e["@@iterator"],typeof e=="function"?e:null)}var Cx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ox=Object.assign,Sx={};function Vi(e,t,r){this.props=e,this.context=t,this.refs=Sx,this.updater=r||Cx}Vi.prototype.isReactComponent={};Vi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Vi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Px(){}Px.prototype=Vi.prototype;function Oh(e,t,r){this.props=e,this.context=t,this.refs=Sx,this.updater=r||Cx}var Sh=Oh.prototype=new Px;Sh.constructor=Oh;Ox(Sh,Vi.prototype);Sh.isPureReactComponent=!0;var jm=Array.isArray,kx=Object.prototype.hasOwnProperty,Ph={current:null},Ex={key:!0,ref:!0,__self:!0,__source:!0};function Rx(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)kx.call(t,n)&&!Ex.hasOwnProperty(n)&&(o[n]=t[n]);var c=arguments.length-2;if(c===1)o.children=r;else if(1<c){for(var p=Array(c),g=0;g<c;g++)p[g]=arguments[g+2];o.children=p}if(e&&e.defaultProps)for(n in c=e.defaultProps,c)o[n]===void 0&&(o[n]=c[n]);return{$$typeof:Cs,type:e,key:a,ref:i,props:o,_owner:Ph.current}}function WR(e,t){return{$$typeof:Cs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function kh(e){return typeof e=="object"&&e!==null&&e.$$typeof===Cs}function HR(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Am=/\/+/g;function Uf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?HR(""+e.key):t.toString(36)}function Iu(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Cs:case NR:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+Uf(i,0):n,jm(o)?(r="",e!=null&&(r=e.replace(Am,"$&/")+"/"),Iu(o,t,r,"",function(g){return g})):o!=null&&(kh(o)&&(o=WR(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Am,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",jm(e))for(var c=0;c<e.length;c++){a=e[c];var p=n+Uf(a,c);i+=Iu(a,t,r,p,o)}else if(p=BR(e),typeof p=="function")for(e=p.call(e),c=0;!(a=e.next()).done;)a=a.value,p=n+Uf(a,c++),i+=Iu(a,t,r,p,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function iu(e,t,r){if(e==null)return e;var n=[],o=0;return Iu(e,n,"","",function(a){return t.call(r,a,o++)}),n}function UR(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var yr={current:null},Du={transition:null},$R={ReactCurrentDispatcher:yr,ReactCurrentBatchConfig:Du,ReactCurrentOwner:Ph};lt.Children={map:iu,forEach:function(e,t,r){iu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return iu(e,function(){t++}),t},toArray:function(e){return iu(e,function(t){return t})||[]},only:function(e){if(!kh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};lt.Component=Vi;lt.Fragment=jR;lt.Profiler=MR;lt.PureComponent=Oh;lt.StrictMode=AR;lt.Suspense=FR;lt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$R;lt.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Ox({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=Ph.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(p in t)kx.call(t,p)&&!Ex.hasOwnProperty(p)&&(n[p]=t[p]===void 0&&c!==void 0?c[p]:t[p])}var p=arguments.length-2;if(p===1)n.children=r;else if(1<p){c=Array(p);for(var g=0;g<p;g++)c[g]=arguments[g+2];n.children=c}return{$$typeof:Cs,type:e.type,key:o,ref:a,props:n,_owner:i}};lt.createContext=function(e){return e={$$typeof:DR,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:IR,_conLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var qR=A,GR=Symbol.for("react.element"),KR=Symbol.for("react.fragment"),YR=Object.prototype.hasOwnProperty,XR=qR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,QR={key:!0,ref:!0,__self:!0,__source:!0};function Nx(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)YR.call(t,n)&&!QR.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:GR,type:e,key:a,ref:i,props:o,_owner:XR.current}}sd.Fragment=KR;sd.jsx=Nx;sd.jsxs=Nx;_x.exports=sd;var I=_x.exports,$p={},jx={exports:{}},Wr={},Ax={exports:{}},Mx={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/(function(e){function t(U,B){var H=U.length;U.push(B);e:for(;0<H;){var K=H-1>>>1,Q=U[K];if(0<o(Q,B))U[K]=B,U[H]=Q,H=K;else break e}}function r(U){return U.length===0?null:U[0]}function n(U){if(U.length===0)return null;var B=U[0],H=U.pop();if(H!==B){U[0]=H;e:for(var K=0,Q=U.length,oe=Q>>>1;K<oe;){var ue=2*(K+1)-1,ie=U[ue],ne=ue+1,be=U[ne];if(0>o(ie,H))ne<Q&&0>o(be,ie)?(U[K]=be,U[ne]=H,K=ne):(U[K]=ie,U[ue]=H,K=ue);else if(ne<Q&&0>o(be,H))U[K]=be,U[ne]=H,K=ne;else break e}}return B}function o(U,B){var H=U.sortIndex-B.sortIndex;return H!==0?H:U.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var p=[],g=[],v=1,_=null,O=3,C=!1,T=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function u(U){for(var B=r(g);B!==null;){if(B.callback===null)n(g);else if(B.startTime<=U)n(g),B.sortIndex=B.expirationTime,t(p,B);else break;B=r(g)}}function s(U){if(x=!1,u(U),!T)if(r(p)!==null)T=!0,G(h);else{var B=r(g);B!==null&&X(s,B.startTime-U)}}function h(U,B){T=!1,x&&(x=!1,d(E),E=-1),C=!0;var H=O;try{for(u(B),_=r(p);_!==null&&(!(_.expirationTime>B)||U&&!N());){var K=_.callback;if(typeof K=="function"){_.callback=null,O=_.priorityLevel;var Q=K(_.expirationTime<=B);B=e.unstable_now(),typeof Q=="function"?_.callback=Q:_===r(p)&&n(p),u(B)}else n(p);_=r(p)}if(_!==null)var oe=!0;else{var ue=r(g);ue!==null&&X(s,ue.startTime-B),oe=!1}return oe}finally{_=null,O=H,C=!1}}var m=!1,w=null,E=-1,k=5,P=-1;function N(){return!(e.unstable_now()-P<k)}function j(){if(w!==null){var U=e.unstable_now();P=U;var B=!0;try{B=w(!0,U)}finally{B?D():(m=!1,w=null)}}else m=!1}var D;if(typeof l=="function")D=function(){l(j)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,W=F.port2;F.port1.onmessage=j,D=function(){W.postMessage(null)}}else D=function(){b(j,0)};function G(U){w=U,m||(m=!0,D())}function X(U,B){E=b(function(){U(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_continueExecution=function(){T||C||(T=!0,G(h))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return O},e.unstable_getFirstCallbackNode=function(){return r(p)},e.unstable_next=function(U){switch(O){case 1:case 2:case 3:var B=3;break;default:B=O}var H=O;O=B;try{return U()}finally{O=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,B){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var H=O;O=U;try{return B()}finally{O=H}},e.unstable_scheduleCallback=function(U,B,H){var K=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?K+H:K):H=K,U){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=H+Q,U={id:v++,callback:B,priorityLevel:U,startTime:H,expirationTime:Q,sortIndex:-1},H>K?(U.sortIndex=H,t(g,U),r(p)===null&&U===r(g)&&(x?(d(E),E=-1):x=!0,X(s,H-K))):(U.sortIndex=Q,t(p,U),T||C||(T=!0,G(h))),U},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(U){var B=O;return function(){var H=O;O=B;try{return U.apply(this,arguments)}finally{O=H}}}})(Mx);Ax.exports=Mx;var JR=Ax.exports;/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Ix=A,zr=JR;function ye(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Dx=new Set,Yl={};function Ra(e,t){Ci(e,t),Ci(e+"Capture",t)}function Ci(e,t){for(Yl[e]=t,e=0;e<t.length;e++)Dx.add(t[e])}var Zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qp=Object.prototype.hasOwnProperty,ZR=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Mm={},Im={};function eN(e){return qp.call(Im,e)?!0:qp.call(Mm,e)?!1:ZR.test(e)?Im[e]=!0:(Mm[e]=!0,!1)}function tN(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rN(e,t,r,n){if(t===null||typeof t>"u"||tN(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function wr(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ar[e]=new wr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ar[t]=new wr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ar[e]=new wr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ar[e]=new wr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ar[e]=new wr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ar[e]=new wr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ar[e]=new wr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ar[e]=new wr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ar[e]=new wr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rh=/[\-:]([a-z])/g;function Nh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rh,Nh);ar[t]=new wr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rh,Nh);ar[t]=new wr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rh,Nh);ar[t]=new wr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ar[e]=new wr(e,1,!1,e.toLowerCase(),null,!1,!1)});ar.xlinkHref=new wr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ar[e]=new wr(e,1,!1,e.toLowerCase(),null,!0,!0)});function jh(e,t,r,n){var o=ar.hasOwnProperty(t)?ar[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!==
Line truncated
|
||||
`+$f+e}var qf=!1;function Gf(e,t){if(!e||qf)return"";qf=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(g){var n=g}Reflect.construct(e,[],t)}else{try{t.call()}catch(g){n=g}e.call(t.prototype)}else{try{throw Error()}catch(g){n=g}e()}}catch(g){if(g&&n&&typeof g.stack=="string"){for(var o=g.stack.split(`
|
||||
`),a=n.stack.split(`
|
||||
`),i=o.length-1,c=a.length-1;1<=i&&0<=c&&o[i]!==a[c];)c--;for(;1<=i&&0<=c;i--,c--)if(o[i]!==a[c]){if(i!==1||c!==1)do if(i--,c--,0>c||o[i]!==a[c]){var p=`
|
||||
`+o[i].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),p}while(1<=i&&0<=c);break}}}finally{qf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Pl(e):""}function nN(e){switch(e.tag){case 5:return Pl(e.type);case 16:return Pl("Lazy");case 13:return Pl("Suspense");case 19:return Pl("SuspenseList");case 0:case 2:case 15:return e=Gf(e.type,!1),e;case 11:return e=Gf(e.type.render,!1),e;case 1:return e=Gf(e.type,!0),e;default:return""}}function Xp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Za:return"Fragment";case Ja:return"Portal";case Gp:return"Profiler";case Ah:return"StrictMode";case Kp:return"Suspense";case Yp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Fx:return(e.displayName||"Context")+".Consumer";case Lx:return(e._context.displayName||"Context")+".Provider";case Mh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ih:return t=e.displayName||null,t!==null?t:Xp(e.type)||"Memo";case So:t=e._payload,e=e._init;try{return Xp(e(t))}catch{}}return null}function oN(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Xp(t);case 8:return t===Ah?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function $o(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aN(e){var t=zx(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function su(e){e._valueTracker||(e._valueTracker=aN(e))}function Bx(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=zx(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function fc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qp(e,t){var r=t.checked;return Dt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Lm(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=$o(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Wx(e,t){t=t.checked,t!=null&&jh(e,"checked",t,!1)}function Jp(e,t){Wx(e,t);var r=$o(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zp(e,t.type,r):t.hasOwnProperty("defaultValue")&&Zp(e,t.type,$o(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Fm(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Zp(e,t,r){(t!=="number"||fc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var kl=Array.isArray;function fi(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+$o(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function e0(e,t){if(t.dan
Line truncated
|
||||
`).replace(gj,"")}function bu(e,t,r){if(t=ly(t),ly(e)!==t&&r)throw Error(ye(425))}function wc(){}var p0=null,h0=null;function g0(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var b0=typeof setTimeout=="function"?setTimeout:void 0,bj=typeof clearTimeout=="function"?clearTimeout:void 0,sy=typeof Promise=="function"?Promise:void 0,vj=typeof queueMicrotask=="function"?queueMicrotask:typeof sy<"u"?function(e){return sy.resolve(null).then(e).catch(mj)}:b0;function mj(e){setTimeout(function(){throw e})}function ip(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),es(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);es(t)}function Lo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function uy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Bi=Math.random().toString(36).slice(2),In="__reactFiber$"+Bi,as="__reactProps$"+Bi,eo="__reactContainer$"+Bi,v0="__reactEvents$"+Bi,yj="__reactListeners$"+Bi,wj="__reactHandles$"+Bi;function fa(e){var t=e[In];if(t)return t;for(var r=e.parentNode;r;){if(t=r[eo]||r[In]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=uy(e);e!==null;){if(r=e[In])return r;e=uy(e)}return t}e=r,r=e.parentNode}return null}function Ps(e){return e=e[In]||e[eo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ni(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(ye(33))}function pd(e){return e[as]||null}var m0=[],oi=-1;function Yo(e){return{current:e}}function Tt(e){0>oi||(e.current=m0[oi],m0[oi]=null,oi--)}function yt(e,t){oi++,m0[oi]=e.current,e.current=t}var qo={},hr=Yo(qo),Er=Yo(!1),wa=qo;function Oi(e,t){var r=e.type.contextTypes;if(!r)return qo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Rr(e){return e=e.childContextTypes,e!=null}function xc(){Tt(Er),Tt(hr)}function cy(e,t,r){if(hr.current!==qo)throw Error(ye(168));yt(hr,t),yt(Er,r)}function R_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(ye(108,oN(e)||"Unknown",o));return Dt({},r,n)}function _c(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qo,wa=hr.current,yt(hr,e),yt(Er,Er.current),!0}function dy(e,t,r){var n=e.stateNode;if(!n)throw Error(ye(169));r?(e=R_(e,t,wa),n.__reactInternalMemoizedMergedChildContext=e,Tt(Er),Tt(hr),yt(hr,e)):Tt(Er),yt(Er,r)}var qn=null,hd=!1,lp=!1;function N_(e){qn===null?qn=[e]:qn.push(e)}function xj(e){hd=!0,N_(e)}function Xo(){if(!lp&&qn!==null){lp=!0;var e=0,t=gt;try{var r=qn;for(gt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}qn=null,hd=!1}catch(o){throw qn!==null&&(qn=qn.slice(e+1)),r_(Lh,Xo),o}finally{gt=t,lp=!1}}return null}var ai=[],ii=0,Tc=null,Cc=0,Jr=[],Zr=0,xa=null,Gn=1,Kn="";function ca(e,t){ai[ii++]=Cc,ai[ii++]=Tc,Tc=e,Cc=t}function j_(e,t,r){Jr[Zr++]=Gn,Jr[Zr++]=Kn,Jr[Zr++]=xa,xa=e;var n=Gn;e=Kn;var o=32-yn(n)-1;n&=~(1<<o),r+=1;var a=32-yn(t)+o;if(30<a){var i=o-o%5;a=(n&(1<<i)-1).toString(32),n>>=i,o-=i,Gn=1<<32-yn(t)+o|r<<o|n,Kn=a+e}else Gn=1<<a|r<<o|n,Kn=e}function qh(e){e.return!==null&&(ca(e,1),j_(e,1,0))}function Gh(e){for(;e===Tc;)Tc=ai[--ii],ai[ii]=null,Cc=ai[--ii],ai[ii]=null;for(;e===xa;)xa=Jr[--Zr],Jr[Zr]=null,Kn=Jr[--Zr],Jr[Zr]=null,Gn=Jr[--Zr],Jr[Zr]=null}var Dr=null,Ir=null,Pt=!1,bn=null;function A_(e,t){var r=tn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function fy(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Dr=e,Ir=Lo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Dr=e,Ir=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=xa!==null?{id:Gn,overflow:Kn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=tn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Dr=e,Ir=null,!0):!1;default:return!1}}function y0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function w0(e){if(Pt){var t=Ir;if(t){var r=t;if(!fy(e,t)){if(y0(e))throw Error(ye(418));t=Lo(r.nextSibling);var n=Dr;t&&fy(e,t)?A_(n,r):(e.flags=e.flags&-4097|2,Pt=!1,Dr=e)}}else{if(y0(e))throw Error(ye(418));e.flags=e.flags&-4097|2,Pt=!1,Dr=e}}}function py(e){
Line truncated
|
||||
Error generating stack: `+a.message+`
|
||||
`+a.stack}return{value:e,source:t,stack:o,digest:null}}function fp(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function C0(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Rj=typeof WeakMap=="function"?WeakMap:Map;function l5(e,t,r){r=Xn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){jc||(jc=!0,M0=n),C0(e,t)},r}function s5(e,t,r){r=Xn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){C0(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){C0(e,t),typeof n!="function"&&(Vo===null?Vo=new Set([this]):Vo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function xy(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Rj;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=Uj.bind(null,e,t,r),t.then(e,e))}function _y(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ty(e,t,r,n,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Xn(-1,1),t.tag=2,Fo(r,t,1))),r.lanes|=1),e)}var Nj=ao.ReactCurrentOwner,Pr=!1;function vr(e,t,r,n){t.child=e===null?z_(t,null,r,n):Pi(t,e.child,r,n)}function Cy(e,t,r,n,o){r=r.render;var a=t.ref;return bi(t,o),n=og(e,t,r,n,a,o),r=ag(),e!==null&&!Pr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ro(e,t,o)):(Pt&&r&&qh(t),t.flags|=1,vr(e,t,n,o),t.child)}function Oy(e,t,r,n,o){if(e===null){var a=r.type;return typeof a=="function"&&!gg(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,u5(e,t,a,n,o)):(e=qu(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&o)){var i=a.memoizedProps;if(r=r.compare,r=r!==null?r:rs,r(i,n)&&e.ref===t.ref)return ro(e,t,o)}return t.flags|=1,e=Bo(a,n),e.ref=t.ref,e.return=t,t.child=e}function u5(e,t,r,n,o){if(e!==null){var a=e.memoizedProps;if(rs(a,n)&&e.ref===t.ref)if(Pr=!1,t.pendingProps=n=a,(e.lanes&o)!==0)e.flags&131072&&(Pr=!0);else return t.lanes=e.lanes,ro(e,t,o)}return O0(e,t,r,n,o)}function c5(e,t,r){var n=t.pendingProps,o=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},yt(ui,Mr),Mr|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,yt(ui,Mr),Mr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,yt(ui,Mr),Mr|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,yt(ui,Mr),Mr|=n;return vr(e,t,o,r),t.child}function d5(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function O0(e,t,r,n,o){var a=Rr(r)?wa:hr.current;return a=Oi(t,a),bi(t,o),r=og(e,t,r,n,a,o),n=ag(),e!==null&&!Pr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,ro(e,t,o)):(Pt&&n&&qh(t),t.flags|=1,vr(e,t,r,o),t.child)}function Sy(e,t,r,n,o){if(Rr(r)){var a=!0;_c(t)}else a=!1;if(bi(t,o),t.stateNode===null)Hu(e,t),F_(t,r,n),T0(t,r,n,o),n=!0;else if(e===null){var i=t.stateNode,c=t.memoizedProps;i.props=c;var p=i.context,g=r.contextType;typeof g=="object"&&g!==null?g=an(g):(g=Rr(r)?wa:hr.current,g=Oi(t,g));var v=r.getDerivedStateFromProps,_=typeof v=="function"||typeof i.getSnapshotBeforeUpdate=="function";_||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==n||p!==g)&&vy(t,i,n,g),Po=!1;var O=t.memoizedState;i.state=O,Pc(t,n,i,o),p=t.memoizedState,c!==n||O!==p||Er.current||Po?(typeof v=="function"&&(_0(t,r,v,n),p=t.memoizedState),(c=Po||by(t,r,c,n,O,p,g))?(_||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=p),i.props=n,i.state=p,i.context=g,n=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,D_(e,t),c=t.memoizedProps,g=t.type===t.elementType?c:pn(t.type,c),i.props=g,_=t.pendingProps,O=i.context,p=r.contextType,typeof p=="object"&&p!==null?p=an(p):(p=Rr(r)?wa:hr.current,p=Oi(t,p));var C=r.getDerivedStateFromProps;(v=typeof C=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==_||O!==p)&&vy(t,i,n,p),Po=!1,O=t.memoizedState,i.state=O,Pc(t,n,i,o);var T=t.memoizedS
Line truncated
|
||||
* @remix-run/router v1.10.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fs.apply(this,arguments)}var Ao;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ao||(Ao={}));const zy="popstate";function tA(e){e===void 0&&(e={});function t(n,o){let{pathname:a,search:i,hash:c}=n.location;return F0("",{pathname:a,search:i,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:Dc(o)}return nA(t,r,null,e)}function It(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wg(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rA(){return Math.random().toString(36).substr(2,8)}function By(e,t){return{usr:e.state,key:e.key,idx:t}}function F0(e,t,r,n){return r===void 0&&(r=null),fs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Wi(t):t,{state:r,key:t&&t.key||n||rA()})}function Dc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Wi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function nA(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,c=Ao.Pop,p=null,g=v();g==null&&(g=0,i.replaceState(fs({},i.state,{idx:g}),""));function v(){return(i.state||{idx:null}).idx}function _(){c=Ao.Pop;let b=v(),d=b==null?null:b-g;g=b,p&&p({action:c,location:x.location,delta:d})}function O(b,d){c=Ao.Push;let l=F0(x.location,b,d);r&&r(l,b),g=v()+1;let u=By(l,g),s=x.createHref(l);try{i.pushState(u,"",s)}catch(h){if(h instanceof DOMException&&h.name==="DataCloneError")throw h;o.location.assign(s)}a&&p&&p({action:c,location:x.location,delta:1})}function C(b,d){c=Ao.Replace;let l=F0(x.location,b,d);r&&r(l,b),g=v();let u=By(l,g),s=x.createHref(l);i.replaceState(u,"",s),a&&p&&p({action:c,location:x.location,delta:0})}function T(b){let d=o.location.origin!=="null"?o.location.origin:o.location.href,l=typeof b=="string"?b:Dc(b);return It(d,"No window.location.(origin|href) available to create URL for href: "+l),new URL(l,d)}let x={get action(){return c},get location(){return e(o,i)},listen(b){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(zy,_),p=b,()=>{o.removeEventListener(zy,_),p=null}},createHref(b){return t(o,b)},createURL:T,encodeLocation(b){let d=T(b);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:O,replace:C,go(b){return i.go(b)}};return x}var Wy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Wy||(Wy={}));function oA(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Wi(t):t,o=ps(n.pathname||"/",r);if(o==null)return null;let a=I5(e);aA(a);let i=null;for(let c=0;i==null&&c<a.length;++c)i=hA(a[c],bA(o));return i}function I5(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let o=(a,i,c)=>{let p={relativePath:c===void 0?a.path||"":c,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};p.relativePath.startsWith("/")&&(It(p.relativePath.startsWith(n),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(n.length));let g=Wo([n,p.relativePath]),v=r.concat(p);a.children&&a.children.length>0&&(It(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),I5(a.children,t,v,g)),!(a.path==null&&!a.index)&&t.push({path:g,score:fA(g,a.index),routesMeta:v})};return e.forEach((a,i)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))o(a,i);else for(let p of D5(a.path))o(a,i,p)}),t}function D5(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=D5(n.join("/")),c=[];return c.push(...i.map(p=>p===""?a:[a,p].join("/"))),o&&c.push(...i),c.map(p=>e.startsWith("/")&&p===""?"/":p)}function aA(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:pA(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const iA=/^:\w+$/,lA=3,sA=2,uA=1,cA=10,dA=-2,Hy=e=>e==="*";function fA(e,t){let r=e.split("/"),n=r.length;return r.some(Hy)&&(n+=dA),t&&(n+=sA),r.filter(o=>!Hy(o)).reduce((o,a)=>o+(iA.test(a)?lA:a===""?uA:cA),n)}function pA(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function hA(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let i=0;i<r.length;++i){let c=r[i],p=i===r.length-1,g=o==="/"?t:t.slice(o.length)||"/",v=V0({path:c.relativePath,caseSensitive:c.caseSensitive,end:p},g);if(!v)return null;Object.assign(n,v.paLine truncated
|
||||
* React Router v6.17.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function Lc(){return Lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lc.apply(this,arguments)}const Cd=A.createContext(null),F5=A.createContext(null),ja=A.createContext(null),Od=A.createContext(null),Qo=A.createContext({outlet:null,matches:[],isDataRoute:!1}),V5=A.createContext(null);function OA(e,t){let{relative:r}=t===void 0?{}:t;Hi()||It(!1);let{basename:n,navigator:o}=A.useContext(ja),{hash:a,pathname:i,search:c}=Sd(e,{relative:r}),p=i;return n!=="/"&&(p=i==="/"?n:Wo([n,i])),o.createHref({pathname:p,search:c,hash:a})}function Hi(){return A.useContext(Od)!=null}function Aa(){return Hi()||It(!1),A.useContext(Od).location}function z5(e){A.useContext(ja).static||A.useLayoutEffect(e)}function B5(){let{isDataRoute:e}=A.useContext(Qo);return e?FA():SA()}function SA(){Hi()||It(!1);let e=A.useContext(Cd),{basename:t,navigator:r}=A.useContext(ja),{matches:n}=A.useContext(Qo),{pathname:o}=Aa(),a=JSON.stringify(xg(n).map(p=>p.pathnameBase)),i=A.useRef(!1);return z5(()=>{i.current=!0}),A.useCallback(function(p,g){if(g===void 0&&(g={}),!i.current)return;if(typeof p=="number"){r.go(p);return}let v=_g(p,JSON.parse(a),o,g.relative==="path");e==null&&t!=="/"&&(v.pathname=v.pathname==="/"?t:Wo([t,v.pathname])),(g.replace?r.replace:r.push)(v,g.state,g)},[t,r,a,o,e])}function Sd(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=A.useContext(Qo),{pathname:o}=Aa(),a=JSON.stringify(xg(n).map(i=>i.pathnameBase));return A.useMemo(()=>_g(e,JSON.parse(a),o,r==="path"),[e,a,o,r])}function PA(e,t){return kA(e,t)}function kA(e,t,r){Hi()||It(!1);let{navigator:n}=A.useContext(ja),{matches:o}=A.useContext(Qo),a=o[o.length-1],i=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let p=Aa(),g;if(t){var v;let x=typeof t=="string"?Wi(t):t;c==="/"||(v=x.pathname)!=null&&v.startsWith(c)||It(!1),g=x}else g=p;let _=g.pathname||"/",O=c==="/"?_:_.slice(c.length)||"/",C=oA(e,{pathname:O}),T=AA(C&&C.map(x=>Object.assign({},x,{params:Object.assign({},i,x.params),pathname:Wo([c,n.encodeLocation?n.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:Wo([c,n.encodeLocation?n.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,r);return t&&T?A.createElement(Od.Provider,{value:{location:Lc({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Ao.Pop}},T):T}function EA(){let e=LA(),t=TA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),r?A.createElement("pre",{style:o},r):null,a)}const RA=A.createElement(EA,null);class NA extends A.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?A.createElement(Qo.Provider,{value:this.props.routeContext},A.createElement(V5.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jA(e){let{routeContext:t,match:r,children:n}=e,o=A.useContext(Cd);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),A.createElement(Qo.Provider,{value:t},n)}function AA(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let a=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let c=a.findIndex(p=>p.route.id&&(i==null?void 0:i[p.route.id]));c>=0||It(!1),a=a.slice(0,Math.min(a.length,c+1))}return a.reduceRight((c,p,g)=>{let v=p.route.id?i==null?void 0:i[p.route.id]:null,_=null;r&&(_=p.route.errorElement||RA);let O=t.concat(a.slice(0,g+1)),C=()=>{let T;return v?T=_:p.route.Component?T=A.createElement(p.route.Component,null):p.route.element?T=p.route.element:T=c,A.createElement(jA,{match:p,routeContext:{outlet:c,matches:O,isDataRoute:r!=null},children:T})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?A.createElement(NA,{location:r.location,revalidation:r.revalidation,component:_,error:v,children:C(),routeContext:{outlet:null,matches:O,isDataRoute:!0}}):C()},null)}var W5=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(W5||{}),Fc=function(e){return e.UseBlocker="useBlocker",e.UseLoadeLine truncated
|
||||
* React Router DOM v6.17.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function Vc(){return Vc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vc.apply(this,arguments)}function U5(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function BA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function WA(e,t){return e.button===0&&(!t||t==="_self")&&!BA(e)}const HA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],UA=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],$A=A.createContext({isTransitioning:!1}),qA="startTransition",Uy=Eh[qA];function GA(e){let{basename:t,children:r,future:n,window:o}=e,a=A.useRef();a.current==null&&(a.current=tA({window:o,v5Compat:!0}));let i=a.current,[c,p]=A.useState({action:i.action,location:i.location}),{v7_startTransition:g}=n||{},v=A.useCallback(_=>{g&&Uy?Uy(()=>p(_)):p(_)},[p,g]);return A.useLayoutEffect(()=>i.listen(v),[i,v]),A.createElement(zA,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:i})}const KA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",YA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$5=A.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:a,replace:i,state:c,target:p,to:g,preventScrollReset:v,unstable_viewTransition:_}=t,O=U5(t,HA),{basename:C}=A.useContext(ja),T,x=!1;if(typeof g=="string"&&YA.test(g)&&(T=g,KA))try{let u=new URL(window.location.href),s=g.startsWith("//")?new URL(u.protocol+g):new URL(g),h=ps(s.pathname,C);s.origin===u.origin&&h!=null?g=h+s.search+s.hash:x=!0}catch{}let b=OA(g,{relative:o}),d=JA(g,{replace:i,state:c,target:p,preventScrollReset:v,relative:o,unstable_viewTransition:_});function l(u){n&&n(u),u.defaultPrevented||d(u)}return A.createElement("a",Vc({},O,{href:T||b,onClick:x||a?n:l,ref:r,target:p}))}),XA=A.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:o=!1,className:a="",end:i=!1,style:c,to:p,unstable_viewTransition:g,children:v}=t,_=U5(t,UA),O=Sd(p,{relative:_.relative}),C=Aa(),T=A.useContext(F5),{navigator:x}=A.useContext(ja),b=T!=null&&ZA(O)&&g===!0,d=x.encodeLocation?x.encodeLocation(O).pathname:O.pathname,l=C.pathname,u=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;o||(l=l.toLowerCase(),u=u?u.toLowerCase():null,d=d.toLowerCase());let s=l===d||!i&&l.startsWith(d)&&l.charAt(d.length)==="/",h=u!=null&&(u===d||!i&&u.startsWith(d)&&u.charAt(d.length)==="/"),m={isActive:s,isPending:h,isTransitioning:b},w=s?n:void 0,E;typeof a=="function"?E=a(m):E=[a,s?"active":null,h?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let k=typeof c=="function"?c(m):c;return A.createElement($5,Vc({},_,{"aria-current":w,className:E,ref:r,style:k,to:p,unstable_viewTransition:g}),typeof v=="function"?v(m):v)});var B0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(B0||(B0={}));var $y;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})($y||($y={}));function QA(e){let t=A.useContext(Cd);return t||It(!1),t}function JA(e,t){let{target:r,replace:n,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:c}=t===void 0?{}:t,p=B5(),g=Aa(),v=Sd(e,{relative:i});return A.useCallback(_=>{if(WA(_,r)){_.preventDefault();let O=n!==void 0?n:Dc(g)===Dc(v);p(e,{replace:O,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:c})}},[g,p,v,n,o,r,e,a,i,c])}function ZA(e,t){t===void 0&&(t={});let r=A.useContext($A);r==null&&It(!1);let{basename:n}=QA(B0.useViewTransitionState),o=Sd(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=ps(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ps(r.nextLocation.pathname,n)||r.nextLocation.pathname;return V0(o.pathname,i)!=null||V0(o.pathname,a)!=null}function eM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M3 6.75A.75.75 0 013.75 6h16.5a.75.75 0 010 1.5H3.75A.75.75 0 013 6.75zM3 12a.75.75 0 01.75-.75h16.5a.75.75 0 010 1.5H3.75A.75.75 0 013 12zm0 5.25a.75.75 0 01.75-.75h16.5a.75.75 0 010 1.5H3.75a.75.75 0 01-.75-.75z",clipRule:"evenodd"}))}const tM=A.forwardRef(eM),rM=tM;function nM({title:e,titleId:t,...r},n){return A.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?A.createElement("title",{id:t},e):null,A.createElement("path",{fillRule:"evenodd",d:"M5.25 9a6.75 6.75 0 0113.Line truncated
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")n.push(a);else if(Array.isArray(a)){if(a.length){var c=r.apply(null,a);c&&n.push(c)}}else if(i==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){n.push(a.toString());continue}for(var p in a)t.call(a,p)&&a[p]&&n.push(p)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(K5);var $e=K5.exports,Y5={exports:{}},fn={};function Cg(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=X5(e))&&(n&&(n+=" "),n+=t);return n}function X5(e){if(typeof e=="string")return e;for(var t,r="",n=0;n<e.length;n++)e[n]&&(t=X5(e[n]))&&(r&&(r+=" "),r+=t);return r}function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W0.apply(this,arguments)}function PM(e){var t=function(r){var n=r.theme,o=r.prefix,a={nextPart:new Map,validators:[]};return function(i,c){return c?i.map(function(p){return[p[0],p[1].map(function(g){return typeof g=="string"?c+g:typeof g=="object"?Object.fromEntries(Object.entries(g).map(function(v){return[c+v[0],v[1]]})):g})]}):i}(Object.entries(r.classGroups),o).forEach(function(i){H0(i[1],a,i[0],n)}),a}(e);return{getClassGroupId:function(r){var n=r.split("-");return n[0]===""&&n.length!==1&&n.shift(),Q5(n,t)||function(o){if(Gy.test(o)){var a=Gy.exec(o)[1],i=a==null?void 0:a.substring(0,a.indexOf(":"));if(i)return"arbitrary.."+i}}(r)},getConflictingClassGroupIds:function(r){return e.conflictingClassGroups[r]||[]}}}function Q5(e,t){var r;if(e.length===0)return t.classGroupId;var n=t.nextPart.get(e[0]),o=n?Q5(e.slice(1),n):void 0;if(o)return o;if(t.validators.length!==0){var a=e.join("-");return(r=t.validators.find(function(i){return(0,i.validator)(a)}))==null?void 0:r.classGroupId}}Object.defineProperty(fn,"__esModule",{value:!0});var Gy=/^\[(.+)\]$/;function H0(e,t,r,n){e.forEach(function(o){if(typeof o!="string"){if(typeof o=="function")return o.isThemeGetter?void H0(o(n),t,r,n):void t.validators.push({validator:o,classGroupId:r});Object.entries(o).forEach(function(a){H0(a[1],Ky(t,a[0]),r,n)})}else(o===""?t:Ky(t,o)).classGroupId=r})}function Ky(e,t){var r=e;return t.split("-").forEach(function(n){r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function kM(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function o(a,i){r.set(a,i),++t>e&&(t=0,n=r,r=new Map)}return{get:function(a){var i=r.get(a);return i!==void 0?i:(i=n.get(a))!==void 0?(o(a,i),i):void 0},set:function(a,i){r.has(a)?r.set(a,i):o(a,i)}}}function EM(e){var t=e.separator||":";return function(r){for(var n=0,o=[],a=0,i=0;i<r.length;i++){var c=r[i];n===0&&c===t[0]&&(t.length!==1&&r.slice(i,i+t.length)!==t||(o.push(r.slice(a,i)),a=i+t.length)),c==="["?n++:c==="]"&&n--}var p=o.length===0?r:r.substring(a),g=p.startsWith("!");return{modifiers:o,hasImportantModifier:g,baseClassName:g?p.substring(1):p}}}function RM(e){return W0({cache:kM(e.cacheSize),splitModifiers:EM(e)},PM(e))}var NM=/\s+/;function jM(e,t){var r=t.splitModifiers,n=t.getClassGroupId,o=t.getConflictingClassGroupIds,a=new Set;return e.trim().split(NM).map(function(i){var c=r(i),p=c.modifiers,g=c.hasImportantModifier,v=n(c.baseClassName);if(!v)return{isTailwindClass:!1,originalClassName:i};var _=function(O){if(O.length<=1)return O;var C=[],T=[];return O.forEach(function(x){x[0]==="["?(C.push.apply(C,T.sort().concat([x])),T=[]):T.push(x)}),C.push.apply(C,T.sort()),C}(p).join(":");return{isTailwindClass:!0,modifierId:g?_+"!":_,classGroupId:v,originalClassName:i}}).reverse().filter(function(i){if(!i.isTailwindClass)return!0;var c=i.modifierId,p=i.classGroupId,g=c+p;return!a.has(g)&&(a.add(g),o(p).forEach(function(v){return a.add(c+v)}),!0)}).reverse().map(function(i){return i.originalClassName}).join(" ")}function U0(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,a,i=c;function c(g){var v=t[0],_=t.slice(1).reduce(function(O,C){return C(O)},v());return n=RM(_),o=n.cache.get,a=n.cache.set,i=p,p(g)}function p(g){var v=o(g);if(v)return v;var _=jM(g,n);return a(g,_),_}return function(){return i(Cg.apply(null,arguments))}}function _t(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var Jo=/^\[(.+)\]$/,AM=/^\d+\/\d+$/,MM=new Set(["px","full","screen"]),IM=/^(\d+)?(xs|sm|md|lg|xl)$/,DM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/,LM=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Xr(e){return!Number.isNaN(Number(e))||MM.has(e)||AM.test(e)||ko(e)}function ko(e){var t,r=(t=Jo.exec(e))==null?void 0:t[1];return!!r&&(r.startsWith("length:")||DM.test(r))}function J5(e){var t,r=(t=Jo.exec(e))==null?void 0:t[1];return!!r&&r.startsWLine truncated
|
||||
* tabbable 6.2.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*/var PL=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ah=PL.join(","),aS=typeof Element>"u",ys=aS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Yc=!aS&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Xc=function e(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),a=o===""||o==="true",i=a||r&&t&&e(t.parentNode);return i},kL=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},EL=function(t,r,n){if(Xc(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ah));return r&&ys.call(t,ah)&&o.unshift(t),o=o.filter(n),o},RL=function e(t,r,n){for(var o=[],a=Array.from(t);a.length;){var i=a.shift();if(!Xc(i,!1))if(i.tagName==="SLOT"){var c=i.assignedElements(),p=c.length?c:i.children,g=e(p,!0,n);n.flatten?o.push.apply(o,g):o.push({scopeParent:i,candidates:g})}else{var v=ys.call(i,ah);v&&n.filter(i)&&(r||!t.includes(i))&&o.push(i);var _=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),O=!Xc(_,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(_&&O){var C=e(_===!0?i.children:_.children,!0,n);n.flatten?o.push.apply(o,C):o.push({scopeParent:i,candidates:C})}else a.unshift.apply(a,i.children)}}return o},iS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},lS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||kL(t))&&!iS(t)?0:t.tabIndex},NL=function(t,r){var n=lS(t);return n<0&&r&&!iS(t)?0:n},jL=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},sS=function(t){return t.tagName==="INPUT"},AL=function(t){return sS(t)&&t.type==="hidden"},ML=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},IL=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},DL=function(t){if(!t.name)return!0;var r=t.form||Yc(t),n=function(c){return r.querySelectorAll('input[type="radio"][name="'+c+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=IL(o,t.form);return!a||a===t},LL=function(t){return sS(t)&&t.type==="radio"},FL=function(t){return LL(t)&&!DL(t)},VL=function(t){var r,n=t&&Yc(t),o=(r=n)===null||r===void 0?void 0:r.host,a=!1;if(n&&n!==t){var i,c,p;for(a=!!((i=o)!==null&&i!==void 0&&(c=i.ownerDocument)!==null&&c!==void 0&&c.contains(o)||t!=null&&(p=t.ownerDocument)!==null&&p!==void 0&&p.contains(t));!a&&o;){var g,v,_;n=Yc(o),o=(g=n)===null||g===void 0?void 0:g.host,a=!!((v=o)!==null&&v!==void 0&&(_=v.ownerDocument)!==null&&_!==void 0&&_.contains(o))}}return a},_w=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},zL=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=ys.call(t,"details>summary:first-of-type"),i=a?t.parentElement:t;if(ys.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var c=t;t;){var p=t.parentElement,g=Yc(t);if(p&&!p.shadowRoot&&o(p)===!0)return _w(t);t.assignedSlot?t=t.assignedSlot:!p&&g!==t.ownerDocument?t=g.host:t=p}t=c}if(VL(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return _w(t);return!1},BL=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return ys.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},WL=function(t,r){return!(r.disabled||Xc(r)||AL(r)||zL(r,t)||ML(r)||BL(r))},Tw=function(t,r){return!(FL(r)||lS(r)<0||!WL(t,r))},HL=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},UL=function e(t){var r=[],n=[];return t.forEach(function(o,a){var i=!!o.scopeParent,c=i?o.scopeParent:o,p=NL(c,i),g=i?e(o.candidates):c;p===0?i?r.push.apply(r,g):r.push(c):n.push({documentOrder:a,tabIndex:p,item:o,isScope:i,content:g})}),n.sort(jL).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concatLine truncated
|
||||
|
||||
More details: https://www.material-tailwind.com/docs/react/collapse
|
||||
`);var k=r.default.useRef(null),P=(0,g.useTheme)().navbar,N=P.styles,j=N.base.mobileNav;s=s??{},h=h??"";var D=(0,c.twMerge)((0,i.default)((0,p.default)(j)),h),F={unmount:{height:0,opacity:0,transition:{duration:.3,times:"[0.4, 0, 0.2, 1]"}},mount:{opacity:1,height:"".concat((E=k.current)===null||E===void 0?void 0:E.scrollHeight,"px"),transition:{duration:.3,times:"[0.4, 0, 0.2, 1]"}}},W=(0,a.default)(F,s),G=n.AnimatePresence,X=(0,o.useMergeRefs)([l,k]);return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(G,null,r.default.createElement(n.m.div,_({},w,{ref:X,className:D,initial:"unmount",exit:"unmount",animate:u?"mount":"unmount",variants:W}),m)))});x.displayName="MaterialTailwind.MobileNav",x.propTypes={open:v.propTypesOpen,animate:v.propTypesAnimate,className:v.propTypesClassName,children:v.propTypesChildren};var b=x})(QS);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Navbar:function(){return b},MobileNav:function(){return g.MobileNav},default:function(){return d}});var r=C(A),n=C(Fe),o=C($e),a=Le,i=C(kt),c=C(Me),p=je,g=QS,v=Pd;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u<arguments.length;u++){var s=arguments[u];for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(l[h]=s[h])}return l},O.apply(this,arguments)}function C(l){return l&&l.__esModule?l:{default:l}}function T(l,u){if(l==null)return{};var s=x(l,u),h,m;if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(l);for(m=0;m<w.length;m++)h=w[m],!(u.indexOf(h)>=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),m,w;for(w=0;w<h.length;w++)m=h[w],!(u.indexOf(m)>=0)&&(s[m]=l[m]);return s}var b=r.default.forwardRef(function(l,u){var s=l.variant,h=l.color,m=l.shadow,w=l.blurred,E=l.fullWidth,k=l.className,P=l.children,N=T(l,["variant","color","shadow","blurred","fullWidth","className","children"]),j=(0,p.useTheme)().navbar,D=j.defaultProps,F=j.valid,W=j.styles,G=W.base,X=W.variants;s=s??D.variant,h=h??D.color,m=m??D.shadow,w=w??D.blurred,E=E??D.fullWidth,k=k??D.className;var U,B=(0,o.default)((0,c.default)(G.navbar.initial),(U={},_(U,(0,c.default)(G.navbar.shadow),m),_(U,(0,c.default)(G.navbar.blurred),w&&h==="white"),_(U,(0,c.default)(G.navbar.fullWidth),E),U)),H=(0,o.default)((0,c.default)(X[(0,i.default)(F.variants,s,"filled")][(0,i.default)(F.colors,h,"white")])),K=(0,a.twMerge)((0,o.default)(B,H),k);return r.default.createElement("nav",O({},N,{ref:u,className:K}),P)});b.propTypes={variant:n.default.oneOf(v.propTypesVariant),color:n.default.oneOf(v.propTypesColor),shadow:v.propTypesShadow,blurred:v.propTypesBlurred,fullWidth:v.propTypesFullWidth,className:v.propTypesClassName,children:v.propTypesChildren},b.displayName="MaterialTailwind.Navbar";var d=Object.assign(b,{MobileNav:g.MobileNav})})(XS);var JS={},Kd={},Qi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{propTypesOpen:function(){return a},propTypesHandler:function(){return i},propTypesPlacement:function(){return c},propTypesOffset:function(){return p},propTypesDismiss:function(){return g},propTypesAnimate:function(){return v},propTypesContent:function(){return _},propTypesInteractive:function(){return O},propTypesClassName:function(){return C},propTypesChildren:function(){return T},propTypesContextValue:function(){return x}});var r=o(Fe),n=Ct;function o(b){return b&&b.__esModule?b:{default:b}}var a=r.default.bool,i=r.default.func,c=n.propTypesPlacements,p=n.propTypesOffsetType,g=n.propTypesDismissType,v=n.propTypesAnimation,_=r.default.node,O=r.default.bool,C=r.default.string,T=r.default.node.isRequired,x=r.default.shape({open:r.default.bool.isRequired,strategy:r.default.oneOf(["fixed","absolute"]).isRequired,x:r.default.number,y:r.default.number,context:r.default.instanceOf(Object).isRequired,reference:r.default.func.isRequired,floating:r.default.func.isRequired,getReferenceProps:r.default.func.isRequired,getFloatingProps:r.default.func.isRequired,appliedAnimation:v.isRequired,labelId:r.default.string.isRequired,descriptionId:r.default.string.isRequired}).isRequired})(Qi);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(p,g){for(var v in g)Object.defineProperty(p,v,{enumerable:!0,get:g[v]})}t(e,{PopoverContext:function(){return a},usePopover:function(){return i},PopoverContextProvider:function(){return c}});var r=o(A),n=Qi;function o(p){return p&&p.__esModule?p:{default:p}}var a=r.default.createContext(null);a.displayName="MaterialTailwind.PopoverContext";function i(){var p=r.default.useContext(a);if(!p)throw new Error("usePopover() must be used within a Popover. It happens when you us
Line truncated
|
||||
`).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&GV[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},rx=Symbol("internals");function Cl(e){return e&&String(e).trim().toLowerCase()}function ac(e){return e===!1||e==null?e:ce.isArray(e)?e.map(ac):String(e)}function YV(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const XV=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ip(e,t,r,n,o){if(ce.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!ce.isString(t)){if(ce.isString(n))return t.indexOf(n)!==-1;if(ce.isRegExp(n))return n.test(t)}}function QV(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function JV(e,t){const r=ce.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,a,i){return this[n].call(this,t,o,a,i)},configurable:!0})})}class tf{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function a(c,p,g){const v=Cl(p);if(!v)throw new Error("header name must be a non-empty string");const _=ce.findKey(o,v);(!_||o[_]===void 0||g===!0||g===void 0&&o[_]!==!1)&&(o[_||p]=ac(c))}const i=(c,p)=>ce.forEach(c,(g,v)=>a(g,v,p));if(ce.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(ce.isString(t)&&(t=t.trim())&&!XV(t))i(KV(t),r);else if(ce.isHeaders(t))for(const[c,p]of t.entries())a(p,c,n);else t!=null&&a(r,t,n);return this}get(t,r){if(t=Cl(t),t){const n=ce.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return YV(o);if(ce.isFunction(r))return r.call(this,o,n);if(ce.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Cl(t),t){const n=ce.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ip(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function a(i){if(i=Cl(i),i){const c=ce.findKey(n,i);c&&(!r||Ip(n,n[c],c,r))&&(delete n[c],o=!0)}}return ce.isArray(t)?t.forEach(a):a(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const a=r[n];(!t||Ip(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const r=this,n={};return ce.forEach(this,(o,a)=>{const i=ce.findKey(n,a);if(i){r[i]=ac(o),delete r[a];return}const c=t?QV(a):String(a).trim();c!==a&&delete r[a],r[c]=ac(o),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ce.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&ce.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||||
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[rx]=this[rx]={accessors:{}}).accessors,o=this.prototype;function a(i){const c=Cl(i);n[c]||(JV(o,i),n[c]=!0)}return ce.isArray(t)?t.forEach(a):a(t),this}}tf.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ce.reduceDescriptors(tf.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});ce.freezeMethods(tf);const _n=tf;function Dp(e,t){const r=this||Ab,n=t||r,o=_n.from(n.headers);let a=n.data;return ce.forEach(e,function(c){a=c.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function tk(e){return!!(e&&e.__CANCEL__)}function el(e,t,r){Xe.call(this,e??"canceled",Xe.ERR_CANCELED,t,r),this.name="CanceledError"}ce.inherits(el,Xe,{__CANCEL__:!0});function rk(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Xe("Request failed with status code "+r.status,[Xe.ERR_BAD_REQUEST,Xe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ZV(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ez(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(p){const g=Date.now(),v=n[a];i||(i=g),r[o]=p,n[o]=g;let _=a,O=0;for(;_!==o;)O+=r[_++],_=_%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),g-i<t)return;const C=v&&g-v;return C?Math.round(O*1e3/C):void 0}}function tz(e,t){let r=0,n=1e3/t,o,a;const i=(g,v=Date.now())=>{r=v,o=null,a&&(clearTimeout(a),a=null),e.apply(null,g)};return[(...g)=>{const v=Date.now(),_=v-r;_>=n?i(g,v):(o=g,a||(a=setTimeout(()=>{a=null,i(o)},n-_)))},()=>o&&i(o)]}const ad=(e,t,r=3)=>{let n=0;const o=ez(50,250);return tz(a=>{const i=a.loaded,c=a.lengthComputable?a.total:void 0,p=i-n,g=o(p),v=i<=c;n=i;const _={loaded:i,total:c,progress:c?i/c:void 0,bytes:p,rate:g||void 0,estimated:g&&c&&v?(c-i)/g:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(_)},r)},nx=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ox=e=>(...t)=>ce.asap(()=>e(...t)),rz=Vr.hasStandardBrowserEnv?function(){const t=Vr.navigator&&/(msie|trident)/i.test(Vr.navigator.userAgent),r=document.createElement("a");let n;function o(a){let i=a;return t&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(i){const c=ce.isString(i)?o(i):i;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}(),nz=Vr.hasStandardBrowserEnv?{write(e,t,r,n,o,a){const i=[e+"="+encodeURIComponent(t)];ce.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),ce.isString(n)&&i.push("path="+n),ce.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oz(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function az(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function nk(e,t){return e&&!oz(t)?az(e,t):t}const ax=e=>e instanceof _n?{...e}:e;function Ea(e,t){t=t||{};const r={};function n(g,v,_){return ce.isPlainObject(g)&&ce.isPlainObject(v)?ce.merge.call({caseless:_},g,v):ce.isPlainObject(v)?ce.merge({},v):ce.isArray(v)?v.slice():v}function o(g,v,_){if(ce.isUndefined(v)){if(!ce.isUndefined(g))return n(void 0,g,_)}else return n(g,v,_)}function a(g,v){if(!ce.isUndefined(v))return n(void 0,v)}function i(g,v){if(ce.isUndefined(v)){if(!ce.isUndefined(g))return n(void 0,g)}else return n(void 0,v)}function c(g,v,_){if(_ in t)return n(g,v);if(_ in e)return n(void 0,g)}const p={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(g,v)=>o(ax(g),ax(v),!0)};return ce.forEach(Object.keys(Object.assign({},e,t)),function(v){const _=p[v]||o,O=_(e[v],t[v],v);ce.isUndefined(O)&&_!==c||(r[v]=O)}),r}const ok=e=>{const t=Ea({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:c}=t;t.headers=i=_n.from(i),t.url=JP(nk(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(enco
Line truncated
|
||||
`+a.map(sx).join(`
|
||||
`):" "+sx(a[0]):"as no adapter specified";throw new Xe("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:gh};function Lp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new el(null,e)}function ux(e){return Lp(e),e.headers=_n.from(e.headers),e.data=Dp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),lk.getAdapter(e.adapter||Ab.adapter)(e).then(function(n){return Lp(e),n.data=Dp.call(e,e.transformResponse,n),n.headers=_n.from(n.headers),n},function(n){return tk(n)||(Lp(e),n&&n.response&&(n.response.data=Dp.call(e,e.transformResponse,n.response),n.response.headers=_n.from(n.response.headers))),Promise.reject(n)})}const sk="1.7.5",Mb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mb[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const cx={};Mb.transitional=function(t,r,n){function o(a,i){return"[Axios v"+sk+"] Transitional option '"+a+"'"+i+(n?". "+n:"")}return(a,i,c)=>{if(t===!1)throw new Xe(o(i," has been removed"+(r?" in "+r:"")),Xe.ERR_DEPRECATED);return r&&!cx[i]&&(cx[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,i,c):!0}};function vz(e,t,r){if(typeof e!="object")throw new Xe("options must be an object",Xe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],i=t[a];if(i){const c=e[a],p=c===void 0||i(c,a,e);if(p!==!0)throw new Xe("option "+a+" must be "+p,Xe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Xe("Unknown option "+a,Xe.ERR_BAD_OPTION)}}const bh={assertOptions:vz,validators:Mb},To=bh.validators;class ld{constructor(t){this.defaults=t,this.interceptors={request:new tx,response:new tx}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
||||
`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ea(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:a}=r;n!==void 0&&bh.assertOptions(n,{silentJSONParsing:To.transitional(To.boolean),forcedJSONParsing:To.transitional(To.boolean),clarifyTimeoutError:To.transitional(To.boolean)},!1),o!=null&&(ce.isFunction(o)?r.paramsSerializer={serialize:o}:bh.assertOptions(o,{encode:To.function,serialize:To.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=a&&ce.merge(a.common,a[r.method]);a&&ce.forEach(["delete","get","head","post","put","patch","common"],T=>{delete a[T]}),r.headers=_n.concat(i,a);const c=[];let p=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(p=p&&x.synchronous,c.unshift(x.fulfilled,x.rejected))});const g=[];this.interceptors.response.forEach(function(x){g.push(x.fulfilled,x.rejected)});let v,_=0,O;if(!p){const T=[ux.bind(this),void 0];for(T.unshift.apply(T,c),T.push.apply(T,g),O=T.length,v=Promise.resolve(r);_<O;)v=v.then(T[_++],T[_++]);return v}O=c.length;let C=r;for(_=0;_<O;){const T=c[_++],x=c[_++];try{C=T(C)}catch(b){x.call(this,b);break}}try{v=ux.call(this,C)}catch(T){return Promise.reject(T)}for(_=0,O=g.length;_<O;)v=v.then(g[_++],g[_++]);return v}getUri(t){t=Ea(this.defaults,t);const r=nk(t.baseURL,t.url);return JP(r,t.params,t.paramsSerializer)}}ce.forEach(["delete","get","head","options"],function(t){ld.prototype[t]=function(r,n){return this.request(Ea(n||{},{method:t,url:r,data:(n||{}).data}))}});ce.forEach(["post","put","patch"],function(t){function r(n){return function(a,i,c){return this.request(Ea(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}ld.prototype[t]=r(),ld.prototype[t+"Form"]=r(!0)});const ic=ld;class Ib{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(o=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](o);n._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(c=>{n.subscribe(c),a=c}).then(o);return i.cancel=function(){n.unsubscribe(a)},i},t(function(a,i,c){n.reason||(n.reason=new el(a,i,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Ib(function(o){t=o}),cancel:t}}}const mz=Ib;function yz(e){return function(r){return e.apply(null,r)}}function wz(e){return ce.isObject(e)&&e.isAxiosError===!0}const vh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vh).forEach(([e,t])=>{vh[t]=e});const xz=vh;function uk(e){const t=new ic(e),r=zP(ic.prototype.request,t);return ce.extend(r,ic.prototype,t,{allOwnKeys:!0}),ce.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return uk(Ea(e,o))},r}const Ht=uk(Ab);Ht.Axios=ic;Ht.CanceledError=el;Ht.CancelToken=mz;Ht.isCancel=tk;Ht.VERSION=sk;Ht.toFormData=ef;Ht.AxiosError=Xe;Ht.Cancel=Ht.CanceledError;Ht.all=function(t){return Promise.all(t)};Ht.spread=yz;Ht.isAxiosError=wz;Ht.mergeConfig=Ea;Ht.AxiosHeaders=_n;Ht.formToJSON=e=>ek(ce.isHTMLForm(e)?new FormData(e):e);Ht.getAdapter=lk.getAdapter;Ht.HttpStatusCode=xz;Ht.default=Ht;const Nt=Ht,Bn=Object.create(null);Bn.open="0";Bn.close="1";Bn.ping="2";Bn.pong="3";Bn.message="4";Bn.upgrade="5";Bn.noop="6";const lc=Object.create(null);Object.keys(Bn).forEach(e=>{lc[Bn[e]]=e});const mh={type:"error",data:"parser error"},ck=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dk=typeof Array
Line truncated
|
||||
${Se?"border-purple-500 ring-1 ring-purple-500/40":"border-transparent"}
|
||||
${!_e||ve?"opacity-75 bg-stormGrey-200/20":""}`,children:[I.jsxs("div",{className:"flex items-center space-x-4",id:"left",children:[I.jsx("input",{type:"checkbox",checked:Se,onChange:()=>Ae(le.Id,!_e),className:`h-5 w-5 text-purple-500 focus:ring-purple-400 border-gray-600 bg-gray-900 rounded ${_e?"":"opacity-40 cursor-not-allowed"}`,disabled:!_e}),I.jsx("div",{className:`w-12 h-12 flex items-center justify-center rounded-full
|
||||
${le.updateStatus==="✅"?"bg-mossGreen-600":le.updateStatus==="⚠️"?"bg-warmAmberGlow-400":"bg-sunsetCoral-500"}`}),I.jsxs("div",{children:[I.jsx("p",{className:"text-lg antialiased font-sans font-semibold leading-normal text-inherit",children:le.Name}),I.jsxs("p",{className:"text-sm antialiased font-sans font-light leading-normal text-inherit",children:["ID: ",le.Id]}),le.duplicateName&&I.jsx("p",{className:"text-xs text-amber-700",children:"⚠️ Doppelter Name erkannt"})]})]}),I.jsx("div",{className:"ml-auto flex flex-col items-end gap-1 text-sm",id:"right",children:Ve?I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-warmAmberGlow-600",children:"Redeploy"}),I.jsx("span",{className:"text-warmAmberGlow-500",children:"läuft…"})]}):Ee?I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-warmAmberGlow-600",children:"Redeploy"}),I.jsx("span",{className:"text-warmAmberGlow-500",children:"in Warteliste…"})]}):fe?I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-stormGrey-500",children:"System"}),I.jsx("span",{className:"text-gray-300",children:"Redeploy deaktiviert"})]}):ee?I.jsxs(I.Fragment,{children:[I.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-stormGrey-500",children:"Status"}),I.jsx("span",{className:"text-mossGreen-600",children:"Aktuell"})]}):I.jsx(ge.Button,{onClick:()=>rt(le.Id),disabled:ve,className:"disabled:opacity-50 disabled:cursor-not-allowed",children:"Redeploy"})})]})},le.Id)})}),I.jsx(kk,{disabled:r||!!o})]})}const k6={idle:"Bereit",running:"Läuft",success:"Erfolgreich",error:"Fehlgeschlagen"},Sl={idle:"bg-stormGrey-700 text-gray-200",running:"bg-arcticBlue-600 text-white",success:"bg-mossGreen-600 text-white",error:"bg-sunsetCoral-600 text-white"},E6={initializing:"Vorbereitung","activating-maintenance":"Wartungsmodus aktivieren","executing-script":"Skript wird ausgeführt",waiting:"Warte auf Portainer",completed:"Abgeschlossen",failed:"Fehlgeschlagen"},R6={info:"text-arcticBlue-700",success:"text-mossGreen-700",warning:"text-warmAmberGlow-700",error:"text-sunsetCoral-700",stdout:"text-stormGrey-700",stderr:"text-warmAmberGlow-700",debug:"text-lavenderSmoke-700"},N6=e=>{if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})},ua=e=>{if(!e&&e!==0)return"-";const r=(n=>{if(n instanceof Date)return n;if(typeof n=="number"){const o=n>1e12?n:n*1e3;return new Date(o)}if(typeof n=="string"){const o=Number(n);if(!Number.isNaN(o)){const a=o>1e12?o:o*1e3;return new Date(a)}return new Date(n)}return null})(e);return!r||Number.isNaN(r.getTime())?String(e):r.toLocaleString("de-DE",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})},mx=e=>e===1?"Git":e===2?"Compose":e??"-",Wp=()=>({host:"",port:"22",username:"",password:"",extraSshArgs:""});function j6(){var Wa,fo,po;const{showToast:e}=Ck(),{maintenance:t,update:r,script:n,ssh:o,loading:a,error:i,setMaintenanceMode:c,triggerUpdate:p,saveScript:g,resetScript:v,saveSshConfig:_,deleteSshConfig:O,testSshConnection:C}=Sk(),T=!!(t!=null&&t.active),x=t==null?void 0:t.message,b=(Wa=t==null?void 0:t.extra)==null?void 0:Wa.type,d=!!(r!=null&&r.running),[l,u]=A.useState(""),[s,h]=A.useState(!1),[m,w]=A.useState(!1),[E,k]=A.useState(""),[P,N]=A.useState(!1),[j,D]=A.useState(()=>Wp()),[F,W]=A.useState(!1),[G,X]=A.useState(!1),[U,B]=A.useState(!1),[H,K]=A.useState(!1),[Q,oe]=A.useState(!1),[ue,ie]=A.useState(null);A.useEffect(()=>{if(!n)return;const we=n.custom??n.default??n.effective??"";u(we)},[n]),A.useEffect(()=>{if(!o){D(Wp()),W(!1),X(!1),ie(null);return}D({host:o.host??"",port:String(o.port??"22"),username:o.username??"",password:"",extraSshArgs:Array.isArray(o.extraSshArgs)?o.extraSshArgs.join(`
|
||||
`):""}),W(!!o.passwordStored),X(!1),ie(null)},[o]);const ne=A.useMemo(()=>n?n.source==="custom"&&typeof n.custom=="string"?n.custom:n.default??n.effective??"":"",[n]),be=n?l!==ne:!1,pe=(n==null?void 0:n.source)==="custom"?"Benutzerdefiniert":"Standard",[ae,he]=A.useState([]),[de,Oe]=A.useState(!0),[Ae,Ce]=A.useState(""),[Te,ke]=A.useState(!1),[Ke,rt]=A.useState(null),[ft,ut]=A.useState(null),nt=A.useRef(null),[He,wt]=A.useState(null),[ot,Je]=A.useState(!0),[le,me]=A.useState(""),[Ee,Ve]=A.useState(!1),[ve,Se]=A.useState(null),ee=A.useRef(null),fe=A.useCallback(async({silent:we=!1}={})=>{if(ee.current)return ee.current;const ze=(async()=>{var Be,et;we?Ve(!0):Je(!0),me("");try{const Vt=(await Nt.get("/api/maintenance/portainer-status")).data??{};wt(Vt),Se(new Date)}catch(pt){const Vt=((et=(Be=pt.response)==null?void 0:Be.data)==null?void 0:et.error)||pt.message||"Fehler beim Prüfen des Portainer-Status";me(Vt),e({variant:"error",title:"Statusaktualisierung fehlgeschlagen",description:Vt})}finally{we?Ve(!1):Je(!1),ee.current=null}})();return ee.current=ze,ze},[e]),_e=A.useCallback(async({silent:we=!1}={})=>{if(T||d){he([]),Ce("Wartungsmodus aktiv – Duplikat-Verwaltung ist vorübergehend deaktiviert."),Oe(!1),ke(!1);return}if(nt.current)return nt.current;const ze=(async()=>{var Be,et,pt;we?ke(!0):Oe(!0),Ce("");try{const Et=(await Nt.get("/api/maintenance/duplicates")).data,jr=Array.isArray(Et)?Et:(Et==null?void 0:Et.items)??[];he(jr),ut(new Date)}catch(Vt){if(((Be=Vt.response)==null?void 0:Be.status)===423){const Et="Wartungsmodus aktiv – Duplikat-Verwaltung ist vorübergehend deaktiviert.";he([]),Ce(Et),e({variant:"warning",title:"Duplikat-Verwaltung gesperrt",description:Et})}else{const Et=((pt=(et=Vt.response)==null?void 0:et.data)==null?void 0:pt.error)||Vt.message||"Fehler beim Laden der Wartungsdaten";Ce(Et),e({variant:"error",title:"Duplikate konnten nicht geladen werden",description:Et})}}finally{we?ke(!1):Oe(!1),nt.current=null}})();return nt.current=ze,ze},[T,d,e]);A.useEffect(()=>{fe()},[fe]),A.useEffect(()=>{_e()},[_e]);const Ie=A.useMemo(()=>{const we=Array.isArray(ae)?ae.length:0,ze=Array.isArray(ae)?ae.reduce((Be,et)=>{var pt;return Be+(((pt=et==null?void 0:et.duplicates)==null?void 0:pt.length)||0)},0):0;return{groups:we,duplicateCount:ze}},[ae]),Ze=A.useCallback((we,ze)=>{D(Be=>({...Be,[we]:ze})),we==="password"&&W(!1)},[]),at=A.useMemo(()=>{const we={host:j.host.trim(),port:Number.parseInt(j.port,10)||22,username:j.username.trim(),extraSshArgs:(j.extraSshArgs||"").split(/\r?\n/).map(Be=>Be.trim()).filter(Boolean)},ze=j.password??"";return ze?we.password=ze:F||(we.password=""),we},[j,F]),qe=A.useCallback(async()=>{var we,ze;if(n)try{h(!0),await g(l),e({variant:"success",title:"Skript gespeichert",description:"Das benutzerdefinierte Portainer-Update-Skript wurde aktualisiert."})}catch(Be){const et=((ze=(we=Be.response)==null?void 0:we.data)==null?void 0:ze.error)||Be.message||"Skript konnte nicht gespeichert werden";e({variant:"error",title:"Speichern fehlgeschlagen",description:et})}finally{h(!1)}},[g,l,n,e]),mt=A.useCallback(async()=>{var we,ze;try{h(!0),await v(),e({variant:"info",title:"Standardskript wiederhergestellt",description:"Es wird wieder das Standard-Update-Skript verwendet."})}catch(Be){const et=((ze=(we=Be.response)==null?void 0:we.data)==null?void 0:ze.error)||Be.message||"Standardskript konnte nicht wiederhergestellt werden";e({variant:"error",title:"Zurücksetzen fehlgeschlagen",description:et})}finally{h(!1)}},[v,e]),tr=A.useCallback(async()=>{var we,ze;try{B(!0),await _(at),ie(null),X(!1),e({variant:"success",title:"SSH-Konfiguration gespeichert",description:"Verbindungseinstellungen wurden aktualisiert."})}catch(Be){const et=((ze=(we=Be.response)==null?void 0:we.data)==null?void 0:ze.error)||Be.message||"SSH-Konfiguration konnte nicht gespeichert werden";e({variant:"error",title:"Speichern fehlgeschlagen",description:et})}finally{B(!1)}},[at,_,e]),lr=A.useCallback(async()=>{var we,ze;try{K(!0);const Be=await C(at);ie({success:!0,timestamp:new Date,details:Be==null?void 0:Be.result}),e({variant:"success",title:"SSH-Verbindung erfolgreich",description:"Verbindung zum Portainer-Host wurde hergestellt."})}catch(Be){const et=((ze=(we=Be.response)==null?void 0:we.data)==null?void 0:ze.error)||Be.message||"SSH-Verbindung fehlgeschlagen";ie({success:!1,timestamp:new Date,error:et}),e({variant:"error",title:"SSH-Test fehlgeschlagen",description:et})}finally{K(!1)}},[at,C,e]),sn=A.useCallback(async()=>{var we,ze;try{oe(!0),await O(),D(Wp()),W(!1),X(!1),ie(null),e({variant:"info",title:"SSH-Konfiguration gelöscht",description:"Die Verbindungseinstellungen wurden zurückgesetzt."})}catch(Be){const et=((ze=(we=Be.response)==null?void 0:we.data)==null?void 0:ze.error)||Be.message||"SSH-Konfiguration konnte nicht gelöscht werden";e({variant:"error",title:"Löschen fehlgeschlagen",description:et})}finally{oe(!1)}},[O,e]),Kt=A.useCallback(async we=>{var ze,Be;if(!(a||P)&&we!==T){if(
Line truncated
|
||||
Zielversion: ${we}.
|
||||
Während des Updates befindet sich StackPulse im Wartungsmodus.
|
||||
Fortfahren?`)))try{k(""),w(!0),await p(),e({variant:"info",title:"Update gestartet",description:"Das Portainer-Update wurde gestartet."})}catch(et){const pt=((Be=(ze=et.response)==null?void 0:ze.data)==null?void 0:Be.error)||et.message||"Portainer-Update konnte nicht gestartet werden";k(pt),e({variant:"error",title:"Update fehlgeschlagen",description:pt})}finally{w(!1)}},[T,d,He,p,e]),lo=A.useCallback(async we=>{var pt,Vt,Et,jr;if(!we)return;if(T||d){e({variant:"warning",title:"Aktion nicht möglich",description:"Während des Wartungsmodus sind Bereinigungen deaktiviert."});return}const ze=(pt=we.canonical)==null?void 0:pt.Id;if(!ze)return;const Be=(we.duplicates||[]).map(Yt=>Yt.Id).filter(Boolean);if(!Be.length)return;const et=((Vt=we.canonical)==null?void 0:Vt.Name)||we.name||`Stack ${ze}`;if(!(typeof window<"u"&&!window.confirm(`Bereinigung für "${et}" starten?
|
||||
Es werden ${Be.length} Duplikate entfernt: ${Be.join(", ")}`))){rt(String(ze));try{const qr=(await Nt.post("/api/maintenance/duplicates/cleanup",{canonicalId:ze,duplicateIds:Be})).data??{};if(qr.success===!1)throw new Error(qr.error||"Bereinigung fehlgeschlagen");const ta=Array.isArray(qr.results)?qr.results.filter(un=>un.status==="deleted").map(un=>un.id):Be;e({variant:"success",title:"Bereinigung abgeschlossen",description:`${et} – entfernte IDs: ${ta.join(", ")}`}),await _e({silent:!0})}catch(Yt){const qr=((jr=(Et=Yt.response)==null?void 0:Et.data)==null?void 0:jr.error)||Yt.message||"Bereinigung fehlgeschlagen";e({variant:"error",title:"Bereinigung fehlgeschlagen",description:qr})}finally{rt(null)}}},[_e,T,e,d]);t!=null&&t.activatedAt&&ua(t.activatedAt),t!=null&&t.updatedAt&&ua(t.updatedAt);const Ur=T||d,so=(r==null?void 0:r.status)??(d?"running":"idle"),En=k6[so]??so,Zo=Sl[so]??Sl.idle,xr=r!=null&&r.stage?E6[r.stage]??r.stage:"–",Hn=(r==null?void 0:r.logs)??[],uo=(r==null?void 0:r.targetVersion)??"-",za=(r==null?void 0:r.resultVersion)??"-",co=r!=null&&r.startedAt?ua(r.startedAt):"-",$r=r!=null&&r.finishedAt?ua(r.finishedAt):"-",Ba=(r==null?void 0:r.message)??(d?"Update läuft…":""),ea=d||s||a;return I.jsxs("div",{className:"mt-12 mb-8 flex flex-col gap-12",children:[(T||d)&&I.jsx("div",{className:"rounded-lg border border-cyan-500/60 bg-cyan-900/30 px-4 py-3 text-sm text-bluegray-100",children:I.jsxs("div",{className:"flex flex-col gap-1",children:[I.jsxs("span",{children:["Wartungsmodus aktiv",x?` – ${x}`:d?" – Portainer-Update läuft":"","."]}),d&&I.jsxs("span",{className:"text-xs text-indigo-900",children:["Phase: ",xr]})]})}),I.jsxs(ge.Card,{children:[I.jsx(ge.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:I.jsx(ge.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:I.jsx("span",{children:"Wartungsmodus"})})}),I.jsxs(ge.CardBody,{className:"flex flex-col gap-4 p-4",children:[I.jsxs("div",{className:"flex items-start justify-between gap-4",children:[I.jsx("div",{className:"space-y-1",children:I.jsx("p",{className:"text-sm antialiased font-sans text-sm font-light leading-normal text-inherit",children:"Schaltet StackPulse für Benutzer in den Wartungsmodus."})}),I.jsx(ge.Switch,{checked:T,disabled:P||a||d,onChange:we=>Kt(we.target.checked),ripple:!1,color:"amber"})]}),P&&I.jsx("p",{className:"text-xs text-stormGrey-500",children:"Wartungsmodus wird aktualisiert…"})]})]}),I.jsxs(ge.Card,{children:[I.jsx(ge.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:I.jsx(ge.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:I.jsx("span",{children:"Portainer"})})}),I.jsxs(ge.CardBody,{className:"flex flex-col gap-4 p-4 pt-0",children:[I.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[I.jsxs("div",{children:[I.jsx("h2",{className:"block antialiased font-sans text-lg font-semibold",children:"Portainer Status"}),I.jsx("p",{className:"block antialiased font-sans text-sm font-light leading-normal text-inherit",children:ot?"Status wird geprüft…":le||(d?"Portainer wird aktuell aktualisiert.":(He==null?void 0:He.updateAvailable)===!0?"Es ist ein Update für Portainer verfügbar.":"Portainer ist auf dem aktuellen Stand.")}),ve&&!ot&&I.jsxs("p",{className:"mt-1 text-xs text-stormGrey-500 block antialiased font-sans",children:["Stand: ",ve.toLocaleString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})]})]}),I.jsx("div",{className:"flex items-center gap-3",children:I.jsx(ge.Button,{onClick:()=>fe({silent:!1}),disabled:ot||Ee,className:"w-full",children:"Status aktualisieren"})})]}),I.jsx("div",{className:"flex flex-col gap-4 mt-5 space-y-4 block antialiased font-sans text-sm font-light leading-normal text-inherit",children:!ot&&!le&&He&&I.jsxs("div",{className:"",children:[I.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[I.jsx("span",{children:"Installierte Version"}),I.jsx("span",{className:"font-medium",children:He.currentVersion??"Unbekannt"})]}),I.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[I.jsx("span",{children:"Neueste Version"}),I.jsx("span",{className:"font-medium",children:He.latestVersion??"Unbekannt"})]}),I.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[I.jsx("span",{children:"Status"}),I.jsx("span",{className:`rounded-full px-3 py-0.5 text-xs font-semibold ${He.updateAvailable===!0?Sl.error:He.updateAvailable===!1?Sl.success:Sl.idle}`,children:He.updateAvailable===!0?"Update verfügbar":He.updateAvailable===!1?"Aktuell":"Unbekannt"})]}),He.edition&&I.jsxs("div",{className:"flex items-center justify-between",children:[I.jsx("span",{className:"text-stormGrey-400",children:"Edition"}),I.jsx("span",{className:"font-medium",children:He.edition})]}),He.build&&I.jsxs("div",{className:"flex items-center justify-
Line truncated
|
||||
@@ -1 +0,0 @@
|
||||
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#eee}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#bdbdbd}input::placeholder,textarea::placeholder{opacity:1;color:#bdbdbd}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(33 150 243 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(33 150 243 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 540px){.container{max-width:540px}}@media (min-width: 720px){.container{max-width:720px}}@media (min-width: 960px){.container{max-width:960px}}@media (min-width: 1140px){.container{max-width:1140px}}@media (min-width: 1320px){.container{max-width:1320px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.\!invisible{visibility:hidden!important}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bLine truncated
|
||||
@@ -0,0 +1,91 @@
|
||||
function EN(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(n,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function r(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(o){if(o.ep)return;o.ep=!0;const a=r(o);fetch(o.href,a)}})();function Tx(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ps(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var Cx={exports:{}},dd={},Ox={exports:{}},ut={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var ks=Symbol.for("react.element"),NN=Symbol.for("react.portal"),RN=Symbol.for("react.fragment"),jN=Symbol.for("react.strict_mode"),AN=Symbol.for("react.profiler"),MN=Symbol.for("react.provider"),IN=Symbol.for("react.context"),DN=Symbol.for("react.forward_ref"),LN=Symbol.for("react.suspense"),FN=Symbol.for("react.memo"),VN=Symbol.for("react.lazy"),Mv=Symbol.iterator;function zN(e){return e===null||typeof e!="object"?null:(e=Mv&&e[Mv]||e["@@iterator"],typeof e=="function"?e:null)}var Sx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Px=Object.assign,kx={};function Ui(e,t,r){this.props=e,this.context=t,this.refs=kx,this.updater=r||Sx}Ui.prototype.isReactComponent={};Ui.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ui.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Ex(){}Ex.prototype=Ui.prototype;function Oh(e,t,r){this.props=e,this.context=t,this.refs=kx,this.updater=r||Sx}var Sh=Oh.prototype=new Ex;Sh.constructor=Oh;Px(Sh,Ui.prototype);Sh.isPureReactComponent=!0;var Iv=Array.isArray,Nx=Object.prototype.hasOwnProperty,Ph={current:null},Rx={key:!0,ref:!0,__self:!0,__source:!0};function jx(e,t,r){var n,o={},a=null,i=null;if(t!=null)for(n in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)Nx.call(t,n)&&!Rx.hasOwnProperty(n)&&(o[n]=t[n]);var c=arguments.length-2;if(c===1)o.children=r;else if(1<c){for(var p=Array(c),g=0;g<c;g++)p[g]=arguments[g+2];o.children=p}if(e&&e.defaultProps)for(n in c=e.defaultProps,c)o[n]===void 0&&(o[n]=c[n]);return{$$typeof:ks,type:e,key:a,ref:i,props:o,_owner:Ph.current}}function BN(e,t){return{$$typeof:ks,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function kh(e){return typeof e=="object"&&e!==null&&e.$$typeof===ks}function WN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Dv=/\/+/g;function qf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?WN(""+e.key):t.toString(36)}function Fu(e,t,r,n,o){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case ks:case NN:i=!0}}if(i)return i=e,o=o(i),e=n===""?"."+qf(i,0):n,Iv(o)?(r="",e!=null&&(r=e.replace(Dv,"$&/")+"/"),Fu(o,t,r,"",function(g){return g})):o!=null&&(kh(o)&&(o=BN(o,r+(!o.key||i&&i.key===o.key?"":(""+o.key).replace(Dv,"$&/")+"/")+e)),t.push(o)),1;if(i=0,n=n===""?".":n+":",Iv(e))for(var c=0;c<e.length;c++){a=e[c];var p=n+qf(a,c);i+=Fu(a,t,r,p,o)}else if(p=zN(e),typeof p=="function")for(e=p.call(e),c=0;!(a=e.next()).done;)a=a.value,p=n+qf(a,c++),i+=Fu(a,t,r,p,o);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function uu(e,t,r){if(e==null)return e;var n=[],o=0;return Fu(e,n,"","",function(a){return t.call(r,a,o++)}),n}function UN(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Cr={current:null},Vu={transition:null},HN={ReactCurrentDispatcher:Cr,ReactCurrentBatchConfig:Vu,ReactCurrentOwner:Ph};ut.Children={map:uu,forEach:function(e,t,r){uu(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return uu(e,function(){t++}),t},toArray:function(e){return uu(e,function(t){return t})||[]},only:function(e){if(!kh(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ut.Component=Ui;ut.Fragment=RN;ut.Profiler=AN;ut.PureComponent=Oh;ut.StrictMode=jN;ut.Suspense=LN;ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=HN;ut.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=Px({},e.props),o=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=Ph.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(p in t)Nx.call(t,p)&&!Rx.hasOwnProperty(p)&&(n[p]=t[p]===void 0&&c!==void 0?c[p]:t[p])}var p=arguments.length-2;if(p===1)n.children=r;else if(1<p){c=Array(p);for(var g=0;g<p;g++)c[g]=arguments[g+2];n.children=c}return{$$typeof:ks,type:e.type,key:o,ref:a,props:n,_owner:i}};ut.createContext=function(e){return e={$$typeof:IN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:MN,_conLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var $N=j,qN=Symbol.for("react.element"),GN=Symbol.for("react.fragment"),KN=Object.prototype.hasOwnProperty,YN=$N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,XN={key:!0,ref:!0,__self:!0,__source:!0};function Ax(e,t,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(n in t)KN.call(t,n)&&!XN.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:qN,type:e,key:a,ref:i,props:o,_owner:YN.current}}dd.Fragment=GN;dd.jsx=Ax;dd.jsxs=Ax;Cx.exports=dd;var M=Cx.exports,$p={},Mx={exports:{}},Yr={},Ix={exports:{}},Dx={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/(function(e){function t($,B){var U=$.length;$.push(B);e:for(;0<U;){var K=U-1>>>1,Q=$[K];if(0<o(Q,B))$[K]=B,$[U]=Q,U=K;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var B=$[0],U=$.pop();if(U!==B){$[0]=U;e:for(var K=0,Q=$.length,ne=Q>>>1;K<ne;){var le=2*(K+1)-1,ce=$[le],re=le+1,me=$[re];if(0>o(ce,U))re<Q&&0>o(me,ce)?($[K]=me,$[re]=U,K=re):($[K]=ce,$[le]=U,K=le);else if(re<Q&&0>o(me,U))$[K]=me,$[re]=U,K=re;else break e}}return B}function o($,B){var U=$.sortIndex-B.sortIndex;return U!==0?U:$.id-B.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();e.unstable_now=function(){return i.now()-c}}var p=[],g=[],m=1,_=null,O=3,C=!1,T=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function u($){for(var B=r(g);B!==null;){if(B.callback===null)n(g);else if(B.startTime<=$)n(g),B.sortIndex=B.expirationTime,t(p,B);else break;B=r(g)}}function s($){if(x=!1,u($),!T)if(r(p)!==null)T=!0,G(h);else{var B=r(g);B!==null&&X(s,B.startTime-$)}}function h($,B){T=!1,x&&(x=!1,d(E),E=-1),C=!0;var U=O;try{for(u(B),_=r(p);_!==null&&(!(_.expirationTime>B)||$&&!R());){var K=_.callback;if(typeof K=="function"){_.callback=null,O=_.priorityLevel;var Q=K(_.expirationTime<=B);B=e.unstable_now(),typeof Q=="function"?_.callback=Q:_===r(p)&&n(p),u(B)}else n(p);_=r(p)}if(_!==null)var ne=!0;else{var le=r(g);le!==null&&X(s,le.startTime-B),ne=!1}return ne}finally{_=null,O=U,C=!1}}var v=!1,y=null,E=-1,P=5,k=-1;function R(){return!(e.unstable_now()-k<P)}function A(){if(y!==null){var $=e.unstable_now();k=$;var B=!0;try{B=y(!0,$)}finally{B?D():(v=!1,y=null)}}else v=!1}var D;if(typeof l=="function")D=function(){l(A)};else if(typeof MessageChannel<"u"){var L=new MessageChannel,W=L.port2;L.port1.onmessage=A,D=function(){W.postMessage(null)}}else D=function(){b(A,0)};function G($){y=$,v||(v=!0,D())}function X($,B){E=b(function(){$(e.unstable_now())},B)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function($){$.callback=null},e.unstable_continueExecution=function(){T||C||(T=!0,G(h))},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return O},e.unstable_getFirstCallbackNode=function(){return r(p)},e.unstable_next=function($){switch(O){case 1:case 2:case 3:var B=3;break;default:B=O}var U=O;O=B;try{return $()}finally{O=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function($,B){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var U=O;O=$;try{return B()}finally{O=U}},e.unstable_scheduleCallback=function($,B,U){var K=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?K+U:K):U=K,$){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=U+Q,$={id:m++,callback:B,priorityLevel:$,startTime:U,expirationTime:Q,sortIndex:-1},U>K?($.sortIndex=U,t(g,$),r(p)===null&&$===r(g)&&(x?(d(E),E=-1):x=!0,X(s,U-K))):($.sortIndex=Q,t(p,$),T||C||(T=!0,G(h))),$},e.unstable_shouldYield=R,e.unstable_wrapCallback=function($){var B=O;return function(){var U=O;O=B;try{return $.apply(this,arguments)}finally{O=U}}}})(Dx);Ix.exports=Dx;var QN=Ix.exports;/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Lx=j,Gr=QN;function we(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Fx=new Set,Zl={};function Va(e,t){ki(e,t),ki(e+"Capture",t)}function ki(e,t){for(Zl[e]=t,e=0;e<t.length;e++)Fx.add(t[e])}var to=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qp=Object.prototype.hasOwnProperty,JN=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Lv={},Fv={};function ZN(e){return qp.call(Fv,e)?!0:qp.call(Lv,e)?!1:JN.test(e)?Fv[e]=!0:(Lv[e]=!0,!1)}function eR(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function tR(e,t,r,n){if(t===null||typeof t>"u"||eR(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Or(e,t,r,n,o,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var sr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){sr[e]=new Or(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];sr[t]=new Or(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){sr[e]=new Or(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){sr[e]=new Or(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){sr[e]=new Or(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){sr[e]=new Or(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){sr[e]=new Or(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){sr[e]=new Or(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){sr[e]=new Or(e,5,!1,e.toLowerCase(),null,!1,!1)});var Nh=/[\-:]([a-z])/g;function Rh(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Nh,Rh);sr[t]=new Or(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Nh,Rh);sr[t]=new Or(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Nh,Rh);sr[t]=new Or(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){sr[e]=new Or(e,1,!1,e.toLowerCase(),null,!1,!1)});sr.xlinkHref=new Or("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){sr[e]=new Or(e,1,!1,e.toLowerCase(),null,!0,!0)});function jh(e,t,r,n){var o=sr.hasOwnProperty(t)?sr[t]:null;(o!==null?o.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!==
Line truncated
|
||||
`+Gf+e}var Kf=!1;function Yf(e,t){if(!e||Kf)return"";Kf=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(g){var n=g}Reflect.construct(e,[],t)}else{try{t.call()}catch(g){n=g}e.call(t.prototype)}else{try{throw Error()}catch(g){n=g}e()}}catch(g){if(g&&n&&typeof g.stack=="string"){for(var o=g.stack.split(`
|
||||
`),a=n.stack.split(`
|
||||
`),i=o.length-1,c=a.length-1;1<=i&&0<=c&&o[i]!==a[c];)c--;for(;1<=i&&0<=c;i--,c--)if(o[i]!==a[c]){if(i!==1||c!==1)do if(i--,c--,0>c||o[i]!==a[c]){var p=`
|
||||
`+o[i].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),p}while(1<=i&&0<=c);break}}}finally{Kf=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Rl(e):""}function rR(e){switch(e.tag){case 5:return Rl(e.type);case 16:return Rl("Lazy");case 13:return Rl("Suspense");case 19:return Rl("SuspenseList");case 0:case 2:case 15:return e=Yf(e.type,!1),e;case 11:return e=Yf(e.type.render,!1),e;case 1:return e=Yf(e.type,!0),e;default:return""}}function Xp(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case oi:return"Fragment";case ni:return"Portal";case Gp:return"Profiler";case Ah:return"StrictMode";case Kp:return"Suspense";case Yp:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case zx:return(e.displayName||"Context")+".Consumer";case Vx:return(e._context.displayName||"Context")+".Provider";case Mh:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ih:return t=e.displayName||null,t!==null?t:Xp(e.type)||"Memo";case Eo:t=e._payload,e=e._init;try{return Xp(e(t))}catch{}}return null}function nR(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Xp(t);case 8:return t===Ah?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ko(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Wx(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oR(e){var t=Wx(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function du(e){e._valueTracker||(e._valueTracker=oR(e))}function Ux(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=Wx(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function gc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qp(e,t){var r=t.checked;return Bt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function zv(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=Ko(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Hx(e,t){t=t.checked,t!=null&&jh(e,"checked",t,!1)}function Jp(e,t){Hx(e,t);var r=Ko(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Zp(e,t.type,r):t.hasOwnProperty("defaultValue")&&Zp(e,t.type,Ko(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Bv(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Zp(e,t,r){(t!=="number"||gc(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var jl=Array.isArray;function mi(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o<r.length;o++)t["$"+r[o]]=!0;for(r=0;r<e.length;r++)o=t.hasOwnProperty("$"+e[r].value),e[r].selected!==o&&(e[r].selected=o),o&&n&&(e[r].defaultSelected=!0)}else{for(r=""+Ko(r),t=null,o=0;o<e.length;o++){if(e[o].value===r){e[o].selected=!0,n&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function e0(e,t){if(t.dan
Line truncated
|
||||
`).replace(hj,"")}function yu(e,t,r){if(t=cy(t),cy(e)!==t&&r)throw Error(we(425))}function Tc(){}var p0=null,h0=null;function g0(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var b0=typeof setTimeout=="function"?setTimeout:void 0,gj=typeof clearTimeout=="function"?clearTimeout:void 0,dy=typeof Promise=="function"?Promise:void 0,bj=typeof queueMicrotask=="function"?queueMicrotask:typeof dy<"u"?function(e){return dy.resolve(null).then(e).catch(mj)}:b0;function mj(e){setTimeout(function(){throw e})}function sp(e,t){var r=t,n=0;do{var o=r.nextSibling;if(e.removeChild(r),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(n===0){e.removeChild(o),os(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=o}while(r);os(t)}function zo(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function fy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var $i=Math.random().toString(36).slice(2),Fn="__reactFiber$"+$i,us="__reactProps$"+$i,ro="__reactContainer$"+$i,m0="__reactEvents$"+$i,vj="__reactListeners$"+$i,yj="__reactHandles$"+$i;function wa(e){var t=e[Fn];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ro]||r[Fn]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=fy(e);e!==null;){if(r=e[Fn])return r;e=fy(e)}return t}e=r,r=e.parentNode}return null}function Rs(e){return e=e[Fn]||e[ro],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function si(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(we(33))}function bd(e){return e[us]||null}var v0=[],ui=-1;function Jo(e){return{current:e}}function Rt(e){0>ui||(e.current=v0[ui],v0[ui]=null,ui--)}function St(e,t){ui++,v0[ui]=e.current,e.current=t}var Yo={},mr=Jo(Yo),Ir=Jo(!1),Ea=Yo;function Ei(e,t){var r=e.type.contextTypes;if(!r)return Yo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},a;for(a in r)o[a]=t[a];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Dr(e){return e=e.childContextTypes,e!=null}function Cc(){Rt(Ir),Rt(mr)}function py(e,t,r){if(mr.current!==Yo)throw Error(we(168));St(mr,t),St(Ir,r)}function j_(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(we(108,nR(e)||"Unknown",o));return Bt({},r,n)}function Oc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yo,Ea=mr.current,St(mr,e),St(Ir,Ir.current),!0}function hy(e,t,r){var n=e.stateNode;if(!n)throw Error(we(169));r?(e=j_(e,t,Ea),n.__reactInternalMemoizedMergedChildContext=e,Rt(Ir),Rt(mr),St(mr,e)):Rt(Ir),St(Ir,r)}var Yn=null,md=!1,up=!1;function A_(e){Yn===null?Yn=[e]:Yn.push(e)}function wj(e){md=!0,A_(e)}function Zo(){if(!up&&Yn!==null){up=!0;var e=0,t=xt;try{var r=Yn;for(xt=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Yn=null,md=!1}catch(o){throw Yn!==null&&(Yn=Yn.slice(e+1)),o_(Lh,Zo),o}finally{xt=t,up=!1}}return null}var ci=[],di=0,Sc=null,Pc=0,nn=[],on=0,Na=null,Xn=1,Qn="";function va(e,t){ci[di++]=Pc,ci[di++]=Sc,Sc=e,Pc=t}function M_(e,t,r){nn[on++]=Xn,nn[on++]=Qn,nn[on++]=Na,Na=e;var n=Xn;e=Qn;var o=32-Tn(n)-1;n&=~(1<<o),r+=1;var a=32-Tn(t)+o;if(30<a){var i=o-o%5;a=(n&(1<<i)-1).toString(32),n>>=i,o-=i,Xn=1<<32-Tn(t)+o|r<<o|n,Qn=a+e}else Xn=1<<a|r<<o|n,Qn=e}function qh(e){e.return!==null&&(va(e,1),M_(e,1,0))}function Gh(e){for(;e===Sc;)Sc=ci[--di],ci[di]=null,Pc=ci[--di],ci[di]=null;for(;e===Na;)Na=nn[--on],nn[on]=null,Qn=nn[--on],nn[on]=null,Xn=nn[--on],nn[on]=null}var Ur=null,Wr=null,Mt=!1,wn=null;function I_(e,t){var r=ln(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function gy(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ur=e,Wr=zo(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ur=e,Wr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Na!==null?{id:Xn,overflow:Qn}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ln(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ur=e,Wr=null,!0):!1;default:return!1}}function y0(e){return(e.mode&1)!==0&&(e.flags&128)===0}function w0(e){if(Mt){var t=Wr;if(t){var r=t;if(!gy(e,t)){if(y0(e))throw Error(we(418));t=zo(r.nextSibling);var n=Ur;t&&gy(e,t)?I_(n,r):(e.flags=e.flags&-4097|2,Mt=!1,Ur=e)}}else{if(y0(e))throw Error(we(418));e.flags=e.flags&-4097|2,Mt=!1,Ur=e}}}function by(e){
Line truncated
|
||||
Error generating stack: `+a.message+`
|
||||
`+a.stack}return{value:e,source:t,stack:o,digest:null}}function hp(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function C0(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Ej=typeof WeakMap=="function"?WeakMap:Map;function u1(e,t,r){r=Jn(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Ic||(Ic=!0,M0=n),C0(e,t)},r}function c1(e,t,r){r=Jn(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var o=t.value;r.payload=function(){return n(o)},r.callback=function(){C0(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){C0(e,t),typeof n!="function"&&(Wo===null?Wo=new Set([this]):Wo.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function Cy(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Ej;var o=new Set;n.set(t,o)}else o=n.get(t),o===void 0&&(o=new Set,n.set(t,o));o.has(r)||(o.add(r),e=Uj.bind(null,e,t,r),t.then(e,e))}function Oy(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Sy(e,t,r,n,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Jn(-1,1),t.tag=2,Bo(r,t,1))),r.lanes|=1),e)}var Nj=lo.ReactCurrentOwner,Ar=!1;function _r(e,t,r,n){t.child=e===null?W_(t,null,r,n):Ri(t,e.child,r,n)}function Py(e,t,r,n,o){r=r.render;var a=t.ref;return xi(t,o),n=og(e,t,r,n,a,o),r=ag(),e!==null&&!Ar?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,oo(e,t,o)):(Mt&&r&&qh(t),t.flags|=1,_r(e,t,n,o),t.child)}function ky(e,t,r,n,o){if(e===null){var a=r.type;return typeof a=="function"&&!gg(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,d1(e,t,a,n,o)):(e=Yu(r.type,null,n,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&o)){var i=a.memoizedProps;if(r=r.compare,r=r!==null?r:is,r(i,n)&&e.ref===t.ref)return oo(e,t,o)}return t.flags|=1,e=Ho(a,n),e.ref=t.ref,e.return=t,t.child=e}function d1(e,t,r,n,o){if(e!==null){var a=e.memoizedProps;if(is(a,n)&&e.ref===t.ref)if(Ar=!1,t.pendingProps=n=a,(e.lanes&o)!==0)e.flags&131072&&(Ar=!0);else return t.lanes=e.lanes,oo(e,t,o)}return O0(e,t,r,n,o)}function f1(e,t,r){var n=t.pendingProps,o=n.children,a=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},St(hi,Br),Br|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,St(hi,Br),Br|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=a!==null?a.baseLanes:r,St(hi,Br),Br|=n}else a!==null?(n=a.baseLanes|r,t.memoizedState=null):n=r,St(hi,Br),Br|=n;return _r(e,t,o,r),t.child}function p1(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function O0(e,t,r,n,o){var a=Dr(r)?Ea:mr.current;return a=Ei(t,a),xi(t,o),r=og(e,t,r,n,a,o),n=ag(),e!==null&&!Ar?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,oo(e,t,o)):(Mt&&n&&qh(t),t.flags|=1,_r(e,t,r,o),t.child)}function Ey(e,t,r,n,o){if(Dr(r)){var a=!0;Oc(t)}else a=!1;if(xi(t,o),t.stateNode===null)qu(e,t),z_(t,r,n),T0(t,r,n,o),n=!0;else if(e===null){var i=t.stateNode,c=t.memoizedProps;i.props=c;var p=i.context,g=r.contextType;typeof g=="object"&&g!==null?g=dn(g):(g=Dr(r)?Ea:mr.current,g=Ei(t,g));var m=r.getDerivedStateFromProps,_=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function";_||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==n||p!==g)&&wy(t,i,n,g),No=!1;var O=t.memoizedState;i.state=O,Nc(t,n,i,o),p=t.memoizedState,c!==n||O!==p||Ir.current||No?(typeof m=="function"&&(_0(t,r,m,n),p=t.memoizedState),(c=No||yy(t,r,c,n,O,p,g))?(_||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=p),i.props=n,i.state=p,i.context=g,n=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{i=t.stateNode,F_(e,t),c=t.memoizedProps,g=t.type===t.elementType?c:mn(t.type,c),i.props=g,_=t.pendingProps,O=i.context,p=r.contextType,typeof p=="object"&&p!==null?p=dn(p):(p=Dr(r)?Ea:mr.current,p=Ei(t,p));var C=r.getDerivedStateFromProps;(m=typeof C=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==_||O!==p)&&wy(t,i,n,p),No=!1,O=t.memoizedState,i.state=O,Nc(t,n,i,o);var T=t.memoizedS
Line truncated
|
||||
* @remix-run/router v1.10.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function bs(){return bs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bs.apply(this,arguments)}var Do;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Do||(Do={}));const Uy="popstate";function eA(e){e===void 0&&(e={});function t(n,o){let{pathname:a,search:i,hash:c}=n.location;return F0("",{pathname:a,search:i,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:Vc(o)}return rA(t,r,null,e)}function zt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function wg(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tA(){return Math.random().toString(36).substr(2,8)}function Hy(e,t){return{usr:e.state,key:e.key,idx:t}}function F0(e,t,r,n){return r===void 0&&(r=null),bs({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?qi(t):t,{state:r,key:t&&t.key||n||tA()})}function Vc(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function qi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function rA(e,t,r,n){n===void 0&&(n={});let{window:o=document.defaultView,v5Compat:a=!1}=n,i=o.history,c=Do.Pop,p=null,g=m();g==null&&(g=0,i.replaceState(bs({},i.state,{idx:g}),""));function m(){return(i.state||{idx:null}).idx}function _(){c=Do.Pop;let b=m(),d=b==null?null:b-g;g=b,p&&p({action:c,location:x.location,delta:d})}function O(b,d){c=Do.Push;let l=F0(x.location,b,d);r&&r(l,b),g=m()+1;let u=Hy(l,g),s=x.createHref(l);try{i.pushState(u,"",s)}catch(h){if(h instanceof DOMException&&h.name==="DataCloneError")throw h;o.location.assign(s)}a&&p&&p({action:c,location:x.location,delta:1})}function C(b,d){c=Do.Replace;let l=F0(x.location,b,d);r&&r(l,b),g=m();let u=Hy(l,g),s=x.createHref(l);i.replaceState(u,"",s),a&&p&&p({action:c,location:x.location,delta:0})}function T(b){let d=o.location.origin!=="null"?o.location.origin:o.location.href,l=typeof b=="string"?b:Vc(b);return zt(d,"No window.location.(origin|href) available to create URL for href: "+l),new URL(l,d)}let x={get action(){return c},get location(){return e(o,i)},listen(b){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Uy,_),p=b,()=>{o.removeEventListener(Uy,_),p=null}},createHref(b){return t(o,b)},createURL:T,encodeLocation(b){let d=T(b);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:O,replace:C,go(b){return i.go(b)}};return x}var $y;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})($y||($y={}));function nA(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?qi(t):t,o=ms(n.pathname||"/",r);if(o==null)return null;let a=L1(e);oA(a);let i=null;for(let c=0;i==null&&c<a.length;++c)i=pA(a[c],gA(o));return i}function L1(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let o=(a,i,c)=>{let p={relativePath:c===void 0?a.path||"":c,caseSensitive:a.caseSensitive===!0,childrenIndex:i,route:a};p.relativePath.startsWith("/")&&(zt(p.relativePath.startsWith(n),'Absolute route path "'+p.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),p.relativePath=p.relativePath.slice(n.length));let g=$o([n,p.relativePath]),m=r.concat(p);a.children&&a.children.length>0&&(zt(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),L1(a.children,t,m,g)),!(a.path==null&&!a.index)&&t.push({path:g,score:dA(g,a.index),routesMeta:m})};return e.forEach((a,i)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))o(a,i);else for(let p of F1(a.path))o(a,i,p)}),t}function F1(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(n.length===0)return o?[a,""]:[a];let i=F1(n.join("/")),c=[];return c.push(...i.map(p=>p===""?a:[a,p].join("/"))),o&&c.push(...i),c.map(p=>e.startsWith("/")&&p===""?"/":p)}function oA(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:fA(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const aA=/^:\w+$/,iA=3,lA=2,sA=1,uA=10,cA=-2,qy=e=>e==="*";function dA(e,t){let r=e.split("/"),n=r.length;return r.some(qy)&&(n+=cA),t&&(n+=lA),r.filter(o=>!qy(o)).reduce((o,a)=>o+(aA.test(a)?iA:a===""?sA:uA),n)}function fA(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function pA(e,t){let{routesMeta:r}=e,n={},o="/",a=[];for(let i=0;i<r.length;++i){let c=r[i],p=i===r.length-1,g=o==="/"?t:t.slice(o.length)||"/",m=V0({path:c.relativePath,caseSensitive:c.caseSensitive,end:p},g);if(!m)return null;Object.assign(n,m.paLine truncated
|
||||
* React Router v6.17.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function zc(){return zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zc.apply(this,arguments)}const Pd=j.createContext(null),z1=j.createContext(null),Ba=j.createContext(null),kd=j.createContext(null),ea=j.createContext({outlet:null,matches:[],isDataRoute:!1}),B1=j.createContext(null);function CA(e,t){let{relative:r}=t===void 0?{}:t;Gi()||zt(!1);let{basename:n,navigator:o}=j.useContext(Ba),{hash:a,pathname:i,search:c}=Nd(e,{relative:r}),p=i;return n!=="/"&&(p=i==="/"?n:$o([n,i])),o.createHref({pathname:p,search:c,hash:a})}function Gi(){return j.useContext(kd)!=null}function ta(){return Gi()||zt(!1),j.useContext(kd).location}function W1(e){j.useContext(Ba).static||j.useLayoutEffect(e)}function Ed(){let{isDataRoute:e}=j.useContext(ea);return e?LA():OA()}function OA(){Gi()||zt(!1);let e=j.useContext(Pd),{basename:t,navigator:r}=j.useContext(Ba),{matches:n}=j.useContext(ea),{pathname:o}=ta(),a=JSON.stringify(xg(n).map(p=>p.pathnameBase)),i=j.useRef(!1);return W1(()=>{i.current=!0}),j.useCallback(function(p,g){if(g===void 0&&(g={}),!i.current)return;if(typeof p=="number"){r.go(p);return}let m=_g(p,JSON.parse(a),o,g.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:$o([t,m.pathname])),(g.replace?r.replace:r.push)(m,g.state,g)},[t,r,a,o,e])}function Nd(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=j.useContext(ea),{pathname:o}=ta(),a=JSON.stringify(xg(n).map(i=>i.pathnameBase));return j.useMemo(()=>_g(e,JSON.parse(a),o,r==="path"),[e,a,o,r])}function SA(e,t){return PA(e,t)}function PA(e,t,r){Gi()||zt(!1);let{navigator:n}=j.useContext(Ba),{matches:o}=j.useContext(ea),a=o[o.length-1],i=a?a.params:{};a&&a.pathname;let c=a?a.pathnameBase:"/";a&&a.route;let p=ta(),g;if(t){var m;let x=typeof t=="string"?qi(t):t;c==="/"||(m=x.pathname)!=null&&m.startsWith(c)||zt(!1),g=x}else g=p;let _=g.pathname||"/",O=c==="/"?_:_.slice(c.length)||"/",C=nA(e,{pathname:O}),T=jA(C&&C.map(x=>Object.assign({},x,{params:Object.assign({},i,x.params),pathname:$o([c,n.encodeLocation?n.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?c:$o([c,n.encodeLocation?n.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,r);return t&&T?j.createElement(kd.Provider,{value:{location:zc({pathname:"/",search:"",hash:"",state:null,key:"default"},g),navigationType:Do.Pop}},T):T}function kA(){let e=DA(),t=_A(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),r?j.createElement("pre",{style:o},r):null,a)}const EA=j.createElement(kA,null);class NA extends j.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?j.createElement(ea.Provider,{value:this.props.routeContext},j.createElement(B1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function RA(e){let{routeContext:t,match:r,children:n}=e,o=j.useContext(Pd);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),j.createElement(ea.Provider,{value:t},n)}function jA(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var o;if((o=r)!=null&&o.errors)e=r.matches;else return null}let a=e,i=(n=r)==null?void 0:n.errors;if(i!=null){let c=a.findIndex(p=>p.route.id&&(i==null?void 0:i[p.route.id]));c>=0||zt(!1),a=a.slice(0,Math.min(a.length,c+1))}return a.reduceRight((c,p,g)=>{let m=p.route.id?i==null?void 0:i[p.route.id]:null,_=null;r&&(_=p.route.errorElement||EA);let O=t.concat(a.slice(0,g+1)),C=()=>{let T;return m?T=_:p.route.Component?T=j.createElement(p.route.Component,null):p.route.element?T=p.route.element:T=c,j.createElement(RA,{match:p,routeContext:{outlet:c,matches:O,isDataRoute:r!=null},children:T})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?j.createElement(NA,{location:r.location,revalidation:r.revalidation,component:_,error:m,children:C(),routeContext:{outlet:null,matches:O,isDataRoute:!0}}):C()},null)}var U1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(U1||{}),Bc=function(e){return e.UseBlocker="useBlocker",e.UseLoadeLine truncated
|
||||
* React Router DOM v6.17.0
|
||||
*
|
||||
* Copyright (c) Remix Software Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*/function Wc(){return Wc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wc.apply(this,arguments)}function $1(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function zA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function BA(e,t){return e.button===0&&(!t||t==="_self")&&!zA(e)}const WA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],UA=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],HA=j.createContext({isTransitioning:!1}),$A="startTransition",Gy=Eh[$A];function qA(e){let{basename:t,children:r,future:n,window:o}=e,a=j.useRef();a.current==null&&(a.current=eA({window:o,v5Compat:!0}));let i=a.current,[c,p]=j.useState({action:i.action,location:i.location}),{v7_startTransition:g}=n||{},m=j.useCallback(_=>{g&&Gy?Gy(()=>p(_)):p(_)},[p,g]);return j.useLayoutEffect(()=>i.listen(m),[i,m]),j.createElement(VA,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:i})}const GA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",KA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,q1=j.forwardRef(function(t,r){let{onClick:n,relative:o,reloadDocument:a,replace:i,state:c,target:p,to:g,preventScrollReset:m,unstable_viewTransition:_}=t,O=$1(t,WA),{basename:C}=j.useContext(Ba),T,x=!1;if(typeof g=="string"&&KA.test(g)&&(T=g,GA))try{let u=new URL(window.location.href),s=g.startsWith("//")?new URL(u.protocol+g):new URL(g),h=ms(s.pathname,C);s.origin===u.origin&&h!=null?g=h+s.search+s.hash:x=!0}catch{}let b=CA(g,{relative:o}),d=QA(g,{replace:i,state:c,target:p,preventScrollReset:m,relative:o,unstable_viewTransition:_});function l(u){n&&n(u),u.defaultPrevented||d(u)}return j.createElement("a",Wc({},O,{href:T||b,onClick:x||a?n:l,ref:r,target:p}))}),YA=j.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:o=!1,className:a="",end:i=!1,style:c,to:p,unstable_viewTransition:g,children:m}=t,_=$1(t,UA),O=Nd(p,{relative:_.relative}),C=ta(),T=j.useContext(z1),{navigator:x}=j.useContext(Ba),b=T!=null&&JA(O)&&g===!0,d=x.encodeLocation?x.encodeLocation(O).pathname:O.pathname,l=C.pathname,u=T&&T.navigation&&T.navigation.location?T.navigation.location.pathname:null;o||(l=l.toLowerCase(),u=u?u.toLowerCase():null,d=d.toLowerCase());let s=l===d||!i&&l.startsWith(d)&&l.charAt(d.length)==="/",h=u!=null&&(u===d||!i&&u.startsWith(d)&&u.charAt(d.length)==="/"),v={isActive:s,isPending:h,isTransitioning:b},y=s?n:void 0,E;typeof a=="function"?E=a(v):E=[a,s?"active":null,h?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let P=typeof c=="function"?c(v):c;return j.createElement(q1,Wc({},_,{"aria-current":y,className:E,ref:r,style:P,to:p,unstable_viewTransition:g}),typeof m=="function"?m(v):m)});var B0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(B0||(B0={}));var Ky;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ky||(Ky={}));function XA(e){let t=j.useContext(Pd);return t||zt(!1),t}function QA(e,t){let{target:r,replace:n,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:c}=t===void 0?{}:t,p=Ed(),g=ta(),m=Nd(e,{relative:i});return j.useCallback(_=>{if(BA(_,r)){_.preventDefault();let O=n!==void 0?n:Vc(g)===Vc(m);p(e,{replace:O,state:o,preventScrollReset:a,relative:i,unstable_viewTransition:c})}},[g,p,m,n,o,r,e,a,i,c])}function JA(e,t){t===void 0&&(t={});let r=j.useContext(HA);r==null&&zt(!1);let{basename:n}=XA(B0.useViewTransitionState),o=Nd(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=ms(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=ms(r.nextLocation.pathname,n)||r.nextLocation.pathname;return V0(o.pathname,i)!=null||V0(o.pathname,a)!=null}function ZA({title:e,titleId:t,...r},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M3 6.75A.75.75 0 013.75 6h16.5a.75.75 0 010 1.5H3.75A.75.75 0 013 6.75zM3 12a.75.75 0 01.75-.75h16.5a.75.75 0 010 1.5H3.75A.75.75 0 013 12zm0 5.25a.75.75 0 01.75-.75h16.5a.75.75 0 010 1.5H3.75a.75.75 0 01-.75-.75z",clipRule:"evenodd"}))}const eM=j.forwardRef(ZA),tM=eM;function rM({title:e,titleId:t,...r},n){return j.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",ref:n,"aria-labelledby":t},r),e?j.createElement("title",{id:t},e):null,j.createElement("path",{fillRule:"evenodd",d:"M11.078 2.25c-.917 0-1.69Line truncated
|
||||
Copyright (c) 2018 Jed Watson.
|
||||
Licensed under the MIT License (MIT), see
|
||||
http://jedwatson.github.io/classnames
|
||||
*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")n.push(a);else if(Array.isArray(a)){if(a.length){var c=r.apply(null,a);c&&n.push(c)}}else if(i==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){n.push(a.toString());continue}for(var p in a)t.call(a,p)&&a[p]&&n.push(p)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(Y1);var He=Y1.exports,X1={exports:{}},bn={};function Cg(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Q1(e))&&(n&&(n+=" "),n+=t);return n}function Q1(e){if(typeof e=="string")return e;for(var t,r="",n=0;n<e.length;n++)e[n]&&(t=Q1(e[n]))&&(r&&(r+=" "),r+=t);return r}function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},W0.apply(this,arguments)}function yM(e){var t=function(r){var n=r.theme,o=r.prefix,a={nextPart:new Map,validators:[]};return function(i,c){return c?i.map(function(p){return[p[0],p[1].map(function(g){return typeof g=="string"?c+g:typeof g=="object"?Object.fromEntries(Object.entries(g).map(function(m){return[c+m[0],m[1]]})):g})]}):i}(Object.entries(r.classGroups),o).forEach(function(i){U0(i[1],a,i[0],n)}),a}(e);return{getClassGroupId:function(r){var n=r.split("-");return n[0]===""&&n.length!==1&&n.shift(),J1(n,t)||function(o){if(Yy.test(o)){var a=Yy.exec(o)[1],i=a==null?void 0:a.substring(0,a.indexOf(":"));if(i)return"arbitrary.."+i}}(r)},getConflictingClassGroupIds:function(r){return e.conflictingClassGroups[r]||[]}}}function J1(e,t){var r;if(e.length===0)return t.classGroupId;var n=t.nextPart.get(e[0]),o=n?J1(e.slice(1),n):void 0;if(o)return o;if(t.validators.length!==0){var a=e.join("-");return(r=t.validators.find(function(i){return(0,i.validator)(a)}))==null?void 0:r.classGroupId}}Object.defineProperty(bn,"__esModule",{value:!0});var Yy=/^\[(.+)\]$/;function U0(e,t,r,n){e.forEach(function(o){if(typeof o!="string"){if(typeof o=="function")return o.isThemeGetter?void U0(o(n),t,r,n):void t.validators.push({validator:o,classGroupId:r});Object.entries(o).forEach(function(a){U0(a[1],Xy(t,a[0]),r,n)})}else(o===""?t:Xy(t,o)).classGroupId=r})}function Xy(e,t){var r=e;return t.split("-").forEach(function(n){r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function wM(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function o(a,i){r.set(a,i),++t>e&&(t=0,n=r,r=new Map)}return{get:function(a){var i=r.get(a);return i!==void 0?i:(i=n.get(a))!==void 0?(o(a,i),i):void 0},set:function(a,i){r.has(a)?r.set(a,i):o(a,i)}}}function xM(e){var t=e.separator||":";return function(r){for(var n=0,o=[],a=0,i=0;i<r.length;i++){var c=r[i];n===0&&c===t[0]&&(t.length!==1&&r.slice(i,i+t.length)!==t||(o.push(r.slice(a,i)),a=i+t.length)),c==="["?n++:c==="]"&&n--}var p=o.length===0?r:r.substring(a),g=p.startsWith("!");return{modifiers:o,hasImportantModifier:g,baseClassName:g?p.substring(1):p}}}function _M(e){return W0({cache:wM(e.cacheSize),splitModifiers:xM(e)},yM(e))}var TM=/\s+/;function CM(e,t){var r=t.splitModifiers,n=t.getClassGroupId,o=t.getConflictingClassGroupIds,a=new Set;return e.trim().split(TM).map(function(i){var c=r(i),p=c.modifiers,g=c.hasImportantModifier,m=n(c.baseClassName);if(!m)return{isTailwindClass:!1,originalClassName:i};var _=function(O){if(O.length<=1)return O;var C=[],T=[];return O.forEach(function(x){x[0]==="["?(C.push.apply(C,T.sort().concat([x])),T=[]):T.push(x)}),C.push.apply(C,T.sort()),C}(p).join(":");return{isTailwindClass:!0,modifierId:g?_+"!":_,classGroupId:m,originalClassName:i}}).reverse().filter(function(i){if(!i.isTailwindClass)return!0;var c=i.modifierId,p=i.classGroupId,g=c+p;return!a.has(g)&&(a.add(g),o(p).forEach(function(m){return a.add(c+m)}),!0)}).reverse().map(function(i){return i.originalClassName}).join(" ")}function H0(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,a,i=c;function c(g){var m=t[0],_=t.slice(1).reduce(function(O,C){return C(O)},m());return n=_M(_),o=n.cache.get,a=n.cache.set,i=p,p(g)}function p(g){var m=o(g);if(m)return m;var _=CM(g,n);return a(g,_),_}return function(){return i(Cg.apply(null,arguments))}}function Et(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var ra=/^\[(.+)\]$/,OM=/^\d+\/\d+$/,SM=new Set(["px","full","screen"]),PM=/^(\d+)?(xs|sm|md|lg|xl)$/,kM=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh)/,EM=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function tn(e){return!Number.isNaN(Number(e))||SM.has(e)||OM.test(e)||Ro(e)}function Ro(e){var t,r=(t=ra.exec(e))==null?void 0:t[1];return!!r&&(r.startsWith("length:")||kM.test(r))}function Z1(e){var t,r=(t=ra.exec(e))==null?void 0:t[1];return!!r&&r.startsWLine truncated
|
||||
* tabbable 6.2.0
|
||||
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
||||
*/var yL=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],ah=yL.join(","),iS=typeof Element>"u",Ts=iS?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Jc=!iS&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Zc=function e(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),a=o===""||o==="true",i=a||r&&t&&e(t.parentNode);return i},wL=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},xL=function(t,r,n){if(Zc(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(ah));return r&&Ts.call(t,ah)&&o.unshift(t),o=o.filter(n),o},_L=function e(t,r,n){for(var o=[],a=Array.from(t);a.length;){var i=a.shift();if(!Zc(i,!1))if(i.tagName==="SLOT"){var c=i.assignedElements(),p=c.length?c:i.children,g=e(p,!0,n);n.flatten?o.push.apply(o,g):o.push({scopeParent:i,candidates:g})}else{var m=Ts.call(i,ah);m&&n.filter(i)&&(r||!t.includes(i))&&o.push(i);var _=i.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(i),O=!Zc(_,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(i));if(_&&O){var C=e(_===!0?i.children:_.children,!0,n);n.flatten?o.push.apply(o,C):o.push({scopeParent:i,candidates:C})}else a.unshift.apply(a,i.children)}}return o},lS=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},sS=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||wL(t))&&!lS(t)?0:t.tabIndex},TL=function(t,r){var n=sS(t);return n<0&&r&&!lS(t)?0:n},CL=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},uS=function(t){return t.tagName==="INPUT"},OL=function(t){return uS(t)&&t.type==="hidden"},SL=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},PL=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},kL=function(t){if(!t.name)return!0;var r=t.form||Jc(t),n=function(c){return r.querySelectorAll('input[type="radio"][name="'+c+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var a=PL(o,t.form);return!a||a===t},EL=function(t){return uS(t)&&t.type==="radio"},NL=function(t){return EL(t)&&!kL(t)},RL=function(t){var r,n=t&&Jc(t),o=(r=n)===null||r===void 0?void 0:r.host,a=!1;if(n&&n!==t){var i,c,p;for(a=!!((i=o)!==null&&i!==void 0&&(c=i.ownerDocument)!==null&&c!==void 0&&c.contains(o)||t!=null&&(p=t.ownerDocument)!==null&&p!==void 0&&p.contains(t));!a&&o;){var g,m,_;n=Jc(o),o=(g=n)===null||g===void 0?void 0:g.host,a=!!((m=o)!==null&&m!==void 0&&(_=m.ownerDocument)!==null&&_!==void 0&&_.contains(o))}}return a},Cw=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},jL=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Ts.call(t,"details>summary:first-of-type"),i=a?t.parentElement:t;if(Ts.call(i,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var c=t;t;){var p=t.parentElement,g=Jc(t);if(p&&!p.shadowRoot&&o(p)===!0)return Cw(t);t.assignedSlot?t=t.assignedSlot:!p&&g!==t.ownerDocument?t=g.host:t=p}t=c}if(RL(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return Cw(t);return!1},AL=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return Ts.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},ML=function(t,r){return!(r.disabled||Zc(r)||OL(r)||jL(r,t)||SL(r)||AL(r))},Ow=function(t,r){return!(NL(r)||sS(r)<0||!ML(t,r))},IL=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},DL=function e(t){var r=[],n=[];return t.forEach(function(o,a){var i=!!o.scopeParent,c=i?o.scopeParent:o,p=TL(c,i),g=i?e(o.candidates):c;p===0?i?r.push.apply(r,g):r.push(c):n.push({documentOrder:a,tabIndex:p,item:o,isScope:i,content:g})}),n.sort(CL).reduce(function(o,a){return a.isScope?o.push.apply(o,a.content):o.push(a.content),o},[]).concatLine truncated
|
||||
|
||||
More details: https://www.material-tailwind.com/docs/react/collapse
|
||||
`);var P=r.default.useRef(null),k=(0,g.useTheme)().navbar,R=k.styles,A=R.base.mobileNav;s=s??{},h=h??"";var D=(0,c.twMerge)((0,i.default)((0,p.default)(A)),h),L={unmount:{height:0,opacity:0,transition:{duration:.3,times:"[0.4, 0, 0.2, 1]"}},mount:{opacity:1,height:"".concat((E=P.current)===null||E===void 0?void 0:E.scrollHeight,"px"),transition:{duration:.3,times:"[0.4, 0, 0.2, 1]"}}},W=(0,a.default)(L,s),G=n.AnimatePresence,X=(0,o.useMergeRefs)([l,P]);return r.default.createElement(n.LazyMotion,{features:n.domAnimation},r.default.createElement(G,null,r.default.createElement(n.m.div,_({},y,{ref:X,className:D,initial:"unmount",exit:"unmount",animate:u?"mount":"unmount",variants:W}),v)))});x.displayName="MaterialTailwind.MobileNav",x.propTypes={open:m.propTypesOpen,animate:m.propTypesAnimate,className:m.propTypesClassName,children:m.propTypesChildren};var b=x})(JS);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var s in u)Object.defineProperty(l,s,{enumerable:!0,get:u[s]})}t(e,{Navbar:function(){return b},MobileNav:function(){return g.MobileNav},default:function(){return d}});var r=C(j),n=C(ze),o=C(He),a=Ve,i=C(It),c=C(De),p=je,g=JS,m=Rd;function _(l,u,s){return u in l?Object.defineProperty(l,u,{value:s,enumerable:!0,configurable:!0,writable:!0}):l[u]=s,l}function O(){return O=Object.assign||function(l){for(var u=1;u<arguments.length;u++){var s=arguments[u];for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(l[h]=s[h])}return l},O.apply(this,arguments)}function C(l){return l&&l.__esModule?l:{default:l}}function T(l,u){if(l==null)return{};var s=x(l,u),h,v;if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(l);for(v=0;v<y.length;v++)h=y[v],!(u.indexOf(h)>=0)&&Object.prototype.propertyIsEnumerable.call(l,h)&&(s[h]=l[h])}return s}function x(l,u){if(l==null)return{};var s={},h=Object.keys(l),v,y;for(y=0;y<h.length;y++)v=h[y],!(u.indexOf(v)>=0)&&(s[v]=l[v]);return s}var b=r.default.forwardRef(function(l,u){var s=l.variant,h=l.color,v=l.shadow,y=l.blurred,E=l.fullWidth,P=l.className,k=l.children,R=T(l,["variant","color","shadow","blurred","fullWidth","className","children"]),A=(0,p.useTheme)().navbar,D=A.defaultProps,L=A.valid,W=A.styles,G=W.base,X=W.variants;s=s??D.variant,h=h??D.color,v=v??D.shadow,y=y??D.blurred,E=E??D.fullWidth,P=P??D.className;var $,B=(0,o.default)((0,c.default)(G.navbar.initial),($={},_($,(0,c.default)(G.navbar.shadow),v),_($,(0,c.default)(G.navbar.blurred),y&&h==="white"),_($,(0,c.default)(G.navbar.fullWidth),E),$)),U=(0,o.default)((0,c.default)(X[(0,i.default)(L.variants,s,"filled")][(0,i.default)(L.colors,h,"white")])),K=(0,a.twMerge)((0,o.default)(B,U),P);return r.default.createElement("nav",O({},R,{ref:u,className:K}),k)});b.propTypes={variant:n.default.oneOf(m.propTypesVariant),color:n.default.oneOf(m.propTypesColor),shadow:m.propTypesShadow,blurred:m.propTypesBlurred,fullWidth:m.propTypesFullWidth,className:m.propTypesClassName,children:m.propTypesChildren},b.displayName="MaterialTailwind.Navbar";var d=Object.assign(b,{MobileNav:g.MobileNav})})(QS);var ZS={},Jd={},tl={};(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(b,d){for(var l in d)Object.defineProperty(b,l,{enumerable:!0,get:d[l]})}t(e,{propTypesOpen:function(){return a},propTypesHandler:function(){return i},propTypesPlacement:function(){return c},propTypesOffset:function(){return p},propTypesDismiss:function(){return g},propTypesAnimate:function(){return m},propTypesContent:function(){return _},propTypesInteractive:function(){return O},propTypesClassName:function(){return C},propTypesChildren:function(){return T},propTypesContextValue:function(){return x}});var r=o(ze),n=jt;function o(b){return b&&b.__esModule?b:{default:b}}var a=r.default.bool,i=r.default.func,c=n.propTypesPlacements,p=n.propTypesOffsetType,g=n.propTypesDismissType,m=n.propTypesAnimation,_=r.default.node,O=r.default.bool,C=r.default.string,T=r.default.node.isRequired,x=r.default.shape({open:r.default.bool.isRequired,strategy:r.default.oneOf(["fixed","absolute"]).isRequired,x:r.default.number,y:r.default.number,context:r.default.instanceOf(Object).isRequired,reference:r.default.func.isRequired,floating:r.default.func.isRequired,getReferenceProps:r.default.func.isRequired,getFloatingProps:r.default.func.isRequired,appliedAnimation:m.isRequired,labelId:r.default.string.isRequired,descriptionId:r.default.string.isRequired}).isRequired})(tl);(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(p,g){for(var m in g)Object.defineProperty(p,m,{enumerable:!0,get:g[m]})}t(e,{PopoverContext:function(){return a},usePopover:function(){return i},PopoverContextProvider:function(){return c}});var r=o(j),n=tl;function o(p){return p&&p.__esModule?p:{default:p}}var a=r.default.createContext(null);a.displayName="MaterialTailwind.PopoverContext";function i(){var p=r.default.useContext(a);if(!p)throw new Error("usePopover() must be used within a Popover. It happens when you us
Line truncated
|
||||
`).forEach(function(i){o=i.indexOf(":"),r=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!r||t[r]&&V6[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},ox=Symbol("internals");function Pl(e){return e&&String(e).trim().toLowerCase()}function sc(e){return e===!1||e==null?e:de.isArray(e)?e.map(sc):String(e)}function B6(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const W6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Dp(e,t,r,n,o){if(de.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!de.isString(t)){if(de.isString(n))return t.indexOf(n)!==-1;if(de.isRegExp(n))return n.test(t)}}function U6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function H6(e,t){const r=de.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,a,i){return this[n].call(this,t,o,a,i)},configurable:!0})})}class af{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function a(c,p,g){const m=Pl(p);if(!m)throw new Error("header name must be a non-empty string");const _=de.findKey(o,m);(!_||o[_]===void 0||g===!0||g===void 0&&o[_]!==!1)&&(o[_||p]=sc(c))}const i=(c,p)=>de.forEach(c,(g,m)=>a(g,m,p));if(de.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(de.isString(t)&&(t=t.trim())&&!W6(t))i(z6(t),r);else if(de.isHeaders(t))for(const[c,p]of t.entries())a(p,c,n);else t!=null&&a(r,t,n);return this}get(t,r){if(t=Pl(t),t){const n=de.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return B6(o);if(de.isFunction(r))return r.call(this,o,n);if(de.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Pl(t),t){const n=de.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Dp(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function a(i){if(i=Pl(i),i){const c=de.findKey(n,i);c&&(!r||Dp(n,n[c],c,r))&&(delete n[c],o=!0)}}return de.isArray(t)?t.forEach(a):a(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const a=r[n];(!t||Dp(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const r=this,n={};return de.forEach(this,(o,a)=>{const i=de.findKey(n,a);if(i){r[i]=sc(o),delete r[a];return}const c=t?U6(a):String(a).trim();c!==a&&delete r[a],r[c]=sc(o),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return de.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&de.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
||||
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[ox]=this[ox]={accessors:{}}).accessors,o=this.prototype;function a(i){const c=Pl(i);n[c]||(H6(o,i),n[c]=!0)}return de.isArray(t)?t.forEach(a):a(t),this}}af.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(af.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});de.freezeMethods(af);const Sn=af;function Lp(e,t){const r=this||Ab,n=t||r,o=Sn.from(n.headers);let a=n.data;return de.forEach(e,function(c){a=c.call(r,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function rk(e){return!!(e&&e.__CANCEL__)}function ol(e,t,r){Qe.call(this,e??"canceled",Qe.ERR_CANCELED,t,r),this.name="CanceledError"}de.inherits(ol,Qe,{__CANCEL__:!0});function nk(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Qe("Request failed with status code "+r.status,[Qe.ERR_BAD_REQUEST,Qe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function $6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function q6(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,a=0,i;return t=t!==void 0?t:1e3,function(p){const g=Date.now(),m=n[a];i||(i=g),r[o]=p,n[o]=g;let _=a,O=0;for(;_!==o;)O+=r[_++],_=_%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),g-i<t)return;const C=m&&g-m;return C?Math.round(O*1e3/C):void 0}}function G6(e,t){let r=0,n=1e3/t,o,a;const i=(g,m=Date.now())=>{r=m,o=null,a&&(clearTimeout(a),a=null),e.apply(null,g)};return[(...g)=>{const m=Date.now(),_=m-r;_>=n?i(g,m):(o=g,a||(a=setTimeout(()=>{a=null,i(o)},n-_)))},()=>o&&i(o)]}const sd=(e,t,r=3)=>{let n=0;const o=q6(50,250);return G6(a=>{const i=a.loaded,c=a.lengthComputable?a.total:void 0,p=i-n,g=o(p),m=i<=c;n=i;const _={loaded:i,total:c,progress:c?i/c:void 0,bytes:p,rate:g||void 0,estimated:g&&c&&m?(c-i)/g:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(_)},r)},ax=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ix=e=>(...t)=>de.asap(()=>e(...t)),K6=qr.hasStandardBrowserEnv?function(){const t=qr.navigator&&/(msie|trident)/i.test(qr.navigator.userAgent),r=document.createElement("a");let n;function o(a){let i=a;return t&&(r.setAttribute("href",i),i=r.href),r.setAttribute("href",i),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(i){const c=de.isString(i)?o(i):i;return c.protocol===n.protocol&&c.host===n.host}}():function(){return function(){return!0}}(),Y6=qr.hasStandardBrowserEnv?{write(e,t,r,n,o,a){const i=[e+"="+encodeURIComponent(t)];de.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),de.isString(n)&&i.push("path="+n),de.isString(o)&&i.push("domain="+o),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function X6(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Q6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ok(e,t){return e&&!X6(t)?Q6(e,t):t}const lx=e=>e instanceof Sn?{...e}:e;function Fa(e,t){t=t||{};const r={};function n(g,m,_){return de.isPlainObject(g)&&de.isPlainObject(m)?de.merge.call({caseless:_},g,m):de.isPlainObject(m)?de.merge({},m):de.isArray(m)?m.slice():m}function o(g,m,_){if(de.isUndefined(m)){if(!de.isUndefined(g))return n(void 0,g,_)}else return n(g,m,_)}function a(g,m){if(!de.isUndefined(m))return n(void 0,m)}function i(g,m){if(de.isUndefined(m)){if(!de.isUndefined(g))return n(void 0,g)}else return n(void 0,m)}function c(g,m,_){if(_ in t)return n(g,m);if(_ in e)return n(void 0,g)}const p={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:c,headers:(g,m)=>o(lx(g),lx(m),!0)};return de.forEach(Object.keys(Object.assign({},e,t)),function(m){const _=p[m]||o,O=_(e[m],t[m],m);de.isUndefined(O)&&_!==c||(r[m]=O)}),r}const ak=e=>{const t=Fa({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:a,headers:i,auth:c}=t;t.headers=i=Sn.from(i),t.url=ZP(ok(t.baseURL,t.url),e.params,e.paramsSerializer),c&&i.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(enco
Line truncated
|
||||
`+a.map(cx).join(`
|
||||
`):" "+cx(a[0]):"as no adapter specified";throw new Qe("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:gh};function Fp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ol(null,e)}function dx(e){return Fp(e),e.headers=Sn.from(e.headers),e.data=Lp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sk.getAdapter(e.adapter||Ab.adapter)(e).then(function(n){return Fp(e),n.data=Lp.call(e,e.transformResponse,n),n.headers=Sn.from(n.headers),n},function(n){return rk(n)||(Fp(e),n&&n.response&&(n.response.data=Lp.call(e,e.transformResponse,n.response),n.response.headers=Sn.from(n.response.headers))),Promise.reject(n)})}const uk="1.7.5",Mb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mb[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const fx={};Mb.transitional=function(t,r,n){function o(a,i){return"[Axios v"+uk+"] Transitional option '"+a+"'"+i+(n?". "+n:"")}return(a,i,c)=>{if(t===!1)throw new Qe(o(i," has been removed"+(r?" in "+r:"")),Qe.ERR_DEPRECATED);return r&&!fx[i]&&(fx[i]=!0,console.warn(o(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,i,c):!0}};function uV(e,t,r){if(typeof e!="object")throw new Qe("options must be an object",Qe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const a=n[o],i=t[a];if(i){const c=e[a],p=c===void 0||i(c,a,e);if(p!==!0)throw new Qe("option "+a+" must be "+p,Qe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Qe("Unknown option "+a,Qe.ERR_BAD_OPTION)}}const bh={assertOptions:uV,validators:Mb},So=bh.validators;class cd{constructor(t){this.defaults=t,this.interceptors={request:new nx,response:new nx}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
||||
`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Fa(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:a}=r;n!==void 0&&bh.assertOptions(n,{silentJSONParsing:So.transitional(So.boolean),forcedJSONParsing:So.transitional(So.boolean),clarifyTimeoutError:So.transitional(So.boolean)},!1),o!=null&&(de.isFunction(o)?r.paramsSerializer={serialize:o}:bh.assertOptions(o,{encode:So.function,serialize:So.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=a&&de.merge(a.common,a[r.method]);a&&de.forEach(["delete","get","head","post","put","patch","common"],T=>{delete a[T]}),r.headers=Sn.concat(i,a);const c=[];let p=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(r)===!1||(p=p&&x.synchronous,c.unshift(x.fulfilled,x.rejected))});const g=[];this.interceptors.response.forEach(function(x){g.push(x.fulfilled,x.rejected)});let m,_=0,O;if(!p){const T=[dx.bind(this),void 0];for(T.unshift.apply(T,c),T.push.apply(T,g),O=T.length,m=Promise.resolve(r);_<O;)m=m.then(T[_++],T[_++]);return m}O=c.length;let C=r;for(_=0;_<O;){const T=c[_++],x=c[_++];try{C=T(C)}catch(b){x.call(this,b);break}}try{m=dx.call(this,C)}catch(T){return Promise.reject(T)}for(_=0,O=g.length;_<O;)m=m.then(g[_++],g[_++]);return m}getUri(t){t=Fa(this.defaults,t);const r=ok(t.baseURL,t.url);return ZP(r,t.params,t.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(t){cd.prototype[t]=function(r,n){return this.request(Fa(n||{},{method:t,url:r,data:(n||{}).data}))}});de.forEach(["post","put","patch"],function(t){function r(n){return function(a,i,c){return this.request(Fa(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}cd.prototype[t]=r(),cd.prototype[t+"Form"]=r(!0)});const uc=cd;class Ib{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(o=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](o);n._listeners=null}),this.promise.then=o=>{let a;const i=new Promise(c=>{n.subscribe(c),a=c}).then(o);return i.cancel=function(){n.unsubscribe(a)},i},t(function(a,i,c){n.reason||(n.reason=new ol(a,i,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Ib(function(o){t=o}),cancel:t}}}const cV=Ib;function dV(e){return function(r){return e.apply(null,r)}}function fV(e){return de.isObject(e)&&e.isAxiosError===!0}const mh={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(mh).forEach(([e,t])=>{mh[t]=e});const pV=mh;function ck(e){const t=new uc(e),r=BP(uc.prototype.request,t);return de.extend(r,uc.prototype,t,{allOwnKeys:!0}),de.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return ck(Fa(e,o))},r}const Xt=ck(Ab);Xt.Axios=uc;Xt.CanceledError=ol;Xt.CancelToken=cV;Xt.isCancel=rk;Xt.VERSION=uk;Xt.toFormData=of;Xt.AxiosError=Qe;Xt.Cancel=Xt.CanceledError;Xt.all=function(t){return Promise.all(t)};Xt.spread=dV;Xt.isAxiosError=fV;Xt.mergeConfig=Fa;Xt.AxiosHeaders=Sn;Xt.formToJSON=e=>tk(de.isHTMLForm(e)?new FormData(e):e);Xt.getAdapter=sk.getAdapter;Xt.HttpStatusCode=pV;Xt.default=Xt;const Nt=Xt,$n=Object.create(null);$n.open="0";$n.close="1";$n.ping="2";$n.pong="3";$n.message="4";$n.upgrade="5";$n.noop="6";const cc=Object.create(null);Object.keys($n).forEach(e=>{cc[$n[e]]=e});const vh={type:"error",data:"parser error"},dk=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fk=typeof Array
Line truncated
|
||||
${Te?"border-purple-500 ring-1 ring-purple-500/40":"border-transparent"}
|
||||
${!mt||ye?"opacity-75 bg-stormGrey-200/20":""}`,children:[M.jsxs("div",{className:"flex items-center space-x-4",id:"left",children:[M.jsx("input",{type:"checkbox",checked:Te,onChange:()=>Se(ae.Id,!mt),className:`h-5 w-5 text-purple-500 focus:ring-purple-400 border-gray-600 bg-gray-900 rounded ${mt?"":"opacity-40 cursor-not-allowed"}`,disabled:!mt}),M.jsx("div",{className:`w-12 h-12 flex items-center justify-center rounded-full
|
||||
${ae.updateStatus==="✅"?"bg-mossGreen-600":ae.updateStatus==="⚠️"?"bg-warmAmberGlow-400":"bg-sunsetCoral-500"}`}),M.jsxs("div",{children:[M.jsx("p",{className:"text-lg antialiased font-sans font-semibold leading-normal text-inherit",children:ae.Name}),M.jsxs("p",{className:"text-sm antialiased font-sans font-light leading-normal text-inherit",children:["ID: ",ae.Id]}),ae.duplicateName&&M.jsx("p",{className:"text-xs text-amber-700",children:"⚠️ Doppelter Name erkannt"})]})]}),M.jsx("div",{className:"ml-auto flex flex-col items-end gap-1 text-sm",id:"right",children:Re?M.jsxs(M.Fragment,{children:[M.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-warmAmberGlow-600",children:"Redeploy"}),M.jsx("span",{className:"text-warmAmberGlow-500",children:"läuft…"})]}):Ae?M.jsxs(M.Fragment,{children:[M.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-warmAmberGlow-600",children:"Redeploy"}),M.jsx("span",{className:"text-warmAmberGlow-500",children:"in Warteliste…"})]}):bt?M.jsxs(M.Fragment,{children:[M.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-stormGrey-500",children:"System"}),M.jsx("span",{className:"text-gray-300",children:"Redeploy deaktiviert"})]}):$e?M.jsxs(M.Fragment,{children:[M.jsx("span",{className:"antialiased font-sans font-light leading-normal text-xs uppercase tracking-wide text-stormGrey-500",children:"Status"}),M.jsx("span",{className:"text-mossGreen-600",children:"Aktuell"})]}):M.jsx(pe.Button,{onClick:()=>qe(ae.Id),disabled:ye,className:"disabled:opacity-50 disabled:cursor-not-allowed",children:"Redeploy"})})]})},ae.Id)})}),M.jsx(Pk,{disabled:r||!!o})]})}const wz={idle:"Bereit",running:"Läuft",success:"Erfolgreich",error:"Fehlgeschlagen"},El={idle:"bg-stormGrey-700 text-gray-200",running:"bg-arcticBlue-600 text-white",success:"bg-mossGreen-600 text-white",error:"bg-sunsetCoral-600 text-white"},xz={initializing:"Vorbereitung","activating-maintenance":"Wartungsmodus aktivieren","executing-script":"Skript wird ausgeführt",waiting:"Warte auf Portainer",completed:"Abgeschlossen",failed:"Fehlgeschlagen"},_z={info:"text-arcticBlue-700",success:"text-mossGreen-700",warning:"text-warmAmberGlow-700",error:"text-sunsetCoral-700",stdout:"text-stormGrey-700",stderr:"text-warmAmberGlow-700",debug:"text-lavenderSmoke-700"},Tz=e=>{if(!e)return"-";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString("de-DE",{hour:"2-digit",minute:"2-digit",second:"2-digit"})},ma=e=>{if(!e&&e!==0)return"-";const r=(n=>{if(n instanceof Date)return n;if(typeof n=="number"){const o=n>1e12?n:n*1e3;return new Date(o)}if(typeof n=="string"){const o=Number(n);if(!Number.isNaN(o)){const a=o>1e12?o:o*1e3;return new Date(a)}return new Date(n)}return null})(e);return!r||Number.isNaN(r.getTime())?String(e):r.toLocaleString("de-DE",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})},wx=e=>e===1?"Git":e===2?"Compose":e??"-",Up=()=>({host:"",port:"22",username:"",password:"",extraSshArgs:""});function Cz(){var An,bo,da;const{showToast:e}=Bb(),{maintenance:t,update:r,script:n,ssh:o,loading:a,error:i,setMaintenanceMode:c,triggerUpdate:p,saveScript:g,resetScript:m,saveSshConfig:_,deleteSshConfig:O,testSshConnection:C,fetchSuperuserStatus:T,removeSuperuserAccount:x}=Wb(),b=!!(t!=null&&t.active),d=t==null?void 0:t.message,l=(An=t==null?void 0:t.extra)==null?void 0:An.type,u=!!(r!=null&&r.running),[s,h]=j.useState(""),[v,y]=j.useState(!1),[E,P]=j.useState(!1),[k,R]=j.useState(""),[A,D]=j.useState(!1),[L,W]=j.useState(()=>Up()),[G,X]=j.useState(!1),[$,B]=j.useState(!1),[U,K]=j.useState(!1),[Q,ne]=j.useState(!1),[le,ce]=j.useState(!1),[re,me]=j.useState(null);j.useEffect(()=>{if(!n)return;const ve=n.custom??n.default??n.effective??"";h(ve)},[n]),j.useEffect(()=>{if(!o){W(Up()),X(!1),B(!1),me(null);return}W({host:o.host??"",port:String(o.port??"22"),username:o.username??"",password:"",extraSshArgs:Array.isArray(o.extraSshArgs)?o.extraSshArgs.join(`
|
||||
`):""}),X(!!o.passwordStored),B(!1),me(null)},[o]);const fe=j.useMemo(()=>n?n.source==="custom"&&typeof n.custom=="string"?n.custom:n.default??n.effective??"":"",[n]),ie=n?s!==fe:!1,he=(n==null?void 0:n.source)==="custom"?"Benutzerdefiniert":"Standard",[ue,Se]=j.useState(!0),[Ce,Oe]=j.useState(!1),[_e,Me]=j.useState(null),[qe,at]=j.useState(""),[it,nt]=j.useState(!1),[ft,vt]=j.useState([]),[yt,Ke]=j.useState(!0),[ae,be]=j.useState(""),[Ae,Re]=j.useState(!1),[ye,Te]=j.useState(null),[$e,bt]=j.useState(null),mt=j.useRef(null),[Xe,tt]=j.useState(null),[Gt,vr]=j.useState(!0),[Wt,Fr]=j.useState(""),[oe,ge]=j.useState(!1),[ke,Je]=j.useState(null),et=j.useRef(null),ct=j.useCallback(async({silent:ve=!1}={})=>{var Be,Ie;Se(!0),at("");try{const Le=await T(),ot=!!(Le!=null&&Le.exists);Oe(ot),Me(ot?Le.user??null:null)}catch(Le){const ot=((Ie=(Be=Le.response)==null?void 0:Be.data)==null?void 0:Ie.error)||Le.message||"Superuser-Status konnte nicht geladen werden";Oe(!1),Me(null),at(ot),ve||e({variant:"error",title:"Statusabfrage fehlgeschlagen",description:ot})}finally{Se(!1)}},[T,e]),lt=j.useCallback(async({silent:ve=!1}={})=>{if(et.current)return et.current;const Be=(async()=>{var Ie,Le;ve?ge(!0):vr(!0),Fr("");try{const $t=(await Nt.get("/api/maintenance/portainer-status")).data??{};tt($t),Je(new Date)}catch(ot){const $t=((Le=(Ie=ot.response)==null?void 0:Ie.data)==null?void 0:Le.error)||ot.message||"Fehler beim Prüfen des Portainer-Status";Fr($t),e({variant:"error",title:"Statusaktualisierung fehlgeschlagen",description:$t})}finally{ve?ge(!1):vr(!1),et.current=null}})();return et.current=Be,Be},[e]),Tt=j.useCallback(async({silent:ve=!1}={})=>{if(b||u){vt([]),be("Wartungsmodus aktiv – Duplikat-Verwaltung ist vorübergehend deaktiviert."),Ke(!1),Re(!1);return}if(mt.current)return mt.current;const Be=(async()=>{var Ie,Le,ot;ve?Re(!0):Ke(!0),be("");try{const Dt=(await Nt.get("/api/maintenance/duplicates")).data,yr=Array.isArray(Dt)?Dt:(Dt==null?void 0:Dt.items)??[];vt(yr),bt(new Date)}catch($t){if(((Ie=$t.response)==null?void 0:Ie.status)===423){const Dt="Wartungsmodus aktiv – Duplikat-Verwaltung ist vorübergehend deaktiviert.";vt([]),be(Dt),e({variant:"warning",title:"Duplikat-Verwaltung gesperrt",description:Dt})}else{const Dt=((ot=(Le=$t.response)==null?void 0:Le.data)==null?void 0:ot.error)||$t.message||"Fehler beim Laden der Wartungsdaten";be(Dt),e({variant:"error",title:"Duplikate konnten nicht geladen werden",description:Dt})}}finally{ve?Re(!1):Ke(!1),mt.current=null}})();return mt.current=Be,Be},[b,u,e]);j.useEffect(()=>{ct({silent:!0})},[ct]),j.useEffect(()=>{lt()},[lt]),j.useEffect(()=>{Tt()},[Tt]);const Ht=j.useMemo(()=>{const ve=Array.isArray(ft)?ft.length:0,Be=Array.isArray(ft)?ft.reduce((Ie,Le)=>{var ot;return Ie+(((ot=Le==null?void 0:Le.duplicates)==null?void 0:ot.length)||0)},0):0;return{groups:ve,duplicateCount:Be}},[ft]),pn=j.useCallback((ve,Be)=>{W(Ie=>({...Ie,[ve]:Be})),ve==="password"&&X(!1)},[]),cr=j.useMemo(()=>{const ve={host:L.host.trim(),port:Number.parseInt(L.port,10)||22,username:L.username.trim(),extraSshArgs:(L.extraSshArgs||"").split(/\r?\n/).map(Ie=>Ie.trim()).filter(Boolean)},Be=L.password??"";return Be?ve.password=Be:G||(ve.password=""),ve},[L,G]),uo=j.useCallback(async()=>{var ve,Be;if(n)try{y(!0),await g(s),e({variant:"success",title:"Skript gespeichert",description:"Das benutzerdefinierte Portainer-Update-Skript wurde aktualisiert."})}catch(Ie){const Le=((Be=(ve=Ie.response)==null?void 0:ve.data)==null?void 0:Be.error)||Ie.message||"Skript konnte nicht gespeichert werden";e({variant:"error",title:"Speichern fehlgeschlagen",description:Le})}finally{y(!1)}},[g,s,n,e]),co=j.useCallback(async()=>{var ve,Be;try{y(!0),await m(),e({variant:"info",title:"Standardskript wiederhergestellt",description:"Es wird wieder das Standard-Update-Skript verwendet."})}catch(Ie){const Le=((Be=(ve=Ie.response)==null?void 0:ve.data)==null?void 0:Be.error)||Ie.message||"Standardskript konnte nicht wiederhergestellt werden";e({variant:"error",title:"Zurücksetzen fehlgeschlagen",description:Le})}finally{y(!1)}},[m,e]),Ka=j.useCallback(async()=>{var ve,Be;try{K(!0),await _(cr),me(null),B(!1),e({variant:"success",title:"SSH-Konfiguration gespeichert",description:"Verbindungseinstellungen wurden aktualisiert."})}catch(Ie){const Le=((Be=(ve=Ie.response)==null?void 0:ve.data)==null?void 0:Be.error)||Ie.message||"SSH-Konfiguration konnte nicht gespeichert werden";e({variant:"error",title:"Speichern fehlgeschlagen",description:Le})}finally{K(!1)}},[cr,_,e]),fo=j.useCallback(async()=>{var ve,Be;try{ne(!0);const Ie=await C(cr);me({success:!0,timestamp:new Date,details:Ie==null?void 0:Ie.result}),e({variant:"success",title:"SSH-Verbindung erfolgreich",description:"Verbindung zum Portainer-Host wurde hergestellt."})}catch(Ie){const Le=((Be=(ve=Ie.response)==null?void 0:ve.data)==null?void 0:Be.error)||Ie.message||"SSH-Verbindung fehlgeschlagen";me({success:!1,timestamp:new Date,error:Le}),e({variant:"error",title:"
Line truncated
|
||||
Dies setzt die Superuser-Einrichtung zurück.`)))try{nt(!0);const Le=await x(),ot=Number((Le==null?void 0:Le.usersRemoved)??0);e({variant:"success",title:"Superuser gelöscht",description:ot>1?`${ot} Konten aus der Superuser-Gruppe wurden entfernt.`:"Superuser-Konto wurde entfernt."}),await ct({silent:!0})}catch(Le){if(((ve=Le.response)==null?void 0:ve.status)===404)await ct({silent:!0}),e({variant:"info",title:"Kein Superuser vorhanden",description:"Es ist kein Superuser mehr vorhanden."});else{const $t=((Ie=(Be=Le.response)==null?void 0:Be.data)==null?void 0:Ie.error)||Le.message||"Superuser konnte nicht gelöscht werden";e({variant:"error",title:"Löschen fehlgeschlagen",description:$t})}}finally{nt(!1)}},[it,ue,Ce,x,ct,e]),na=j.useCallback(async ve=>{var Be,Ie;if(!(a||A)&&ve!==b){if(u){e({variant:"warning",title:"Aktion nicht möglich",description:"Während eines laufenden Updates kann der Wartungsmodus nicht geändert werden."});return}D(!0);try{const Le=ve&&!!l,ot={active:ve};Le&&d?ot.message=d:ot.message=null,await c(ot),e({variant:ve?"info":"success",title:ve?"Wartungsmodus aktiviert":"Wartungsmodus deaktiviert",description:ve?"Benutzer sehen jetzt die Wartungsseite.":"StackPulse steht wieder zur Verfügung."})}catch(Le){const ot=((Ie=(Be=Le.response)==null?void 0:Be.data)==null?void 0:Ie.error)||Le.message||"Wartungsmodus konnte nicht geändert werden";e({variant:"error",title:"Änderung fehlgeschlagen",description:ot})}finally{D(!1)}}},[a,A,b,u,c,d,l,e]),ll=j.useCallback(async()=>{var Be,Ie;if(b||u){e({variant:"warning",title:"Update nicht möglich",description:"Während eines aktiven Wartungsmodus kann kein weiteres Update gestartet werden."});return}const ve=(Xe==null?void 0:Xe.latestVersion)??(Xe==null?void 0:Xe.currentVersion)??"unbekannt";if(!(typeof window<"u"&&!window.confirm(`Portainer-Update starten?
|
||||
Zielversion: ${ve}.
|
||||
Während des Updates befindet sich StackPulse im Wartungsmodus.
|
||||
Fortfahren?`)))try{R(""),P(!0),await p(),e({variant:"info",title:"Update gestartet",description:"Das Portainer-Update wurde gestartet."})}catch(Le){const ot=((Ie=(Be=Le.response)==null?void 0:Be.data)==null?void 0:Ie.error)||Le.message||"Portainer-Update konnte nicht gestartet werden";R(ot),e({variant:"error",title:"Update fehlgeschlagen",description:ot})}finally{P(!1)}},[b,u,Xe,p,e]),oa=j.useCallback(async ve=>{var ot,$t,Dt,yr;if(!ve)return;if(b||u){e({variant:"warning",title:"Aktion nicht möglich",description:"Während des Wartungsmodus sind Bereinigungen deaktiviert."});return}const Be=(ot=ve.canonical)==null?void 0:ot.Id;if(!Be)return;const Ie=(ve.duplicates||[]).map(st=>st.Id).filter(Boolean);if(!Ie.length)return;const Le=(($t=ve.canonical)==null?void 0:$t.Name)||ve.name||`Stack ${Be}`;if(!(typeof window<"u"&&!window.confirm(`Bereinigung für "${Le}" starten?
|
||||
Es werden ${Ie.length} Duplikate entfernt: ${Ie.join(", ")}`))){Te(String(Be));try{const Ct=(await Nt.post("/api/maintenance/duplicates/cleanup",{canonicalId:Be,duplicateIds:Ie})).data??{};if(Ct.success===!1)throw new Error(Ct.error||"Bereinigung fehlgeschlagen");const Pt=Array.isArray(Ct.results)?Ct.results.filter(Pr=>Pr.status==="deleted").map(Pr=>Pr.id):Ie;e({variant:"success",title:"Bereinigung abgeschlossen",description:`${Le} – entfernte IDs: ${Pt.join(", ")}`}),await Tt({silent:!0})}catch(st){const Ct=((yr=(Dt=st.response)==null?void 0:Dt.data)==null?void 0:yr.error)||st.message||"Bereinigung fehlgeschlagen";e({variant:"error",title:"Bereinigung fehlgeschlagen",description:Ct})}finally{Te(null)}}},[Tt,b,e,u]);t!=null&&t.activatedAt&&ma(t.activatedAt),t!=null&&t.updatedAt&&ma(t.updatedAt);const Vr=b||u,aa=(r==null?void 0:r.status)??(u?"running":"idle"),Sr=wz[aa]??aa,po=El[aa]??El.idle,ia=r!=null&&r.stage?xz[r.stage]??r.stage:"–",ho=(r==null?void 0:r.logs)??[],Ya=(r==null?void 0:r.targetVersion)??"-",la=(r==null?void 0:r.resultVersion)??"-",sa=r!=null&&r.startedAt?ma(r.startedAt):"-",ua=r!=null&&r.finishedAt?ma(r.finishedAt):"-",go=(r==null?void 0:r.message)??(u?"Update läuft…":""),ca=u||v||a;return M.jsxs("div",{className:"mt-12 mb-8 flex flex-col gap-12",children:[(b||u)&&M.jsx("div",{className:"rounded-lg border border-cyan-500/60 bg-cyan-900/30 px-4 py-3 text-sm text-bluegray-100",children:M.jsxs("div",{className:"flex flex-col gap-1",children:[M.jsxs("span",{children:["Wartungsmodus aktiv",d?` – ${d}`:u?" – Portainer-Update läuft":"","."]}),u&&M.jsxs("span",{className:"text-xs text-indigo-900",children:["Phase: ",ia]})]})}),M.jsxs(pe.Card,{children:[M.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:M.jsx(pe.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:M.jsx("span",{children:"Wartungsmodus"})})}),M.jsxs(pe.CardBody,{className:"flex flex-col gap-4 p-4",children:[M.jsxs("div",{className:"flex items-start justify-between gap-4",children:[M.jsx("div",{className:"space-y-1",children:M.jsx("p",{className:"text-sm antialiased font-sans text-sm font-light leading-normal text-inherit",children:"Schaltet StackPulse für Benutzer in den Wartungsmodus."})}),M.jsx(pe.Switch,{checked:b,disabled:A||a||u,onChange:ve=>na(ve.target.checked),ripple:!1,color:"amber"})]}),A&&M.jsx("p",{className:"text-xs text-stormGrey-500",children:"Wartungsmodus wird aktualisiert…"})]})]}),M.jsxs(pe.Card,{children:[M.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:M.jsx(pe.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:M.jsx("span",{children:"Superuser"})})}),M.jsxs(pe.CardBody,{className:"flex flex-col gap-4 p-4",children:[M.jsxs("div",{className:"space-y-2",children:[ue&&M.jsx("p",{className:"text-sm text-stormGrey-500",children:"Status wird geladen…"}),!ue&&qe&&M.jsx("p",{className:"text-sm text-sunsetCoral-600",children:qe}),!ue&&!qe&&Ce&&M.jsxs("div",{className:"space-y-1",children:[M.jsx("p",{className:"text-sm",children:"Superuser ist angelegt."}),M.jsxs("p",{className:"text-xs text-stormGrey-500",children:["Benutzername: ",M.jsx("span",{className:"font-medium text-stormGrey-900",children:(_e==null?void 0:_e.username)??"unbekannt"}),_e!=null&&_e.email?` - ${_e.email}`:""]})]}),!ue&&!qe&&!Ce&&M.jsx("p",{className:"text-sm",children:"Es ist kein Superuser vorhanden."})]}),M.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[M.jsx(pe.Button,{variant:"outlined",color:"gray",onClick:()=>ct(),disabled:ue||it,className:"w-full sm:w-auto",children:"Status aktualisieren"}),M.jsx(pe.Button,{color:"red",onClick:il,disabled:ue||it||!Ce,className:"w-full sm:w-auto",children:it?"Wird gelöscht…":"Superuser löschen"})]}),M.jsx("p",{className:"text-xs text-stormGrey-500",children:"Entfernt das Superuser-Konto samt zugehöriger Gruppe. Danach kann der Erstbenutzer bei Bedarf erneut angelegt werden."})]})]}),M.jsxs(pe.Card,{children:[M.jsx(pe.CardHeader,{variant:"gradient",color:"gray",className:"mb-5 p-4",children:M.jsx(pe.Typography,{variant:"h6",color:"white",className:"flex items-center justify-between",children:M.jsx("span",{children:"Portainer"})})}),M.jsxs(pe.CardBody,{className:"flex flex-col gap-4 p-4 pt-0",children:[M.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[M.jsxs("div",{children:[M.jsx("h2",{className:"block antialiased font-sans text-lg font-semibold",children:"Portainer Status"}),M.jsx("p",{className:"block antialiased font-sans text-sm font-light leading-normal text-inherit",children:Gt?"Status wird geprüft…":Wt||(u?"Portainer wird aktuell aktualisiert.":(Xe==null?void 0:Xe.updateAvailable)===!0?"Es ist ein Update für Portainer verfügbar.":"Portainer ist auf dem aktuellen Stand.")}),ke&&!Gt&&M.jsxs("p",{className:"mt-1 text-xs text-stormG
Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#eee}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Roboto,sans-serif;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#bdbdbd}input::placeholder,textarea::placeholder{opacity:1;color:#bdbdbd}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(33 150 243 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(33 150 243 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 540px){.container{max-width:540px}}@media (min-width: 720px){.container{max-width:720px}}@media (min-width: 960px){.container{max-width:960px}}@media (min-width: 1140px){.container{max-width:1140px}}@media (min-width: 1320px){.container{max-width:1320px}}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.\!invisible{visibility:hidden!important}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bLine truncated
|
||||
@@ -32,8 +32,8 @@
|
||||
<!-- Nepcha Analytics (nepcha.com) -->
|
||||
<!-- Nepcha is a easy-to-use web analytics. No cookies and fully compliant with GDPR, CCPA and PECR. -->
|
||||
<script defer data-site="YOUR_DOMAIN_HERE" src="https://api.nepcha.com/js/nepcha-analytics.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-4797da57.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-53559ba1.css">
|
||||
<script type="module" crossorigin src="/assets/index-61a55789.js"></script>
|
||||
<link rel="stylesheet" href="/assets/index-8ee0592b.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -13,6 +13,10 @@ services:
|
||||
PORTAINER_API_KEY: "Your_Portainer_API_Key"
|
||||
PORTAINER_ENDPOINT_ID: "Your_Portainer_Endpoint_ID"
|
||||
SELF_STACK_ID: "Stackpulse ID"
|
||||
SUPERUSER_USERNAME: "Your_Superuser_Username" (optional)
|
||||
SUPERUSER_EMAIL: "Your_Superuser_Email" (optional)
|
||||
SUPERUSER_PASSWORD: "Your_Superuser_Password" (optional)
|
||||
SELF_STACK_ID: "Your_StackPulse_Stack_ID"
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
|
||||
@@ -131,6 +131,16 @@ export default function MaintenanceProvider({ children }) {
|
||||
return response.data;
|
||||
}, []);
|
||||
|
||||
const fetchSuperuserStatus = useCallback(async () => {
|
||||
const response = await axios.get("/api/auth/superuser/status");
|
||||
return response.data ?? { exists: false, user: null };
|
||||
}, []);
|
||||
|
||||
const removeSuperuserAccount = useCallback(async () => {
|
||||
const response = await axios.delete("/api/auth/superuser");
|
||||
return response.data ?? { success: false };
|
||||
}, []);
|
||||
|
||||
const value = useMemo(() => ({
|
||||
maintenance: state.maintenance,
|
||||
update: state.update,
|
||||
@@ -147,8 +157,10 @@ export default function MaintenanceProvider({ children }) {
|
||||
resetScript,
|
||||
saveSshConfig,
|
||||
deleteSshConfig,
|
||||
testSshConnection
|
||||
}), [state, fetchConfig, refreshUpdateStatus, setMaintenanceMode, triggerUpdate, saveScript, resetScript, saveSshConfig, deleteSshConfig, testSshConnection]);
|
||||
testSshConnection,
|
||||
fetchSuperuserStatus,
|
||||
removeSuperuserAccount
|
||||
}), [state, fetchConfig, refreshUpdateStatus, setMaintenanceMode, triggerUpdate, saveScript, resetScript, saveSshConfig, deleteSshConfig, testSshConnection, fetchSuperuserStatus, removeSuperuserAccount]);
|
||||
|
||||
return (
|
||||
<MaintenanceContext.Provider value={value}>
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
} from "@heroicons/react/24/solid";
|
||||
import { Navbar, Footer } from "@/widgets/layout";
|
||||
import routes from "@/routes";
|
||||
import { RegSuperuser } from "@/pages/auth/regsuperuser";
|
||||
|
||||
export function Auth() {
|
||||
const navbarRoutes = [
|
||||
@@ -35,6 +36,7 @@ export function Auth() {
|
||||
return (
|
||||
<div className="relative min-h-screen w-full">
|
||||
<Routes>
|
||||
<Route path="/regsuperuser" element={<RegSuperuser />} />
|
||||
{routes.map(
|
||||
({ layout, pages }) =>
|
||||
layout === "auth" &&
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Routes, Route } from "react-router-dom";
|
||||
import { useEffect, useState, useCallback } from "react";
|
||||
import { Routes, Route, useLocation, useNavigate } from "react-router-dom";
|
||||
import { Cog6ToothIcon } from "@heroicons/react/24/solid";
|
||||
import { IconButton } from "@material-tailwind/react";
|
||||
import {
|
||||
@@ -13,6 +14,58 @@ import { useMaterialTailwindController, setOpenConfigurator } from "@/components
|
||||
export function Dashboard() {
|
||||
const [controller, dispatch] = useMaterialTailwindController();
|
||||
const { sidenavType } = controller;
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
const [superuserRequired, setSuperuserRequired] = useState(false);
|
||||
const [statusChecked, setStatusChecked] = useState(false);
|
||||
|
||||
const checkSuperuserStatus = useCallback(async () => {
|
||||
setStatusChecked(false);
|
||||
try {
|
||||
const response = await fetch("/api/auth/superuser/status");
|
||||
if (!response.ok) {
|
||||
throw new Error("STATUS_REQUEST_FAILED");
|
||||
}
|
||||
const data = await response.json();
|
||||
setSuperuserRequired(!data.exists);
|
||||
} catch (error) {
|
||||
console.error("⚠️ [Superuser] Statusprüfung fehlgeschlagen:", error);
|
||||
setSuperuserRequired(true);
|
||||
} finally {
|
||||
setStatusChecked(true);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
checkSuperuserStatus();
|
||||
}, [checkSuperuserStatus]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!statusChecked) return;
|
||||
if (superuserRequired) {
|
||||
if (location.pathname !== "/auth/regsuperuser") {
|
||||
navigate("/auth/regsuperuser", { replace: true });
|
||||
}
|
||||
} else if (location.pathname === "/auth/regsuperuser") {
|
||||
navigate("/dashboard/stacks", { replace: true });
|
||||
}
|
||||
}, [superuserRequired, statusChecked, location.pathname, navigate]);
|
||||
|
||||
if (!statusChecked) {
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center bg-blue-gray-50/50">
|
||||
<span className="text-blue-gray-500">Lade Systemstatus ...</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (superuserRequired) {
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center bg-blue-gray-50/50">
|
||||
<span className="text-blue-gray-500">Superuser-Einrichtung erforderlich ...</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-blue-gray-50/50">
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
export * from "@/pages/auth/sign-in";
|
||||
export * from "@/pages/auth/sign-up";
|
||||
export * from "@/pages/auth/regsuperuser";
|
||||
@@ -0,0 +1,190 @@
|
||||
import PropTypes from "prop-types";
|
||||
import { useEffect, useState } from "react";
|
||||
import {
|
||||
Card,
|
||||
CardHeader,
|
||||
CardBody,
|
||||
Typography,
|
||||
Input,
|
||||
Button,
|
||||
Alert,
|
||||
} from "@material-tailwind/react";
|
||||
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
export function RegSuperuser({ onCompleted }) {
|
||||
const navigate = useNavigate();
|
||||
const [checkingStatus, setCheckingStatus] = useState(true);
|
||||
const [form, setForm] = useState({
|
||||
username: "",
|
||||
email: "",
|
||||
password: "",
|
||||
});
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState(null);
|
||||
const [success, setSuccess] = useState(false);
|
||||
|
||||
const handleChange = (field) => (event) => {
|
||||
setForm((prev) => ({ ...prev, [field]: event.target.value }));
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
let isActive = true;
|
||||
const controller = new AbortController();
|
||||
|
||||
const verifyStatus = async () => {
|
||||
try {
|
||||
const response = await fetch("/api/auth/superuser/status", { signal: controller.signal });
|
||||
if (!response.ok) {
|
||||
throw new Error("STATUS_REQUEST_FAILED");
|
||||
}
|
||||
const data = await response.json();
|
||||
if (data.exists && isActive) {
|
||||
navigate("/dashboard/stacks", { replace: true });
|
||||
}
|
||||
} catch (err) {
|
||||
if (err.name !== "AbortError") {
|
||||
console.error("⚠️ [Superuser] Statusabfrage fehlgeschlagen:", err);
|
||||
}
|
||||
} finally {
|
||||
if (isActive) {
|
||||
setCheckingStatus(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
verifyStatus();
|
||||
|
||||
return () => {
|
||||
isActive = false;
|
||||
controller.abort();
|
||||
};
|
||||
}, [navigate]);
|
||||
|
||||
const handleSubmit = async (event) => {
|
||||
event.preventDefault();
|
||||
if (loading) return;
|
||||
|
||||
setLoading(true);
|
||||
setError(null);
|
||||
setSuccess(false);
|
||||
|
||||
try {
|
||||
const response = await fetch("/api/auth/superuser/register", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify(form),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
const payload = await response.json().catch(() => ({}));
|
||||
switch (payload.error) {
|
||||
case "MISSING_FIELDS":
|
||||
throw new Error("Bitte alle Felder ausfüllen.");
|
||||
case "USERNAME_REQUIRED":
|
||||
throw new Error("Benutzername darf nicht leer sein.");
|
||||
case "EMAIL_INVALID":
|
||||
throw new Error("Bitte eine gültige E-Mail-Adresse angeben.");
|
||||
case "PASSWORD_TOO_SHORT":
|
||||
throw new Error("Passwort muss mindestens 8 Zeichen enthalten.");
|
||||
case "SUPERUSER_EXISTS":
|
||||
throw new Error("Superuser existiert bereits.");
|
||||
default:
|
||||
throw new Error("Registrierung fehlgeschlagen. Bitte erneut versuchen.");
|
||||
}
|
||||
}
|
||||
|
||||
setSuccess(true);
|
||||
if (typeof onCompleted === "function") {
|
||||
onCompleted();
|
||||
} else {
|
||||
navigate("/dashboard/stacks", { replace: true });
|
||||
}
|
||||
} catch (err) {
|
||||
setError(err.message || "Unbekannter Fehler");
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
if (checkingStatus) {
|
||||
return (
|
||||
<div className="flex min-h-screen items-center justify-center bg-blue-gray-50/50">
|
||||
<span className="text-blue-gray-500">Pruefe Superuser-Status ...</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen w-full items-center justify-center py-10">
|
||||
<Card className="w-full max-w-lg border border-blue-gray-100 shadow-sm">
|
||||
<CardHeader
|
||||
floated={false}
|
||||
shadow={false}
|
||||
className="mb-0 grid place-items-start gap-2 rounded-none bg-transparent p-6"
|
||||
>
|
||||
<Typography variant="h4" color="blue-gray">
|
||||
Superuser anlegen
|
||||
</Typography>
|
||||
<Typography color="gray" className="font-normal">
|
||||
Lege den ersten Benutzer deines Systems an. Dieser verfügt über uneingeschränkte Rechte
|
||||
und kann später weitere Benutzer verwalten.
|
||||
</Typography>
|
||||
</CardHeader>
|
||||
<CardBody className="pt-0">
|
||||
<form className="mt-4 flex flex-col gap-6" onSubmit={handleSubmit}>
|
||||
<Input
|
||||
label="Benutzername"
|
||||
value={form.username}
|
||||
onChange={handleChange("username")}
|
||||
required
|
||||
disabled={loading || success}
|
||||
/>
|
||||
<Input
|
||||
label="E-Mail-Adresse"
|
||||
type="email"
|
||||
value={form.email}
|
||||
onChange={handleChange("email")}
|
||||
required
|
||||
disabled={loading || success}
|
||||
/>
|
||||
<Input
|
||||
label="Passwort"
|
||||
type="password"
|
||||
value={form.password}
|
||||
onChange={handleChange("password")}
|
||||
required
|
||||
disabled={loading || success}
|
||||
/>
|
||||
|
||||
{error && (
|
||||
<Alert color="red" className="border border-red-200 bg-red-50 text-red-700">
|
||||
{error}
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
{success && (
|
||||
<Alert color="green" className="border border-green-200 bg-green-50 text-green-700">
|
||||
Superuser wurde erfolgreich angelegt. Du wirst gleich weitergeleitet.
|
||||
</Alert>
|
||||
)}
|
||||
|
||||
<Button type="submit" color="blue" disabled={loading || success}>
|
||||
{loading ? "Wird angelegt..." : "Superuser erstellen"}
|
||||
</Button>
|
||||
</form>
|
||||
</CardBody>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
RegSuperuser.propTypes = {
|
||||
onCompleted: PropTypes.func,
|
||||
};
|
||||
|
||||
RegSuperuser.defaultProps = {
|
||||
onCompleted: undefined,
|
||||
};
|
||||
|
||||
export default RegSuperuser;
|
||||
@@ -13,27 +13,27 @@ export function SignIn() {
|
||||
<section className="m-8 flex gap-4">
|
||||
<div className="w-full lg:w-3/5 mt-24">
|
||||
<div className="text-center">
|
||||
<Typography variant="h2" className="font-bold mb-4">Sign In</Typography>
|
||||
<Typography variant="paragraph" color="blue-gray" className="text-lg font-normal">Enter your email and password to Sign In.</Typography>
|
||||
<Typography variant="h2" className="font-bold mb-4">Anmelden</Typography>
|
||||
<Typography variant="paragraph" color="blue-gray" className="text-lg font-normal">Geben Sie Ihre eMail oder Ihren Benutzernamen und Ihr Passwort ein, um sich anzumelden.</Typography>
|
||||
</div>
|
||||
<form className="mt-8 mb-2 mx-auto w-80 max-w-screen-lg lg:w-1/2">
|
||||
<div className="mb-1 flex flex-col gap-6">
|
||||
<Typography variant="small" color="blue-gray" className="-mb-3 font-medium">
|
||||
Your email
|
||||
eMail oder Benutzername
|
||||
</Typography>
|
||||
<Input
|
||||
size="lg"
|
||||
placeholder="name@mail.com"
|
||||
placeholder="eMail oder Benutzername"
|
||||
className=" !border-t-blue-gray-200 focus:!border-t-gray-900"
|
||||
labelProps={{
|
||||
className: "before:content-none after:content-none",
|
||||
}}
|
||||
/>
|
||||
<Typography variant="small" color="blue-gray" className="-mb-3 font-medium">
|
||||
Password
|
||||
Passwort
|
||||
</Typography>
|
||||
<Input
|
||||
type="password"
|
||||
type="passwort"
|
||||
size="lg"
|
||||
placeholder="********"
|
||||
className=" !border-t-blue-gray-200 focus:!border-t-gray-900"
|
||||
@@ -42,73 +42,20 @@ export function SignIn() {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<Checkbox
|
||||
label={
|
||||
<Typography
|
||||
variant="small"
|
||||
color="gray"
|
||||
className="flex items-center justify-start font-medium"
|
||||
>
|
||||
I agree the
|
||||
<a
|
||||
href="#"
|
||||
className="font-normal text-black transition-colors hover:text-gray-900 underline"
|
||||
>
|
||||
Terms and Conditions
|
||||
</a>
|
||||
</Typography>
|
||||
}
|
||||
containerProps={{ className: "-ml-2.5" }}
|
||||
/>
|
||||
<Button className="mt-6" fullWidth>
|
||||
Sign In
|
||||
Anmelden
|
||||
</Button>
|
||||
|
||||
<div className="flex items-center justify-between gap-2 mt-6">
|
||||
<Checkbox
|
||||
label={
|
||||
<Typography
|
||||
variant="small"
|
||||
color="gray"
|
||||
className="flex items-center justify-start font-medium"
|
||||
>
|
||||
Subscribe me to newsletter
|
||||
</Typography>
|
||||
}
|
||||
containerProps={{ className: "-ml-2.5" }}
|
||||
/>
|
||||
<Typography variant="small" className="font-medium text-gray-900">
|
||||
<a href="#">
|
||||
Forgot Password
|
||||
</a>
|
||||
</Typography>
|
||||
</div>
|
||||
<div className="space-y-4 mt-8">
|
||||
<Button size="lg" color="white" className="flex items-center gap-2 justify-center shadow-md" fullWidth>
|
||||
<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g clipPath="url(#clip0_1156_824)">
|
||||
<path d="M16.3442 8.18429C16.3442 7.64047 16.3001 7.09371 16.206 6.55872H8.66016V9.63937H12.9813C12.802 10.6329 12.2258 11.5119 11.3822 12.0704V14.0693H13.9602C15.4741 12.6759 16.3442 10.6182 16.3442 8.18429Z" fill="#4285F4" />
|
||||
<path d="M8.65974 16.0006C10.8174 16.0006 12.637 15.2922 13.9627 14.0693L11.3847 12.0704C10.6675 12.5584 9.7415 12.8347 8.66268 12.8347C6.5756 12.8347 4.80598 11.4266 4.17104 9.53357H1.51074V11.5942C2.86882 14.2956 5.63494 16.0006 8.65974 16.0006Z" fill="#34A853" />
|
||||
<path d="M4.16852 9.53356C3.83341 8.53999 3.83341 7.46411 4.16852 6.47054V4.40991H1.51116C0.376489 6.67043 0.376489 9.33367 1.51116 11.5942L4.16852 9.53356Z" fill="#FBBC04" />
|
||||
<path d="M8.65974 3.16644C9.80029 3.1488 10.9026 3.57798 11.7286 4.36578L14.0127 2.08174C12.5664 0.72367 10.6469 -0.0229773 8.65974 0.000539111C5.63494 0.000539111 2.86882 1.70548 1.51074 4.40987L4.1681 6.4705C4.8001 4.57449 6.57266 3.16644 8.65974 3.16644Z" fill="#EA4335" />
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_1156_824">
|
||||
<rect width="16" height="16" fill="white" transform="translate(0.5)" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
<span>Sign in With Google</span>
|
||||
</Button>
|
||||
<Button size="lg" color="white" className="flex items-center gap-2 justify-center shadow-md" fullWidth>
|
||||
<img src="/img/twitter-logo.svg" height={24} width={24} alt="" />
|
||||
<span>Sign in With Twitter</span>
|
||||
</Button>
|
||||
</div>
|
||||
<Typography variant="paragraph" className="text-center text-blue-gray-500 font-medium mt-4">
|
||||
{/* <Typography variant="paragraph" className="text-center text-blue-gray-500 font-medium mt-4">
|
||||
Not registered?
|
||||
<Link to="/auth/sign-up" className="text-gray-900 ml-1">Create account</Link>
|
||||
</Typography>
|
||||
</Typography> */}
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -123,7 +123,9 @@ export function Maintenance() {
|
||||
resetScript,
|
||||
saveSshConfig,
|
||||
deleteSshConfig,
|
||||
testSshConnection
|
||||
testSshConnection,
|
||||
fetchSuperuserStatus,
|
||||
removeSuperuserAccount
|
||||
} = useMaintenance();
|
||||
|
||||
const maintenanceActive = Boolean(maintenanceMeta?.active);
|
||||
@@ -182,6 +184,12 @@ export function Maintenance() {
|
||||
const scriptIsDirty = scriptConfig ? scriptDraft !== scriptBaseline : false;
|
||||
const scriptSourceLabel = scriptConfig?.source === "custom" ? "Benutzerdefiniert" : "Standard";
|
||||
|
||||
const [superuserStatusLoading, setSuperuserStatusLoading] = useState(true);
|
||||
const [superuserExists, setSuperuserExists] = useState(false);
|
||||
const [superuserSummary, setSuperuserSummary] = useState(null);
|
||||
const [superuserStatusError, setSuperuserStatusError] = useState("");
|
||||
const [superuserDeleteLoading, setSuperuserDeleteLoading] = useState(false);
|
||||
|
||||
const [duplicates, setDuplicates] = useState([]);
|
||||
const [duplicatesLoading, setDuplicatesLoading] = useState(true);
|
||||
const [duplicatesError, setDuplicatesError] = useState("");
|
||||
@@ -197,6 +205,27 @@ export function Maintenance() {
|
||||
const [portainerUpdatedAt, setPortainerUpdatedAt] = useState(null);
|
||||
const portainerRequestRef = useRef(null);
|
||||
|
||||
const loadSuperuserStatus = useCallback(async ({ silent = false } = {}) => {
|
||||
setSuperuserStatusLoading(true);
|
||||
setSuperuserStatusError("");
|
||||
try {
|
||||
const data = await fetchSuperuserStatus();
|
||||
const exists = Boolean(data?.exists);
|
||||
setSuperuserExists(exists);
|
||||
setSuperuserSummary(exists ? data.user ?? null : null);
|
||||
} catch (err) {
|
||||
const message = err.response?.data?.error || err.message || "Superuser-Status konnte nicht geladen werden";
|
||||
setSuperuserExists(false);
|
||||
setSuperuserSummary(null);
|
||||
setSuperuserStatusError(message);
|
||||
if (!silent) {
|
||||
showToast({ variant: "error", title: "Statusabfrage fehlgeschlagen", description: message });
|
||||
}
|
||||
} finally {
|
||||
setSuperuserStatusLoading(false);
|
||||
}
|
||||
}, [fetchSuperuserStatus, showToast]);
|
||||
|
||||
const fetchPortainerStatus = useCallback(async ({ silent = false } = {}) => {
|
||||
if (portainerRequestRef.current) {
|
||||
return portainerRequestRef.current;
|
||||
@@ -285,6 +314,10 @@ export function Maintenance() {
|
||||
return requestPromise;
|
||||
}, [maintenanceActive, updateRunning, showToast]);
|
||||
|
||||
useEffect(() => {
|
||||
loadSuperuserStatus({ silent: true });
|
||||
}, [loadSuperuserStatus]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchPortainerStatus();
|
||||
}, [fetchPortainerStatus]);
|
||||
@@ -423,6 +456,49 @@ export function Maintenance() {
|
||||
}
|
||||
}, [deleteSshConfig, showToast]);
|
||||
|
||||
const handleSuperuserDelete = useCallback(async () => {
|
||||
if (superuserDeleteLoading || superuserStatusLoading || !superuserExists) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof window !== "undefined") {
|
||||
const confirmed = window.confirm(
|
||||
"Superuser und zugehörige Gruppe wirklich löschen?\nDies setzt die Superuser-Einrichtung zurück."
|
||||
);
|
||||
if (!confirmed) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
setSuperuserDeleteLoading(true);
|
||||
const response = await removeSuperuserAccount();
|
||||
const removedUsers = Number(response?.usersRemoved ?? 0);
|
||||
showToast({
|
||||
variant: "success",
|
||||
title: "Superuser gelöscht",
|
||||
description: removedUsers > 1
|
||||
? `${removedUsers} Konten aus der Superuser-Gruppe wurden entfernt.`
|
||||
: "Superuser-Konto wurde entfernt."
|
||||
});
|
||||
await loadSuperuserStatus({ silent: true });
|
||||
} catch (err) {
|
||||
const status = err.response?.status;
|
||||
if (status === 404) {
|
||||
await loadSuperuserStatus({ silent: true });
|
||||
showToast({
|
||||
variant: "info",
|
||||
title: "Kein Superuser vorhanden",
|
||||
description: "Es ist kein Superuser mehr vorhanden."
|
||||
});
|
||||
} else {
|
||||
const message = err.response?.data?.error || err.message || "Superuser konnte nicht gelöscht werden";
|
||||
showToast({ variant: "error", title: "Löschen fehlgeschlagen", description: message });
|
||||
}
|
||||
} finally {
|
||||
setSuperuserDeleteLoading(false);
|
||||
}
|
||||
}, [superuserDeleteLoading, superuserStatusLoading, superuserExists, removeSuperuserAccount, loadSuperuserStatus, showToast]);
|
||||
const handleMaintenanceToggle = useCallback(async (nextActive) => {
|
||||
if (maintenanceLoading || maintenanceToggleLoading) return;
|
||||
if (nextActive === maintenanceActive) return;
|
||||
@@ -633,6 +709,63 @@ export function Maintenance() {
|
||||
</CardBody>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader variant="gradient" color="gray" className="mb-5 p-4">
|
||||
<Typography
|
||||
variant="h6"
|
||||
color="white"
|
||||
className="flex items-center justify-between"
|
||||
>
|
||||
<span>Superuser</span>
|
||||
|
||||
</Typography>
|
||||
</CardHeader>
|
||||
<CardBody className="flex flex-col gap-4 p-4">
|
||||
<div className="space-y-2">
|
||||
{superuserStatusLoading && (
|
||||
<p className="text-sm text-stormGrey-500">Status wird geladen…</p>
|
||||
)}
|
||||
{!superuserStatusLoading && superuserStatusError && (
|
||||
<p className="text-sm text-sunsetCoral-600">{superuserStatusError}</p>
|
||||
)}
|
||||
{!superuserStatusLoading && !superuserStatusError && superuserExists && (
|
||||
<div className="space-y-1">
|
||||
<p className="text-sm">Superuser ist angelegt.</p>
|
||||
<p className="text-xs text-stormGrey-500">
|
||||
Benutzername: <span className="font-medium text-stormGrey-900">{superuserSummary?.username ?? "unbekannt"}</span>
|
||||
{superuserSummary?.email ? ` - ${superuserSummary.email}` : ""}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
{!superuserStatusLoading && !superuserStatusError && !superuserExists && (
|
||||
<p className="text-sm">Es ist kein Superuser vorhanden.</p>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between">
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="gray"
|
||||
onClick={() => loadSuperuserStatus()}
|
||||
disabled={superuserStatusLoading || superuserDeleteLoading}
|
||||
className="w-full sm:w-auto"
|
||||
>
|
||||
Status aktualisieren
|
||||
</Button>
|
||||
<Button
|
||||
color="red"
|
||||
onClick={handleSuperuserDelete}
|
||||
disabled={superuserStatusLoading || superuserDeleteLoading || !superuserExists}
|
||||
className="w-full sm:w-auto"
|
||||
>
|
||||
{superuserDeleteLoading ? "Wird gelöscht…" : "Superuser löschen"}
|
||||
</Button>
|
||||
</div>
|
||||
<p className="text-xs text-stormGrey-500">
|
||||
Entfernt das Superuser-Konto samt zugehöriger Gruppe. Danach kann der Erstbenutzer bei Bedarf erneut angelegt werden.
|
||||
</p>
|
||||
</CardBody>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader variant="gradient" color="gray" className="mb-5 p-4">
|
||||
<Typography
|
||||
|
||||
+21
-19
@@ -1,7 +1,9 @@
|
||||
import {
|
||||
Square3Stack3DIcon,
|
||||
WrenchScrewdriverIcon,
|
||||
ListBulletIcon
|
||||
ListBulletIcon,
|
||||
ServerStackIcon,
|
||||
RectangleStackIcon
|
||||
} from "@heroicons/react/24/solid";
|
||||
import { Stacks, Maintenance, Logs } from "@/pages/dashboard";
|
||||
import { SignIn, SignUp } from "@/pages/auth";
|
||||
@@ -34,24 +36,24 @@ export const routes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// title: "auth pages",
|
||||
// layout: "auth",
|
||||
// pages: [
|
||||
// {
|
||||
// icon: <ServerStackIcon {...icon} />,
|
||||
// name: "sign in",
|
||||
// path: "/sign-in",
|
||||
// element: <SignIn />,
|
||||
// },
|
||||
// {
|
||||
// icon: <RectangleStackIcon {...icon} />,
|
||||
// name: "sign up",
|
||||
// path: "/sign-up",
|
||||
// element: <SignUp />,
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
title: "auth pages",
|
||||
layout: "auth",
|
||||
pages: [
|
||||
{
|
||||
icon: <ServerStackIcon {...icon} />,
|
||||
name: "sign in",
|
||||
path: "/sign-in",
|
||||
element: <SignIn />,
|
||||
},
|
||||
{
|
||||
icon: <RectangleStackIcon {...icon} />,
|
||||
name: "sign up",
|
||||
path: "/sign-up",
|
||||
element: <SignUp />,
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
export default routes;
|
||||
Reference in new issue
Block a user