@kupola/kupola 2.0.0-beta.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [中文文档](./README.zh-CN.md)
1
+ [中文文档](./README.zh-CN.md) | [Pages](https://kupola-cn.github.io/kupola/)
2
2
 
3
3
  ![npm](https://img.shields.io/npm/v/@kupola/kupola)
4
4
  ![bundlephobia](https://img.shields.io/bundlephobia/minzip/@kupola/kupola)
@@ -51,18 +51,18 @@ Or use the programmatic API:
51
51
 
52
52
  ## Installation
53
53
 
54
- > **Current version**: `2.0.0-alpha.1` (pre-release). Use `@next` tag to install:
54
+ > **Current version**: `2.0.0` (stable):
55
55
 
56
56
  ```bash
57
- npm install @kupola/kupola@next # Full package
57
+ npm install @kupola/kupola # Full package
58
58
  # Or core engine only
59
- npm install @kupola/kupola/core@next # signal + template + render + SSR
59
+ npm install @kupola/kupola/core # signal + template + render + SSR
60
60
  ```
61
61
 
62
62
  ```bash
63
63
  # CDN
64
- https://cdn.jsdelivr.net/npm/@kupola/kupola@next/dist/kupola-core.esm.js
65
- https://cdn.jsdelivr.net/npm/@kupola/kupola@next/dist/kupola-core.cjs.js
64
+ https://cdn.jsdelivr.net/npm/@kupola/kupola/dist/kupola-core.esm.js
65
+ https://cdn.jsdelivr.net/npm/@kupola/kupola/dist/kupola-core.cjs
66
66
  ```
67
67
 
68
68
  ---
package/README.zh-CN.md CHANGED
@@ -51,18 +51,18 @@
51
51
 
52
52
  ## 安装
53
53
 
54
- > **当前版本**:`2.0.0-alpha.1`(预发布版)。请使用 `@next` 标签安装:
54
+ > **当前版本**:`2.0.0`(正式版):
55
55
 
56
56
  ```bash
57
- npm install @kupola/kupola@next # 完整包
57
+ npm install @kupola/kupola # 完整包
58
58
  # 或仅核心引擎
59
- npm install @kupola/kupola/core@next # signal + template + render + SSR
59
+ npm install @kupola/kupola/core # signal + template + render + SSR
60
60
  ```
61
61
 
62
62
  ```bash
63
63
  # CDN
64
- https://cdn.jsdelivr.net/npm/@kupola/kupola@next/dist/kupola-core.esm.js
65
- https://cdn.jsdelivr.net/npm/@kupola/kupola@next/dist/kupola-core.cjs.js
64
+ https://cdn.jsdelivr.net/npm/@kupola/kupola/dist/kupola-core.esm.js
65
+ https://cdn.jsdelivr.net/npm/@kupola/kupola/dist/kupola-core.cjs
66
66
  ```
67
67
 
68
68
  ---
@@ -0,0 +1 @@
1
+ *,::after,::before{box-sizing:border-box}body{margin:0;background:var(--color-background);color:var(--color-foreground);font-family:var(--font-family-default);font-size:var(--body-base-font-size);line-height:var(--body-base-line-height)}.ds-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--spacer-6);padding:0 var(--spacer-12);height:28px;border-radius:var(--radius-4);border:1px solid transparent;cursor:pointer;user-select:none;white-space:nowrap;font-size:var(--body-sm-font-size);font-weight:var(--font-weight-medium);transition:background var(--transition-fast),color var(--transition-fast),border-color var(--transition-fast)}.ds-btn--sm{height:24px;padding:0 var(--spacer-8);font-size:var(--body-xs-font-size)}.ds-btn--lg{height:32px;padding:0 var(--spacer-16);font-size:var(--body-base-font-size)}.ds-btn--primary{background:var(--bg-brand);color:var(--text-onbrand);border-color:var(--bg-brand)}.ds-btn--primary:hover{background:var(--bg-brand-hover)}.ds-btn--secondary{background:var(--bg-overlay-l2);color:var(--text-default);border-color:var(--border-neutral-l1)}.ds-btn--secondary:hover{background:var(--bg-overlay-l3)}.ds-btn--tertiary{background:0 0;color:var(--text-default)}.ds-btn--tertiary:hover{background:var(--bg-overlay-l2)}.ds-btn--danger{background:var(--status-error-default);color:#fff}.ds-btn[disabled]{opacity:.5;cursor:not-allowed}.ds-input{display:flex;align-items:center;gap:var(--spacer-8);padding:0 var(--spacer-12);height:28px;background:var(--bg-overlay-l1);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);color:var(--text-default);width:100%;font-size:var(--body-sm-font-size)}.ds-input:focus-within{border-color:var(--bg-brand)}.ds-input input{flex:1;background:0 0;border:none;outline:0;color:inherit;font:inherit}.ds-input input::placeholder{color:var(--text-tertiary)}.ds-input.is-error{border-color:var(--status-error-default)}.ds-modal-mask{position:fixed;inset:0;z-index:var(--z-index-modal);background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center}.ds-modal-mask.is-visible{display:flex}.ds-modal{background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-8);width:100%;max-width:480px;outline:0}.ds-modal__header{display:flex;align-items:center;justify-content:space-between;padding:var(--spacer-16) var(--spacer-24);border-bottom:1px solid var(--border-neutral-l1)}.ds-modal__title{font-size:var(--heading-sm-font-size);font-weight:var(--font-weight-strong)}.ds-modal__close{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;background:0 0;border:none;color:var(--icon-secondary);cursor:pointer;border-radius:var(--radius-4)}.ds-modal__close:hover{background:var(--bg-overlay-l2)}.ds-modal__body{padding:var(--spacer-16) var(--spacer-24)}.ds-modal__footer{display:flex;justify-content:flex-end;gap:var(--spacer-8);padding:var(--spacer-12) var(--spacer-24);border-top:1px solid var(--border-neutral-l1)}.ds-drawer-mask{position:fixed;inset:0;z-index:var(--z-index-drawer);background:rgba(0,0,0,.5);display:none}.ds-drawer-mask.is-visible{display:block}.ds-drawer{position:fixed;top:0;right:0;bottom:0;z-index:var(--z-index-drawer);width:360px;max-width:100vw;background:var(--bg-base-secondary);border-left:1px solid var(--border-neutral-l1);display:flex;flex-direction:column;transform:translateX(100%);transition:transform var(--transition-slow)}.ds-drawer.is-visible{transform:translateX(0)}.ds-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:var(--spacer-16) var(--spacer-24);border-bottom:1px solid var(--border-neutral-l1)}.ds-drawer__body{padding:var(--spacer-16) var(--spacer-24);flex:1;overflow-y:auto}.ds-dropdown{position:relative;display:inline-block}.ds-dropdown__menu{position:absolute;top:calc(100% + 4px);left:0;min-width:160px;background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l2);border-radius:var(--radius-4);box-shadow:0 4px 16px rgba(0,0,0,.2);z-index:var(--z-index-dropdown);display:none;padding:var(--spacer-4)}.ds-dropdown__menu.is-open{display:block}.ds-dropdown__item{display:flex;align-items:center;padding:var(--spacer-6) var(--spacer-8);border-radius:var(--radius-2);color:var(--text-default);font-size:var(--body-sm-font-size);cursor:pointer}.ds-dropdown__item:hover{background:var(--bg-overlay-l1)}.ds-tooltip{position:fixed;z-index:var(--z-index-tooltip);padding:var(--spacer-4) var(--spacer-8);background:var(--bg-base-tertiary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);font-size:var(--body-xs-font-size);color:var(--text-default);pointer-events:none;max-width:280px;white-space:pre-wrap}.ds-table{width:100%;border-collapse:collapse}.ds-table td,.ds-table th{text-align:left;padding:var(--spacer-12) var(--spacer-8);border-bottom:1px solid var(--border-neutral-l1);font-size:var(--body-sm-font-size)}.ds-table th{color:var(--text-tertiary);font-weight:var(--font-weight-default);font-size:var(--body-xs-font-size);text-transform:uppercase;letter-spacing:.04em}.ds-table td{color:var(--text-default)}.ds-table--striped tbody tr:nth-child(2n){background:var(--bg-base-secondary)}.ds-table--hover tbody tr:hover{background:var(--bg-overlay-l1)}.ds-form{display:flex;flex-direction:column;gap:var(--spacer-16)}.ds-form__group{display:flex;flex-direction:column;gap:var(--spacer-6)}.ds-form__label{font-size:var(--body-sm-font-size);font-weight:var(--font-weight-medium);color:var(--text-default)}.ds-form__error{font-size:var(--body-xs-font-size);color:var(--status-error-default)}.ds-form__actions{display:flex;justify-content:flex-end;gap:var(--spacer-8);margin-top:var(--spacer-16)}.ds-alert{display:flex;gap:var(--spacer-12);padding:var(--spacer-12) var(--spacer-16);background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);color:var(--text-default)}.ds-alert--success{background:var(--status-success-surface-l1);border-color:var(--status-success-default)}.ds-alert--warning{background:var(--status-warning-surface-l1);border-color:var(--status-warning-default)}.ds-alert--error{background:var(--status-error-surface-l1);border-color:var(--status-error-default)}.ds-alert--info{background:var(--status-info-surface-l1);border-color:var(--status-info-default)}.ds-tag{display:inline-flex;align-items:center;padding:0 var(--spacer-6);height:18px;border-radius:var(--radius-2);font-size:var(--body-xs-font-size);background:var(--bg-overlay-l2);color:var(--text-secondary);border:1px solid var(--border-neutral-l1)}.ds-tag--success{background:var(--status-success-surface-l1);color:var(--status-success-default)}.ds-tag--warning{background:var(--status-warning-surface-l1);color:var(--status-warning-default)}.ds-tag--error{background:var(--status-error-surface-l1);color:var(--status-error-default)}.ds-tabs{display:flex;gap:var(--spacer-24);border-bottom:1px solid var(--border-neutral-l1)}.ds-tab{padding:var(--spacer-12) 0;background:0 0;border:none;color:var(--text-tertiary);cursor:pointer;font:inherit;font-size:var(--body-sm-font-size);position:relative}.ds-tab.is-active,.ds-tab:hover{color:var(--text-default)}.ds-tab.is-active::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--icon-default)}.ds-message{position:fixed;top:var(--spacer-24);left:50%;transform:translateX(-50%);z-index:var(--z-index-notification);padding:var(--spacer-8) var(--spacer-16);background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);box-shadow:0 4px 12px rgba(0,0,0,.15);font-size:var(--body-sm-font-size);color:var(--text-default)}.ds-progress{width:100%;height:4px;background:var(--bg-overlay-l2);border-radius:var(--radius-full);overflow:hidden}.ds-progress__bar{height:100%;background:var(--bg-brand);border-radius:var(--radius-full);transition:width var(--transition-normal)}.ds-switch{position:relative;width:36px;height:20px;background:var(--bg-overlay-l3);border-radius:var(--radius-full);cursor:pointer;transition:background var(--transition-fast)}.ds-switch.is-active{background:var(--bg-brand)}.ds-switch::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform var(--transition-fast)}.ds-switch.is-active::after{transform:translateX(16px)}.ds-card{background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);padding:var(--spacer-24)}.ds-skeleton{background:var(--bg-overlay-l2);border-radius:var(--radius-4);animation:1.5s ease-in-out infinite ds-skeleton-pulse}@keyframes ds-skeleton-pulse{0%,100%{opacity:1}50%{opacity:.4}}.ds-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--spacer-40);color:var(--text-tertiary);font-size:var(--body-sm-font-size)}.ds-divider{height:1px;background:var(--border-neutral-l1)}.ds-avatar{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--bg-overlay-l3);color:var(--text-default);font-size:var(--body-sm-font-size);font-weight:var(--font-weight-strong)}.ds-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 var(--spacer-4);border-radius:var(--radius-full);font-size:11px;font-weight:600;background:var(--status-error-default);color:#fff}.ds-collapse__header{display:flex;align-items:center;justify-content:space-between;padding:var(--spacer-12) var(--spacer-16);cursor:pointer;color:var(--text-default);font-weight:var(--font-weight-medium)}.ds-collapse__body{padding:0 var(--spacer-16) var(--spacer-16)}.ds-spin{display:inline-block;width:24px;height:24px;border:2px solid var(--bg-overlay-l3);border-top-color:var(--bg-brand);border-radius:50%;animation:.8s linear infinite ds-spin-rotate}@keyframes ds-spin-rotate{to{transform:rotate(360deg)}}
@@ -11,3 +11,4 @@
11
11
 
12
12
  @import './tokens.css';
13
13
  @import './components.css';
14
+ @import './responsive.css';
@@ -0,0 +1 @@
1
+ 'Cascadia Code','Fira Code','Segoe UI',-apple-system,[data-theme=dark]{color-scheme:dark;--bg-base-default:#0C0C0D;--bg-base-secondary:#1A1B1D;--bg-base-tertiary:#222427;--bg-overlay-l1:rgba(255, 255, 255, 0.04);--bg-overlay-l2:rgba(255, 255, 255, 0.06);--bg-overlay-l3:rgba(255, 255, 255, 0.08);--bg-overlay-l4:rgba(255, 255, 255, 0.12);--text-default:#E5E7EB;--text-secondary:#B8BDCA;--text-tertiary:#9CA3AF;--text-disabled:#8B93A1;--text-onbrand:#FFFFFF;--icon-default:#E5E7EB;--icon-secondary:#B8BDCA;--icon-tertiary:#9CA3AF;--icon-disabled:#8B93A1;--border-neutral-l1:rgba(255, 255, 255, 0.12);--border-neutral-l2:rgba(255, 255, 255, 0.18);--border-neutral-l3:rgba(255, 255, 255, 0.25);--bg-brand:#32F08C;--bg-brand-hover:#53F4A2;--bg-brand-disabled:rgba(50, 240, 140, 0.3);--status-success-default:#32F08C;--status-warning-default:#FFAD5B;--status-error-default:#FF9CA8;--status-info-default:#79B8FF;--status-success-surface-l1:rgba(50, 240, 140, 0.12);--status-warning-surface-l1:rgba(255, 173, 91, 0.12);--status-error-surface-l1:rgba(255, 156, 168, 0.12);--status-info-surface-l1:rgba(121, 184, 255, 0.12);--color-background:var(--bg-base-default);--color-surface:var(--bg-base-secondary);--color-foreground:var(--text-default);--color-border:var(--border-neutral-l1)}[data-theme=light]{color-scheme:light;--bg-base-default:#FFFFFF;--bg-base-secondary:#F5F6F8;--bg-base-tertiary:#EDF0F5;--bg-overlay-l1:rgba(0, 0, 0, 0.04);--bg-overlay-l2:rgba(0, 0, 0, 0.06);--bg-overlay-l3:rgba(0, 0, 0, 0.08);--bg-overlay-l4:rgba(0, 0, 0, 0.12);--text-default:#0F1117;--text-secondary:#4B5563;--text-tertiary:#5B6370;--text-disabled:#525A68;--text-onbrand:#FFFFFF;--icon-default:#0F1117;--icon-secondary:#4B5563;--icon-tertiary:#5B6370;--icon-disabled:#525A68;--border-neutral-l1:rgba(0, 0, 0, 0.12);--border-neutral-l2:rgba(0, 0, 0, 0.18);--border-neutral-l3:rgba(0, 0, 0, 0.25);--bg-brand:#22C55E;--bg-brand-hover:#16A34A;--bg-brand-disabled:rgba(34, 197, 94, 0.3);--status-success-default:#16A34A;--status-warning-default:#CA8A04;--status-error-default:#DC2626;--status-info-default:#2E69FF;--status-success-surface-l1:rgba(22, 163, 74, 0.08);--status-warning-surface-l1:rgba(202, 138, 4, 0.08);--status-error-surface-l1:rgba(220, 38, 38, 0.08);--status-info-surface-l1:rgba(46, 105, 255, 0.08);--color-background:var(--bg-base-default);--color-surface:var(--bg-base-secondary);--color-foreground:var(--text-default);--color-border:var(--border-neutral-l1)}*,::after,::before{box-sizing:border-box}body{margin:0;background:var(--color-background);color:var(--color-foreground);font-family:var(--font-family-default);font-size:var(--body-base-font-size);line-height:var(--body-base-line-height)}.ds-btn{display:inline-flex;align-items:center;justify-content:center;gap:var(--spacer-6);padding:0 var(--spacer-12);height:28px;border-radius:var(--radius-4);border:1px solid transparent;cursor:pointer;user-select:none;white-space:nowrap;font-size:var(--body-sm-font-size);font-weight:var(--font-weight-medium);transition:background var(--transition-fast),color var(--transition-fast),border-color var(--transition-fast)}.ds-btn--sm{height:24px;padding:0 var(--spacer-8);font-size:var(--body-xs-font-size)}.ds-btn--lg{height:32px;padding:0 var(--spacer-16);font-size:var(--body-base-font-size)}.ds-btn--primary{background:var(--bg-brand);color:var(--text-onbrand);border-color:var(--bg-brand)}.ds-btn--primary:hover{background:var(--bg-brand-hover)}.ds-btn--secondary{background:var(--bg-overlay-l2);color:var(--text-default);border-color:var(--border-neutral-l1)}.ds-btn--secondary:hover{background:var(--bg-overlay-l3)}.ds-btn--tertiary{background:0 0;color:var(--text-default)}.ds-btn--tertiary:hover{background:var(--bg-overlay-l2)}.ds-btn--danger{background:var(--status-error-default);color:#fff}.ds-btn[disabled]{opacity:.5;cursor:not-allowed}.ds-input{display:flex;align-items:center;gap:var(--spacer-8);padding:0 var(--spacer-12);height:28px;background:var(--bg-overlay-l1);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);color:var(--text-default);width:100%;font-size:var(--body-sm-font-size)}.ds-input:focus-within{border-color:var(--bg-brand)}.ds-input input{flex:1;background:0 0;border:none;outline:0;color:inherit;font:inherit}.ds-input input::placeholder{color:var(--text-tertiary)}.ds-input.is-error{border-color:var(--status-error-default)}.ds-modal-mask{position:fixed;inset:0;z-index:var(--z-index-modal);background:rgba(0,0,0,.5);display:none;align-items:center;justify-content:center}.ds-modal-mask.is-visible{display:flex}.ds-modal{background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-8);width:100%;max-width:480px;outline:0}.ds-modal__header{display:flex;align-items:center;justify-content:space-between;padding:var(--spacer-16) var(--spacer-24);border-bottom:1px solid var(--border-neutral-l1)}.ds-modal__title{font-size:var(--heading-sm-font-size);font-weight:var(--font-weight-strong)}.ds-modal__close{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;background:0 0;border:none;color:var(--icon-secondary);cursor:pointer;border-radius:var(--radius-4)}.ds-modal__close:hover{background:var(--bg-overlay-l2)}.ds-modal__body{padding:var(--spacer-16) var(--spacer-24)}.ds-modal__footer{display:flex;justify-content:flex-end;gap:var(--spacer-8);padding:var(--spacer-12) var(--spacer-24);border-top:1px solid var(--border-neutral-l1)}.ds-drawer-mask{position:fixed;inset:0;z-index:var(--z-index-drawer);background:rgba(0,0,0,.5);display:none}.ds-drawer-mask.is-visible{display:block}.ds-drawer{position:fixed;top:0;right:0;bottom:0;z-index:var(--z-index-drawer);width:360px;max-width:100vw;background:var(--bg-base-secondary);border-left:1px solid var(--border-neutral-l1);display:flex;flex-direction:column;transform:translateX(100%);transition:transform var(--transition-slow)}.ds-drawer.is-visible{transform:translateX(0)}.ds-drawer__header{display:flex;align-items:center;justify-content:space-between;padding:var(--spacer-16) var(--spacer-24);border-bottom:1px solid var(--border-neutral-l1)}.ds-drawer__body{padding:var(--spacer-16) var(--spacer-24);flex:1;overflow-y:auto}.ds-dropdown{position:relative;display:inline-block}.ds-dropdown__menu{position:absolute;top:calc(100% + 4px);left:0;min-width:160px;background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l2);border-radius:var(--radius-4);box-shadow:0 4px 16px rgba(0,0,0,.2);z-index:var(--z-index-dropdown);display:none;padding:var(--spacer-4)}.ds-dropdown__menu.is-open{display:block}.ds-dropdown__item{display:flex;align-items:center;padding:var(--spacer-6) var(--spacer-8);border-radius:var(--radius-2);color:var(--text-default);font-size:var(--body-sm-font-size);cursor:pointer}.ds-dropdown__item:hover{background:var(--bg-overlay-l1)}.ds-tooltip{position:fixed;z-index:var(--z-index-tooltip);padding:var(--spacer-4) var(--spacer-8);background:var(--bg-base-tertiary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);font-size:var(--body-xs-font-size);color:var(--text-default);pointer-events:none;max-width:280px;white-space:pre-wrap}.ds-table{width:100%;border-collapse:collapse}.ds-table td,.ds-table th{text-align:left;padding:var(--spacer-12) var(--spacer-8);border-bottom:1px solid var(--border-neutral-l1);font-size:var(--body-sm-font-size)}.ds-table th{color:var(--text-tertiary);font-weight:var(--font-weight-default);font-size:var(--body-xs-font-size);text-transform:uppercase;letter-spacing:.04em}.ds-table td{color:var(--text-default)}.ds-table--striped tbody tr:nth-child(2n){background:var(--bg-base-secondary)}.ds-table--hover tbody tr:hover{background:var(--bg-overlay-l1)}.ds-form{display:flex;flex-direction:column;gap:var(--spacer-16)}.ds-form__group{display:flex;flex-direction:column;gap:var(--spacer-6)}.ds-form__label{font-size:var(--body-sm-font-size);font-weight:var(--font-weight-medium);color:var(--text-default)}.ds-form__error{font-size:var(--body-xs-font-size);color:var(--status-error-default)}.ds-form__actions{display:flex;justify-content:flex-end;gap:var(--spacer-8);margin-top:var(--spacer-16)}.ds-alert{display:flex;gap:var(--spacer-12);padding:var(--spacer-12) var(--spacer-16);background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);color:var(--text-default)}.ds-alert--success{background:var(--status-success-surface-l1);border-color:var(--status-success-default)}.ds-alert--warning{background:var(--status-warning-surface-l1);border-color:var(--status-warning-default)}.ds-alert--error{background:var(--status-error-surface-l1);border-color:var(--status-error-default)}.ds-alert--info{background:var(--status-info-surface-l1);border-color:var(--status-info-default)}.ds-tag{display:inline-flex;align-items:center;padding:0 var(--spacer-6);height:18px;border-radius:var(--radius-2);font-size:var(--body-xs-font-size);background:var(--bg-overlay-l2);color:var(--text-secondary);border:1px solid var(--border-neutral-l1)}.ds-tag--success{background:var(--status-success-surface-l1);color:var(--status-success-default)}.ds-tag--warning{background:var(--status-warning-surface-l1);color:var(--status-warning-default)}.ds-tag--error{background:var(--status-error-surface-l1);color:var(--status-error-default)}.ds-tabs{display:flex;gap:var(--spacer-24);border-bottom:1px solid var(--border-neutral-l1)}.ds-tab{padding:var(--spacer-12) 0;background:0 0;border:none;color:var(--text-tertiary);cursor:pointer;font:inherit;font-size:var(--body-sm-font-size);position:relative}.ds-tab.is-active,.ds-tab:hover{color:var(--text-default)}.ds-tab.is-active::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--icon-default)}.ds-message{position:fixed;top:var(--spacer-24);left:50%;transform:translateX(-50%);z-index:var(--z-index-notification);padding:var(--spacer-8) var(--spacer-16);background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);box-shadow:0 4px 12px rgba(0,0,0,.15);font-size:var(--body-sm-font-size);color:var(--text-default)}.ds-progress{width:100%;height:4px;background:var(--bg-overlay-l2);border-radius:var(--radius-full);overflow:hidden}.ds-progress__bar{height:100%;background:var(--bg-brand);border-radius:var(--radius-full);transition:width var(--transition-normal)}.ds-switch{position:relative;width:36px;height:20px;background:var(--bg-overlay-l3);border-radius:var(--radius-full);cursor:pointer;transition:background var(--transition-fast)}.ds-switch.is-active{background:var(--bg-brand)}.ds-switch::after{content:'';position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform var(--transition-fast)}.ds-switch.is-active::after{transform:translateX(16px)}.ds-card{background:var(--bg-base-secondary);border:1px solid var(--border-neutral-l1);border-radius:var(--radius-4);padding:var(--spacer-24)}.ds-skeleton{background:var(--bg-overlay-l2);border-radius:var(--radius-4);animation:1.5s ease-in-out infinite ds-skeleton-pulse}@keyframes ds-skeleton-pulse{0%,100%{opacity:1}50%{opacity:.4}}.ds-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:var(--spacer-40);color:var(--text-tertiary);font-size:var(--body-sm-font-size)}.ds-divider{height:1px;background:var(--border-neutral-l1)}.ds-avatar{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--bg-overlay-l3);color:var(--text-default);font-size:var(--body-sm-font-size);font-weight:var(--font-weight-strong)}.ds-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 var(--spacer-4);border-radius:var(--radius-full);font-size:11px;font-weight:600;background:var(--status-error-default);color:#fff}.ds-collapse__header{display:flex;align-items:center;justify-content:space-between;padding:var(--spacer-12) var(--spacer-16);cursor:pointer;color:var(--text-default);font-weight:var(--font-weight-medium)}.ds-collapse__body{padding:0 var(--spacer-16) var(--spacer-16)}.ds-spin{display:inline-block;width:24px;height:24px;border:2px solid var(--bg-overlay-l3);border-top-color:var(--bg-brand);border-radius:50%;animation:.8s linear infinite ds-spin-rotate}@keyframes ds-spin-rotate{to{transform:rotate(360deg)}}@media (min-width:576px){.ds-show-sm{display:none!important}}@media (min-width:768px){.ds-show-md{display:none!important}}@media (max-width:1023.98px){.ds-hide-below-lg,.ds-hide-lg{display:none!important}}@media (min-width:1024px){.ds-show-lg{display:none!important}}@media (max-width:1279.98px){.ds-hide-below-xl,.ds-hide-xl{display:none!important}}@media (min-width:1280px){.ds-show-xl{display:none!important}}@media (max-width:767.98px){.ds-hide-below-md,.ds-hide-md{display:none!important}.ds-padding-responsive{padding:var(--spacing-3,12px)!important}.ds-margin-responsive{margin:var(--spacing-3,12px)!important}.ds-text-responsive{font-size:var(--font-size-sm, 13px)!important}.ds-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch}.ds-table{min-width:600px}.ds-table td,.ds-table th{white-space:nowrap;padding:var(--spacing-2,8px) var(--spacing-3,12px);font-size:var(--font-size-sm, 13px)}}@media (max-width:575.98px){.ds-hide-below-sm,.ds-hide-sm{display:none!important}.ds-modal-content{width:100%!important;max-width:100%!important;min-height:100vh!important;border-radius:0!important;margin:0!important}.ds-modal-mask{padding:0!important}.ds-drawer-left,.ds-drawer-right{width:100%!important;max-width:100%!important}.ds-drawer-bottom,.ds-drawer-top{height:90vh!important;max-height:90vh!important}.ds-dialog{width:calc(100% - 32px)!important;max-width:100%!important;margin:16px!important}.ds-select-dropdown{position:fixed!important;bottom:0;left:0;right:0;max-height:50vh;border-radius:12px 12px 0 0;z-index:var(--z-index-modal,3000)}.ds-datepicker-panel{width:calc(100vw - 32px)!important;max-width:100%!important}.ds-notification{width:calc(100% - 24px)!important;max-width:100%!important;right:12px!important;left:12px!important}}
@@ -0,0 +1,153 @@
1
+ /**
2
+ * Kupola CSS — Responsive utilities & component adaptations.
3
+ *
4
+ * Breakpoints:
5
+ * sm: 576px (phones landscape)
6
+ * md: 768px (tablets)
7
+ * lg: 1024px (laptops)
8
+ * xl: 1280px (desktops)
9
+ *
10
+ * Usage:
11
+ * <div class="ds-hide-sm">Hidden on phones</div>
12
+ * <div class="ds-show-md">Only visible on tablets+</div>
13
+ * <div class="ds-hide-lg">Hidden below laptops</div>
14
+ */
15
+
16
+ /* ═══════════════════════════════════════════════════════════
17
+ Responsive display utilities
18
+ ═══════════════════════════════════════════════════════════ */
19
+
20
+ /* ── sm: < 576px (phones) ─────────────────────────────── */
21
+ @media (max-width: 575.98px) {
22
+ .ds-hide-sm { display: none !important; }
23
+ .ds-hide-below-sm { display: none !important; }
24
+ }
25
+ @media (min-width: 576px) {
26
+ .ds-show-sm { display: none !important; }
27
+ }
28
+
29
+ /* ── md: < 768px (below tablets) ──────────────────────── */
30
+ @media (max-width: 767.98px) {
31
+ .ds-hide-md { display: none !important; }
32
+ .ds-hide-below-md { display: none !important; }
33
+ }
34
+ @media (min-width: 768px) {
35
+ .ds-show-md { display: none !important; }
36
+ }
37
+
38
+ /* ── lg: < 1024px (below laptops) ─────────────────────── */
39
+ @media (max-width: 1023.98px) {
40
+ .ds-hide-lg { display: none !important; }
41
+ .ds-hide-below-lg { display: none !important; }
42
+ }
43
+ @media (min-width: 1024px) {
44
+ .ds-show-lg { display: none !important; }
45
+ }
46
+
47
+ /* ── xl: < 1280px (below desktops) ────────────────────── */
48
+ @media (max-width: 1279.98px) {
49
+ .ds-hide-xl { display: none !important; }
50
+ .ds-hide-below-xl { display: none !important; }
51
+ }
52
+ @media (min-width: 1280px) {
53
+ .ds-show-xl { display: none !important; }
54
+ }
55
+
56
+ /* ═══════════════════════════════════════════════════════════
57
+ Responsive spacing utilities
58
+ ═══════════════════════════════════════════════════════════ */
59
+
60
+ @media (max-width: 767.98px) {
61
+ .ds-padding-responsive { padding: var(--spacing-3, 12px) !important; }
62
+ .ds-margin-responsive { margin: var(--spacing-3, 12px) !important; }
63
+ .ds-text-responsive { font-size: var(--font-size-sm, 13px) !important; }
64
+ }
65
+
66
+ /* ═══════════════════════════════════════════════════════════
67
+ Component responsive adaptations
68
+ ═══════════════════════════════════════════════════════════ */
69
+
70
+ /* ── Modal: full-screen on phones ─────────────────────────── */
71
+ @media (max-width: 575.98px) {
72
+ .ds-modal-content {
73
+ width: 100% !important;
74
+ max-width: 100% !important;
75
+ min-height: 100vh !important;
76
+ border-radius: 0 !important;
77
+ margin: 0 !important;
78
+ }
79
+ .ds-modal-mask {
80
+ padding: 0 !important;
81
+ }
82
+ }
83
+
84
+ /* ── Drawer: full-width/height on phones ──────────────────── */
85
+ @media (max-width: 575.98px) {
86
+ .ds-drawer-right,
87
+ .ds-drawer-left {
88
+ width: 100% !important;
89
+ max-width: 100% !important;
90
+ }
91
+ .ds-drawer-bottom,
92
+ .ds-drawer-top {
93
+ height: 90vh !important;
94
+ max-height: 90vh !important;
95
+ }
96
+ }
97
+
98
+ /* ── Dialog: full-width on phones ─────────────────────────── */
99
+ @media (max-width: 575.98px) {
100
+ .ds-dialog {
101
+ width: calc(100% - 32px) !important;
102
+ max-width: 100% !important;
103
+ margin: 16px !important;
104
+ }
105
+ }
106
+
107
+ /* ── Table: horizontal scroll on small screens ────────────── */
108
+ @media (max-width: 767.98px) {
109
+ .ds-table-wrapper {
110
+ overflow-x: auto;
111
+ -webkit-overflow-scrolling: touch;
112
+ }
113
+ .ds-table {
114
+ min-width: 600px;
115
+ }
116
+ .ds-table th,
117
+ .ds-table td {
118
+ white-space: nowrap;
119
+ padding: var(--spacing-2, 8px) var(--spacing-3, 12px);
120
+ font-size: var(--font-size-sm, 13px);
121
+ }
122
+ }
123
+
124
+ /* ── Select: full-width on phones ─────────────────────────── */
125
+ @media (max-width: 575.98px) {
126
+ .ds-select-dropdown {
127
+ position: fixed !important;
128
+ bottom: 0;
129
+ left: 0;
130
+ right: 0;
131
+ max-height: 50vh;
132
+ border-radius: 12px 12px 0 0;
133
+ z-index: var(--z-index-modal, 3000);
134
+ }
135
+ }
136
+
137
+ /* ── DatePicker: full-width on phones ─────────────────────── */
138
+ @media (max-width: 575.98px) {
139
+ .ds-datepicker-panel {
140
+ width: calc(100vw - 32px) !important;
141
+ max-width: 100% !important;
142
+ }
143
+ }
144
+
145
+ /* ── Notification: stack full-width on phones ─────────────── */
146
+ @media (max-width: 575.98px) {
147
+ .ds-notification {
148
+ width: calc(100% - 24px) !important;
149
+ max-width: 100% !important;
150
+ right: 12px !important;
151
+ left: 12px !important;
152
+ }
153
+ }
@@ -0,0 +1 @@
1
+ @media (min-width:576px){.ds-show-sm{display:none!important}}@media (min-width:768px){.ds-show-md{display:none!important}}@media (max-width:1023.98px){.ds-hide-below-lg,.ds-hide-lg{display:none!important}}@media (min-width:1024px){.ds-show-lg{display:none!important}}@media (max-width:1279.98px){.ds-hide-below-xl,.ds-hide-xl{display:none!important}}@media (min-width:1280px){.ds-show-xl{display:none!important}}@media (max-width:767.98px){.ds-hide-below-md,.ds-hide-md{display:none!important}.ds-padding-responsive{padding:var(--spacing-3,12px)!important}.ds-margin-responsive{margin:var(--spacing-3,12px)!important}.ds-text-responsive{font-size:var(--font-size-sm, 13px)!important}.ds-table-wrapper{overflow-x:auto;-webkit-overflow-scrolling:touch}.ds-table{min-width:600px}.ds-table td,.ds-table th{white-space:nowrap;padding:var(--spacing-2,8px) var(--spacing-3,12px);font-size:var(--font-size-sm, 13px)}}@media (max-width:575.98px){.ds-hide-below-sm,.ds-hide-sm{display:none!important}.ds-modal-content{width:100%!important;max-width:100%!important;min-height:100vh!important;border-radius:0!important;margin:0!important}.ds-modal-mask{padding:0!important}.ds-drawer-left,.ds-drawer-right{width:100%!important;max-width:100%!important}.ds-drawer-bottom,.ds-drawer-top{height:90vh!important;max-height:90vh!important}.ds-dialog{width:calc(100% - 32px)!important;max-width:100%!important;margin:16px!important}.ds-select-dropdown{position:fixed!important;bottom:0;left:0;right:0;max-height:50vh;border-radius:12px 12px 0 0;z-index:var(--z-index-modal,3000)}.ds-datepicker-panel{width:calc(100vw - 32px)!important;max-width:100%!important}.ds-notification{width:calc(100% - 24px)!important;max-width:100%!important;right:12px!important;left:12px!important}}
@@ -8,6 +8,9 @@
8
8
  */
9
9
 
10
10
  :root {
11
+
12
+ /* ── Anti-FOUC: hide elements until JS removes [k-cloak] ── */
13
+ [k-cloak] { display: none !important; }
11
14
  /* ── Primitives: Radius ─────────────────────────────────── */
12
15
  --radius-2: 2px;
13
16
  --radius-4: 4px;
@@ -75,6 +78,12 @@
75
78
  --transition-fast: 0.12s ease;
76
79
  --transition-normal: 0.2s ease;
77
80
  --transition-slow: 0.3s ease;
81
+
82
+ /* ── Breakpoints ────────────────────────────────────────── */
83
+ --breakpoint-sm: 576px;
84
+ --breakpoint-md: 768px;
85
+ --breakpoint-lg: 1024px;
86
+ --breakpoint-xl: 1280px;
78
87
  }
79
88
 
80
89
  /* ═══════════════════════════════════════════════════════════
@@ -0,0 +1 @@
1
+ 'Cascadia Code','Fira Code','Segoe UI',-apple-system,[data-theme=dark]{color-scheme:dark;--bg-base-default:#0C0C0D;--bg-base-secondary:#1A1B1D;--bg-base-tertiary:#222427;--bg-overlay-l1:rgba(255, 255, 255, 0.04);--bg-overlay-l2:rgba(255, 255, 255, 0.06);--bg-overlay-l3:rgba(255, 255, 255, 0.08);--bg-overlay-l4:rgba(255, 255, 255, 0.12);--text-default:#E5E7EB;--text-secondary:#B8BDCA;--text-tertiary:#9CA3AF;--text-disabled:#8B93A1;--text-onbrand:#FFFFFF;--icon-default:#E5E7EB;--icon-secondary:#B8BDCA;--icon-tertiary:#9CA3AF;--icon-disabled:#8B93A1;--border-neutral-l1:rgba(255, 255, 255, 0.12);--border-neutral-l2:rgba(255, 255, 255, 0.18);--border-neutral-l3:rgba(255, 255, 255, 0.25);--bg-brand:#32F08C;--bg-brand-hover:#53F4A2;--bg-brand-disabled:rgba(50, 240, 140, 0.3);--status-success-default:#32F08C;--status-warning-default:#FFAD5B;--status-error-default:#FF9CA8;--status-info-default:#79B8FF;--status-success-surface-l1:rgba(50, 240, 140, 0.12);--status-warning-surface-l1:rgba(255, 173, 91, 0.12);--status-error-surface-l1:rgba(255, 156, 168, 0.12);--status-info-surface-l1:rgba(121, 184, 255, 0.12);--color-background:var(--bg-base-default);--color-surface:var(--bg-base-secondary);--color-foreground:var(--text-default);--color-border:var(--border-neutral-l1)}[data-theme=light]{color-scheme:light;--bg-base-default:#FFFFFF;--bg-base-secondary:#F5F6F8;--bg-base-tertiary:#EDF0F5;--bg-overlay-l1:rgba(0, 0, 0, 0.04);--bg-overlay-l2:rgba(0, 0, 0, 0.06);--bg-overlay-l3:rgba(0, 0, 0, 0.08);--bg-overlay-l4:rgba(0, 0, 0, 0.12);--text-default:#0F1117;--text-secondary:#4B5563;--text-tertiary:#5B6370;--text-disabled:#525A68;--text-onbrand:#FFFFFF;--icon-default:#0F1117;--icon-secondary:#4B5563;--icon-tertiary:#5B6370;--icon-disabled:#525A68;--border-neutral-l1:rgba(0, 0, 0, 0.12);--border-neutral-l2:rgba(0, 0, 0, 0.18);--border-neutral-l3:rgba(0, 0, 0, 0.25);--bg-brand:#22C55E;--bg-brand-hover:#16A34A;--bg-brand-disabled:rgba(34, 197, 94, 0.3);--status-success-default:#16A34A;--status-warning-default:#CA8A04;--status-error-default:#DC2626;--status-info-default:#2E69FF;--status-success-surface-l1:rgba(22, 163, 74, 0.08);--status-warning-surface-l1:rgba(202, 138, 4, 0.08);--status-error-surface-l1:rgba(220, 38, 38, 0.08);--status-info-surface-l1:rgba(46, 105, 255, 0.08);--color-background:var(--bg-base-default);--color-surface:var(--bg-base-secondary);--color-foreground:var(--text-default);--color-border:var(--border-neutral-l1)}
@@ -1 +1 @@
1
- "use strict";const t=new Set;let n=!1;function o(o){t.add(o),n||(n=!0,queueMicrotask(e))}function e(){for(n=!1;t.size>0;){const n=[...t];t.clear();for(const t of n)t()}}let s=!1,r=0;const c=new Map,i=new Map,f=new Map;let u=0,l=0,a=0,p=0,h=0;const d=new WeakMap;function m(t,n){return d.has(t)?d.get(t):(d.set(t,n),n)}function y(){return s}function g(){const t=r>0?performance.now()-r:0,n=[];for(const[,t]of c)n.push({label:t.label,reads:t.reads,writes:t.writes,triggers:t.triggers});const o=[];for(const[,t]of i){const n=t.runs>0?t.totalTime/t.runs:0;o.push({label:t.label,runs:t.runs,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}const e=[];for(const[,t]of f){const n=t.recomputes>0?t.totalTime/t.recomputes:0;e.push({label:t.label,recomputes:t.recomputes,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}return{duration:Math.round(t),totalTriggers:a,totalEffectRuns:p,totalComputedRecomputes:h,signals:n,effects:o,computeds:e}}let w=null;const b=[];function x(t){b.push(w),w=t}function k(){w=b.pop()??null}let S=0;const _=new Set;function v(t){S=t}function O(t){w&&(t.t.add(w),w.o.add(t))}function j(t){for(const n of t.t)n.i?n.u():S>0?_.add(n.u):o(n.u)}class T{constructor(t){this.l=t,this.t=new Set}get value(){return O(this),y()&&function(t){if(!s)return;const n=m(t,u);c.has(n)||(c.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=u&&(u=n+1)),c.get(n).reads++}(this),this.l}set value(t){Object.is(this.l,t)||(this.l=t,y()&&function(t){if(!s)return;const n=m(t,u);c.has(n)||(c.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=u&&(u=n+1)),c.get(n).writes++}(this),j(this))}peek(){return this.l}toString(){return String(this.l)}toJSON(){return JSON.stringify(this.l)}}function $(t){return new T(t)}function M(t){const n={p:t,o:new Set,u:null,h:!1};return n.u=()=>{n.h||N(n)},N(n),()=>function(t){if(t.h)return;t.h=!0,A(t)}(n)}function N(t){A(t),x(t);try{y()?function(t,n){if(!s)return n();const o=m(t,l);i.has(o)||(i.set(o,{runs:0,totalTime:0,maxTime:0,label:`effect#${o}`}),o>=l&&(l=o+1));const e=i.get(o),r=performance.now(),c=n(),f=performance.now()-r;e.runs++,e.totalTime+=f,f>e.maxTime&&(e.maxTime=f),p++}(t,t.p):t.p()}finally{k()}}function A(t){for(const n of t.o)n.t.delete(t);t.o.clear()}class C{constructor(t,n){this.strings=t,this.values=n}}function J(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function z(t){if(null==t||"object"!=typeof t)return!1;const n=Object.getOwnPropertyDescriptor(t,"value");if(n&&"function"==typeof n.get)return!0;const o=Object.getPrototypeOf(t);if(o){const t=Object.getOwnPropertyDescriptor(o,"value");if(t&&"function"==typeof t.get)return!0}return!1}const E=t=>`຿${t}຿`;function F(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof C?n.push(F(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof C?n.push(e.map(F).join("")):z(e)?n.push(J(e.value)):"function"!=typeof e&&n.push(J(e??""))}return n.join("")}function K(t,n){const o=t.indexOf(n);if(-1===o)return{type:"text"};const e=t.substring(0,o).lastIndexOf("<");if(-1===e)return{type:"text"};if(t.substring(e,o).includes(">"))return{type:"text"};const s=t.substring(e+1,o).match(/([\w\-@:.]+)\s*=\s*(?:"[^"]*|'[^']*|[^\s>]*?)$/);if(!s)return{type:"text"};const r=s[1];return r.startsWith("on")&&r.length>2?{type:"event",attrName:r}:{type:"attr",attrName:r}}class D{constructor(t,n){this.container=t,this.rawValue=n,this.node=null,this.m=null}mount(){const t=document.createTextNode("");if(this.k?this.container.insertBefore(t,this.k):this.container.appendChild(t),this.node=t,z(this.rawValue)){const t=this.rawValue;this.m=M(()=>{this.node.textContent=null!=t.value?String(t.value):""})}else this.rawValue instanceof C?this.node.textContent=F(this.rawValue):this.node.textContent=null!=this.rawValue?String(this.rawValue):""}destroy(){this.m?.(),this.node?.remove()}}class P{constructor(t,n,o){this.element=t,this.attrName=n,this.rawValue=o,this.m=null}mount(){if(z(this.rawValue)){const t=this.rawValue;this.m=M(()=>{const n=t.value;null==n||!1===n?this.element.removeAttribute(this.attrName):this.element.setAttribute(this.attrName,String(n))})}else null!=this.rawValue&&!1!==this.rawValue&&this.element.setAttribute(this.attrName,String(this.rawValue))}destroy(){this.m?.()}}class q{constructor(t,n,o){this.element=t,this.eventName=n.slice(2).toLowerCase(),this.handler=o,this.S=null}mount(){"function"==typeof this.handler&&(this.S=t=>this.handler(t),this.element.addEventListener(this.eventName,this.S))}destroy(){this.S&&(this.element.removeEventListener(this.eventName,this.S),this.S=null)}}class I{constructor(){this.parts=[],this.fragment=null}destroy(){for(const t of this.parts)t.destroy();this.parts.length=0}}function R(t,n){const o=new I,e=function(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof C?n.push(F(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof C?n.push(e.map(F).join("")):"function"==typeof e||z(e)?n.push(E(o)):n.push(J(e??""))}return n.join("")}(t),s=function(t){const n=document.createElement("template");return n.innerHTML=t,n.content}(e);o.fragment=s,U(s,t.values,e,o);for(const t of o.parts)t.mount();return n.appendChild(s),o}function U(t,n,o,e){const s=[...t.childNodes];for(const r of s)3===r.nodeType?W(r,n,o,e,t):1===r.nodeType&&B(r,n,o,e)}function W(t,n,o,e,s){const r=t.textContent||"";for(let c=0;c<n.length;c++){const i=E(c),f=r.indexOf(i);if(-1===f)continue;if("text"!==K(o,i).type)continue;const u=r.substring(0,f),l=r.substring(f+i.length);u&&s.insertBefore(document.createTextNode(u),t);const a=new D(s,n[c]);e.parts.push(a);let p=t;return l&&(p=document.createTextNode(l),s.insertBefore(p,t)),s.removeChild(t),a.k=p!==t?p:null,void(l&&W(p,n,o,e,s))}}function B(t,n,o,e){const s=[...t.attributes];for(const r of s)for(let s=0;s<n.length;s++){const c=E(s);if(!r.value.includes(c))continue;const i=K(o,c);if("event"===i.type&&i.attrName===r.name){t.removeAttribute(r.name);const o=new q(t,r.name,n[s]);e.parts.push(o)}else if("attr"===i.type&&i.attrName===r.name){const o=r.value.replace(c,"");o?t.setAttribute(r.name,o):t.removeAttribute(r.name);const i=new P(t,r.name,n[s]);e.parts.push(i)}}U(t,n,o,e)}function G(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof C?n.push(G(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof C?n.push(e.map(t=>G(t)).join("")):z(e)?n.push(J(e.value)):"function"!=typeof e&&n.push(J(e??""))}return n.join("")}function H(t){const n=t.join("");let o=!1,e="",s=-1,r=!1;for(let t=0;t<n.length;t++){const c=n[t];o?c===e&&(o=!1):'"'===c||"'"===c?(o=!0,e=c):"<"===c?(s=t,r=!1):">"===c&&s>=0&&!o&&(r=!0)}return s>=0&&!r}function L(t,n,o,e){const s=[...t.childNodes];for(const r of s)8===r.nodeType?Q(r,n,t,o,e):1===r.nodeType&&V(r,n,o,e)}function Q(t,n,o,e,s){const r=s.indices[s.nextIdx++]??-1,c=t.previousSibling;let i;if(c&&3===c.nodeType?i=c:(i=document.createTextNode(""),o.insertBefore(i,t)),r>=0&&r<n.length){const t=n[r];if(z(t)){const n=M(()=>{i.textContent=null!=t.value?String(t.value):""});e.parts.push({destroy(){n(),i.remove()}})}else i.textContent=null!=t?String(t):""}o.removeChild(t)}function V(t,n,o,e){const s=t.getAttribute("data-kp");if(s){const e=s.split(",");for(const s of e){const e=s.indexOf(":"),r=s.indexOf(":",e+1),c=parseInt(s.substring(0,e),10),i=s.substring(e+1,r),f=s.substring(r+1);if(c>=0&&c<n.length)if("e"===i){const e=new q(t,f,n[c]);e.mount(),o.parts.push(e)}else if("a"===i){const e=new P(t,f,n[c]);e.mount(),o.parts.push(e)}}t.removeAttribute("data-kp")}L(t,n,o,e)}const X=new Map;function Y(t){const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=$(t[o]));const o=Object.keys(n);return new Proxy({},{get(t,o){if("symbol"==typeof o)return;const e=n[o];return e?e.value:void 0},set(t,e,s){const r=n[e];return r?r.value=s:(n[e]=$(s),o.push(e)),!0},has:(t,o)=>o in n,ownKeys:()=>o,getOwnPropertyDescriptor(t,o){if(o in n)return{enumerable:!0,configurable:!0}}})}const Z=new Map;function tt(t,n){let o=Z.get(t);return o||(o=new Function("__s__",`with(__s__){return(${t})}`),Z.set(t,o)),o(n)}function nt(t){const n=t.split("."),o=n[0],e=n.slice(1),s=o.indexOf(":");return-1===s?{base:o,arg:null,modifiers:e}:{base:o.substring(0,s),arg:o.substring(s+1),modifiers:e}}function ot(t,n,o,e){const s=M(()=>{const e=tt(n,o);t.style.display=e?"":"none"});e.push(s)}function et(t,n,o,e){const s=M(()=>{t.textContent=String(tt(n,o)??"")});e.push(s)}function st(t,n,o,e){const s=M(()=>{t.innerHTML=String(tt(n,o)??"")});e.push(s)}function rt(t,n,o,e,s){const r=M(()=>{const s=tt(n,e);!1===s||null==s?t.removeAttribute(o):!0===s?t.setAttribute(o,""):t.setAttribute(o,String(s))});s.push(r)}function ct(t,n,o,s,r,c){const i=s.includes("stop"),f=s.includes("prevent"),u=s.includes("once"),l=s.includes("self"),a=o=>{l&&o.target!==t||(i&&o.stopPropagation(),f&&o.preventDefault(),function(t,n){const o="$$"+t;let e=Z.get(o);e||(e=new Function("__s__",`with(__s__){${t}}`),Z.set(o,e)),e(n)}(n,r),e())};t.addEventListener(o,a,{once:u}),c.push(()=>t.removeEventListener(o,a))}function it(t,n,o,s){const r=M(()=>{const e=tt(n,o);t.value=null!=e?String(e):""});s.push(r);const c=()=>{const s=n.trim().split(".");if(1===s.length)o[s[0]]=t.value;else{const e=s.slice(0,-1).join("."),r=s[s.length-1];try{const n=tt(e,o);n&&"object"==typeof n&&(n[r]=t.value)}catch(e){o[n]=t.value}}e()};t.addEventListener("input",c),s.push(()=>t.removeEventListener("input",c))}function ft(t){return t.startsWith("k-")||t.startsWith(":")||t.startsWith("@")}function ut(t){return t.startsWith(":")?"k-bind:"+t.substring(1):t.startsWith("@")?"k-on:"+t.substring(1):t}function lt(t,n,o){const e=[...t.attributes];for(const s of e){const e=s.name,r=s.value;if(!ft(e))continue;const c=ut(e),{base:i,arg:f,modifiers:u}=nt(c);switch(i){case"k-show":ot(t,r,n,o);break;case"k-text":et(t,r,n,o);break;case"k-html":st(t,r,n,o);break;case"k-bind":f&&rt(t,r,f,n,o);break;case"k-on":f&&ct(t,r,f,u,n,o);break;case"k-model":it(t,r,n,o)}}}function at(t,n,o){for(const e of t.children)e.hasAttribute("k-data")||(lt(e,n,o),at(e,n,o))}function pt(t,n){const o=t.getAttribute("k-data");let e={};try{e=tt(o,Y({}))||{}}catch(t){}const s=Y(e);lt(t,s,n),at(t,s,n);for(const o of t.children)o.hasAttribute("k-data")&&pt(o,n)}const ht={"en-US":{"modal.close":"Close","dialog.ok":"OK","dialog.cancel":"Cancel","table.empty":"No data","pagination.page":"Page","pagination.of":"of","select.placeholder":"Select...","datepicker.placeholder":"Select date","timepicker.placeholder":"Select time","fileupload.drag":"Drag files here or","fileupload.browse":"Browse","empty.text":"No data","datepicker.months":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","datepicker.weekdays":"Mo,Tu,We,Th,Fr,Sa,Su","timepicker.placeholder":"Select time"},"zh-CN":{"modal.close":"关闭","dialog.ok":"确定","dialog.cancel":"取消","table.empty":"暂无数据","pagination.page":"页","pagination.of":"/","select.placeholder":"请选择","datepicker.placeholder":"选择日期","datepicker.months":"1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月","datepicker.weekdays":"一,二,三,四,五,六,日","timepicker.placeholder":"选择时间","fileupload.drag":"拖拽文件到此处或","fileupload.browse":"浏览","empty.text":"暂无数据"}};let dt="en-US";exports.ErrorBoundary=function(t,n={}){const{fallback:o=null,onError:e=null}=n;try{return t()}catch(t){if(e)try{e(t)}catch(t){}const n=document.createDocumentFragment();if(o)try{const e="function"==typeof o?o(t):o;if("string"==typeof e){const t=document.createElement("div");t.className="ds-error-boundary",t.textContent=e,n.appendChild(t)}else R(e,n)}catch(o){const e=document.createElement("div");e.className="ds-error-boundary",e.textContent=`Component error: ${t.message}`,n.appendChild(e)}else{const o=document.createElement("div");o.className="ds-error-boundary",o.textContent=`Component error: ${t.message}`,n.appendChild(o)}return{element:n,error:t}}},exports.Signal=T,exports.TemplateResult=C,exports.addMessages=function(t,n){ht[t]||(ht[t]={}),Object.assign(ht[t],n)},exports.batch=function(t){v(S+1);try{return t()}finally{if(v(S-1),0===S){const t=_,n=[...t];t.clear();for(const t of n)t();e()}}},exports.clearRegistry=function(){X.clear()},exports.computed=function(t){const n=new T(void 0);let o=!0,e=new Set;const s={p:null,o:e,i:!0,u:null,h:!1};function r(){for(const t of e)t.t.delete(s);e.clear(),s.o=e,x(s);try{const o=t();Object.is(n.l,o)||(n.l=o)}finally{k()}o=!1}return s.u=()=>{o||(o=!0,j(n))},{get value(){return o&&r(),O(n),n.l},peek:()=>(o&&r(),n.l),toString(){return String(this.value)},toJSON(){return JSON.stringify(this.value)}}},exports.defineComponent=function(t){const{props:n=[],setup:o}=t;function e(t={},e=null){const s={};for(const o of n)s[o]=$(t[o]);const r=o(s,e)(),c=document.createDocumentFragment(),i=R(r,c);return{get element(){return c},_:i,destroy(){i.destroy()},update(t){for(const o of n)o in t&&s[o]&&(s[o].value=t[o])}}}return e.v=!0,e.O=n,e},exports.disableProfiler=function(){s=!1},exports.effect=M,exports.enableProfiler=function(t={}){s=!0,r=performance.now(),c.clear(),i.clear(),f.clear(),u=0,l=0,a=0,p=0,h=0,t.console},exports.flushJobs=e,exports.getComponent=function(t){return X.get(t)},exports.getLocale=function(){return dt},exports.getProfileReport=g,exports.hasComponent=function(t){return X.has(t)},exports.html=function(t,...n){return new C(t,n)},exports.hydrate=function(t,n){const o=new I,e=function(t){const n=[],o=[];let e=!1;for(let s=0;s<t.strings.length;s++)if(o.push(t.strings[s]),e=H(o),s<t.values.length){const r=t.values[s];if(r instanceof C)o.push(G(r));else if(Array.isArray(r)&&r.length>0&&r[0]instanceof C)o.push(r.map(t=>G(t)).join(""));else if("function"==typeof r);else if(z(r))if(e){const t=r.value;o.push(null!=t?J(t):"")}else{n.push(s);const t=r.value;o.push(null!=t?J(t):"")}else o.push(J(r??""))}return{indices:n,nextIdx:0}}(t);return L(n,t.values,o,e),o},exports.lazyComponent=function(t,n="default"){let o=null,e=null;async function s(){return o||(e||(e=t().then(t=>{if("function"==typeof t.default)o=t.default;else if("default"!==n&&"function"==typeof t[n])o=t[n];else{const n=Object.keys(t);for(const e of n)if("function"==typeof t[e]){o=t[e];break}}if(!o)throw new Error("[Kupola lazy] No component factory found in module");return e=null,o}),e))}async function r(...t){return(await s())(...t)}return r.j=t,r.T=()=>null!==o,r.$=s,r},exports.preloadComponent=async function(t){if("function"!=typeof t.$)throw new TypeError("[Kupola preload] Argument must be a lazy component from lazyComponent()");await t.$()},exports.printProfileReport=function(){const t=g();t.signals.length,t.effects.length,t.computeds.length},exports.register=function(t,n){X.set(t,n)},exports.render=R,exports.resetProfiler=function(){s=!1,r=0,c.clear(),i.clear(),f.clear(),a=0,p=0,h=0},exports.resetScheduler=function(){t.clear(),n=!1},exports.setLocale=function(t){dt=t},exports.signal=$,exports.t=function(t,n={}){let o=(ht[dt]||ht["en-US"])[t]||t;for(const[t,e]of Object.entries(n))o=o.replace(`{${t}}`,e);return o},exports.walk=function(t){const n=[];if(t.hasAttribute&&t.hasAttribute("k-data"))pt(t,n);else{const o=t.querySelectorAll?t.querySelectorAll("[k-data]"):[];if(o.length>0)for(const e of o){let o=!1,s=e.parentElement;for(;s&&s!==t;){if(s.hasAttribute("k-data")){o=!0;break}s=s.parentElement}o||pt(e,n)}else{const o=Y({});for(const e of t.children)lt(e,o,n),at(e,o,n)}}return{destroy(){for(const t of n)t();n.length=0}}};
1
+ "use strict";const t=new Set;let n=!1;function o(o){t.add(o),n||(n=!0,queueMicrotask(e))}function e(){for(n=!1;t.size>0;){const n=[...t];t.clear();for(const t of n)t()}}let r=!1,s=0;const c=new Map,i=new Map,f=new Map;let u=0,a=0,l=0,p=0,d=0;const h=new WeakMap;function m(t,n){return h.has(t)?h.get(t):(h.set(t,n),n)}function g(){return r}function y(){const t=s>0?performance.now()-s:0,n=[];for(const[,t]of c)n.push({label:t.label,reads:t.reads,writes:t.writes,triggers:t.triggers});const o=[];for(const[,t]of i){const n=t.runs>0?t.totalTime/t.runs:0;o.push({label:t.label,runs:t.runs,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}const e=[];for(const[,t]of f){const n=t.recomputes>0?t.totalTime/t.recomputes:0;e.push({label:t.label,recomputes:t.recomputes,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}return{duration:Math.round(t),totalTriggers:l,totalEffectRuns:p,totalComputedRecomputes:d,signals:n,effects:o,computeds:e}}let k=null;const w=[];function x(t){w.push(k),k=t}function b(){k=w.pop()??null}let S=0;const _=new Set;function v(t){S=t}function M(t){k&&(t.t.add(k),k.o.add(t))}function O(t){for(const n of t.t)n.i?n.u():S>0?_.add(n.u):o(n.u)}class ${constructor(t){this.l=t,this.t=new Set}get value(){return M(this),g()&&function(t){if(!r)return;const n=m(t,u);c.has(n)||(c.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=u&&(u=n+1)),c.get(n).reads++}(this),this.l}set value(t){Object.is(this.l,t)||(this.l=t,g()&&function(t){if(!r)return;const n=m(t,u);c.has(n)||(c.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=u&&(u=n+1)),c.get(n).writes++}(this),O(this))}peek(){return this.l}toString(){return String(this.l)}toJSON(){return JSON.stringify(this.l)}}function j(t){return new $(t)}function T(t){const n={p:t,o:new Set,u:null,h:!1};return n.u=()=>{n.h||N(n)},N(n),()=>function(t){if(t.h)return;t.h=!0,A(t)}(n)}function N(t){A(t),x(t);try{g()?function(t,n){if(!r)return n();const o=m(t,a);i.has(o)||(i.set(o,{runs:0,totalTime:0,maxTime:0,label:`effect#${o}`}),o>=a&&(a=o+1));const e=i.get(o),s=performance.now(),c=n(),f=performance.now()-s;e.runs++,e.totalTime+=f,f>e.maxTime&&(e.maxTime=f),p++}(t,t.p):t.p()}finally{b()}}function A(t){for(const n of t.o)n.t.delete(t);t.o.clear()}class C{constructor(t,n){this.strings=t,this.values=n}}function J(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function E(t){if(null==t||"object"!=typeof t)return!1;const n=Object.getOwnPropertyDescriptor(t,"value");if(n&&"function"==typeof n.get)return!0;const o=Object.getPrototypeOf(t);if(o){const t=Object.getOwnPropertyDescriptor(o,"value");if(t&&"function"==typeof t.get)return!0}return!1}const F=t=>`຿${t}຿`;function z(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof C?n.push(z(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof C?n.push(e.map(z).join("")):E(e)?n.push(J(e.value)):"function"!=typeof e&&n.push(J(e??""))}return n.join("")}function I(t,n){const o=t.indexOf(n);if(-1===o)return{type:"text"};const e=t.substring(0,o).lastIndexOf("<");if(-1===e)return{type:"text"};if(t.substring(e,o).includes(">"))return{type:"text"};const r=t.substring(e+1,o).match(/([\w\-@:.]+)\s*=\s*(?:"[^"]*|'[^']*|[^\s>]*?)$/);if(!r)return{type:"text"};const s=r[1];return s.startsWith("on")&&s.length>2?{type:"event",attrName:s}:{type:"attr",attrName:s}}class K{constructor(t,n){this.container=t,this.rawValue=n,this.node=null,this.m=null}mount(){const t=document.createTextNode("");if(this.k?this.container.insertBefore(t,this.k):this.container.appendChild(t),this.node=t,E(this.rawValue)){const t=this.rawValue;this.m=T(()=>{this.node.textContent=null!=t.value?String(t.value):""})}else this.rawValue instanceof C?this.node.textContent=z(this.rawValue):this.node.textContent=null!=this.rawValue?String(this.rawValue):""}destroy(){this.m?.(),this.node?.remove()}}class q{constructor(t,n,o){this.element=t,this.attrName=n,this.rawValue=o,this.m=null}mount(){if(E(this.rawValue)){const t=this.rawValue;this.m=T(()=>{const n=t.value;null==n||!1===n?this.element.removeAttribute(this.attrName):this.element.setAttribute(this.attrName,String(n))})}else null!=this.rawValue&&!1!==this.rawValue&&this.element.setAttribute(this.attrName,String(this.rawValue))}destroy(){this.m?.()}}class D{constructor(t,n,o){this.element=t,this.eventName=n.slice(2).toLowerCase(),this.handler=o,this.S=null}mount(){"function"==typeof this.handler&&(this.S=t=>this.handler(t),this.element.addEventListener(this.eventName,this.S))}destroy(){this.S&&(this.element.removeEventListener(this.eventName,this.S),this.S=null)}}class P{constructor(){this.parts=[],this.fragment=null}destroy(){for(const t of this.parts)t.destroy();this.parts.length=0}}function R(t,n){const o=new P,e=function(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof C?n.push(z(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof C?n.push(e.map(z).join("")):"function"==typeof e||E(e)?n.push(F(o)):n.push(J(e??""))}return n.join("")}(t),r=function(t){const n=document.createElement("template");return n.innerHTML=t,n.content}(e);o.fragment=r,U(r,t.values,e,o);for(const t of o.parts)t.mount();return n.appendChild(r),o}function U(t,n,o,e){const r=[...t.childNodes];for(const s of r)3===s.nodeType?W(s,n,o,e,t):1===s.nodeType&&B(s,n,o,e)}function W(t,n,o,e,r){const s=t.textContent||"";for(let c=0;c<n.length;c++){const i=F(c),f=s.indexOf(i);if(-1===f)continue;if("text"!==I(o,i).type)continue;const u=s.substring(0,f),a=s.substring(f+i.length);u&&r.insertBefore(document.createTextNode(u),t);const l=new K(r,n[c]);e.parts.push(l);let p=t;return a&&(p=document.createTextNode(a),r.insertBefore(p,t)),r.removeChild(t),l.k=p!==t?p:null,void(a&&W(p,n,o,e,r))}}function B(t,n,o,e){const r=[...t.attributes];for(const s of r)for(let r=0;r<n.length;r++){const c=F(r);if(!s.value.includes(c))continue;const i=I(o,c);if("event"===i.type&&i.attrName===s.name){t.removeAttribute(s.name);const o=new D(t,s.name,n[r]);e.parts.push(o)}else if("attr"===i.type&&i.attrName===s.name){const o=s.value.replace(c,"");o?t.setAttribute(s.name,o):t.removeAttribute(s.name);const i=new q(t,s.name,n[r]);e.parts.push(i)}}U(t,n,o,e)}function G(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof C?n.push(G(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof C?n.push(e.map(t=>G(t)).join("")):E(e)?n.push(J(e.value)):"function"!=typeof e&&n.push(J(e??""))}return n.join("")}function H(t){const n=t.join("");let o=!1,e="",r=-1,s=!1;for(let t=0;t<n.length;t++){const c=n[t];o?c===e&&(o=!1):'"'===c||"'"===c?(o=!0,e=c):"<"===c?(r=t,s=!1):">"===c&&r>=0&&!o&&(s=!0)}return r>=0&&!s}function L(t,n,o,e){const r=[...t.childNodes];for(const s of r)8===s.nodeType?Q(s,n,t,o,e):1===s.nodeType&&V(s,n,o,e)}function Q(t,n,o,e,r){const s=r.indices[r.nextIdx++]??-1,c=t.previousSibling;let i;if(c&&3===c.nodeType?i=c:(i=document.createTextNode(""),o.insertBefore(i,t)),s>=0&&s<n.length){const t=n[s];if(E(t)){const n=T(()=>{i.textContent=null!=t.value?String(t.value):""});e.parts.push({destroy(){n(),i.remove()}})}else i.textContent=null!=t?String(t):""}o.removeChild(t)}function V(t,n,o,e){const r=t.getAttribute("data-kp");if(r){const e=r.split(",");for(const r of e){const e=r.indexOf(":"),s=r.indexOf(":",e+1),c=parseInt(r.substring(0,e),10),i=r.substring(e+1,s),f=r.substring(s+1);if(c>=0&&c<n.length)if("e"===i){const e=new D(t,f,n[c]);e.mount(),o.parts.push(e)}else if("a"===i){const e=new q(t,f,n[c]);e.mount(),o.parts.push(e)}}t.removeAttribute("data-kp")}L(t,n,o,e)}const X=new Map;function Y(t){const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=j(t[o]));const o=Object.keys(n);return new Proxy({},{get(t,o){if("symbol"==typeof o)return;const e=n[o];return e?e.value:void 0},set(t,e,r){const s=n[e];return s?s.value=r:(n[e]=j(r),o.push(e)),!0},has:(t,o)=>o in n,ownKeys:()=>o,getOwnPropertyDescriptor(t,o){if(o in n)return{enumerable:!0,configurable:!0}}})}const Z=new Map;function tt(t,n){let o=Z.get(t);return o||(o=new Function("__s__",`with(__s__){return(${t})}`),Z.set(t,o)),o(n)}function nt(t){const n=t.split("."),o=n[0],e=n.slice(1),r=o.indexOf(":");return-1===r?{base:o,arg:null,modifiers:e}:{base:o.substring(0,r),arg:o.substring(r+1),modifiers:e}}function ot(t,n,o,e){const r=T(()=>{const e=tt(n,o);t.style.display=e?"":"none"});e.push(r)}function et(t,n,o,e){const r=T(()=>{t.textContent=String(tt(n,o)??"")});e.push(r)}function rt(t,n,o,e){const r=T(()=>{t.innerHTML=String(tt(n,o)??"")});e.push(r)}function st(t,n,o,e,r){const s=T(()=>{const r=tt(n,e);!1===r||null==r?t.removeAttribute(o):!0===r?t.setAttribute(o,""):t.setAttribute(o,String(r))});r.push(s)}function ct(t,n,o,r,s,c){const i=r.includes("stop"),f=r.includes("prevent"),u=r.includes("once"),a=r.includes("self"),l=o=>{a&&o.target!==t||(i&&o.stopPropagation(),f&&o.preventDefault(),function(t,n){const o="$$"+t;let e=Z.get(o);e||(e=new Function("__s__",`with(__s__){${t}}`),Z.set(o,e)),e(n)}(n,s),e())};t.addEventListener(o,l,{once:u}),c.push(()=>t.removeEventListener(o,l))}function it(t,n,o,r){const s=T(()=>{const e=tt(n,o);t.value=null!=e?String(e):""});r.push(s);const c=()=>{const r=n.trim().split(".");if(1===r.length)o[r[0]]=t.value;else{const e=r.slice(0,-1).join("."),s=r[r.length-1];try{const n=tt(e,o);n&&"object"==typeof n&&(n[s]=t.value)}catch(e){o[n]=t.value}}e()};t.addEventListener("input",c),r.push(()=>t.removeEventListener("input",c))}function ft(t){return t.startsWith("k-")||t.startsWith(":")||t.startsWith("@")}function ut(t){return t.startsWith(":")?"k-bind:"+t.substring(1):t.startsWith("@")?"k-on:"+t.substring(1):t}function at(t,n,o){const e=[...t.attributes];for(const r of e){const e=r.name,s=r.value;if(!ft(e))continue;const c=ut(e),{base:i,arg:f,modifiers:u}=nt(c);switch(i){case"k-show":ot(t,s,n,o);break;case"k-text":et(t,s,n,o);break;case"k-html":rt(t,s,n,o);break;case"k-bind":f&&st(t,s,f,n,o);break;case"k-on":f&&ct(t,s,f,u,n,o);break;case"k-model":it(t,s,n,o)}}}function lt(t,n,o){for(const e of t.children)e.hasAttribute("k-data")||(at(e,n,o),lt(e,n,o))}function pt(t,n){const o=t.getAttribute("k-data");let e={};try{e=tt(o,Y({}))||{}}catch(t){}const r=Y(e);at(t,r,n),lt(t,r,n);for(const o of t.children)o.hasAttribute("k-data")&&pt(o,n)}const dt={"en-US":{"modal.close":"Close","dialog.ok":"OK","dialog.cancel":"Cancel","table.empty":"No data","pagination.page":"Page","pagination.of":"of","select.placeholder":"Select...","datepicker.placeholder":"Select date","timepicker.placeholder":"Select time","fileupload.drag":"Drag files here or","fileupload.browse":"Browse","empty.text":"No data","datepicker.months":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","datepicker.weekdays":"Mo,Tu,We,Th,Fr,Sa,Su","timepicker.placeholder":"Select time"},"zh-CN":{"modal.close":"关闭","dialog.ok":"确定","dialog.cancel":"取消","table.empty":"暂无数据","pagination.page":"页","pagination.of":"/","select.placeholder":"请选择","datepicker.placeholder":"选择日期","datepicker.months":"1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月","datepicker.weekdays":"一,二,三,四,五,六,日","timepicker.placeholder":"选择时间","fileupload.drag":"拖拽文件到此处或","fileupload.browse":"浏览","empty.text":"暂无数据"}};let ht="en-US";const mt="kupola-theme",gt=["light","dark"],yt=new Set;function kt(){if("undefined"!=typeof localStorage){const t=localStorage.getItem(mt);if(t&&gt.includes(t))return t}return"undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function wt(t){if(!gt.includes(t))throw new Error(`Invalid theme "${t}". Must be one of: ${gt.join(", ")}`);document.documentElement.dataset.theme=t,"undefined"!=typeof localStorage&&localStorage.setItem(mt,t);for(const n of yt)try{n(t)}catch{}}exports.ErrorBoundary=function(t,n={}){const{fallback:o=null,onError:e=null}=n;try{return t()}catch(t){if(e)try{e(t)}catch(t){}const n=document.createDocumentFragment();if(o)try{const e="function"==typeof o?o(t):o;if("string"==typeof e){const t=document.createElement("div");t.className="ds-error-boundary",t.textContent=e,n.appendChild(t)}else R(e,n)}catch(o){const e=document.createElement("div");e.className="ds-error-boundary",e.textContent=`Component error: ${t.message}`,n.appendChild(e)}else{const o=document.createElement("div");o.className="ds-error-boundary",o.textContent=`Component error: ${t.message}`,n.appendChild(o)}return{element:n,error:t}}},exports.Signal=$,exports.TemplateResult=C,exports.addMessages=function(t,n){dt[t]||(dt[t]={}),Object.assign(dt[t],n)},exports.batch=function(t){v(S+1);try{return t()}finally{if(v(S-1),0===S){const t=_,n=[...t];t.clear();for(const t of n)t();e()}}},exports.clearRegistry=function(){X.clear()},exports.computed=function(t){const n=new $(void 0);let o=!0,e=new Set;const r={p:null,o:e,i:!0,u:null,h:!1};function s(){for(const t of e)t.t.delete(r);e.clear(),r.o=e,x(r);try{const o=t();Object.is(n.l,o)||(n.l=o)}finally{b()}o=!1}return r.u=()=>{o||(o=!0,O(n))},{get value(){return o&&s(),M(n),n.l},peek:()=>(o&&s(),n.l),toString(){return String(this.value)},toJSON(){return JSON.stringify(this.value)}}},exports.defineComponent=function(t){const{props:n=[],setup:o}=t;function e(t={},e=null){const r={};for(const o of n)r[o]=j(t[o]);const s=o(r,e)(),c=document.createDocumentFragment(),i=R(s,c);return{get element(){return c},_:i,destroy(){i.destroy()},update(t){for(const o of n)o in t&&r[o]&&(r[o].value=t[o])}}}return e.v=!0,e.M=n,e},exports.disableProfiler=function(){r=!1},exports.effect=T,exports.enableProfiler=function(t={}){r=!0,s=performance.now(),c.clear(),i.clear(),f.clear(),u=0,a=0,l=0,p=0,d=0,t.console},exports.flushJobs=e,exports.getComponent=function(t){return X.get(t)},exports.getLocale=function(){return ht},exports.getPreferredTheme=kt,exports.getProfileReport=y,exports.getThemeInlineScript=function(){return"<script>(function(){var t=localStorage.getItem('kupola-theme');if(!t){t=window.matchMedia&&window.matchMedia('(prefers-color-scheme:light)').matches?'light':'dark';}document.documentElement.dataset.theme=t;})()<\/script>"},exports.hasComponent=function(t){return X.has(t)},exports.html=function(t,...n){return new C(t,n)},exports.hydrate=function(t,n){const o=new P,e=function(t){const n=[],o=[];let e=!1;for(let r=0;r<t.strings.length;r++)if(o.push(t.strings[r]),e=H(o),r<t.values.length){const s=t.values[r];if(s instanceof C)o.push(G(s));else if(Array.isArray(s)&&s.length>0&&s[0]instanceof C)o.push(s.map(t=>G(t)).join(""));else if("function"==typeof s);else if(E(s))if(e){const t=s.value;o.push(null!=t?J(t):"")}else{n.push(r);const t=s.value;o.push(null!=t?J(t):"")}else o.push(J(s??""))}return{indices:n,nextIdx:0}}(t);return L(n,t.values,o,e),o},exports.lazyComponent=function(t,n="default"){let o=null,e=null;async function r(){return o||(e||(e=t().then(t=>{if("function"==typeof t.default)o=t.default;else if("default"!==n&&"function"==typeof t[n])o=t[n];else{const n=Object.keys(t);for(const e of n)if("function"==typeof t[e]){o=t[e];break}}if(!o)throw new Error("[Kupola lazy] No component factory found in module");return e=null,o}),e))}async function s(...t){return(await r())(...t)}return s.O=t,s.$=()=>null!==o,s.j=r,s},exports.onThemeChange=function(t){return yt.add(t),()=>yt.delete(t)},exports.preloadComponent=async function(t){if("function"!=typeof t.j)throw new TypeError("[Kupola preload] Argument must be a lazy component from lazyComponent()");await t.j()},exports.printProfileReport=function(){const t=y();t.signals.length,t.effects.length,t.computeds.length},exports.register=function(t,n){X.set(t,n)},exports.render=R,exports.resetProfiler=function(){r=!1,s=0,c.clear(),i.clear(),f.clear(),l=0,p=0,d=0},exports.resetScheduler=function(){t.clear(),n=!1},exports.setLocale=function(t){ht=t},exports.setTheme=wt,exports.signal=j,exports.t=function(t,n={}){let o=(dt[ht]||dt["en-US"])[t]||t;for(const[t,e]of Object.entries(n))o=o.replace(`{${t}}`,e);return o},exports.themePreload=function(){const t=kt();document.documentElement.dataset.theme=t,requestAnimationFrame(()=>{const t=document.querySelectorAll("[k-cloak]");for(const n of t)n.removeAttribute("k-cloak")}),"undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: light)").addEventListener("change",t=>{"undefined"==typeof localStorage||localStorage.getItem(mt)||wt(t.matches?"light":"dark")})},exports.toggleTheme=function(){const t="dark"===(document.documentElement.dataset.theme||"dark")?"light":"dark";return wt(t),t},exports.walk=function(t){const n=[];if(t.hasAttribute&&t.hasAttribute("k-data"))pt(t,n);else{const o=t.querySelectorAll?t.querySelectorAll("[k-data]"):[];if(o.length>0)for(const e of o){let o=!1,r=e.parentElement;for(;r&&r!==t;){if(r.hasAttribute("k-data")){o=!0;break}r=r.parentElement}o||pt(e,n)}else{const o=Y({});for(const e of t.children)at(e,o,n),lt(e,o,n)}}return{destroy(){for(const t of n)t();n.length=0}}};
@@ -1 +1 @@
1
- const t=new Set;let n=!1;function o(o){t.add(o),n||(n=!0,queueMicrotask(e))}function e(){for(n=!1;t.size>0;){const n=[...t];t.clear();for(const t of n)t()}}function c(){t.clear(),n=!1}let s=!1,r=0;const i=new Map,f=new Map,u=new Map;let l=0,a=0,h=0,p=0,d=0;const m=new WeakMap;function y(t,n){return m.has(t)?m.get(t):(m.set(t,n),n)}function g(t={}){s=!0,r=performance.now(),i.clear(),f.clear(),u.clear(),l=0,a=0,h=0,p=0,d=0,t.console}function w(){s=!1}function b(){s=!1,r=0,i.clear(),f.clear(),u.clear(),h=0,p=0,d=0}function k(){return s}function S(){const t=r>0?performance.now()-r:0,n=[];for(const[,t]of i)n.push({label:t.label,reads:t.reads,writes:t.writes,triggers:t.triggers});const o=[];for(const[,t]of f){const n=t.runs>0?t.totalTime/t.runs:0;o.push({label:t.label,runs:t.runs,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}const e=[];for(const[,t]of u){const n=t.recomputes>0?t.totalTime/t.recomputes:0;e.push({label:t.label,recomputes:t.recomputes,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}return{duration:Math.round(t),totalTriggers:h,totalEffectRuns:p,totalComputedRecomputes:d,signals:n,effects:o,computeds:e}}function _(){const t=S();t.signals.length,t.effects.length,t.computeds.length}let v=null;const O=[];function x(t){O.push(v),v=t}function j(){v=O.pop()??null}let T=0;const $=new Set;function M(t){T=t}function N(t){v&&(t.t.add(v),v.o.add(t))}function A(t){for(const n of t.t)n.i?n.u():T>0?$.add(n.u):o(n.u)}class C{constructor(t){this.l=t,this.t=new Set}get value(){return N(this),k()&&function(t){if(!s)return;const n=y(t,l);i.has(n)||(i.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=l&&(l=n+1)),i.get(n).reads++}(this),this.l}set value(t){Object.is(this.l,t)||(this.l=t,k()&&function(t){if(!s)return;const n=y(t,l);i.has(n)||(i.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=l&&(l=n+1)),i.get(n).writes++}(this),A(this))}peek(){return this.l}toString(){return String(this.l)}toJSON(){return JSON.stringify(this.l)}}function J(t){return new C(t)}function z(t){const n=new C(void 0);let o=!0,e=new Set;const c={h:null,o:e,i:!0,u:null,p:!1};function s(){for(const t of e)t.t.delete(c);e.clear(),c.o=e,x(c);try{const o=t();Object.is(n.l,o)||(n.l=o)}finally{j()}o=!1}return c.u=()=>{o||(o=!0,A(n))},{get value(){return o&&s(),N(n),n.l},peek:()=>(o&&s(),n.l),toString(){return String(this.value)},toJSON(){return JSON.stringify(this.value)}}}function E(t){const n={h:t,o:new Set,u:null,p:!1};return n.u=()=>{n.p||F(n)},F(n),()=>function(t){if(t.p)return;t.p=!0,K(t)}(n)}function F(t){K(t),x(t);try{k()?function(t,n){if(!s)return n();const o=y(t,a);f.has(o)||(f.set(o,{runs:0,totalTime:0,maxTime:0,label:`effect#${o}`}),o>=a&&(a=o+1));const e=f.get(o),c=performance.now(),r=n(),i=performance.now()-c;e.runs++,e.totalTime+=i,i>e.maxTime&&(e.maxTime=i),p++}(t,t.h):t.h()}finally{j()}}function K(t){for(const n of t.o)n.t.delete(t);t.o.clear()}function D(t){M(T+1);try{return t()}finally{if(M(T-1),0===T){const t=$,n=[...t];t.clear();for(const t of n)t();e()}}}class P{constructor(t,n){this.strings=t,this.values=n}}function q(t,...n){return new P(t,n)}function I(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function R(t){if(null==t||"object"!=typeof t)return!1;const n=Object.getOwnPropertyDescriptor(t,"value");if(n&&"function"==typeof n.get)return!0;const o=Object.getPrototypeOf(t);if(o){const t=Object.getOwnPropertyDescriptor(o,"value");if(t&&"function"==typeof t.get)return!0}return!1}const U=t=>`຿${t}຿`;function W(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof P?n.push(W(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof P?n.push(e.map(W).join("")):R(e)?n.push(I(e.value)):"function"!=typeof e&&n.push(I(e??""))}return n.join("")}function B(t,n){const o=t.indexOf(n);if(-1===o)return{type:"text"};const e=t.substring(0,o).lastIndexOf("<");if(-1===e)return{type:"text"};if(t.substring(e,o).includes(">"))return{type:"text"};const c=t.substring(e+1,o).match(/([\w\-@:.]+)\s*=\s*(?:"[^"]*|'[^']*|[^\s>]*?)$/);if(!c)return{type:"text"};const s=c[1];return s.startsWith("on")&&s.length>2?{type:"event",attrName:s}:{type:"attr",attrName:s}}class G{constructor(t,n){this.container=t,this.rawValue=n,this.node=null,this.m=null}mount(){const t=document.createTextNode("");if(this.k?this.container.insertBefore(t,this.k):this.container.appendChild(t),this.node=t,R(this.rawValue)){const t=this.rawValue;this.m=E(()=>{this.node.textContent=null!=t.value?String(t.value):""})}else this.rawValue instanceof P?this.node.textContent=W(this.rawValue):this.node.textContent=null!=this.rawValue?String(this.rawValue):""}destroy(){this.m?.(),this.node?.remove()}}class H{constructor(t,n,o){this.element=t,this.attrName=n,this.rawValue=o,this.m=null}mount(){if(R(this.rawValue)){const t=this.rawValue;this.m=E(()=>{const n=t.value;null==n||!1===n?this.element.removeAttribute(this.attrName):this.element.setAttribute(this.attrName,String(n))})}else null!=this.rawValue&&!1!==this.rawValue&&this.element.setAttribute(this.attrName,String(this.rawValue))}destroy(){this.m?.()}}class L{constructor(t,n,o){this.element=t,this.eventName=n.slice(2).toLowerCase(),this.handler=o,this.S=null}mount(){"function"==typeof this.handler&&(this.S=t=>this.handler(t),this.element.addEventListener(this.eventName,this.S))}destroy(){this.S&&(this.element.removeEventListener(this.eventName,this.S),this.S=null)}}class Q{constructor(){this.parts=[],this.fragment=null}destroy(){for(const t of this.parts)t.destroy();this.parts.length=0}}function V(t,n){const o=new Q,e=function(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof P?n.push(W(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof P?n.push(e.map(W).join("")):"function"==typeof e||R(e)?n.push(U(o)):n.push(I(e??""))}return n.join("")}(t),c=function(t){const n=document.createElement("template");return n.innerHTML=t,n.content}(e);o.fragment=c,X(c,t.values,e,o);for(const t of o.parts)t.mount();return n.appendChild(c),o}function X(t,n,o,e){const c=[...t.childNodes];for(const s of c)3===s.nodeType?Y(s,n,o,e,t):1===s.nodeType&&Z(s,n,o,e)}function Y(t,n,o,e,c){const s=t.textContent||"";for(let r=0;r<n.length;r++){const i=U(r),f=s.indexOf(i);if(-1===f)continue;if("text"!==B(o,i).type)continue;const u=s.substring(0,f),l=s.substring(f+i.length);u&&c.insertBefore(document.createTextNode(u),t);const a=new G(c,n[r]);e.parts.push(a);let h=t;return l&&(h=document.createTextNode(l),c.insertBefore(h,t)),c.removeChild(t),a.k=h!==t?h:null,void(l&&Y(h,n,o,e,c))}}function Z(t,n,o,e){const c=[...t.attributes];for(const s of c)for(let c=0;c<n.length;c++){const r=U(c);if(!s.value.includes(r))continue;const i=B(o,r);if("event"===i.type&&i.attrName===s.name){t.removeAttribute(s.name);const o=new L(t,s.name,n[c]);e.parts.push(o)}else if("attr"===i.type&&i.attrName===s.name){const o=s.value.replace(r,"");o?t.setAttribute(s.name,o):t.removeAttribute(s.name);const i=new H(t,s.name,n[c]);e.parts.push(i)}}X(t,n,o,e)}function tt(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof P?n.push(tt(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof P?n.push(e.map(t=>tt(t)).join("")):R(e)?n.push(I(e.value)):"function"!=typeof e&&n.push(I(e??""))}return n.join("")}function nt(t){const n=t.join("");let o=!1,e="",c=-1,s=!1;for(let t=0;t<n.length;t++){const r=n[t];o?r===e&&(o=!1):'"'===r||"'"===r?(o=!0,e=r):"<"===r?(c=t,s=!1):">"===r&&c>=0&&!o&&(s=!0)}return c>=0&&!s}function ot(t,n){const o=new Q,e=function(t){const n=[],o=[];let e=!1;for(let c=0;c<t.strings.length;c++)if(o.push(t.strings[c]),e=nt(o),c<t.values.length){const s=t.values[c];if(s instanceof P)o.push(tt(s));else if(Array.isArray(s)&&s.length>0&&s[0]instanceof P)o.push(s.map(t=>tt(t)).join(""));else if("function"==typeof s);else if(R(s))if(e){const t=s.value;o.push(null!=t?I(t):"")}else{n.push(c);const t=s.value;o.push(null!=t?I(t):"")}else o.push(I(s??""))}return{indices:n,nextIdx:0}}(t);return et(n,t.values,o,e),o}function et(t,n,o,e){const c=[...t.childNodes];for(const s of c)8===s.nodeType?ct(s,n,t,o,e):1===s.nodeType&&st(s,n,o,e)}function ct(t,n,o,e,c){const s=c.indices[c.nextIdx++]??-1,r=t.previousSibling;let i;if(r&&3===r.nodeType?i=r:(i=document.createTextNode(""),o.insertBefore(i,t)),s>=0&&s<n.length){const t=n[s];if(R(t)){const n=E(()=>{i.textContent=null!=t.value?String(t.value):""});e.parts.push({destroy(){n(),i.remove()}})}else i.textContent=null!=t?String(t):""}o.removeChild(t)}function st(t,n,o,e){const c=t.getAttribute("data-kp");if(c){const e=c.split(",");for(const c of e){const e=c.indexOf(":"),s=c.indexOf(":",e+1),r=parseInt(c.substring(0,e),10),i=c.substring(e+1,s),f=c.substring(s+1);if(r>=0&&r<n.length)if("e"===i){const e=new L(t,f,n[r]);e.mount(),o.parts.push(e)}else if("a"===i){const e=new H(t,f,n[r]);e.mount(),o.parts.push(e)}}t.removeAttribute("data-kp")}et(t,n,o,e)}function rt(t){const{props:n=[],setup:o}=t;function e(t={},e=null){const c={};for(const o of n)c[o]=J(t[o]);const s=o(c,e)(),r=document.createDocumentFragment(),i=V(s,r);return{get element(){return r},_:i,destroy(){i.destroy()},update(t){for(const o of n)o in t&&c[o]&&(c[o].value=t[o])}}}return e.v=!0,e.O=n,e}const it=new Map;function ft(t,n){it.set(t,n)}function ut(t){return it.get(t)}function lt(t){return it.has(t)}function at(){it.clear()}function ht(t){const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=J(t[o]));const o=Object.keys(n);return new Proxy({},{get(t,o){if("symbol"==typeof o)return;const e=n[o];return e?e.value:void 0},set(t,e,c){const s=n[e];return s?s.value=c:(n[e]=J(c),o.push(e)),!0},has:(t,o)=>o in n,ownKeys:()=>o,getOwnPropertyDescriptor(t,o){if(o in n)return{enumerable:!0,configurable:!0}}})}const pt=new Map;function dt(t,n){let o=pt.get(t);return o||(o=new Function("__s__",`with(__s__){return(${t})}`),pt.set(t,o)),o(n)}function mt(t){const n=t.split("."),o=n[0],e=n.slice(1),c=o.indexOf(":");return-1===c?{base:o,arg:null,modifiers:e}:{base:o.substring(0,c),arg:o.substring(c+1),modifiers:e}}function yt(t,n,o,e){const c=E(()=>{const e=dt(n,o);t.style.display=e?"":"none"});e.push(c)}function gt(t,n,o,e){const c=E(()=>{t.textContent=String(dt(n,o)??"")});e.push(c)}function wt(t,n,o,e){const c=E(()=>{t.innerHTML=String(dt(n,o)??"")});e.push(c)}function bt(t,n,o,e,c){const s=E(()=>{const c=dt(n,e);!1===c||null==c?t.removeAttribute(o):!0===c?t.setAttribute(o,""):t.setAttribute(o,String(c))});c.push(s)}function kt(t,n,o,c,s,r){const i=c.includes("stop"),f=c.includes("prevent"),u=c.includes("once"),l=c.includes("self"),a=o=>{l&&o.target!==t||(i&&o.stopPropagation(),f&&o.preventDefault(),function(t,n){const o="$$"+t;let e=pt.get(o);e||(e=new Function("__s__",`with(__s__){${t}}`),pt.set(o,e)),e(n)}(n,s),e())};t.addEventListener(o,a,{once:u}),r.push(()=>t.removeEventListener(o,a))}function St(t,n,o,c){const s=E(()=>{const e=dt(n,o);t.value=null!=e?String(e):""});c.push(s);const r=()=>{const c=n.trim().split(".");if(1===c.length)o[c[0]]=t.value;else{const e=c.slice(0,-1).join("."),s=c[c.length-1];try{const n=dt(e,o);n&&"object"==typeof n&&(n[s]=t.value)}catch(e){o[n]=t.value}}e()};t.addEventListener("input",r),c.push(()=>t.removeEventListener("input",r))}function _t(t){return t.startsWith("k-")||t.startsWith(":")||t.startsWith("@")}function vt(t){return t.startsWith(":")?"k-bind:"+t.substring(1):t.startsWith("@")?"k-on:"+t.substring(1):t}function Ot(t,n,o){const e=[...t.attributes];for(const c of e){const e=c.name,s=c.value;if(!_t(e))continue;const r=vt(e),{base:i,arg:f,modifiers:u}=mt(r);switch(i){case"k-show":yt(t,s,n,o);break;case"k-text":gt(t,s,n,o);break;case"k-html":wt(t,s,n,o);break;case"k-bind":f&&bt(t,s,f,n,o);break;case"k-on":f&&kt(t,s,f,u,n,o);break;case"k-model":St(t,s,n,o)}}}function xt(t,n,o){for(const e of t.children)e.hasAttribute("k-data")||(Ot(e,n,o),xt(e,n,o))}function jt(t,n){const o=t.getAttribute("k-data");let e={};try{e=dt(o,ht({}))||{}}catch(t){}const c=ht(e);Ot(t,c,n),xt(t,c,n);for(const o of t.children)o.hasAttribute("k-data")&&jt(o,n)}function Tt(t){const n=[];if(t.hasAttribute&&t.hasAttribute("k-data"))jt(t,n);else{const o=t.querySelectorAll?t.querySelectorAll("[k-data]"):[];if(o.length>0)for(const e of o){let o=!1,c=e.parentElement;for(;c&&c!==t;){if(c.hasAttribute("k-data")){o=!0;break}c=c.parentElement}o||jt(e,n)}else{const o=ht({});for(const e of t.children)Ot(e,o,n),xt(e,o,n)}}return{destroy(){for(const t of n)t();n.length=0}}}const $t={"en-US":{"modal.close":"Close","dialog.ok":"OK","dialog.cancel":"Cancel","table.empty":"No data","pagination.page":"Page","pagination.of":"of","select.placeholder":"Select...","datepicker.placeholder":"Select date","timepicker.placeholder":"Select time","fileupload.drag":"Drag files here or","fileupload.browse":"Browse","empty.text":"No data","datepicker.months":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","datepicker.weekdays":"Mo,Tu,We,Th,Fr,Sa,Su","timepicker.placeholder":"Select time"},"zh-CN":{"modal.close":"关闭","dialog.ok":"确定","dialog.cancel":"取消","table.empty":"暂无数据","pagination.page":"页","pagination.of":"/","select.placeholder":"请选择","datepicker.placeholder":"选择日期","datepicker.months":"1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月","datepicker.weekdays":"一,二,三,四,五,六,日","timepicker.placeholder":"选择时间","fileupload.drag":"拖拽文件到此处或","fileupload.browse":"浏览","empty.text":"暂无数据"}};let Mt="en-US";function Nt(t){Mt=t}function At(){return Mt}function Ct(t,n={}){let o=($t[Mt]||$t["en-US"])[t]||t;for(const[t,e]of Object.entries(n))o=o.replace(`{${t}}`,e);return o}function Jt(t,n){$t[t]||($t[t]={}),Object.assign($t[t],n)}function zt(t,n={}){const{fallback:o=null,onError:e=null}=n;try{return t()}catch(t){if(e)try{e(t)}catch(t){}const n=document.createDocumentFragment();if(o)try{const e="function"==typeof o?o(t):o;if("string"==typeof e){const t=document.createElement("div");t.className="ds-error-boundary",t.textContent=e,n.appendChild(t)}else V(e,n)}catch(o){const e=document.createElement("div");e.className="ds-error-boundary",e.textContent=`Component error: ${t.message}`,n.appendChild(e)}else{const o=document.createElement("div");o.className="ds-error-boundary",o.textContent=`Component error: ${t.message}`,n.appendChild(o)}return{element:n,error:t}}}function Et(t,n="default"){let o=null,e=null;async function c(){return o||(e||(e=t().then(t=>{if("function"==typeof t.default)o=t.default;else if("default"!==n&&"function"==typeof t[n])o=t[n];else{const n=Object.keys(t);for(const e of n)if("function"==typeof t[e]){o=t[e];break}}if(!o)throw new Error("[Kupola lazy] No component factory found in module");return e=null,o}),e))}async function s(...t){return(await c())(...t)}return s.j=t,s.T=()=>null!==o,s.$=c,s}async function Ft(t){if("function"!=typeof t.$)throw new TypeError("[Kupola preload] Argument must be a lazy component from lazyComponent()");await t.$()}export{zt as ErrorBoundary,C as Signal,P as TemplateResult,Jt as addMessages,D as batch,at as clearRegistry,z as computed,rt as defineComponent,w as disableProfiler,E as effect,g as enableProfiler,e as flushJobs,ut as getComponent,At as getLocale,S as getProfileReport,lt as hasComponent,q as html,ot as hydrate,Et as lazyComponent,Ft as preloadComponent,_ as printProfileReport,ft as register,V as render,b as resetProfiler,c as resetScheduler,Nt as setLocale,J as signal,Ct as t,Tt as walk};
1
+ const t=new Set;let n=!1;function o(o){t.add(o),n||(n=!0,queueMicrotask(e))}function e(){for(n=!1;t.size>0;){const n=[...t];t.clear();for(const t of n)t()}}function c(){t.clear(),n=!1}let r=!1,s=0;const i=new Map,f=new Map,u=new Map;let a=0,l=0,d=0,h=0,p=0;const m=new WeakMap;function g(t,n){return m.has(t)?m.get(t):(m.set(t,n),n)}function y(t={}){r=!0,s=performance.now(),i.clear(),f.clear(),u.clear(),a=0,l=0,d=0,h=0,p=0,t.console}function k(){r=!1}function w(){r=!1,s=0,i.clear(),f.clear(),u.clear(),d=0,h=0,p=0}function b(){return r}function S(){const t=s>0?performance.now()-s:0,n=[];for(const[,t]of i)n.push({label:t.label,reads:t.reads,writes:t.writes,triggers:t.triggers});const o=[];for(const[,t]of f){const n=t.runs>0?t.totalTime/t.runs:0;o.push({label:t.label,runs:t.runs,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}const e=[];for(const[,t]of u){const n=t.recomputes>0?t.totalTime/t.recomputes:0;e.push({label:t.label,recomputes:t.recomputes,totalTime:t.totalTime.toFixed(2)+"ms",maxTime:t.maxTime.toFixed(3)+"ms",avgTime:n.toFixed(3)+"ms"})}return{duration:Math.round(t),totalTriggers:d,totalEffectRuns:h,totalComputedRecomputes:p,signals:n,effects:o,computeds:e}}function _(){const t=S();t.signals.length,t.effects.length,t.computeds.length}let v=null;const M=[];function O(t){M.push(v),v=t}function x(){v=M.pop()??null}let $=0;const j=new Set;function T(t){$=t}function N(t){v&&(t.t.add(v),v.o.add(t))}function A(t){for(const n of t.t)n.i?n.u():$>0?j.add(n.u):o(n.u)}class C{constructor(t){this.l=t,this.t=new Set}get value(){return N(this),b()&&function(t){if(!r)return;const n=g(t,a);i.has(n)||(i.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=a&&(a=n+1)),i.get(n).reads++}(this),this.l}set value(t){Object.is(this.l,t)||(this.l=t,b()&&function(t){if(!r)return;const n=g(t,a);i.has(n)||(i.set(n,{reads:0,writes:0,triggers:0,label:`signal#${n}`}),n>=a&&(a=n+1)),i.get(n).writes++}(this),A(this))}peek(){return this.l}toString(){return String(this.l)}toJSON(){return JSON.stringify(this.l)}}function J(t){return new C(t)}function E(t){const n=new C(void 0);let o=!0,e=new Set;const c={h:null,o:e,i:!0,u:null,p:!1};function r(){for(const t of e)t.t.delete(c);e.clear(),c.o=e,O(c);try{const o=t();Object.is(n.l,o)||(n.l=o)}finally{x()}o=!1}return c.u=()=>{o||(o=!0,A(n))},{get value(){return o&&r(),N(n),n.l},peek:()=>(o&&r(),n.l),toString(){return String(this.value)},toJSON(){return JSON.stringify(this.value)}}}function F(t){const n={h:t,o:new Set,u:null,p:!1};return n.u=()=>{n.p||z(n)},z(n),()=>function(t){if(t.p)return;t.p=!0,I(t)}(n)}function z(t){I(t),O(t);try{b()?function(t,n){if(!r)return n();const o=g(t,l);f.has(o)||(f.set(o,{runs:0,totalTime:0,maxTime:0,label:`effect#${o}`}),o>=l&&(l=o+1));const e=f.get(o),c=performance.now(),s=n(),i=performance.now()-c;e.runs++,e.totalTime+=i,i>e.maxTime&&(e.maxTime=i),h++}(t,t.h):t.h()}finally{x()}}function I(t){for(const n of t.o)n.t.delete(t);t.o.clear()}function K(t){T($+1);try{return t()}finally{if(T($-1),0===$){const t=j,n=[...t];t.clear();for(const t of n)t();e()}}}class q{constructor(t,n){this.strings=t,this.values=n}}function D(t,...n){return new q(t,n)}function P(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function R(t){if(null==t||"object"!=typeof t)return!1;const n=Object.getOwnPropertyDescriptor(t,"value");if(n&&"function"==typeof n.get)return!0;const o=Object.getPrototypeOf(t);if(o){const t=Object.getOwnPropertyDescriptor(o,"value");if(t&&"function"==typeof t.get)return!0}return!1}const U=t=>`຿${t}຿`;function W(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof q?n.push(W(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof q?n.push(e.map(W).join("")):R(e)?n.push(P(e.value)):"function"!=typeof e&&n.push(P(e??""))}return n.join("")}function B(t,n){const o=t.indexOf(n);if(-1===o)return{type:"text"};const e=t.substring(0,o).lastIndexOf("<");if(-1===e)return{type:"text"};if(t.substring(e,o).includes(">"))return{type:"text"};const c=t.substring(e+1,o).match(/([\w\-@:.]+)\s*=\s*(?:"[^"]*|'[^']*|[^\s>]*?)$/);if(!c)return{type:"text"};const r=c[1];return r.startsWith("on")&&r.length>2?{type:"event",attrName:r}:{type:"attr",attrName:r}}class G{constructor(t,n){this.container=t,this.rawValue=n,this.node=null,this.m=null}mount(){const t=document.createTextNode("");if(this.k?this.container.insertBefore(t,this.k):this.container.appendChild(t),this.node=t,R(this.rawValue)){const t=this.rawValue;this.m=F(()=>{this.node.textContent=null!=t.value?String(t.value):""})}else this.rawValue instanceof q?this.node.textContent=W(this.rawValue):this.node.textContent=null!=this.rawValue?String(this.rawValue):""}destroy(){this.m?.(),this.node?.remove()}}class H{constructor(t,n,o){this.element=t,this.attrName=n,this.rawValue=o,this.m=null}mount(){if(R(this.rawValue)){const t=this.rawValue;this.m=F(()=>{const n=t.value;null==n||!1===n?this.element.removeAttribute(this.attrName):this.element.setAttribute(this.attrName,String(n))})}else null!=this.rawValue&&!1!==this.rawValue&&this.element.setAttribute(this.attrName,String(this.rawValue))}destroy(){this.m?.()}}class L{constructor(t,n,o){this.element=t,this.eventName=n.slice(2).toLowerCase(),this.handler=o,this.S=null}mount(){"function"==typeof this.handler&&(this.S=t=>this.handler(t),this.element.addEventListener(this.eventName,this.S))}destroy(){this.S&&(this.element.removeEventListener(this.eventName,this.S),this.S=null)}}class Q{constructor(){this.parts=[],this.fragment=null}destroy(){for(const t of this.parts)t.destroy();this.parts.length=0}}function V(t,n){const o=new Q,e=function(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof q?n.push(W(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof q?n.push(e.map(W).join("")):"function"==typeof e||R(e)?n.push(U(o)):n.push(P(e??""))}return n.join("")}(t),c=function(t){const n=document.createElement("template");return n.innerHTML=t,n.content}(e);o.fragment=c,X(c,t.values,e,o);for(const t of o.parts)t.mount();return n.appendChild(c),o}function X(t,n,o,e){const c=[...t.childNodes];for(const r of c)3===r.nodeType?Y(r,n,o,e,t):1===r.nodeType&&Z(r,n,o,e)}function Y(t,n,o,e,c){const r=t.textContent||"";for(let s=0;s<n.length;s++){const i=U(s),f=r.indexOf(i);if(-1===f)continue;if("text"!==B(o,i).type)continue;const u=r.substring(0,f),a=r.substring(f+i.length);u&&c.insertBefore(document.createTextNode(u),t);const l=new G(c,n[s]);e.parts.push(l);let d=t;return a&&(d=document.createTextNode(a),c.insertBefore(d,t)),c.removeChild(t),l.k=d!==t?d:null,void(a&&Y(d,n,o,e,c))}}function Z(t,n,o,e){const c=[...t.attributes];for(const r of c)for(let c=0;c<n.length;c++){const s=U(c);if(!r.value.includes(s))continue;const i=B(o,s);if("event"===i.type&&i.attrName===r.name){t.removeAttribute(r.name);const o=new L(t,r.name,n[c]);e.parts.push(o)}else if("attr"===i.type&&i.attrName===r.name){const o=r.value.replace(s,"");o?t.setAttribute(r.name,o):t.removeAttribute(r.name);const i=new H(t,r.name,n[c]);e.parts.push(i)}}X(t,n,o,e)}function tt(t){const n=[];for(let o=0;o<t.strings.length;o++)if(n.push(t.strings[o]),o<t.values.length){const e=t.values[o];e instanceof q?n.push(tt(e)):Array.isArray(e)&&e.length>0&&e[0]instanceof q?n.push(e.map(t=>tt(t)).join("")):R(e)?n.push(P(e.value)):"function"!=typeof e&&n.push(P(e??""))}return n.join("")}function nt(t){const n=t.join("");let o=!1,e="",c=-1,r=!1;for(let t=0;t<n.length;t++){const s=n[t];o?s===e&&(o=!1):'"'===s||"'"===s?(o=!0,e=s):"<"===s?(c=t,r=!1):">"===s&&c>=0&&!o&&(r=!0)}return c>=0&&!r}function ot(t,n){const o=new Q,e=function(t){const n=[],o=[];let e=!1;for(let c=0;c<t.strings.length;c++)if(o.push(t.strings[c]),e=nt(o),c<t.values.length){const r=t.values[c];if(r instanceof q)o.push(tt(r));else if(Array.isArray(r)&&r.length>0&&r[0]instanceof q)o.push(r.map(t=>tt(t)).join(""));else if("function"==typeof r);else if(R(r))if(e){const t=r.value;o.push(null!=t?P(t):"")}else{n.push(c);const t=r.value;o.push(null!=t?P(t):"")}else o.push(P(r??""))}return{indices:n,nextIdx:0}}(t);return et(n,t.values,o,e),o}function et(t,n,o,e){const c=[...t.childNodes];for(const r of c)8===r.nodeType?ct(r,n,t,o,e):1===r.nodeType&&rt(r,n,o,e)}function ct(t,n,o,e,c){const r=c.indices[c.nextIdx++]??-1,s=t.previousSibling;let i;if(s&&3===s.nodeType?i=s:(i=document.createTextNode(""),o.insertBefore(i,t)),r>=0&&r<n.length){const t=n[r];if(R(t)){const n=F(()=>{i.textContent=null!=t.value?String(t.value):""});e.parts.push({destroy(){n(),i.remove()}})}else i.textContent=null!=t?String(t):""}o.removeChild(t)}function rt(t,n,o,e){const c=t.getAttribute("data-kp");if(c){const e=c.split(",");for(const c of e){const e=c.indexOf(":"),r=c.indexOf(":",e+1),s=parseInt(c.substring(0,e),10),i=c.substring(e+1,r),f=c.substring(r+1);if(s>=0&&s<n.length)if("e"===i){const e=new L(t,f,n[s]);e.mount(),o.parts.push(e)}else if("a"===i){const e=new H(t,f,n[s]);e.mount(),o.parts.push(e)}}t.removeAttribute("data-kp")}et(t,n,o,e)}function st(t){const{props:n=[],setup:o}=t;function e(t={},e=null){const c={};for(const o of n)c[o]=J(t[o]);const r=o(c,e)(),s=document.createDocumentFragment(),i=V(r,s);return{get element(){return s},_:i,destroy(){i.destroy()},update(t){for(const o of n)o in t&&c[o]&&(c[o].value=t[o])}}}return e.v=!0,e.M=n,e}const it=new Map;function ft(t,n){it.set(t,n)}function ut(t){return it.get(t)}function at(t){return it.has(t)}function lt(){it.clear()}function dt(t){const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=J(t[o]));const o=Object.keys(n);return new Proxy({},{get(t,o){if("symbol"==typeof o)return;const e=n[o];return e?e.value:void 0},set(t,e,c){const r=n[e];return r?r.value=c:(n[e]=J(c),o.push(e)),!0},has:(t,o)=>o in n,ownKeys:()=>o,getOwnPropertyDescriptor(t,o){if(o in n)return{enumerable:!0,configurable:!0}}})}const ht=new Map;function pt(t,n){let o=ht.get(t);return o||(o=new Function("__s__",`with(__s__){return(${t})}`),ht.set(t,o)),o(n)}function mt(t){const n=t.split("."),o=n[0],e=n.slice(1),c=o.indexOf(":");return-1===c?{base:o,arg:null,modifiers:e}:{base:o.substring(0,c),arg:o.substring(c+1),modifiers:e}}function gt(t,n,o,e){const c=F(()=>{const e=pt(n,o);t.style.display=e?"":"none"});e.push(c)}function yt(t,n,o,e){const c=F(()=>{t.textContent=String(pt(n,o)??"")});e.push(c)}function kt(t,n,o,e){const c=F(()=>{t.innerHTML=String(pt(n,o)??"")});e.push(c)}function wt(t,n,o,e,c){const r=F(()=>{const c=pt(n,e);!1===c||null==c?t.removeAttribute(o):!0===c?t.setAttribute(o,""):t.setAttribute(o,String(c))});c.push(r)}function bt(t,n,o,c,r,s){const i=c.includes("stop"),f=c.includes("prevent"),u=c.includes("once"),a=c.includes("self"),l=o=>{a&&o.target!==t||(i&&o.stopPropagation(),f&&o.preventDefault(),function(t,n){const o="$$"+t;let e=ht.get(o);e||(e=new Function("__s__",`with(__s__){${t}}`),ht.set(o,e)),e(n)}(n,r),e())};t.addEventListener(o,l,{once:u}),s.push(()=>t.removeEventListener(o,l))}function St(t,n,o,c){const r=F(()=>{const e=pt(n,o);t.value=null!=e?String(e):""});c.push(r);const s=()=>{const c=n.trim().split(".");if(1===c.length)o[c[0]]=t.value;else{const e=c.slice(0,-1).join("."),r=c[c.length-1];try{const n=pt(e,o);n&&"object"==typeof n&&(n[r]=t.value)}catch(e){o[n]=t.value}}e()};t.addEventListener("input",s),c.push(()=>t.removeEventListener("input",s))}function _t(t){return t.startsWith("k-")||t.startsWith(":")||t.startsWith("@")}function vt(t){return t.startsWith(":")?"k-bind:"+t.substring(1):t.startsWith("@")?"k-on:"+t.substring(1):t}function Mt(t,n,o){const e=[...t.attributes];for(const c of e){const e=c.name,r=c.value;if(!_t(e))continue;const s=vt(e),{base:i,arg:f,modifiers:u}=mt(s);switch(i){case"k-show":gt(t,r,n,o);break;case"k-text":yt(t,r,n,o);break;case"k-html":kt(t,r,n,o);break;case"k-bind":f&&wt(t,r,f,n,o);break;case"k-on":f&&bt(t,r,f,u,n,o);break;case"k-model":St(t,r,n,o)}}}function Ot(t,n,o){for(const e of t.children)e.hasAttribute("k-data")||(Mt(e,n,o),Ot(e,n,o))}function xt(t,n){const o=t.getAttribute("k-data");let e={};try{e=pt(o,dt({}))||{}}catch(t){}const c=dt(e);Mt(t,c,n),Ot(t,c,n);for(const o of t.children)o.hasAttribute("k-data")&&xt(o,n)}function $t(t){const n=[];if(t.hasAttribute&&t.hasAttribute("k-data"))xt(t,n);else{const o=t.querySelectorAll?t.querySelectorAll("[k-data]"):[];if(o.length>0)for(const e of o){let o=!1,c=e.parentElement;for(;c&&c!==t;){if(c.hasAttribute("k-data")){o=!0;break}c=c.parentElement}o||xt(e,n)}else{const o=dt({});for(const e of t.children)Mt(e,o,n),Ot(e,o,n)}}return{destroy(){for(const t of n)t();n.length=0}}}const jt={"en-US":{"modal.close":"Close","dialog.ok":"OK","dialog.cancel":"Cancel","table.empty":"No data","pagination.page":"Page","pagination.of":"of","select.placeholder":"Select...","datepicker.placeholder":"Select date","timepicker.placeholder":"Select time","fileupload.drag":"Drag files here or","fileupload.browse":"Browse","empty.text":"No data","datepicker.months":"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec","datepicker.weekdays":"Mo,Tu,We,Th,Fr,Sa,Su","timepicker.placeholder":"Select time"},"zh-CN":{"modal.close":"关闭","dialog.ok":"确定","dialog.cancel":"取消","table.empty":"暂无数据","pagination.page":"页","pagination.of":"/","select.placeholder":"请选择","datepicker.placeholder":"选择日期","datepicker.months":"1月,2月,3月,4月,5月,6月,7月,8月,9月,10月,11月,12月","datepicker.weekdays":"一,二,三,四,五,六,日","timepicker.placeholder":"选择时间","fileupload.drag":"拖拽文件到此处或","fileupload.browse":"浏览","empty.text":"暂无数据"}};let Tt="en-US";function Nt(t){Tt=t}function At(){return Tt}function Ct(t,n={}){let o=(jt[Tt]||jt["en-US"])[t]||t;for(const[t,e]of Object.entries(n))o=o.replace(`{${t}}`,e);return o}function Jt(t,n){jt[t]||(jt[t]={}),Object.assign(jt[t],n)}function Et(t,n={}){const{fallback:o=null,onError:e=null}=n;try{return t()}catch(t){if(e)try{e(t)}catch(t){}const n=document.createDocumentFragment();if(o)try{const e="function"==typeof o?o(t):o;if("string"==typeof e){const t=document.createElement("div");t.className="ds-error-boundary",t.textContent=e,n.appendChild(t)}else V(e,n)}catch(o){const e=document.createElement("div");e.className="ds-error-boundary",e.textContent=`Component error: ${t.message}`,n.appendChild(e)}else{const o=document.createElement("div");o.className="ds-error-boundary",o.textContent=`Component error: ${t.message}`,n.appendChild(o)}return{element:n,error:t}}}function Ft(t,n="default"){let o=null,e=null;async function c(){return o||(e||(e=t().then(t=>{if("function"==typeof t.default)o=t.default;else if("default"!==n&&"function"==typeof t[n])o=t[n];else{const n=Object.keys(t);for(const e of n)if("function"==typeof t[e]){o=t[e];break}}if(!o)throw new Error("[Kupola lazy] No component factory found in module");return e=null,o}),e))}async function r(...t){return(await c())(...t)}return r.O=t,r.$=()=>null!==o,r.j=c,r}async function zt(t){if("function"!=typeof t.j)throw new TypeError("[Kupola preload] Argument must be a lazy component from lazyComponent()");await t.j()}const It="kupola-theme",Kt=["light","dark"],qt=new Set;function Dt(){if("undefined"!=typeof localStorage){const t=localStorage.getItem(It);if(t&&Kt.includes(t))return t}return"undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"}function Pt(t){if(!Kt.includes(t))throw new Error(`Invalid theme "${t}". Must be one of: ${Kt.join(", ")}`);document.documentElement.dataset.theme=t,"undefined"!=typeof localStorage&&localStorage.setItem(It,t);for(const n of qt)try{n(t)}catch{}}function Rt(){const t="dark"===(document.documentElement.dataset.theme||"dark")?"light":"dark";return Pt(t),t}function Ut(t){return qt.add(t),()=>qt.delete(t)}function Wt(){const t=Dt();document.documentElement.dataset.theme=t,requestAnimationFrame(()=>{const t=document.querySelectorAll("[k-cloak]");for(const n of t)n.removeAttribute("k-cloak")}),"undefined"!=typeof matchMedia&&matchMedia("(prefers-color-scheme: light)").addEventListener("change",t=>{"undefined"==typeof localStorage||localStorage.getItem(It)||Pt(t.matches?"light":"dark")})}function Bt(){return"<script>(function(){var t=localStorage.getItem('kupola-theme');if(!t){t=window.matchMedia&&window.matchMedia('(prefers-color-scheme:light)').matches?'light':'dark';}document.documentElement.dataset.theme=t;})()<\/script>"}export{Et as ErrorBoundary,C as Signal,q as TemplateResult,Jt as addMessages,K as batch,lt as clearRegistry,E as computed,st as defineComponent,k as disableProfiler,F as effect,y as enableProfiler,e as flushJobs,ut as getComponent,At as getLocale,Dt as getPreferredTheme,S as getProfileReport,Bt as getThemeInlineScript,at as hasComponent,D as html,ot as hydrate,Ft as lazyComponent,Ut as onThemeChange,zt as preloadComponent,_ as printProfileReport,ft as register,V as render,w as resetProfiler,c as resetScheduler,Nt as setLocale,Pt as setTheme,J as signal,Ct as t,Wt as themePreload,Rt as toggleTheme,$t as walk};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kupola/kupola",
3
- "version": "2.0.0-beta.8",
3
+ "version": "2.0.0",
4
4
  "description": "A modern, modular UI component library for any web project. Zero framework dependencies, tree-shakeable imports. 这是一个现代、模块化的 UI 组件库,适用于任何 Web 项目。零框架依赖,支持按需引入(tree-shakeable)。",
5
5
  "main": "dist/kupola-core.esm.js",
6
6
  "module": "dist/kupola-core.esm.js",
@@ -30,6 +30,7 @@
30
30
  "./css": "./dist/css/index.css",
31
31
  "./css/tokens": "./dist/css/tokens.css",
32
32
  "./css/components": "./dist/css/components.css",
33
+ "./css/responsive": "./dist/css/responsive.css",
33
34
  "./components/modal": {
34
35
  "import": "./dist/kupola-core-modal.esm.js",
35
36
  "require": "./dist/kupola-core-modal.cjs"
@@ -228,7 +229,7 @@
228
229
  "dev": "vite",
229
230
  "build": "rollup -c && npm run build:css",
230
231
  "build:rollup": "rollup -c",
231
- "build:css": "node -e \"require('fs').cpSync('packages/css', 'dist/css', {recursive:true}); console.log('CSS copied to dist/css/')\"",
232
+ "build:css": "node scripts/build-css.cjs",
232
233
  "build:core": "rollup -c --configPlugin @rollup/plugin-commonjs 2>nul || npx rollup -c",
233
234
  "lint": "eslint .",
234
235
  "lint:fix": "eslint . --fix",
@@ -293,6 +294,7 @@
293
294
  "@storybook/builder-vite": "^8.6.14",
294
295
  "@storybook/html": "^8.6.14",
295
296
  "@storybook/html-vite": "^8.6.14",
297
+ "clean-css": "^5.3.3",
296
298
  "eslint": "^8.57.0",
297
299
  "jest": "^29.7.0",
298
300
  "jest-environment-jsdom": "^30.4.1",
@@ -49,3 +49,6 @@ export { enableProfiler, disableProfiler, resetProfiler, getProfileReport, print
49
49
 
50
50
  // ── Lazy Load ────────────────────────────────────────────────────────────────
51
51
  export { lazyComponent, preloadComponent } from './lazy.js';
52
+
53
+ // ── Theme (anti-FOUC) ────────────────────────────────────────────────────────
54
+ export { themePreload, getPreferredTheme, setTheme, toggleTheme, onThemeChange, getThemeInlineScript } from './theme.js';
@@ -0,0 +1,173 @@
1
+ // SPDX-License-Identifier: MIT
2
+ /**
3
+ * @kupola/core — Theme utilities (anti-FOUC + persistence).
4
+ *
5
+ * Provides blocking-style theme initialization to prevent
6
+ * Flash of Unstyled Content (FOUC) on page refresh.
7
+ *
8
+ * ## Quick Start (prevent FOUC)
9
+ *
10
+ * Add this **blocking** script to `<head>` (before any CSS or body):
11
+ * ```html
12
+ * <head>
13
+ * <script type="module">
14
+ * import { themePreload } from '@kupola/kupola';
15
+ * themePreload(); // sets data-theme BEFORE first paint
16
+ * </script>
17
+ * </head>
18
+ * ```
19
+ *
20
+ * Or use the inline snippet (zero-dependency, works without bundler):
21
+ * ```html
22
+ * <head>
23
+ * <script>
24
+ * // Inline theme preload — paste this before </head>
25
+ * (function(){var t=localStorage.getItem('kupola-theme')||
26
+ * (matchMedia('(prefers-color-scheme:light)').matches?'light':'dark');
27
+ * document.documentElement.dataset.theme=t;})()
28
+ * </script>
29
+ * </head>
30
+ * ```
31
+ *
32
+ * ## API
33
+ *
34
+ * - `themePreload()` — blocking call, reads localStorage + system pref, sets data-theme
35
+ * - `getPreferredTheme()` — returns 'light' | 'dark' based on localStorage or system
36
+ * - `setTheme(theme)` — sets data-theme + persists to localStorage
37
+ * - `toggleTheme()` — flips between light and dark
38
+ * - `onThemeChange(callback)` — subscribe to theme changes
39
+ * - `getThemeInlineScript()` — returns the inline `<script>` string for SSR/static pages
40
+ *
41
+ * @module theme
42
+ */
43
+
44
+ const STORAGE_KEY = 'kupola-theme';
45
+ const VALID_THEMES = ['light', 'dark'];
46
+
47
+ /** @type {Set<(theme: string) => void>} */
48
+ const _listeners = new Set();
49
+
50
+ // ── Core API ──────────────────────────────────────────────────────────────
51
+
52
+ /**
53
+ * Get the user's preferred theme.
54
+ * Priority: localStorage > system prefers-color-scheme > 'dark' (default).
55
+ * @returns {'light' | 'dark'}
56
+ */
57
+ export function getPreferredTheme() {
58
+ // 1. Check persisted preference
59
+ if (typeof localStorage !== 'undefined') {
60
+ const stored = localStorage.getItem(STORAGE_KEY);
61
+ if (stored && VALID_THEMES.includes(stored)) {
62
+ return stored;
63
+ }
64
+ }
65
+
66
+ // 2. Check system preference
67
+ if (typeof matchMedia !== 'undefined') {
68
+ if (matchMedia('(prefers-color-scheme: light)').matches) {
69
+ return 'light';
70
+ }
71
+ }
72
+
73
+ // 3. Default to dark
74
+ return 'dark';
75
+ }
76
+
77
+ /**
78
+ * Set the theme and persist to localStorage.
79
+ * Applies `data-theme` on `<html>` immediately.
80
+ * @param {'light' | 'dark'} theme
81
+ */
82
+ export function setTheme(theme) {
83
+ if (!VALID_THEMES.includes(theme)) {
84
+ throw new Error(`Invalid theme "${theme}". Must be one of: ${VALID_THEMES.join(', ')}`);
85
+ }
86
+
87
+ document.documentElement.dataset.theme = theme;
88
+
89
+ if (typeof localStorage !== 'undefined') {
90
+ localStorage.setItem(STORAGE_KEY, theme);
91
+ }
92
+
93
+ // Notify listeners
94
+ for (const fn of _listeners) {
95
+ try { fn(theme); } catch { /* swallow */ }
96
+ }
97
+ }
98
+
99
+ /**
100
+ * Toggle between light and dark themes.
101
+ * @returns {'light' | 'dark'} The new theme after toggle.
102
+ */
103
+ export function toggleTheme() {
104
+ const current = document.documentElement.dataset.theme || 'dark';
105
+ const next = current === 'dark' ? 'light' : 'dark';
106
+ setTheme(next);
107
+ return next;
108
+ }
109
+
110
+ /**
111
+ * Subscribe to theme changes.
112
+ * @param {(theme: string) => void} callback
113
+ * @returns {() => void} Unsubscribe function.
114
+ */
115
+ export function onThemeChange(callback) {
116
+ _listeners.add(callback);
117
+ return () => _listeners.delete(callback);
118
+ }
119
+
120
+ // ── Anti-FOUC ─────────────────────────────────────────────────────────────
121
+
122
+ /**
123
+ * **Blocking** theme preload — call this in a `<head>` script BEFORE
124
+ * the page renders. Reads localStorage + system pref and sets
125
+ * `data-theme` on `<html>` to prevent FOUC.
126
+ *
127
+ * Also removes `[k-cloak]` attributes once the theme is set.
128
+ *
129
+ * Usage:
130
+ * ```html
131
+ * <head>
132
+ * <script type="module">
133
+ * import { themePreload } from '@kupola/kupola';
134
+ * themePreload();
135
+ * </script>
136
+ * </head>
137
+ * ```
138
+ */
139
+ export function themePreload() {
140
+ const theme = getPreferredTheme();
141
+ document.documentElement.dataset.theme = theme;
142
+
143
+ // Remove k-cloak after theme is applied
144
+ requestAnimationFrame(() => {
145
+ const cloaked = document.querySelectorAll('[k-cloak]');
146
+ for (const el of cloaked) {
147
+ el.removeAttribute('k-cloak');
148
+ }
149
+ });
150
+
151
+ // Listen for system theme changes (auto-follow OS preference)
152
+ if (typeof matchMedia !== 'undefined') {
153
+ matchMedia('(prefers-color-scheme: light)').addEventListener('change', (e) => {
154
+ // Only auto-follow if user hasn't manually set a preference
155
+ if (typeof localStorage !== 'undefined' && !localStorage.getItem(STORAGE_KEY)) {
156
+ setTheme(e.matches ? 'light' : 'dark');
157
+ }
158
+ });
159
+ }
160
+ }
161
+
162
+ /**
163
+ * Returns a self-contained inline `<script>` string that can be
164
+ * injected into static HTML (e.g., SSR output, create-kupola templates).
165
+ *
166
+ * This script runs synchronously in `<head>` — no module import needed.
167
+ * It reads localStorage and sets `data-theme` before first paint.
168
+ *
169
+ * @returns {string} HTML `<script>` tag content.
170
+ */
171
+ export function getThemeInlineScript() {
172
+ return `<script>(function(){var t=localStorage.getItem('kupola-theme');if(!t){t=window.matchMedia&&window.matchMedia('(prefers-color-scheme:light)').matches?'light':'dark';}document.documentElement.dataset.theme=t;})()<\/script>`;
173
+ }
@@ -11,3 +11,4 @@
11
11
 
12
12
  @import './tokens.css';
13
13
  @import './components.css';
14
+ @import './responsive.css';
@@ -0,0 +1,153 @@
1
+ /**
2
+ * Kupola CSS — Responsive utilities & component adaptations.
3
+ *
4
+ * Breakpoints:
5
+ * sm: 576px (phones landscape)
6
+ * md: 768px (tablets)
7
+ * lg: 1024px (laptops)
8
+ * xl: 1280px (desktops)
9
+ *
10
+ * Usage:
11
+ * <div class="ds-hide-sm">Hidden on phones</div>
12
+ * <div class="ds-show-md">Only visible on tablets+</div>
13
+ * <div class="ds-hide-lg">Hidden below laptops</div>
14
+ */
15
+
16
+ /* ═══════════════════════════════════════════════════════════
17
+ Responsive display utilities
18
+ ═══════════════════════════════════════════════════════════ */
19
+
20
+ /* ── sm: < 576px (phones) ─────────────────────────────── */
21
+ @media (max-width: 575.98px) {
22
+ .ds-hide-sm { display: none !important; }
23
+ .ds-hide-below-sm { display: none !important; }
24
+ }
25
+ @media (min-width: 576px) {
26
+ .ds-show-sm { display: none !important; }
27
+ }
28
+
29
+ /* ── md: < 768px (below tablets) ──────────────────────── */
30
+ @media (max-width: 767.98px) {
31
+ .ds-hide-md { display: none !important; }
32
+ .ds-hide-below-md { display: none !important; }
33
+ }
34
+ @media (min-width: 768px) {
35
+ .ds-show-md { display: none !important; }
36
+ }
37
+
38
+ /* ── lg: < 1024px (below laptops) ─────────────────────── */
39
+ @media (max-width: 1023.98px) {
40
+ .ds-hide-lg { display: none !important; }
41
+ .ds-hide-below-lg { display: none !important; }
42
+ }
43
+ @media (min-width: 1024px) {
44
+ .ds-show-lg { display: none !important; }
45
+ }
46
+
47
+ /* ── xl: < 1280px (below desktops) ────────────────────── */
48
+ @media (max-width: 1279.98px) {
49
+ .ds-hide-xl { display: none !important; }
50
+ .ds-hide-below-xl { display: none !important; }
51
+ }
52
+ @media (min-width: 1280px) {
53
+ .ds-show-xl { display: none !important; }
54
+ }
55
+
56
+ /* ═══════════════════════════════════════════════════════════
57
+ Responsive spacing utilities
58
+ ═══════════════════════════════════════════════════════════ */
59
+
60
+ @media (max-width: 767.98px) {
61
+ .ds-padding-responsive { padding: var(--spacing-3, 12px) !important; }
62
+ .ds-margin-responsive { margin: var(--spacing-3, 12px) !important; }
63
+ .ds-text-responsive { font-size: var(--font-size-sm, 13px) !important; }
64
+ }
65
+
66
+ /* ═══════════════════════════════════════════════════════════
67
+ Component responsive adaptations
68
+ ═══════════════════════════════════════════════════════════ */
69
+
70
+ /* ── Modal: full-screen on phones ─────────────────────────── */
71
+ @media (max-width: 575.98px) {
72
+ .ds-modal-content {
73
+ width: 100% !important;
74
+ max-width: 100% !important;
75
+ min-height: 100vh !important;
76
+ border-radius: 0 !important;
77
+ margin: 0 !important;
78
+ }
79
+ .ds-modal-mask {
80
+ padding: 0 !important;
81
+ }
82
+ }
83
+
84
+ /* ── Drawer: full-width/height on phones ──────────────────── */
85
+ @media (max-width: 575.98px) {
86
+ .ds-drawer-right,
87
+ .ds-drawer-left {
88
+ width: 100% !important;
89
+ max-width: 100% !important;
90
+ }
91
+ .ds-drawer-bottom,
92
+ .ds-drawer-top {
93
+ height: 90vh !important;
94
+ max-height: 90vh !important;
95
+ }
96
+ }
97
+
98
+ /* ── Dialog: full-width on phones ─────────────────────────── */
99
+ @media (max-width: 575.98px) {
100
+ .ds-dialog {
101
+ width: calc(100% - 32px) !important;
102
+ max-width: 100% !important;
103
+ margin: 16px !important;
104
+ }
105
+ }
106
+
107
+ /* ── Table: horizontal scroll on small screens ────────────── */
108
+ @media (max-width: 767.98px) {
109
+ .ds-table-wrapper {
110
+ overflow-x: auto;
111
+ -webkit-overflow-scrolling: touch;
112
+ }
113
+ .ds-table {
114
+ min-width: 600px;
115
+ }
116
+ .ds-table th,
117
+ .ds-table td {
118
+ white-space: nowrap;
119
+ padding: var(--spacing-2, 8px) var(--spacing-3, 12px);
120
+ font-size: var(--font-size-sm, 13px);
121
+ }
122
+ }
123
+
124
+ /* ── Select: full-width on phones ─────────────────────────── */
125
+ @media (max-width: 575.98px) {
126
+ .ds-select-dropdown {
127
+ position: fixed !important;
128
+ bottom: 0;
129
+ left: 0;
130
+ right: 0;
131
+ max-height: 50vh;
132
+ border-radius: 12px 12px 0 0;
133
+ z-index: var(--z-index-modal, 3000);
134
+ }
135
+ }
136
+
137
+ /* ── DatePicker: full-width on phones ─────────────────────── */
138
+ @media (max-width: 575.98px) {
139
+ .ds-datepicker-panel {
140
+ width: calc(100vw - 32px) !important;
141
+ max-width: 100% !important;
142
+ }
143
+ }
144
+
145
+ /* ── Notification: stack full-width on phones ─────────────── */
146
+ @media (max-width: 575.98px) {
147
+ .ds-notification {
148
+ width: calc(100% - 24px) !important;
149
+ max-width: 100% !important;
150
+ right: 12px !important;
151
+ left: 12px !important;
152
+ }
153
+ }
@@ -8,6 +8,9 @@
8
8
  */
9
9
 
10
10
  :root {
11
+
12
+ /* ── Anti-FOUC: hide elements until JS removes [k-cloak] ── */
13
+ [k-cloak] { display: none !important; }
11
14
  /* ── Primitives: Radius ─────────────────────────────────── */
12
15
  --radius-2: 2px;
13
16
  --radius-4: 4px;
@@ -75,6 +78,12 @@
75
78
  --transition-fast: 0.12s ease;
76
79
  --transition-normal: 0.2s ease;
77
80
  --transition-slow: 0.3s ease;
81
+
82
+ /* ── Breakpoints ────────────────────────────────────────── */
83
+ --breakpoint-sm: 576px;
84
+ --breakpoint-md: 768px;
85
+ --breakpoint-lg: 1024px;
86
+ --breakpoint-xl: 1280px;
78
87
  }
79
88
 
80
89
  /* ═══════════════════════════════════════════════════════════