fix(sirsoft-basic, sirsoft-admin_basic): 모바일 드로어 선호설정 아코디언화 및 뷰포트 개선

모바일 헤더 우측 그룹이 420px 를 요구해 폰 뷰포트에서 통화 선택기가 잘렸다.
언어·통화·배송국가를 드로어로 옮겨 가로 칩으로 통일했으나, 이번엔 드로어가
세로로 길어져 정작 메뉴가 스크롤 밖으로 밀렸다.

언어와 통화·배송국가를 각각 독립 아코디언(기본 접힘)으로 바꾸고, 접힘 상태에서도
트리거에 현재 선택값을 요약 표기해 펼치지 않고 확인할 수 있게 했다. 언어는 템플릿이,
통화·배송국가는 이커머스 주입 조각이 각자 상태를 소유해 서로 간섭하지 않는다.

통화 패널은 새 플래그를 만들지 않고 데스크톱 드롭다운의 기존 토글을 재사용한다 —
portable 오버라이드에서 if 를 생략하면 엔진이 base if 를 상속하므로 자동으로 기본
접힘이 된다. 이 과정에서 모바일로 펼칠 때 전체 화면 배경 오버레이가 드로어 클릭을
가로채는 결함을 함께 차단했다.

그 밖에 모달 좌우 여백, 주문 취소·일괄변경 팝업의 세로 스택 전환, 은행 관리 입력칸
축소, 쇼핑몰 환경설정·쿠폰·엑셀 다운로드 화면의 가로 넘침을 함께 해소했다.
This commit is contained in:
HeuJung committed 2026-07-10 19:27:25 +09:00
1 parent e3c00addd8
commit 0ff4b674ac
49 files changed
+2048 -609

No files matched your search

@@ -4,6 +4,25 @@
형식은 [Keep a Changelog](https://keepachangelog.com/ko/1.1.0/)를 따르며,
[Semantic Versioning](https://semver.org/lang/ko/)을 준수합니다.
## [1.0.2] - 2026-07-09
### Added
- 레이아웃 편집기에서 관리자 기본 레이아웃을 편집할 때 "모바일 메뉴 펼침" 상태를 선택할 수 있습니다 — 모바일 메뉴 안의 언어·통화·배송국가 버튼을 캔버스에서 바로 편집할 수 있습니다.
### Changed
- 모바일에서 언어·통화·배송국가 선택을 관리자 메뉴 안으로 옮기고, 사용자 화면과 동일하게 가로로 나열된 버튼 형태로 통일했습니다. 상단 헤더에는 테마 전환과 알림만 남습니다.
- 모바일 메뉴 안의 언어와 통화·배송국가가 각각 접었다 펼치는 항목으로 바뀌어, 메뉴를 열었을 때 곧바로 관리자 메뉴가 보입니다. 접혀 있을 때도 현재 선택된 언어와 통화·배송국가가 표시되므로 펼치지 않아도 확인할 수 있으며, 두 항목은 서로 독립적으로 여닫힙니다.
### Fixed
- 모바일에서 상단 헤더의 통화 선택 버튼이 화면 밖으로 잘려 보이던 문제를 수정했습니다. 화면이 좁을수록 심해져 320px 기기에서는 대부분이 가려졌습니다.
- 관리자 메뉴에서 언어를 선택해도 언어가 바뀌지 않던 문제를 수정했습니다. 로그인·비밀번호 찾기·비밀번호 재설정 화면의 언어 선택도 함께 정리했습니다.
- 좁은 화면에서 팝업 창이 화면 좌우에 빈틈 없이 붙어 보이던 문제를 수정했습니다 — 이제 양옆에 여백이 생깁니다.
- 좁은 화면에서 목록 아래 페이지 번호가 한 줄에 다 들어가지 않아 화면 밖으로 넘치던 문제를 수정했습니다 — 이제 여러 줄로 나뉘어 표시됩니다.
- 좁은 화면에서 다국어 입력란의 언어 탭(한국어·English·日本語)이 한 줄에 다 들어가지 않아 넘치던 문제를 수정했습니다. 상품·게시판·페이지 등 다국어 입력이 있는 모든 화면에 적용됩니다.
## [1.0.1] - 2026-07-08
### Added
@@ -0,0 +1,77 @@
/**
* @file admin-auth-setlocale-target.test.tsx
* @description 비인증 화면(로그인·비밀번호찾기·비밀번호재설정) 언어 선택기의 setLocale 액션 형태 회귀 테스트
*
* 배경: 관리자 템플릿은 자체 `setLocaleHandler` 를 등록해 엔진 빌트인 `setLocale`(ActionDispatcher)
* 을 덮어쓰고 있었다. 그 사본에는 두 결함이 있었다.
* ① `<button>` 의 `value` 는 항상 `''` 인데 `!== undefined && !== null` 로만 걸러 빈 문자열을
* 로케일로 채택 → 이후 검증에서 조기 반환(드로어 언어 칩이 눌러도 무반응).
* ② `G7Core.config` 는 존재하지 않고, `state.get('_global.appConfig.supportedLocales')` 는
* `_global` 객체 전체를 반환해 `validLocales.includes` 가 TypeError.
*
* 조치: 사용자 템플릿(`sirsoft-basic`)과 동일하게 템플릿 사본을 제거하고 엔진 빌트인을 쓴다.
* 엔진 빌트인은 **`action.target` 만** 읽으므로(`params.locale` 은 무시), 세 화면의 Select 액션도
* `params` → `target` 으로 옮겨야 한다. `Select` 컴포넌트는 네이티브 `<select>` 가 아니라 커스텀
* 위젯이지만 `{target:{value}}` 형태의 합성 이벤트를 발생시키므로 `{{$event.target.value}}` 가
* 그대로 해석된다(브라우저 실측 확인).
*
* 이 테스트를 `params.locale` 로 되돌리면 세 화면의 언어 전환이 조용히 죽는다.
*
* @vitest-environment jsdom
*/
import { describe, it, expect } from 'vitest';
import fs from 'node:fs';
import path from 'node:path';
const baseDir = path.resolve(__dirname, '../..');
function loadJson(relPath: string): any {
return JSON.parse(fs.readFileSync(path.resolve(baseDir, relPath), 'utf8'));
}
/** 레이아웃 전체에서 handler === 'setLocale' 인 액션을 모두 수집한다. */
function collectSetLocaleActions(node: any, acc: any[] = []): any[] {
if (!node || typeof node !== 'object') return acc;
if (Array.isArray(node)) {
for (const n of node) collectSetLocaleActions(n, acc);
return acc;
}
for (const action of node.actions ?? []) {
if (action?.handler === 'setLocale') acc.push(action);
}
for (const k of ['children', 'components']) {
if (node[k]) collectSetLocaleActions(node[k], acc);
}
return acc;
}
const layouts: Array<[string, string]> = [
['admin_login', 'layouts/admin_login.json'],
['admin_forgot_password', 'layouts/admin_forgot_password.json'],
['admin_reset_password', 'layouts/admin_reset_password.json'],
];
describe('비인증 화면 언어 선택기 — 엔진 빌트인 setLocale 규약', () => {
it.each(layouts)('%s 의 setLocale 은 target 으로 로케일을 넘긴다', (_name, relPath) => {
const layout = loadJson(relPath);
const actions = collectSetLocaleActions(layout.components ?? layout);
expect(actions.length).toBe(1);
const [action] = actions;
expect(action.type).toBe('change');
expect(action.target).toBe('{{$event.target.value}}');
// 엔진 빌트인은 params 를 읽지 않는다. 남아 있으면 무시되어 언어 전환이 죽는다.
expect(action.params).toBeUndefined();
});
it('템플릿은 setLocale 핸들러를 자체 등록하지 않는다 (엔진 빌트인 사용)', () => {
const indexTs = fs.readFileSync(
path.resolve(baseDir, 'src/handlers/index.ts'),
'utf8',
);
expect(indexTs).not.toContain('setLocaleHandler');
expect(fs.existsSync(path.resolve(baseDir, 'src/handlers/setLocaleHandler.ts'))).toBe(false);
});
});
@@ -1,14 +1,17 @@
/**
* @file admin-base-header-lang-currency.test.tsx
* @description 관리자 헤더 언어·통화 선택기 패리티 회귀 테스트
* @description 관리자 언어·통화·배송국가 선택기 배치 회귀 테스트
*
* 배경(검수 지적):
* - 관리자 데스크톱 언어 버튼이 globe 아이콘만 표시하고 현재 선택 언어를 안 보여줌(유저는 코드 표시).
* → LanguageSelector 에 showCode 도입, _admin_base 가 showCode:true 로 사용.
* - 관리자 모바일 헤더에 언어·통화 버튼이 둘 다 없음(데스크톱에만 존재).
* → mobile_header_right 에 language_selector_mobile + header_currency_slot_mobile 추가.
* 배경 (구 정본): 4표면(유저·관리자 × 데스크톱·모바일) 모두 언어+통화가 헤더 같은 줄에 노출.
*
* 합의 정본: 4표면(유저·관리자 × 데스크톱·모바일) 모두 언어+통화가 같은 줄에 현재값과 함께 노출.
* 반전 사유 (현 정본): 모바일 헤더 우측 그룹은 `flex-shrink-0` 이라 좁아져도 폭을 유지한 채
* 화면 밖으로 밀려난다. theme(36) + noti(36) + lang(79) + 통화(112) + gap = **420px 를 요구**해
* 390px 에서 30px, 320px 에서 100px 이 잘렸다(통화 셀렉터 단독이 클립 전량의 원인 — 통화만
* 숨기면 clip 0). 따라서 언어·통화·배송국가를 모두 모바일 드로어(`admin_drawer_prefs`)로 옮겨
* 사용자 템플릿(`_user_base` 의 `mobile_drawer_prefs`)과 동일한 가로 칩 목록으로 통일했다.
*
* → 모바일 헤더에는 theme·notification 만 남는다. 이 테스트를 "패리티 회복"이라는 이유로
* 되돌리면 폰 뷰포트 클립이 재발한다. 데스크톱(≥1024px)은 기존 헤더 배치를 유지한다.
*
* @vitest-environment jsdom
*/
@@ -31,7 +34,22 @@ function find(node: any, id: string): any {
return null;
}
describe('관리자 헤더 언어·통화 패리티', () => {
/**
* 술어를 만족하는 첫 노드를 재귀 탐색합니다 (위치 인덱스/직계 자식 가정 회피).
*
* @param node 탐색 시작 노드/배열
* @param pred 노드 술어
* @return 찾은 노드 (없으면 null)
*/
function walk(node: any, pred: (n: any) => boolean): any {
if (!node || typeof node !== 'object') return null;
if (Array.isArray(node)) { for (const n of node) { const r = walk(n, pred); if (r) return r; } return null; }
if (pred(node)) return node;
for (const k of ['children', 'components']) { if (node[k]) { const r = walk(node[k], pred); if (r) return r; } }
return null;
}
describe('관리자 헤더 언어·통화 배치', () => {
const adminBase = loadJson('layouts/_admin_base.json');
it('데스크톱 언어 선택기는 showCode:true 로 현재 로케일 코드를 표시한다', () => {
@@ -41,25 +59,115 @@ describe('관리자 헤더 언어·통화 패리티', () => {
expect(node.props?.showCode).toBe(true);
});
it('모바일 헤더에 언어 선택기 + 통화 슬롯이 같은 줄에 노출된다', () => {
const mobileRight = find(adminBase.components, 'mobile_header_right');
expect(mobileRight).toBeTruthy();
const ids = (mobileRight.children ?? []).map((c: any) => c.id);
expect(ids).toContain('language_selector_mobile');
expect(ids).toContain('header_currency_slot_mobile');
});
it('모바일 언어 선택기도 showCode:true (데스크톱과 동일 표기)', () => {
const node = find(adminBase.components, 'language_selector_mobile');
expect(node).toBeTruthy();
expect(node.name).toBe('LanguageSelector');
expect(node.props?.showCode).toBe(true);
});
it('모바일 통화 슬롯은 데스크톱과 동일한 header_currency 슬롯을 공유한다', () => {
const node = find(adminBase.components, 'header_currency_slot_mobile');
it('데스크톱 헤더는 통화 슬롯을 계속 보유한다 (데스크톱 회귀 방지)', () => {
const node = find(adminBase.components, 'header_currency_slot_desktop');
expect(node).toBeTruthy();
expect(node.name).toBe('SlotContainer');
expect(node.props?.slotId).toBe('header_currency');
});
it('모바일 헤더 우측에는 언어·통화가 없다 (420px 요구 → 폰에서 클립되던 원인 제거)', () => {
const mobileRight = find(adminBase.components, 'mobile_header_right');
expect(mobileRight).toBeTruthy();
const ids = (mobileRight.children ?? []).map((c: any) => c.id);
expect(ids).not.toContain('language_selector_mobile');
expect(ids).not.toContain('header_currency_slot_mobile');
// 남아야 하는 것: 테마 토글 + 알림
expect(ids).toContain('theme_toggle_mobile');
expect(ids).toContain('notification_center_mobile');
});
it('모바일 드로어 선호설정 블록은 portable 에서만 렌더된다', () => {
const prefs = find(adminBase.components, 'admin_drawer_prefs');
expect(prefs).toBeTruthy();
// 데스크톱에서는 미렌더 (드로어에 통화가 중복 노출되면 회귀)
expect(prefs.if).toBe('{{false}}');
expect(prefs.responsive?.portable?.if).toBe('{{true}}');
});
it('드로어 언어는 가로 칩이며 iteration 은 Button 자신에 걸린다', () => {
const lang = find(adminBase.components, 'admin_drawer_language');
expect(lang).toBeTruthy();
expect(lang.if).toBe('{{$locales.length > 1}}');
// 정적 flex-wrap 래퍼 + iteration 을 가진 Button 자식.
// 래퍼는 아코디언 펼침 영역 안에 있으므로 직계 자식이 아니라 재귀로 찾는다.
const wrapper = walk(lang,
(c: any) => typeof c.props?.className === 'string' && c.props.className.includes('flex-wrap'),
);
expect(wrapper).toBeTruthy();
const chip = (wrapper.children ?? [])[0];
expect(chip?.name).toBe('Button');
// 엔진은 iteration 을 가진 노드를 복제한다. flex 컨테이너에 걸면 컨테이너가 복제되어
// 칩이 세로로 쌓이므로, 반드시 리프(Button)에 건다.
expect(chip?.iteration?.item_var).toBe('loc');
expect(wrapper.iteration).toBeUndefined();
});
it('드로어 언어 칩은 엔진 빌트인 setLocale 을 action.target 으로 호출한다', () => {
const lang = find(adminBase.components, 'admin_drawer_language');
const wrapper = walk(lang,
(c: any) => typeof c.props?.className === 'string' && c.props.className.includes('flex-wrap'),
);
const chip = (wrapper.children ?? [])[0];
const action = (chip.actions ?? [])[0];
expect(action.handler).toBe('setLocale');
// 엔진 빌트인(ActionDispatcher)은 action.target 만 읽는다. params.locale 로 주면 무시된다.
expect(action.target).toBe('{{loc}}');
expect(action.params).toBeUndefined();
});
/**
* 접기/펼치기 — 언어·통화·배송국가를 전부 펼쳐 두면 드로어가 세로로 길어져 정작 메뉴가
* 스크롤 밖으로 밀린다. 언어와 통화/배송국가는 각각 독립 아코디언이며 기본 접힘이고,
* 접힘 상태에서도 트리거에 현재 선택값을 요약 표기한다.
*
* 언어 = 템플릿 소유(`_global.mobileLanguageOpen`),
* 통화/배송국가 = 이커머스 주입 조각 소유(`_local.showCurrencyDropdown`) → 서로 독립.
*/
it('드로어 언어 섹션은 기본 접힘 + 트리거에 현재 언어를 요약 표기한다', () => {
const lang = find(adminBase.components, 'admin_drawer_language');
const toggle = find(lang, 'admin_drawer_language_toggle');
expect(toggle?.name).toBe('Button');
expect(toggle.props['aria-expanded']).toBe('{{_global.mobileLanguageOpen ?? false}}');
const act = toggle.actions[0];
expect(act.handler).toBe('setState');
expect(act.params.target).toBe('global');
expect(act.params.mobileLanguageOpen).toBe('{{!_global.mobileLanguageOpen}}');
// 접힘 상태 요약 = 현재 언어명 + chevron
const summary = JSON.stringify(toggle.children);
expect(summary).toContain('localeNames?.[$locale]');
expect(summary).toContain('chevron-down');
expect(summary).toContain("{{_global.mobileLanguageOpen ? 'rotate-180' : ''}}");
// 펼침 영역: falsy(기본) 분기가 닫힘(max-h-0)이어야 기본 접힘이 성립한다
const body = walk(lang, (n: any) =>
typeof n.props?.className === 'string' &&
n.props.className.includes('overflow-hidden') &&
n.props.className.includes('mobileLanguageOpen'),
);
expect(body).toBeTruthy();
expect(body.props.className).toContain("'max-h-screen opacity-100 mt-2' : 'max-h-0 opacity-0 mt-0'");
});
it('언어 토글은 통화 플래그를 건드리지 않는다 (독립 개폐)', () => {
const toggle = find(adminBase.components, 'admin_drawer_language_toggle');
expect(toggle).toBeTruthy();
expect(JSON.stringify(toggle)).not.toContain('showCurrencyDropdown');
});
it('드로어 통화 슬롯은 데스크톱과 동일한 header_currency 슬롯을 공유하고 고유 id 를 갖는다', () => {
const node = find(adminBase.components, 'admin_drawer_currency_wrap');
expect(node).toBeTruthy();
expect(node.name).toBe('SlotContainer');
expect(node.props?.slotId).toBe('header_currency');
// SlotContainer 는 주입 root id 를 `{id}__{containerId}` 로 스코프하므로 id 가 필수다.
expect(node.id).toBe('admin_drawer_currency_wrap');
// 헤더의 `flex items-center` 를 복사하면 주입 루트가 콘텐츠 폭으로 줄어든다.
expect(node.props?.className).toBe('block');
});
});
@@ -0,0 +1,59 @@
/**
* @file admin-mobile-viewport-css.test.tsx
* @description 관리자 모바일 뷰포트 넘침 회귀 테스트 (템플릿 소유분: CSS + 컴포넌트)
*
* 브라우저 실측(390px / 320px)으로 확인된 결함에 1:1 대응한다.
*
* jsdom 은 레이아웃을 계산하지 않으므로 폭 자체는 검증할 수 없다.
* 여기서는 "규칙/클래스가 선언되어 있는가" 만 단언하고, 실제 폭은 Playwright E2E
* (tests/Playwright/specs/admin/mobile-viewport-overflow.spec.ts) 가 검증한다.
*
* @vitest-environment jsdom
*/
import { describe, it, expect } from 'vitest';
import fs from 'node:fs';
import path from 'node:path';
const baseDir = path.resolve(__dirname, '../..');
const read = (rel: string) => fs.readFileSync(path.resolve(baseDir, rel), 'utf8');
describe('B1 — .modal-container 뷰포트 clamp', () => {
const css = read('src/styles/main.css');
it('max-w-[calc(100vw-2rem)] 로 좌우 16px 여백을 확보한다', () => {
const rule = css.match(/\.modal-container\s*\{[\s\S]*?\}/)?.[0] ?? '';
expect(rule).toContain('max-w-[calc(100vw-2rem)]');
});
it('선언 순서 트랩 경고가 주석으로 남아 있다', () => {
// .max-w-full 은 명시도가 같고(0,1,0) 빌드 CSS 에서 뒤에 정의되어 이 clamp 를 이긴다.
// 이 사실을 모르면 레이아웃에 max-w-full 을 붙여 clamp 를 무효화하기 쉽다.
expect(css).toContain('max-w-full');
expect(css).toMatch(/명시도|승리/);
});
});
describe('C4 — .pagination 줄바꿈', () => {
const css = read('src/styles/main.css');
it('flex-wrap 이 있어 페이지 수가 많아도 넘치지 않는다', () => {
const rule = css.match(/\.pagination\s*\{[\s\S]*?\}/)?.[0] ?? '';
expect(rule).toContain('flex-wrap');
// 공통 컴포넌트라 이 한 줄로 주문상세(27px)·상품수정(29px) 두 지점이 동시에 해소된다.
expect(rule).toContain('justify-center');
});
});
describe('C1 — 다국어 로케일 탭 줄바꿈', () => {
it.each([
['MultilingualInput.tsx', 'src/components/composite/MultilingualInput.tsx'],
['HtmlEditor.tsx', 'src/components/composite/HtmlEditor.tsx'],
])('%s 의 로케일 탭 행이 flex-wrap 을 갖는다', (_name, rel) => {
const src = read(rel);
// 로케일 3개 이상(ko/en/ja) + md 미만 뷰포트에서 탭 행이 컨테이너를 넘친다.
// 이 두 컴포넌트는 40개 레이아웃에서 쓰이므로 여기서 고치면 전 화면이 해소된다.
expect(src).toContain('flex flex-wrap items-center gap-2 mb-3');
expect(src).not.toContain('"flex items-center gap-2 mb-3"');
});
});
@@ -0,0 +1,67 @@
/**
* @file editor-spec-sidebar-open-state.test.tsx
* @description 편집기 캔버스에서 모바일 드로어를 펼쳐 편집할 수 있는지 (editor-spec states)
*
* 배경: 언어·통화·배송국가 칩은 모바일 드로어(`admin_drawer_prefs`) 안에 있고, 드로어는
* `_global.sidebarOpen` 으로 열린다. 편집기 캔버스는 정적 시뮬레이션이라 햄버거 클릭이 없으므로,
* `sidebarOpen` 을 페이지 상태로 주입하지 않으면 드로어 내부를 영영 편집할 수 없다.
*
* `_admin_base` 는 라우트가 아니라 베이스 레이아웃이므로 `scope.kind: 'base'` 로 매칭해야 한다
* (`LayoutEditorChrome` 이 `__base__/{layoutName}` → `{kind:'base', match:layoutName}` 로 도출).
* 사용자 템플릿 `_user_base` 의 `mobile_menu_open` 과 동형.
*
* @vitest-environment jsdom
*/
import { describe, it, expect } from 'vitest';
import fs from 'node:fs';
import path from 'node:path';
const baseDir = path.resolve(__dirname, '../..');
const states = JSON.parse(
fs.readFileSync(path.resolve(baseDir, 'editor-spec/states.json'), 'utf8'),
);
/** `matchStateItems` 와 동일한 매칭 규칙 (kind + match 완전 일치). */
function matchGroup(kind: string, match: string) {
return (states.groups ?? []).filter(
(g: any) => g.scope?.kind === kind && g.scope?.match === match,
);
}
describe('editor-spec states — _admin_base 드로어 상태', () => {
it('_admin_base 에 base scope 상태 그룹이 있다', () => {
const groups = matchGroup('base', '_admin_base');
expect(groups).toHaveLength(1);
});
it('sidebar_open 상태가 _global.sidebarOpen 을 true 로 주입한다', () => {
const [group] = matchGroup('base', '_admin_base');
const item = (group.items ?? []).find((i: any) => i.id === 'sidebar_open');
expect(item).toBeTruthy();
// 드로어 게이트는 `_admin_base.json` 의 `left_sidebar_area_portable_open` → `_global.sidebarOpen`.
expect(item.initialState?.global?.sidebarOpen).toBe(true);
});
it('기본 상태(default)가 존재해 드로어 닫힌 화면도 미리본다', () => {
const [group] = matchGroup('base', '_admin_base');
const def = (group.items ?? []).find((i: any) => i.default === true);
expect(def?.id).toBe('default');
// 기본 상태는 sidebarOpen 을 주입하지 않는다(닫힌 드로어).
expect(def.initialState?.global?.sidebarOpen).toBeUndefined();
});
it('모든 상태 라벨이 $t: 다국어 키이고 ko/en 에 정의되어 있다', () => {
const [group] = matchGroup('base', '_admin_base');
const ko = JSON.parse(fs.readFileSync(path.resolve(baseDir, 'lang/partial/ko/editor.json'), 'utf8'));
const en = JSON.parse(fs.readFileSync(path.resolve(baseDir, 'lang/partial/en/editor.json'), 'utf8'));
for (const item of group.items ?? []) {
expect(item.label).toMatch(/^\$t:editor\.state\./);
const key = item.label.replace('$t:editor.state.', '');
expect(ko.state?.[key], `ko editor.state.${key}`).toBeTruthy();
expect(en.state?.[key], `en editor.state.${key}`).toBeTruthy();
}
});
});
@@ -1 +1 @@
/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Pretendard", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-greeLine truncated
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-scroll-snap-strictness:proximity;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Pretendard", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .08Line truncated
@@ -1,19 +1,19 @@
var SirsoftAdminBasic=(function(R,h,v,Nn){"use strict";var _T=Object.defineProperty;var ET=(R,h,v)=>h in R?_T(R,h,{enumerable:!0,configurable:!0,writable:!0,value:v}):R[h]=v;var $e=(R,h,v)=>ET(R,typeof h!="symbol"?h+"":h,v);var Na,cr;function Xm(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const P=Xm(v),Km=()=>window.G7Core,oe=v.forwardRef(({children:t,variant:e="primary",size:n="md",className:r="",...s},o)=>{const i="button",a=Km()?.style?.mergeClasses?.(i,r)??`${i} ${r}`;return h.jsx("button",{ref:o,className:a,...s,children:t})});oe.displayName="Button";const Sd=v.forwardRef(({accept:t,maxSize:e,onChange:n,onError:r,buttonText:s="Browse",placeholder:o="No file selected",className:i="",disabled:a,...l},c)=>{const d=v.useRef(null),u=c||d,[f,g]=v.useState(""),m={},p={};Object.entries(l).forEach(([x,E])=>{x.startsWith("data-editor-")||x==="id"||x==="onMouseMove"||x==="onMouseLeave"?m[x]=E:p[x]=E});const y=v.useCallback(()=>{!a&&u.current&&u.current.click()},[a,u]),b=v.useCallback(x=>{const E=x.target.files?.[0]||null;if(!E){g(""),n?.({target:{value:null,name:""}});return}if(e&&E.size>e*1024*1024){const k=`File size exceeds ${e}MB limit`;r?.(k),u.current&&(u.current.value=""),g("");return}g(E.name),n?.({target:{value:E,name:E.name}})},[e,n,r,u]),S=v.useCallback(x=>{x.stopPropagation(),u.current&&(u.current.value=""),g(""),n?.({target:{value:null,name:""}})},[n,u]);return h.jsxs("div",{className:`flex items-center gap-2 ${i}`,...m,children:[h.jsx("input",{ref:u,type:"file",accept:t,onChange:b,disabled:a,className:"hidden",...p}),h.jsx("button",{type:"button",onClick:y,disabled:a,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:s}),h.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:f||o}),f&&!a&&h.jsx("button",{type:"button",onClick:S,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Sd.displayName="FileInput";const qm=t=>t==="checkbox"?"checkbox":t==="radio"?"radio":"input",Zm=(t,e)=>{const n=qm(t);return e?e.split(/\s+/).filter(Boolean).includes(n)?e:`${n} ${e}`:n},wt=v.forwardRef(({label:t,error:e,className:n="",onChange:r,onKeyPress:s,value:o,defaultValue:i,type:a="text",checked:l,defaultChecked:c,...d},u)=>{const f=a==="radio"||a==="checkbox",g=Zm(a,n),m=v.useRef(!1),p=v.useRef(null);v.useImperativeHandle(u,()=>p.current);const[y,b]=v.useState(o??i??"");v.useEffect(()=>{if(!f&&!m.current&&o!==void 0){if(p.current&&document.activeElement===p.current)return;b(o)}},[o,f]);const S=v.useCallback(()=>{m.current=!0},[]),x=v.useCallback(M=>{if(m.current=!1,r){const O=M.target.value;b(O);const L=new Event("change",{bubbles:!0});Object.defineProperty(L,"target",{writable:!1,value:{value:O}}),Object.defineProperty(L,"currentTarget",{writable:!1,value:{value:O}}),r(L)}},[r]),E=v.useCallback(M=>{const O=M.target.value;b(O),!m.current&&r&&r(M)},[r]),k=v.useCallback(M=>{m.current||s&&s(M)},[s]),{loadingactions:C,formdata:N,..._}=d;if(f)return h.jsx("input",{ref:p,type:a,className:g,onChange:r,checked:l,defaultChecked:c,value:o,..._});const w=o!==void 0?{value:y}:{defaultValue:i};return h.jsx("input",{ref:p,type:a,className:g,onChange:E,onKeyPress:k,onCompositionStart:S,onCompositionEnd:x,...w,..._})});wt.displayName="Input";const qn=({label:t,error:e,className:n="",onChange:r,value:s,defaultValue:o,...i})=>{const a=v.useRef(!1),l=v.useRef(null),[c,d]=v.useState(s??o??"");v.useEffect(()=>{!a.current&&s!==void 0&&d(s)},[s]);const u=v.useCallback(()=>{a.current=!0},[]),f=v.useCallback(E=>{if(a.current=!1,r){const k=E.target.value;d(k);const C=new Event("change",{bubbles:!0});Object.defineProperty(C,"target",{writable:!1,value:{value:k}}),Object.defineProperty(C,"currentTarget",{writable:!1,value:{value:k}}),r(C)}},[r]),g=v.useCallback(E=>{const k=E.target.value;d(k),!a.current&&r&&r(E)},[r]),{loadingactions:m,formdata:p,...y}=i,b=s!==void 0?{value:c}:{defaultValue:o},x=(n??"").split(/\s+/).filter(Boolean).includes("textarea")?n??"":["textarea",n].filter(Boolean).join(" ");return h.jsx("textarea",{ref:l,className:x,onChange:g,onCompositionStart:u,onCompositionEnd:f,...b,...y})},en=({children:t,className:e="",...n})=>h.jsx("label",{className:e,...n,children:t}),I=v.forwardRef(({children:t,className:e="",...n},r)=>h.jsx("div",{ref:r,classNameLine truncated
var SirsoftAdminBasic=(function(R,h,v,On){"use strict";var T5=Object.defineProperty;var A5=(R,h,v)=>h in R?T5(R,h,{enumerable:!0,configurable:!0,writable:!0,value:v}):R[h]=v;var Fe=(R,h,v)=>A5(R,typeof h!="symbol"?h+"":h,v);var Oa,ur;function Qm(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const P=Qm(v),Jm=()=>window.G7Core,oe=v.forwardRef(({children:t,variant:e="primary",size:n="md",className:r="",...s},o)=>{const i="button",a=Jm()?.style?.mergeClasses?.(i,r)??`${i} ${r}`;return h.jsx("button",{ref:o,className:a,...s,children:t})});oe.displayName="Button";const Ed=v.forwardRef(({accept:t,maxSize:e,onChange:n,onError:r,buttonText:s="Browse",placeholder:o="No file selected",className:i="",disabled:a,...l},c)=>{const d=v.useRef(null),u=c||d,[f,g]=v.useState(""),m={},p={};Object.entries(l).forEach(([x,E])=>{x.startsWith("data-editor-")||x==="id"||x==="onMouseMove"||x==="onMouseLeave"?m[x]=E:p[x]=E});const y=v.useCallback(()=>{!a&&u.current&&u.current.click()},[a,u]),b=v.useCallback(x=>{const E=x.target.files?.[0]||null;if(!E){g(""),n?.({target:{value:null,name:""}});return}if(e&&E.size>e*1024*1024){const k=`File size exceeds ${e}MB limit`;r?.(k),u.current&&(u.current.value=""),g("");return}g(E.name),n?.({target:{value:E,name:E.name}})},[e,n,r,u]),S=v.useCallback(x=>{x.stopPropagation(),u.current&&(u.current.value=""),g(""),n?.({target:{value:null,name:""}})},[n,u]);return h.jsxs("div",{className:`flex items-center gap-2 ${i}`,...m,children:[h.jsx("input",{ref:u,type:"file",accept:t,onChange:b,disabled:a,className:"hidden",...p}),h.jsx("button",{type:"button",onClick:y,disabled:a,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded-md text-sm font-medium text-gray-700 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed",children:s}),h.jsx("span",{className:"flex-1 text-sm text-gray-600 dark:text-gray-400 truncate",children:f||o}),f&&!a&&h.jsx("button",{type:"button",onClick:S,className:"p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200","aria-label":"Clear file",children:h.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})});Ed.displayName="FileInput";const Rm=t=>t==="checkbox"?"checkbox":t==="radio"?"radio":"input",eb=(t,e)=>{const n=Rm(t);return e?e.split(/\s+/).filter(Boolean).includes(n)?e:`${n} ${e}`:n},wt=v.forwardRef(({label:t,error:e,className:n="",onChange:r,onKeyPress:s,value:o,defaultValue:i,type:a="text",checked:l,defaultChecked:c,...d},u)=>{const f=a==="radio"||a==="checkbox",g=eb(a,n),m=v.useRef(!1),p=v.useRef(null);v.useImperativeHandle(u,()=>p.current);const[y,b]=v.useState(o??i??"");v.useEffect(()=>{if(!f&&!m.current&&o!==void 0){if(p.current&&document.activeElement===p.current)return;b(o)}},[o,f]);const S=v.useCallback(()=>{m.current=!0},[]),x=v.useCallback(M=>{if(m.current=!1,r){const O=M.target.value;b(O);const L=new Event("change",{bubbles:!0});Object.defineProperty(L,"target",{writable:!1,value:{value:O}}),Object.defineProperty(L,"currentTarget",{writable:!1,value:{value:O}}),r(L)}},[r]),E=v.useCallback(M=>{const O=M.target.value;b(O),!m.current&&r&&r(M)},[r]),k=v.useCallback(M=>{m.current||s&&s(M)},[s]),{loadingactions:C,formdata:N,..._}=d;if(f)return h.jsx("input",{ref:p,type:a,className:g,onChange:r,checked:l,defaultChecked:c,value:o,..._});const w=o!==void 0?{value:y}:{defaultValue:i};return h.jsx("input",{ref:p,type:a,className:g,onChange:E,onKeyPress:k,onCompositionStart:S,onCompositionEnd:x,...w,..._})});wt.displayName="Input";const Zn=({label:t,error:e,className:n="",onChange:r,value:s,defaultValue:o,...i})=>{const a=v.useRef(!1),l=v.useRef(null),[c,d]=v.useState(s??o??"");v.useEffect(()=>{!a.current&&s!==void 0&&d(s)},[s]);const u=v.useCallback(()=>{a.current=!0},[]),f=v.useCallback(E=>{if(a.current=!1,r){const k=E.target.value;d(k);const C=new Event("change",{bubbles:!0});Object.defineProperty(C,"target",{writable:!1,value:{value:k}}),Object.defineProperty(C,"currentTarget",{writable:!1,value:{value:k}}),r(C)}},[r]),g=v.useCallback(E=>{const k=E.target.value;d(k),!a.current&&r&&r(E)},[r]),{loadingactions:m,formdata:p,...y}=i,b=s!==void 0?{value:c}:{defaultValue:o},x=(n??"").split(/\s+/).filter(Boolean).includes("textarea")?n??"":["textarea",n].filter(Boolean).join(" ");return h.jsx("textarea",{ref:l,className:x,onChange:g,onCompositionStart:u,onCompositionEnd:f,...b,...y})},rn=({children:t,className:e="",...n})=>h.jsx("label",{className:e,...n,children:t}),I=v.forwardRef(({children:t,className:e="",...n},r)=>h.jsx("div",{ref:r,classNameLine truncated
inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium
${he?"bg-blue-100 text-blue-700 dark:bg-blue-900/50 dark:text-blue-300":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300"}
`,children:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),H(X),he&&h.jsx(Q,{className:"text-red-500 dark:text-red-400",children:"*"}),!he&&h.jsx(oe,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",onClick:()=>V(X),disabled:l,children:h.jsx(re,{name:"xmark",className:"w-3 h-3"})})]}),he&&Z&&j()]}),n==="textarea"?h.jsx(qn,{name:`${f}[${X}]`,value:k[X]||"",onChange:ce=>A(X,ce.target.value),placeholder:J,required:a&&he,disabled:l,maxLength:c,rows:d,className:`${ne} resize-vertical`}):h.jsx(wt,{type:"text",name:`${f}[${X}]`,value:k[X]||"",onChange:ce=>A(X,ce.target.value),placeholder:J,required:a&&he,disabled:l,maxLength:c,className:ee})]},X)},[f,k,A,i,a,l,c,d,n,H,x,V,j,b]),B=v.useCallback(X=>{const Z=b?"input input-error":"input",ee=b?"textarea input-error":"textarea",ne=`${i}${i?" (":""}${H(X)}${i?")":""}`;return h.jsx(I,{children:n==="textarea"?h.jsx(qn,{name:`${f}[${X}]`,value:k[X]||"",onChange:he=>A(X,he.target.value),placeholder:ne,required:a&&X===x,disabled:l,maxLength:c,rows:d,className:`${ee} resize-vertical`}):h.jsx(wt,{type:"text",name:`${f}[${X}]`,value:k[X]||"",onChange:he=>A(X,he.target.value),placeholder:ne,required:a&&X===x,disabled:l,maxLength:c,className:Z})},X)},[f,k,A,i,a,l,c,d,n,x,H,b]),G=()=>h.jsx(I,{className:u,children:h.jsx(I,{className:"space-y-4",children:w.map((X,Z)=>U(X,Z===0))})}),z=()=>h.jsxs(I,{className:u,children:[h.jsxs(I,{className:"flex items-center gap-2 mb-3",children:[w.map(X=>h.jsxs(oe,{type:"button",className:`
`,children:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),H(X),he&&h.jsx(Q,{className:"text-red-500 dark:text-red-400",children:"*"}),!he&&h.jsx(oe,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",onClick:()=>z(X),disabled:l,children:h.jsx(re,{name:"xmark",className:"w-3 h-3"})})]}),he&&Z&&j()]}),n==="textarea"?h.jsx(Zn,{name:`${f}[${X}]`,value:k[X]||"",onChange:ce=>A(X,ce.target.value),placeholder:J,required:a&&he,disabled:l,maxLength:c,rows:d,className:`${ne} resize-vertical`}):h.jsx(wt,{type:"text",name:`${f}[${X}]`,value:k[X]||"",onChange:ce=>A(X,ce.target.value),placeholder:J,required:a&&he,disabled:l,maxLength:c,className:ee})]},X)},[f,k,A,i,a,l,c,d,n,H,x,z,j,b]),B=v.useCallback(X=>{const Z=b?"input input-error":"input",ee=b?"textarea input-error":"textarea",ne=`${i}${i?" (":""}${H(X)}${i?")":""}`;return h.jsx(I,{children:n==="textarea"?h.jsx(Zn,{name:`${f}[${X}]`,value:k[X]||"",onChange:he=>A(X,he.target.value),placeholder:ne,required:a&&X===x,disabled:l,maxLength:c,rows:d,className:`${ee} resize-vertical`}):h.jsx(wt,{type:"text",name:`${f}[${X}]`,value:k[X]||"",onChange:he=>A(X,he.target.value),placeholder:ne,required:a&&X===x,disabled:l,maxLength:c,className:Z})},X)},[f,k,A,i,a,l,c,d,n,x,H,b]),G=()=>h.jsx(I,{className:u,children:h.jsx(I,{className:"space-y-4",children:w.map((X,Z)=>U(X,Z===0))})}),V=()=>h.jsxs(I,{className:u,children:[h.jsxs(I,{className:"flex flex-wrap items-center gap-2 mb-3",children:[w.map(X=>h.jsxs(oe,{type:"button",className:`
inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-semibold transition-all
${O===X?X===x?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":X===x?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>L(X),children:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),g?h.jsxs(h.Fragment,{children:[h.jsx(Q,{className:"hidden md:inline",children:H(X)}),h.jsx(Q,{className:"inline md:hidden",children:X.toUpperCase()})]}):H(X),X===x&&h.jsx(Q,{className:"text-red-500 dark:text-red-400",children:"*"}),W(X)&&O!==X&&h.jsx(re,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"}),X!==x&&h.jsx(oe,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",onClick:Z=>{Z.stopPropagation(),V(X)},disabled:l,children:h.jsx(re,{name:"xmark",className:"w-3 h-3"})})]},X)),j()]}),w.map(X=>h.jsx(I,{className:O===X?"block":"hidden",children:B(X)},X))]}),K=()=>{const X=b?"input input-error":"input",Z=b?"textarea input-error":"textarea";return h.jsx(I,{className:u,children:h.jsxs(I,{className:"flex items-center gap-1",children:[h.jsx(I,{className:"flex items-center shrink-0",children:w.map(ee=>h.jsxs(oe,{type:"button",className:`
`,onClick:()=>L(X),children:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),g?h.jsxs(h.Fragment,{children:[h.jsx(Q,{className:"hidden md:inline",children:H(X)}),h.jsx(Q,{className:"inline md:hidden",children:X.toUpperCase()})]}):H(X),X===x&&h.jsx(Q,{className:"text-red-500 dark:text-red-400",children:"*"}),W(X)&&O!==X&&h.jsx(re,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"}),X!==x&&h.jsx(oe,{type:"button",className:"ml-0.5 p-0.5 rounded-full hover:bg-gray-300 dark:hover:bg-gray-500 transition-colors",onClick:Z=>{Z.stopPropagation(),z(X)},disabled:l,children:h.jsx(re,{name:"xmark",className:"w-3 h-3"})})]},X)),j()]}),w.map(X=>h.jsx(I,{className:O===X?"block":"hidden",children:B(X)},X))]}),K=()=>{const X=b?"input input-error":"input",Z=b?"textarea input-error":"textarea";return h.jsx(I,{className:u,children:h.jsxs(I,{className:"flex items-center gap-1",children:[h.jsx(I,{className:"flex items-center shrink-0",children:w.map(ee=>h.jsxs(oe,{type:"button",className:`
px-2 py-1.5 text-xs font-medium border-y border-l first:rounded-l last:rounded-r last:border-r transition-colors
${O===ee?"bg-blue-500 text-white border-blue-500 dark:bg-blue-600 dark:border-blue-600":"bg-white text-gray-600 border-gray-200 hover:bg-gray-50 dark:bg-gray-800 dark:text-gray-300 dark:border-gray-600 dark:hover:bg-gray-700"}
`,onClick:()=>L(ee),title:H(ee),children:[ee.toUpperCase(),ee===x&&h.jsx(Q,{className:"text-red-400 ml-0.5",children:"*"})]},ee))}),h.jsx(I,{className:"flex-1 min-w-0",children:n==="textarea"?h.jsx(qn,{name:`${f}[${O}]`,value:k[O]||"",onChange:ee=>A(O,ee.target.value),placeholder:i,required:a&&O===x,disabled:l,maxLength:c,rows:d,className:Z}):h.jsx(wt,{type:"text",name:`${f}[${O}]`,value:k[O]||"",onChange:ee=>A(O,ee.target.value),placeholder:i,required:a&&O===x,disabled:l,maxLength:c,className:X})})]})})};return h.jsxs(I,{className:l?"opacity-50 cursor-not-allowed":void 0,id:p,...y,children:[r==="compact"?K():r==="tabs"?z():G(),b&&m&&h.jsx(Q,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:m})]})};Va.displayName="MultilingualInput";const fb=()=>window.G7Core,za=({checked:t,value:e,onChange:n,disabled:r=!1,label:s,description:o,size:i="md",className:a="",name:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(()=>t??e??!1);v.useEffect(()=>{f(t??e??!1)},[t,e]);const g=b=>{const S=b.target.checked;f(S),n&&!r&&n(b)},p={sm:{track:"w-9 h-5",thumb:"after:h-4 after:w-4"},md:{track:"w-11 h-6",thumb:"after:h-5 after:w-5"},lg:{track:"w-14 h-7",thumb:"after:h-6 after:w-6"}}[i],y=()=>{if(!r){const b=!u;if(f(b),n){const S=fb();S?.createChangeEvent&&n(S.createChangeEvent({checked:b,name:l}))}}};return h.jsxs("div",{className:`toggle-container ${a}`,id:c,...d,children:[h.jsxs("div",{className:`toggle-switch-wrapper ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),y()},children:[h.jsx("input",{type:"checkbox",id:l,name:l,checked:u,onChange:g,disabled:r,className:"sr-only peer",tabIndex:-1}),h.jsx("div",{className:`toggle-switch-track ${p.track} ${p.thumb}`})]}),s&&h.jsx("span",{className:`toggle-label ${r?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:y,children:s}),o&&h.jsx("p",{className:"toggle-description",children:o})]})},Po=({status:t,label:e,showIcon:n=!0,iconName:r,className:s="",style:o,id:i,editorAttrs:a})=>{const l={success:"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",error:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",info:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",pending:"bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600",default:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600"},c={success:de.CheckCircle,warning:de.ExclamationTriangle,error:de.XCircle,info:de.InfoCircle,pending:de.Clock,default:de.QuestionCircle},d={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},u=r||c[t],f=e||d[t],g=l[t];return h.jsxs(Q,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${g} ${s}`,style:o,id:i,...a,children:[n&&h.jsx(re,{name:u,className:"w-4 h-4"}),h.jsx(Q,{children:f})]})},Td={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",orange:"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",teal:"bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",cyan:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300"},hb={success:"green",warning:"yellow",danger:"red",error:"red",info:"blue",primary:"blue",secondary:"gray",text:"gray",default:"gray"},Ad={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"},Dd=({color:t,variant:e,text:n,size:r="md",className:s="",style:o,children:i,id:a,editorAttrs:l})=>{const c=t||(e?hb[e]:void 0)||"gray",d=Td[c]||Td.gray,u=Ad[r]||Ad.md;return h.jsxs(Q,{className:`inline-flex items-center rounded-full font-medium ${u} ${d} ${s}`,style:o,id:a,...l,children:[n,i]})};/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */const{entries:Id,setPrototypeOf:Ld,isFrozen:gb,getPrototypeOf:pb,getOwnPropertyDescriptor:mb}=Object;let{freeze:Bt,seal:an,create:Pd}=Object,{apply:Ha,construct:Ua}=typeof Reflect<"u"&&Reflect;Bt||(Bt=function(e){return e}),an||(an=function(e){return e}),Ha||(Ha=function(e,n,r){return e.apply(n,r)}),Ua||(Ua=function(e,n){return new e(...n)});const $o=tn(Array.prototype.forEach),$d=tn(Array.prototype.pop),ys=t Line truncated
`+ke),J&&$o([L,$,F],We=>{ke=vs(ke,We," ")}),E&&Se?E.createHTML(ke):ke},e.setConfig=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Re(Ce),ie=!0},e.clearConfig=function(){Ee=null,ie=!1},e.isValidAttribute=function(Ce,Y,ae){Ee||Re({});const xe=we(Ce),lt=we(Y);return Ao(xe,lt,ae)},e.addHook=function(Ce,Y){typeof Y=="function"&&(O[Ce]=O[Ce]||[],ys(O[Ce],Y))},e.removeHook=function(Ce){if(O[Ce])return $d(O[Ce])},e.removeHooks=function(Ce){O[Ce]&&(O[Ce]=[])},e.removeAllHooks=function(){O={}},e}var Ib=Gd();const Xa=({content:t,text:e,isHtml:n=!0,className:r="",purifyConfig:s,id:o,editorAttrs:i})=>{const a=e??t??"";if(!a||a.trim()==="")return null;if(!n){const u=`
`,onClick:()=>L(ee),title:H(ee),children:[ee.toUpperCase(),ee===x&&h.jsx(Q,{className:"text-red-400 ml-0.5",children:"*"})]},ee))}),h.jsx(I,{className:"flex-1 min-w-0",children:n==="textarea"?h.jsx(Zn,{name:`${f}[${O}]`,value:k[O]||"",onChange:ee=>A(O,ee.target.value),placeholder:i,required:a&&O===x,disabled:l,maxLength:c,rows:d,className:Z}):h.jsx(wt,{type:"text",name:`${f}[${O}]`,value:k[O]||"",onChange:ee=>A(O,ee.target.value),placeholder:i,required:a&&O===x,disabled:l,maxLength:c,className:X})})]})})};return h.jsxs(I,{className:l?"opacity-50 cursor-not-allowed":void 0,id:p,...y,children:[r==="compact"?K():r==="tabs"?V():G(),b&&m&&h.jsx(Q,{className:"text-xs text-red-500 dark:text-red-400 mt-1 block",children:m})]})};Va.displayName="MultilingualInput";const mb=()=>window.G7Core,Ha=({checked:t,value:e,onChange:n,disabled:r=!1,label:s,description:o,size:i="md",className:a="",name:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(()=>t??e??!1);v.useEffect(()=>{f(t??e??!1)},[t,e]);const g=b=>{const S=b.target.checked;f(S),n&&!r&&n(b)},p={sm:{track:"w-9 h-5",thumb:"after:h-4 after:w-4"},md:{track:"w-11 h-6",thumb:"after:h-5 after:w-5"},lg:{track:"w-14 h-7",thumb:"after:h-6 after:w-6"}}[i],y=()=>{if(!r){const b=!u;if(f(b),n){const S=mb();S?.createChangeEvent&&n(S.createChangeEvent({checked:b,name:l}))}}};return h.jsxs("div",{className:`toggle-container ${a}`,id:c,...d,children:[h.jsxs("div",{className:`toggle-switch-wrapper ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,onClick:b=>{b.preventDefault(),b.stopPropagation(),y()},children:[h.jsx("input",{type:"checkbox",id:l,name:l,checked:u,onChange:g,disabled:r,className:"sr-only peer",tabIndex:-1}),h.jsx("div",{className:`toggle-switch-track ${p.track} ${p.thumb}`})]}),s&&h.jsx("span",{className:`toggle-label ${r?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,onClick:y,children:s}),o&&h.jsx("p",{className:"toggle-description",children:o})]})},$o=({status:t,label:e,showIcon:n=!0,iconName:r,className:s="",style:o,id:i,editorAttrs:a})=>{const l={success:"bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400 border-green-200 dark:border-green-800",warning:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800",error:"bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400 border-red-200 dark:border-red-800",info:"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 border-blue-200 dark:border-blue-800",pending:"bg-gray-50 dark:bg-gray-700 text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600",default:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-400 border-gray-200 dark:border-gray-600"},c={success:de.CheckCircle,warning:de.ExclamationTriangle,error:de.XCircle,info:de.InfoCircle,pending:de.Clock,default:de.QuestionCircle},d={success:"성공",warning:"경고",error:"오류",info:"정보",pending:"대기 중",default:"기본"},u=r||c[t],f=e||d[t],g=l[t];return h.jsxs(Q,{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-medium border ${g} ${s}`,style:o,id:i,...a,children:[n&&h.jsx(re,{name:u,className:"w-4 h-4"}),h.jsx(Q,{children:f})]})},Dd={blue:"bg-blue-100 text-blue-800 dark:bg-blue-900/30 dark:text-blue-300",green:"bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-300",red:"bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-300",gray:"bg-gray-100 text-gray-800 dark:bg-gray-700 dark:text-gray-300",yellow:"bg-yellow-100 text-yellow-800 dark:bg-yellow-900/30 dark:text-yellow-300",purple:"bg-purple-100 text-purple-800 dark:bg-purple-900/30 dark:text-purple-300",orange:"bg-orange-100 text-orange-800 dark:bg-orange-900/30 dark:text-orange-300",teal:"bg-teal-100 text-teal-800 dark:bg-teal-900/30 dark:text-teal-300",cyan:"bg-cyan-100 text-cyan-800 dark:bg-cyan-900/30 dark:text-cyan-300"},bb={success:"green",warning:"yellow",danger:"red",error:"red",info:"blue",primary:"blue",secondary:"gray",text:"gray",default:"gray"},Id={sm:"px-1.5 py-0.5 text-[10px]",md:"px-2 py-0.5 text-xs",lg:"px-2.5 py-1 text-sm"},Ld=({color:t,variant:e,text:n,size:r="md",className:s="",style:o,children:i,id:a,editorAttrs:l})=>{const c=t||(e?bb[e]:void 0)||"gray",d=Dd[c]||Dd.gray,u=Id[r]||Id.md;return h.jsxs(Q,{className:`inline-flex items-center rounded-full font-medium ${u} ${d} ${s}`,style:o,id:a,...l,children:[n,i]})};const{entries:Pd,setPrototypeOf:$d,isFrozen:yb,getPrototypeOf:vb,getOwnPropertyDescriptor:xb}=Object;let{freeze:jt,seal:cn,create:Fd}=Object,{apply:Ua,construct:Ba}=typeof Reflect<"u"&&Reflect;jt||(jt=function(e){return e}),cn||(cn=function(e){return e}),Ua||(Ua=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];return e.apply(n,s)}),Ba||(Ba=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return new e(...r)});const Fo=Gt(Array.prototype.forEach),wb=Gt(Array.prototype.lastIndexOf),zd=Gt(Array.prototype.p Line truncated
`+we),J&&Fo([L,F,$],Ke=>{we=vs(we,Ke," ")}),E&&ke?E.createHTML(we):we},e.setConfig=function(){let Ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};tn(Ce),ae=!0},e.clearConfig=function(){Ze=null,ae=!1},e.isValidAttribute=function(Ce,Y,ie){Ze||tn({});const xe=De(Ce),ft=De(Y);return Ao(xe,ft,ie)},e.addHook=function(Ce,Y){typeof Y=="function"&&ys(O[Ce],Y)},e.removeHook=function(Ce,Y){if(Y!==void 0){const ie=wb(O[Ce],Y);return ie===-1?void 0:kb(O[Ce],ie,1)[0]}return zd(O[Ce])},e.removeHooks=function(Ce){O[Ce]=[]},e.removeAllHooks=function(){O=Yd()},e}var Vb=Xd();const qa=({content:t,text:e,isHtml:n=!0,className:r="",purifyConfig:s,id:o,editorAttrs:i})=>{const a=e??t??"";if(!a||a.trim()==="")return null;if(!n){const u=`
whitespace-pre-wrap
text-gray-900 dark:text-gray-100
font-sans
${r}
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:u,id:o,...i,children:a})}const l={FORBID_TAGS:["script","noscript","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","button","style","link","meta","base","body","head","html","title","svg","math","audio","video","source","track","canvas","details","dialog","plaintext","xmp","listing","marquee","noframes","noembed","template","slot"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","ontoggle","oncanplay","onloadstart","formaction","xlink:href","action"],ALLOW_DATA_ATTR:!0,ADD_ATTR:["target"]},c=v.useMemo(()=>{const u=s?{...l,...s,FORBID_TAGS:[...l.FORBID_TAGS,...s.FORBID_TAGS||[]],FORBID_ATTR:[...l.FORBID_ATTR,...s.FORBID_ATTR||[]]}:l;return Ib.sanitize(a,u).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(g,m,p,y)=>(p.startsWith("http://")||p.startsWith("https://"))&&!g.includes("rel=")?`<a ${m}href="${p}"${y} rel="noopener noreferrer">`:g)},[a,s]),d=`
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:u,id:o,...i,children:a})}const l={FORBID_TAGS:["script","noscript","iframe","frame","frameset","object","embed","applet","portal","form","input","textarea","select","button","style","link","meta","base","body","head","html","title","svg","math","audio","video","source","track","canvas","details","dialog","plaintext","xmp","listing","marquee","noframes","noembed","template","slot"],FORBID_ATTR:["onerror","onload","onclick","onmouseover","onfocus","onblur","ontoggle","oncanplay","onloadstart","formaction","xlink:href","action"],ALLOW_DATA_ATTR:!0,ADD_ATTR:["target"]},c=v.useMemo(()=>{const u=s?{...l,...s,FORBID_TAGS:[...l.FORBID_TAGS,...s.FORBID_TAGS||[]],FORBID_ATTR:[...l.FORBID_ATTR,...s.FORBID_ATTR||[]]}:l;return Vb.sanitize(a,u).replace(/<a\s+([^>]*?)href=["']([^"']+)["']([^>]*?)>/gi,(g,m,p,y)=>(p.startsWith("http://")||p.startsWith("https://"))&&!g.includes("rel=")?`<a ${m}href="${p}"${y} rel="noopener noreferrer">`:g)},[a,s]),d=`
prose dark:prose-invert max-w-none
prose-p:my-2
prose-headings:font-bold prose-headings:mt-6 prose-headings:mb-4
@@ -35,67 +35,67 @@ var SirsoftAdminBasic=(function(R,h,v,Nn){"use strict";var _T=Object.definePrope
[&_tr:hover]:bg-gray-50 dark:[&_tr:hover]:bg-gray-700/50
after:content-[''] after:block after:clear-both
${r}
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:d,dangerouslySetInnerHTML:{__html:c},id:o,...i})},zo=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...t)=>console.log("[Comp:DataGrid]",...t),warn:(...t)=>console.warn("[Comp:DataGrid]",...t),error:(...t)=>console.error("[Comp:DataGrid]",...t)},Cs=(t,e)=>window.G7Core?.t?.(t,e)??t,Ka={Div:I,Span:Q,Button:oe,Icon:re,Checkbox:vn,P:bt,A:Lr,Label:en,Input:wt,H1:Ta,H2:Zn,H3:Ir,H4:_d,Img:yn,Select:Pr,Textarea:qn,Table:La,Thead:Pa,Tbody:$a,Tfoot:Fa,Tr:Qn,Th:$r,Td:Yt,MultilingualInput:Va,Toggle:za,StatusBadge:Po,Badge:Dd,HtmlContent:Xa,ActionMenu:bs},qa=t=>{if(t==null)return"";if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return t.map(e=>qa(e)).join(", ");if(typeof t=="object"){if(v.isValidElement(t))return t;if(Object.keys(t).length===0)return"";try{return JSON.stringify(t)}catch{return zo.warn("객체를 문자열로 변환할 수 없습니다:",t),"[Object]"}}return String(t)},Yd=(t,e)=>{if(!t)return!0;const n=t.match(/^\{\{(.+)\}\}$/);if(!n)return!0;const r=n[1].trim();try{return!!new Function("row",`return ${r}`)(e)}catch(s){return zo.warn("subRow 조건 평가 실패:",t,s),!0}},Ss=(t,e,n,r="",s)=>{const o=window.G7Core;if(o?.renderItemChildren){const i={row:e,value:n,$value:n};return o.renderItemChildren(t,i,Ka,r,s?{componentContext:s}:void 0)}return zo.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Za=(t,e,n="",r)=>{const s=window.G7Core;if(s?.renderItemChildren){const o={row:e,$value:e};return s.renderItemChildren(t,o,Ka,n,r?{componentContext:r}:void 0)}return zo.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Lb=({id:t,columns:e,data:n,sortable:r=!0,pagination:s=!1,pageSize:o=10,onRowClick:i,className:a="",style:l,sortField:c,sortDirection:d,onSortChange:u,selectable:f=!1,selectedIds:g=[],onSelectionChange:m,idField:p="id",showColumnSelector:y=!1,visibleColumns:b,onColumnVisibilityChange:S,responsiveBreakpoint:x=768,cardRenderer:E,rowActions:k,onRowAction:C,alwaysShowPagination:N=!1,serverSidePagination:_=!1,serverCurrentPage:w,serverTotalPages:M,onPageChange:O,prevText:L,nextText:$,columnSelectorText:F,emptyMessage:D,actionsColumnHeader:A,requiredText:T,selectedCountText:V,showFirstLast:H=!0,expandable:W=!1,expandedRowIds:j,onExpandChange:U,expandChildren:B,expandedRowRender:G,expandColumnWidth:z="48px",expandIconExpanded:K=de.ChevronDown,expandIconCollapsed:X=de.ChevronRight,expandConditionField:Z,dynamicColumns:ee,dynamicColumnsInsertAfter:ne,expandContext:he,__componentContext:J,subRowChildren:ce,subRowCondition:ue,subRowClassName:ie="px-6 py-2 bg-gray-50 dark:bg-gray-900",subRowRender:ve,footerCells:fe,footerClassName:ye="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:Se,editorAttrs:He})=>{const se=L||void 0,Ae=$||void 0,Le=F??Cs("common.column_selector"),Ie=D??Cs("common.no_data"),Be=A??Cs("common.actions"),st=T??Cs("common.required"),ft=V??Cs("common.selected_count"),je=window.G7Core,Je=je?.useControllableState,Xe=je?.shallowArrayEqual,[te,ge]=Je?Je(c,null,q=>{q!==null&&u?.(q,pe)}):[c??null,()=>{}],[pe,me]=Je?Je(d,"asc",q=>{te!==null&&u?.(te,q)}):[d??"asc",()=>{}],[be,Ue]=v.useState(1),[Me,Fe]=Je?Je(j,[],U,{isEqual:Xe}):[j??[],()=>{}],[_e,ot]=v.useState(!1),it=v.useRef(null),we=je?.useResponsive,Ee=we?.(),ze=Ee?Ee.width<x:typeof window<"u"&&window.innerWidth<x,qe=v.useMemo(()=>{if(!ee||!Array.isArray(ee)||ee.length===0)return e;if(ne){const q=e.findIndex(le=>le.field===ne);if(q!==-1)return[...e.slice(0,q+1),...ee,...e.slice(q+1)]}return[...e,...ee]},[e,ee,ne]),[Re,nt]=v.useState(()=>b&&b.length>0?b:e.filter(q=>!q.hidden).map(q=>q.field));v.useEffect(()=>{b&&b.length>0&&nt(b)},[b]);const gt=v.useRef("");v.useEffect(()=>{const q=e.map(le=>le.field).join(",");gt.current&&q!==gt.current&&(!b||b.length===0)&&nt(e.filter(le=>!le.hidden).map(le=>le.field)),gt.current=q},[e,b]);const mn=v.useRef([]),mt=v.useRef(null);v.useEffect(()=>{if(ee&&ee.length>0){const q=ee.map(We=>We.field);if(mt.current===null&&(mt.current=b!==void 0&&b.length>0,mt.current)){mn.current=q;return}const le=mn.current,ke=q.filter(We=>!le.includes(We));if(ke.length>0){const We=ke.filter(Pe=>!Re.includes(Pe));if(We.length>0){const Pe=[...Re,...We];nt(Pe),S?.(Pe)}}mn.current=q}},[ee]),v.useEffect(()=>{_||Ue(1)},[n,_]),v.useEffect(()=>{const q=le=>{it.current&&!it.current.contains(le.target)&&ot(!1)};return _e&&document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[_e]);const xt=v.useMemo(()=>!y&&(!b||b.length===0)?qe.filter(q=>!q.hidden):qe.filter(q=>Re.includes(q.field)),[qe,Re,y,b]),Dt=v.useMemo(()=>!te||!r||!n?n||[]:u?n:[...n].sort((q,le)=>{const ke=q[te],We=le[te];if(ke===We)return 0;const Pe=ke>We?1:-1;return pe==="asc"?Pe:-Pe}),[n,te,pe,r,u]),Ve=v.useMemo(()=>{if(_||!s)return Dt;const q=(be-1)*o,le=q+o;return Dt.slice(q,le)},[Dt,be,o,s,_]),sn=_?w||1:be,on=_?M||1:Math.ceil((Dt?.length||0)/o),Rt=v.useCallback(q=>{_&&O? Line truncated
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:d,dangerouslySetInnerHTML:{__html:c},id:o,...i})},Ho=window.G7Core?.createLogger?.("Comp:DataGrid")??{log:(...t)=>console.log("[Comp:DataGrid]",...t),warn:(...t)=>console.warn("[Comp:DataGrid]",...t),error:(...t)=>console.error("[Comp:DataGrid]",...t)},Cs=(t,e)=>window.G7Core?.t?.(t,e)??t,Za={Div:I,Span:Q,Button:oe,Icon:re,Checkbox:vn,P:bt,A:Lr,Label:rn,Input:wt,H1:Aa,H2:Qn,H3:Ir,H4:Md,Img:yn,Select:Pr,Textarea:Zn,Table:Pa,Thead:$a,Tbody:Fa,Tfoot:za,Tr:Jn,Th:$r,Td:Kt,MultilingualInput:Va,Toggle:Ha,StatusBadge:$o,Badge:Ld,HtmlContent:qa,ActionMenu:bs},Qa=t=>{if(t==null)return"";if(typeof t=="string"||typeof t=="number"||typeof t=="boolean")return String(t);if(Array.isArray(t))return t.map(e=>Qa(e)).join(", ");if(typeof t=="object"){if(v.isValidElement(t))return t;if(Object.keys(t).length===0)return"";try{return JSON.stringify(t)}catch{return Ho.warn("객체를 문자열로 변환할 수 없습니다:",t),"[Object]"}}return String(t)},Kd=(t,e)=>{if(!t)return!0;const n=t.match(/^\{\{(.+)\}\}$/);if(!n)return!0;const r=n[1].trim();try{return!!new Function("row",`return ${r}`)(e)}catch(s){return Ho.warn("subRow 조건 평가 실패:",t,s),!0}},Ss=(t,e,n,r="",s)=>{const o=window.G7Core;if(o?.renderItemChildren){const i={row:e,value:n,$value:n};return o.renderItemChildren(t,i,Za,r,s?{componentContext:s}:void 0)}return Ho.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Ja=(t,e,n="",r)=>{const s=window.G7Core;if(s?.renderItemChildren){const o={row:e,$value:e};return s.renderItemChildren(t,o,Za,n,r?{componentContext:r}:void 0)}return Ho.warn("G7Core.renderItemChildren을 사용할 수 없습니다."),null},Hb=({id:t,columns:e,data:n,sortable:r=!0,pagination:s=!1,pageSize:o=10,onRowClick:i,className:a="",style:l,sortField:c,sortDirection:d,onSortChange:u,selectable:f=!1,selectedIds:g=[],onSelectionChange:m,idField:p="id",showColumnSelector:y=!1,visibleColumns:b,onColumnVisibilityChange:S,responsiveBreakpoint:x=768,cardRenderer:E,rowActions:k,onRowAction:C,alwaysShowPagination:N=!1,serverSidePagination:_=!1,serverCurrentPage:w,serverTotalPages:M,onPageChange:O,prevText:L,nextText:F,columnSelectorText:$,emptyMessage:D,actionsColumnHeader:A,requiredText:T,selectedCountText:z,showFirstLast:H=!0,expandable:W=!1,expandedRowIds:j,onExpandChange:U,expandChildren:B,expandedRowRender:G,expandColumnWidth:V="48px",expandIconExpanded:K=de.ChevronDown,expandIconCollapsed:X=de.ChevronRight,expandConditionField:Z,dynamicColumns:ee,dynamicColumnsInsertAfter:ne,expandContext:he,__componentContext:J,subRowChildren:ce,subRowCondition:ue,subRowClassName:ae="px-6 py-2 bg-gray-50 dark:bg-gray-900",subRowRender:ve,footerCells:fe,footerClassName:ye="bg-gray-50 dark:bg-gray-800/50 font-medium",footerCardChildren:ke,editorAttrs:Ue})=>{const se=L||void 0,Oe=F||void 0,Pe=$??Cs("common.column_selector"),Ie=D??Cs("common.no_data"),je=A??Cs("common.actions"),st=T??Cs("common.required"),ut=z??Cs("common.selected_count"),We=window.G7Core,et=We?.useControllableState,Xe=We?.shallowArrayEqual,[te,ge]=et?et(c,null,q=>{q!==null&&u?.(q,pe)}):[c??null,()=>{}],[pe,me]=et?et(d,"asc",q=>{te!==null&&u?.(te,q)}):[d??"asc",()=>{}],[be,Be]=v.useState(1),[Se,ze]=et?et(j,[],U,{isEqual:Xe}):[j??[],()=>{}],[_e,Re]=v.useState(!1),ot=v.useRef(null),$e=We?.useResponsive,Te=$e?.(),He=Te?Te.width<x:typeof window<"u"&&window.innerWidth<x,De=v.useMemo(()=>{if(!ee||!Array.isArray(ee)||ee.length===0)return e;if(ne){const q=e.findIndex(le=>le.field===ne);if(q!==-1)return[...e.slice(0,q+1),...ee,...e.slice(q+1)]}return[...e,...ee]},[e,ee,ne]),[Ze,it]=v.useState(()=>b&&b.length>0?b:e.filter(q=>!q.hidden).map(q=>q.field));v.useEffect(()=>{b&&b.length>0&&it(b)},[b]);const gt=v.useRef("");v.useEffect(()=>{const q=e.map(le=>le.field).join(",");gt.current&&q!==gt.current&&(!b||b.length===0)&&it(e.filter(le=>!le.hidden).map(le=>le.field)),gt.current=q},[e,b]);const tn=v.useRef([]),mt=v.useRef(null);v.useEffect(()=>{if(ee&&ee.length>0){const q=ee.map(Ke=>Ke.field);if(mt.current===null&&(mt.current=b!==void 0&&b.length>0,mt.current)){tn.current=q;return}const le=tn.current,we=q.filter(Ke=>!le.includes(Ke));if(we.length>0){const Ke=we.filter(Le=>!Ze.includes(Le));if(Ke.length>0){const Le=[...Ze,...Ke];it(Le),S?.(Le)}}tn.current=q}},[ee]),v.useEffect(()=>{_||Be(1)},[n,_]),v.useEffect(()=>{const q=le=>{ot.current&&!ot.current.contains(le.target)&&Re(!1)};return _e&&document.addEventListener("mousedown",q),()=>document.removeEventListener("mousedown",q)},[_e]);const xt=v.useMemo(()=>!y&&(!b||b.length===0)?De.filter(q=>!q.hidden):De.filter(q=>Ze.includes(q.field)),[De,Ze,y,b]),Dt=v.useMemo(()=>!te||!r||!n?n||[]:u?n:[...n].sort((q,le)=>{const we=q[te],Ke=le[te];if(we===Ke)return 0;const Le=we>Ke?1:-1;return pe==="asc"?Le:-Le}),[n,te,pe,r,u]),Ve=v.useMemo(()=>{if(_||!s)return Dt;const q=(be-1)*o,le=q+o;return Dt.slice(q,le)},[Dt,be,o,s,_]),Bt=_?w||1:be,ln=_?M||1:Math.ceil((Dt?.length||0)/o),nn=v.useCallback(q=>{_&&O? Line truncated
flex items-center gap-3 p-4 rounded-lg border shadow-lg
min-w-[300px] max-w-md
transition-all duration-300
${s.bg}
${n?"opacity-100 translate-y-0":`opacity-0 ${i}`}
`,role:"alert",children:[h.jsx(re,{name:o,className:`w-5 h-5 flex-shrink-0 ${s.text}`}),h.jsx(Q,{className:`flex-1 text-sm font-medium ${s.text}`,children:t.message}),h.jsx(oe,{onClick:r,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${s.text} focus:outline-none`,"aria-label":ry("common.close_notification"),children:h.jsx(re,{name:de.Times,className:"w-4 h-4"})})]})},nu=({items:t,separator:e=h.jsx(re,{name:de.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:r="/",maxItems:s,className:o="",id:i,editorAttrs:a})=>{let c=n?[{label:"Home",href:r},...t]:t,d=c,u=!1;if(s&&c.length>s){u=!0;const f=c.slice(0,1),g=c.slice(-(s-2));d=[...f,...g]}return h.jsx(Io,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",id:i,...a,children:h.jsx(I,{className:"flex items-center space-x-2",children:d.map((f,g)=>{const m=g===d.length-1,p=g===0;return h.jsxs(v.Fragment,{children:[u&&p&&h.jsxs(h.Fragment,{children:[h.jsx(ru,{item:f,isLast:!1}),h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e}),h.jsx(Q,{className:"text-gray-500 dark:text-gray-400",children:"..."}),d.length>1&&h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e})]}),(!u||!p)&&h.jsxs(h.Fragment,{children:[h.jsx(ru,{item:f,isLast:m}),!m&&h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e})]})]},g)})})})},ru=({item:t,isLast:e})=>e||!t.href&&!t.onClick?h.jsx(Q,{className:"font-medium text-gray-900 dark:text-white","aria-current":e?"page":void 0,children:t.label}):t.onClick?h.jsx(Lr,{href:"#",onClick:n=>{n.preventDefault(),t.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:t.label}):h.jsx(Lr,{href:t.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:t.label}),ly=({title:t,description:e,iconName:n,illustrationSrc:r,illustrationAlt:s="Empty state illustration",actions:o=[],className:i="",id:a,editorAttrs:l})=>{const c={primary:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-500"};return h.jsxs(I,{className:`flex flex-col items-center justify-center p-8 text-center ${i}`,role:"status","aria-live":"polite",id:a,...l,children:[r?h.jsx(yn,{src:r,alt:s,className:"w-48 h-48 mb-6 object-contain"}):n?h.jsx(I,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:h.jsx(re,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,h.jsx(Zn,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t}),e&&h.jsx(bt,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:e}),o.length>0&&h.jsx(I,{className:"flex flex-wrap gap-3 justify-center",children:o.map((d,u)=>h.jsxs(oe,{onClick:d.onClick,className:`
`,role:"alert",children:[h.jsx(re,{name:o,className:`w-5 h-5 flex-shrink-0 ${s.text}`}),h.jsx(Q,{className:`flex-1 text-sm font-medium ${s.text}`,children:t.message}),h.jsx(oe,{onClick:r,className:`flex-shrink-0 p-1 rounded hover:bg-black/10 dark:hover:bg-white/10 ${s.text} focus:outline-none`,"aria-label":cy("common.close_notification"),children:h.jsx(re,{name:de.Times,className:"w-4 h-4"})})]})},su=({items:t,separator:e=h.jsx(re,{name:de.ChevronRight,className:"w-4 h-4 text-gray-400 dark:text-gray-500"}),showHome:n=!1,homeHref:r="/",maxItems:s,className:o="",id:i,editorAttrs:a})=>{let c=n?[{label:"Home",href:r},...t]:t,d=c,u=!1;if(s&&c.length>s){u=!0;const f=c.slice(0,1),g=c.slice(-(s-2));d=[...f,...g]}return h.jsx(Lo,{className:`flex items-center space-x-2 text-sm ${o}`,"aria-label":"Breadcrumb",id:i,...a,children:h.jsx(I,{className:"flex items-center space-x-2",children:d.map((f,g)=>{const m=g===d.length-1,p=g===0;return h.jsxs(v.Fragment,{children:[u&&p&&h.jsxs(h.Fragment,{children:[h.jsx(ou,{item:f,isLast:!1}),h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e}),h.jsx(Q,{className:"text-gray-500 dark:text-gray-400",children:"..."}),d.length>1&&h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e})]}),(!u||!p)&&h.jsxs(h.Fragment,{children:[h.jsx(ou,{item:f,isLast:m}),!m&&h.jsx(Q,{className:"text-gray-400 dark:text-gray-500","aria-hidden":"true",children:e})]})]},g)})})})},ou=({item:t,isLast:e})=>e||!t.href&&!t.onClick?h.jsx(Q,{className:"font-medium text-gray-900 dark:text-white","aria-current":e?"page":void 0,children:t.label}):t.onClick?h.jsx(Lr,{href:"#",onClick:n=>{n.preventDefault(),t.onClick?.()},className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:t.label}):h.jsx(Lr,{href:t.href,className:"text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 transition-colors",children:t.label}),gy=({title:t,description:e,iconName:n,illustrationSrc:r,illustrationAlt:s="Empty state illustration",actions:o=[],className:i="",id:a,editorAttrs:l})=>{const c={primary:"bg-blue-600 text-white hover:bg-blue-700 focus:ring-blue-500",secondary:"bg-gray-200 dark:bg-gray-700 text-gray-800 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600 focus:ring-gray-500",danger:"bg-red-600 text-white hover:bg-red-700 focus:ring-red-500",ghost:"bg-transparent text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 focus:ring-gray-500"};return h.jsxs(I,{className:`flex flex-col items-center justify-center p-8 text-center ${i}`,role:"status","aria-live":"polite",id:a,...l,children:[r?h.jsx(yn,{src:r,alt:s,className:"w-48 h-48 mb-6 object-contain"}):n?h.jsx(I,{className:"mb-6 p-4 rounded-full bg-gray-100 dark:bg-gray-700",children:h.jsx(re,{name:n,className:"w-12 h-12 text-gray-400 dark:text-gray-500"})}):null,h.jsx(Qn,{className:"text-xl font-semibold text-gray-900 dark:text-white mb-2",children:t}),e&&h.jsx(bt,{className:"text-gray-600 dark:text-gray-400 mb-6 max-w-md",children:e}),o.length>0&&h.jsx(I,{className:"flex flex-wrap gap-3 justify-center",children:o.map((d,u)=>h.jsxs(oe,{onClick:d.onClick,className:`
px-4 py-2 rounded-md font-medium transition-colors
focus:outline-none focus:ring-2 focus:ring-offset-2
${c[d.variant||"primary"]}
`,children:[d.iconName&&h.jsx(re,{name:d.iconName,className:"w-4 h-4 mr-2 inline-block"}),d.label]},u))})]})},cy=(t,e)=>window.G7Core?.t?.(t,e)??t,dy=({id:t,size:e="md",color:n="text-blue-600",fullscreen:r=!1,text:s,className:o="",editorAttrs:i})=>{const a={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},l={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},c=h.jsxs(I,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[h.jsx(I,{className:`
`,children:[d.iconName&&h.jsx(re,{name:d.iconName,className:"w-4 h-4 mr-2 inline-block"}),d.label]},u))})]})},py=(t,e)=>window.G7Core?.t?.(t,e)??t,my=({id:t,size:e="md",color:n="text-blue-600",fullscreen:r=!1,text:s,className:o="",editorAttrs:i})=>{const a={sm:"w-4 h-4 border-2",md:"w-8 h-8 border-2",lg:"w-12 h-12 border-3",xl:"w-16 h-16 border-4"},l={sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"},c=h.jsxs(I,{className:`flex flex-col items-center justify-center gap-3 ${o}`,children:[h.jsx(I,{className:`
${a[e]}
border-gray-200 dark:border-gray-700 border-t-current
rounded-full animate-spin
${n}
`,role:"status","aria-label":cy("common.loading")}),s&&h.jsx(Q,{className:`${l[e]} ${n} font-medium`,children:s})]});return r?h.jsx(I,{id:t,className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90","aria-live":"polite","aria-busy":"true",...i,children:c}):h.jsx(I,{id:t,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",...i,children:c})},Vr=()=>window.G7Core,nl=(t,e)=>window.G7Core?.t?.(t,e)??t,uy=({logo:t,logoAlt:e="Logo",menu:n=[],collapsed:r=!1,onToggleCollapse:s,className:o="",currentLocale:i,id:a,editorAttrs:l})=>{const[c,d]=v.useState(new Set),[u,f]=v.useState(i||Vr()?.locale?.current?.()||"ko"),[g,m]=v.useState(window.location.pathname),p=v.useMemo(()=>{const w=[],M=O=>{for(const L of O)L.url&&w.push(L.url),L.children&&M(L.children)};return M(n),w},[n]),y=v.useCallback(w=>{let M=null;for(const O of p)(w===O||w.startsWith(O+"/"))&&(!M||O.length>M.length)&&(M=O);return M},[p]);v.useEffect(()=>{const w=Vr();return w?.state?.subscribe?w.state.subscribe(O=>{const L=O?._global?.locale||w?.locale?.current?.()||"ko";f(L);const $=O?._global?.currentPath||window.location.pathname;m($)}):void 0},[]),v.useEffect(()=>{const w=()=>{m(window.location.pathname)};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[]),v.useEffect(()=>{i&&f(i)},[i]);const b=(w,M)=>!w||typeof M!="string"?!1:M===w?!0:M.startsWith(w+"/")?y(M)===w:!1,S=(w,M)=>{const O=new Set,L=$=>{for(const F of $)if(F.children&&F.children.length>0){if(L(F.children)||b(F.url,M))return O.add(F.id),!0}else if(b(F.url,M))return!0;return!1};return L(w),O};v.useEffect(()=>{if(n.length>0&&g){const w=S(n,g);w.size>0&&d(M=>new Set([...M,...w]))}},[g,n]);const x=w=>b(w,g),E=w=>w.children?w.children.some(M=>x(M.url)||E(M)):!1,k=w=>{d(M=>{const O=new Set(M);return O.has(w)?O.delete(w):O.add(w),O})},C=w=>typeof w=="string"?w:w[u]||w.en||Object.values(w)[0]||"",N=(w,M)=>{Vr()?.dispatch?(w.preventDefault(),Vr().navigation?.onComplete(()=>{Vr().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),Vr().dispatch({handler:"navigate",params:{path:M}})):window.location.href=M},_=(w,M=0,O=!1)=>{const L=w.children&&w.children.length>0,$=c.has(w.id),F=C(w.name),D=M>0,A=x(w.url),T=E(w),V=D?"admin-sidebar-subitem":"admin-sidebar-item",H="admin-sidebar-item-active",W="admin-sidebar-item-active-parent",j="admin-sidebar-item-default";return h.jsxs(I,{className:D?"relative group":"",children:[D&&h.jsxs(h.Fragment,{children:[!O&&h.jsx(I,{className:"admin-sidebar-tree-line-vertical"}),h.jsx(I,{className:"admin-sidebar-tree-line-curve"})]}),L&&w.url?h.jsxs(I,{className:`
${V}
`,role:"status","aria-label":py("common.loading")}),s&&h.jsx(Q,{className:`${l[e]} ${n} font-medium`,children:s})]});return r?h.jsx(I,{id:t,className:"fixed inset-0 z-50 flex items-center justify-center bg-white dark:bg-gray-900 bg-opacity-90 dark:bg-opacity-90","aria-live":"polite","aria-busy":"true",...i,children:c}):h.jsx(I,{id:t,className:"flex items-center justify-center p-4","aria-live":"polite","aria-busy":"true",...i,children:c})},zr=()=>window.G7Core,sl=(t,e)=>window.G7Core?.t?.(t,e)??t,by=({logo:t,logoAlt:e="Logo",menu:n=[],collapsed:r=!1,onToggleCollapse:s,className:o="",currentLocale:i,id:a,editorAttrs:l})=>{const[c,d]=v.useState(new Set),[u,f]=v.useState(i||zr()?.locale?.current?.()||"ko"),[g,m]=v.useState(window.location.pathname),p=v.useMemo(()=>{const w=[],M=O=>{for(const L of O)L.url&&w.push(L.url),L.children&&M(L.children)};return M(n),w},[n]),y=v.useCallback(w=>{let M=null;for(const O of p)(w===O||w.startsWith(O+"/"))&&(!M||O.length>M.length)&&(M=O);return M},[p]);v.useEffect(()=>{const w=zr();return w?.state?.subscribe?w.state.subscribe(O=>{const L=O?._global?.locale||w?.locale?.current?.()||"ko";f(L);const F=O?._global?.currentPath||window.location.pathname;m(F)}):void 0},[]),v.useEffect(()=>{const w=()=>{m(window.location.pathname)};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[]),v.useEffect(()=>{i&&f(i)},[i]);const b=(w,M)=>!w||typeof M!="string"?!1:M===w?!0:M.startsWith(w+"/")?y(M)===w:!1,S=(w,M)=>{const O=new Set,L=F=>{for(const $ of F)if($.children&&$.children.length>0){if(L($.children)||b($.url,M))return O.add($.id),!0}else if(b($.url,M))return!0;return!1};return L(w),O};v.useEffect(()=>{if(n.length>0&&g){const w=S(n,g);w.size>0&&d(M=>new Set([...M,...w]))}},[g,n]);const x=w=>b(w,g),E=w=>w.children?w.children.some(M=>x(M.url)||E(M)):!1,k=w=>{d(M=>{const O=new Set(M);return O.has(w)?O.delete(w):O.add(w),O})},C=w=>typeof w=="string"?w:w[u]||w.en||Object.values(w)[0]||"",N=(w,M)=>{zr()?.dispatch?(w.preventDefault(),zr().navigation?.onComplete(()=>{zr().dispatch({handler:"setState",params:{target:"global",sidebarOpen:!1}})}),zr().dispatch({handler:"navigate",params:{path:M}})):window.location.href=M},_=(w,M=0,O=!1)=>{const L=w.children&&w.children.length>0,F=c.has(w.id),$=C(w.name),D=M>0,A=x(w.url),T=E(w),z=D?"admin-sidebar-subitem":"admin-sidebar-item",H="admin-sidebar-item-active",W="admin-sidebar-item-active-parent",j="admin-sidebar-item-default";return h.jsxs(I,{className:D?"relative group":"",children:[D&&h.jsxs(h.Fragment,{children:[!O&&h.jsx(I,{className:"admin-sidebar-tree-line-vertical"}),h.jsx(I,{className:"admin-sidebar-tree-line-curve"})]}),L&&w.url?h.jsxs(I,{className:`
${z}
${A?H:T?W:j}
${r?"justify-center":""}
`,children:[h.jsxs(oe,{onClick:B=>N(B,w.url),className:"flex items-center justify-start flex-1 min-w-0",children:[w.icon&&h.jsx(pt,{className:`${w.icon} ${r?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!r&&h.jsx(Q,{className:"truncate",children:F})]}),!r&&h.jsxs(I,{className:"admin-sidebar-chevron-trail",children:[w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"}),h.jsx(oe,{onClick:()=>k(w.id),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600","aria-label":nl($?"common.collapse":"common.expand"),children:h.jsx(pt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${$?"rotate-180":""}`})})]})]}):L?h.jsxs(oe,{onClick:()=>k(w.id),className:`
${V}
`,children:[h.jsxs(oe,{onClick:B=>N(B,w.url),className:"flex items-center justify-start flex-1 min-w-0",children:[w.icon&&h.jsx(pt,{className:`${w.icon} ${r?"":"mr-3"} w-5 h-5 flex items-center justify-center`}),!r&&h.jsx(Q,{className:"truncate",children:$})]}),!r&&h.jsxs(I,{className:"admin-sidebar-chevron-trail",children:[w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"}),h.jsx(oe,{onClick:()=>k(w.id),className:"p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-600","aria-label":sl(F?"common.collapse":"common.expand"),children:h.jsx(pt,{className:`fas fa-chevron-down w-4 h-4 transition-transform ${F?"rotate-180":""}`})})]})]}):L?h.jsxs(oe,{onClick:()=>k(w.id),className:`
${z}
${T?W:j}
${r?"justify-center":""}
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:F})]}),!r&&h.jsxs(I,{className:"admin-sidebar-chevron-trail",children:[w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"}),h.jsx(pt,{className:`fas fa-chevron-right w-4 h-4 text-slate-400 transition-transform duration-200 ${$?"rotate-90":""}`})]})]}):w.url?h.jsxs(oe,{onClick:B=>N(B,w.url),className:`
${V}
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:$})]}),!r&&h.jsxs(I,{className:"admin-sidebar-chevron-trail",children:[w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"}),h.jsx(pt,{className:`fas fa-chevron-right w-4 h-4 text-slate-400 transition-transform duration-200 ${F?"rotate-90":""}`})]})]}):w.url?h.jsxs(oe,{onClick:B=>N(B,w.url),className:`
${z}
${A?H:j}
${r?"justify-center":""}
text-left
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:F})]}),!r&&w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"})]}):h.jsxs(oe,{className:`
${V}
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:$})]}),!r&&w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"})]}):h.jsxs(oe,{className:`
${z}
admin-sidebar-item-disabled
${r?"justify-center":""}
text-left
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:F})]}),!r&&w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"})]}),L&&!r&&$&&h.jsx(I,{className:"relative ml-2",children:w.children.map((B,G)=>_(B,M+1,G===w.children.length-1))})]},w.id)};return h.jsxs(I,{className:o,id:a,...l,children:[(t||s)&&h.jsxs(I,{className:"admin-sidebar-header",children:[t&&!r&&h.jsx(yn,{src:t,alt:e,className:"h-8"}),s&&h.jsx(oe,{onClick:s,className:"admin-sidebar-collapse-btn","aria-label":nl(r?"common.expand_sidebar":"common.collapse_sidebar"),children:h.jsx(pt,{className:`${r?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-slate-600 dark:text-slate-400`})})]}),h.jsx(I,{className:"admin-sidebar-menu-list",children:n.map((w,M)=>_(w,0,M===n.length-1))})]})},_s=(t,e)=>window.G7Core?.t?.(t,e)??t,fy=({user:t={name:"",email:""},notifications:e=[],onNotificationClick:n,onProfileClick:r,onLogoutClick:s,className:o=""})=>{const[i,a]=v.useState(!1),[l,c]=v.useState(!1),d=v.useRef(null),u=v.useRef(null),f=e.filter(g=>!g.read).length;return v.useEffect(()=>{const g=m=>{d.current&&!d.current.contains(m.target)&&a(!1),u.current&&!u.current.contains(m.target)&&c(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]),h.jsxs(I,{className:`
`,children:[h.jsxs(I,{className:"admin-sidebar-item-content",children:[w.icon&&h.jsx(I,{className:"admin-sidebar-icon-box",children:h.jsx(pt,{className:w.icon})}),!r&&h.jsx(Q,{children:$})]}),!r&&w.module_id&&h.jsx(pt,{className:"fas fa-cube admin-sidebar-module-icon",title:"모듈 메뉴"})]}),L&&!r&&F&&h.jsx(I,{className:"relative ml-2",children:w.children.map((B,G)=>_(B,M+1,G===w.children.length-1))})]},w.id)};return h.jsxs(I,{className:o,id:a,...l,children:[(t||s)&&h.jsxs(I,{className:"admin-sidebar-header",children:[t&&!r&&h.jsx(yn,{src:t,alt:e,className:"h-8"}),s&&h.jsx(oe,{onClick:s,className:"admin-sidebar-collapse-btn","aria-label":sl(r?"common.expand_sidebar":"common.collapse_sidebar"),children:h.jsx(pt,{className:`${r?"fas fa-chevron-right":"fas fa-chevron-left"} w-5 h-5 text-slate-600 dark:text-slate-400`})})]}),h.jsx(I,{className:"admin-sidebar-menu-list",children:n.map((w,M)=>_(w,0,M===n.length-1))})]})},_s=(t,e)=>window.G7Core?.t?.(t,e)??t,yy=({user:t={name:"",email:""},notifications:e=[],onNotificationClick:n,onProfileClick:r,onLogoutClick:s,className:o=""})=>{const[i,a]=v.useState(!1),[l,c]=v.useState(!1),d=v.useRef(null),u=v.useRef(null),f=e.filter(g=>!g.read).length;return v.useEffect(()=>{const g=m=>{d.current&&!d.current.contains(m.target)&&a(!1),u.current&&!u.current.contains(m.target)&&c(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]),h.jsxs(I,{className:`
bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-6 py-4 flex items-center justify-end gap-4
${o}
`,children:[h.jsxs(I,{ref:d,className:"relative",children:[h.jsxs(oe,{onClick:()=>a(!i),className:"relative p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-full transition-colors","aria-label":_s("common.notifications"),children:[h.jsx(re,{name:de.Bell,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),f>0&&h.jsx(Q,{className:"absolute top-0 right-0 flex items-center justify-center w-5 h-5 text-xs font-bold text-white bg-red-500 rounded-full",children:f>9?"9+":f})]}),i&&h.jsxs(I,{className:"absolute right-0 mt-2 w-80 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[h.jsx(I,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx(Q,{className:"font-semibold text-gray-900 dark:text-white",children:_s("common.notifications")})}),h.jsx(I,{className:"max-h-96 overflow-y-auto",children:e.length===0?h.jsx(I,{className:"px-4 py-8 text-center text-gray-500 dark:text-gray-400",children:h.jsx(Q,{children:_s("common.no_notifications")})}):e.map(g=>h.jsx(oe,{onClick:()=>{g.onClick?.(),n?.(g.id),a(!1)},className:`
w-full px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-gray-700 border-b border-gray-100 dark:border-gray-700 transition-colors
${g.read?"":"bg-blue-50 dark:bg-blue-900/20"}
`,children:h.jsxs(I,{className:"flex items-start gap-3",children:[g.iconName&&h.jsx(re,{name:g.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),h.jsxs(I,{className:"flex-1",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:g.title}),h.jsx(I,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:g.message}),h.jsx(I,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:g.time})]}),!g.read&&h.jsx(Q,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},g.id))})]})]}),h.jsxs(I,{ref:u,className:"relative",children:[h.jsxs(oe,{onClick:()=>c(!l),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:[t.avatar?h.jsx(yn,{src:t.avatar,alt:t.name,className:"w-8 h-8 rounded-full object-cover"}):h.jsx(I,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:h.jsx(re,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),h.jsxs(I,{className:"hidden md:block text-left",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:t.name}),t.role&&h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-xs",children:t.role})]}),h.jsx(re,{name:de.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&h.jsxs(I,{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[h.jsxs(I,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white",children:t.name}),h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-sm",children:t.email})]}),h.jsxs(I,{className:"py-2",children:[h.jsxs(oe,{onClick:()=>{r?.(),c(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors text-gray-900 dark:text-white",children:[h.jsx(re,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{children:_s("common.profile_settings")})]}),h.jsxs(oe,{onClick:()=>{s?.(),c(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 text-red-600 dark:text-red-400 transition-colors",children:[h.jsx(re,{name:de.ArrowRight,className:"w-5 h-5"}),h.jsx(Q,{children:_s("common.logout")})]})]})]})]})]})},hy=({notifications:t=[],unreadCount:e=0,hasMore:n=!1,loading:r=!1,titleText:s="Notifications",emptyText:o="No notifications",markAllReadText:i="Mark all as read",deleteAllText:a="Delete all",unreadOnlyText:l="Unread only",unreadOnly:c=!1,onNotificationClick:d,onClose:u,onLoadMore:f,onMarkAllRead:g,onDeleteAll:m,onDelete:p,onUnreadOnlyToggle:y,dropdownAlign:b="right",className:S="",id:x,editorAttrs:E})=>{const[k,C]=v.useState(!1),N=v.useRef(null),_=v.useRef(null),w=v.useRef(null),M=v.useRef(null),O=v.useRef(new Set),L=v.useRef(f),$=v.useRef(n),F=v.useRef(r),D=v.useRef(t.length),A=v.useRef(-1);v.useEffect(()=>{L.current=f,$.current=n,F.current=r,D.current=t.length}),v.useEffect(()=>{if(!M.current||!w.current||!k)return;A.current=-1;const W=new IntersectionObserver(([j])=>{j.isIntersecting&&(F.current||!$.current||A.current!==D.current&&(A.current=D.current,L.current?.()))},{root:w.current,threshold:.1});return W.observe(M.current),()=>W.disconnect()},[k]),v.useEffect(()=>{if(!w.current||!k)return;const W=new IntersectionObserver(U=>{U.forEach(B=>{const G=B.target.getAttribute("data-notification-id"),z=B.target.getAttribute("data-unread")==="true";G&&z&&B.isIntersecting&&O.current.add(G)})},{root:w.current,threshold:.5});return w.current.querySelectorAll("[data-notification-id]").forEach(U=>W.observe(U)),()=>W.disconnect()},[k,t]);const T=e>0?e:t.filter(W=>!W.read).length,V=v.useCallback(()=>{if(k){if(T>0){const W=Array.from(O.current).filter(j=>{const U=t.find(B=>String(B.id)===String(j));return U&&!U.read});W.length>0&&u?.(W)}O.current.clear(),C(!1)}},[k,u,T,t]);v.useEffect(()=>{if(!k)return;const W=j=>{N.current&&!N.current.contains(j.target)&&V()};return document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[k,V]);const H=v.useCallback(()=>{k?V():C(!0)},[k,V]);return v.useLayoutEffect(()=>{const W=_.current;if(!k||!W)return;W.style.transform="";const j=W.getBoundingClientRect(),U=typeof window<"u"?window.innerWidth:0;if(j.width===0&&j.height===0)return;const B=8;let G=0;j.right>U-B?G=-(j.right-(U-B)):j.left<B&&(G=B-j.left),G!==0&&(W.style.transform=`translateX(${G}px)`)},[k,b,t.length]),h.jsxs(I,{ref:N,className:`relative ${S}`,id:x,...E,children:[h.jsxs(oe,{onClick:H,className:"relative w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors cursor-pointer","aria-label":s,children:[h.jsx(re,{name:de.Bell,className:"text-sm text-slate-500 dark:text-slate-400"}),T>0&&h.jsx(Q,{clas Line truncated
`,children:h.jsxs(I,{className:"flex items-start gap-3",children:[g.iconName&&h.jsx(re,{name:g.iconName,className:"w-5 h-5 text-gray-600 dark:text-gray-400 mt-0.5"}),h.jsxs(I,{className:"flex-1",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:g.title}),h.jsx(I,{className:"text-gray-600 dark:text-gray-400 text-sm mt-1",children:g.message}),h.jsx(I,{className:"text-gray-400 dark:text-gray-500 text-xs mt-1",children:g.time})]}),!g.read&&h.jsx(Q,{className:"w-2 h-2 bg-blue-500 rounded-full mt-1.5"})]})},g.id))})]})]}),h.jsxs(I,{ref:u,className:"relative",children:[h.jsxs(oe,{onClick:()=>c(!l),className:"flex items-center gap-3 px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors",children:[t.avatar?h.jsx(yn,{src:t.avatar,alt:t.name,className:"w-8 h-8 rounded-full object-cover"}):h.jsx(I,{className:"w-8 h-8 rounded-full bg-gray-300 dark:bg-gray-600 flex items-center justify-center",children:h.jsx(re,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"})}),h.jsxs(I,{className:"hidden md:block text-left",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white text-sm",children:t.name}),t.role&&h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-xs",children:t.role})]}),h.jsx(re,{name:de.ChevronDown,className:"w-4 h-4 text-gray-600 dark:text-gray-400"})]}),l&&h.jsxs(I,{className:"absolute right-0 mt-2 w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:[h.jsxs(I,{className:"px-4 py-3 border-b border-gray-200 dark:border-gray-700",children:[h.jsx(I,{className:"font-semibold text-gray-900 dark:text-white",children:t.name}),h.jsx(I,{className:"text-gray-500 dark:text-gray-400 text-sm",children:t.email})]}),h.jsxs(I,{className:"py-2",children:[h.jsxs(oe,{onClick:()=>{r?.(),c(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors text-gray-900 dark:text-white",children:[h.jsx(re,{name:de.User,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{children:_s("common.profile_settings")})]}),h.jsxs(oe,{onClick:()=>{s?.(),c(!1)},className:"w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 text-red-600 dark:text-red-400 transition-colors",children:[h.jsx(re,{name:de.ArrowRight,className:"w-5 h-5"}),h.jsx(Q,{children:_s("common.logout")})]})]})]})]})]})},vy=({notifications:t=[],unreadCount:e=0,hasMore:n=!1,loading:r=!1,titleText:s="Notifications",emptyText:o="No notifications",markAllReadText:i="Mark all as read",deleteAllText:a="Delete all",unreadOnlyText:l="Unread only",unreadOnly:c=!1,onNotificationClick:d,onClose:u,onLoadMore:f,onMarkAllRead:g,onDeleteAll:m,onDelete:p,onUnreadOnlyToggle:y,dropdownAlign:b="right",className:S="",id:x,editorAttrs:E})=>{const[k,C]=v.useState(!1),N=v.useRef(null),_=v.useRef(null),w=v.useRef(null),M=v.useRef(null),O=v.useRef(new Set),L=v.useRef(f),F=v.useRef(n),$=v.useRef(r),D=v.useRef(t.length),A=v.useRef(-1);v.useEffect(()=>{L.current=f,F.current=n,$.current=r,D.current=t.length}),v.useEffect(()=>{if(!M.current||!w.current||!k)return;A.current=-1;const W=new IntersectionObserver(([j])=>{j.isIntersecting&&($.current||!F.current||A.current!==D.current&&(A.current=D.current,L.current?.()))},{root:w.current,threshold:.1});return W.observe(M.current),()=>W.disconnect()},[k]),v.useEffect(()=>{if(!w.current||!k)return;const W=new IntersectionObserver(U=>{U.forEach(B=>{const G=B.target.getAttribute("data-notification-id"),V=B.target.getAttribute("data-unread")==="true";G&&V&&B.isIntersecting&&O.current.add(G)})},{root:w.current,threshold:.5});return w.current.querySelectorAll("[data-notification-id]").forEach(U=>W.observe(U)),()=>W.disconnect()},[k,t]);const T=e>0?e:t.filter(W=>!W.read).length,z=v.useCallback(()=>{if(k){if(T>0){const W=Array.from(O.current).filter(j=>{const U=t.find(B=>String(B.id)===String(j));return U&&!U.read});W.length>0&&u?.(W)}O.current.clear(),C(!1)}},[k,u,T,t]);v.useEffect(()=>{if(!k)return;const W=j=>{N.current&&!N.current.contains(j.target)&&z()};return document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[k,z]);const H=v.useCallback(()=>{k?z():C(!0)},[k,z]);return v.useLayoutEffect(()=>{const W=_.current;if(!k||!W)return;W.style.transform="";const j=W.getBoundingClientRect(),U=typeof window<"u"?window.innerWidth:0;if(j.width===0&&j.height===0)return;const B=8;let G=0;j.right>U-B?G=-(j.right-(U-B)):j.left<B&&(G=B-j.left),G!==0&&(W.style.transform=`translateX(${G}px)`)},[k,b,t.length]),h.jsxs(I,{ref:N,className:`relative ${S}`,id:x,...E,children:[h.jsxs(oe,{onClick:H,className:"relative w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors cursor-pointer","aria-label":s,children:[h.jsx(re,{name:de.Bell,className:"text-sm text-slate-500 dark:text-slate-400"}),T>0&&h.jsx(Q,{clas Line truncated
px-3 py-1.5 text-sm font-medium rounded-md transition-colors
${g===x?"bg-blue-600 text-white":"bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
${u?"opacity-50 cursor-not-allowed":""}
`,children:ou(x)},x))})]}):h.jsxs(I,{ref:p,className:`relative ${s}`,id:a,...l,children:[h.jsxs(oe,{onClick:()=>d(!c),className:i?"flex items-center gap-1.5 px-2.5 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors cursor-pointer":"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-haspopup":"listbox","aria-expanded":c,"aria-label":e,children:[h.jsx(re,{name:de.Globe,className:i?"w-4 h-4":"w-5 h-5 text-gray-600 dark:text-gray-400"}),i&&h.jsx(Q,{className:"font-medium uppercase",children:g}),i&&h.jsx(re,{name:de.ChevronDown,className:"w-3 h-3"})]}),c&&h.jsx(I,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:h.jsx(I,{className:"py-2",children:t.map(x=>h.jsxs(oe,{onClick:()=>S(x),disabled:u,className:`
`,children:au(x)},x))})]}):h.jsxs(I,{ref:p,className:`relative ${s}`,id:a,...l,children:[h.jsxs(oe,{onClick:()=>d(!c),className:i?"flex items-center gap-1.5 px-2.5 py-2 text-sm text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors cursor-pointer":"p-2 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg transition-colors","aria-haspopup":"listbox","aria-expanded":c,"aria-label":e,children:[h.jsx(re,{name:de.Globe,className:i?"w-4 h-4":"w-5 h-5 text-gray-600 dark:text-gray-400"}),i&&h.jsx(Q,{className:"font-medium uppercase",children:g}),i&&h.jsx(re,{name:de.ChevronDown,className:"w-3 h-3"})]}),c&&h.jsx(I,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:h.jsx(I,{className:"py-2",children:t.map(x=>h.jsxs(oe,{onClick:()=>S(x),disabled:u,className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${g===x?"bg-gray-50 dark:bg-gray-700":""}
${u?"opacity-50 cursor-not-allowed":""}
`,children:[h.jsx(Q,{className:"text-gray-900 dark:text-white flex-1",children:ou(x)}),g===x&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},my=({copyright:t="© 2026 G7",version:e,quickLinks:n=[],className:r="",changelogModalId:s,copyrightModalId:o,id:i,editorAttrs:a})=>{const l=v.useCallback(()=>{s&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/changelog",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreChangelogContent:"{{response.data.content}}"}},{handler:"openModal",target:s}],onError:[{handler:"openModal",target:s}]}]})},[s]),c=v.useCallback(()=>{o&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/license",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreLicenseContent:"{{response.data.content}}"}},{handler:"openModal",target:o}],onError:[{handler:"openModal",target:o}]}]})},[o]);return h.jsx(I,{className:`admin-footer ${r}`,id:i,...a,children:h.jsxs(I,{className:"admin-footer-row",children:[h.jsxs(I,{className:"admin-footer-group",children:[h.jsx(Q,{className:o?"admin-footer-link-hover":"",onClick:o?c:void 0,children:t}),e&&h.jsxs(h.Fragment,{children:[h.jsx(Q,{className:"hidden md:inline",children:"•"}),h.jsxs(Q,{className:`flex-center gap-2 ${s?"admin-footer-link-hover":""}`,onClick:s?l:void 0,children:[h.jsx(re,{name:de.Tag,className:"w-4 h-4"}),h.jsxs(Q,{children:["v",e]})]})]})]}),n.length>0&&h.jsx(I,{className:"flex-center gap-4",children:n.map(d=>h.jsxs(Lr,{href:d.url,className:"admin-footer-link",children:[d.iconName&&h.jsx(re,{name:d.iconName,className:"w-4 h-4"}),h.jsx(Q,{children:d.label})]},d.id))})]})})},by=({title:t,description:e,breadcrumbItems:n,tabs:r,onTabChange:s,actions:o,className:i="",children:a,id:l,editorAttrs:c})=>{const d=(u="secondary")=>({primary:"page-action-primary",secondary:"page-action-secondary",danger:"page-action-danger",ghost:"page-action-ghost"})[u];return h.jsxs(I,{className:i,id:l,...c,children:[n&&n.length>0&&h.jsx(I,{className:"mb-md",children:h.jsx(nu,{items:n})}),h.jsxs(I,{className:"flex-between mb-lg",children:[h.jsxs(I,{children:[h.jsx(Ta,{className:"page-title",children:t}),e&&h.jsx(bt,{className:"page-description",children:e})]}),a?h.jsx(I,{className:"page-actions",children:a}):o&&o.length>0?h.jsx(I,{className:"page-actions",children:o.map(u=>h.jsxs(oe,{onClick:u.onClick,disabled:u.disabled,className:d(u.variant),children:[u.iconName&&h.jsx(re,{name:u.iconName,className:"icon-md"}),u.variant!=="ghost"&&u.label&&h.jsx(I,{children:u.label})]},u.id))}):null]}),r&&r.length>0&&h.jsx(I,{className:"tab-container",children:r.map(u=>h.jsxs(oe,{onClick:()=>s?.(u.value),className:u.active?"tab-btn-active":"tab-btn",children:[h.jsx(I,{children:u.label}),u.badge!==void 0&&h.jsx(I,{className:u.active?"tab-badge-active":"tab-badge",children:u.badge})]},u.id))})]})},yy=()=>window.G7Core,vy=({title:t,description:e,className:n="",style:r,children:s,id:o,editorAttrs:i})=>{const a="flex items-center justify-between",l=yy()?.style?.mergeClasses?.(a,n)??`${a} ${n}`;return h.jsxs(I,{className:l,style:r,id:o,...i,children:[h.jsxs(I,{children:[t&&h.jsx(Zn,{className:"text-base font-semibold text-gray-900 dark:text-white",children:t}),e&&h.jsx(bt,{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:e})]}),s&&h.jsx(I,{className:"flex items-center gap-2",children:s})]})},Jn=(t,e)=>window.G7Core?.t?.(t,e)??t,xy=({image:t,imageAlt:e,vendor:n,name:r,version:s,status:o,updateAvailable:i=!1,latestVersion:a,dependencies:l=[],showLayoutEditButton:c=!1,actions:d=[],onLayoutEditClick:u,className:f="",id:g,editorAttrs:m})=>{const p=b=>({active:"success",inactive:"default",pending:"pending",error:"error"})[b],y=b=>({active:Jn("common.status_active"),inactive:Jn("common.status_inactive"),pending:Jn("common.status_pending"),error:Jn("common.status_error")})[b];return h.jsxs(I,{className:`
`,children:[h.jsx(Q,{className:"text-gray-900 dark:text-white flex-1",children:au(x)}),g===x&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400"})]},x))})})]})},ky=({copyright:t="© 2026 G7",version:e,quickLinks:n=[],className:r="",changelogModalId:s,copyrightModalId:o,id:i,editorAttrs:a})=>{const l=v.useCallback(()=>{s&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/changelog",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreChangelogContent:"{{response.data.content}}"}},{handler:"openModal",target:s}],onError:[{handler:"openModal",target:s}]}]})},[s]),c=v.useCallback(()=>{o&&window.G7Core?.dispatch?.({handler:"sequence",actions:[{handler:"apiCall",auth_required:!0,target:"/api/admin/license",params:{method:"GET"},onSuccess:[{handler:"setState",params:{target:"global",coreLicenseContent:"{{response.data.content}}"}},{handler:"openModal",target:o}],onError:[{handler:"openModal",target:o}]}]})},[o]);return h.jsx(I,{className:`admin-footer ${r}`,id:i,...a,children:h.jsxs(I,{className:"admin-footer-row",children:[h.jsxs(I,{className:"admin-footer-group",children:[h.jsx(Q,{className:o?"admin-footer-link-hover":"",onClick:o?c:void 0,children:t}),e&&h.jsxs(h.Fragment,{children:[h.jsx(Q,{className:"hidden md:inline",children:"•"}),h.jsxs(Q,{className:`flex-center gap-2 ${s?"admin-footer-link-hover":""}`,onClick:s?l:void 0,children:[h.jsx(re,{name:de.Tag,className:"w-4 h-4"}),h.jsxs(Q,{children:["v",e]})]})]})]}),n.length>0&&h.jsx(I,{className:"flex-center gap-4",children:n.map(d=>h.jsxs(Lr,{href:d.url,className:"admin-footer-link",children:[d.iconName&&h.jsx(re,{name:d.iconName,className:"w-4 h-4"}),h.jsx(Q,{children:d.label})]},d.id))})]})})},Cy=({title:t,description:e,breadcrumbItems:n,tabs:r,onTabChange:s,actions:o,className:i="",children:a,id:l,editorAttrs:c})=>{const d=(u="secondary")=>({primary:"page-action-primary",secondary:"page-action-secondary",danger:"page-action-danger",ghost:"page-action-ghost"})[u];return h.jsxs(I,{className:i,id:l,...c,children:[n&&n.length>0&&h.jsx(I,{className:"mb-md",children:h.jsx(su,{items:n})}),h.jsxs(I,{className:"flex-between mb-lg",children:[h.jsxs(I,{children:[h.jsx(Aa,{className:"page-title",children:t}),e&&h.jsx(bt,{className:"page-description",children:e})]}),a?h.jsx(I,{className:"page-actions",children:a}):o&&o.length>0?h.jsx(I,{className:"page-actions",children:o.map(u=>h.jsxs(oe,{onClick:u.onClick,disabled:u.disabled,className:d(u.variant),children:[u.iconName&&h.jsx(re,{name:u.iconName,className:"icon-md"}),u.variant!=="ghost"&&u.label&&h.jsx(I,{children:u.label})]},u.id))}):null]}),r&&r.length>0&&h.jsx(I,{className:"tab-container",children:r.map(u=>h.jsxs(oe,{onClick:()=>s?.(u.value),className:u.active?"tab-btn-active":"tab-btn",children:[h.jsx(I,{children:u.label}),u.badge!==void 0&&h.jsx(I,{className:u.active?"tab-badge-active":"tab-badge",children:u.badge})]},u.id))})]})},Sy=()=>window.G7Core,_y=({title:t,description:e,className:n="",style:r,children:s,id:o,editorAttrs:i})=>{const a="flex items-center justify-between",l=Sy()?.style?.mergeClasses?.(a,n)??`${a} ${n}`;return h.jsxs(I,{className:l,style:r,id:o,...i,children:[h.jsxs(I,{children:[t&&h.jsx(Qn,{className:"text-base font-semibold text-gray-900 dark:text-white",children:t}),e&&h.jsx(bt,{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:e})]}),s&&h.jsx(I,{className:"flex items-center gap-2",children:s})]})},Rn=(t,e)=>window.G7Core?.t?.(t,e)??t,Ey=({image:t,imageAlt:e,vendor:n,name:r,version:s,status:o,updateAvailable:i=!1,latestVersion:a,dependencies:l=[],showLayoutEditButton:c=!1,actions:d=[],onLayoutEditClick:u,className:f="",id:g,editorAttrs:m})=>{const p=b=>({active:"success",inactive:"default",pending:"pending",error:"error"})[b],y=b=>({active:Rn("common.status_active"),inactive:Rn("common.status_inactive"),pending:Rn("common.status_pending"),error:Rn("common.status_error")})[b];return h.jsxs(I,{className:`
bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden hover:shadow-lg transition-shadow
${f}
`,id:g,...m,children:[t&&h.jsxs(I,{className:"relative",children:[h.jsx(yn,{src:t,alt:e||Jn("common.template_preview",{vendor:n,name:r}),className:"w-full h-48 object-cover"}),h.jsx(I,{className:"absolute top-3 right-3",children:h.jsx(Po,{status:p(o),label:y(o),showIcon:!0})}),i&&h.jsx(I,{className:"absolute top-3 left-3",children:h.jsxs(Q,{className:"flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800 rounded-md text-xs font-semibold",children:[h.jsx(re,{name:de.ExclamationTriangle,className:"w-3 h-3"}),h.jsx(Q,{children:Jn("common.update_available")})]})})]}),h.jsxs(I,{className:"p-4",children:[h.jsxs(I,{className:"flex items-start justify-between mb-3",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(Ir,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",r]}),h.jsxs(I,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[h.jsxs(Q,{children:["v",s]}),i&&a&&h.jsxs(h.Fragment,{children:[h.jsx(Q,{children:"→"}),h.jsxs(Q,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",a]})]})]}),!t&&h.jsx(I,{className:"mt-2",children:h.jsx(Po,{status:p(o),label:y(o),showIcon:!0})})]}),d.length>0&&h.jsx(bs,{items:d,triggerIconName:de.EllipsisVertical,position:"left"})]}),l.length>0&&h.jsxs(I,{className:"mb-3",children:[h.jsxs(bt,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[Jn("common.dependencies"),":"]}),h.jsx(I,{className:"flex flex-wrap gap-1",children:l.map((b,S)=>h.jsx(Q,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:b},S))})]}),c&&u&&h.jsxs(oe,{onClick:u,className:"w-full px-4 py-2 bg-blue-600 dark:bg-blue-500 text-white rounded-md hover:bg-blue-700 dark:hover:bg-blue-600 transition-colors flex items-center justify-center gap-2 font-medium",children:[h.jsx(re,{name:de.Edit,className:"w-4 h-4"}),h.jsx(Q,{children:Jn("common.edit_layout")})]})]})]})},iu=({type:t,message:e,dismissible:n=!1,onDismiss:r,className:s="",id:o,editorAttrs:i})=>{const a={info:{containerClass:"alert-info",iconClass:"alert-icon-info",textClass:"alert-text-info",icon:de.InfoCircle},success:{containerClass:"alert-success",iconClass:"alert-icon-success",textClass:"alert-text-success",icon:de.CheckCircle},warning:{containerClass:"alert-warning",iconClass:"alert-icon-warning",textClass:"alert-text-warning",icon:de.ExclamationTriangle},error:{containerClass:"alert-error",iconClass:"alert-icon-error",textClass:"alert-text-error",icon:de.TimesCircle}},l=a[t]??a.info;return h.jsxs(I,{className:`${l.containerClass} ${s}`,role:"alert","aria-live":"polite",id:o,...i,children:[h.jsx(re,{name:l.icon,className:l.iconClass,ariaLabel:`${t} icon`}),h.jsx(bt,{className:l.textClass,children:e}),n&&h.jsx(oe,{onClick:r,className:`alert-dismiss ${l.textClass}`,"aria-label":"Close alert",children:h.jsx(re,{name:de.Times,className:l.iconClass,ariaLabel:"Close"})})]})},wy=({layoutName:t,onBack:e,onPreview:n,onSave:r,isSaving:s=!1,className:o=""})=>{const i=`
`,id:g,...m,children:[t&&h.jsxs(I,{className:"relative",children:[h.jsx(yn,{src:t,alt:e||Rn("common.template_preview",{vendor:n,name:r}),className:"w-full h-48 object-cover"}),h.jsx(I,{className:"absolute top-3 right-3",children:h.jsx($o,{status:p(o),label:y(o),showIcon:!0})}),i&&h.jsx(I,{className:"absolute top-3 left-3",children:h.jsxs(Q,{className:"flex items-center gap-1 px-2 py-1 bg-yellow-50 dark:bg-yellow-900/20 text-yellow-700 dark:text-yellow-400 border border-yellow-200 dark:border-yellow-800 rounded-md text-xs font-semibold",children:[h.jsx(re,{name:de.ExclamationTriangle,className:"w-3 h-3"}),h.jsx(Q,{children:Rn("common.update_available")})]})})]}),h.jsxs(I,{className:"p-4",children:[h.jsxs(I,{className:"flex items-start justify-between mb-3",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(Ir,{className:"text-lg font-bold text-gray-900 dark:text-white",children:[n,"/",r]}),h.jsxs(I,{className:"flex items-center gap-2 mt-1 text-sm text-gray-600 dark:text-gray-400",children:[h.jsxs(Q,{children:["v",s]}),i&&a&&h.jsxs(h.Fragment,{children:[h.jsx(Q,{children:"→"}),h.jsxs(Q,{className:"text-yellow-600 dark:text-yellow-400 font-semibold",children:["v",a]})]})]}),!t&&h.jsx(I,{className:"mt-2",children:h.jsx($o,{status:p(o),label:y(o),showIcon:!0})})]}),d.length>0&&h.jsx(bs,{items:d,triggerIconName:de.EllipsisVertical,position:"left"})]}),l.length>0&&h.jsxs(I,{className:"mb-3",children:[h.jsxs(bt,{className:"text-xs text-gray-500 dark:text-gray-400 mb-1",children:[Rn("common.dependencies"),":"]}),h.jsx(I,{className:"flex flex-wrap gap-1",children:l.map((b,S)=>h.jsx(Q,{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 text-xs rounded",children:b},S))})]}),c&&u&&h.jsxs(oe,{onClick:u,className:"w-full px-4 py-2 bg-blue-600 dark:bg-blue-500 text-white rounded-md hover:bg-blue-700 dark:hover:bg-blue-600 transition-colors flex items-center justify-center gap-2 font-medium",children:[h.jsx(re,{name:de.Edit,className:"w-4 h-4"}),h.jsx(Q,{children:Rn("common.edit_layout")})]})]})]})},lu=({type:t,message:e,dismissible:n=!1,onDismiss:r,className:s="",id:o,editorAttrs:i})=>{const a={info:{containerClass:"alert-info",iconClass:"alert-icon-info",textClass:"alert-text-info",icon:de.InfoCircle},success:{containerClass:"alert-success",iconClass:"alert-icon-success",textClass:"alert-text-success",icon:de.CheckCircle},warning:{containerClass:"alert-warning",iconClass:"alert-icon-warning",textClass:"alert-text-warning",icon:de.ExclamationTriangle},error:{containerClass:"alert-error",iconClass:"alert-icon-error",textClass:"alert-text-error",icon:de.TimesCircle}},l=a[t]??a.info;return h.jsxs(I,{className:`${l.containerClass} ${s}`,role:"alert","aria-live":"polite",id:o,...i,children:[h.jsx(re,{name:l.icon,className:l.iconClass,ariaLabel:`${t} icon`}),h.jsx(bt,{className:l.textClass,children:e}),n&&h.jsx(oe,{onClick:r,className:`alert-dismiss ${l.textClass}`,"aria-label":"Close alert",children:h.jsx(re,{name:de.Times,className:l.iconClass,ariaLabel:"Close"})})]})},My=({layoutName:t,onBack:e,onPreview:n,onSave:r,isSaving:s=!1,className:o=""})=>{const i=`
flex items-center justify-between gap-4 p-4 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700
${o}
`.trim().replace(/\s+/g," ");return h.jsxs(I,{className:i,children:[h.jsxs(I,{className:"flex items-center gap-3",children:[h.jsx(oe,{onClick:e,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors bg-transparent border-0 cursor-pointer","aria-label":"뒤로가기",children:h.jsx(re,{name:de.ArrowLeft,className:"text-gray-700 dark:text-gray-300",ariaLabel:"뒤로가기"})}),h.jsx(Zn,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:t})]}),h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(oe,{onClick:n,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors border-0 cursor-pointer","aria-label":"미리보기",children:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(re,{name:de.Eye,className:"text-gray-700 dark:text-gray-300",ariaLabel:"미리보기 아이콘"}),h.jsx("span",{children:"미리보기"})]})}),h.jsx(oe,{onClick:r,disabled:s,className:`
`.trim().replace(/\s+/g," ");return h.jsxs(I,{className:i,children:[h.jsxs(I,{className:"flex items-center gap-3",children:[h.jsx(oe,{onClick:e,className:"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition-colors bg-transparent border-0 cursor-pointer","aria-label":"뒤로가기",children:h.jsx(re,{name:de.ArrowLeft,className:"text-gray-700 dark:text-gray-300",ariaLabel:"뒤로가기"})}),h.jsx(Qn,{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:t})]}),h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(oe,{onClick:n,className:"px-4 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-colors border-0 cursor-pointer","aria-label":"미리보기",children:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(re,{name:de.Eye,className:"text-gray-700 dark:text-gray-300",ariaLabel:"미리보기 아이콘"}),h.jsx("span",{children:"미리보기"})]})}),h.jsx(oe,{onClick:r,disabled:s,className:`
px-4 py-2 rounded-lg transition-colors border-0 cursor-pointer
${s?"bg-blue-400 dark:bg-blue-600 cursor-not-allowed":"bg-blue-600 dark:bg-blue-500 hover:bg-blue-700 dark:hover:bg-blue-600"}
text-white
`.trim().replace(/\s+/g," "),"aria-label":s?"저장 중...":"저장",children:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(re,{name:s?de.Spinner:de.Save,className:`text-white ${s?"animate-spin":""}`,ariaLabel:s?"저장 중 아이콘":"저장 아이콘"}),h.jsx("span",{children:s?"저장 중...":"저장"})]})})]})]})},ky=({files:t,selectedId:e,onSelect:n,className:r=""})=>{const s=a=>{try{const l=new Date(a);if(isNaN(l.getTime()))return a;const c=l.getFullYear(),d=String(l.getMonth()+1).padStart(2,"0"),u=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),g=String(l.getMinutes()).padStart(2,"0");return`${c}-${d}-${u} ${f}:${g}`}catch{return a}},o=a=>{n(a)},i=`
`.trim().replace(/\s+/g," "),"aria-label":s?"저장 중...":"저장",children:h.jsxs(I,{className:"flex items-center gap-2",children:[h.jsx(re,{name:s?de.Spinner:de.Save,className:`text-white ${s?"animate-spin":""}`,ariaLabel:s?"저장 중 아이콘":"저장 아이콘"}),h.jsx("span",{children:s?"저장 중...":"저장"})]})})]})]})},Ny=({files:t,selectedId:e,onSelect:n,className:r=""})=>{const s=a=>{try{const l=new Date(a);if(isNaN(l.getTime()))return a;const c=l.getFullYear(),d=String(l.getMonth()+1).padStart(2,"0"),u=String(l.getDate()).padStart(2,"0"),f=String(l.getHours()).padStart(2,"0"),g=String(l.getMinutes()).padStart(2,"0");return`${c}-${d}-${u} ${f}:${g}`}catch{return a}},o=a=>{n(a)},i=`
w-full
${r}
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:i,children:t.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"파일이 없습니다."}):h.jsx(Aa,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:t.map(a=>{const l=a.id===e,c=`
`.trim().replace(/\s+/g," ");return h.jsx(I,{className:i,children:t.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"파일이 없습니다."}):h.jsx(Da,{className:"divide-y divide-gray-200 dark:divide-gray-700",role:"listbox","aria-label":"레이아웃 파일 목록",children:t.map(a=>{const l=a.id===e,c=`
flex items-center justify-between p-4 cursor-pointer
transition-colors duration-150
${l?"bg-blue-100 dark:bg-blue-900 border-l-4 border-blue-500":"hover:bg-gray-100 dark:hover:bg-gray-800"}
@@ -105,8 +105,8 @@ var SirsoftAdminBasic=(function(R,h,v,Nn){"use strict";var _T=Object.definePrope
`.trim().replace(/\s+/g," "),u=`
text-sm
${l?"text-blue-700 dark:text-blue-300":"text-gray-500 dark:text-gray-400"}
`.trim().replace(/\s+/g," ");return h.jsx(Da,{className:c,onClick:()=>o(a.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(a.id))},children:h.jsxs(I,{className:"flex flex-col gap-1",children:[h.jsx(Q,{className:d,children:a.name}),h.jsx(Q,{className:u,children:s(a.updated_at)})]})},a.id)})})})};function au(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Cy(t){if(Array.isArray(t))return t}function Sy(t,e,n){return(e=Ay(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _y(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function Ey(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function cu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?lu(Object(n),!0).forEach(function(r){Sy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function My(t,e){if(t==null)return{};var n,r,s=Ny(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function Ny(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Oy(t,e){return Cy(t)||_y(t,e)||Dy(t,e)||Ey()}function Ty(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ay(t){var e=Ty(t,"string");return typeof e=="symbol"?e:e+""}function Dy(t,e){if(t){if(typeof t=="string")return au(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?au(t,e):void 0}}function Iy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function du(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function uu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?du(Object(n),!0).forEach(function(r){Iy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):du(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Ly(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){return e.reduceRight(function(s,o){return o(s)},r)}}function Es(t){return function e(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=t.length?t.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e.apply(n,[].concat(s,a))}}}function Bo(t){return{}.toString.call(t).includes("Object")}function Py(t){return!Object.keys(t).length}function Ms(t){return typeof t=="function"}function $y(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Fy(t,e){return Bo(e)||Rn("changeType"),Object.keys(e).some(function(n){return!$y(t,n)})&&Rn("changeField"),e}function Vy(t){Ms(t)||Rn("selectorType")}function zy(t){Ms(t)||Bo(t)||Rn("handlerType"),Bo(t)&&Object.values(t).some(function(e){return!Ms(e)})&&Rn("handlersType")}function Hy(t){t||Rn("initialIsRequired"),Bo(t)||Rn("initialType"),Py(t)&&Rn("initialContent")}function Uy(t,e){throw new Error(t[e]||t.default)}var By={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Rn=Es(Uy)(By),jo={changes:Fy,selector:Vy,handler:zy,initial:Hy};function jy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};jo.initial(t),jo.handler(e);var n={current:t},r=Es(Yy)(n,e),s=Es(Gy)(n),o=Es(jo.changes)(t),i=Es(Wy)(n);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return jo.selector(c),c(n.current)}function l(c){Ly(r,s,o,i)(c)}return[a,l]}function Wy(t,e){return Ms(e)?e(t.current):e}function Gy(t,e){return t.current=uu(uu({},t.current),e),e}function Yy(t,e,n){return Ms(e)?e(t.current):Object.keys(n).forEach(function(r){var s;return(s=e[r])===null||s===void 0?void 0:s.call(e,t.current[r])}),n}var Xy={create:jy},Ky={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.54.0/min/vs"}};function qy(t){return function e(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=t.length?t.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l]; Line truncated
`.trim().replace(/\s+/g," ");return h.jsx(Ia,{className:c,onClick:()=>o(a.id),role:"option","aria-selected":l,tabIndex:0,onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),o(a.id))},children:h.jsxs(I,{className:"flex flex-col gap-1",children:[h.jsx(Q,{className:d,children:a.name}),h.jsx(Q,{className:u,children:s(a.updated_at)})]})},a.id)})})})};function cu(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Oy(t){if(Array.isArray(t))return t}function Ty(t,e,n){return(e=Fy(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ay(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e!==0)for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function Dy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function du(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function uu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?du(Object(n),!0).forEach(function(r){Ty(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):du(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Iy(t,e){if(t==null)return{};var n,r,s=Ly(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}function Ly(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Py(t,e){return Oy(t)||Ay(t,e)||zy(t,e)||Dy()}function $y(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Fy(t){var e=$y(t,"string");return typeof e=="symbol"?e:e+""}function zy(t,e){if(t){if(typeof t=="string")return cu(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cu(t,e):void 0}}function Vy(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function fu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function hu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fu(Object(n),!0).forEach(function(r){Vy(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Hy(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(r){return e.reduceRight(function(s,o){return o(s)},r)}}function Es(t){return function e(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=t.length?t.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];return e.apply(n,[].concat(s,a))}}}function jo(t){return{}.toString.call(t).includes("Object")}function Uy(t){return!Object.keys(t).length}function Ms(t){return typeof t=="function"}function By(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function jy(t,e){return jo(e)||er("changeType"),Object.keys(e).some(function(n){return!By(t,n)})&&er("changeField"),e}function Wy(t){Ms(t)||er("selectorType")}function Gy(t){Ms(t)||jo(t)||er("handlerType"),jo(t)&&Object.values(t).some(function(e){return!Ms(e)})&&er("handlersType")}function Yy(t){t||er("initialIsRequired"),jo(t)||er("initialType"),Uy(t)&&er("initialContent")}function Xy(t,e){throw new Error(t[e]||t.default)}var Ky={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},er=Es(Xy)(Ky),Wo={changes:jy,selector:Wy,handler:Gy,initial:Yy};function qy(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Wo.initial(t),Wo.handler(e);var n={current:t},r=Es(Jy)(n,e),s=Es(Qy)(n),o=Es(Wo.changes)(t),i=Es(Zy)(n);function a(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return Wo.selector(c),c(n.current)}function l(c){Hy(r,s,o,i)(c)}return[a,l]}function Zy(t,e){return Ms(e)?e(t.current):e}function Qy(t,e){return t.current=hu(hu({},t.current),e),e}function Jy(t,e,n){return Ms(e)?e(t.current):Object.keys(n).forEach(function(r){var s;return(s=e[r])===null||s===void 0?void 0:s.call(e,t.current[r])}),n}var Ry={create:qy},ev={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function tv(t){return function e(){for(var n=this,r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return s.length>=t.length?t.apply(this,s):function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l]; Line truncated
You are using deprecated way of configuration.
Instead of using
@@ -115,10 +115,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
monaco.config({ paths: { vs: '...' } })
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
`},hu=qy(Ry)(fu),ev={config:Qy},tv=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(s){return n.reduceRight(function(o,i){return i(o)},s)}};function gu(t,e){return Object.keys(e).forEach(function(n){e[n]instanceof Object&&t[n]&&Object.assign(e[n],gu(t[n],e[n]))}),cu(cu({},t),e)}var nv={type:"cancelation",msg:"operation is manually canceled"};function rl(t){var e=!1,n=new Promise(function(r,s){t.then(function(o){return e?s(nv):r(o)}),t.catch(s)});return n.cancel=function(){return e=!0},n}var rv=["monaco"],sv=Xy.create({config:Ky,isInitialized:!1,resolve:null,reject:null,monaco:null}),pu=Oy(sv,2),Ns=pu[0],Wo=pu[1];function ov(t){var e=ev.config(t),n=e.monaco,r=My(e,rv);Wo(function(s){return{config:gu(s.config,r),monaco:n}})}function iv(){var t=Ns(function(e){var n=e.monaco,r=e.isInitialized,s=e.resolve;return{monaco:n,isInitialized:r,resolve:s}});if(!t.isInitialized){if(Wo({isInitialized:!0}),t.monaco)return t.resolve(t.monaco),rl(sl);if(window.monaco&&window.monaco.editor)return mu(window.monaco),t.resolve(window.monaco),rl(sl);tv(av,cv)(dv)}return rl(sl)}function av(t){return document.body.appendChild(t)}function lv(t){var e=document.createElement("script");return t&&(e.src=t),e}function cv(t){var e=Ns(function(r){var s=r.config,o=r.reject;return{config:s,reject:o}}),n=lv("".concat(e.config.paths.vs,"/loader.js"));return n.onload=function(){return t()},n.onerror=e.reject,n}function dv(){var t=Ns(function(n){var r=n.config,s=n.resolve,o=n.reject;return{config:r,resolve:s,reject:o}}),e=window.require;e.config(t.config),e(["vs/editor/editor.main"],function(n){var r=n.m;mu(r),t.resolve(r)},function(n){t.reject(n)})}function mu(t){Ns().monaco||Wo({monaco:t})}function uv(){return Ns(function(t){var e=t.monaco;return e})}var sl=new Promise(function(t,e){return Wo({resolve:t,reject:e})}),bu={config:ov,init:iv,__getMonacoInstance:uv},fv={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},ol=fv,hv={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},gv=hv;function pv({children:t}){return v.createElement("div",{style:gv.container},t)}var mv=pv,bv=mv;function yv({width:t,height:e,isEditorReady:n,loading:r,_ref:s,className:o,wrapperProps:i}){return v.createElement("section",{style:{...ol.wrapper,width:t,height:e},...i},!n&&v.createElement(bv,null,r),v.createElement("div",{ref:s,style:{...ol.fullWidth,...!n&&ol.hide},className:o}))}var vv=yv,yu=v.memo(vv);function xv(t){v.useEffect(t,[])}var vu=xv;function wv(t,e,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:t,e)}var nn=wv;function Os(){}function zr(t,e,n,r){return kv(t,r)||Cv(t,e,n,r)}function kv(t,e){return t.editor.getModel(xu(t,e))}function Cv(t,e,n,r){return t.editor.createModel(e,n,r?xu(t,r):void 0)}function xu(t,e){return t.Uri.parse(e)}function Sv({original:t,modified:e,language:n,originalLanguage:r,modifiedLanguage:s,originalModelPath:o,modifiedModelPath:i,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:d="Loading...",options:u={},height:f="100%",width:g="100%",className:m,wrapperProps:p={},beforeMount:y=Os,onMount:b=Os}){let[S,x]=v.useState(!1),[E,k]=v.useState(!0),C=v.useRef(null),N=v.useRef(null),_=v.useRef(null),w=v.useRef(b),M=v.useRef(y),O=v.useRef(!1);vu(()=>{let D=bu.init();return D.then(A=>(N.current=A)&&k(!1)).catch(A=>A?.type!=="cancelation"&&console.error("Monaco initialization: error:",A)),()=>C.current?F():D.cancel()}),nn(()=>{if(C.current&&N.current){let D=C.current.getOriginalEditor(),A=zr(N.current,t||"",r||n||"text",o||"");A!==D.getModel()&&D.setModel(A)}},[o],S),nn(()=>{if(C.current&&N.current){let D=C.current.getModifiedEditor(),A=zr(N.current,e||"",s||n||"text",i||"");A!==D.getModel()&&D.setModel(A)}},[i],S),nn(()=>{let D=C.current.getModifiedEditor();D.getOption(N.current.editor.EditorOption.readOnly)?D.setValue(e||""):e!==D.getValue()&&(D.executeEdits("",[{range:D.getModel().getFullModelRange(),text:e||"",forceMoveMarkers:!0}]),D.pushUndoStop())},[e],S),nn(()=>{C.current?.getModel()?.original.setValue(t||"")},[t],S),nn(()=>{let{original:D,modified:A}=C.current.getModel();N.current.editor.setModelLanguage(D,r||n||"text"),N.current.editor.setModelLanguage(A,s||n||"text")},[n,r,s],S),nn(()=>{N.current?.editor.setTheme(c)},[c],S),nn(()=>{C.current?.updateOptions(u)},[u],S);let L=v.useCallback(()=>{if(!N.current)return;M.current(N.current);let D=zr(N.current,t||"",r||n||"text",o||""),A=zr(N.current,e||"",s||n||"text",i||"");C.current?.setModel({original:D,modified:A})},[n,e,s,t,r,o,i]),$=v.useCallback(()=>{!O.current&&_.current&&(C.current=N.current.editor.createDiffEditor(_.current,{automaticLayout:!0,...u}),L(),N.current?.editor.setTheme(c),x(!0),O.current=!0)},[u,c,L]);v.useEffect(()=>{S&&w.current(C.current,N.current)},[S]),v.useEffect(()=>{!E&&!S&&$()},[E,S,$]);function F(){let D=C.current?.getModel();a||D?.original?.disp Line truncated
`},pu=tv(ov)(gu),iv={config:rv},av=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return function(s){return n.reduceRight(function(o,i){return i(o)},s)}};function mu(t,e){return Object.keys(e).forEach(function(n){e[n]instanceof Object&&t[n]&&Object.assign(e[n],mu(t[n],e[n]))}),uu(uu({},t),e)}var lv={type:"cancelation",msg:"operation is manually canceled"};function ol(t){var e=!1,n=new Promise(function(r,s){t.then(function(o){return e?s(lv):r(o)}),t.catch(s)});return n.cancel=function(){return e=!0},n}var cv=["monaco"],dv=Ry.create({config:ev,isInitialized:!1,resolve:null,reject:null,monaco:null}),bu=Py(dv,2),Ns=bu[0],Go=bu[1];function uv(t){var e=iv.config(t),n=e.monaco,r=Iy(e,cv);Go(function(s){return{config:mu(s.config,r),monaco:n}})}function fv(){var t=Ns(function(e){var n=e.monaco,r=e.isInitialized,s=e.resolve;return{monaco:n,isInitialized:r,resolve:s}});if(!t.isInitialized){if(Go({isInitialized:!0}),t.monaco)return t.resolve(t.monaco),ol(il);if(window.monaco&&window.monaco.editor)return yu(window.monaco),t.resolve(window.monaco),ol(il);av(hv,pv)(mv)}return ol(il)}function hv(t){return document.body.appendChild(t)}function gv(t){var e=document.createElement("script");return t&&(e.src=t),e}function pv(t){var e=Ns(function(r){var s=r.config,o=r.reject;return{config:s,reject:o}}),n=gv("".concat(e.config.paths.vs,"/loader.js"));return n.onload=function(){return t()},n.onerror=e.reject,n}function mv(){var t=Ns(function(n){var r=n.config,s=n.resolve,o=n.reject;return{config:r,resolve:s,reject:o}}),e=window.require;e.config(t.config),e(["vs/editor/editor.main"],function(n){var r=n.m||n;yu(r),t.resolve(r)},function(n){t.reject(n)})}function yu(t){Ns().monaco||Go({monaco:t})}function bv(){return Ns(function(t){var e=t.monaco;return e})}var il=new Promise(function(t,e){return Go({resolve:t,reject:e})}),vu={config:uv,init:fv,__getMonacoInstance:bv},yv={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},al=yv,vv={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},xv=vv;function wv({children:t}){return v.createElement("div",{style:xv.container},t)}var kv=wv,Cv=kv;function Sv({width:t,height:e,isEditorReady:n,loading:r,_ref:s,className:o,wrapperProps:i}){return v.createElement("section",{style:{...al.wrapper,width:t,height:e},...i},!n&&v.createElement(Cv,null,r),v.createElement("div",{ref:s,style:{...al.fullWidth,...!n&&al.hide},className:o}))}var _v=Sv,xu=v.memo(_v);function Ev(t){v.useEffect(t,[])}var wu=Ev;function Mv(t,e,n=!0){let r=v.useRef(!0);v.useEffect(r.current||!n?()=>{r.current=!1}:t,e)}var sn=Mv;function Os(){}function Vr(t,e,n,r){return Nv(t,r)||Ov(t,e,n,r)}function Nv(t,e){return t.editor.getModel(ku(t,e))}function Ov(t,e,n,r){return t.editor.createModel(e,n,r?ku(t,r):void 0)}function ku(t,e){return t.Uri.parse(e)}function Tv({original:t,modified:e,language:n,originalLanguage:r,modifiedLanguage:s,originalModelPath:o,modifiedModelPath:i,keepCurrentOriginalModel:a=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:d="Loading...",options:u={},height:f="100%",width:g="100%",className:m,wrapperProps:p={},beforeMount:y=Os,onMount:b=Os}){let[S,x]=v.useState(!1),[E,k]=v.useState(!0),C=v.useRef(null),N=v.useRef(null),_=v.useRef(null),w=v.useRef(b),M=v.useRef(y),O=v.useRef(!1);wu(()=>{let D=vu.init();return D.then(A=>(N.current=A)&&k(!1)).catch(A=>A?.type!=="cancelation"&&console.error("Monaco initialization: error:",A)),()=>C.current?$():D.cancel()}),sn(()=>{if(C.current&&N.current){let D=C.current.getOriginalEditor(),A=Vr(N.current,t||"",r||n||"text",o||"");A!==D.getModel()&&D.setModel(A)}},[o],S),sn(()=>{if(C.current&&N.current){let D=C.current.getModifiedEditor(),A=Vr(N.current,e||"",s||n||"text",i||"");A!==D.getModel()&&D.setModel(A)}},[i],S),sn(()=>{let D=C.current.getModifiedEditor();D.getOption(N.current.editor.EditorOption.readOnly)?D.setValue(e||""):e!==D.getValue()&&(D.executeEdits("",[{range:D.getModel().getFullModelRange(),text:e||"",forceMoveMarkers:!0}]),D.pushUndoStop())},[e],S),sn(()=>{C.current?.getModel()?.original.setValue(t||"")},[t],S),sn(()=>{let{original:D,modified:A}=C.current.getModel();N.current.editor.setModelLanguage(D,r||n||"text"),N.current.editor.setModelLanguage(A,s||n||"text")},[n,r,s],S),sn(()=>{N.current?.editor.setTheme(c)},[c],S),sn(()=>{C.current?.updateOptions(u)},[u],S);let L=v.useCallback(()=>{if(!N.current)return;M.current(N.current);let D=Vr(N.current,t||"",r||n||"text",o||""),A=Vr(N.current,e||"",s||n||"text",i||"");C.current?.setModel({original:D,modified:A})},[n,e,s,t,r,o,i]),F=v.useCallback(()=>{!O.current&&_.current&&(C.current=N.current.editor.createDiffEditor(_.current,{automaticLayout:!0,...u}),L(),N.current?.editor.setTheme(c),x(!0),O.current=!0)},[u,c,L]);v.useEffect(()=>{S&&w.current(C.current,N.current)},[S]),v.useEffect(()=>{!E&&!S&&F()},[E,S,F]);function $(){let D=C.current?.getModel();a||D?.original?.d Line truncated
p-3 rounded-lg border cursor-pointer transition-colors
${e?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 hover:border-gray-400 dark:border-gray-600 dark:hover:border-gray-500"}
`,onClick:r,children:h.jsxs(I,{className:"flex justify-between items-start",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(Q,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",t.version]}),h.jsx(Q,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:Iv(t.created_at)})]}),h.jsxs(I,{className:"flex gap-3 text-sm",children:[h.jsxs(Q,{className:"text-green-600 dark:text-green-400",children:["+",t.changes_summary.added]}),h.jsxs(Q,{className:"text-red-600 dark:text-red-400",children:["-",t.changes_summary.removed]})]})]})})});wu.displayName="VersionListItem";const ku=({versions:t,selectedId:e,onSelect:n})=>t.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"버전이 없습니다."}):h.jsx(Aa,{role:"list",className:"space-y-2",children:t.map(r=>h.jsx(wu,{version:r,isSelected:e===r.id,onSelect:n},r.id))}),Lv=({layoutId:t,versions:e,onRestore:n})=>{const[r,s]=v.useState(),o=l=>{s(l)},i=()=>{r!==void 0&&n(r)},a=r===void 0;return h.jsxs(I,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[h.jsx(I,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:h.jsx(ku,{versions:e,selectedId:r,onSelect:o})}),h.jsx(I,{className:"flex justify-end",children:h.jsx(oe,{variant:"primary",disabled:a,onClick:i,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},Pv=({emailLabel:t="Email",passwordLabel:e="Password",submitButtonText:n="Sign In",processingText:r="Processing...",emailPlaceholder:s="Email",passwordPlaceholder:o="Password",forgotPasswordText:i="Forgot your password?",forgotPasswordUrl:a="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:c="Please enter a valid email address.",passwordRequiredError:d="Please enter your password.",onSubmit:u,loadingActions:f={},isLoading:g=!1,disabled:m=!1,apiError:p="",className:y="",style:b})=>{const[S,x]=v.useState(""),[E,k]=v.useState(""),[C,N]=v.useState({}),_=p,w=Object.values(f).some(F=>F===!0),M=g||w,O=m||M,L=()=>{const F={},D=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!S||S.trim()===""?F.email=l:D.test(S)||(F.email=c),(!E||E.trim()==="")&&(F.password=d),N(F),Object.keys(F).length===0},$=async F=>{if(!L()){F.preventDefault();return}N({}),u?await u(F):F.preventDefault()};return h.jsx(I,{className:`w-full ${y}`,style:b,children:h.jsxs(Ia,{onSubmit:$,className:"space-y-6",noValidate:!0,children:[_&&h.jsx(I,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:h.jsx(bt,{className:"text-sm text-red-600 dark:text-red-400",children:_})}),h.jsxs(I,{children:[h.jsx(en,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t}),h.jsx(wt,{id:"email",name:"email",type:"email",value:S,onChange:F=>x(F.target.value),placeholder:s,disabled:O,className:`
`,onClick:r,children:h.jsxs(I,{className:"flex justify-between items-start",children:[h.jsxs(I,{className:"flex-1",children:[h.jsxs(Q,{className:"font-semibold text-gray-900 dark:text-gray-100",children:["버전 ",t.version]}),h.jsx(Q,{className:"ml-2 text-sm text-gray-500 dark:text-gray-400",children:Vv(t.created_at)})]}),h.jsxs(I,{className:"flex gap-3 text-sm",children:[h.jsxs(Q,{className:"text-green-600 dark:text-green-400",children:["+",t.changes_summary.added]}),h.jsxs(Q,{className:"text-red-600 dark:text-red-400",children:["-",t.changes_summary.removed]})]})]})})});Cu.displayName="VersionListItem";const Su=({versions:t,selectedId:e,onSelect:n})=>t.length===0?h.jsx(I,{className:"p-4 text-center text-gray-500 dark:text-gray-400",children:"버전이 없습니다."}):h.jsx(Da,{role:"list",className:"space-y-2",children:t.map(r=>h.jsx(Cu,{version:r,isSelected:e===r.id,onSelect:n},r.id))}),Hv=({layoutId:t,versions:e,onRestore:n})=>{const[r,s]=v.useState(),o=l=>{s(l)},i=()=>{r!==void 0&&n(r)},a=r===void 0;return h.jsxs(I,{className:"space-y-4",role:"region","aria-label":"레이아웃 히스토리 패널",children:[h.jsx(I,{className:"border border-gray-300 dark:border-gray-600 rounded-lg p-4",children:h.jsx(Su,{versions:e,selectedId:r,onSelect:o})}),h.jsx(I,{className:"flex justify-end",children:h.jsx(oe,{variant:"primary",disabled:a,onClick:i,"aria-label":"선택한 버전으로 복원",children:"복원"})})]})},Uv=({emailLabel:t="Email",passwordLabel:e="Password",submitButtonText:n="Sign In",processingText:r="Processing...",emailPlaceholder:s="Email",passwordPlaceholder:o="Password",forgotPasswordText:i="Forgot your password?",forgotPasswordUrl:a="/admin/password/reset",emailRequiredError:l="Please enter your email.",emailInvalidError:c="Please enter a valid email address.",passwordRequiredError:d="Please enter your password.",onSubmit:u,loadingActions:f={},isLoading:g=!1,disabled:m=!1,apiError:p="",className:y="",style:b})=>{const[S,x]=v.useState(""),[E,k]=v.useState(""),[C,N]=v.useState({}),_=p,w=Object.values(f).some($=>$===!0),M=g||w,O=m||M,L=()=>{const $={},D=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return!S||S.trim()===""?$.email=l:D.test(S)||($.email=c),(!E||E.trim()==="")&&($.password=d),N($),Object.keys($).length===0},F=async $=>{if(!L()){$.preventDefault();return}N({}),u?await u($):$.preventDefault()};return h.jsx(I,{className:`w-full ${y}`,style:b,children:h.jsxs(La,{onSubmit:F,className:"space-y-6",noValidate:!0,children:[_&&h.jsx(I,{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800",children:h.jsx(bt,{className:"text-sm text-red-600 dark:text-red-400",children:_})}),h.jsxs(I,{children:[h.jsx(rn,{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:t}),h.jsx(wt,{id:"email",name:"email",type:"email",value:S,onChange:$=>x($.target.value),placeholder:s,disabled:O,className:`
w-full px-4 py-3 rounded-lg border
${C.email?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
bg-white dark:bg-gray-800
@@ -127,7 +127,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
focus:outline-none focus:ring-2
disabled:opacity-50 disabled:cursor-not-allowed
transition-colors duration-200
`}),C.email&&h.jsx(bt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C.email})]}),h.jsxs(I,{children:[h.jsx(en,{htmlFor:"password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),h.jsx(wt,{id:"password",name:"password",type:"password",value:E,onChange:F=>k(F.target.value),placeholder:o,disabled:O,className:`
`}),C.email&&h.jsx(bt,{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:C.email})]}),h.jsxs(I,{children:[h.jsx(rn,{htmlFor:"password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2",children:e}),h.jsx(wt,{id:"password",name:"password",type:"password",value:E,onChange:$=>k($.target.value),placeholder:o,disabled:O,className:`
w-full px-4 py-3 rounded-lg border
${C.password?"border-red-500 focus:border-red-500 focus:ring-red-500":"border-gray-300 dark:border-gray-600 focus:border-blue-500 focus:ring-blue-500"}
bg-white dark:bg-gray-800
@@ -146,7 +146,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
disabled:opacity-50 disabled:cursor-not-allowed
transition-colors duration-200
flex items-center justify-center
`,children:M?h.jsxs(h.Fragment,{children:[h.jsxs(Hn,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r]}):n})]})})},Cu=t=>t==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,il=t=>{const e=Cu(t);document.documentElement.setAttribute("data-theme",e),e==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},$v=()=>{const t=localStorage.getItem("g7_color_scheme");return t&&["auto","light","dark"].includes(t)?t:"auto"},Fv=({onThemeChange:t,className:e="",autoText:n="System",lightText:r="Light",darkText:s="Dark",id:o,editorAttrs:i})=>{const a=$v(),[l,c]=v.useState(a),[d,u]=v.useState(!1),f=v.useRef(null);v.useEffect(()=>{il(l)},[]),v.useEffect(()=>{if(l!=="auto")return;const p=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{il("auto")};return p.addEventListener("change",y),()=>p.removeEventListener("change",y)},[l]),v.useEffect(()=>{const p=y=>{f.current&&!f.current.contains(y.target)&&u(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const g=p=>{c(p),localStorage.setItem("g7_color_scheme",p),il(p),u(!1),t?.(p)},m=()=>Cu(l)==="dark"?de.Moon:de.Sun;return h.jsxs(I,{ref:f,className:`relative ${e}`,id:o,...i,children:[h.jsx(oe,{onClick:()=>u(!d),className:"w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors","aria-label":"Toggle theme",children:h.jsx(re,{name:m(),className:"text-sm text-slate-500 dark:text-slate-400"})}),d&&h.jsx(I,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:h.jsxs(I,{className:"py-2",children:[h.jsxs(oe,{onClick:()=>g("auto"),className:`
`,children:M?h.jsxs(h.Fragment,{children:[h.jsxs(Hn,{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[h.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),h.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r]}):n})]})})},_u=t=>t==="auto"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t,ll=t=>{const e=_u(t);document.documentElement.setAttribute("data-theme",e),e==="dark"?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")},Bv=()=>{const t=localStorage.getItem("g7_color_scheme");return t&&["auto","light","dark"].includes(t)?t:"auto"},jv=({onThemeChange:t,className:e="",autoText:n="System",lightText:r="Light",darkText:s="Dark",id:o,editorAttrs:i})=>{const a=Bv(),[l,c]=v.useState(a),[d,u]=v.useState(!1),f=v.useRef(null);v.useEffect(()=>{ll(l)},[]),v.useEffect(()=>{if(l!=="auto")return;const p=window.matchMedia("(prefers-color-scheme: dark)"),y=()=>{ll("auto")};return p.addEventListener("change",y),()=>p.removeEventListener("change",y)},[l]),v.useEffect(()=>{const p=y=>{f.current&&!f.current.contains(y.target)&&u(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[]);const g=p=>{c(p),localStorage.setItem("g7_color_scheme",p),ll(p),u(!1),t?.(p)},m=()=>_u(l)==="dark"?de.Moon:de.Sun;return h.jsxs(I,{ref:f,className:`relative ${e}`,id:o,...i,children:[h.jsx(oe,{onClick:()=>u(!d),className:"w-9 h-9 flex items-center justify-center hover:bg-gray-100 dark:hover:bg-gray-800 rounded-full transition-colors","aria-label":"Toggle theme",children:h.jsx(re,{name:m(),className:"text-sm text-slate-500 dark:text-slate-400"})}),d&&h.jsx(I,{className:"absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg z-50",children:h.jsxs(I,{className:"py-2",children:[h.jsxs(oe,{onClick:()=>g("auto"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${l==="auto"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[h.jsx(re,{name:de.Settings,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"flex-1 text-left text-gray-900 dark:text-white",children:n}),l==="auto"&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),h.jsxs(oe,{onClick:()=>g("light"),className:`
@@ -155,7 +155,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
`,children:[h.jsx(re,{name:de.Sun,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"flex-1 text-left text-gray-900 dark:text-white",children:r}),l==="light"&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]}),h.jsxs(oe,{onClick:()=>g("dark"),className:`
w-full px-4 py-2 text-left hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center gap-3 transition-colors
${l==="dark"?"bg-gray-50 dark:bg-gray-700":""}
`,children:[h.jsx(re,{name:de.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"flex-1 text-left text-gray-900 dark:text-white",children:s}),l==="dark"&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Su=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...t)=>console.log("[Comp:ColumnSelector]",...t),warn:(...t)=>console.warn("[Comp:ColumnSelector]",...t),error:(...t)=>console.error("[Comp:ColumnSelector]",...t)},_u=(t,e)=>window.G7Core?.t?.(t,e)??t,Vv=()=>window.G7Core,zv=({id:t,columns:e,visibleColumns:n,onColumnVisibilityChange:r,triggerLabel:s,triggerIconName:o=de.Sliders,position:i="right",className:a="",style:l,requiredText:c,menuTitle:d,menuDescription:u,defaultColumns:f,triggerClassName:g,labelClassName:m,dynamicColumns:p,dynamicColumnsInsertAfter:y,editorAttrs:b})=>{const S=s??_u("common.column_selector"),x=c??_u("common.required"),E=v.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return e;if(y){const z=e.findIndex(K=>K.field===y);if(z!==-1)return[...e.slice(0,z+1),...p,...e.slice(z+1)]}return[...e,...p]},[e,p,y]),[k,C]=v.useState(!1),N=v.useRef(null),_=v.useRef(null),[w,M]=v.useState(!1),[O,L]=v.useState(i),$=v.useMemo(()=>{try{const z=window.G7Core?.AuthManager?.getInstance();return z?z.getUser()?.uuid:void 0}catch{return}},[]),F=t?`g7_columns_${t}${$!==void 0?`_${$}`:""}`:null,D=()=>{if(!F)return null;try{const z=localStorage.getItem(F);if(z){const K=JSON.parse(z);if(Array.isArray(K)&&K.length>0)return K}}catch(z){Su.warn("Failed to load from localStorage:",z)}return null},A=z=>{if(F)try{localStorage.setItem(F,JSON.stringify(z))}catch(K){Su.warn("Failed to save to localStorage:",K)}},T=()=>{const z=D();return z||(n&&n.length>0?n:f&&f.length>0?f:E.filter(K=>K.visible!==!1).map(K=>K.field))},[V,H]=v.useState(T);v.useEffect(()=>{w||(r&&V.length>0&&r(V),M(!0))},[w,r,V]),v.useEffect(()=>{w&&n&&n.length>0&&(D()||H(n))},[n,w]);const W=v.useRef([]),j=v.useRef(null);v.useEffect(()=>{if(w&&p&&p.length>0){const z=p.map(Z=>Z.field);if(j.current===null){const Z=D();if(j.current=Z!==null,Z!==null){W.current=z;return}}const K=W.current,X=z.filter(Z=>!K.includes(Z));if(X.length>0){const Z=n&&n.length>0?n:V,ee=X.filter(ne=>!Z.includes(ne));if(ee.length>0){const ne=[...Z,...ee];H(ne),A(ne),r?.(ne)}}W.current=z}},[p,w]);const U=n&&n.length>0?n:V;v.useEffect(()=>{const z=K=>{N.current&&!N.current.contains(K.target)&&C(!1)};return k&&document.addEventListener("mousedown",z),()=>{document.removeEventListener("mousedown",z)}},[k]),v.useEffect(()=>{if(k&&_.current&&N.current){const z=_.current.getBoundingClientRect(),K=N.current.getBoundingClientRect(),X=window.innerWidth,Z=z.width||256;i==="right"?K.right-Z<0?L("left"):L("right"):K.left+Z>X?L("right"):L("left")}},[k,i]);const B=z=>{if(E.find(Z=>Z.field===z)?.required)return;const X=U.includes(z)?U.filter(Z=>Z!==z):[...U,z];H(X),A(X),r?.(X)},G=O==="left"?"left-0":"right-0";return h.jsxs(I,{ref:N,className:`relative inline-block ${a}`,style:l,id:t,...b,children:[h.jsxs(oe,{onClick:()=>C(!k),className:Vv()?.style?.mergeClasses?.("flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",g)??`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors ${g??""}`,children:[h.jsx(re,{name:o,className:"w-5 h-5"}),S&&h.jsx(Q,{className:`${m||"hidden sm:inline"} text-sm`,children:S})]}),k&&h.jsxs(I,{ref:_,className:`absolute ${G} z-50 mt-2 w-64 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg`,children:[(d||u)&&h.jsxs(I,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[d&&h.jsx(Q,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:d}),u&&h.jsx(Q,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:u})]}),h.jsx(I,{className:"p-2 max-h-64 overflow-y-auto",children:E.map(z=>{const K=U.includes(z.field),X=z.required===!0;return h.jsxs(I,{onClick:()=>!X&&B(z.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${X?"cursor-default":"cursor-pointer"}`,children:[h.jsx(vn,{checked:K,disabled:X,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),h.jsx(Q,{className:"text-sm text-gray-700 dark:text-gray-300",children:z.header}),X&&x&&h.jsx(Q,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:x})]},z.field)})})]})]})},Hv=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...t)=>console.log("[Comp:PageTransition]",...t),warn:(...t)=>console.warn("[Comp:PageTransition]",...t),error:(...t)=>console.error("[Comp:PageTransition]",...t)},Uv=({className:t="",style:e})=>{const[n,r]=v.useState(!1);return v.useEffect(()=>{c Line truncated
`,children:[h.jsx(re,{name:de.Moon,className:"w-5 h-5 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"flex-1 text-left text-gray-900 dark:text-white",children:s}),l==="dark"&&h.jsx(re,{name:de.Check,className:"w-4 h-4 text-blue-600 dark:text-blue-400 ml-auto"})]})]})})]})},Eu=window.G7Core?.createLogger?.("Comp:ColumnSelector")??{log:(...t)=>console.log("[Comp:ColumnSelector]",...t),warn:(...t)=>console.warn("[Comp:ColumnSelector]",...t),error:(...t)=>console.error("[Comp:ColumnSelector]",...t)},Mu=(t,e)=>window.G7Core?.t?.(t,e)??t,Wv=()=>window.G7Core,Gv=({id:t,columns:e,visibleColumns:n,onColumnVisibilityChange:r,triggerLabel:s,triggerIconName:o=de.Sliders,position:i="right",className:a="",style:l,requiredText:c,menuTitle:d,menuDescription:u,defaultColumns:f,triggerClassName:g,labelClassName:m,dynamicColumns:p,dynamicColumnsInsertAfter:y,editorAttrs:b})=>{const S=s??Mu("common.column_selector"),x=c??Mu("common.required"),E=v.useMemo(()=>{if(!p||!Array.isArray(p)||p.length===0)return e;if(y){const V=e.findIndex(K=>K.field===y);if(V!==-1)return[...e.slice(0,V+1),...p,...e.slice(V+1)]}return[...e,...p]},[e,p,y]),[k,C]=v.useState(!1),N=v.useRef(null),_=v.useRef(null),[w,M]=v.useState(!1),[O,L]=v.useState(i),F=v.useMemo(()=>{try{const V=window.G7Core?.AuthManager?.getInstance();return V?V.getUser()?.uuid:void 0}catch{return}},[]),$=t?`g7_columns_${t}${F!==void 0?`_${F}`:""}`:null,D=()=>{if(!$)return null;try{const V=localStorage.getItem($);if(V){const K=JSON.parse(V);if(Array.isArray(K)&&K.length>0)return K}}catch(V){Eu.warn("Failed to load from localStorage:",V)}return null},A=V=>{if($)try{localStorage.setItem($,JSON.stringify(V))}catch(K){Eu.warn("Failed to save to localStorage:",K)}},T=()=>{const V=D();return V||(n&&n.length>0?n:f&&f.length>0?f:E.filter(K=>K.visible!==!1).map(K=>K.field))},[z,H]=v.useState(T);v.useEffect(()=>{w||(r&&z.length>0&&r(z),M(!0))},[w,r,z]),v.useEffect(()=>{w&&n&&n.length>0&&(D()||H(n))},[n,w]);const W=v.useRef([]),j=v.useRef(null);v.useEffect(()=>{if(w&&p&&p.length>0){const V=p.map(Z=>Z.field);if(j.current===null){const Z=D();if(j.current=Z!==null,Z!==null){W.current=V;return}}const K=W.current,X=V.filter(Z=>!K.includes(Z));if(X.length>0){const Z=n&&n.length>0?n:z,ee=X.filter(ne=>!Z.includes(ne));if(ee.length>0){const ne=[...Z,...ee];H(ne),A(ne),r?.(ne)}}W.current=V}},[p,w]);const U=n&&n.length>0?n:z;v.useEffect(()=>{const V=K=>{N.current&&!N.current.contains(K.target)&&C(!1)};return k&&document.addEventListener("mousedown",V),()=>{document.removeEventListener("mousedown",V)}},[k]),v.useEffect(()=>{if(k&&_.current&&N.current){const V=_.current.getBoundingClientRect(),K=N.current.getBoundingClientRect(),X=window.innerWidth,Z=V.width||256;i==="right"?K.right-Z<0?L("left"):L("right"):K.left+Z>X?L("right"):L("left")}},[k,i]);const B=V=>{if(E.find(Z=>Z.field===V)?.required)return;const X=U.includes(V)?U.filter(Z=>Z!==V):[...U,V];H(X),A(X),r?.(X)},G=O==="left"?"left-0":"right-0";return h.jsxs(I,{ref:N,className:`relative inline-block ${a}`,style:l,id:t,...b,children:[h.jsxs(oe,{onClick:()=>C(!k),className:Wv()?.style?.mergeClasses?.("flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors",g)??`flex items-center gap-2 px-3 py-2 bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors ${g??""}`,children:[h.jsx(re,{name:o,className:"w-5 h-5"}),S&&h.jsx(Q,{className:`${m||"hidden sm:inline"} text-sm`,children:S})]}),k&&h.jsxs(I,{ref:_,className:`absolute ${G} z-50 mt-2 w-64 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg`,children:[(d||u)&&h.jsxs(I,{className:"px-4 pt-3 pb-2 border-b border-gray-200 dark:border-gray-700",children:[d&&h.jsx(Q,{className:"block text-sm font-medium text-gray-900 dark:text-white",children:d}),u&&h.jsx(Q,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-1",children:u})]}),h.jsx(I,{className:"p-2 max-h-64 overflow-y-auto",children:E.map(V=>{const K=U.includes(V.field),X=V.required===!0;return h.jsxs(I,{onClick:()=>!X&&B(V.field),className:`flex items-center gap-2 px-3 py-2 rounded hover:bg-gray-50 dark:hover:bg-gray-700 ${X?"cursor-default":"cursor-pointer"}`,children:[h.jsx(vn,{checked:K,disabled:X,readOnly:!0,className:"h-4 w-4 text-blue-600 rounded border-gray-300 dark:border-gray-600 pointer-events-none"}),h.jsx(Q,{className:"text-sm text-gray-700 dark:text-gray-300",children:V.header}),X&&x&&h.jsx(Q,{className:"ml-auto text-xs text-gray-400 dark:text-gray-500",children:x})]},V.field)})})]})]})},Yv=window.G7Core?.createLogger?.("Comp:PageTransition")??{log:(...t)=>console.log("[Comp:PageTransition]",...t),warn:(...t)=>console.warn("[Comp:PageTransition]",...t),error:(...t)=>console.error("[Comp:PageTransition]",...t)},Xv=({className:t="",style:e})=>{const[n,r]=v.useState(!1);return v.useEffect(()=>{c Line truncated
@keyframes loading {
0% {
transform: translateX(-100%);
@@ -167,19 +167,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
transform: translateX(-100%);
}
}
`})]}):null},Bv=(t,e)=>window.G7Core?.t?.(t,e)??t,jv=({options:t})=>{const e=document.documentElement.classList.contains("dark"),n=e?"rgb(17,24,39)":"rgb(249,250,251)",r=e?"#6b7280":"#9ca3af",s=e?"#9ca3af":"#6b7280";return h.jsxs("div",{style:{position:"absolute",inset:0,zIndex:2147483647,overflow:"hidden",background:n,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",paddingTop:"15%",gap:"12px"},children:[h.jsx("div",{style:{width:"32px",height:"32px",border:`3px solid ${r}`,borderTopColor:"transparent",borderRadius:"50%",animation:"g7-spin 0.8s linear infinite"}}),h.jsx("span",{style:{color:s,fontSize:"14px"},children:t?.text||Bv("nav.loading")})]})};function fr(t){"@babel/helpers - typeof";return fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fr(t)}function Wv(t,e){if(fr(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(fr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Eu(t){var e=Wv(t,"string");return fr(e)=="symbol"?e:e+""}function Ts(t,e,n){return(e=Eu(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Mu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Oe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mu(Object(n),!0).forEach(function(r){Ts(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Gv(t){if(Array.isArray(t))return t}function Yv(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function al(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Nu(t,e){if(t){if(typeof t=="string")return al(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?al(t,e):void 0}}function Xv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Un(t,e){return Gv(t)||Yv(t,e)||Nu(t,e)||Xv()}function Kv(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function On(t,e){if(t==null)return{};var n,r,s=Kv(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}var qv=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Ou(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,s=r===void 0?!1:r,o=t.defaultValue,i=o===void 0?null:o,a=t.inputValue,l=t.menuIsOpen,c=t.onChange,d=t.onInputChange,u=t.onMenuClose,f=t.onMenuOpen,g=t.value,m=On(t,qv),p=v.useState(a!==void 0?a:n),y=Un(p,2),b=y[0],S=y[1],x=v.useState(l!==void 0?l:s),E=Un(x,2),k=E[0],C=E[1],N=v.useState(g!==void 0?g:i),_=Un(N,2),w=_[0],M=_[1],O=v.useCallback(function(V,H){typeof c=="function"&&c(V,H),M(V)},[c]),L=v.useCallback(function(V,H){var W;typeof d=="function"&&(W=d(V,H)),S(W!==void 0?W:V)},[d]),$=v.useCallback(function(){typeof f=="function"&&f(),C(!0)},[f]),F=v.useCallback(function(){typeof u=="function"&&u(),C(!1)},[u]),D=a!==void 0?a:b,A=l!==void 0?l:k,T=g!==void 0?g:w;return Oe(Oe({},m),{},{inputValue:D,menuIsOpen:A,onChange:O,onInputChange:L,onMenuClose:F,onMenuOpen:$,value:T})}function De(){return De=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},De.apply(null,arguments)}function Zv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Eu(r.key),r)}}function Qv(t,e,n){return e&&Tu(t.prototype,e),n&&Tu(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ll(t,e){return ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},ll(t,e)}function Jv(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ll(t,e)}function Yo(t){return Yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Yo(t)}function Au(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Au=function(){return!!t})()}function Rv(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ex(t,e){if(e&&(fr(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Rv(t)}function tx(t){var e=Au();return function(){var n,r=Yo(t);if(e){var s=Yo(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return ex(this,n)}}function nx(t){if(Array.isArray(t))return al(t)}function rx(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function sx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hr(t){return nx(t)||rx(t)||Nu(t)||sx()}function ox(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function ix(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var ax=(function(){function t(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ix(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=ox(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},t})(),$t="-ms-",Xo="-moz-",et="-webkit-",Du="comm",cl="rule",dl="decl",lx="@import",Iu="@keyframes",cx="@layer",dx=Math.abs,Ko=String.fromCharCode,ux=Object.assign;function fx(t,e){return It(t,0)^45?(((e<<2^It(t,0))<<2^It(t,1))<<2^It(t,2))<<2^It(t,3):0}function Lu(t){return t.trim()}function hx(t,e){return(t=e.exec(t))?t[0]:t}function tt(t,e,n){return t.replace(e,n)}function ul(t,e){return t.indexOf(e)}function It(t,e){return t.charCodeAt(e)|0}function As(t,e,n){return t.slice(e,n)}function Tn(t){return t.length}function fl(t){return t.length}function qo(t,e){return e.push(t),t}function gx(t,e){return t.map(e).join("")}var Zo=1,Ur=1,Pu=0,Xt=0,kt=0,Br="";function Qo(t,e,n,r,s,o,i){return{value:t,root:e,parent:n,type:r,props:s,children:o,line:Zo,column:Ur,length:i,return:""}}function Ds(t,e){return ux(Qo("",null,null,"",null,null,0),t,{length:-t.length},e)}function px(){return kt}function mx(){return kt=Xt>0?It(Br,--Xt):0,Ur--,kt===10&&(Ur=1,Zo--),kt}function rn(){return kt=Xt<Pu?It(Br,Xt++):0,Ur++,kt===10&&(Ur=1,Zo++),kt}function An(){return It(Br,Xt)}function Jo(){return Xt}function Is(t,e){return As(Br,t,e)}function Ls(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function $u(t){return Zo=Ur=1,Pu=Tn(Br=t),Xt=0,[]}function Fu(t){return Br="",t}function Ro(t){return Lu(Is(Xt-1,hl(t===91?t+2:t===40?t+1:t)))}function bx(t){for(;(kt=An())&&kt<33;)rn();return Ls(t)>2||Ls(kt)>3?"":" "}function yx(t,e){for(;--e&&rn()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Is(t,Jo()+(e<6&&An()==32&&rn()==32))}function hl(t){for(;rn();)switch(kt){case t:return Xt;case 34:case 39:t!==34&&t!==39&&hl(kt);break;case 40:t===41&&hl(t);break;case 92:rn();break}return Xt}function vx(t,e){for(;rn()&&t+kt!==57;)if(t+kt===84&&An()===47)break;return"/*"+Is(e,Xt-1)+"*"+Ko(t===47?t:rn())}function xx(t){for(;!Ls(An());)rn();return Is(t,Xt)}function wx(t){return Fu(ei("",null,null,null,[""],t=$u(t),0,[0],t))}function ei(t,e,n,r,s,o,i,a,l){for(var c=0,d=0,u=i,f=0,g=0,m=0,p=1,y=1,b=1,S=0,x="",E=s,k=o,C=r,N=x;y;)switch(m=S,S=rn()){case 40:if(m!=108&&It(N,u-1)==58){ul(N+=tt(Ro(S),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:N+=Ro(S);break;case 9:case 10:case 13:case 32:N+=bx(m);break;case 92:N+=yx(Jo()-1,7);continue;case 47:switch(An()){case 42:case 47:qo(kx(vx(rn(),Jo()),e,n),l);break;default:N+="/"}break;case 123*p:a[c++]=Tn(N)*b;case 125*p:case 59:case 0:switch(S){case 0:case 125:y=0;case 59+d:b==-1&&(N=tt(N,/\f/g,"")),g>0&&Tn(N)-u&&qo(g>32?zu(N+";",r,n,u-1):zu(tt(N," ","")+";",r,n,u-2),l);break;case 59:N+=";";default:if(qo(C=Vu(N,e,n,c,d,s,a,x,E=[],k=[],u),o),S===123)if(d===0)ei(N,e,C,C,E,o,u,a,k);else switch(f===99&&It(N,3)===110?100:f){case 100:case 108:case 109:case 115:ei(t,C,C,r&&qo(Vu(t,C,C,0,0,s,a,x,s,E=[],u),k),s,k,u,a,r?E:k);break;default:ei(N,C,C,C,[""],k,0,a,k)}}c=d=g=0,p=b=1,x=N="",u=i;break;case 58:u=1+Tn(N),g=m;default:if(p<1){if(S==123)--p;else if(S==125&&p++==0&&mx()==125)continue}switch(N+=Ko(S),S*p){case 38:b=d>0?1:(N+="\f",-1);break;case 44:a[c++]=(Tn(N)-1)*b,b=1;break;case 64:An()===45&&(N+=Ro(rn())),f=An(),d=u=Tn(x=N+=xx(Jo())),S++;break;case 45:m===45&&Tn(N)==2&&(p=0)}}return o}function Vu(t,e,n,r,s,o,i,a,l,c,d){for(var u=s-1,f=s===0?o:[""],g=fl(f),m=0,p=0,y=0;m<r;++m)for(var b=0,S=As(t,u+1,u=dx(p=i[m])),x=t;b<g;++b)(x=Lu(p>0?f[b]+" "+S:tt(S,/&\f/g,f[b])))&&(l[y++]=x);retu Line truncated
* react-is.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 Bu;function Px(){if(Bu)return rt;Bu=1;var t=typeof Symbol=="function"&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,r=t?Symbol.for("react.fragment"):60107,s=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,i=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,c=t?Symbol.for("react.concurrent_mode"):60111,d=t?Symbol.for("react.forward_ref"):60112,u=t?Symbol.for("react.suspense"):60113,f=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,p=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,S=t?Symbol.for("react.scope"):60119;function x(k){if(typeof k=="object"&&k!==null){var C=k.$$typeof;switch(C){case e:switch(k=k.type,k){case l:case c:case r:case o:case s:case u:return k;default:switch(k=k&&k.$$typeof,k){case a:case d:case m:case g:case i:return k;default:return C}}case n:return C}}}function E(k){return x(k)===c}return rt.AsyncMode=l,rt.ConcurrentMode=c,rt.ContextConsumer=a,rt.ContextProvider=i,rt.Element=e,rt.ForwardRef=d,rt.Fragment=r,rt.Lazy=m,rt.Memo=g,rt.Portal=n,rt.Profiler=o,rt.StrictMode=s,rt.Suspense=u,rt.isAsyncMode=function(k){return E(k)||x(k)===l},rt.isConcurrentMode=E,rt.isContextConsumer=function(k){return x(k)===a},rt.isContextProvider=function(k){return x(k)===i},rt.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===e},rt.isForwardRef=function(k){return x(k)===d},rt.isFragment=function(k){return x(k)===r},rt.isLazy=function(k){return x(k)===m},rt.isMemo=function(k){return x(k)===g},rt.isPortal=function(k){return x(k)===n},rt.isProfiler=function(k){return x(k)===o},rt.isStrictMode=function(k){return x(k)===s},rt.isSuspense=function(k){return x(k)===u},rt.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===r||k===c||k===o||k===s||k===u||k===f||typeof k=="object"&&k!==null&&(k.$$typeof===m||k.$$typeof===g||k.$$typeof===i||k.$$typeof===a||k.$$typeof===d||k.$$typeof===y||k.$$typeof===b||k.$$typeof===S||k.$$typeof===p)},rt.typeOf=x,rt}var ju;function $x(){return ju||(ju=1,gl.exports=Px()),gl.exports}var pl,Wu;function Fx(){if(Wu)return pl;Wu=1;var t=$x(),e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};o[t.ForwardRef]=r,o[t.Memo]=s;function i(m){return t.isMemo(m)?s:o[m.$$typeof]||e}var a=Object.defineProperty,l=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,f=Object.prototype;function g(m,p,y){if(typeof p!="string"){if(f){var b=u(p);b&&b!==f&&g(m,b,y)}var S=l(p);c&&(S=S.concat(c(p)));for(var x=i(m),E=i(p),k=0;k<S.length;++k){var C=S[k];if(!n[C]&&!(y&&y[C])&&!(E&&E[C])&&!(x&&x[C])){var N=d(p,C);try{a(m,C,N)}catch{}}}}return m}return pl=g,pl}Fx();var Vx=!0;function zx(t,e,n){var r="";return n.split(" ").forEach(function(s){t[s]!==void 0?e.push(t[s]+";"):s&&(r+=s+" ")}),r}var Gu=function(e,n,r){var s=e.key+"-"+n.name;(r===!1||Vx===!1)&&e.registered[s]===void 0&&(e.registered[s]=n.styles)},Hx=function(e,n,r){Gu(e,n,r);var s=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+s:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function Ux(t){for(var e=0,n,r=0,s=t.length;s>=4;++r,s-=4)n=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(s){case 3:e^=(t.charCodeAt(r+2)&255)<<16;case 2:e^=(t.charCodeAt(r+1)&255)<<8;case 1:e^=t.charCodeAt(r)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Bx={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},jx=/[A-Z]|^ms/g,Wx=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Yu=function(e){return e.charCodeAt(1)===45},Xu=functioLine truncated
`})]}):null},Kv=(t,e)=>window.G7Core?.t?.(t,e)??t,qv=({options:t})=>{const e=document.documentElement.classList.contains("dark"),n=e?"rgb(17,24,39)":"rgb(249,250,251)",r=e?"#6b7280":"#9ca3af",s=e?"#9ca3af":"#6b7280";return h.jsxs("div",{style:{position:"absolute",inset:0,zIndex:2147483647,overflow:"hidden",background:n,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",paddingTop:"15%",gap:"12px"},children:[h.jsx("div",{style:{width:"32px",height:"32px",border:`3px solid ${r}`,borderTopColor:"transparent",borderRadius:"50%",animation:"g7-spin 0.8s linear infinite"}}),h.jsx("span",{style:{color:s,fontSize:"14px"},children:t?.text||Kv("nav.loading")})]})};function hr(t){"@babel/helpers - typeof";return hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hr(t)}function Zv(t,e){if(hr(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(hr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Nu(t){var e=Zv(t,"string");return hr(e)=="symbol"?e:e+""}function Ts(t,e,n){return(e=Nu(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ou(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function Me(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ou(Object(n),!0).forEach(function(r){Ts(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ou(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Qv(t){if(Array.isArray(t))return t}function Jv(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,s,o,i,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(d){c=!0,s=d}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw s}}return a}}function cl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Tu(t,e){if(t){if(typeof t=="string")return cl(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cl(t,e):void 0}}function Rv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bn(t,e){return Qv(t)||Jv(t,e)||Tu(t,e)||Rv()}function ex(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function Tn(t,e){if(t==null)return{};var n,r,s=ex(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(s[n]=t[n])}return s}var tx=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function Au(t){var e=t.defaultInputValue,n=e===void 0?"":e,r=t.defaultMenuIsOpen,s=r===void 0?!1:r,o=t.defaultValue,i=o===void 0?null:o,a=t.inputValue,l=t.menuIsOpen,c=t.onChange,d=t.onInputChange,u=t.onMenuClose,f=t.onMenuOpen,g=t.value,m=Tn(t,tx),p=v.useState(a!==void 0?a:n),y=Bn(p,2),b=y[0],S=y[1],x=v.useState(l!==void 0?l:s),E=Bn(x,2),k=E[0],C=E[1],N=v.useState(g!==void 0?g:i),_=Bn(N,2),w=_[0],M=_[1],O=v.useCallback(function(z,H){typeof c=="function"&&c(z,H),M(z)},[c]),L=v.useCallback(function(z,H){var W;typeof d=="function"&&(W=d(z,H)),S(W!==void 0?W:z)},[d]),F=v.useCallback(function(){typeof f=="function"&&f(),C(!0)},[f]),$=v.useCallback(function(){typeof u=="function"&&u(),C(!1)},[u]),D=a!==void 0?a:b,A=l!==void 0?l:k,T=g!==void 0?g:w;return Me(Me({},m),{},{inputValue:D,menuIsOpen:A,onChange:O,onInputChange:L,onMenuClose:$,onMenuOpen:F,value:T})}function Ae(){return Ae=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ae.apply(null,arguments)}function nx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Du(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Nu(r.key),r)}}function rx(t,e,n){return e&&Du(t.prototype,e),n&&Du(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function dl(t,e){return dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},dl(t,e)}function sx(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dl(t,e)}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xo(t)}function Iu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Iu=function(){return!!t})()}function ox(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ix(t,e){if(e&&(hr(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ox(t)}function ax(t){var e=Iu();return function(){var n,r=Xo(t);if(e){var s=Xo(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return ix(this,n)}}function lx(t){if(Array.isArray(t))return cl(t)}function cx(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function dx(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hr(t){return lx(t)||cx(t)||Tu(t)||dx()}function ux(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function fx(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var hx=(function(){function t(n){var r=this;this._insertTag=function(s){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(s,o),r.tags.push(s)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(r){r.forEach(this._insertTag)},e.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(fx(this));var s=this.tags[this.tags.length-1];if(this.isSpeedy){var o=ux(s);try{o.insertRule(r,o.cssRules.length)}catch{}}else s.appendChild(document.createTextNode(r));this.ctr++},e.flush=function(){this.tags.forEach(function(r){var s;return(s=r.parentNode)==null?void 0:s.removeChild(r)}),this.tags=[],this.ctr=0},t})(),$t="-ms-",Ko="-moz-",tt="-webkit-",Lu="comm",ul="rule",fl="decl",gx="@import",Pu="@keyframes",px="@layer",mx=Math.abs,qo=String.fromCharCode,bx=Object.assign;function yx(t,e){return It(t,0)^45?(((e<<2^It(t,0))<<2^It(t,1))<<2^It(t,2))<<2^It(t,3):0}function $u(t){return t.trim()}function vx(t,e){return(t=e.exec(t))?t[0]:t}function nt(t,e,n){return t.replace(e,n)}function hl(t,e){return t.indexOf(e)}function It(t,e){return t.charCodeAt(e)|0}function As(t,e,n){return t.slice(e,n)}function An(t){return t.length}function gl(t){return t.length}function Zo(t,e){return e.push(t),t}function xx(t,e){return t.map(e).join("")}var Qo=1,Ur=1,Fu=0,qt=0,kt=0,Br="";function Jo(t,e,n,r,s,o,i){return{value:t,root:e,parent:n,type:r,props:s,children:o,line:Qo,column:Ur,length:i,return:""}}function Ds(t,e){return bx(Jo("",null,null,"",null,null,0),t,{length:-t.length},e)}function wx(){return kt}function kx(){return kt=qt>0?It(Br,--qt):0,Ur--,kt===10&&(Ur=1,Qo--),kt}function on(){return kt=qt<Fu?It(Br,qt++):0,Ur++,kt===10&&(Ur=1,Qo++),kt}function Dn(){return It(Br,qt)}function Ro(){return qt}function Is(t,e){return As(Br,t,e)}function Ls(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function zu(t){return Qo=Ur=1,Fu=An(Br=t),qt=0,[]}function Vu(t){return Br="",t}function ei(t){return $u(Is(qt-1,pl(t===91?t+2:t===40?t+1:t)))}function Cx(t){for(;(kt=Dn())&&kt<33;)on();return Ls(t)>2||Ls(kt)>3?"":" "}function Sx(t,e){for(;--e&&on()&&!(kt<48||kt>102||kt>57&&kt<65||kt>70&&kt<97););return Is(t,Ro()+(e<6&&Dn()==32&&on()==32))}function pl(t){for(;on();)switch(kt){case t:return qt;case 34:case 39:t!==34&&t!==39&&pl(kt);break;case 40:t===41&&pl(t);break;case 92:on();break}return qt}function _x(t,e){for(;on()&&t+kt!==57;)if(t+kt===84&&Dn()===47)break;return"/*"+Is(e,qt-1)+"*"+qo(t===47?t:on())}function Ex(t){for(;!Ls(Dn());)on();return Is(t,qt)}function Mx(t){return Vu(ti("",null,null,null,[""],t=zu(t),0,[0],t))}function ti(t,e,n,r,s,o,i,a,l){for(var c=0,d=0,u=i,f=0,g=0,m=0,p=1,y=1,b=1,S=0,x="",E=s,k=o,C=r,N=x;y;)switch(m=S,S=on()){case 40:if(m!=108&&It(N,u-1)==58){hl(N+=nt(ei(S),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:N+=ei(S);break;case 9:case 10:case 13:case 32:N+=Cx(m);break;case 92:N+=Sx(Ro()-1,7);continue;case 47:switch(Dn()){case 42:case 47:Zo(Nx(_x(on(),Ro()),e,n),l);break;default:N+="/"}break;case 123*p:a[c++]=An(N)*b;case 125*p:case 59:case 0:switch(S){case 0:case 125:y=0;case 59+d:b==-1&&(N=nt(N,/\f/g,"")),g>0&&An(N)-u&&Zo(g>32?Uu(N+";",r,n,u-1):Uu(nt(N," ","")+";",r,n,u-2),l);break;case 59:N+=";";default:if(Zo(C=Hu(N,e,n,c,d,s,a,x,E=[],k=[],u),o),S===123)if(d===0)ti(N,e,C,C,E,o,u,a,k);else switch(f===99&&It(N,3)===110?100:f){case 100:case 108:case 109:case 115:ti(t,C,C,r&&Zo(Hu(t,C,C,0,0,s,a,x,s,E=[],u),k),s,k,u,a,r?E:k);break;default:ti(N,C,C,C,[""],k,0,a,k)}}c=d=g=0,p=b=1,x=N="",u=i;break;case 58:u=1+An(N),g=m;default:if(p<1){if(S==123)--p;else if(S==125&&p++==0&&kx()==125)continue}switch(N+=qo(S),S*p){case 38:b=d>0?1:(N+="\f",-1);break;case 44:a[c++]=(An(N)-1)*b,b=1;break;case 64:Dn()===45&&(N+=ei(on())),f=Dn(),d=u=An(x=N+=Ex(Ro())),S++;break;case 45:m===45&&An(N)==2&&(p=0)}}return o}function Hu(t,e,n,r,s,o,i,a,l,c,d){for(var u=s-1,f=s===0?o:[""],g=gl(f),m=0,p=0,y=0;m<r;++m)for(var b=0,S=As(t,u+1,u=mx(p=i[m])),x=t;b<g;++b)(x=$u(p>0?f[b]+" "+S:nt(S,/&\f/g,f[b])))&&(l[y++]=x);retu Line truncated
0%, 80%, 100% { opacity: 0; }
40% { opacity: 1; }
`]))),c1=function(e,n){var r=e.isFocused,s=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return Oe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:a*2})},El=function(e){var n=e.delay,r=e.offset;return Ne("span",{css:vl({animation:"".concat(l1," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},d1=function(e){var n=e.innerProps,r=e.isRtl,s=e.size,o=s===void 0?4:s,i=On(e,e1);return Ne("div",De({},yt(Oe(Oe({},i),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ne(El,{delay:0,offset:r}),Ne(El,{delay:160,offset:!0}),Ne(El,{delay:320,offset:!r}))},u1=function(e,n){var r=e.isDisabled,s=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius,l=o.spacing;return Oe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:s?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:s?i.primary:i.neutral30}})},f1=function(e){var n=e.children,r=e.isDisabled,s=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ne("div",De({ref:o},yt(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":s,"control--menu-is-open":a}),i,{"aria-disabled":r||void 0}),n)},h1=f1,g1=["data"],p1=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},m1=function(e){var n=e.children,r=e.cx,s=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,c=e.label,d=e.theme,u=e.selectProps;return Ne("div",De({},yt(e,"group",{group:!0}),l),Ne(i,De({},a,{selectProps:u,theme:d,getStyles:s,getClassNames:o,cx:r}),c),Ne("div",null,n))},b1=function(e,n){var r=e.theme,s=r.colors,o=r.spacing;return Oe({label:"group",cursor:"default",display:"block"},n?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},y1=function(e){var n=lf(e);n.data;var r=On(n,g1);return Ne("div",De({},yt(e,"groupHeading",{"group-heading":!0}),r))},v1=m1,x1=["innerRef","isDisabled","isHidden","inputClassName"],w1=function(e,n){var r=e.isDisabled,s=e.value,o=e.theme,i=o.spacing,a=o.colors;return Oe(Oe({visibility:r?"hidden":"visible",transform:s?"translateZ(0)":""},k1),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},xf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},k1={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Oe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},xf)},C1=function(e){return Oe({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},xf)},S1=function(e){var n=e.cx,r=e.value,s=lf(e),o=s.innerRef,i=s.isDisabled,a=s.isHidden,l=s.inputClassName,c=On(s,x1);return Ne("div",De({},yt(e,"input",{"input-container":!0}),{"data-value":r||""}),Ne("input",De({className:n({input:!0},l),ref:o,style:C1(a),disabled:i},c)))},_1=S1,E1=function(e,n){var r=e.theme,s=r.spacing,o=r.borderRadius,i=r.colors;return Oe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:s.baseUnit/2})},M1=function(e,n){var r=e.theme,s=r.borderRadius,o=r.colors,i=e.cropWithEllipsis;return Oe({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:s/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},N1=function(e,n){var r=e.theme,s=r.spacing,o=r.borderRadius,i=r.colors,a=e.isFocused;return Oe({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},wf=function(e){var n=e.children,r=e.innerProps;return Ne("div",r,n)},O1=wf,T1=wf;function A1(t){var e=t.children,n=t.innerProps;return Ne("div",De({role:"button"},n),e||Ne(_l,{size:14}))}var D1=function(e){var n=e.children,r=e.components,s=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,c=r.Container,d=r.Label,u=r.Remove;return Ne(c,{data:s,innerProps:Oe(Oe({},yt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ne(d,{data:s,innerProps:Oe({},yt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Ne(u,{data:s,innerProps:Oe(Oe({},yt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),s Line truncated
`]))),h1=function(e,n){var r=e.isFocused,s=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return Me({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:s,lineHeight:1,marginRight:s,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?i.neutral60:i.neutral20,padding:a*2})},Ol=function(e){var n=e.delay,r=e.offset;return Ee("span",{css:wl({animation:"".concat(f1," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},g1=function(e){var n=e.innerProps,r=e.isRtl,s=e.size,o=s===void 0?4:s,i=Tn(e,s1);return Ee("div",Ae({},yt(Me(Me({},i),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),Ee(Ol,{delay:0,offset:r}),Ee(Ol,{delay:160,offset:!0}),Ee(Ol,{delay:320,offset:!r}))},p1=function(e,n){var r=e.isDisabled,s=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius,l=o.spacing;return Me({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?i.neutral5:i.neutral0,borderColor:r?i.neutral10:s?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:s?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:s?i.primary:i.neutral30}})},m1=function(e){var n=e.children,r=e.isDisabled,s=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Ee("div",Ae({ref:o},yt(e,"control",{control:!0,"control--is-disabled":r,"control--is-focused":s,"control--menu-is-open":a}),i,{"aria-disabled":r||void 0}),n)},b1=m1,y1=["data"],v1=function(e,n){var r=e.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},x1=function(e){var n=e.children,r=e.cx,s=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,c=e.label,d=e.theme,u=e.selectProps;return Ee("div",Ae({},yt(e,"group",{group:!0}),l),Ee(i,Ae({},a,{selectProps:u,theme:d,getStyles:s,getClassNames:o,cx:r}),c),Ee("div",null,n))},w1=function(e,n){var r=e.theme,s=r.colors,o=r.spacing;return Me({label:"group",cursor:"default",display:"block"},n?{}:{color:s.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},k1=function(e){var n=df(e);n.data;var r=Tn(n,y1);return Ee("div",Ae({},yt(e,"groupHeading",{"group-heading":!0}),r))},C1=x1,S1=["innerRef","isDisabled","isHidden","inputClassName"],_1=function(e,n){var r=e.isDisabled,s=e.value,o=e.theme,i=o.spacing,a=o.colors;return Me(Me({visibility:r?"hidden":"visible",transform:s?"translateZ(0)":""},E1),n?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},kf={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},E1={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Me({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},kf)},M1=function(e){return Me({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},kf)},N1=function(e){var n=e.cx,r=e.value,s=df(e),o=s.innerRef,i=s.isDisabled,a=s.isHidden,l=s.inputClassName,c=Tn(s,S1);return Ee("div",Ae({},yt(e,"input",{"input-container":!0}),{"data-value":r||""}),Ee("input",Ae({className:n({input:!0},l),ref:o,style:M1(a),disabled:i},c)))},O1=N1,T1=function(e,n){var r=e.theme,s=r.spacing,o=r.borderRadius,i=r.colors;return Me({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:s.baseUnit/2})},A1=function(e,n){var r=e.theme,s=r.borderRadius,o=r.colors,i=e.cropWithEllipsis;return Me({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:s/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},D1=function(e,n){var r=e.theme,s=r.spacing,o=r.borderRadius,i=r.colors,a=e.isFocused;return Me({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:s.baseUnit,paddingRight:s.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},Cf=function(e){var n=e.children,r=e.innerProps;return Ee("div",r,n)},I1=Cf,L1=Cf;function P1(t){var e=t.children,n=t.innerProps;return Ee("div",Ae({role:"button"},n),e||Ee(Nl,{size:14}))}var $1=function(e){var n=e.children,r=e.components,s=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,c=r.Container,d=r.Label,u=r.Remove;return Ee(c,{data:s,innerProps:Me(Me({},yt(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Ee(d,{data:s,innerProps:Me({},yt(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),Ee(u,{data:s,innerProps:Me(Me({},yt(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},a),s Line truncated
px-4 py-2.5 bg-gray-100 dark:bg-gray-700
border-0 rounded-xl
text-gray-700 dark:text-gray-200 font-medium
@@ -188,17 +181,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
text-left cursor-pointer
disabled:opacity-50 disabled:cursor-not-allowed
min-w-[200px]
`,"aria-haspopup":"listbox","aria-expanded":m,children:[h.jsxs(I,{className:"flex items-center gap-2",children:[c,h.jsx(Q,{className:"truncate",children:N})]}),h.jsx(Hn,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&h.jsxs(I,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden min-w-[280px]",role:"listbox",children:[h.jsx(I,{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx("input",{id:E,type:"text",value:y,onChange:w,placeholder:s,className:"w-full px-3 py-2 bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-2 focus:ring-blue-500 focus:border-transparent focus:outline-none"})}),h.jsxs(I,{className:"max-h-80 overflow-auto",children:[L&&h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:a}),$&&h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:i}),F&&h.jsx(I,{className:"py-2",children:C.map(D=>{const A=O(D.value);return h.jsxs(oe,{type:"button",onClick:()=>!D.disabled&&M(D.value),disabled:D.disabled,className:`
`,"aria-haspopup":"listbox","aria-expanded":m,children:[h.jsxs(I,{className:"flex items-center gap-2",children:[c,h.jsx(Q,{className:"truncate",children:N})]}),h.jsx(Hn,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${m?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&h.jsxs(I,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden min-w-[280px]",role:"listbox",children:[h.jsx(I,{className:"p-3 border-b border-gray-200 dark:border-gray-700",children:h.jsx("input",{id:E,type:"text",value:y,onChange:w,placeholder:s,className:"w-full px-3 py-2 bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-gray-500 focus:ring-2 focus:ring-blue-500 focus:border-transparent focus:outline-none"})}),h.jsxs(I,{className:"max-h-80 overflow-auto",children:[L&&h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:a}),F&&h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:i}),$&&h.jsx(I,{className:"py-2",children:C.map(D=>{const A=O(D.value);return h.jsxs(oe,{type:"button",onClick:()=>!D.disabled&&M(D.value),disabled:D.disabled,className:`
w-full px-4 py-3 text-left
flex items-start gap-3
hover:bg-gray-100 dark:hover:bg-gray-700
transition-colors
${D.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":A,children:[h.jsx(I,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:A&&h.jsx(Hn,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),h.jsxs(I,{className:"flex-1 min-w-0",children:[h.jsx(I,{className:`font-medium ${A?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:D.label}),D.description&&h.jsx(I,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:D.description})]})]},D.value)})})]})]})]})},Vs={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},Hk=({options:t=[],value:e=[],onChange:n,placeholder:r="No items selected",disabled:s=!1,className:o="",id:i,editorAttrs:a})=>{const l=v.useCallback(f=>t.find(m=>String(m.value)===String(f))?.label||String(f),[t]),c=v.useCallback(f=>{if(s)return;const g=e.filter(m=>String(m)!==String(f));n?.(g)},[e,n,s]),d=v.useMemo(()=>e.map(f=>({value:f,label:l(f)})),[e,l]),u=`${Vs.container.base} ${s?Vs.container.disabled:""} ${o}`.trim();return h.jsx(I,{className:u,id:i,...a,children:d.length===0?h.jsx(Q,{className:Vs.placeholder,children:r}):d.map(f=>h.jsxs(Q,{className:Vs.tag,children:[f.label,!s&&h.jsx(Q,{className:Vs.tagRemove,onClick:()=>c(f.value),role:"button","aria-label":`Remove ${f.label}`,children:h.jsx(Hn,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},f.value))})};function Uk(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v.useMemo(()=>r=>{e.forEach(s=>s(r))},e)}const pi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Yr(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Fl(t){return"nodeType"in t}function Wt(t){var e,n;return t?Yr(t)?t:Fl(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function Vl(t){const{Document:e}=Wt(t);return t instanceof e}function zs(t){return Yr(t)?!1:t instanceof Wt(t).HTMLElement}function eh(t){return t instanceof Wt(t).SVGElement}function Xr(t){return t?Yr(t)?t.document:Fl(t)?Vl(t)?t:zs(t)||eh(t)?t.ownerDocument:document:document:document}const wn=pi?v.useLayoutEffect:v.useEffect;function mi(t){const e=v.useRef(t);return wn(()=>{e.current=t}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function Bk(){const t=v.useRef(null),e=v.useCallback((r,s)=>{t.current=setInterval(r,s)},[]),n=v.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function Hs(t,e){e===void 0&&(e=[t]);const n=v.useRef(t);return wn(()=>{n.current!==t&&(n.current=t)},e),n}function Us(t,e){const n=v.useRef();return v.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function bi(t){const e=mi(t),n=v.useRef(null),r=v.useCallback(s=>{s!==n.current&&e?.(s,n.current),n.current=s},[]);return[n,r]}function yi(t){const e=v.useRef();return v.useEffect(()=>{e.current=t},[t]),e.current}let zl={};function Bs(t,e){return v.useMemo(()=>{if(e)return e;const n=zl[t]==null?0:zl[t]+1;return zl[t]=n,t+"-"+n},[t,e])}function th(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((o,i)=>{const a=Object.entries(i);for(const[l,c]of a){const d=o[l];d!=null&&(o[l]=d+t*c)}return o},{...e})}}const Kr=th(1),js=th(-1);function jk(t){return"clientX"in t&&"clientY"in t}function vi(t){if(!t)return!1;const{KeyboardEvent:e}=Wt(t.target);return e&&t instanceof e}function Wk(t){if(!t)return!1;const{TouchEvent:e}=Wt(t.target);return e&&t instanceof e}function xi(t){if(Wk(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return jk(t)?{x:t.clientX,y:t.clientY}:null}const In=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[In.Translate.toString(t),In.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),nh="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Gk(t){return t.matches(nh)?t:t.querySelector(nh)}const Yk={display:"none"};function Xk(t){let{id:e,value:n}=t;return v.createElement("div",{id:e,s Line truncated
`,role:"option","aria-selected":A,children:[h.jsx(I,{className:"w-5 h-5 flex-shrink-0 mt-0.5",children:A&&h.jsx(Hn,{className:"w-5 h-5 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),h.jsxs(I,{className:"flex-1 min-w-0",children:[h.jsx(I,{className:`font-medium ${A?"text-blue-600 dark:text-blue-400":"text-gray-900 dark:text-white"}`,children:D.label}),D.description&&h.jsx(I,{className:"text-sm text-gray-500 dark:text-gray-400 mt-0.5",children:D.description})]})]},D.value)})})]})]})]})},zs={container:{base:"tag-select",disabled:"opacity-50 cursor-not-allowed"},tag:"tag",tagRemove:"tag-remove",placeholder:"tag-select-placeholder"},Wk=({options:t=[],value:e=[],onChange:n,placeholder:r="No items selected",disabled:s=!1,className:o="",id:i,editorAttrs:a})=>{const l=v.useCallback(f=>t.find(m=>String(m.value)===String(f))?.label||String(f),[t]),c=v.useCallback(f=>{if(s)return;const g=e.filter(m=>String(m)!==String(f));n?.(g)},[e,n,s]),d=v.useMemo(()=>e.map(f=>({value:f,label:l(f)})),[e,l]),u=`${zs.container.base} ${s?zs.container.disabled:""} ${o}`.trim();return h.jsx(I,{className:u,id:i,...a,children:d.length===0?h.jsx(Q,{className:zs.placeholder,children:r}):d.map(f=>h.jsxs(Q,{className:zs.tag,children:[f.label,!s&&h.jsx(Q,{className:zs.tagRemove,onClick:()=>c(f.value),role:"button","aria-label":`Remove ${f.label}`,children:h.jsx(Hn,{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},f.value))})};function Gk(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v.useMemo(()=>r=>{e.forEach(s=>s(r))},e)}const mi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Yr(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function Hl(t){return"nodeType"in t}function Yt(t){var e,n;return t?Yr(t)?t:Hl(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function Ul(t){const{Document:e}=Yt(t);return t instanceof e}function Vs(t){return Yr(t)?!1:t instanceof Yt(t).HTMLElement}function nh(t){return t instanceof Yt(t).SVGElement}function Xr(t){return t?Yr(t)?t.document:Hl(t)?Ul(t)?t:Vs(t)||nh(t)?t.ownerDocument:document:document:document}const wn=mi?v.useLayoutEffect:v.useEffect;function bi(t){const e=v.useRef(t);return wn(()=>{e.current=t}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.current==null?void 0:e.current(...r)},[])}function Yk(){const t=v.useRef(null),e=v.useCallback((r,s)=>{t.current=setInterval(r,s)},[]),n=v.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function Hs(t,e){e===void 0&&(e=[t]);const n=v.useRef(t);return wn(()=>{n.current!==t&&(n.current=t)},e),n}function Us(t,e){const n=v.useRef();return v.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function yi(t){const e=bi(t),n=v.useRef(null),r=v.useCallback(s=>{s!==n.current&&e?.(s,n.current),n.current=s},[]);return[n,r]}function vi(t){const e=v.useRef();return v.useEffect(()=>{e.current=t},[t]),e.current}let Bl={};function Bs(t,e){return v.useMemo(()=>{if(e)return e;const n=Bl[t]==null?0:Bl[t]+1;return Bl[t]=n,t+"-"+n},[t,e])}function rh(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return r.reduce((o,i)=>{const a=Object.entries(i);for(const[l,c]of a){const d=o[l];d!=null&&(o[l]=d+t*c)}return o},{...e})}}const Kr=rh(1),js=rh(-1);function Xk(t){return"clientX"in t&&"clientY"in t}function xi(t){if(!t)return!1;const{KeyboardEvent:e}=Yt(t.target);return e&&t instanceof e}function Kk(t){if(!t)return!1;const{TouchEvent:e}=Yt(t.target);return e&&t instanceof e}function wi(t){if(Kk(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return Xk(t)?{x:t.clientX,y:t.clientY}:null}const Ln=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[Ln.Translate.toString(t),Ln.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),sh="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function qk(t){return t.matches(sh)?t:t.querySelector(sh)}const Zk={display:"none"};function Qk(t){let{id:e,value:n}=t;return v.createElement("div",{id:e,s Line truncated
To pick up a draggable item, press the space bar.
While dragging, use the arrow keys to move the item.
Press space again to drop the item in its new position, or press escape to cancel.
`},Rk={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function eC(t){let{announcements:e=Rk,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=Jk}=t;const{announce:o,announcement:i}=qk(),a=Bs("DndLiveRegion"),[l,c]=v.useState(!1);if(v.useEffect(()=>{c(!0)},[]),Zk(v.useMemo(()=>({onDragStart(u){let{active:f}=u;o(e.onDragStart({active:f}))},onDragMove(u){let{active:f,over:g}=u;e.onDragMove&&o(e.onDragMove({active:f,over:g}))},onDragOver(u){let{active:f,over:g}=u;o(e.onDragOver({active:f,over:g}))},onDragEnd(u){let{active:f,over:g}=u;o(e.onDragEnd({active:f,over:g}))},onDragCancel(u){let{active:f,over:g}=u;o(e.onDragCancel({active:f,over:g}))}}),[o,e])),!l)return null;const d=v.createElement(v.Fragment,null,v.createElement(Xk,{id:r,value:s.draggable}),v.createElement(Kk,{id:a,announcement:i}));return n?Nn.createPortal(d,n):d}var St;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(St||(St={}));function wi(){}function qr(t,e){return v.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function Hl(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const kn=Object.freeze({x:0,y:0});function sh(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function tC(t,e){const n=xi(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function oh(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function nC(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function ih(t){let{left:e,top:n,height:r,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+r},{x:e+s,y:n+r}]}function ah(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function lh(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const Ul=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=lh(e,e.left,e.top),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=sh(lh(l),s);o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(oh)},rC=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=ih(e),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=ih(l),d=s.reduce((f,g,m)=>f+sh(c[m],g),0),u=Number((d/4).toFixed(4));o.push({id:a,data:{droppableContainer:i,value:u}})}}return o.sort(oh)};function sC(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height),i=s-r,a=o-n;if(r<s&&n<o){const l=e.width*e.height,c=t.width*t.height,d=i*a,u=d/(l+c-d);return Number(u.toFixed(4))}return 0}const oC=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const o of r){const{id:i}=o,a=n.get(i);if(a){const l=sC(a,e);l>0&&s.push({id:i,data:{droppableContainer:o,value:l}})}}return s.sort(nC)};function iC(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function ch(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:kn}function aC(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return s.reduce((i,a)=>({...i,top:i.top+t*a.y,bottom:i.bottom+t*a.y,left:i.left+t*a.x,right:i.right+t*a.x}),{...n})}}const lC=aC(1);function dh(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function cC(t,e,n){const r=dh(e);if(!r)return t;const{scaleX:s,scaleY:o,x:i,y:a}=r,l=t.left-i-(1-s)*parseFloat(n),c=t.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=s?t.width/s:t.width,u=o?t.height/o:t.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}const dC={ignoreTransform:!1};function Zr(t,e){e===void 0&&(e=dC);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:d}=Wt(t).getComputedStyle(t);c&&(n=cC(n,c,d))}const{top:r,left:s,width:o,height:i,bottom:a,right:l}=n;return{top:r,left:s,width:o,height:i,bottom:a,right:l}}function uh(t){return Zr(t,{ignoreTransform:!0})}function uC(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function fC(t,e){return e===void 0&&(e=Wt(t).getComputedStyle(t)),e.posit Line truncated
`},rC={onDragStart(t){let{active:e}=t;return"Picked up draggable item "+e.id+"."},onDragOver(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was moved over droppable area "+n.id+".":"Draggable item "+e.id+" is no longer over a droppable area."},onDragEnd(t){let{active:e,over:n}=t;return n?"Draggable item "+e.id+" was dropped over droppable area "+n.id:"Draggable item "+e.id+" was dropped."},onDragCancel(t){let{active:e}=t;return"Dragging was cancelled. Draggable item "+e.id+" was dropped."}};function sC(t){let{announcements:e=rC,container:n,hiddenTextDescribedById:r,screenReaderInstructions:s=nC}=t;const{announce:o,announcement:i}=Rk(),a=Bs("DndLiveRegion"),[l,c]=v.useState(!1);if(v.useEffect(()=>{c(!0)},[]),eC(v.useMemo(()=>({onDragStart(u){let{active:f}=u;o(e.onDragStart({active:f}))},onDragMove(u){let{active:f,over:g}=u;e.onDragMove&&o(e.onDragMove({active:f,over:g}))},onDragOver(u){let{active:f,over:g}=u;o(e.onDragOver({active:f,over:g}))},onDragEnd(u){let{active:f,over:g}=u;o(e.onDragEnd({active:f,over:g}))},onDragCancel(u){let{active:f,over:g}=u;o(e.onDragCancel({active:f,over:g}))}}),[o,e])),!l)return null;const d=v.createElement(v.Fragment,null,v.createElement(Qk,{id:r,value:s.draggable}),v.createElement(Jk,{id:a,announcement:i}));return n?On.createPortal(d,n):d}var St;(function(t){t.DragStart="dragStart",t.DragMove="dragMove",t.DragEnd="dragEnd",t.DragCancel="dragCancel",t.DragOver="dragOver",t.RegisterDroppable="registerDroppable",t.SetDroppableDisabled="setDroppableDisabled",t.UnregisterDroppable="unregisterDroppable"})(St||(St={}));function ki(){}function qr(t,e){return v.useMemo(()=>({sensor:t,options:e??{}}),[t,e])}function jl(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return v.useMemo(()=>[...e].filter(r=>r!=null),[...e])}const kn=Object.freeze({x:0,y:0});function ih(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function oC(t,e){const n=wi(t);if(!n)return"0 0";const r={x:(n.x-e.left)/e.width*100,y:(n.y-e.top)/e.height*100};return r.x+"% "+r.y+"%"}function ah(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return n-r}function iC(t,e){let{data:{value:n}}=t,{data:{value:r}}=e;return r-n}function lh(t){let{left:e,top:n,height:r,width:s}=t;return[{x:e,y:n},{x:e+s,y:n},{x:e,y:n+r},{x:e+s,y:n+r}]}function ch(t,e){if(!t||t.length===0)return null;const[n]=t;return n[e]}function dh(t,e,n){return e===void 0&&(e=t.left),n===void 0&&(n=t.top),{x:e+t.width*.5,y:n+t.height*.5}}const Wl=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=dh(e,e.left,e.top),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=ih(dh(l),s);o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(ah)},aC=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=lh(e),o=[];for(const i of r){const{id:a}=i,l=n.get(a);if(l){const c=lh(l),d=s.reduce((f,g,m)=>f+ih(c[m],g),0),u=Number((d/4).toFixed(4));o.push({id:a,data:{droppableContainer:i,value:u}})}}return o.sort(ah)};function lC(t,e){const n=Math.max(e.top,t.top),r=Math.max(e.left,t.left),s=Math.min(e.left+e.width,t.left+t.width),o=Math.min(e.top+e.height,t.top+t.height),i=s-r,a=o-n;if(r<s&&n<o){const l=e.width*e.height,c=t.width*t.height,d=i*a,u=d/(l+c-d);return Number(u.toFixed(4))}return 0}const cC=t=>{let{collisionRect:e,droppableRects:n,droppableContainers:r}=t;const s=[];for(const o of r){const{id:i}=o,a=n.get(i);if(a){const l=lC(a,e);l>0&&s.push({id:i,data:{droppableContainer:o,value:l}})}}return s.sort(iC)};function dC(t,e,n){return{...t,scaleX:e&&n?e.width/n.width:1,scaleY:e&&n?e.height/n.height:1}}function uh(t,e){return t&&e?{x:t.left-e.left,y:t.top-e.top}:kn}function uC(t){return function(n){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];return s.reduce((i,a)=>({...i,top:i.top+t*a.y,bottom:i.bottom+t*a.y,left:i.left+t*a.x,right:i.right+t*a.x}),{...n})}}const fC=uC(1);function fh(t){if(t.startsWith("matrix3d(")){const e=t.slice(9,-1).split(/, /);return{x:+e[12],y:+e[13],scaleX:+e[0],scaleY:+e[5]}}else if(t.startsWith("matrix(")){const e=t.slice(7,-1).split(/, /);return{x:+e[4],y:+e[5],scaleX:+e[0],scaleY:+e[3]}}return null}function hC(t,e,n){const r=fh(e);if(!r)return t;const{scaleX:s,scaleY:o,x:i,y:a}=r,l=t.left-i-(1-s)*parseFloat(n),c=t.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),d=s?t.width/s:t.width,u=o?t.height/o:t.height;return{width:d,height:u,top:c,right:l+d,bottom:c+u,left:l}}const gC={ignoreTransform:!1};function Zr(t,e){e===void 0&&(e=gC);let n=t.getBoundingClientRect();if(e.ignoreTransform){const{transform:c,transformOrigin:d}=Yt(t).getComputedStyle(t);c&&(n=hC(n,c,d))}const{top:r,left:s,width:o,height:i,bottom:a,right:l}=n;return{top:r,left:s,width:o,height:i,bottom:a,right:l}}function hh(t){return Zr(t,{ignoreTransform:!0})}function pC(t){const e=t.innerWidth,n=t.innerHeight;return{top:0,left:0,right:e,bottom:n,width:e,height:n}}function mC(t,e){return e===void 0&&(e=Yt(t).getComputedStyle(t)),e.posit Line truncated
w-full flex items-center justify-between px-3 py-2
bg-white dark:bg-gray-800
border border-gray-300 dark:border-gray-600 rounded-lg
@@ -208,7 +201,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
`,children:[h.jsx(I,{className:"flex items-center gap-2",children:y?h.jsxs(h.Fragment,{children:[h.jsx(re,{name:y.faIcon,className:"w-4 h-4 text-gray-600 dark:text-gray-400"}),h.jsx(Q,{className:"text-gray-900 dark:text-white",children:y.label})]}):h.jsx(Q,{className:"text-gray-500 dark:text-gray-400",children:r})}),h.jsx(re,{name:"chevron-down",className:`w-4 h-4 text-gray-400 dark:text-gray-500 transition-transform ${u?"rotate-180":""}`})]}),l&&h.jsx("input",{type:"hidden",name:l,value:t||""}),u&&h.jsxs(I,{className:"absolute z-50 w-full mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg max-h-72 overflow-hidden",children:[h.jsx(I,{className:"p-2 border-b border-gray-200 dark:border-gray-700",children:h.jsx(wt,{type:"text",value:g,onChange:x=>m(x.target.value),placeholder:s,className:"w-full px-3 py-1.5 text-sm border border-gray-300 dark:border-gray-600 rounded bg-gray-50 dark:bg-gray-700 text-gray-900 dark:text-white",autoFocus:!0})}),h.jsx(I,{className:"max-h-56 overflow-y-auto",children:b.length>0?b.map(x=>h.jsxs(oe,{type:"button",onClick:()=>S(x),className:`
w-full flex items-center gap-3 px-3 py-2 text-left text-sm
${y?.faIcon===x.faIcon?"bg-blue-50 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700"}
`,children:[h.jsx(re,{name:x.faIcon,className:"w-4 h-4"}),h.jsx(Q,{children:x.label}),y?.faIcon===x.faIcon&&h.jsx(re,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},x.value)):h.jsx(I,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},ec=({defaultOpen:t=!1,isOpen:e,onToggle:n,className:r="",style:s,children:o,disabled:i=!1,id:a,editorAttrs:l})=>{const[c,d]=v.useState(t),u=e!==void 0,f=u?e:c,g=v.useRef(null),[m,p]=v.useState(t?void 0:0),y=()=>{if(i)return;const S=!f;u||d(S),n?.(S)};v.useEffect(()=>{if(g.current)if(f){p(g.current.scrollHeight);const S=setTimeout(()=>{p(void 0)},300);return()=>clearTimeout(S)}else p(g.current.scrollHeight),requestAnimationFrame(()=>{p(0)})},[f]);const b={};if(v.Children.forEach(o,S=>{if(v.isValidElement(S)){const x=S.props?.slot;x==="trigger"?b.trigger=S:x==="content"&&(b.content=S)}}),!b.trigger&&!b.content){const S=v.Children.toArray(o);S.length>=2?(b.trigger=S[0],b.content=S.slice(1)):S.length===1&&(b.content=S[0])}return h.jsxs(I,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${r}`,style:s,id:a,...l,children:[h.jsxs(oe,{type:"button",onClick:y,disabled:i,className:`w-full flex items-center justify-between p-3 text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors ${i?"opacity-50 cursor-not-allowed":""} ${f?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":f,children:[h.jsx(I,{className:"flex-1",children:b.trigger}),!b.trigger&&h.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h.jsx(I,{ref:g,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:m!==void 0?`${m}px`:"auto"},children:h.jsx(I,{className:"bg-white dark:bg-gray-800",children:b.content})})]})},Js=window.G7Core,qh=Js?.useControllableState,Zh=(t,e)=>window.G7Core?.t?.(t,e)??t,AS={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},DS=({options:t,value:e,onChange:n,disabled:r=!1})=>{const[s,o]=v.useState(!1),[i,a]=v.useState({}),l=v.useRef(null),c=t.find(u=>u.value===e)??t[0];v.useEffect(()=>{if(!s)return;const u=g=>{l.current&&!l.current.contains(g.target)&&o(!1)},f=()=>{if(!l.current)return;const g=l.current.getBoundingClientRect();a({position:"fixed",top:g.bottom+4,right:window.innerWidth-g.right,zIndex:9999})};return document.addEventListener("mousedown",u),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",u),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[s]);const d=v.useCallback(()=>{if(r||!l.current)return;const u=l.current.getBoundingClientRect();a({position:"fixed",top:u.bottom+4,right:window.innerWidth-u.right,zIndex:9999}),o(f=>!f)},[r]);return h.jsxs(I,{ref:l,className:"relative flex-shrink-0",children:[h.jsxs(I,{role:"button",tabIndex:0,onClick:u=>{u.stopPropagation(),u.preventDefault(),d()},onMouseDown:u=>u.stopPropagation(),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.stopPropagation(),u.preventDefault(),d()),u.key==="Escape"&&o(!1)},className:`flex items-center gap-1 text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-pointer select-none ${r?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[h.jsx(Q,{children:c?.label??""}),h.jsx(re,{name:de.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),s&&h.jsx(I,{style:i,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:t.map(u=>{const f=u.value??"",g=AS[f],m=g?Zh(g):"",p=u.value===e;return h.jsxs(I,{role:"option","aria-selected":p,onClick:y=>{y.stopPropagation(),y.preventDefault(),n(u.value),o(!1)},onMouseDown:y=>y.stopPropagation(),className:`px-3 py-2 cursor-pointer transition-colors ${p?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[h.jsx(Q,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:u.label}),p&&h.jsx(re,{name:de.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),m&&h.jsx(Q,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:m})]},f||"__null__")})})]})},IS=(t,e)=>{if(t.length!==e.length)return!1;const n=[...t].sort((s,o)=>s.id-o.id),r=[...e].sort((s,o)=>s.id-o.id);return n.every((s,o)=>s.id===r[o].id&&s.scope_type===r[o].scope_type)},LS=({data:t=[],value:e=[],onChange:n,scopeOptions:r=[],className:s="",disabled:o=!1,desktopColumns:i=2,inst Line truncated
`,children:[h.jsx(re,{name:x.faIcon,className:"w-4 h-4"}),h.jsx(Q,{children:x.label}),y?.faIcon===x.faIcon&&h.jsx(re,{name:"check",className:"w-4 h-4 ml-auto text-blue-600"})]},x.value)):h.jsx(I,{className:"px-3 py-4 text-sm text-gray-500 dark:text-gray-400 text-center",children:o})})]})]})},rc=({defaultOpen:t=!1,isOpen:e,onToggle:n,className:r="",style:s,children:o,disabled:i=!1,id:a,editorAttrs:l})=>{const[c,d]=v.useState(t),u=e!==void 0,f=u?e:c,g=v.useRef(null),[m,p]=v.useState(t?void 0:0),y=()=>{if(i)return;const S=!f;u||d(S),n?.(S)};v.useEffect(()=>{if(g.current)if(f){p(g.current.scrollHeight);const S=setTimeout(()=>{p(void 0)},300);return()=>clearTimeout(S)}else p(g.current.scrollHeight),requestAnimationFrame(()=>{p(0)})},[f]);const b={};if(v.Children.forEach(o,S=>{if(v.isValidElement(S)){const x=S.props?.slot;x==="trigger"?b.trigger=S:x==="content"&&(b.content=S)}}),!b.trigger&&!b.content){const S=v.Children.toArray(o);S.length>=2?(b.trigger=S[0],b.content=S.slice(1)):S.length===1&&(b.content=S[0])}return h.jsxs(I,{className:`border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden ${r}`,style:s,id:a,...l,children:[h.jsxs(oe,{type:"button",onClick:y,disabled:i,className:`w-full flex items-center justify-between p-3 text-left bg-gray-50 dark:bg-gray-800 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors ${i?"opacity-50 cursor-not-allowed":""} ${f?"border-b border-gray-200 dark:border-gray-700":""}`,"aria-expanded":f,children:[h.jsx(I,{className:"flex-1",children:b.trigger}),!b.trigger&&h.jsx("svg",{className:`w-5 h-5 text-gray-500 dark:text-gray-400 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),h.jsx(I,{ref:g,className:"overflow-hidden transition-all duration-300 ease-in-out",style:{height:m!==void 0?`${m}px`:"auto"},children:h.jsx(I,{className:"bg-white dark:bg-gray-800",children:b.content})})]})},Js=window.G7Core,Qh=Js?.useControllableState,Jh=(t,e)=>window.G7Core?.t?.(t,e)??t,PS={"":"common.scope_type_all_desc",self:"common.scope_type_self_desc",role:"common.scope_type_role_desc"},$S=({options:t,value:e,onChange:n,disabled:r=!1})=>{const[s,o]=v.useState(!1),[i,a]=v.useState({}),l=v.useRef(null),c=t.find(u=>u.value===e)??t[0];v.useEffect(()=>{if(!s)return;const u=g=>{l.current&&!l.current.contains(g.target)&&o(!1)},f=()=>{if(!l.current)return;const g=l.current.getBoundingClientRect();a({position:"fixed",top:g.bottom+4,right:window.innerWidth-g.right,zIndex:9999})};return document.addEventListener("mousedown",u),window.addEventListener("scroll",f,!0),window.addEventListener("resize",f),()=>{document.removeEventListener("mousedown",u),window.removeEventListener("scroll",f,!0),window.removeEventListener("resize",f)}},[s]);const d=v.useCallback(()=>{if(r||!l.current)return;const u=l.current.getBoundingClientRect();a({position:"fixed",top:u.bottom+4,right:window.innerWidth-u.right,zIndex:9999}),o(f=>!f)},[r]);return h.jsxs(I,{ref:l,className:"relative flex-shrink-0",children:[h.jsxs(I,{role:"button",tabIndex:0,onClick:u=>{u.stopPropagation(),u.preventDefault(),d()},onMouseDown:u=>u.stopPropagation(),onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&(u.stopPropagation(),u.preventDefault(),d()),u.key==="Escape"&&o(!1)},className:`flex items-center gap-1 text-xs px-2 py-1 rounded border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-gray-700 dark:text-gray-300 cursor-pointer select-none ${r?"opacity-50 cursor-not-allowed":"hover:border-blue-400 dark:hover:border-blue-500"}`,children:[h.jsx(Q,{children:c?.label??""}),h.jsx(re,{name:de.ChevronDown,className:"w-3 h-3 text-gray-400 dark:text-gray-500"})]}),s&&h.jsx(I,{style:i,className:"w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1",children:t.map(u=>{const f=u.value??"",g=PS[f],m=g?Jh(g):"",p=u.value===e;return h.jsxs(I,{role:"option","aria-selected":p,onClick:y=>{y.stopPropagation(),y.preventDefault(),n(u.value),o(!1)},onMouseDown:y=>y.stopPropagation(),className:`px-3 py-2 cursor-pointer transition-colors ${p?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[h.jsx(Q,{className:`text-xs font-medium ${p?"text-blue-700 dark:text-blue-300":"text-gray-900 dark:text-white"}`,children:u.label}),p&&h.jsx(re,{name:de.Check,className:"w-3.5 h-3.5 text-blue-600 dark:text-blue-400"})]}),m&&h.jsx(Q,{className:"block text-xs text-gray-500 dark:text-gray-400 mt-0.5",children:m})]},f||"__null__")})})]})},FS=(t,e)=>{if(t.length!==e.length)return!1;const n=[...t].sort((s,o)=>s.id-o.id),r=[...e].sort((s,o)=>s.id-o.id);return n.every((s,o)=>s.id===r[o].id&&s.scope_type===r[o].scope_type)},zS=({data:t=[],value:e=[],onChange:n,scopeOptions:r=[],className:s="",disabled:o=!1,desktopColumns:i=2,inst Line truncated
let scriptImported = false
self.addEventListener('message', async (e) => {
const { file, id, imageCompressionLibUrl, options } = e.data
@@ -227,11 +220,11 @@ self.addEventListener('message', async (e) => {
self.postMessage({ error: e.message + '\\n' + e.stack, id })
}
})
`;let Tc;function Q2(t,e){return new Promise(((n,r)=>{Tc||(Tc=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(Z2));const s=new Worker(Tc);s.addEventListener("message",(function(i){if(e.signal&&e.signal.aborted)s.terminate();else if(i.data.progress===void 0){if(i.data.error)return r(new Error(i.data.error)),void s.terminate();n(i.data.file),s.terminate()}else e.onProgress(i.data.progress)})),s.addEventListener("error",r),e.signal&&e.signal.addEventListener("abort",(()=>{r(e.signal.reason),s.terminate()})),s.postMessage({file:t,imageCompressionLibUrl:e.libURL,options:{...e,onProgress:void 0,signal:void 0}})}))}function zt(t,e){return new Promise((function(n,r){let s,o,i,a,l,c;if(s={...e},i=0,{onProgress:a}=s,s.maxSizeMB=s.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof s.useWebWorker!="boolean"||s.useWebWorker,delete s.useWebWorker,s.onProgress=g=>{i=g,typeof a=="function"&&a(i)},!(t instanceof Blob||t instanceof q2))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(t.type))return r(new Error("The file given is not an image"));if(c=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||c)return vp(t,s).then(function(g){try{return o=g,f.call(this)}catch(m){return r(m)}}.bind(this),r);var d=function(){try{return f.call(this)}catch(g){return r(g)}}.bind(this),u=function(g){try{return vp(t,s).then((function(m){try{return o=m,d()}catch(p){return r(p)}}),r)}catch(m){return r(m)}};try{return s.libURL=s.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Q2(t,s).then((function(g){try{return o=g,d()}catch{return u()}}),u)}catch{u()}function f(){try{o.name=t.name,o.lastModified=t.lastModified}catch{}try{s.preserveExif&&t.type==="image/jpeg"&&(!s.fileType||s.fileType&&s.fileType===t.type)&&(o=lp(t,o))}catch{}return n(o)}}))}zt.getDataUrlFromFile=fp,zt.getFilefromDataUrl=Oc,zt.loadImage=hp,zt.drawImageInCanvas=pp,zt.drawFileInCanvas=Yi,zt.canvasToFile=Xi,zt.getExifOrientation=mp,zt.handleMaxWidthOrHeight=bp,zt.followExifOrientation=yp,zt.cleanupCanvasMemory=Ln,zt.isAutoOrientationInBrowser=is,zt.approximateBelowMaximumCanvasSizeOfBrowser=gp,zt.copyExifWithoutOrientation=lp,zt.getBrowserName=wr,zt.version="2.0.2";const J2=window.G7Core,Ac=t=>{const e=["B","KB","MB","GB"];let n=0,r=t;for(;r>=1024&&n<e.length-1;)r/=1024,n++;return`${r.toFixed(2)} ${e[n]}`},R2=t=>{if(t&&typeof t=="object"){const e=t;if(e.response?.data?.message)return e.response.data.message;if(e.response?.data?.errors){const n=Object.values(e.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(e.message)return e.message}return t instanceof Error?t.message:"업로드 실패"},eE=t=>t?t.startsWith("image/")?"fa-file-image":t.startsWith("video/")?"fa-file-video":t.startsWith("audio/")?"fa-file-audio":t==="application/pdf"?"fa-file-pdf":t.includes("word")||t.includes("document")?"fa-file-word":t.includes("excel")||t.includes("spreadsheet")?"fa-file-excel":t.includes("zip")||t.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",At=(t,e)=>J2?.t?.(t,e)??t,xp=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...t)=>console.log("[Comp:FileUploader]",...t),warn:(...t)=>console.warn("[Comp:FileUploader]",...t),error:(...t)=>console.error("[Comp:FileUploader]",...t)},kr=window.G7Core;function tE(t){const{attachmentableType:e,attachmentableId:n,collection:r,maxFiles:s,maxSize:o,maxConcurrentUploads:i,accept:a,imageCompression:l,roleIds:c,autoUpload:d,initialFiles:u,endpoints:f,onFilesChange:g,onUploadComplete:m,onUploadError:p,onRemove:y,onReorder:b,uploadTriggerEvent:S,confirmBeforeRemove:x,uploadParams:E}=t,[k,C]=v.useState(u),[N,_]=v.useState([]),[w,M]=v.useState(!1),O=v.useRef(null),L=v.useRef(0),$=v.useRef(new Set),F=v.useRef(new Map),D=v.useRef(null),[A,T]=v.useState(!1),[V,H]=v.useState(null),[W,j]=v.useState(!1),U=v.useRef(!1),[B,G]=v.useState([]),[z,K]=v.useState(!1),[X,Z]=v.useState(0),ee=v.useRef(0),[ne,he]=v.useState(new Map),J=v.useRef(new Map),ce=v.useRef(g);ce.current=g,v.useEffect(()=>{ce.current?.(N)},[N]),v.useEffect(()=>{if(U.current)return;const te=u.filter(me=>!$.current.has(me.id)&&(!me.hash||!$.current.has(me.hash))),ge=new Set(te.map(me=>me.id)),pe=Array.from(F.current.values()).filter(me=>!ge.has(me.id)&&!$.current.has(me.id));C([...te,...pe])},[u]);const ue=v.useCallback(async te=>{const ge={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0};return await zt(te,ge)},[l]),ie=v.useCallback(async te=>{const ge=k.length+N.length,pe=Math.max(0,s-ge),me=Array.from(te).slice(0,pe);if(te.length>pe){const be=Array.from(te).slice(pe),Ue=At("attachment.upload_limit_exceeded",{max:s});p?.(Ue,be[0]??te[0])}for(const be of me){if(be.size>o*1024*1024){p?.(`[${be.name}] 파일 크기(${Ac(be.size)})가 최대 허용 크기(${o}MB)를 초과합니다.`,be);continue}if(a){const Me="."+be.name.split(".").pop()?.toLowerCase();if(!a.split(",").m Line truncated
`;let Ic;function rE(t,e){return new Promise(((n,r)=>{Ic||(Ic=(function(i){const a=[];return a.push(i),URL.createObjectURL(new Blob(a))})(nE));const s=new Worker(Ic);s.addEventListener("message",(function(i){if(e.signal&&e.signal.aborted)s.terminate();else if(i.data.progress===void 0){if(i.data.error)return r(new Error(i.data.error)),void s.terminate();n(i.data.file),s.terminate()}else e.onProgress(i.data.progress)})),s.addEventListener("error",r),e.signal&&e.signal.addEventListener("abort",(()=>{r(e.signal.reason),s.terminate()})),s.postMessage({file:t,imageCompressionLibUrl:e.libURL,options:{...e,onProgress:void 0,signal:void 0}})}))}function Vt(t,e){return new Promise((function(n,r){let s,o,i,a,l,c;if(s={...e},i=0,{onProgress:a}=s,s.maxSizeMB=s.maxSizeMB||Number.POSITIVE_INFINITY,l=typeof s.useWebWorker!="boolean"||s.useWebWorker,delete s.useWebWorker,s.onProgress=g=>{i=g,typeof a=="function"&&a(i)},!(t instanceof Blob||t instanceof tE))return r(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(t.type))return r(new Error("The file given is not an image"));if(c=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!l||typeof Worker!="function"||c)return Cp(t,s).then(function(g){try{return o=g,f.call(this)}catch(m){return r(m)}}.bind(this),r);var d=function(){try{return f.call(this)}catch(g){return r(g)}}.bind(this),u=function(g){try{return Cp(t,s).then((function(m){try{return o=m,d()}catch(p){return r(p)}}),r)}catch(m){return r(m)}};try{return s.libURL=s.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",rE(t,s).then((function(g){try{return o=g,d()}catch{return u()}}),u)}catch{u()}function f(){try{o.name=t.name,o.lastModified=t.lastModified}catch{}try{s.preserveExif&&t.type==="image/jpeg"&&(!s.fileType||s.fileType&&s.fileType===t.type)&&(o=fp(t,o))}catch{}return n(o)}}))}Vt.getDataUrlFromFile=mp,Vt.getFilefromDataUrl=Dc,Vt.loadImage=bp,Vt.drawImageInCanvas=vp,Vt.drawFileInCanvas=Xi,Vt.canvasToFile=Ki,Vt.getExifOrientation=xp,Vt.handleMaxWidthOrHeight=wp,Vt.followExifOrientation=kp,Vt.cleanupCanvasMemory=Pn,Vt.isAutoOrientationInBrowser=is,Vt.approximateBelowMaximumCanvasSizeOfBrowser=yp,Vt.copyExifWithoutOrientation=fp,Vt.getBrowserName=wr,Vt.version="2.0.2";const sE=window.G7Core,Lc=t=>{const e=["B","KB","MB","GB"];let n=0,r=t;for(;r>=1024&&n<e.length-1;)r/=1024,n++;return`${r.toFixed(2)} ${e[n]}`},oE=t=>{if(t&&typeof t=="object"){const e=t;if(e.response?.data?.message)return e.response.data.message;if(e.response?.data?.errors){const n=Object.values(e.response.data.errors)[0];if(Array.isArray(n)&&n[0])return n[0]}if(e.message)return e.message}return t instanceof Error?t.message:"업로드 실패"},iE=t=>t?t.startsWith("image/")?"fa-file-image":t.startsWith("video/")?"fa-file-video":t.startsWith("audio/")?"fa-file-audio":t==="application/pdf"?"fa-file-pdf":t.includes("word")||t.includes("document")?"fa-file-word":t.includes("excel")||t.includes("spreadsheet")?"fa-file-excel":t.includes("zip")||t.includes("compressed")?"fa-file-zipper":"fa-file":"fa-file",At=(t,e)=>sE?.t?.(t,e)??t,Sp=window.G7Core?.createLogger?.("Comp:FileUploader")??{log:(...t)=>console.log("[Comp:FileUploader]",...t),warn:(...t)=>console.warn("[Comp:FileUploader]",...t),error:(...t)=>console.error("[Comp:FileUploader]",...t)},kr=window.G7Core;function aE(t){const{attachmentableType:e,attachmentableId:n,collection:r,maxFiles:s,maxSize:o,maxConcurrentUploads:i,accept:a,imageCompression:l,roleIds:c,autoUpload:d,initialFiles:u,endpoints:f,onFilesChange:g,onUploadComplete:m,onUploadError:p,onRemove:y,onReorder:b,uploadTriggerEvent:S,confirmBeforeRemove:x,uploadParams:E}=t,[k,C]=v.useState(u),[N,_]=v.useState([]),[w,M]=v.useState(!1),O=v.useRef(null),L=v.useRef(0),F=v.useRef(new Set),$=v.useRef(new Map),D=v.useRef(null),[A,T]=v.useState(!1),[z,H]=v.useState(null),[W,j]=v.useState(!1),U=v.useRef(!1),[B,G]=v.useState([]),[V,K]=v.useState(!1),[X,Z]=v.useState(0),ee=v.useRef(0),[ne,he]=v.useState(new Map),J=v.useRef(new Map),ce=v.useRef(g);ce.current=g,v.useEffect(()=>{ce.current?.(N)},[N]),v.useEffect(()=>{if(U.current)return;const te=u.filter(me=>!F.current.has(me.id)&&(!me.hash||!F.current.has(me.hash))),ge=new Set(te.map(me=>me.id)),pe=Array.from($.current.values()).filter(me=>!ge.has(me.id)&&!F.current.has(me.id));C([...te,...pe])},[u]);const ue=v.useCallback(async te=>{const ge={maxSizeMB:l?.maxSizeMB??1,maxWidthOrHeight:l?.maxWidthOrHeight??1920,useWebWorker:!0};return await Vt(te,ge)},[l]),ae=v.useCallback(async te=>{const ge=k.length+N.length,pe=Math.max(0,s-ge),me=Array.from(te).slice(0,pe);if(te.length>pe){const be=Array.from(te).slice(pe),Be=At("attachment.upload_limit_exceeded",{max:s});p?.(Be,be[0]??te[0])}for(const be of me){if(be.size>o*1024*1024){p?.(`[${be.name}] 파일 크기(${Lc(be.size)})가 최대 허용 크기(${o}MB)를 초과합니다.`,be);continue}if(a){const Se="."+be.name.split(".").pop()?.toLowerCase();if(!a.split(",").m Line truncated
relative border-2 border-dashed rounded-lg transition-colors
${l?"opacity-60 cursor-not-allowed":""}
${t&&!l?"border-blue-500 bg-blue-50 dark:bg-blue-900/20":"border-gray-300 dark:border-gray-600"}
`,onDragOver:u=>{u.preventDefault(),d&&r(!0)},onDragLeave:()=>r(!1),onDrop:u=>{u.preventDefault(),r(!1),d&&n(u.dataTransfer.files)},children:[h.jsx("input",{ref:s,type:"file",multiple:!0,accept:o,onChange:u=>u.target.files&&!l&&n(u.target.files),className:"hidden",disabled:l}),!c&&h.jsxs(I,{className:`p-8 text-center transition-colors ${l?"cursor-not-allowed":"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,onClick:()=>!l&&s.current?.click(),children:[h.jsx(pt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),h.jsx(bt,{className:"text-sm text-gray-600 dark:text-gray-400",children:At("attachment.drop_or_click")}),h.jsxs(bt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[At("attachment.upload_limit",{maxFiles:i,maxSize:a}),o&&` (${o})`]})]}),c]})},rE=window.G7Core,sE=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...t)=>console.log("[Comp:SortableThumbnail]",...t),warn:(...t)=>console.warn("[Comp:SortableThumbnail]",...t),error:(...t)=>console.error("[Comp:SortableThumbnail]",...t)},oE=({file:t,onRemove:e,onRetry:n,onImageClick:r,onDownload:s,isPrimary:o,onPrimaryClick:i,disabled:a})=>{const{attributes:l,listeners:c,setNodeRef:d,transform:u,transition:f,isDragging:g}=Ai({id:"hash"in t?t.hash:t.id}),m={transform:In.Transform.toString(u),transition:f,opacity:g?.5:1},p="status"in t&&t.status!==void 0,y=p?t.status:"done",b=y==="uploading",S=y==="compressing",x=y==="error",E=p?t.progress:100,k=p?t.preview:void 0,C=p?t.mime_type?.startsWith("image/")??!1:t.is_image,[N,_]=v.useState(void 0),w=!p&&C?t.download_url:void 0;v.useEffect(()=>{if(!w){_(void 0);return}let O=!0,L;return(async()=>{try{const F=await rE.api.get(w,{responseType:"blob"});O&&F&&(L=URL.createObjectURL(F),_(L))}catch(F){sE.error("Failed to load authenticated image:",F)}})(),()=>{O=!1,L&&URL.revokeObjectURL(L)}},[w]);const M=N;return h.jsxs(I,{ref:d,style:m,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[h.jsxs(I,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${C||!p?"cursor-pointer":""}`,onClick:()=>{b||S||(C&&r?r():!p&&s&&s())},children:[k||M?h.jsx(yn,{src:k||M,alt:t.original_filename,className:"w-full h-full object-cover"}):h.jsx(pt,{className:`fa-solid ${eE(t.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(b||S)&&h.jsxs(I,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[h.jsx(I,{className:"w-3/4 h-2 bg-gray-700 rounded-full overflow-hidden",children:h.jsx(I,{className:"h-full bg-blue-500 transition-all",style:{width:`${E}%`}})}),h.jsxs(Q,{className:"text-white text-xs mt-1",children:[E,"%"]})]}),x&&h.jsx(I,{className:"absolute inset-0 bg-red-500/50 flex items-center justify-center",children:h.jsx(pt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),i&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),i()},className:`absolute top-1.5 left-1.5 z-10 p-1 rounded-full transition-colors ${o?"bg-yellow-500 text-white":"bg-gray-800/50 text-gray-300 hover:bg-yellow-500 hover:text-white opacity-0 group-hover:opacity-100"}`,title:At(o?"attachment.primary_image":"attachment.set_as_primary"),children:h.jsx(pt,{className:"fa-solid fa-star text-xs"})}),h.jsxs(I,{className:`absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-start justify-end p-1 gap-1 opacity-0 group-hover:opacity-100 ${a?"hidden":""}`,children:[h.jsx(oe,{type:"button",...l,...c,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-gray-600 dark:text-gray-300 hover:bg-white cursor-grab active:cursor-grabbing",title:At("attachment.drag_to_reorder"),onClick:O=>O.stopPropagation(),children:h.jsx(pt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&s&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),s()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:At("common.download"),children:h.jsx(pt,{className:"fa-solid fa-download text-sm"})}),x&&n&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:At("common.retry"),children:h.jsx(pt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),e()},disabled:b||S,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:At("common.delete"),children:h.jsx(pt,{className:"fa-solid fa-times text-sm"})})]})]}),h.jsxs(I,{className:`p-2 ${!p&&s?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&s&&s()},children:[h.jsx(bt,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:t.original_filename,children:t.original_filename}),h.jsx(bt,{className:"text-xs text-gray-500 dark:text-gray-400",children:t.siz Line truncated
`,onDragOver:u=>{u.preventDefault(),d&&r(!0)},onDragLeave:()=>r(!1),onDrop:u=>{u.preventDefault(),r(!1),d&&n(u.dataTransfer.files)},children:[h.jsx("input",{ref:s,type:"file",multiple:!0,accept:o,onChange:u=>u.target.files&&!l&&n(u.target.files),className:"hidden",disabled:l}),!c&&h.jsxs(I,{className:`p-8 text-center transition-colors ${l?"cursor-not-allowed":"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800/50"}`,onClick:()=>!l&&s.current?.click(),children:[h.jsx(pt,{className:"fa-solid fa-cloud-arrow-up text-4xl text-gray-400 dark:text-gray-500 mb-4"}),h.jsx(bt,{className:"text-sm text-gray-600 dark:text-gray-400",children:At("attachment.drop_or_click")}),h.jsxs(bt,{className:"text-xs text-gray-500 dark:text-gray-500 mt-2",children:[At("attachment.upload_limit",{maxFiles:i,maxSize:a}),o&&` (${o})`]})]}),c]})},cE=window.G7Core,dE=window.G7Core?.createLogger?.("Comp:SortableThumbnail")??{log:(...t)=>console.log("[Comp:SortableThumbnail]",...t),warn:(...t)=>console.warn("[Comp:SortableThumbnail]",...t),error:(...t)=>console.error("[Comp:SortableThumbnail]",...t)},uE=({file:t,onRemove:e,onRetry:n,onImageClick:r,onDownload:s,isPrimary:o,onPrimaryClick:i,disabled:a})=>{const{attributes:l,listeners:c,setNodeRef:d,transform:u,transition:f,isDragging:g}=Di({id:"hash"in t?t.hash:t.id}),m={transform:Ln.Transform.toString(u),transition:f,opacity:g?.5:1},p="status"in t&&t.status!==void 0,y=p?t.status:"done",b=y==="uploading",S=y==="compressing",x=y==="error",E=p?t.progress:100,k=p?t.preview:void 0,C=p?t.mime_type?.startsWith("image/")??!1:t.is_image,[N,_]=v.useState(void 0),w=!p&&C?t.download_url:void 0;v.useEffect(()=>{if(!w){_(void 0);return}let O=!0,L;return(async()=>{try{const $=await cE.api.get(w,{responseType:"blob"});O&&$&&(L=URL.createObjectURL($),_(L))}catch($){dE.error("Failed to load authenticated image:",$)}})(),()=>{O=!1,L&&URL.revokeObjectURL(L)}},[w]);const M=N;return h.jsxs(I,{ref:d,style:m,className:"relative group bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden",children:[h.jsxs(I,{className:`aspect-square w-full flex items-center justify-center bg-gray-50 dark:bg-gray-900 relative ${C||!p?"cursor-pointer":""}`,onClick:()=>{b||S||(C&&r?r():!p&&s&&s())},children:[k||M?h.jsx(yn,{src:k||M,alt:t.original_filename,className:"w-full h-full object-cover"}):h.jsx(pt,{className:`fa-solid ${iE(t.mime_type)} text-4xl text-gray-400 dark:text-gray-500`}),(b||S)&&h.jsxs(I,{className:"absolute inset-0 bg-black/50 flex flex-col items-center justify-center",children:[h.jsx(I,{className:"w-3/4 h-2 bg-gray-700 rounded-full overflow-hidden",children:h.jsx(I,{className:"h-full bg-blue-500 transition-all",style:{width:`${E}%`}})}),h.jsxs(Q,{className:"text-white text-xs mt-1",children:[E,"%"]})]}),x&&h.jsx(I,{className:"absolute inset-0 bg-red-500/50 flex items-center justify-center",children:h.jsx(pt,{className:"fa-solid fa-exclamation-triangle text-2xl text-white"})}),i&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),i()},className:`absolute top-1.5 left-1.5 z-10 p-1 rounded-full transition-colors ${o?"bg-yellow-500 text-white":"bg-gray-800/50 text-gray-300 hover:bg-yellow-500 hover:text-white opacity-0 group-hover:opacity-100"}`,title:At(o?"attachment.primary_image":"attachment.set_as_primary"),children:h.jsx(pt,{className:"fa-solid fa-star text-xs"})}),h.jsxs(I,{className:`absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-start justify-end p-1 gap-1 opacity-0 group-hover:opacity-100 ${a?"hidden":""}`,children:[h.jsx(oe,{type:"button",...l,...c,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-gray-600 dark:text-gray-300 hover:bg-white cursor-grab active:cursor-grabbing",title:At("attachment.drag_to_reorder"),onClick:O=>O.stopPropagation(),children:h.jsx(pt,{className:"fa-solid fa-grip-vertical text-sm"})}),!p&&s&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),s()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-blue-500 hover:bg-white",title:At("common.download"),children:h.jsx(pt,{className:"fa-solid fa-download text-sm"})}),x&&n&&h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),n()},className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-orange-500 hover:bg-white",title:At("common.retry"),children:h.jsx(pt,{className:"fa-solid fa-arrow-rotate-right text-sm"})}),h.jsx(oe,{type:"button",onClick:O=>{O.stopPropagation(),e()},disabled:b||S,className:"p-1.5 bg-white/90 dark:bg-gray-800/90 rounded text-red-500 hover:bg-white disabled:opacity-50",title:At("common.delete"),children:h.jsx(pt,{className:"fa-solid fa-times text-sm"})})]})]}),h.jsxs(I,{className:`p-2 ${!p&&s?"cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-700":""}`,onClick:()=>{!p&&s&&s()},children:[h.jsx(bt,{className:"text-xs font-medium text-gray-900 dark:text-white truncate",title:t.original_filename,children:t.original_filename}),h.jsx(bt,{className:"text-xs text-gray-500 dark:text-gray-400",children:t.siz Line truncated
${y.radio}
text-blue-600
bg-gray-100 dark:bg-gray-700
@@ -244,10 +237,10 @@ self.addEventListener('message', async (e) => {
${y.label}
font-medium
text-gray-900 dark:text-gray-300
`,children:S.label})]},S.value)})}),c&&h.jsx(Q,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:c})]})},as=()=>window.G7Core,Ki=(t,e)=>as()?.t?.(t,e)??t,lE=()=>as()?.locale?.supported?.()??["ko","en"],cE=()=>as()?.locale?.current?.()??"ko",kp=t=>{const e=Ki(`common.language_${t}`);return e===`common.language_${t}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[t]||t.toUpperCase():e},dE=({content:t="",value:e,onChange:n,multilingual:r=!1,isHtml:s=!1,onIsHtmlChange:o,rows:i=15,placeholder:a="",label:l,showHtmlModeToggle:c=!0,contentClassName:d="",purifyConfig:u,className:f="",name:g="content",htmlFieldName:m="content_mode",readOnly:p=!1,id:y,editorAttrs:b})=>{const S=v.useMemo(()=>lE(),[]),x=v.useMemo(()=>cE(),[]),[E,k]=v.useState(x),[C,N]=v.useState(s),[_,w]=v.useState(t),[M,O]=v.useState(e??{}),[L,$]=v.useState(!1);v.useEffect(()=>{N(s)},[s]),v.useEffect(()=>{r||w(t)},[t,r]),v.useEffect(()=>{r&&e&&O(e)},[e,r]);const F=v.useCallback(j=>{const U=j.target.value;if(w(U),n){const B=as()?.createChangeEvent?.({value:U,name:g,type:"textarea"})??{target:{name:g,value:U}};n(B)}},[n,g]),D=v.useCallback((j,U)=>{const B={...M,[j]:U};if(O(B),n){const G=as()?.createChangeEvent?.({value:B,name:g,type:"multilingual"})??{target:{name:g,value:B}};n(G)}},[n,g,M]),A=v.useCallback(j=>{const U=j.target.checked;if(N(U),U||$(!1),o){const B=as()?.createChangeEvent?.({checked:U,name:m,type:"checkbox"})??{target:{name:m,checked:U}};o(B)}},[o,m]),T=v.useCallback(()=>{$(j=>!j)},[]),V=r?M[E]??"":_,H=v.useCallback(j=>!!M[j]?.trim(),[M]),W=()=>h.jsx(I,{className:"flex items-center gap-2 mb-3",children:S.map(j=>{const U=j===x,B=E===j;return h.jsxs(oe,{type:"button",className:`
`,children:S.label})]},S.value)})}),c&&h.jsx(Q,{className:"mt-1 text-xs text-red-600 dark:text-red-400",children:c})]})},as=()=>window.G7Core,qi=(t,e)=>as()?.t?.(t,e)??t,gE=()=>as()?.locale?.supported?.()??["ko","en"],pE=()=>as()?.locale?.current?.()??"ko",Ep=t=>{const e=qi(`common.language_${t}`);return e===`common.language_${t}`?{ko:"한국어",en:"English",ja:"日本語",zh:"中文"}[t]||t.toUpperCase():e},mE=({content:t="",value:e,onChange:n,multilingual:r=!1,isHtml:s=!1,onIsHtmlChange:o,rows:i=15,placeholder:a="",label:l,showHtmlModeToggle:c=!0,contentClassName:d="",purifyConfig:u,className:f="",name:g="content",htmlFieldName:m="content_mode",readOnly:p=!1,id:y,editorAttrs:b})=>{const S=v.useMemo(()=>gE(),[]),x=v.useMemo(()=>pE(),[]),[E,k]=v.useState(x),[C,N]=v.useState(s),[_,w]=v.useState(t),[M,O]=v.useState(e??{}),[L,F]=v.useState(!1);v.useEffect(()=>{N(s)},[s]),v.useEffect(()=>{r||w(t)},[t,r]),v.useEffect(()=>{r&&e&&O(e)},[e,r]);const $=v.useCallback(j=>{const U=j.target.value;if(w(U),n){const B=as()?.createChangeEvent?.({value:U,name:g,type:"textarea"})??{target:{name:g,value:U}};n(B)}},[n,g]),D=v.useCallback((j,U)=>{const B={...M,[j]:U};if(O(B),n){const G=as()?.createChangeEvent?.({value:B,name:g,type:"multilingual"})??{target:{name:g,value:B}};n(G)}},[n,g,M]),A=v.useCallback(j=>{const U=j.target.checked;if(N(U),U||F(!1),o){const B=as()?.createChangeEvent?.({checked:U,name:m,type:"checkbox"})??{target:{name:m,checked:U}};o(B)}},[o,m]),T=v.useCallback(()=>{F(j=>!j)},[]),z=r?M[E]??"":_,H=v.useCallback(j=>!!M[j]?.trim(),[M]),W=()=>h.jsx(I,{className:"flex flex-wrap items-center gap-2 mb-3",children:S.map(j=>{const U=j===x,B=E===j;return h.jsxs(oe,{type:"button",className:`
inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-semibold transition-all
${B?U?"bg-blue-500 text-white dark:bg-blue-600 dark:text-white shadow-md scale-105":"bg-gray-500 text-white dark:bg-gray-600 dark:text-white shadow-md scale-105":U?"bg-blue-50 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 hover:bg-blue-100 dark:hover:bg-blue-900/50":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600"}
`,onClick:()=>k(j),children:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),h.jsx(Q,{children:kp(j)}),U&&h.jsx(Q,{className:"text-red-500",children:"*"}),H(j)&&!B&&h.jsx(re,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},j)})});return h.jsxs(I,{className:`space-y-2 ${f}`,id:y,...b,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[l&&h.jsx(en,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),h.jsxs(I,{className:"flex items-center gap-3",children:[C&&!p&&h.jsx(oe,{type:"button",onClick:T,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${L?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:Ki(L?"common.preview_off":"common.preview")}),c&&h.jsxs(en,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[h.jsx(wt,{type:"checkbox",name:m,checked:C,onChange:A,disabled:p,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),h.jsx(I,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:Ki("common.html_mode")})]})]})]}),r&&W(),!L&&(r?S.map(j=>h.jsx(I,{className:E===j?"block":"hidden",children:h.jsx(qn,{name:`${g}[${j}]`,value:M[j]??"",onChange:U=>D(j,U.target.value),placeholder:`${a} (${kp(j)})`,rows:i,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${C?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})},j)):h.jsx(qn,{name:g,value:_,onChange:F,placeholder:a,rows:i,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${C?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})),L&&h.jsx(I,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:h.jsx(Xa,{content:V,isHtml:!0,className:d||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:u})})]})},Cp="g7_dismissed_warnings";function Sp(){try{const t=sessionStorage.getItem(Cp);return t?JSON.parse(t):[]}catch{return[]}}function uE(t){try{const e=Sp();e.includes(t)||(e.push(t),sessionStorage.setItem(Cp,JSON.stringify(e)))}catch{}}function fE(t){switch(t){case"error":return"error";case"warning":return"warning";case"info":default:return"info"}}const hE=({warnings:t,className:e=""})=>{const[n,r]=v.useState([]);v.useEffect(()=>{r(Sp())},[]);const s=v.useCallback(i=>{uE(i),r(a=>[...a,i])},[]);if(!t||t.length===0)return null;const o=t.filter(i=>!n.includes(i.id));return o.length===0?null:h.jsx(I,{className:`space-y-2 ${e}`.trim(),children:o.map(i=>h.jsx(iu,{type:fE(i.level),message:i.message,dismissible:!0,onDismiss:()=>s(i.id)},i.id))})},_p=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...t)=>console.log("[Comp:FilterVisibility]",...t),warn:(...t)=>console.warn("[Comp:FilterVisibility]",...t),error:(...t)=>console.error("[Comp:FilterVisibility]",...t)},gE=({id:t,visibleFilters:e,defaultFilters:n=[],onFilterVisibilityChange:r})=>{const[s,o]=v.useState(!1),i=v.useRef(!0),a=v.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=v.useMemo(()=>`g7_filters_${t}${a!==void 0?`_${a}`:""}`,[t,a]),c=v.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const g=JSON.parse(f);if(Array.isArray(g))return g}}catch(f){_p.warn("Failed to load from localStorage:",f)}return null},[l]),d=v.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(g){_p.warn("Failed to save to localStorage:",g)}},[l]),u=v.useCallback(()=>{const f=c();return f||(e&&e.length>0?e:n)},[c,e,n]);return v.useEffect(()=>{if(!s){const f=u();r&&f.length>0&&r(f),o(!0)}},[s,r,u]),v.useEffect(()=>{if(s&&e&&e.length>0){if(i.current){i.current=!1;return}d(e)}},[s,e,d]),null},pE=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...t)=>c Line truncated
`,onClick:()=>k(j),children:[h.jsx(re,{name:"globe",className:"w-3 h-3"}),h.jsx(Q,{children:Ep(j)}),U&&h.jsx(Q,{className:"text-red-500",children:"*"}),H(j)&&!B&&h.jsx(re,{name:"check",className:"w-3 h-3 text-green-500 dark:text-green-400"})]},j)})});return h.jsxs(I,{className:`space-y-2 ${f}`,id:y,...b,children:[h.jsxs(I,{className:"flex items-center justify-between",children:[l&&h.jsx(rn,{className:"block text-sm font-medium text-gray-500 dark:text-gray-400",children:l}),h.jsxs(I,{className:"flex items-center gap-3",children:[C&&!p&&h.jsx(oe,{type:"button",onClick:T,className:`px-3 py-1.5 text-xs font-bold rounded-lg focus:outline-none focus:ring-2 ${L?"text-gray-700 dark:text-gray-200 bg-gray-200 dark:bg-gray-600 border border-gray-300 dark:border-gray-500 hover:bg-gray-300 dark:hover:bg-gray-500 focus:ring-gray-400 dark:focus:ring-gray-500":"text-blue-600 dark:text-blue-400 bg-white dark:bg-gray-700 border border-blue-300 dark:border-blue-600 hover:bg-blue-50 dark:hover:bg-gray-600 focus:ring-blue-500 dark:focus:ring-blue-600"}`,children:qi(L?"common.preview_off":"common.preview")}),c&&h.jsxs(rn,{className:"flex items-center gap-2 p-2 cursor-pointer",children:[h.jsx(wt,{type:"checkbox",name:m,checked:C,onChange:A,disabled:p,className:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}),h.jsx(I,{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:qi("common.html_mode")})]})]})]}),r&&W(),!L&&(r?S.map(j=>h.jsx(I,{className:E===j?"block":"hidden",children:h.jsx(Zn,{name:`${g}[${j}]`,value:M[j]??"",onChange:U=>D(j,U.target.value),placeholder:`${a} (${Ep(j)})`,rows:i,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${C?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})},j)):h.jsx(Zn,{name:g,value:_,onChange:$,placeholder:a,rows:i,readOnly:p,className:`block w-full rounded-lg border px-3 py-2 text-sm placeholder-gray-400 dark:placeholder-gray-500 focus:outline-none focus:ring-1 disabled:opacity-50 disabled:cursor-not-allowed ${C?"font-mono bg-white dark:bg-gray-800 border-blue-300 dark:border-blue-600 text-gray-800 dark:text-gray-200 focus:border-blue-500 focus:ring-blue-500":"bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white focus:border-blue-500 focus:ring-blue-500"}`})),L&&h.jsx(I,{className:"p-4 bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-800 min-h-[400px]",children:h.jsx(qa,{content:z,isHtml:!0,className:d||"prose dark:prose-invert max-w-none text-gray-900 dark:text-gray-100",purifyConfig:u})})]})},Mp="g7_dismissed_warnings";function Np(){try{const t=sessionStorage.getItem(Mp);return t?JSON.parse(t):[]}catch{return[]}}function bE(t){try{const e=Np();e.includes(t)||(e.push(t),sessionStorage.setItem(Mp,JSON.stringify(e)))}catch{}}function yE(t){switch(t){case"error":return"error";case"warning":return"warning";default:return"info"}}const vE=({warnings:t,className:e=""})=>{const[n,r]=v.useState([]);v.useEffect(()=>{r(Np())},[]);const s=v.useCallback(i=>{bE(i),r(a=>[...a,i])},[]);if(!t||t.length===0)return null;const o=t.filter(i=>!n.includes(i.id));return o.length===0?null:h.jsx(I,{className:`space-y-2 ${e}`.trim(),children:o.map(i=>h.jsx(lu,{type:yE(i.level),message:i.message,dismissible:!0,onDismiss:()=>s(i.id)},i.id))})},Op=window.G7Core?.createLogger?.("Comp:FilterVisibility")??{log:(...t)=>console.log("[Comp:FilterVisibility]",...t),warn:(...t)=>console.warn("[Comp:FilterVisibility]",...t),error:(...t)=>console.error("[Comp:FilterVisibility]",...t)},xE=({id:t,visibleFilters:e,defaultFilters:n=[],onFilterVisibilityChange:r})=>{const[s,o]=v.useState(!1),i=v.useRef(!0),a=v.useMemo(()=>{try{const f=window.G7Core?.AuthManager?.getInstance();return f?f.getUser()?.uuid:void 0}catch{return}},[]),l=v.useMemo(()=>`g7_filters_${t}${a!==void 0?`_${a}`:""}`,[t,a]),c=v.useCallback(()=>{try{const f=localStorage.getItem(l);if(f){const g=JSON.parse(f);if(Array.isArray(g))return g}}catch(f){Op.warn("Failed to load from localStorage:",f)}return null},[l]),d=v.useCallback(f=>{try{localStorage.setItem(l,JSON.stringify(f))}catch(g){Op.warn("Failed to save to localStorage:",g)}},[l]),u=v.useCallback(()=>{const f=c();return f||(e&&e.length>0?e:n)},[c,e,n]);return v.useEffect(()=>{if(!s){const f=u();r&&f.length>0&&r(f),o(!0)}},[s,r,u]),v.useEffect(()=>{if(s&&e&&e.length>0){if(i.current){i.current=!1;return}d(e)}},[s,e,d]),null},wE=window.G7Core?.createLogger?.("Comp:SlotContainer")??{log:(...t)=>console.log( Line truncated
w-full px-4 py-2.5
bg-gray-100 dark:bg-gray-700
border-0 rounded-xl
@@ -256,28 +249,13 @@ self.addEventListener('message', async (e) => {
flex items-center justify-between gap-2
text-left cursor-pointer
disabled:opacity-50 disabled:cursor-not-allowed
`,"aria-haspopup":"listbox","aria-expanded":f,children:[h.jsx(I,{className:"flex-1 min-w-0",children:E()}),h.jsx(Hn,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),f&&h.jsx(I,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden",role:"listbox",children:h.jsx(I,{className:"overflow-auto",style:{maxHeight:i},children:t.length===0?h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:Ep("common.no_options")}):t.map((C,N)=>{const _=String(C.value)===String(e);return h.jsx(oe,{type:"button",onClick:()=>!C.disabled&&S(C.value),disabled:C.disabled,className:`
`,"aria-haspopup":"listbox","aria-expanded":f,children:[h.jsx(I,{className:"flex-1 min-w-0",children:E()}),h.jsx(Hn,{className:`w-4 h-4 flex-shrink-0 transition-transform duration-200 ${f?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:h.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),f&&h.jsx(I,{className:"absolute z-50 w-full mt-2 bg-white dark:bg-gray-800 rounded-2xl shadow-lg border border-gray-200 dark:border-gray-600 overflow-hidden",role:"listbox",children:h.jsx(I,{className:"overflow-auto",style:{maxHeight:i},children:t.length===0?h.jsx(I,{className:"px-4 py-6 text-center text-gray-500 dark:text-gray-400",children:Tp("common.no_options")}):t.map((C,N)=>{const _=String(C.value)===String(e);return h.jsx(oe,{type:"button",onClick:()=>!C.disabled&&S(C.value),disabled:C.disabled,className:`
w-full px-4 py-3 text-left text-sm
hover:bg-gray-100 dark:hover:bg-gray-700
transition-colors
${_?"bg-blue-50 dark:bg-blue-900/20":""}
${C.disabled?"opacity-50 cursor-not-allowed":"cursor-pointer"}
`,role:"option","aria-selected":_,"data-item-value":C.value,"data-item-index":N,"data-item-selected":_,children:c?.item?Mp(c.item,{item:C,index:N,isSelected:_},`item-${N}`):a||k(C,_)},C.value)})})})]})};function vE(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}const xE=({value:t,checked:e=!1,icon:n,label:r,variant:s="blue",customColor:o,className:i="",style:a,onChange:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(!1),g="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border cursor-pointer transition-all";if(o){const b=vE(o),S=document.documentElement.classList.contains("dark");let x;return e?x={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:u?.85:1}:x=b?{backgroundColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${u?S?.25:.12:S?.15:.06})`,color:o,borderColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${S?.3:.2})`}:{},h.jsxs(en,{className:`${g} ${i}`,style:{...x,...a},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),id:c,...d,children:[h.jsx(wt,{type:"checkbox",value:t,checked:e,onChange:E=>{l?.(E)},className:"hidden"}),n&&h.jsx(re,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})}const y=e?{green:"bg-green-600 dark:bg-green-600 text-white dark:text-white border-green-700 dark:border-green-500 hover:bg-green-700 dark:hover:bg-green-500",orange:"bg-orange-600 dark:bg-orange-600 text-white dark:text-white border-orange-700 dark:border-orange-500 hover:bg-orange-700 dark:hover:bg-orange-500",yellow:"bg-yellow-600 dark:bg-yellow-600 text-white dark:text-white border-yellow-700 dark:border-yellow-500 hover:bg-yellow-700 dark:hover:bg-yellow-500",gray:"bg-gray-600 dark:bg-gray-500 text-white dark:text-white border-gray-700 dark:border-gray-400 hover:bg-gray-700 dark:hover:bg-gray-400",blue:"bg-blue-600 dark:bg-blue-600 text-white dark:text-white border-blue-700 dark:border-blue-500 hover:bg-blue-700 dark:hover:bg-blue-500"}[s]:{green:"bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30",orange:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800 hover:bg-orange-100 dark:hover:bg-orange-900/30",yellow:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-600 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800 hover:bg-yellow-100 dark:hover:bg-yellow-900/30",gray:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600",blue:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"}[s];return h.jsxs(en,{className:`${g} ${y} ${i}`,style:a,id:c,...d,children:[h.jsx(wt,{type:"checkbox",value:t,checked:e,onChange:b=>{l?.(b)},className:"hidden"}),n&&h.jsx(re,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})},wE=({label:t,icon:e,iconPosition:n="left",position:r="right",className:s="",style:o,children:i})=>{const[a,l]=v.useState(!1),[c,d]=v.useState({top:0,left:0}),u=v.useRef(null),f=v.useRef(null),g=v.useCallback(()=>{if(!u.current)return;const p=u.current.getBoundingClientRect(),y=224;let b=r==="right"?p.right-y:p.left;const S=p.bottom+8;b<8&&(b=8),b+y>window.innerWidth-8&&(b=window.innerWidth-y-8),d({top:S,left:b})},[r]);v.useEffect(()=>{a&&g()},[a,g]),v.useEffect(()=>{if(!a)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[a]),v.useEffect(()=>{const p=y=>{const b=y.target,S=u.current?.contains(b),x=f.current?.contains(b);!S&&!x&&l(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const m=a?Nn.createPortal(h.jsx("div",{ref:f,className:"fixed z-[9999] w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden",style:{top:c.top,left:c.left},onClick:()=>l(!1),children:i}),document.body):null;return h.jsxs(I,{className:`relative inline-block ${s}`,style:o,children:[h.jsxs(oe,{ref:u,onClick:()=>l(!a),className:"flex items-center gap-2",children:[n==="left"&&e&&h.jsx(re,{name:e,className:"w-4 h-4"}),t&&h.jsx(Q,{className:"text-sm font-medium",children:t}),n==="right"&&e&&h.jsx(re,{name:e,className:"w-4 h-4"})]}),m]})},kE=({label:t,icon:e,variant:n="default",disabled:r=!1,divider:s=!1,className:o="",style:i,onClick:a})=>{if(s)return h.jsx(I,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:i});const l=n==="danger"?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",c=r?"opacity-50 cursor-not-allowed":"cursor-pointer",d=()=>{!r&&a&&a()};return h.jsxs(I,{onClick:d,className:`flex items-center gap-3 px-4 py-3Line truncated
* @kurkle/color v0.3.4
* https://github.com/kurkle/color#readme
* (c) 2024 Jukka Kurkela
* Released under the MIT License
*/function io(t){return t+.5|0}const rr=(t,e,n)=>Math.max(Math.min(t,n),e);function ao(t){return rr(io(t*2.55),0,255)}function sr(t){return rr(io(t*255),0,255)}function jn(t){return rr(io(t/2.55)/100,0,1)}function Ap(t){return rr(io(t*100),0,100)}const fn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Lc=[..."0123456789ABCDEF"],VE=t=>Lc[t&15],zE=t=>Lc[(t&240)>>4]+Lc[t&15],qi=t=>(t&240)>>4===(t&15),HE=t=>qi(t.r)&&qi(t.g)&&qi(t.b)&&qi(t.a);function UE(t){var e=t.length,n;return t[0]==="#"&&(e===4||e===5?n={r:255&fn[t[1]]*17,g:255&fn[t[2]]*17,b:255&fn[t[3]]*17,a:e===5?fn[t[4]]*17:255}:(e===7||e===9)&&(n={r:fn[t[1]]<<4|fn[t[2]],g:fn[t[3]]<<4|fn[t[4]],b:fn[t[5]]<<4|fn[t[6]],a:e===9?fn[t[7]]<<4|fn[t[8]]:255})),n}const BE=(t,e)=>t<255?e(t):"";function jE(t){var e=HE(t)?VE:zE;return t?"#"+e(t.r)+e(t.g)+e(t.b)+BE(t.a,e):void 0}const WE=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Dp(t,e,n){const r=e*Math.min(n,1-n),s=(o,i=(o+t/30)%12)=>n-r*Math.max(Math.min(i-3,9-i,1),-1);return[s(0),s(8),s(4)]}function GE(t,e,n){const r=(s,o=(s+t/60)%6)=>n-n*e*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function YE(t,e,n){const r=Dp(t,1,.5);let s;for(e+n>1&&(s=1/(e+n),e*=s,n*=s),s=0;s<3;s++)r[s]*=1-e-n,r[s]+=e;return r}function XE(t,e,n,r,s){return t===s?(e-n)/r+(e<n?6:0):e===s?(n-t)/r+2:(t-e)/r+4}function Pc(t){const n=t.r/255,r=t.g/255,s=t.b/255,o=Math.max(n,r,s),i=Math.min(n,r,s),a=(o+i)/2;let l,c,d;return o!==i&&(d=o-i,c=a>.5?d/(2-o-i):d/(o+i),l=XE(n,r,s,d,o),l=l*60+.5),[l|0,c||0,a]}function $c(t,e,n,r){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,n,r)).map(sr)}function Fc(t,e,n){return $c(Dp,t,e,n)}function KE(t,e,n){return $c(YE,t,e,n)}function qE(t,e,n){return $c(GE,t,e,n)}function Ip(t){return(t%360+360)%360}function ZE(t){const e=WE.exec(t);let n=255,r;if(!e)return;e[5]!==r&&(n=e[6]?ao(+e[5]):sr(+e[5]));const s=Ip(+e[2]),o=+e[3]/100,i=+e[4]/100;return e[1]==="hwb"?r=KE(s,o,i):e[1]==="hsv"?r=qE(s,o,i):r=Fc(s,o,i),{r:r[0],g:r[1],b:r[2],a:n}}function QE(t,e){var n=Pc(t);n[0]=Ip(n[0]+e),n=Fc(n),t.r=n[0],t.g=n[1],t.b=n[2]}function JE(t){if(!t)return;const e=Pc(t),n=e[0],r=Ap(e[1]),s=Ap(e[2]);return t.a<255?`hsla(${n}, ${r}%, ${s}%, ${jn(t.a)})`:`hsl(${n}, ${r}%, ${s}%)`}const Lp={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Pp={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function RE(){const t={},e=Object.keys(Pp),n=Object.keys(Lp);let r,s,o,i,a;for(r=0;r<e.length;r++){for(i=a=e[r],s=0;s<n.length;s++)o=n[s]Line truncated
* Chart.js v4.5.1
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/function Wn(){}const iM=(()=>{let t=0;return()=>t++})();function ct(t){return t==null}function _t(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function Ze(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function hn(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Pn(t,e){return hn(t)?t:e}function Qe(t,e){return typeof t>"u"?e:t}const aM=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,Vp=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function ht(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function at(t,e,n,r){let s,o,i;if(_t(t))for(o=t.length,s=0;s<o;s++)e.call(n,t[s],s);else if(Ze(t))for(i=Object.keys(t),o=i.length,s=0;s<o;s++)e.call(n,t[i[s]],i[s])}function Ji(t,e){let n,r,s,o;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(s=t[n],o=e[n],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Ri(t){if(_t(t))return t.map(Ri);if(Ze(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let s=0;for(;s<r;++s)e[n[s]]=Ri(t[n[s]]);return e}return t}function zp(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function lM(t,e,n,r){if(!zp(t))return;const s=e[t],o=n[t];Ze(s)&&Ze(o)?co(s,o,r):e[t]=Ri(o)}function co(t,e,n){const r=_t(e)?e:[e],s=r.length;if(!Ze(t))return t;n=n||{};const o=n.merger||lM;let i;for(let a=0;a<s;++a){if(i=r[a],!Ze(i))continue;const l=Object.keys(i);for(let c=0,d=l.length;c<d;++c)o(l[c],t,i,n)}return t}function uo(t,e){return co(t,e,{merger:cM})}function cM(t,e,n){if(!zp(t))return;const r=e[t],s=n[t];Ze(r)&&Ze(s)?uo(r,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Ri(s))}const Hp={"":t=>t,x:t=>t.x,y:t=>t.y};function dM(t){const e=t.split("."),n=[];let r="";for(const s of e)r+=s,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function uM(t){const e=dM(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function Cr(t,e){return(Hp[e]||(Hp[e]=uM(e)))(t)}function zc(t){return t.charAt(0).toUpperCase()+t.slice(1)}const fo=t=>typeof t<"u",or=t=>typeof t=="function",Up=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function fM(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const dt=Math.PI,Ct=2*dt,ea=Number.POSITIVE_INFINITY,hM=dt/180,Et=dt/2,Sr=dt/4,Bp=dt*2/3,jp=Math.log10,ir=Math.sign;function ta(t,e,n){return Math.abs(t-e)<n}function Wp(t){const e=Math.round(t);t=ta(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(jp(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function gM(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((s,o)=>s-o).pop(),e}function pM(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function na(t){return!pM(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function mM(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function bM(t,e,n){let r,s,o;for(r=0,s=t.length;r<s;r++)o=t[r][n],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Gn(t){return t*(dt/180)}function yM(t){return t*(180/dt)}function Gp(t){if(!hn(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Yp(t,e){const n=e.x-t.x,r=e.y-t.y,s=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*dt&&(o+=Ct),{angle:o,distance:s}}function vM(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $n(t){return(t%Ct+Ct)%Ct}function ra(t,e,n,r){const s=$n(t),o=$n(e),i=$n(n),a=$n(o-s),l=$n(i-s),c=$n(s-o),d=$n(s-i);return s===o||s===i||r&&o===i||a>l&&c<d}function Zt(t,e,n){return Math.max(e,Math.min(n,t))}function xM(t){return Zt(t,-32768,32767)}function _r(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function Hc(t,e,n){n=n||(i=>t[i]<e);let r=t.length-1,s=0,o;for(;r-s>1;)o=s+r>>1,n(o)?s=o:r=o;return{lo:s,hi:r}}const Uc=(t,e,n,r)=>Hc(t,n,r?s=>{const o=t[s][e];return o<n||o===n&&t[s+1][e]===n}:s=>t[s][e]<n),wM=(t,e,n)=>Hc(t,n,r=>t[r][e]>=n);function kM(t,e,n){let r=0,s=t.length;for(;r<s&&t[r]<e;)r++;for(;s>r&&t[s-1]>n;)s--;return r>0||s<t.length?t.slice(r,s):t}const Xp=["push","pop","shift","splice","unshift"];function CM(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Xp.forEach(n=>{const r="_onData"+zc(n),s=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...o){const i=s.apply(this,o);return t._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...o)}),i}})})}function Kp(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,s=r.indexOf(e);s!==-1&&r.splice(s,1),!(r.length>0)&&(Xp.forEach(o=>{delete t[o]}),delete t._chartjs)}function qp(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const Zp=(function(){return typeof window>"u"?functionLine truncated
* Chart.js v4.5.1
* https://www.chartjs.org
* (c) 2025 Chart.js Contributors
* Released under the MIT License
*/class dN{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,s){const o=n.listeners[s],i=n.duration;o.forEach(a=>a({chart:e,initial:n.initial,numSteps:i,currentStep:Math.min(r-n.start,i)}))}_refresh(){this._request||(this._running=!0,this._request=Zp.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,s)=>{if(!r.running||!r.items.length)return;const o=r.items;let i=o.length-1,a=!1,l;for(;i>=0;--i)l=o[i],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),a=!0):(o[i]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,r,e,"progress")),o.length||(r.running=!1,this._notify(s,r,e,"complete"),r.initial=!1),n+=o.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,s)=>Math.max(r,s._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let s=r.length-1;for(;s>=0;--s)r[s].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Yn=new dN;const x0="transparent",uN={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=t0(t||x0),s=r.valid&&t0(e||x0);return s&&s.valid?s.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class fN{constructor(e,n,r,s){const o=n[r];s=ia([e.to,s,o,e.from]);const i=ia([e.from,o,s]);this._active=!0,this._fn=e.fn||uN[e.type||typeof i],this._easing=ho[e.easing]||ho.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=i,this._to=s,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const s=this._target[this._prop],o=r-this._start,i=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=o,this._loop=!!e.loop,this._to=ia([e.to,n,s,e.from]),this._from=ia([e.from,s,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,s=this._prop,o=this._from,i=this._loop,a=this._to;let l;if(this._active=o!==a&&(i||n<r),!this._active){this._target[s]=a,this._notify(!0);return}if(n<0){this._target[s]=o;return}l=n/r%2,l=i&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[s]=this._fn(o,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let s=0;s<r.length;s++)r[s][n]()}}class w0{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!Ze(e))return;const n=Object.keys(vt.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(s=>{const o=e[s];if(!Ze(o))return;const i={};for(const a of n)i[a]=o[a];(_t(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!r.has(a))&&r.set(a,i)})})}_animateOptions(e,n){const r=n.options,s=gN(e,r);if(!s)return[];const o=this._createAnimations(s,r);return r.$shared&&hN(e.options.$animations,r).then(()=>{e.options=r},()=>{}),o}_createAnimations(e,n){const r=this._properties,s=[],o=e.$animations||(e.$animations={}),i=Object.keys(n),a=Date.now();let l;for(l=i.length-1;l>=0;--l){const c=i[l];if(c.charAt(0)==="$")continue;if(c==="options"){s.push(...this._animateOptions(e,n));continue}const d=n[c];let u=o[c];const f=r.get(c);if(u)if(f&&u.active()){u.update(f,d,a);continue}else u.cancel();if(!f||!f.duration){e[c]=d;continue}o[c]=u=new fN(f,e,c,d),s.push(u)}return s}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Yn.add(this._chart,r),!0}}function hN(t,e){const n=[],r=Object.keys(e);for(let s=0;s<r.length;s++){const o=t[r[s]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function gN(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function k0(t,e){const n=t&&t.options||{},r=n.reverse,s=n.min===void 0?e:0,o=n.max===void 0?e:0;return{start:r?o:s,end:r?s:o}}function pN(t,e,n){if(n===!1)return!1;const r=k0(t,n),s=k0(e,n);return{top:s.end,right:r.end,bottom:s.start,left:r.start}}function mN(t){let e,n,r,s;return Ze(t)?(e=t.top,n=t.right,r=t.bottom,s=t.left):e=n=r=s=t,{top:e,right:n,bottom:r,left:s,disabled:t===!1}}function C0(t,e){const n=[],r=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=r.length;s<o;++s)n.push(r[s].indLine truncated
`,role:"option","aria-selected":_,"data-item-value":C.value,"data-item-index":N,"data-item-selected":_,children:c?.item?Ap(c.item,{item:C,index:N,isSelected:_},`item-${N}`):a||k(C,_)},C.value)})})})]})};function _E(t){const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:null}const EE=({value:t,checked:e=!1,icon:n,label:r,variant:s="blue",customColor:o,className:i="",style:a,onChange:l,id:c,editorAttrs:d})=>{const[u,f]=v.useState(!1),g="inline-flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium border cursor-pointer transition-all";if(o){const b=_E(o),S=document.documentElement.classList.contains("dark");let x;return e?x={backgroundColor:o,color:"#ffffff",borderColor:o,opacity:u?.85:1}:x=b?{backgroundColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${u?S?.25:.12:S?.15:.06})`,color:o,borderColor:`rgba(${b.r}, ${b.g}, ${b.b}, ${S?.3:.2})`}:{},h.jsxs(rn,{className:`${g} ${i}`,style:{...x,...a},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),id:c,...d,children:[h.jsx(wt,{type:"checkbox",value:t,checked:e,onChange:E=>{l?.(E)},className:"hidden"}),n&&h.jsx(re,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})}const y=e?{green:"bg-green-600 dark:bg-green-600 text-white dark:text-white border-green-700 dark:border-green-500 hover:bg-green-700 dark:hover:bg-green-500",orange:"bg-orange-600 dark:bg-orange-600 text-white dark:text-white border-orange-700 dark:border-orange-500 hover:bg-orange-700 dark:hover:bg-orange-500",yellow:"bg-yellow-600 dark:bg-yellow-600 text-white dark:text-white border-yellow-700 dark:border-yellow-500 hover:bg-yellow-700 dark:hover:bg-yellow-500",gray:"bg-gray-600 dark:bg-gray-500 text-white dark:text-white border-gray-700 dark:border-gray-400 hover:bg-gray-700 dark:hover:bg-gray-400",blue:"bg-blue-600 dark:bg-blue-600 text-white dark:text-white border-blue-700 dark:border-blue-500 hover:bg-blue-700 dark:hover:bg-blue-500"}[s]:{green:"bg-green-50 dark:bg-green-900/20 text-green-600 dark:text-green-400 border-green-200 dark:border-green-800 hover:bg-green-100 dark:hover:bg-green-900/30",orange:"bg-orange-50 dark:bg-orange-900/20 text-orange-600 dark:text-orange-400 border-orange-200 dark:border-orange-800 hover:bg-orange-100 dark:hover:bg-orange-900/30",yellow:"bg-yellow-50 dark:bg-yellow-900/20 text-yellow-600 dark:text-yellow-400 border-yellow-200 dark:border-yellow-800 hover:bg-yellow-100 dark:hover:bg-yellow-900/30",gray:"bg-gray-50 dark:bg-gray-700 text-gray-600 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-600",blue:"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800 hover:bg-blue-100 dark:hover:bg-blue-900/30"}[s];return h.jsxs(rn,{className:`${g} ${y} ${i}`,style:a,id:c,...d,children:[h.jsx(wt,{type:"checkbox",value:t,checked:e,onChange:b=>{l?.(b)},className:"hidden"}),n&&h.jsx(re,{name:n,className:"w-4 h-4"}),h.jsx(I,{children:r})]})},ME=({label:t,icon:e,iconPosition:n="left",position:r="right",className:s="",style:o,children:i})=>{const[a,l]=v.useState(!1),[c,d]=v.useState({top:0,left:0}),u=v.useRef(null),f=v.useRef(null),g=v.useCallback(()=>{if(!u.current)return;const p=u.current.getBoundingClientRect(),y=224;let b=r==="right"?p.right-y:p.left;const S=p.bottom+8;b<8&&(b=8),b+y>window.innerWidth-8&&(b=window.innerWidth-y-8),d({top:S,left:b})},[r]);v.useEffect(()=>{a&&g()},[a,g]),v.useEffect(()=>{if(!a)return;const p=()=>{l(!1)};return window.addEventListener("scroll",p,!0),window.addEventListener("resize",p),()=>{window.removeEventListener("scroll",p,!0),window.removeEventListener("resize",p)}},[a]),v.useEffect(()=>{const p=y=>{const b=y.target,S=u.current?.contains(b),x=f.current?.contains(b);!S&&!x&&l(!1)};return a&&document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p)}},[a]);const m=a?On.createPortal(h.jsx("div",{ref:f,className:"fixed z-[9999] w-56 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg overflow-hidden",style:{top:c.top,left:c.left},onClick:()=>l(!1),children:i}),document.body):null;return h.jsxs(I,{className:`relative inline-block ${s}`,style:o,children:[h.jsxs(oe,{ref:u,onClick:()=>l(!a),className:"flex items-center gap-2",children:[n==="left"&&e&&h.jsx(re,{name:e,className:"w-4 h-4"}),t&&h.jsx(Q,{className:"text-sm font-medium",children:t}),n==="right"&&e&&h.jsx(re,{name:e,className:"w-4 h-4"})]}),m]})},NE=({label:t,icon:e,variant:n="default",disabled:r=!1,divider:s=!1,className:o="",style:i,onClick:a})=>{if(s)return h.jsx(I,{className:"h-px bg-gray-200 dark:bg-gray-700 my-1",style:i});const l=n==="danger"?"text-red-600 dark:text-red-400 hover:bg-red-50 dark:hover:bg-red-900/20":"text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700",c=r?"opacity-50 cursor-not-allowed":"cursor-pointer",d=()=>{!r&&a&&a()};return h.jsxs(I,{onClick:d,className:`flex items-center gap-3 px-4 py-3Line truncated
`)>-1?t.split(`
`):t}function l5(t,e){const{element:n,datasetIndex:r,index:s}=e,o=t.getDatasetMeta(r).controller,{label:i,value:a}=o.getLabelAndValue(s);return{chart:t,label:i,parsed:o.getParsed(s),raw:t.data.datasets[r].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function fm(t,e){const n=t.chart.ctx,{body:r,footer:s,title:o}=t,{boxWidth:i,boxHeight:a}=e,l=Ut(e.bodyFont),c=Ut(e.titleFont),d=Ut(e.footerFont),u=o.length,f=s.length,g=r.length,m=gn(e.padding);let p=m.height,y=0,b=r.reduce((E,k)=>E+k.before.length+k.lines.length+k.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){const E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=g*E+(b-g)*l.lineHeight+(b-1)*e.bodySpacing}f&&(p+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let S=0;const x=function(E){y=Math.max(y,n.measureText(E).width+S)};return n.save(),n.font=c.string,at(t.title,x),n.font=l.string,at(t.beforeBody.concat(t.afterBody),x),S=e.displayColors?i+2+e.boxPadding:0,at(r,E=>{at(E.before,x),at(E.lines,x),at(E.after,x)}),S=0,n.font=d.string,at(t.footer,x),n.restore(),y+=m.width,{width:y,height:p}}function c5(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function d5(t,e,n,r){const{x:s,width:o}=r,i=n.caretSize+n.caretPadding;if(t==="left"&&s+o+i>e.width||t==="right"&&s-o-i<0)return!0}function u5(t,e,n,r){const{x:s,width:o}=n,{width:i,chartArea:{left:a,right:l}}=t;let c="center";return r==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=i-o/2&&(c="right"),d5(c,t,e,n)&&(c="center"),c}function hm(t,e,n){const r=n.yAlign||e.yAlign||c5(t,n);return{xAlign:n.xAlign||e.xAlign||u5(t,e,n,r),yAlign:r}}function f5(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function h5(t,e,n){let{y:r,height:s}=t;return e==="top"?r+=n:e==="bottom"?r-=s+n:r-=s/2,r}function gm(t,e,n,r){const{caretSize:s,caretPadding:o,cornerRadius:i}=t,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=cs(i);let m=f5(e,a);const p=h5(e,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,f)+s:a==="right"&&(m+=Math.max(u,g)+s),{x:Zt(m,0,r.width-e.width),y:Zt(p,0,r.height-e.height)}}function wa(t,e,n){const r=gn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function pm(t){return Vn([],Xn(t))}function g5(t,e,n){return ds(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function mm(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const bm={beforeTitle:Wn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Wn,beforeBody:Wn,beforeLabel:Wn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ct(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Wn,afterBody:Wn,beforeFooter:Wn,footer:Wn,afterFooter:Wn};function Qt(t,e,n,r){const s=t[e].call(n,r);return typeof s>"u"?bm[e].call(n,r):s}class hd extends Ar{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new w0(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=g5(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,s=Qt(r,"beforeTitle",this,e),o=Qt(r,"title",this,e),i=Qt(r,"afterTitle",this,e);let a=[];return a=Vn(a,Xn(s)),a=Vn(a,Xn(o)),a=Vn(a,Xn(i)),a}getBeforeBody(e,n){return pm(Qt(n.call Line truncated
`):t}function gT(t,e){const{element:n,datasetIndex:r,index:s}=e,o=t.getDatasetMeta(r).controller,{label:i,value:a}=o.getLabelAndValue(s);return{chart:t,label:i,parsed:o.getParsed(s),raw:t.data.datasets[r].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:r,element:n}}function mm(t,e){const n=t.chart.ctx,{body:r,footer:s,title:o}=t,{boxWidth:i,boxHeight:a}=e,l=Ut(e.bodyFont),c=Ut(e.titleFont),d=Ut(e.footerFont),u=o.length,f=s.length,g=r.length,m=pn(e.padding);let p=m.height,y=0,b=r.reduce((E,k)=>E+k.before.length+k.lines.length+k.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(p+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){const E=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=g*E+(b-g)*l.lineHeight+(b-1)*e.bodySpacing}f&&(p+=e.footerMarginTop+f*d.lineHeight+(f-1)*e.footerSpacing);let S=0;const x=function(E){y=Math.max(y,n.measureText(E).width+S)};return n.save(),n.font=c.string,at(t.title,x),n.font=l.string,at(t.beforeBody.concat(t.afterBody),x),S=e.displayColors?i+2+e.boxPadding:0,at(r,E=>{at(E.before,x),at(E.lines,x),at(E.after,x)}),S=0,n.font=d.string,at(t.footer,x),n.restore(),y+=m.width,{width:y,height:p}}function pT(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function mT(t,e,n,r){const{x:s,width:o}=r,i=n.caretSize+n.caretPadding;if(t==="left"&&s+o+i>e.width||t==="right"&&s-o-i<0)return!0}function bT(t,e,n,r){const{x:s,width:o}=n,{width:i,chartArea:{left:a,right:l}}=t;let c="center";return r==="center"?c=s<=(a+l)/2?"left":"right":s<=o/2?c="left":s>=i-o/2&&(c="right"),mT(c,t,e,n)&&(c="center"),c}function bm(t,e,n){const r=n.yAlign||e.yAlign||pT(t,n);return{xAlign:n.xAlign||e.xAlign||bT(t,e,n,r),yAlign:r}}function yT(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function vT(t,e,n){let{y:r,height:s}=t;return e==="top"?r+=n:e==="bottom"?r-=s+n:r-=s/2,r}function ym(t,e,n,r){const{caretSize:s,caretPadding:o,cornerRadius:i}=t,{xAlign:a,yAlign:l}=n,c=s+o,{topLeft:d,topRight:u,bottomLeft:f,bottomRight:g}=cs(i);let m=yT(e,a);const p=vT(e,l,c);return l==="center"?a==="left"?m+=c:a==="right"&&(m-=c):a==="left"?m-=Math.max(d,f)+s:a==="right"&&(m+=Math.max(u,g)+s),{x:Jt(m,0,r.width-e.width),y:Jt(p,0,r.height-e.height)}}function ka(t,e,n){const r=pn(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function vm(t){return Vn([],Kn(t))}function xT(t,e,n){return ds(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function xm(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const wm={beforeTitle:Gn,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:Gn,beforeBody:Gn,beforeLabel:Gn,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return lt(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Gn,afterBody:Gn,beforeFooter:Gn,footer:Gn,afterFooter:Gn};function Rt(t,e,n,r){const s=t[e].call(n,r);return typeof s>"u"?wm[e].call(n,r):s}class md extends Ar{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),s=r.enabled&&n.options.animation&&r.animations,o=new _0(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=xT(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,s=Rt(r,"beforeTitle",this,e),o=Rt(r,"title",this,e),i=Rt(r,"afterTitle",this,e);let a=[];return a=Vn(a,Kn(s)),a=Vn(a,Kn(o)),a=Vn(a,Kn(i)),a}getBeforeBody(e,n){return vm(Rt(n.call Line truncated
//# sourceMappingURL=components.iife.js.map
@@ -1 +1 @@
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tfoot.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Icon.tsx","../../src/components/basic/UnifiedIcon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/I.tsx","../../src/components/basic/IconTypes.ts","../../src/components/composite/Card.tsx","../../src/components/composite/ActionMenu.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/MultilingualInput.tsx","../../src/components/composite/Toggle.tsx","../../src/components/composite/StatusBadge.tsx","../../src/components/composite/Badge.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/DataGrid.tsx","../../src/components/composite/CardGrid.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/Dropdown.tsx","../../src/components/composite/ProductCard.tsx","../../src/components/composite/StatCard.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/FilterGroup.tsx","../../src/components/composite/TabNavigation.tsx","../../src/handlers/scrollToSectionHandler.ts","../../src/components/composite/TabNavigationScroll.tsx","../../src/components/composite/IconButton.tsx","../../src/components/composite/Dialog.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/AlertDialog.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/Breadcrumb.tsx","../../src/components/composite/EmptyState.tsx","../../src/components/composite/LoadingSpinner.tsx","../../src/components/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/SectionHeader.tsx","../../src/components/composite/TemplateCard.tsx","../../src/components/composite/Alert.tsx","../../src/components/composite/LayoutEditorHeader.tsx","../../src/components/composite/LayoutFileList.tsx","../../node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../node_modules/state-local/lib/es/state-local.js","../../node_modules/@monaco-editor/loader/lib/es/config/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../node_modules/@monaco-editor/loader/lib/es/loader/index.js","../../node_modules/@monaco-editor/react/dist/index.mjs","../../src/components/composite/CodeEditor.tsx","../../src/components/composite/VersionList.tsx","../../src/components/composite/LayoutHistoryPanel.tsx","../../src/components/composite/LoginForm.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/ColumnSelector.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageLoading.tsx","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.jsLine truncated
{"version":3,"file":"components.iife.js","sources":["../../src/components/basic/Button.tsx","../../src/components/basic/FileInput.tsx","../../src/components/basic/Input.tsx","../../src/components/basic/Textarea.tsx","../../src/components/basic/Label.tsx","../../src/components/basic/Div.tsx","../../src/components/basic/Span.tsx","../../src/components/basic/P.tsx","../../src/components/basic/Img.tsx","../../src/components/basic/H1.tsx","../../src/components/basic/H2.tsx","../../src/components/basic/H3.tsx","../../src/components/basic/H4.tsx","../../src/components/basic/Ul.tsx","../../src/components/basic/Ol.tsx","../../src/components/basic/Li.tsx","../../src/components/basic/A.tsx","../../src/components/basic/Form.tsx","../../src/components/basic/Svg.tsx","../../src/components/basic/Select.tsx","../../src/components/basic/Option.tsx","../../src/components/basic/Optgroup.tsx","../../src/components/basic/Checkbox.tsx","../../src/components/basic/Table.tsx","../../src/components/basic/Thead.tsx","../../src/components/basic/Tbody.tsx","../../src/components/basic/Tfoot.tsx","../../src/components/basic/Tr.tsx","../../src/components/basic/Th.tsx","../../src/components/basic/Td.tsx","../../src/components/basic/Nav.tsx","../../src/components/basic/Section.tsx","../../src/components/basic/Icon.tsx","../../src/components/basic/UnifiedIcon.tsx","../../src/components/basic/Code.tsx","../../src/components/basic/Pre.tsx","../../src/components/basic/Fragment.tsx","../../src/components/basic/Hr.tsx","../../src/components/basic/I.tsx","../../src/components/basic/IconTypes.ts","../../src/components/composite/Card.tsx","../../src/components/composite/ActionMenu.tsx","../../src/components/composite/Pagination.tsx","../../src/components/composite/MultilingualInput.tsx","../../src/components/composite/Toggle.tsx","../../src/components/composite/StatusBadge.tsx","../../src/components/composite/Badge.tsx","../../node_modules/dompurify/dist/purify.es.mjs","../../src/components/composite/HtmlContent.tsx","../../src/components/composite/DataGrid.tsx","../../src/components/composite/CardGrid.tsx","../../src/components/composite/Modal.tsx","../../src/components/composite/Dropdown.tsx","../../src/components/composite/ProductCard.tsx","../../src/components/composite/StatCard.tsx","../../src/components/composite/SearchBar.tsx","../../src/components/composite/FilterGroup.tsx","../../src/components/composite/TabNavigation.tsx","../../src/handlers/scrollToSectionHandler.ts","../../src/components/composite/TabNavigationScroll.tsx","../../src/components/composite/IconButton.tsx","../../src/components/composite/Dialog.tsx","../../src/components/composite/ConfirmDialog.tsx","../../src/components/composite/AlertDialog.tsx","../../src/components/composite/Toast.tsx","../../src/components/composite/Breadcrumb.tsx","../../src/components/composite/EmptyState.tsx","../../src/components/composite/LoadingSpinner.tsx","../../src/components/composite/AdminSidebar.tsx","../../src/components/composite/AdminHeader.tsx","../../src/components/composite/NotificationCenter.tsx","../../src/components/composite/UserProfile.tsx","../../src/components/composite/LanguageSelector.tsx","../../src/components/composite/AdminFooter.tsx","../../src/components/composite/PageHeader.tsx","../../src/components/composite/SectionHeader.tsx","../../src/components/composite/TemplateCard.tsx","../../src/components/composite/Alert.tsx","../../src/components/composite/LayoutEditorHeader.tsx","../../src/components/composite/LayoutFileList.tsx","../../node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js","../../node_modules/state-local/lib/es/state-local.js","../../node_modules/@monaco-editor/loader/lib/es/config/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/curry.js","../../node_modules/@monaco-editor/loader/lib/es/utils/isObject.js","../../node_modules/@monaco-editor/loader/lib/es/validators/index.js","../../node_modules/@monaco-editor/loader/lib/es/utils/compose.js","../../node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js","../../node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js","../../node_modules/@monaco-editor/loader/lib/es/loader/index.js","../../node_modules/@monaco-editor/react/dist/index.mjs","../../src/components/composite/CodeEditor.tsx","../../src/components/composite/VersionList.tsx","../../src/components/composite/LayoutHistoryPanel.tsx","../../src/components/composite/LoginForm.tsx","../../src/components/composite/ThemeToggle.tsx","../../src/components/composite/ColumnSelector.tsx","../../src/components/composite/PageTransitionIndicator.tsx","../../src/components/composite/PageLoading.tsx","../../node_modules/@babel/runtime/helpers/esm/typeof.js","../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../../node_modules/@babel/runtime/helpers/esm/objectSpread2.jsLine truncated
@@ -1,4 +1,3 @@
import { setLocaleHandler } from './setLocaleHandler';
import { setThemeHandler, initThemeHandler } from './setThemeHandler';
import { scrollToSectionHandler } from './scrollToSectionHandler';
import { initMenuFromUrlHandler } from './initMenuFromUrlHandler';
@@ -16,7 +15,6 @@ import { downloadAttachmentHandler } from './downloadAttachment';
* 새로운 핸들러 추가 시 여기에만 등록하면 자동으로 ActionDispatcher에 등록됩니다.
*/
export declare const handlerMap: {
readonly setLocale: typeof setLocaleHandler;
readonly setTheme: typeof setThemeHandler;
readonly initTheme: typeof initThemeHandler;
readonly scrollToSection: typeof scrollToSectionHandler;
@@ -1,16 +0,0 @@
/**
* setLocale 핸들러
*
* 사용자가 선택한 언어로 변경합니다.
* localStorage에 g7_locale 값을 저장하고 페이지를 새로고침합니다.
*/
/**
* 언어 변경 핸들러
*
* ActionDispatcher는 handler(action, context) 형태로 호출합니다.
* context 객체에는 { data, event, props, state, setState, navigate } 등이 포함됩니다.
*
* @param action 액션 정의
* @param context 액션 컨텍스트 (ActionContext 타입)
*/
export declare function setLocaleHandler(action: any, context?: any): Promise<void>;
@@ -1,6 +1,29 @@
{
"comment": "admin 목록/폼 상태 세트. with_data/empty_data/loading + edit_existing/validation_failed/saving.",
"groups": [
{
"comment": "베이스 레이아웃 _admin_base. 모바일 드로어(left_sidebar_area)는 _global.sidebarOpen 으로 열리고, 그 안의 언어/통화/배송국가 칩(admin_drawer_prefs)은 responsive.portable 게이트라 디바이스=모바일 + 드로어 열림 상태에서만 캔버스에 보인다. 편집기 캔버스는 정적 시뮬레이션이라 햄버거 클릭이 없으므로 sidebarOpen 을 상태로 주입해야 드로어 내부를 편집할 수 있다.",
"scope": {
"kind": "base",
"match": "_admin_base"
},
"items": [
{
"id": "default",
"label": "$t:editor.state.admin_base_default",
"default": true
},
{
"id": "sidebar_open",
"label": "$t:editor.state.sidebar_open",
"initialState": {
"global": {
"sidebarOpen": true
}
}
}
]
},
{
"scope": {
"kind": "route",
@@ -1408,6 +1408,8 @@
"param_field_b": "Second value path"
},
"state": {
"admin_base_default": "Default",
"sidebar_open": "Mobile menu open",
"with_data": "Has data",
"empty_data": "No data",
"edit_existing": "Edit existing",
@@ -1408,6 +1408,8 @@
"param_field_b": "두 번째 값 경로"
},
"state": {
"admin_base_default": "기본",
"sidebar_open": "모바일 메뉴 펼침",
"with_data": "데이터 있음",
"empty_data": "데이터 없음",
"edit_existing": "기존 수정",
@@ -241,6 +241,135 @@
}
]
},
{
"comment": "언어/통화/배송국가 선택 — 모바일 전용. 헤더 우측 그룹에서 이동(모바일 헤더가 420px 를 요구해 폰 뷰포트에서 통화 선택기가 화면 밖으로 잘렸다). 사용자 템플릿 _user_base 의 mobile_drawer_prefs 와 동일하게 셋 다 가로 나열 칩으로 통일. 통화/배송국가는 이커머스 모듈이 'header_currency' 슬롯에 주입하므로 SlotContainer 만 배치(모듈 비활성 시 자동 미렌더). 스크롤 영역(admin_sidebar_menu) 바깥 최상단에 둔다.",
"id": "admin_drawer_prefs",
"type": "basic",
"name": "Div",
"if": "{{false}}",
"responsive": {
"portable": {
"if": "{{true}}"
}
},
"props": {
"className": "px-4 py-3 border-b border-gray-200 dark:border-gray-700 space-y-3"
},
"children": [
{
"comment": "언어 선택 (여러 언어 지원 시) — 헤더 LanguageSelector 드롭다운에서 가로 칩으로 전환. 접기/펼치기: 접힘이 기본이고 트리거에 현재 언어를 요약 표기한다. 통화/배송국가(이커머스 주입 슬롯)와는 독립된 토글(_global.mobileLanguageOpen)이라 서로 영향 없음.",
"id": "admin_drawer_language",
"type": "basic",
"name": "Div",
"if": "{{$locales.length > 1}}",
"children": [
{
"comment": "트리거 — 좌측 '언어' 라벨, 우측 현재 언어명 + chevron. 접힘 상태에서도 현재 값을 알 수 있어야 하므로 요약을 항상 노출한다.",
"id": "admin_drawer_language_toggle",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "w-full flex items-center justify-between py-1 cursor-pointer",
"aria-expanded": "{{_global.mobileLanguageOpen ?? false}}"
},
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "global",
"mobileLanguageOpen": "{{!_global.mobileLanguageOpen}}"
}
}
],
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-medium text-gray-500 dark:text-gray-400 uppercase"
},
"text": "$t:admin.language"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300"
},
"children": [
{
"comment": "접힘 상태 요약 = 현재 언어명",
"type": "basic",
"name": "Span",
"props": { "className": "font-medium" },
"text": "{{_global.appConfig?.localeNames?.[$locale] ?? $locale}}"
},
{
"type": "basic",
"name": "Icon",
"props": {
"name": "chevron-down",
"className": "{{_global.mobileLanguageOpen ? 'rotate-180' : ''}} text-xs text-gray-400 dark:text-gray-500 transition-transform duration-200"
}
}
]
}
]
},
{
"comment": "펼침 영역 — max-h/opacity 트랜지션. overflow-hidden 이라 접힘 시 칩이 잘려 사라진다.",
"type": "basic",
"name": "Div",
"props": {
"className": "overflow-hidden transition-all duration-300 ease-in-out {{_global.mobileLanguageOpen ? 'max-h-screen opacity-100 mt-2' : 'max-h-0 opacity-0 mt-0'}}"
},
"children": [
{
"comment": "가로 나열 칩. iteration 은 반드시 Button 자신에 건다 — 엔진은 iteration 을 가진 노드를 항목 수만큼 복제하므로, flex 컨테이너에 걸면 컨테이너가 복제되어 칩이 세로로 쌓인다.",
"type": "basic",
"name": "Div",
"props": {
"className": "flex flex-wrap gap-2"
},
"children": [
{
"type": "basic",
"name": "Button",
"iteration": { "source": "{{$locales}}", "item_var": "loc" },
"props": {
"type": "button",
"className": "{{loc === $locale ? 'bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 border-blue-200 dark:border-blue-800' : 'text-gray-700 dark:text-gray-300 border-gray-200 dark:border-gray-600 hover:bg-gray-100 dark:hover:bg-gray-700'}} inline-flex items-center gap-1.5 px-3 py-1.5 text-sm border rounded-full cursor-pointer whitespace-nowrap",
"role": "option",
"aria-selected": "{{loc === $locale}}"
},
"actions": [
{ "type": "click", "handler": "setLocale", "target": "{{loc}}" }
],
"children": [
{ "type": "basic", "name": "Icon", "props": { "name": "globe", "size": "sm" } },
{ "type": "basic", "name": "Span", "text": "{{_global.appConfig?.localeNames?.[loc] ?? loc}}" }
]
}
]
}
]
}
]
},
{
"comment": "통화/배송국가 선택 — 이커머스 모듈 주입 슬롯. id 필수: SlotContainer 는 주입 컴포넌트 root id 를 {id}__{containerId} 로 스코프한다. className 은 block(헤더의 flex items-center 를 쓰면 주입 루트가 콘텐츠 폭으로 줄어든다). 주입 루트가 portable 에서 스스로 w-full 을 갖는다.",
"id": "admin_drawer_currency_wrap",
"type": "composite",
"name": "SlotContainer",
"props": {
"slotId": "header_currency",
"className": "block"
}
}
]
},
{
"id": "admin_sidebar_menu",
"type": "basic",
@@ -1117,27 +1246,6 @@
}
}
]
},
{
"comment": "언어 선택(모바일) — 데스크톱과 동일하게 헤더에 노출(유저 템플릿 모바일과 패리티). showCode 로 현재 로케일 코드 표시.",
"id": "language_selector_mobile",
"type": "composite",
"name": "LanguageSelector",
"props": {
"availableLocales": "{{_global.appConfig.supportedLocales ?? $locales}}",
"languageText": "$t:admin.language",
"showCode": true
}
},
{
"comment": "통화 선택(모바일) — 이커머스 모듈이 'header_currency' 슬롯에 주입. 데스크톱 SlotContainer 와 동일 슬롯 공유(언어와 같은 줄, 유저 모바일과 패리티). 모듈 비활성 시 빈 슬롯.",
"id": "header_currency_slot_mobile",
"type": "composite",
"name": "SlotContainer",
"props": {
"slotId": "header_currency",
"className": "flex items-center"
}
}
]
}
@@ -336,9 +336,7 @@
{
"type": "change",
"handler": "setLocale",
"params": {
"locale": "{{$event.target.value}}"
}
"target": "{{$event.target.value}}"
}
]
}
@@ -380,9 +380,7 @@
{
"type": "change",
"handler": "setLocale",
"params": {
"locale": "{{$event.target.value}}"
}
"target": "{{$event.target.value}}"
}
]
}
@@ -478,9 +478,7 @@
{
"type": "change",
"handler": "setLocale",
"params": {
"locale": "{{$event.target.value}}"
}
"target": "{{$event.target.value}}"
}
]
}
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "sirsoft-admin_basic",
"version": "1.0.1",
"version": "1.0.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "sirsoft-admin_basic",
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",
"dependencies": {
"@dnd-kit/core": "^6.3.1",
@@ -1,6 +1,6 @@
{
"name": "sirsoft-admin_basic",
"version": "1.0.1",
"version": "1.0.2",
"description": "Gnuboard7 Basic Admin Template Components",
"type": "module",
"main": "dist/components.js",
@@ -297,8 +297,9 @@ export const HtmlEditor: React.FC<HtmlEditorProps> = ({
}, [localMultilingualContent]);
// 다국어 탭 렌더링
// flex-wrap: 로케일이 3개 이상이면 md 미만 뷰포트에서 탭 행이 컨테이너를 넘친다.
const renderLocaleTabs = () => (
<Div className="flex items-center gap-2 mb-3">
<Div className="flex flex-wrap items-center gap-2 mb-3">
{supportedLocales.map(localeCode => {
const isDefault = localeCode === defaultLocale;
const isActive = currentLocale === localeCode;
@@ -485,7 +485,8 @@ export const MultilingualInput: React.FC<MultilingualInputProps> = ({
const renderTabsLayout = () => (
<Div className={className}>
{/* 언어 탭들 + 추가 버튼 (Pill Badge 스타일) */}
<Div className="flex items-center gap-2 mb-3">
{/* flex-wrap: 로케일이 3개 이상이면 md 미만 뷰포트에서 탭 행이 컨테이너를 넘친다. */}
<Div className="flex flex-wrap items-center gap-2 mb-3">
{activeLocales.map(localeCode => (
<Button
key={localeCode}
@@ -1,286 +0,0 @@
/**
* setLocaleHandler 테스트
*/
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { setLocaleHandler } from '../setLocaleHandler';
describe('setLocaleHandler', () => {
// localStorage mock
let localStorageMock: { [key: string]: string } = {};
let setItemSpy: ReturnType<typeof vi.spyOn>;
let reloadSpy: ReturnType<typeof vi.fn>;
beforeEach(() => {
// localStorage mock 설정
localStorageMock = {};
vi.spyOn(Storage.prototype, 'getItem').mockImplementation((key: string) => localStorageMock[key] || null);
setItemSpy = vi.spyOn(Storage.prototype, 'setItem').mockImplementation((key: string, value: string) => {
localStorageMock[key] = value;
});
vi.spyOn(Storage.prototype, 'removeItem').mockImplementation((key: string) => {
delete localStorageMock[key];
});
// window.location.reload mock
reloadSpy = vi.fn();
delete (window as any).location;
(window as any).location = { reload: reloadSpy };
// console 스파이 설정
vi.spyOn(console, 'warn').mockImplementation(() => {});
vi.spyOn(console, 'error').mockImplementation(() => {});
});
afterEach(() => {
vi.clearAllMocks();
});
describe('정상 동작', () => {
it('이벤트 데이터에서 locale 값을 추출하여 localStorage에 저장하고 페이지를 리로드해야 함 (ko)', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}',
};
const context = {
event: {
target: { value: 'ko' },
},
};
await setLocaleHandler(action, context);
expect(setItemSpy).toHaveBeenCalledWith('g7_locale', 'ko');
expect(localStorageMock['g7_locale']).toBe('ko');
expect(reloadSpy).toHaveBeenCalled();
});
it('이벤트 데이터에서 locale 값을 추출하여 localStorage에 저장하고 페이지를 리로드해야 함 (en)', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}',
};
const context = {
event: {
target: { value: 'en' },
},
};
await setLocaleHandler(action, context);
expect(setItemSpy).toHaveBeenCalledWith('g7_locale', 'en');
expect(localStorageMock['g7_locale']).toBe('en');
expect(reloadSpy).toHaveBeenCalled();
});
it('React Select 형태의 이벤트 데이터를 처리해야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}',
};
const context = {
event: {
value: 'ko', // React Select는 value를 직접 전달
},
};
await setLocaleHandler(action, context);
expect(setItemSpy).toHaveBeenCalledWith('g7_locale', 'ko');
expect(localStorageMock['g7_locale']).toBe('ko');
expect(reloadSpy).toHaveBeenCalled();
});
it('action.target에 직접 locale이 지정된 경우 처리해야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: 'ko', // 템플릿 문자열이 아닌 직접 값
};
await setLocaleHandler(action, undefined);
expect(setItemSpy).toHaveBeenCalledWith('g7_locale', 'ko');
expect(localStorageMock['g7_locale']).toBe('ko');
expect(reloadSpy).toHaveBeenCalled();
});
});
describe('예외 처리', () => {
it('지원하지 않는 locale은 경고를 출력하고 localStorage에 저장하지 않아야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}',
};
const context = {
event: {
target: { value: 'fr' }, // 지원하지 않는 언어
},
};
await setLocaleHandler(action, context);
expect(console.warn).toHaveBeenCalledWith('[Handler:SetLocale]', 'Unsupported locale:', 'fr');
expect(setItemSpy).not.toHaveBeenCalled();
expect(reloadSpy).not.toHaveBeenCalled();
});
it('locale 값이 없으면 경고를 출력하고 localStorage에 저장하지 않아야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}',
};
const context = {
event: {
target: { value: undefined },
},
};
await setLocaleHandler(action, context);
expect(console.warn).toHaveBeenCalledWith('[Handler:SetLocale]', 'Invalid locale:', undefined);
expect(setItemSpy).not.toHaveBeenCalled();
expect(reloadSpy).not.toHaveBeenCalled();
});
it('템플릿 문자열이 그대로 전달되면 경고를 출력하고 localStorage에 저장하지 않아야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}', // 템플릿 문자열 그대로
};
// 이벤트 데이터 없음
await setLocaleHandler(action, undefined);
expect(console.warn).toHaveBeenCalledWith('[Handler:SetLocale]', 'Invalid locale:', undefined);
expect(setItemSpy).not.toHaveBeenCalled();
expect(reloadSpy).not.toHaveBeenCalled();
});
it('locale 값이 문자열이 아니면 경고를 출력하고 localStorage에 저장하지 않아야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}',
};
const context = {
event: {
target: { value: 123 }, // 숫자
},
};
await setLocaleHandler(action, context);
expect(console.warn).toHaveBeenCalledWith('[Handler:SetLocale]', 'Invalid locale:', 123);
expect(setItemSpy).not.toHaveBeenCalled();
expect(reloadSpy).not.toHaveBeenCalled();
});
it('빈 문자열은 경고를 출력하고 localStorage에 저장하지 않아야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}',
};
const context = {
event: {
target: { value: '' },
},
};
await setLocaleHandler(action, context);
expect(console.warn).toHaveBeenCalledWith('[Handler:SetLocale]', 'Invalid locale:', '');
expect(setItemSpy).not.toHaveBeenCalled();
expect(reloadSpy).not.toHaveBeenCalled();
});
it('localStorage 저장 실패 시 오류를 출력하고 리로드하지 않아야 함', async () => {
// localStorage.setItem이 실패하도록 모의
const setItemError = new Error('Storage quota exceeded');
vi.spyOn(Storage.prototype, 'setItem').mockImplementation(() => {
throw setItemError;
});
const action = {
type: 'change',
handler: 'setLocale',
target: '{{event.target.value}}',
};
const context = {
event: {
target: { value: 'ko' },
},
};
await setLocaleHandler(action, context);
expect(console.error).toHaveBeenCalledWith(
'[Handler:SetLocale]',
'Failed to save locale to localStorage:',
setItemError
);
expect(window.location.reload).not.toHaveBeenCalled();
});
});
describe('다양한 이벤트 데이터 형식', () => {
it('context.event.target.value가 우선순위가 가장 높아야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: 'en', // 직접 값 지정
};
const context = {
event: {
target: { value: 'ko' }, // 이벤트 데이터 우선
value: 'en', // React Select 형식도 있음
},
};
await setLocaleHandler(action, context);
// context.event.target.value가 우선되어야 함
expect(setItemSpy).toHaveBeenCalledWith('g7_locale', 'ko');
expect(localStorageMock['g7_locale']).toBe('ko');
expect(reloadSpy).toHaveBeenCalled();
});
it('context.event.value가 두 번째 우선순위를 가져야 함', async () => {
const action = {
type: 'change',
handler: 'setLocale',
target: 'en', // 직접 값 지정
};
const context = {
event: {
value: 'ko', // React Select 형식
},
};
await setLocaleHandler(action, context);
// context.event.value가 action.target보다 우선되어야 함
expect(setItemSpy).toHaveBeenCalledWith('g7_locale', 'ko');
expect(localStorageMock['g7_locale']).toBe('ko');
expect(reloadSpy).toHaveBeenCalled();
});
});
});
@@ -4,7 +4,8 @@
* 템플릿에서 사용하는 모든 커스텀 핸들러를 정의합니다.
*/
import { setLocaleHandler } from './setLocaleHandler';
// 언어 관련 핸들러는 엔진 레벨(ActionDispatcher)에서 처리
// setLocale 핸들러는 ActionDispatcher에 빌트인으로 등록되어 있음
import { setThemeHandler, initThemeHandler } from './setThemeHandler';
import { scrollToSectionHandler } from './scrollToSectionHandler';
import { initMenuFromUrlHandler } from './initMenuFromUrlHandler';
@@ -33,7 +34,7 @@ import { downloadAttachmentHandler } from './downloadAttachment';
* 새로운 핸들러 추가 시 여기에만 등록하면 자동으로 ActionDispatcher에 등록됩니다.
*/
export const handlerMap = {
setLocale: setLocaleHandler,
// 언어: setLocale은 엔진 레벨(ActionDispatcher)에서 빌트인으로 처리
setTheme: setThemeHandler,
initTheme: initThemeHandler,
scrollToSection: scrollToSectionHandler,
@@ -1,70 +0,0 @@
/**
* setLocale 핸들러
*
* 사용자가 선택한 언어로 변경합니다.
* localStorage에 g7_locale 값을 저장하고 페이지를 새로고침합니다.
*/
// Logger 설정 (G7Core 초기화 전에도 동작하도록 폴백 포함)
const logger = ((window as any).G7Core?.createLogger?.('Handler:SetLocale')) ?? {
log: (...args: unknown[]) => console.log('[Handler:SetLocale]', ...args),
warn: (...args: unknown[]) => console.warn('[Handler:SetLocale]', ...args),
error: (...args: unknown[]) => console.error('[Handler:SetLocale]', ...args),
};
/**
* 언어 변경 핸들러
*
* ActionDispatcher는 handler(action, context) 형태로 호출합니다.
* context 객체에는 { data, event, props, state, setState, navigate } 등이 포함됩니다.
*
* @param action 액션 정의
* @param context 액션 컨텍스트 (ActionContext 타입)
*/
export async function setLocaleHandler(
action: any,
context?: any
): Promise<void> {
// 1. 이벤트 데이터에서 locale 값 추출
let locale: string | undefined;
const eventData = context?.event;
if (eventData?.target?.value !== undefined && eventData.target.value !== null) {
// HTML Select onChange 이벤트
locale = eventData.target.value;
} else if (eventData?.value !== undefined && eventData.value !== null) {
// React Select 등 커스텀 이벤트 대응
locale = eventData.value;
} else if (action?.target && typeof action.target === 'string' && !action.target.includes('{{')) {
// action.target이 템플릿 문자열이 아닌 경우에만 사용
locale = action.target;
}
// 2. 유효성 검증
if (!locale || typeof locale !== 'string') {
logger.warn('Invalid locale:', locale);
return;
}
// 유효한 로케일 확인 — 활성 언어팩(supported_locales)을 우선, 미초기화 시 ko/en 폴백
const G7Core = (window as any).G7Core;
const validLocales: string[] = G7Core?.config?.('app.supported_locales')
?? G7Core?.state?.get?.('_global.appConfig.supportedLocales')
?? ['ko', 'en'];
if (!validLocales.includes(locale)) {
logger.warn('Unsupported locale:', locale);
return;
}
// 3. localStorage에 저장
try {
localStorage.setItem('g7_locale', locale);
} catch (error) {
logger.error('Failed to save locale to localStorage:', error);
return;
}
// 4. 페이지 새로고침
window.location.reload();
}
@@ -363,6 +363,10 @@
@@ -1328,8 +1332,13 @@
}
/* Pagination */
/*
* flex-wrap: 페이지 수가 많으면 한 줄에 들어가지 않아 좁은 뷰포트에서 콘텐츠 영역을 넘친다
* (주문상세·상품수정의 활동로그 페이지네이션에서 재현). 공통 컴포넌트이므로 여기 한 줄로
* 두 지점이 동시에 해소된다 — 개별 모듈 레이아웃을 고치지 말 것.
*/
.pagination {
@apply flex items-center gap-2;
@apply flex flex-wrap items-center justify-center gap-2;
}
.pagination-btn {
@apply px-3 py-1 text-sm border rounded;
@@ -1524,8 +1533,16 @@
.modal-backdrop {
@apply absolute inset-0 bg-black/50;
}
/*
* max-w-[calc(100vw-2rem)]: 좁은 뷰포트에서 모달이 화면 좌우에 붙지 않도록 16px 여백을 남긴다.
* 인라인 width(기본 500px)는 .modal-wrapper 의 flex 정렬이 이미 문서폭으로 clamp 하므로
* 폭이 넘치지는 않지만, 여백이 0 이 되어 화면에 꽉 찬다.
*
* 주의: `.max-w-full`(max-width:100%)은 이 규칙과 명시도가 같고(0,1,0) 빌드 CSS 에서 더 뒤에
* 정의되므로 승리한다. 레이아웃 className 에 `max-w-full` 을 함께 주면 이 clamp 가 무효화된다.
*/
.modal-container {
@apply relative bg-white rounded-lg shadow-xl max-h-[90vh] overflow-hidden;
@apply relative bg-white rounded-lg shadow-xl max-h-[90vh] overflow-hidden max-w-[calc(100vw-2rem)];
@apply dark:bg-gray-800;
}
.modal-header-row {
@@ -5,7 +5,7 @@
"ko": "Admin Basic",
"en": "Admin Basic"
},
"version": "1.0.1",
"version": "1.0.2",
"license": "MIT",
"description": {
"ko": "그누보드7 기본 관리자 템플릿",
@@ -12,12 +12,17 @@ import { issueToken, authenticatePage } from '../../../../../../tests/Playwright
type AdminTemplateAuthFixtures = {
/** 레이아웃 편집/조회 권한 보유 토큰 */
layoutEditToken: string;
/** 관리자 대시보드 진입 권한 보유 토큰 (모바일 뷰포트 검증용) */
adminDashboardToken: string;
};
export const test = base.extend<AdminTemplateAuthFixtures>({
layoutEditToken: async ({}, use) => {
await use(issueToken('core.templates.layouts.edit', 'core.templates.read'));
},
adminDashboardToken: async ({}, use) => {
await use(issueToken('core.dashboard.read'));
},
});
export { issueToken, authenticatePage };
@@ -0,0 +1,323 @@
/**
* sirsoft-admin_basic — 모바일 뷰포트 가로 오버플로 회귀
*
* 배경: 모바일 헤더 우측 그룹은 `flex-shrink-0` 이라 좁아져도 폭을 유지한 채 화면 밖으로
* 밀려난다. theme(36) + noti(36) + lang(79) + 통화(112) + gap 합계가 **420px** 를 요구해
* 390px 에서 30px, 320px 에서 100px 이 잘렸다. 언어/통화/배송국가를 모바일 드로어의
* 가로 칩으로 옮겨 해소했다.
*
* 이후 드로어가 세로로 길어져 관리자 메뉴가 스크롤 밖으로 밀리는 문제가 생겨,
* 언어 / 통화·배송국가를 각각 독립 아코디언(기본 접힘 + 트리거에 현재값 요약)으로 바꿨다.
*
* 측정 규율 (이 spec 을 고칠 사람에게):
* - `document.scrollWidth - clientWidth`(docOver)는 **항상 0** 이다. `.admin_layout_root` 가
* `overflow-hidden` 이라 초과분이 문서 스크롤폭에 기여하지 않기 때문. 이걸 단언하면
* 회귀를 영원히 못 잡는다.
* - 절대 폭 하한(`toBeGreaterThanOrEqual(80)`)도 회귀를 못 잡는다. **클립 0 을 직접 단언**한다.
* - 대신 두 지표를 쓴다: ① 요소 우측 끝이 뷰포트를 넘는가(clip)
* ② `#right_content_area` 의 `scrollWidth - clientWidth`(rcaExcess)
*
* @scenario admin_viewport=390|320|1023|1024|1280 x surface=header|drawer|content
* @effects mobile_header_no_clip, drawer_prefs_chips_on_screen, content_area_no_overflow,
* portable_desktop_boundary_flips_at_1024, desktop_header_currency_dropdown_preserved,
* drawer_prefs_collapsed_by_default, drawer_prefs_accordions_independent
*/
import { test, expect, authenticatePage } from '../../fixtures/admin-template-auth';
import type { Page } from '@playwright/test';
/** 세로 스크롤바(≈15px) 때문에 clientWidth 를 원하는 값으로 맞추려면 창을 그만큼 넓게 잡는다. */
const SCROLLBAR = 15;
const phone = { width: 390 + SCROLLBAR, height: 844 };
const smallPhone = { width: 320 + SCROLLBAR, height: 568 };
/**
* `portable` 경계 양쪽. 엔진 `ResponsiveManager` 는 `portable = 0~1023px` 을
* `window.innerWidth` 로 판정하므로 스크롤바 보정 없이 창 폭을 그대로 쓴다.
* 1023 = portable 마지막 픽셀(드로어 렌더), 1024 = desktop 첫 픽셀(헤더 렌더).
*/
const portableEdge = { width: 1023, height: 800 };
const desktopEdge = { width: 1024, height: 800 };
const desktop = { width: 1280, height: 900 };
/** 요소의 우측 끝이 뷰포트를 넘는 픽셀 수 (넘지 않으면 0). */
async function clipOf(page: Page, selector: string): Promise<number> {
return page.evaluate((sel) => {
const el = document.querySelector(sel);
if (!el) return -1;
const vw = document.documentElement.clientWidth;
return Math.max(0, Math.round(el.getBoundingClientRect().right - vw));
}, selector);
}
/** #right_content_area 의 가로 초과분. */
async function rcaExcess(page: Page): Promise<number> {
return page.evaluate(() => {
const rca = document.getElementById('right_content_area');
return rca ? rca.scrollWidth - rca.clientWidth : -1;
});
}
/** settle 곡선 확인 — 지연 로딩(활동로그 페이지네이션 등) 때문에 첫 측정은 위음성이 난다. */
async function settledRcaExcess(page: Page, samples = 3): Promise<number> {
let last = -1;
for (let i = 0; i < samples; i += 1) {
await page.waitForTimeout(1200);
last = await rcaExcess(page);
}
return last;
}
async function openDrawer(page: Page): Promise<void> {
await page.locator('#mobile_menu_toggle').click();
// 드로어는 `transform: translateX(-256px) → 0` 을 0.3s 에 걸쳐 이동한다. 이 트랜지션이 끝나기
// 전에 좌표를 읽으면 칩이 화면 밖(음수 x)에 있어 위양성이 난다.
//
// `getAnimations()` 로 기다리면 안 된다 — 클릭 직후에는 트랜지션이 아직 시작되지 않아
// 빈 배열을 반환하고, waitForFunction 이 즉시 통과해 애니메이션 도중에 측정하게 된다.
// 최종 기하(left === 0)가 안정될 때까지 기다린다.
await page.waitForFunction(() => {
const d = document.getElementById('left_sidebar_area');
if (!d) return false;
return Math.round(d.getBoundingClientRect().left) === 0;
}, undefined, { timeout: 5_000 });
}
test.describe('@sirsoft-admin_basic 모바일 뷰포트 가로 오버플로', () => {
test('390px: 모바일 헤더가 잘리지 않고 통화·언어는 헤더에 없다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(phone);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/dashboard');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await page.locator('#mobile_header_right').waitFor({ timeout: 20_000 });
// 회귀 시 정확히 30 이 되어 실패한다.
expect(await clipOf(page, '#mobile_header_right')).toBe(0);
// 헤더에는 테마·알림만 남는다.
const headerIds = await page.evaluate(() =>
[...(document.getElementById('mobile_header_right')?.children ?? [])].map((c) => c.id),
);
expect(headerIds).toContain('theme_toggle_mobile');
expect(headerIds).toContain('notification_center_mobile');
expect(headerIds).not.toContain('language_selector_mobile');
expect(headerIds).not.toContain('header_currency_slot_mobile');
});
test('320px: 헤더 클립 0 + 햄버거 탭 가능 (최소 폰)', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(smallPhone);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/dashboard');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await page.locator('#mobile_header_right').waitFor({ timeout: 20_000 });
// 회귀 시 100 이 된다.
expect(await clipOf(page, '#mobile_header_right')).toBe(0);
// 햄버거가 화면 안이고 실제 히트 타깃이어야 한다(다른 요소가 덮으면 실패).
const burgerTappable = await page.evaluate(() => {
const b = document.getElementById('mobile_menu_toggle');
if (!b) return false;
const r = b.getBoundingClientRect();
if (r.left < 0 || r.right > document.documentElement.clientWidth) return false;
const hit = document.elementFromPoint(r.left + r.width / 2, r.top + r.height / 2);
return !!hit && (b.contains(hit) || hit.contains(b));
});
expect(burgerTappable).toBe(true);
});
/**
* 드로어 선호설정은 언어 / 통화·배송국가 두 개의 독립 아코디언이며 기본은 접힘이다.
* 접힘 상태에서는 트리거에 현재 선택값만 요약 표기되고, 펼쳐야 칩이 렌더된다.
* (전부 펼쳐 두면 드로어가 세로로 길어져 정작 관리자 메뉴가 스크롤 밖으로 밀린다.)
*/
test('390px: 드로어 선호설정은 기본 접힘이고 트리거에 현재값을 요약 표기한다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(phone);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/dashboard');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await openDrawer(page);
const prefs = page.locator('#admin_drawer_prefs');
await expect(prefs).toBeVisible();
// 언어: 접힘 → aria-expanded=false.
const langToggle = page.locator('#admin_drawer_language_toggle');
await expect(langToggle).toHaveAttribute('aria-expanded', 'false');
// 접힘 상태 요약 = 현재 언어명. E2E 세션 로케일이 ko/en 중 무엇이든 성립해야 하므로
// 특정 문자열('한국어')을 박지 않고, aria-selected 인 칩의 이름과 일치하는지로 본다.
const summaryMatchesSelectedChip = await page.evaluate(() => {
const toggle = document.querySelector('#admin_drawer_language_toggle');
const selected = document.querySelector('#admin_drawer_language [role="option"][aria-selected="true"]');
if (!toggle || !selected) return null;
const chipName = (selected.textContent ?? '').trim();
// 트리거 텍스트 = "<라벨><현재 언어명>" (칩 목록은 별도 래퍼라 포함되지 않는다)
return { toggleText: (toggle.textContent ?? '').trim(), chipName };
});
expect(summaryMatchesSelectedChip).not.toBeNull();
expect(summaryMatchesSelectedChip!.chipName.length).toBeGreaterThan(0);
expect(summaryMatchesSelectedChip!.toggleText).toContain(summaryMatchesSelectedChip!.chipName);
// 칩은 `max-h-0 overflow-hidden` 래퍼에 잘려 화면에 안 보인다.
// 칩 자신은 레이아웃 박스를 갖고 있어(=Playwright 기준 visible) 칩에 not.toBeVisible()
// 을 걸면 안 된다. 잘림을 만드는 **래퍼의 실제 높이 0** 을 단언한다.
const langBodyHeight = await page.evaluate(() => {
const body = document
.querySelector('#admin_drawer_language_toggle')
?.parentElement?.querySelector('.overflow-hidden');
return body ? Math.round(body.getBoundingClientRect().height) : -1;
});
expect(langBodyHeight).toBe(0);
// 통화/배송국가(이커머스 주입): 접힘 → 패널 자체가 언마운트.
// 모듈 비활성 환경에서는 슬롯이 비므로 존재할 때만 검증한다.
const curTrigger = prefs.locator('button[aria-haspopup="listbox"]');
if (await curTrigger.count()) {
await expect(curTrigger).toHaveAttribute('aria-expanded', 'false');
await expect(prefs.locator('[role="listbox"]')).toHaveCount(0);
}
});
test('390px: 아코디언을 펼치면 언어·통화·배송국가 칩이 모두 화면 안에 있다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(phone);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/dashboard');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await openDrawer(page);
// 언어 펼치기 (엔진 빌트인 setLocale 을 action.target 으로 호출하는 칩 3개)
await page.locator('#admin_drawer_language_toggle').click();
await expect(page.locator('#admin_drawer_language_toggle')).toHaveAttribute('aria-expanded', 'true');
await expect(page.locator('#admin_drawer_language [role="option"]')).toHaveCount(3);
// 칩 자신은 접힘 상태에서도 레이아웃 박스를 가지므로, 잘림 래퍼가 실제로 열렸는지를 본다.
await expect
.poll(async () =>
page.evaluate(() => {
const body = document
.querySelector('#admin_drawer_language_toggle')
?.parentElement?.querySelector('.overflow-hidden');
return body ? Math.round(body.getBoundingClientRect().height) : -1;
}),
)
.toBeGreaterThan(0);
// 통화/배송국가 펼치기 (모듈 비활성 환경에서는 트리거 자체가 없다)
const prefs = page.locator('#admin_drawer_prefs');
const curTrigger = prefs.locator('button[aria-haspopup="listbox"]');
if (await curTrigger.count()) {
await curTrigger.click();
await expect(prefs.locator('[role="listbox"]')).toHaveCount(1);
}
const chips = prefs.locator('[role="option"]');
expect(await chips.count()).toBeGreaterThanOrEqual(3);
// 칩이 한 개라도 뷰포트를 넘으면 실패.
const anyChipClipped = await page.evaluate(() => {
const vw = document.documentElement.clientWidth;
return [...document.querySelectorAll('#admin_drawer_prefs [role="option"]')].some((el) => {
const r = el.getBoundingClientRect();
return r.width > 0 && (r.right > vw + 1 || r.left < -1);
});
});
expect(anyChipClipped).toBe(false);
});
/**
* 두 아코디언은 서로 다른 상태를 쓴다(언어=_global.mobileLanguageOpen,
* 통화=_local.showCurrencyDropdown). 하나를 닫아도 다른 하나는 열린 채여야 한다.
*/
test('390px: 언어와 통화 아코디언은 독립적으로 개폐된다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(phone);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/dashboard');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await openDrawer(page);
const prefs = page.locator('#admin_drawer_prefs');
const langToggle = page.locator('#admin_drawer_language_toggle');
const curTrigger = prefs.locator('button[aria-haspopup="listbox"]');
test.skip(!(await curTrigger.count()), '이커머스 모듈 비활성 — 통화 슬롯 없음');
await langToggle.click();
await curTrigger.click();
await expect(langToggle).toHaveAttribute('aria-expanded', 'true');
await expect(curTrigger).toHaveAttribute('aria-expanded', 'true');
// 언어만 닫는다 → 통화는 열린 채 유지 (독립성)
await langToggle.click();
await expect(langToggle).toHaveAttribute('aria-expanded', 'false');
await expect(curTrigger).toHaveAttribute('aria-expanded', 'true');
await expect(prefs.locator('[role="listbox"]')).toHaveCount(1);
// 드로어 안 인라인 아코디언이므로 배경 오버레이(fixed inset-0)는 렌더되지 않는다.
// 렌더되면 드로어 전체 클릭을 가로챈다.
const backdrops = await page.evaluate(
() => document.querySelectorAll('#admin_drawer_prefs .fixed.inset-0').length,
);
expect(backdrops).toBe(0);
});
test('390px: 이커머스 환경설정 콘텐츠 영역이 넘치지 않는다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(phone);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/ecommerce/settings');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await page.locator('#right_content_area').waitFor({ timeout: 20_000 });
// 회귀 시 71 이 된다(이메일 행 nowrap + sticky-tab-nav 과다 bleed).
expect(await settledRcaExcess(page)).toBe(0);
});
test('320px: 이커머스 환경설정 고정폭 입력이 넘치지 않는다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(smallPhone);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/ecommerce/settings');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await page.locator('#right_content_area').waitFor({ timeout: 20_000 });
// 회귀 시 32 가 된다(w-80 고정폭 입력 2개).
expect(await settledRcaExcess(page)).toBe(0);
});
test('1023px: portable 마지막 픽셀 — 드로어 선호설정이 렌더된다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(portableEdge);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/dashboard');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await page.locator('#right_content_area').waitFor({ timeout: 20_000 });
// 경계가 1px 밀리면(예: `<` → `<=` 오타) 여기서 잡힌다.
await expect(page.locator('#admin_drawer_prefs')).toHaveCount(1);
expect(await settledRcaExcess(page)).toBe(0);
});
test('1024px: desktop 첫 픽셀 — 드로어 선호설정이 사라지고 헤더 통화가 렌더된다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(desktopEdge);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/dashboard');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await page.locator('#right_content_area').waitFor({ timeout: 20_000 });
// 데스크톱에서 드로어 통화가 중복 노출되면 회귀다.
await expect(page.locator('#admin_drawer_prefs')).toHaveCount(0);
await expect(page.locator('#header_currency_slot_desktop')).toHaveCount(1);
expect(await settledRcaExcess(page)).toBe(0);
});
test('1280px: 데스크톱 헤더/통화 드롭다운이 회귀하지 않는다', async ({ page, adminDashboardToken }) => {
await page.setViewportSize(desktop);
await authenticatePage(page, adminDashboardToken);
await page.goto('/admin/dashboard');
await page.waitForLoadState('domcontentloaded', { timeout: 30_000 });
await page.locator('#right_content_area').waitFor({ timeout: 20_000 });
// 드로어 선호설정 블록은 데스크톱에서 렌더되지 않아야 한다(중복 노출 = 회귀).
await expect(page.locator('#admin_drawer_prefs')).toHaveCount(0);
// 통화는 데스크톱 헤더 슬롯에 남는다.
const desktopSlot = page.locator('#header_currency_slot_desktop');
await expect(desktopSlot).toHaveCount(1);
expect(await settledRcaExcess(page)).toBe(0);
});
});
@@ -17,6 +17,7 @@
- 휴대폰 화면에서 헤더가 가로로 넘쳐 사이트명이 잘리고 메뉴 버튼이 화면 밖으로 밀려나던 문제를 수정했습니다. 언어·통화 선택은 메뉴(햄버거) 안으로 옮겼습니다.
- 좁은 화면(320px)에서 메뉴 버튼을 누를 수 없어 사이트 이동 자체가 불가능하던 문제를 수정했습니다.
- 메뉴 안의 언어·통화·배송국가 선택이 세로로 길게 늘어지지 않고 가로로 나란히 배치됩니다.
- 메뉴 안의 언어와 통화·배송국가가 각각 접었다 펼치는 항목으로 바뀌어, 메뉴를 열었을 때 곧바로 사이트 메뉴가 보입니다. 접혀 있을 때도 현재 선택된 언어와 통화·배송국가가 표시되므로 펼치지 않아도 확인할 수 있으며, 두 항목은 서로 독립적으로 여닫힙니다.
- 언어 선택이 로그인하지 않은 방문자에게도 보입니다. 이전에는 메뉴 안에서 로그인한 사용자만 언어를 바꿀 수 있었습니다.
- 게시판 이름이 길면 게시글 위쪽의 목록·이전글·다음글 버튼이 찌그러지거나 보이지 않던 문제를 수정했습니다. 이제 게시판 이름이 윗줄에 표시되고 버튼은 아랫줄에 원래 크기로 놓입니다.
@@ -13,7 +13,9 @@
* - 언어·통화는 헤더 우측 그룹이 아니라 모바일 드로어 최상단(mobile_drawer_prefs)에 있다.
* 데스크톱(Header.tsx)은 기존 헤더 배치를 유지한다. 사유는 아래 해당 it 블록 주석 참조.
* - 드로어는 overflow-y-auto 라 absolute 드롭다운이 잘린다 → 주입 조각이 responsive.portable
* 오버라이드로 모바일에서만 펼친 목록이 된다(트리거 숨김 + 패널 static).
* 오버라이드로 모바일에서만 static 인라인 목록이 된다.
* - 언어 / 통화·배송국가는 각각 독립 아코디언이며 기본 접힘이다. 접힘 상태에서도 트리거에
* 현재 선택값(언어명 / 통화·배송국가)을 요약 표기한다.
*
* 회귀 차단:
* - _user_base.json: defaultCurrency/preferredCurrency(_global)/availableCurrencies 주입 + X-Currency 헤더.
@@ -67,6 +69,35 @@ function findNode(node: any, id: string): any {
return null;
}
/**
* 레이아웃 트리에서 술어를 만족하는 첫 노드를 찾습니다.
*
* 위치 인덱스(children[1] 등) 대신 구조로 찾기 위한 헬퍼 — 노드가 앞에 추가되어도
* 테스트가 깨지지 않습니다.
*
* @param node 탐색 시작 노드/배열
* @param pred 노드 술어
* @return 찾은 노드 (없으면 null)
*/
function walkNode(node: any, pred: (n: any) => boolean): any {
if (!node || typeof node !== 'object') return null;
if (Array.isArray(node)) {
for (const n of node) {
const r = walkNode(n, pred);
if (r) return r;
}
return null;
}
if (pred(node)) return node;
for (const k of ['children', 'components']) {
if (node[k]) {
const r = walkNode(node[k], pred);
if (r) return r;
}
}
return null;
}
describe('A1 — _user_base.json 통화 주입', () => {
const userBase = loadJson('layouts/_user_base.json');
const initActions = userBase.init_actions ?? [];
@@ -221,10 +252,15 @@ describe('헤더 통화 슬롯(이커머스 주입) + 언어 버튼(코어 내
);
expect(langSection).toBeTruthy();
// [0] = 라벨, [1] = 칩 컨테이너
const chipRow = langSection.children[1];
// 칩 컨테이너는 아코디언 펼침 영역 안에 있다. 위치 인덱스가 아니라 구조로 찾는다
// (트리거 행이 앞에 추가되어도 깨지지 않도록).
const chipRow = walkNode(langSection, (n: any) =>
n.name === 'Div' &&
typeof n.props?.className === 'string' &&
n.props.className.includes('flex-wrap')
);
expect(chipRow).toBeTruthy();
expect(chipRow.props.className).toContain('flex');
expect(chipRow.props.className).toContain('flex-wrap');
expect(chipRow.iteration).toBeUndefined();
const button = chipRow.children[0];
@@ -235,6 +271,53 @@ describe('헤더 통화 슬롯(이커머스 주입) + 언어 버튼(코어 내
expect(button.props.className).toContain('whitespace-nowrap');
});
/**
* 접기/펼치기 — 언어·통화·배송국가를 전부 펼쳐 두면 드로어가 세로로 길어져 정작 메뉴가
* 스크롤 밖으로 밀린다. 언어와 통화/배송국가를 각각 독립 아코디언으로 접고, 접힘
* 상태에서도 현재 선택값을 요약 표기한다(무엇이 선택돼 있는지 펼치지 않고 알 수 있어야 함).
*
* 언어 = 템플릿 소유(_global.mobileLanguageOpen),
* 통화/배송국가 = 이커머스 주입 조각 소유(_local.showCurrencyDropdown) → 서로 독립.
*/
it('드로어 언어 섹션은 기본 접힘 + 트리거에 현재 언어를 요약 표기한다', () => {
const userBase = loadJson('layouts/_user_base.json');
const langSection = findNode(userBase.components, 'mobile_drawer_language');
expect(langSection).toBeTruthy();
const toggle = findNode(langSection, 'mobile_drawer_language_toggle');
expect(toggle?.name).toBe('Button');
expect(toggle.props['aria-expanded']).toBe('{{_global.mobileLanguageOpen ?? false}}');
// 토글은 언어 전용 플래그를 뒤집는다
const act = toggle.actions[0];
expect(act.handler).toBe('setState');
expect(act.params.target).toBe('global');
expect(act.params.mobileLanguageOpen).toBe('{{!_global.mobileLanguageOpen}}');
// 접힘 상태 요약 = 현재 언어명 + chevron
const summary = JSON.stringify(toggle.children);
expect(summary).toContain('localeNames?.[$locale]');
expect(summary).toContain('chevron-down');
expect(summary).toContain("{{_global.mobileLanguageOpen ? 'rotate-180' : ''}}");
// 펼침 영역: falsy(기본) 분기가 닫힘(max-h-0)이어야 기본 접힘이 성립한다
const body = walkNode(langSection, (n: any) =>
typeof n.props?.className === 'string' &&
n.props.className.includes('overflow-hidden') &&
n.props.className.includes('mobileLanguageOpen')
);
expect(body).toBeTruthy();
expect(body.props.className).toContain("'max-h-screen opacity-100 mt-2' : 'max-h-0 opacity-0 mt-0'");
});
it('언어 토글은 통화 플래그를 건드리지 않는다 (독립 개폐)', () => {
const userBase = loadJson('layouts/_user_base.json');
const toggle = findNode(userBase.components, 'mobile_drawer_language_toggle');
expect(toggle).toBeTruthy();
// 언어 = _global.mobileLanguageOpen / 통화 = _local.showCurrencyDropdown (모듈 조각 소유)
expect(JSON.stringify(toggle)).not.toContain('showCurrencyDropdown');
});
it('드로어 언어/통화 섹션은 비회원에게도 노출된다 (아코디언 currentUser 게이트 바깥)', () => {
const userBase = loadJson('layouts/_user_base.json');
const drawer = findNode(userBase.components, 'mobile_nav_drawer');
@@ -313,15 +396,29 @@ describe('이커머스 헤더 통화 주입 확장 (slot=header_currency)', () =
* 모바일 드로어는 overflow-y-auto + w-80 이라 absolute 드롭다운 패널이 스크롤 경계에서 잘린다.
* SlotContainer 는 주입 자식에게 variant/context prop 을 전달하지 않으므로 컨테이너별로
* 다르게 그릴 수 없다 → 주입 노드 자체에 responsive.portable(0~1023px) 오버라이드를 둔다.
*
* portable 에서는 팝오버가 아니라 드로어 안 인라인 아코디언이 되며, 개폐는 데스크톱과 같은
* `_local.showCurrencyDropdown` 이 결정한다(기본 접힘).
*/
it('유저 확장 트리거 버튼은 portable(모바일/태블릿)에서 숨겨진다', () => {
it('유저 확장 트리거는 portable 에서 아코디언 행 + 현재값 요약을 노출한다', () => {
const node = userExt.injections[0].components[0];
const trigger = (node.children ?? []).find((c: any) => c.name === 'Button');
expect(trigger).toBeTruthy();
expect(trigger.responsive?.portable?.props?.className).toBe('hidden');
const portable = trigger.responsive?.portable;
expect(portable).toBeTruthy();
expect(portable.props.className).not.toBe('hidden');
expect(portable.props.className).toContain('w-full');
expect(portable.props.className).toContain('justify-between');
// 접힘 상태에서도 현재 통화/배송국가를 알 수 있어야 한다
const summary = JSON.stringify(portable.children);
expect(summary).toContain('preferredCurrency');
expect(summary).toContain('preferredShippingCountry');
expect(summary).toContain('chevron-down');
});
it('유저 확장 패널은 portable 에서 항상 펼쳐진 정적 목록이다 (absolute/z-50 해제)', () => {
it('유저 확장 패널은 portable 에서도 _local.showCurrencyDropdown 으로 게이트된다 (기본 접힘)', () => {
const node = userExt.injections[0].components[0];
const panel = (node.children ?? []).find(
(c: any) => c.name === 'Div' && c.props?.role === 'listbox'
@@ -333,16 +430,25 @@ describe('이커머스 헤더 통화 주입 확장 (slot=header_currency)', () =
expect(panel.props.className).toContain('absolute');
expect(panel.props.className).toContain('z-50');
// portable 오버라이드: if 해제 + 정적 흐름
// portable 오버라이드: if 를 생략해 base if 를 상속(접힘 기본) + 정적 흐름
const portable = panel.responsive?.portable;
expect(portable).toBeTruthy();
expect(portable.if).toBe('{{true}}');
expect(portable.if).toBeUndefined();
expect(portable.props.className).toContain('static');
expect(portable.props.className).not.toContain('absolute');
expect(portable.props.className).not.toContain('z-50');
expect(portable.props.role).toBe('listbox');
});
it('유저 확장 백드롭은 portable 에서 꺼진다 (드로어 클릭 가로채기 방지)', () => {
const node = userExt.injections[0].components[0];
const backdrop = (node.children ?? []).find(
(c: any) => c.name === 'Div' && (c.props?.className ?? '').includes('fixed inset-0')
);
expect(backdrop).toBeTruthy();
expect(backdrop.responsive?.portable?.if).toBe('{{false}}');
});
it('관리자 확장이 _admin_base 에 header_currency 슬롯 + init_actions(통화 복원)를 기여한다', () => {
expect(adminExt.target_layout).toBe('_admin_base');
const node = adminExt.injections[0].components[0];
@@ -812,19 +812,75 @@
},
"children": [
{
"comment": "언어 선택 (여러 언어 지원 시)",
"comment": "언어 선택 (여러 언어 지원 시). 접기/펼치기 — 접힘이 기본이고 트리거에 현재 언어를 요약 표기한다. 통화/배송국가(이커머스 주입 슬롯)와는 독립된 토글(_global.mobileLanguageOpen)이라 서로 영향 없음.",
"id": "mobile_drawer_language",
"type": "basic",
"name": "Div",
"if": "{{$locales.length > 1}}",
"children": [
{
"comment": "트리거 — 좌측 '언어' 라벨, 우측 현재 언어명 + chevron. 접힘 상태에서 현재 값을 알 수 있어야 하므로 요약을 항상 노출한다.",
"id": "mobile_drawer_language_toggle",
"type": "basic",
"name": "Button",
"props": {
"type": "button",
"className": "w-full flex items-center justify-between py-1 cursor-pointer",
"aria-expanded": "{{_global.mobileLanguageOpen ?? false}}"
},
"actions": [
{
"type": "click",
"handler": "setState",
"params": {
"target": "global",
"mobileLanguageOpen": "{{!_global.mobileLanguageOpen}}"
}
}
],
"children": [
{
"type": "basic",
"name": "Span",
"props": {
"className": "text-xs font-medium text-gray-500 dark:text-gray-400 uppercase"
},
"text": "$t:common.language"
},
{
"type": "basic",
"name": "Span",
"props": {
"className": "flex items-center gap-1.5 text-sm text-gray-700 dark:text-gray-300"
},
"children": [
{
"comment": "접힘 상태 요약 = 현재 언어명",
"type": "basic",
"name": "Span",
"props": { "className": "font-medium" },
"text": "{{_global.appConfig?.localeNames?.[$locale] ?? $locale}}"
},
{
"type": "basic",
"name": "Icon",
"props": {
"name": "chevron-down",
"className": "{{_global.mobileLanguageOpen ? 'rotate-180' : ''}} text-xs text-gray-400 dark:text-gray-500 transition-transform duration-200"
}
}
]
}
]
},
{
"comment": "펼침 영역 — 사용자 정보 아코디언과 동일한 max-h/opacity 트랜지션. overflow-hidden 이라 접힘 시 칩이 잘려 사라진다.",
"type": "basic",
"name": "Div",
"props": {
"className": "py-1 text-xs font-medium text-gray-500 dark:text-gray-400 uppercase"
"className": "overflow-hidden transition-all duration-300 ease-in-out {{_global.mobileLanguageOpen ? 'max-h-screen opacity-100 mt-2' : 'max-h-0 opacity-0 mt-0'}}"
},
"text": "$t:common.language"
},
"children": [
{
"comment": "가로 나열 칩. iteration 은 반드시 Button 자신에 건다 — 엔진은 iteration 을 가진 노드를 항목 수만큼 복제하므로, flex 컨테이너에 걸면 컨테이너가 복제되어 칩이 세로로 쌓인다.",
"type": "basic",
@@ -853,6 +909,8 @@
}
]
}
]
}
]
},
{
@@ -10,9 +10,14 @@
*
* 조치:
* - 언어/통화를 모바일 드로어(mobile_drawer_prefs)로 이동, 가로 칩으로 나열
* - 통화/배송국가 주입 조각은 responsive.portable 로 모바일에서만 펼친 칩 목록
* - 통화/배송국가 주입 조각은 responsive.portable 로 모바일에서만 static 인라인 목록
* - 데스크톱(≥1024px)은 기존 헤더 드롭다운 유지
*
* 후속 (드로어 세로 길이):
* - 언어 / 통화·배송국가를 각각 독립 아코디언으로 접는다(기본 접힘). 접힘 상태에서도
* 트리거에 현재값(언어명 / 통화·배송국가)을 요약 표기해 펼치지 않고 알 수 있게 한다.
* - 언어=템플릿 소유(_global.mobileLanguageOpen), 통화=주입 조각 소유(_local.showCurrencyDropdown).
*
* 단위 테스트(Vitest)는 레이아웃 JSON 구조만 본다. 실제 브라우저 폭·줄 수·가시성은
* 여기서만 검증된다 (위지윅 발행 회귀 #238 교훈).
*/
@@ -86,7 +91,11 @@ test.describe('모바일 헤더/드로어 (390px)', () => {
await expect(page.locator('#mobile_header_right #mobile_currency_selector_wrap')).toHaveCount(0);
});
test('언어/통화는 드로어 안에 가로 칩으로 나열되고 비회원도 볼 수 있다', async ({ page }) => {
/**
* 드로어 선호설정은 언어 / 통화·배송국가 두 개의 독립 아코디언이며 기본은 접힘이다.
* 전부 펼쳐 두면 드로어가 세로로 길어져 정작 메뉴가 스크롤 밖으로 밀린다.
*/
test('드로어 선호설정은 기본 접힘이고 트리거에 현재값을 요약 표기한다 (비회원 포함)', async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 });
await page.goto('/');
await page.locator('#mobile_menu_toggle').click();
@@ -94,16 +103,54 @@ test.describe('모바일 헤더/드로어 (390px)', () => {
const prefs = page.locator('#mobile_drawer_prefs');
await expect(prefs).toBeVisible();
// 언어 칩: 여러 로케일이 한 줄에 나열 (iteration 이 Button 에 걸려 있어야 함)
// 언어: 접힘 (트리거 aria-expanded=false, 잘림 래퍼 높이 0)
const langToggle = page.locator('#mobile_drawer_language_toggle');
await expect(langToggle).toHaveAttribute('aria-expanded', 'false');
const langBodyHeight = await page.evaluate(() => {
const body = document
.querySelector('#mobile_drawer_language_toggle')
?.parentElement?.querySelector('.overflow-hidden');
return body ? Math.round(body.getBoundingClientRect().height) : -1;
});
expect(langBodyHeight).toBe(0);
// 접힘 상태 요약 = 현재 선택된 언어 칩의 이름 (세션 로케일 무관)
const summary = await page.evaluate(() => {
const toggle = document.querySelector('#mobile_drawer_language_toggle');
const selected = document.querySelector('#mobile_drawer_language [role="option"][aria-selected="true"]');
if (!toggle || !selected) return null;
return { toggleText: (toggle.textContent ?? '').trim(), chipName: (selected.textContent ?? '').trim() };
});
expect(summary).not.toBeNull();
expect(summary!.toggleText).toContain(summary!.chipName);
// 통화 슬롯: 이커머스 모듈 주입 + id 스코프. 접힘 → 트리거는 보이고 패널은 언마운트.
const currencyRoot = page.locator('#mobile_drawer_currency_wrap [id^="ext_header_currency_selector"]');
await expect(currencyRoot).toBeVisible();
const trigger = currencyRoot.locator('button[aria-haspopup="listbox"]');
await expect(trigger).toBeVisible();
await expect(trigger).toHaveAttribute('aria-expanded', 'false');
await expect(currencyRoot.locator('[role="listbox"]')).toHaveCount(0);
expect(await docOverflow(page)).toBe(0);
});
test('아코디언을 펼치면 언어/통화 칩이 가로로 나열되고 뷰포트를 넘지 않는다', async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 });
await page.goto('/');
await page.locator('#mobile_menu_toggle').click();
const prefs = page.locator('#mobile_drawer_prefs');
await expect(prefs).toBeVisible();
// 언어 펼치기 — iteration 이 Button 에 걸려 있어야 칩이 가로로 나열된다
await page.locator('#mobile_drawer_language_toggle').click();
const langChips = prefs.locator('button[role="option"]:not(#mobile_drawer_currency_wrap button)');
expect(await langChips.count()).toBeGreaterThan(0);
// 통화 슬롯: 이커머스 모듈 주입 + id 스코프
// 통화 펼치기 — portable 에서는 absolute 팝오버가 아니라 static 인라인 목록
const currencyRoot = page.locator('#mobile_drawer_currency_wrap [id^="ext_header_currency_selector"]');
await expect(currencyRoot).toBeVisible();
// portable 오버라이드 — 트리거는 숨고 패널은 펼쳐진 정적 목록
await expect(currencyRoot.locator('button[aria-haspopup="listbox"]')).toBeHidden();
await currencyRoot.locator('button[aria-haspopup="listbox"]').click();
const panel = currencyRoot.locator('[role="listbox"]');
await expect(panel).toBeVisible();
await expect(panel).toHaveClass(/\bstatic\b/);
@@ -115,9 +162,38 @@ test.describe('모바일 헤더/드로어 (390px)', () => {
for (let i = 0; i < n; i += 1) {
await expect(chips.nth(i)).toHaveClass(/rounded-full/);
}
// 드로어 안 인라인 아코디언이라 배경 오버레이(fixed inset-0)는 렌더되지 않는다.
// 렌더되면 드로어 전체 클릭을 가로챈다.
const backdrops = await page.evaluate(
() => document.querySelectorAll('#mobile_drawer_prefs .fixed.inset-0').length,
);
expect(backdrops).toBe(0);
expect(await docOverflow(page)).toBe(0);
});
test('언어와 통화 아코디언은 독립적으로 개폐된다', async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 });
await page.goto('/');
await page.locator('#mobile_menu_toggle').click();
const langToggle = page.locator('#mobile_drawer_language_toggle');
const currencyRoot = page.locator('#mobile_drawer_currency_wrap [id^="ext_header_currency_selector"]');
const trigger = currencyRoot.locator('button[aria-haspopup="listbox"]');
await langToggle.click();
await trigger.click();
await expect(langToggle).toHaveAttribute('aria-expanded', 'true');
await expect(trigger).toHaveAttribute('aria-expanded', 'true');
// 언어만 닫는다 → 통화는 열린 채 유지
await langToggle.click();
await expect(langToggle).toHaveAttribute('aria-expanded', 'false');
await expect(trigger).toHaveAttribute('aria-expanded', 'true');
await expect(currencyRoot.locator('[role="listbox"]')).toHaveCount(1);
});
test('320px 에서도 햄버거 버튼을 누를 수 있다 (내비게이션 접근성)', async ({ page }) => {
await page.setViewportSize({ width: 320, height: 844 });
await page.goto('/');