From 09da889c159212db18e6c3d0e92fcdfb4b6080a3 Mon Sep 17 00:00:00 2001 From: tajniak81 <13187254+tajniak81@users.noreply.github.com> Date: Mon, 13 Jul 2026 18:29:50 +0200 Subject: [PATCH] Add Users and Organizations management to API Server panel The superadmin panel had backend CRUD for users/orgs (internal/api/users.go, orgs.go) but no UI. Add two tabs to panel/src/App.vue: - Users: create form (email/password/role/org), list with role + org badges, inline editor (email/role/org/verified/password reset), and delete. Self-role change and self-delete are suppressed to mirror the server-side guards. - Organizations: create, inline rename, and delete, with client-derived member counts; delete is disabled while an org still has members. PocketBase validation errors are unwrapped into a readable line via a shared apiError() helper. Rebuilds the embedded panel bundle (dist). Co-Authored-By: Claude Opus 4.8 --- .../api/dist/assets/index-BwP7TTth.css | 1 - .../api/dist/assets/index-CVh8EDzq.css | 1 + .../api/dist/assets/index-DJSuRngH.js | 17 + .../api/dist/assets/index-DKDpmK_V.js | 17 - API Server/internal/api/dist/index.html | 4 +- API Server/panel/src/App.vue | 511 +++++++++++++++++- 6 files changed, 529 insertions(+), 22 deletions(-) delete mode 100644 API Server/internal/api/dist/assets/index-BwP7TTth.css create mode 100644 API Server/internal/api/dist/assets/index-CVh8EDzq.css create mode 100644 API Server/internal/api/dist/assets/index-DJSuRngH.js delete mode 100644 API Server/internal/api/dist/assets/index-DKDpmK_V.js diff --git a/API Server/internal/api/dist/assets/index-BwP7TTth.css b/API Server/internal/api/dist/assets/index-BwP7TTth.css deleted file mode 100644 index fad321f..0000000 --- a/API Server/internal/api/dist/assets/index-BwP7TTth.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap";/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--font-mono:"Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--spacing:.25rem;--container-sm:24rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-tight:1.25;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--default-mono-font-family:"Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--font-display:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--radius-sm:6px;--radius-md:10px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mb-px{margin-bottom:-1px}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.pv-btn{border-radius:var(--radius-md);background:var(--brand);height:40px;color:var(--brand-contrast);font-family:var(--font-sans);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard);border:1px solid #0000;justify-content:center;align-items:center;gap:8px;padding:0 16px;font-size:.875rem;font-weight:600;display:inline-flex}.pv-btn-sec{border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-card);height:40px;color:var(--text-primary);font-family:var(--font-sans);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard);justify-content:center;align-items:center;gap:8px;padding:0 16px;font-size:.875rem;font-weight:600;display:inline-flex}.flex{display:flex}.hidden{display:none}.inline-flex{display:inline-flex}.pv-input{border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-card);width:100%;height:40px;color:var(--text-primary);font-family:var(--font-sans);padding:0 12px;font-size:.875rem}.pv-btn-sm{border-radius:var(--radius-sm);height:32px;padding:0 12px;font-size:.75rem}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.w-1{width:var(--spacing)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-4{width:calc(var(--spacing) * 4)}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:14px}.rounded-md{border-radius:10px}.rounded-sm{border-radius:6px}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\!border-transparent{border-color:#0000!important}.border-brand{border-color:var(--brand)}.border-subtle{border-color:var(--border-subtle)}.border-transparent{border-color:#0000}.\!bg-success-tint{background-color:var(--success-tint)!important}.bg-brand{background-color:var(--brand)}.bg-card{background-color:var(--surface-card)}.bg-current{background-color:currentColor}.bg-danger-tint{background-color:var(--danger-tint)}.bg-muted{background-color:var(--text-muted)}.bg-success{background-color:var(--success)}.bg-success-tint{background-color:var(--success-tint)}.bg-sunken{background-color:var(--bg-sunken)}.bg-warning-tint{background-color:var(--warning-tint)}.p-1{padding:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.text-center{text-align:center}.text-left{text-align:left}.pv-eyebrow{font-family:var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted);font-size:11px}.font-display{font-family:Space Grotesk,ui-sans-serif,system-ui,Segoe UI,sans-serif}.font-mono{font-family:Space Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.\!text-danger{color:var(--danger)!important}.\!text-success{color:var(--success)!important}.text-brand-text{color:var(--text-brand)}.text-danger{color:var(--danger)}.text-muted{color:var(--text-muted)}.text-on-brand{color:var(--brand-contrast)}.text-primary{color:var(--text-primary)}.text-secondary{color:var(--text-secondary)}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.uppercase{text-transform:uppercase}.shadow-sm{--tw-shadow:var(--sh-sm);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:var(--sh-xs);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}@media(hover:hover){.hover\:bg-sunken:hover{background-color:var(--bg-sunken)}.hover\:text-primary:hover{color:var(--text-primary)}}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-40{width:calc(var(--spacing) * 40)}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}}}:root,[data-theme=light]{--navy-950:#0b1730;--navy-900:#0f1e3d;--navy-800:#1b2e52;--navy-700:#26406e;--blue-50:#eaf1fe;--blue-100:#d6e3fd;--blue-300:#8fb4f6;--blue-400:#5b93f5;--blue-500:#3d7bf0;--blue-600:#2b62cc;--blue-700:#1f4ca0;--slate-0:#fff;--slate-50:#f6f7f9;--slate-100:#eef0f3;--slate-150:#e6e9ee;--slate-200:#dce0e7;--slate-300:#c5ccd7;--slate-400:#97a1b0;--slate-500:#6b7688;--slate-700:#333b4a;--steel:#5a6b85;--green-500:#1f8a5b;--green-100:#dcf1e7;--green-600:#177049;--amber-500:#d9852b;--amber-100:#fbebd5;--amber-600:#b86c1b;--red-500:#d64545;--red-100:#fbe0e0;--red-600:#b83232;--bg-page:var(--slate-100);--bg-sunken:var(--slate-50);--surface-card:var(--slate-0);--border-subtle:var(--slate-200);--border-strong:var(--slate-300);--border-focus:var(--blue-500);--text-primary:var(--navy-900);--text-secondary:var(--steel);--text-muted:var(--slate-400);--brand:var(--blue-500);--brand-hover:var(--blue-600);--brand-active:var(--blue-700);--brand-contrast:#fff;--text-brand:var(--blue-600);--success:var(--green-600);--success-tint:var(--green-100);--warning:var(--amber-600);--warning-tint:var(--amber-100);--danger:var(--red-600);--danger-tint:var(--red-100);--ring-focus:0 0 0 3px var(--blue-500)}@supports (color:color-mix(in lab,red,red)){:root,[data-theme=light]{--ring-focus:0 0 0 3px color-mix(in srgb, var(--blue-500) 45%, transparent)}}:root,[data-theme=light]{--sh-xs:0 1px 2px #0f1e3d0f;--sh-sm:0 1px 2px #0f1e3d0f, 0 1px 3px #0f1e3d0a;--dur-fast:.12s;--ease-standard:cubic-bezier(.4, 0, .2, 1);color-scheme:light}[data-theme=dark]{--bg-page:var(--navy-950);--bg-sunken:#0b111c;--surface-card:#10203f;--border-subtle:#ffffff14;--border-strong:#ffffff2e;--border-focus:var(--blue-400);--text-primary:#f4f7fc;--text-secondary:#8fa0be;--text-muted:#5e6e8c;--brand:var(--blue-400);--brand-hover:var(--blue-300);--brand-active:var(--blue-100);--brand-contrast:#0f1e3d;--text-brand:var(--blue-300);--success:#5fd3a0;--success-tint:var(--green-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--success-tint:color-mix(in srgb, var(--green-500) 22%, transparent)}}[data-theme=dark]{--warning:#f0b26a;--warning-tint:var(--amber-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--warning-tint:color-mix(in srgb, var(--amber-500) 22%, transparent)}}[data-theme=dark]{--danger:#f08a8a;--danger-tint:var(--red-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--danger-tint:color-mix(in srgb, var(--red-500) 22%, transparent)}}[data-theme=dark]{--ring-focus:0 0 0 3px var(--blue-400)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--ring-focus:0 0 0 3px color-mix(in srgb, var(--blue-400) 55%, transparent)}}[data-theme=dark]{--sh-xs:0 1px 2px #00000059;--sh-sm:0 1px 3px #0006;color-scheme:dark}html,body,#app{height:100%}body{font-family:var(--font-sans);background:var(--bg-page);color:var(--text-primary);-webkit-font-smoothing:antialiased}h1,h2,h3{font-family:var(--font-display);letter-spacing:-.02em}.pv-btn-sec:hover:not(:disabled){background:var(--bg-sunken)}.pv-btn-sec:active:not(:disabled){transform:translateY(1px)}.pv-btn-sec:focus-visible{box-shadow:var(--ring-focus);outline:none}.pv-btn:hover:not(:disabled){background:var(--brand-hover)}.pv-btn:active:not(:disabled){transform:translateY(1px)}.pv-btn:disabled{opacity:.55;cursor:not-allowed}.pv-btn:focus-visible{box-shadow:var(--ring-focus);outline:none}.pv-input::placeholder{color:var(--text-muted)}.pv-input:focus{border-color:var(--border-focus);box-shadow:var(--ring-focus);outline:none}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000} diff --git a/API Server/internal/api/dist/assets/index-CVh8EDzq.css b/API Server/internal/api/dist/assets/index-CVh8EDzq.css new file mode 100644 index 0000000..a434a20 --- /dev/null +++ b/API Server/internal/api/dist/assets/index-CVh8EDzq.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap";/*! tailwindcss v4.3.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--font-mono:"Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--spacing:.25rem;--container-sm:24rem;--container-5xl:64rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wider:.05em;--leading-tight:1.25;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--default-mono-font-family:"Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;--font-display:"Space Grotesk", ui-sans-serif, system-ui, "Segoe UI", sans-serif;--radius-sm:6px;--radius-md:10px}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.-mb-px{margin-bottom:-1px}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.pv-btn{border-radius:var(--radius-md);background:var(--brand);height:40px;color:var(--brand-contrast);font-family:var(--font-sans);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard);border:1px solid #0000;justify-content:center;align-items:center;gap:8px;padding:0 16px;font-size:.875rem;font-weight:600;display:inline-flex}.pv-btn-sec{border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-card);height:40px;color:var(--text-primary);font-family:var(--font-sans);cursor:pointer;transition:background-color var(--dur-fast) var(--ease-standard),transform var(--dur-fast) var(--ease-standard);justify-content:center;align-items:center;gap:8px;padding:0 16px;font-size:.875rem;font-weight:600;display:inline-flex}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.pv-input{border-radius:var(--radius-md);border:1px solid var(--border-strong);background:var(--surface-card);width:100%;height:40px;color:var(--text-primary);font-family:var(--font-sans);padding:0 12px;font-size:.875rem}.pv-btn-sm{border-radius:var(--radius-sm);height:32px;padding:0 12px;font-size:.75rem}.h-1{height:var(--spacing)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-4{height:calc(var(--spacing) * 4)}.w-1{width:var(--spacing)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-4{width:calc(var(--spacing) * 4)}.w-full{width:100%}.max-w-5xl{max-width:var(--container-5xl)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.flex-1{flex:1}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-2{row-gap:calc(var(--spacing) * 2)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-hidden{overflow-y:hidden}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:14px}.rounded-md{border-radius:10px}.rounded-sm{border-radius:6px}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.\!border-transparent{border-color:#0000!important}.border-brand{border-color:var(--brand)}.border-subtle{border-color:var(--border-subtle)}.border-transparent{border-color:#0000}.\!bg-success-tint{background-color:var(--success-tint)!important}.bg-brand,.bg-brand\/10{background-color:var(--brand)}@supports (color:color-mix(in lab,red,red)){.bg-brand\/10{background-color:color-mix(in oklab,var(--brand) 10%,transparent)}}.bg-card{background-color:var(--surface-card)}.bg-current{background-color:currentColor}.bg-danger-tint{background-color:var(--danger-tint)}.bg-muted{background-color:var(--text-muted)}.bg-success{background-color:var(--success)}.bg-success-tint{background-color:var(--success-tint)}.bg-sunken{background-color:var(--bg-sunken)}.bg-warning-tint{background-color:var(--warning-tint)}.p-1{padding:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-10{padding-block:calc(var(--spacing) * 10)}.pt-1{padding-top:var(--spacing)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.text-center{text-align:center}.text-left{text-align:left}.pv-eyebrow{font-family:var(--font-mono);letter-spacing:.16em;text-transform:uppercase;color:var(--text-muted);font-size:11px}.font-display{font-family:Space Grotesk,ui-sans-serif,system-ui,Segoe UI,sans-serif}.font-mono{font-family:Space Mono,ui-monospace,SFMono-Regular,Menlo,monospace}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.\!text-danger{color:var(--danger)!important}.\!text-success{color:var(--success)!important}.text-brand-text{color:var(--text-brand)}.text-danger{color:var(--danger)}.text-muted{color:var(--text-muted)}.text-on-brand{color:var(--brand-contrast)}.text-primary{color:var(--text-primary)}.text-secondary{color:var(--text-secondary)}.text-success{color:var(--success)}.text-warning{color:var(--warning)}.uppercase{text-transform:uppercase}.shadow-sm{--tw-shadow:var(--sh-sm);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:var(--sh-xs);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}@media(hover:hover){.hover\:bg-sunken:hover{background-color:var(--bg-sunken)}.hover\:text-primary:hover{color:var(--text-primary)}}@media(min-width:40rem){.sm\:inline{display:inline}.sm\:w-40{width:calc(var(--spacing) * 40)}.sm\:w-auto{width:auto}.sm\:flex-row{flex-direction:row}.sm\:items-end{align-items:flex-end}}}:root,[data-theme=light]{--navy-950:#0b1730;--navy-900:#0f1e3d;--navy-800:#1b2e52;--navy-700:#26406e;--blue-50:#eaf1fe;--blue-100:#d6e3fd;--blue-300:#8fb4f6;--blue-400:#5b93f5;--blue-500:#3d7bf0;--blue-600:#2b62cc;--blue-700:#1f4ca0;--slate-0:#fff;--slate-50:#f6f7f9;--slate-100:#eef0f3;--slate-150:#e6e9ee;--slate-200:#dce0e7;--slate-300:#c5ccd7;--slate-400:#97a1b0;--slate-500:#6b7688;--slate-700:#333b4a;--steel:#5a6b85;--green-500:#1f8a5b;--green-100:#dcf1e7;--green-600:#177049;--amber-500:#d9852b;--amber-100:#fbebd5;--amber-600:#b86c1b;--red-500:#d64545;--red-100:#fbe0e0;--red-600:#b83232;--bg-page:var(--slate-100);--bg-sunken:var(--slate-50);--surface-card:var(--slate-0);--border-subtle:var(--slate-200);--border-strong:var(--slate-300);--border-focus:var(--blue-500);--text-primary:var(--navy-900);--text-secondary:var(--steel);--text-muted:var(--slate-400);--brand:var(--blue-500);--brand-hover:var(--blue-600);--brand-active:var(--blue-700);--brand-contrast:#fff;--text-brand:var(--blue-600);--success:var(--green-600);--success-tint:var(--green-100);--warning:var(--amber-600);--warning-tint:var(--amber-100);--danger:var(--red-600);--danger-tint:var(--red-100);--ring-focus:0 0 0 3px var(--blue-500)}@supports (color:color-mix(in lab,red,red)){:root,[data-theme=light]{--ring-focus:0 0 0 3px color-mix(in srgb, var(--blue-500) 45%, transparent)}}:root,[data-theme=light]{--sh-xs:0 1px 2px #0f1e3d0f;--sh-sm:0 1px 2px #0f1e3d0f, 0 1px 3px #0f1e3d0a;--dur-fast:.12s;--ease-standard:cubic-bezier(.4, 0, .2, 1);color-scheme:light}[data-theme=dark]{--bg-page:var(--navy-950);--bg-sunken:#0b111c;--surface-card:#10203f;--border-subtle:#ffffff14;--border-strong:#ffffff2e;--border-focus:var(--blue-400);--text-primary:#f4f7fc;--text-secondary:#8fa0be;--text-muted:#5e6e8c;--brand:var(--blue-400);--brand-hover:var(--blue-300);--brand-active:var(--blue-100);--brand-contrast:#0f1e3d;--text-brand:var(--blue-300);--success:#5fd3a0;--success-tint:var(--green-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--success-tint:color-mix(in srgb, var(--green-500) 22%, transparent)}}[data-theme=dark]{--warning:#f0b26a;--warning-tint:var(--amber-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--warning-tint:color-mix(in srgb, var(--amber-500) 22%, transparent)}}[data-theme=dark]{--danger:#f08a8a;--danger-tint:var(--red-500)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--danger-tint:color-mix(in srgb, var(--red-500) 22%, transparent)}}[data-theme=dark]{--ring-focus:0 0 0 3px var(--blue-400)}@supports (color:color-mix(in lab,red,red)){[data-theme=dark]{--ring-focus:0 0 0 3px color-mix(in srgb, var(--blue-400) 55%, transparent)}}[data-theme=dark]{--sh-xs:0 1px 2px #00000059;--sh-sm:0 1px 3px #0006;color-scheme:dark}html,body,#app{height:100%}body{font-family:var(--font-sans);background:var(--bg-page);color:var(--text-primary);-webkit-font-smoothing:antialiased}h1,h2,h3{font-family:var(--font-display);letter-spacing:-.02em}.pv-btn-sec:hover:not(:disabled){background:var(--bg-sunken)}.pv-btn-sec:active:not(:disabled){transform:translateY(1px)}.pv-btn-sec:focus-visible{box-shadow:var(--ring-focus);outline:none}.pv-btn:hover:not(:disabled){background:var(--brand-hover)}.pv-btn:active:not(:disabled){transform:translateY(1px)}.pv-btn:disabled{opacity:.55;cursor:not-allowed}.pv-btn:focus-visible{box-shadow:var(--ring-focus);outline:none}.pv-input::placeholder{color:var(--text-muted)}.pv-input:focus{border-color:var(--border-focus);box-shadow:var(--ring-focus);outline:none}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000} diff --git a/API Server/internal/api/dist/assets/index-DJSuRngH.js b/API Server/internal/api/dist/assets/index-DJSuRngH.js new file mode 100644 index 0000000..3dcd126 --- /dev/null +++ b/API Server/internal/api/dist/assets/index-DJSuRngH.js @@ -0,0 +1,17 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function s(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(o){if(o.ep)return;o.ep=!0;const i=s(o);fetch(o.href,i)}})();/** +* @vue/shared v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Cn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ne={},Lt=[],et=()=>{},Oo=()=>!1,Fs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ns=e=>e.startsWith("onUpdate:"),ve=Object.assign,Sn=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Wi=Object.prototype.hasOwnProperty,Q=(e,t)=>Wi.call(e,t),F=Array.isArray,Ft=e=>ps(e)==="[object Map]",zt=e=>ps(e)==="[object Set]",Jn=e=>ps(e)==="[object Date]",H=e=>typeof e=="function",ce=e=>typeof e=="string",tt=e=>typeof e=="symbol",se=e=>e!==null&&typeof e=="object",Ro=e=>(se(e)||H(e))&&H(e.then)&&H(e.catch),Io=Object.prototype.toString,ps=e=>Io.call(e),Gi=e=>ps(e).slice(8,-1),Mo=e=>ps(e)==="[object Object]",kn=e=>ce(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,es=Cn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Vs=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},qi=/-\w/g,Be=Vs(e=>e.replace(qi,t=>t.slice(1).toUpperCase())),Ji=/\B([A-Z])/g,yt=Vs(e=>e.replace(Ji,"-$1").toLowerCase()),Uo=Vs(e=>e.charAt(0).toUpperCase()+e.slice(1)),Zs=Vs(e=>e?`on${Uo(e)}`:""),Qe=(e,t)=>!Object.is(e,t),Ts=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Hs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Yn;const Bs=()=>Yn||(Yn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function En(e){if(F(e)){const t={};for(let s=0;s{if(s){const n=s.split(Xi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Pe(e){let t="";if(ce(e))t=e;else if(F(e))for(let s=0;smt(s,t))}const Do=e=>!!(e&&e.__v_isRef===!0),O=e=>ce(e)?e:e==null?"":F(e)||se(e)&&(e.toString===Io||!H(e.toString))?Do(e)?O(e.value):JSON.stringify(e,Lo,2):String(e),Lo=(e,t)=>Do(t)?Lo(e,t.value):Ft(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],i)=>(s[Qs(n,i)+" =>"]=o,s),{})}:zt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Qs(s))}:tt(t)?Qs(t):se(t)&&!F(t)&&!Mo(t)?String(t):t,Qs=(e,t="")=>{var s;return tt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/** +* @vue/reactivity v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let pe;class nl{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&pe&&(pe.active?(this.parent=pe,this.index=(pe.scopes||(pe.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t0&&--this._on===0){if(pe===this)pe=this.prevScope;else{let t=pe;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s0)return;if(ss){let t=ss;for(ss=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;ts;){let t=ts;for(ts=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Ho(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Bo(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),On(n),il(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function fn(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ko(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ko(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===rs)||(e.globalVersion=rs,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!fn(e))))return;e.flags|=2;const t=e.dep,s=oe,n=Ke;oe=e,Ke=!0;try{Ho(e);const o=e.fn(e._value);(t.version===0||Qe(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{oe=s,Ke=n,Bo(e),e.flags&=-3}}function On(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)On(i,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function il(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let Ke=!0;const zo=[];function st(){zo.push(Ke),Ke=!1}function nt(){const e=zo.pop();Ke=e===void 0?!0:e}function Xn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=oe;oe=void 0;try{t()}finally{oe=s}}}let rs=0;class ll{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Rn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!oe||!Ke||oe===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==oe)s=this.activeLink=new ll(oe,this),oe.deps?(s.prevDep=oe.depsTail,oe.depsTail.nextDep=s,oe.depsTail=s):oe.deps=oe.depsTail=s,Wo(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=oe.depsTail,s.nextDep=void 0,oe.depsTail.nextDep=s,oe.depsTail=s,oe.deps===s&&(oe.deps=n)}return s}trigger(t){this.version++,rs++,this.notify(t)}notify(t){Pn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{An()}}}function Wo(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Wo(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const dn=new WeakMap,At=Symbol(""),pn=Symbol(""),as=Symbol("");function ge(e,t,s){if(Ke&&oe){let n=dn.get(e);n||dn.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Rn),o.map=n,o.key=s),o.track()}}function ut(e,t,s,n,o,i){const l=dn.get(e);if(!l){rs++;return}const r=c=>{c&&c.trigger()};if(Pn(),t==="clear")l.forEach(r);else{const c=F(e),g=c&&kn(s);if(c&&s==="length"){const h=Number(n);l.forEach((y,I)=>{(I==="length"||I===as||!tt(I)&&I>=h)&&r(y)})}else switch((s!==void 0||l.has(void 0))&&r(l.get(s)),g&&r(l.get(as)),t){case"add":c?g&&r(l.get("length")):(r(l.get(At)),Ft(e)&&r(l.get(pn)));break;case"delete":c||(r(l.get(At)),Ft(e)&&r(l.get(pn)));break;case"set":Ft(e)&&r(l.get(At));break}}An()}function $t(e){const t=Z(e);return t===e?t:(ge(t,"iterate",as),De(e)?t:t.map(ze))}function Ks(e){return ge(e=Z(e),"iterate",as),e}function Xe(e,t){return pt(e)?Ht(Ot(e)?ze(t):t):ze(t)}const rl={__proto__:null,[Symbol.iterator](){return tn(this,Symbol.iterator,e=>Xe(this,e))},concat(...e){return $t(this).concat(...e.map(t=>F(t)?$t(t):t))},entries(){return tn(this,"entries",e=>(e[1]=Xe(this,e[1]),e))},every(e,t){return rt(this,"every",e,t,void 0,arguments)},filter(e,t){return rt(this,"filter",e,t,s=>s.map(n=>Xe(this,n)),arguments)},find(e,t){return rt(this,"find",e,t,s=>Xe(this,s),arguments)},findIndex(e,t){return rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return rt(this,"findLast",e,t,s=>Xe(this,s),arguments)},findLastIndex(e,t){return rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return sn(this,"includes",e)},indexOf(...e){return sn(this,"indexOf",e)},join(e){return $t(this).join(e)},lastIndexOf(...e){return sn(this,"lastIndexOf",e)},map(e,t){return rt(this,"map",e,t,void 0,arguments)},pop(){return Gt(this,"pop")},push(...e){return Gt(this,"push",e)},reduce(e,...t){return Zn(this,"reduce",e,t)},reduceRight(e,...t){return Zn(this,"reduceRight",e,t)},shift(){return Gt(this,"shift")},some(e,t){return rt(this,"some",e,t,void 0,arguments)},splice(...e){return Gt(this,"splice",e)},toReversed(){return $t(this).toReversed()},toSorted(e){return $t(this).toSorted(e)},toSpliced(...e){return $t(this).toSpliced(...e)},unshift(...e){return Gt(this,"unshift",e)},values(){return tn(this,"values",e=>Xe(this,e))}};function tn(e,t,s){const n=Ks(e),o=n[t]();return n!==e&&!De(e)&&(o._next=o.next,o.next=()=>{const i=o._next();return i.done||(i.value=s(i.value)),i}),o}const al=Array.prototype;function rt(e,t,s,n,o,i){const l=Ks(e),r=l!==e&&!De(e),c=l[t];if(c!==al[t]){const y=c.apply(e,i);return r?ze(y):y}let g=s;l!==e&&(r?g=function(y,I){return s.call(this,Xe(e,y),I,e)}:s.length>2&&(g=function(y,I){return s.call(this,y,I,e)}));const h=c.call(l,g,n);return r&&o?o(h):h}function Zn(e,t,s,n){const o=Ks(e),i=o!==e&&!De(e);let l=s,r=!1;o!==e&&(i?(r=n.length===0,l=function(g,h,y){return r&&(r=!1,g=Xe(e,g)),s.call(this,g,Xe(e,h),y,e)}):s.length>3&&(l=function(g,h,y){return s.call(this,g,h,y,e)}));const c=o[t](l,...n);return r?Xe(e,c):c}function sn(e,t,s){const n=Z(e);ge(n,"iterate",as);const o=n[t](...s);return(o===-1||o===!1)&&$n(s[0])?(s[0]=Z(s[0]),n[t](...s)):o}function Gt(e,t,s=[]){st(),Pn();const n=Z(e)[t].apply(e,s);return An(),nt(),n}const cl=Cn("__proto__,__v_isRef,__isVue"),Go=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(tt));function ul(e){tt(e)||(e=String(e));const t=Z(this);return ge(t,"has",e),t.hasOwnProperty(e)}class qo{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(o?i?xl:Zo:i?Xo:Yo).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const l=F(t);if(!o){let c;if(l&&(c=rl[s]))return c;if(s==="hasOwnProperty")return ul}const r=Reflect.get(t,s,me(t)?t:n);if((tt(s)?Go.has(s):cl(s))||(o||ge(t,"get",s),i))return r;if(me(r)){const c=l&&kn(s)?r:r.value;return o&&se(c)?gn(c):c}return se(r)?o?gn(r):Mn(r):r}}class Jo extends qo{constructor(t=!1){super(!1,t)}set(t,s,n,o){let i=t[s];const l=F(t)&&kn(s);if(!this._isShallow){const g=pt(i);if(!De(n)&&!pt(n)&&(i=Z(i),n=Z(n)),!l&&me(i)&&!me(n))return g||(i.value=n),!0}const r=l?Number(s)e,ws=e=>Reflect.getPrototypeOf(e);function gl(e,t,s){return function(...n){const o=this.__v_raw,i=Z(o),l=Ft(i),r=e==="entries"||e===Symbol.iterator&&l,c=e==="keys"&&l,g=o[e](...n),h=s?hn:t?Ht:ze;return!t&&ge(i,"iterate",c?pn:At),ve(Object.create(g),{next(){const{value:y,done:I}=g.next();return I?{value:y,done:I}:{value:r?[h(y[0]),h(y[1])]:h(y),done:I}}})}}function Cs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ml(e,t){const s={get(o){const i=this.__v_raw,l=Z(i),r=Z(o);e||(Qe(o,r)&&ge(l,"get",o),ge(l,"get",r));const{has:c}=ws(l),g=t?hn:e?Ht:ze;if(c.call(l,o))return g(i.get(o));if(c.call(l,r))return g(i.get(r));i!==l&&i.get(o)},get size(){const o=this.__v_raw;return!e&&ge(Z(o),"iterate",At),o.size},has(o){const i=this.__v_raw,l=Z(i),r=Z(o);return e||(Qe(o,r)&&ge(l,"has",o),ge(l,"has",r)),o===r?i.has(o):i.has(o)||i.has(r)},forEach(o,i){const l=this,r=l.__v_raw,c=Z(r),g=t?hn:e?Ht:ze;return!e&&ge(c,"iterate",At),r.forEach((h,y)=>o.call(i,g(h),g(y),l))}};return ve(s,e?{add:Cs("add"),set:Cs("set"),delete:Cs("delete"),clear:Cs("clear")}:{add(o){const i=Z(this),l=ws(i),r=Z(o),c=!t&&!De(o)&&!pt(o)?r:o;return l.has.call(i,c)||Qe(o,c)&&l.has.call(i,o)||Qe(r,c)&&l.has.call(i,r)||(i.add(c),ut(i,"add",c,c)),this},set(o,i){!t&&!De(i)&&!pt(i)&&(i=Z(i));const l=Z(this),{has:r,get:c}=ws(l);let g=r.call(l,o);g||(o=Z(o),g=r.call(l,o));const h=c.call(l,o);return l.set(o,i),g?Qe(i,h)&&ut(l,"set",o,i):ut(l,"add",o,i),this},delete(o){const i=Z(this),{has:l,get:r}=ws(i);let c=l.call(i,o);c||(o=Z(o),c=l.call(i,o)),r&&r.call(i,o);const g=i.delete(o);return c&&ut(i,"delete",o,void 0),g},clear(){const o=Z(this),i=o.size!==0,l=o.clear();return i&&ut(o,"clear",void 0,void 0),l}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=gl(o,e,t)}),s}function In(e,t){const s=ml(e,t);return(n,o,i)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(Q(s,o)&&o in n?s:n,o,i)}const vl={get:In(!1,!1)},bl={get:In(!1,!0)},yl={get:In(!0,!1)};const Yo=new WeakMap,Xo=new WeakMap,Zo=new WeakMap,xl=new WeakMap;function _l(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Mn(e){return pt(e)?e:Un(e,!1,dl,vl,Yo)}function wl(e){return Un(e,!1,hl,bl,Xo)}function gn(e){return Un(e,!0,pl,yl,Zo)}function Un(e,t,s,n,o){if(!se(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=o.get(e);if(i)return i;const l=_l(Gi(e));if(l===0)return e;const r=new Proxy(e,l===2?n:s);return o.set(e,r),r}function Ot(e){return pt(e)?Ot(e.__v_raw):!!(e&&e.__v_isReactive)}function pt(e){return!!(e&&e.__v_isReadonly)}function De(e){return!!(e&&e.__v_isShallow)}function $n(e){return e?!!e.__v_raw:!1}function Z(e){const t=e&&e.__v_raw;return t?Z(t):e}function Cl(e){return!Q(e,"__v_skip")&&Object.isExtensible(e)&&$o(e,"__v_skip",!0),e}const ze=e=>se(e)?Mn(e):e,Ht=e=>se(e)?gn(e):e;function me(e){return e?e.__v_isRef===!0:!1}function L(e){return Sl(e,!1)}function Sl(e,t){return me(e)?e:new kl(e,t)}class kl{constructor(t,s){this.dep=new Rn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:Z(t),this._value=s?t:ze(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||De(t)||pt(t);t=n?t:Z(t),Qe(t,s)&&(this._rawValue=t,this._value=n?t:ze(t),this.dep.trigger())}}function Xt(e){return me(e)?e.value:e}const El={get:(e,t,s)=>t==="__v_raw"?e:Xt(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return me(o)&&!me(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Qo(e){return Ot(e)?e:new Proxy(e,El)}class Tl{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Rn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=rs-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&oe!==this)return Vo(this,!0),!0}get value(){const t=this.dep.track();return Ko(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Pl(e,t,s=!1){let n,o;return H(e)?n=e:(n=e.get,o=e.set),new Tl(n,o,s)}const Ss={},Rs=new WeakMap;let Pt;function Al(e,t=!1,s=Pt){if(s){let n=Rs.get(s);n||Rs.set(s,n=[]),n.push(e)}}function Ol(e,t,s=ne){const{immediate:n,deep:o,once:i,scheduler:l,augmentJob:r,call:c}=s,g=j=>o?j:De(j)||o===!1||o===0?ft(j,1):ft(j);let h,y,I,U,q=!1,$=!1;if(me(e)?(y=()=>e.value,q=De(e)):Ot(e)?(y=()=>g(e),q=!0):F(e)?($=!0,q=e.some(j=>Ot(j)||De(j)),y=()=>e.map(j=>{if(me(j))return j.value;if(Ot(j))return g(j);if(H(j))return c?c(j,2):j()})):H(e)?t?y=c?()=>c(e,2):e:y=()=>{if(I){st();try{I()}finally{nt()}}const j=Pt;Pt=h;try{return c?c(e,3,[U]):e(U)}finally{Pt=j}}:y=et,t&&o){const j=y,z=o===!0?1/0:o;y=()=>ft(j(),z)}const W=ol(),Y=()=>{h.stop(),W&&W.active&&Sn(W.effects,h)};if(i&&t){const j=t;t=(...z)=>{const ke=j(...z);return Y(),ke}}let V=$?new Array(e.length).fill(Ss):Ss;const X=j=>{if(!(!(h.flags&1)||!h.dirty&&!j))if(t){const z=h.run();if(j||o||q||($?z.some((ke,Re)=>Qe(ke,V[Re])):Qe(z,V))){I&&I();const ke=Pt;Pt=h;try{const Re=[z,V===Ss?void 0:$&&V[0]===Ss?[]:V,U];V=z,c?c(t,3,Re):t(...Re)}finally{Pt=ke}}}else h.run()};return r&&r(X),h=new Fo(y),h.scheduler=l?()=>l(X,!1):X,U=j=>Al(j,!1,h),I=h.onStop=()=>{const j=Rs.get(h);if(j){if(c)c(j,4);else for(const z of j)z();Rs.delete(h)}},t?n?X(!0):V=h.run():l?l(X.bind(null,!0),!0):h.run(),Y.pause=h.pause.bind(h),Y.resume=h.resume.bind(h),Y.stop=Y,Y}function ft(e,t=1/0,s){if(t<=0||!se(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,me(e))ft(e.value,t,s);else if(F(e))for(let n=0;n{ft(n,t,s)});else if(Mo(e)){for(const n in e)ft(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&ft(e[n],t,s)}return e}/** +* @vue/runtime-core v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function hs(e,t,s,n){try{return n?e(...n):e()}catch(o){zs(o,t,s)}}function We(e,t,s,n){if(H(e)){const o=hs(e,t,s,n);return o&&Ro(o)&&o.catch(i=>{zs(i,t,s)}),o}if(F(e)){const o=[];for(let i=0;i>>1,o=xe[n],i=cs(o);i=cs(s)?xe.push(e):xe.splice(Il(t),0,e),e.flags|=1,si()}}function si(){Is||(Is=ei.then(oi))}function Ml(e){F(e)?Nt.push(...e):gt&&e.id===-1?gt.splice(jt+1,0,e):e.flags&1||(Nt.push(e),e.flags|=1),si()}function Qn(e,t,s=Ye+1){for(;scs(s)-cs(n));if(Nt.length=0,gt){gt.push(...t);return}for(gt=t,jt=0;jte.id==null?e.flags&2?-1:1/0:e.id;function oi(e){try{for(Ye=0;Ye{n._d&&uo(-1);const i=Ms(t);let l;try{l=e(...o)}finally{Ms(i),n._d&&uo(1)}return l};return n._n=!0,n._c=!0,n._d=!0,n}function le(e,t){if(je===null)return e;const s=Js(je),n=e.dirs||(e.dirs=[]);for(let o=0;o1)return s&&H(t)?t.call(n&&n.proxy):t}}const jl=Symbol.for("v-scx"),Dl=()=>Ps(jl);function nn(e,t,s){return li(e,t,s)}function li(e,t,s=ne){const{immediate:n,deep:o,flush:i,once:l}=s,r=ve({},s),c=t&&n||!t&&i!=="post";let g;if(fs){if(i==="sync"){const U=Dl();g=U.__watcherHandles||(U.__watcherHandles=[])}else if(!c){const U=()=>{};return U.stop=et,U.resume=et,U.pause=et,U}}const h=_e;r.call=(U,q,$)=>We(U,h,q,$);let y=!1;i==="post"?r.scheduler=U=>{Se(U,h&&h.suspense)}:i!=="sync"&&(y=!0,r.scheduler=(U,q)=>{q?U():jn(U)}),r.augmentJob=U=>{t&&(U.flags|=4),y&&(U.flags|=2,h&&(U.id=h.uid,U.i=h))};const I=Ol(e,t,r);return fs&&(g?g.push(I):c&&I()),I}function Ll(e,t,s){const n=this.proxy,o=ce(e)?e.includes(".")?ri(n,e):()=>n[e]:e.bind(n,n);let i;H(t)?i=t:(i=t.handler,s=t);const l=gs(this),r=li(o,i.bind(n),s);return l(),r}function ri(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;oe.__isTeleport,on=Symbol("_leaveCb");function Dn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Dn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ai(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function eo(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const Us=new WeakMap;function ns(e,t,s,n,o=!1){if(F(e)){e.forEach(($,W)=>ns($,t&&(F(t)?t[W]:t),s,n,o));return}if(os(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&ns(e,t,s,n.component.subTree);return}const i=n.shapeFlag&4?Js(n.component):n.el,l=o?null:i,{i:r,r:c}=e,g=t&&t.r,h=r.refs===ne?r.refs={}:r.refs,y=r.setupState,I=Z(y),U=y===ne?Oo:$=>eo(h,$)?!1:Q(I,$),q=($,W)=>!(W&&eo(h,W));if(g!=null&&g!==c){if(to(t),ce(g))h[g]=null,U(g)&&(y[g]=null);else if(me(g)){const $=t;q(g,$.k)&&(g.value=null),$.k&&(h[$.k]=null)}}if(H(c)){st();try{hs(c,r,12,[l,h])}finally{nt()}}else{const $=ce(c),W=me(c);if($||W){const Y=()=>{if(e.f){const V=$?U(c)?y[c]:h[c]:q()||!e.k?c.value:h[e.k];if(o)F(V)&&Sn(V,i);else if(F(V))V.includes(i)||V.push(i);else if($)h[c]=[i],U(c)&&(y[c]=h[c]);else{const X=[i];q(c,e.k)&&(c.value=X),e.k&&(h[e.k]=X)}}else $?(h[c]=l,U(c)&&(y[c]=l)):W&&(q(c,e.k)&&(c.value=l),e.k&&(h[e.k]=l))};if(l){const V=()=>{Y(),Us.delete(e)};V.id=-1,Us.set(e,V),Se(V,s)}else to(e),Y()}}}function to(e){const t=Us.get(e);t&&(t.flags|=8,Us.delete(e))}Bs().requestIdleCallback;Bs().cancelIdleCallback;const os=e=>!!e.type.__asyncLoader,ci=e=>e.type.__isKeepAlive;function Vl(e,t){ui(e,"a",t)}function Hl(e,t){ui(e,"da",t)}function ui(e,t,s=_e){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Ws(t,n,s),s){let o=s.parent;for(;o&&o.parent;)ci(o.parent.vnode)&&Bl(n,t,s,o),o=o.parent}}function Bl(e,t,s,n){const o=Ws(t,e,n,!0);Ln(()=>{Sn(n[t],o)},s)}function Ws(e,t,s=_e,n=!1){if(s){const o=s[e]||(s[e]=[]),i=t.__weh||(t.__weh=(...l)=>{st();const r=gs(s),c=We(t,s,e,l);return r(),nt(),c});return n?o.unshift(i):o.push(i),i}}const ht=e=>(t,s=_e)=>{(!fs||e==="sp")&&Ws(e,(...n)=>t(...n),s)},Kl=ht("bm"),fi=ht("m"),zl=ht("bu"),Wl=ht("u"),Gl=ht("bum"),Ln=ht("um"),ql=ht("sp"),Jl=ht("rtg"),Yl=ht("rtc");function Xl(e,t=_e){Ws("ec",e,t)}const Zl=Symbol.for("v-ndc");function Ce(e,t,s,n){let o;const i=s,l=F(e);if(l||ce(e)){const r=l&&Ot(e);let c=!1,g=!1;r&&(c=!De(e),g=pt(e),e=Ks(e)),o=new Array(e.length);for(let h=0,y=e.length;ht(r,c,void 0,i));else{const r=Object.keys(e);o=new Array(r.length);for(let c=0,g=r.length;ce?Ii(e)?Js(e):mn(e.parent):null,is=ve(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>mn(e.parent),$root:e=>mn(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pi(e),$forceUpdate:e=>e.f||(e.f=()=>{jn(e.update)}),$nextTick:e=>e.n||(e.n=ti.bind(e.proxy)),$watch:e=>Ll.bind(e)}),ln=(e,t)=>e!==ne&&!e.__isScriptSetup&&Q(e,t),Ql={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:i,accessCache:l,type:r,appContext:c}=e;if(t[0]!=="$"){const I=l[t];if(I!==void 0)switch(I){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return i[t]}else{if(ln(n,t))return l[t]=1,n[t];if(o!==ne&&Q(o,t))return l[t]=2,o[t];if(Q(i,t))return l[t]=3,i[t];if(s!==ne&&Q(s,t))return l[t]=4,s[t];vn&&(l[t]=0)}}const g=is[t];let h,y;if(g)return t==="$attrs"&&ge(e.attrs,"get",""),g(e);if((h=r.__cssModules)&&(h=h[t]))return h;if(s!==ne&&Q(s,t))return l[t]=4,s[t];if(y=c.config.globalProperties,Q(y,t))return y[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:i}=e;return ln(o,t)?(o[t]=s,!0):n!==ne&&Q(n,t)?(n[t]=s,!0):Q(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,props:i,type:l}},r){let c;return!!(s[r]||e!==ne&&r[0]!=="$"&&Q(e,r)||ln(t,r)||Q(i,r)||Q(n,r)||Q(is,r)||Q(o.config.globalProperties,r)||(c=l.__cssModules)&&c[r])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:Q(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function so(e){return F(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let vn=!0;function er(e){const t=pi(e),s=e.proxy,n=e.ctx;vn=!1,t.beforeCreate&&no(t.beforeCreate,e,"bc");const{data:o,computed:i,methods:l,watch:r,provide:c,inject:g,created:h,beforeMount:y,mounted:I,beforeUpdate:U,updated:q,activated:$,deactivated:W,beforeDestroy:Y,beforeUnmount:V,destroyed:X,unmounted:j,render:z,renderTracked:ke,renderTriggered:Re,errorCaptured:Ge,serverPrefetch:Ie,expose:we,inheritAttrs:ue,components:qe,directives:Fe,filters:he}=t;if(g&&tr(g,n,null),l)for(const ee in l){const te=l[ee];H(te)&&(n[ee]=te.bind(s))}if(o){const ee=o.call(s,s);se(ee)&&(e.data=Mn(ee))}if(vn=!0,i)for(const ee in i){const te=i[ee],Ve=H(te)?te.bind(s,s):H(te.get)?te.get.bind(s,s):et,Rt=!H(te)&&H(te.set)?te.set.bind(s):et,ot=_n({get:Ve,set:Rt});Object.defineProperty(n,ee,{enumerable:!0,configurable:!0,get:()=>ot.value,set:Ee=>ot.value=Ee})}if(r)for(const ee in r)di(r[ee],n,s,ee);if(c){const ee=H(c)?c.call(s):c;Reflect.ownKeys(ee).forEach(te=>{$l(te,ee[te])})}h&&no(h,e,"c");function ae(ee,te){F(te)?te.forEach(Ve=>ee(Ve.bind(s))):te&&ee(te.bind(s))}if(ae(Kl,y),ae(fi,I),ae(zl,U),ae(Wl,q),ae(Vl,$),ae(Hl,W),ae(Xl,Ge),ae(Yl,ke),ae(Jl,Re),ae(Gl,V),ae(Ln,j),ae(ql,Ie),F(we))if(we.length){const ee=e.exposed||(e.exposed={});we.forEach(te=>{Object.defineProperty(ee,te,{get:()=>s[te],set:Ve=>s[te]=Ve,enumerable:!0})})}else e.exposed||(e.exposed={});z&&e.render===et&&(e.render=z),ue!=null&&(e.inheritAttrs=ue),qe&&(e.components=qe),Fe&&(e.directives=Fe),Ie&&ai(e)}function tr(e,t,s=et){F(e)&&(e=bn(e));for(const n in e){const o=e[n];let i;se(o)?"default"in o?i=Ps(o.from||n,o.default,!0):i=Ps(o.from||n):i=Ps(o),me(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[n]=i}}function no(e,t,s){We(F(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function di(e,t,s,n){let o=n.includes(".")?ri(s,n):()=>s[n];if(ce(e)){const i=t[e];H(i)&&nn(o,i)}else if(H(e))nn(o,e.bind(s));else if(se(e))if(F(e))e.forEach(i=>di(i,t,s,n));else{const i=H(e.handler)?e.handler.bind(s):t[e.handler];H(i)&&nn(o,i,e)}}function pi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:i,config:{optionMergeStrategies:l}}=e.appContext,r=i.get(t);let c;return r?c=r:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(g=>$s(c,g,l,!0)),$s(c,t,l)),se(t)&&i.set(t,c),c}function $s(e,t,s,n=!1){const{mixins:o,extends:i}=t;i&&$s(e,i,s,!0),o&&o.forEach(l=>$s(e,l,s,!0));for(const l in t)if(!(n&&l==="expose")){const r=sr[l]||s&&s[l];e[l]=r?r(e[l],t[l]):t[l]}return e}const sr={data:oo,props:io,emits:io,methods:Zt,computed:Zt,beforeCreate:be,created:be,beforeMount:be,mounted:be,beforeUpdate:be,updated:be,beforeDestroy:be,beforeUnmount:be,destroyed:be,unmounted:be,activated:be,deactivated:be,errorCaptured:be,serverPrefetch:be,components:Zt,directives:Zt,watch:or,provide:oo,inject:nr};function oo(e,t){return t?e?function(){return ve(H(e)?e.call(this,this):e,H(t)?t.call(this,this):t)}:t:e}function nr(e,t){return Zt(bn(e),bn(t))}function bn(e){if(F(e)){const t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Be(t)}Modifiers`]||e[`${yt(t)}Modifiers`];function ar(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ne;let o=s;const i=t.startsWith("update:"),l=i&&rr(n,t.slice(7));l&&(l.trim&&(o=s.map(h=>ce(h)?h.trim():h)),l.number&&(o=s.map(Hs)));let r,c=n[r=Zs(t)]||n[r=Zs(Be(t))];!c&&i&&(c=n[r=Zs(yt(t))]),c&&We(c,e,6,o);const g=n[r+"Once"];if(g){if(!e.emitted)e.emitted={};else if(e.emitted[r])return;e.emitted[r]=!0,We(g,e,6,o)}}const cr=new WeakMap;function gi(e,t,s=!1){const n=s?cr:t.emitsCache,o=n.get(e);if(o!==void 0)return o;const i=e.emits;let l={},r=!1;if(!H(e)){const c=g=>{const h=gi(g,t,!0);h&&(r=!0,ve(l,h))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!r?(se(e)&&n.set(e,null),null):(F(i)?i.forEach(c=>l[c]=null):ve(l,i),se(e)&&n.set(e,l),l)}function Gs(e,t){return!e||!Fs(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Q(e,t[0].toLowerCase()+t.slice(1))||Q(e,yt(t))||Q(e,t))}function lo(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[i],slots:l,attrs:r,emit:c,render:g,renderCache:h,props:y,data:I,setupState:U,ctx:q,inheritAttrs:$}=e,W=Ms(e);let Y,V;try{if(s.shapeFlag&4){const j=o||n,z=j;Y=Ze(g.call(z,j,h,y,U,I,q)),V=r}else{const j=t;Y=Ze(j.length>1?j(y,{attrs:r,slots:l,emit:c}):j(y,null)),V=t.props?r:ur(r)}}catch(j){ls.length=0,zs(j,e,1),Y=Oe(vt)}let X=Y;if(V&&$!==!1){const j=Object.keys(V),{shapeFlag:z}=X;j.length&&z&7&&(i&&j.some(Ns)&&(V=fr(V,i)),X=Bt(X,V,!1,!0))}return s.dirs&&(X=Bt(X,null,!1,!0),X.dirs=X.dirs?X.dirs.concat(s.dirs):s.dirs),s.transition&&Dn(X,s.transition),Y=X,Ms(W),Y}const ur=e=>{let t;for(const s in e)(s==="class"||s==="style"||Fs(s))&&((t||(t={}))[s]=e[s]);return t},fr=(e,t)=>{const s={};for(const n in e)(!Ns(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function dr(e,t,s){const{props:n,children:o,component:i}=e,{props:l,children:r,patchFlag:c}=t,g=i.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?ro(n,l,g):!!l;if(c&8){const h=t.dynamicProps;for(let y=0;yObject.create(vi),yi=e=>Object.getPrototypeOf(e)===vi;function hr(e,t,s,n=!1){const o={},i=bi();e.propsDefaults=Object.create(null),xi(e,t,o,i);for(const l in e.propsOptions[0])l in o||(o[l]=void 0);s?e.props=n?o:wl(o):e.type.props?e.props=o:e.props=i,e.attrs=i}function gr(e,t,s,n){const{props:o,attrs:i,vnode:{patchFlag:l}}=e,r=Z(o),[c]=e.propsOptions;let g=!1;if((n||l>0)&&!(l&16)){if(l&8){const h=e.vnode.dynamicProps;for(let y=0;y{c=!0;const[I,U]=_i(y,t,!0);ve(l,I),U&&r.push(...U)};!s&&t.mixins.length&&t.mixins.forEach(h),e.extends&&h(e.extends),e.mixins&&e.mixins.forEach(h)}if(!i&&!c)return se(e)&&n.set(e,Lt),Lt;if(F(i))for(let h=0;he==="_"||e==="_ctx"||e==="$stable",Nn=e=>F(e)?e.map(Ze):[Ze(e)],vr=(e,t,s)=>{if(t._n)return t;const n=Ul((...o)=>Nn(t(...o)),s);return n._c=!1,n},wi=(e,t,s)=>{const n=e._ctx;for(const o in e){if(Fn(o))continue;const i=e[o];if(H(i))t[o]=vr(o,i,n);else if(i!=null){const l=Nn(i);t[o]=()=>l}}},Ci=(e,t)=>{const s=Nn(t);e.slots.default=()=>s},Si=(e,t,s)=>{for(const n in t)(s||!Fn(n))&&(e[n]=t[n])},br=(e,t,s)=>{const n=e.slots=bi();if(e.vnode.shapeFlag&32){const o=t._;o?(Si(n,t,s),s&&$o(n,"_",o,!0)):wi(t,n)}else t&&Ci(e,t)},yr=(e,t,s)=>{const{vnode:n,slots:o}=e;let i=!0,l=ne;if(n.shapeFlag&32){const r=t._;r?s&&r===1?i=!1:Si(o,t,s):(i=!t.$stable,wi(t,o)),l=t}else t&&(Ci(e,t),l={default:1});if(i)for(const r in o)!Fn(r)&&l[r]==null&&delete o[r]},Se=Sr;function xr(e){return _r(e)}function _r(e,t){const s=Bs();s.__VUE__=!0;const{insert:n,remove:o,patchProp:i,createElement:l,createText:r,createComment:c,setText:g,setElementText:h,parentNode:y,nextSibling:I,setScopeId:U=et,insertStaticContent:q}=e,$=(a,p,m,w=null,x=null,_=null,T=void 0,k=null,C=!!p.dynamicChildren)=>{if(a===p)return;a&&!qt(a,p)&&(w=_t(a),Ee(a,x,_,!0),a=null),p.patchFlag===-2&&(C=!1,p.dynamicChildren=null);const{type:b,ref:R,shapeFlag:E}=p;switch(b){case qs:W(a,p,m,w);break;case vt:Y(a,p,m,w);break;case As:a==null&&V(p,m,w,T);break;case re:qe(a,p,m,w,x,_,T,k,C);break;default:E&1?z(a,p,m,w,x,_,T,k,C):E&6?Fe(a,p,m,w,x,_,T,k,C):(E&64||E&128)&&b.process(a,p,m,w,x,_,T,k,C,wt)}R!=null&&x?ns(R,a&&a.ref,_,p||a,!p):R==null&&a&&a.ref!=null&&ns(a.ref,null,_,a,!0)},W=(a,p,m,w)=>{if(a==null)n(p.el=r(p.children),m,w);else{const x=p.el=a.el;p.children!==a.children&&g(x,p.children)}},Y=(a,p,m,w)=>{a==null?n(p.el=c(p.children||""),m,w):p.el=a.el},V=(a,p,m,w)=>{[a.el,a.anchor]=q(a.children,p,m,w,a.el,a.anchor)},X=({el:a,anchor:p},m,w)=>{let x;for(;a&&a!==p;)x=I(a),n(a,m,w),a=x;n(p,m,w)},j=({el:a,anchor:p})=>{let m;for(;a&&a!==p;)m=I(a),o(a),a=m;o(p)},z=(a,p,m,w,x,_,T,k,C)=>{if(p.type==="svg"?T="svg":p.type==="math"&&(T="mathml"),a==null)ke(p,m,w,x,_,T,k,C);else{const b=a.el&&a.el._isVueCE?a.el:null;try{b&&b._beginPatch(),Ie(a,p,x,_,T,k,C)}finally{b&&b._endPatch()}}},ke=(a,p,m,w,x,_,T,k)=>{let C,b;const{props:R,shapeFlag:E,transition:M,dirs:D}=a;if(C=a.el=l(a.type,_,R&&R.is,R),E&8?h(C,a.children):E&16&&Ge(a.children,C,null,w,x,rn(a,_),T,k),D&&Et(a,null,w,"created"),Re(C,a,a.scopeId,T,w),R){for(const B in R)B!=="value"&&!es(B)&&i(C,B,null,R[B],_,w);"value"in R&&i(C,"value",null,R.value,_),(b=R.onVnodeBeforeMount)&&Je(b,w,a)}D&&Et(a,null,w,"beforeMount");const N=wr(x,M);N&&M.beforeEnter(C),n(C,p,m),((b=R&&R.onVnodeMounted)||N||D)&&Se(()=>{try{b&&Je(b,w,a),N&&M.enter(C),D&&Et(a,null,w,"mounted")}finally{}},x)},Re=(a,p,m,w,x)=>{if(m&&U(a,m),w)for(let _=0;_{for(let b=C;b{const k=p.el=a.el;let{patchFlag:C,dynamicChildren:b,dirs:R}=p;C|=a.patchFlag&16;const E=a.props||ne,M=p.props||ne;let D;if(m&&Tt(m,!1),(D=M.onVnodeBeforeUpdate)&&Je(D,m,p,a),R&&Et(p,a,m,"beforeUpdate"),m&&Tt(m,!0),b&&(!a.dynamicChildren||a.dynamicChildren.length!==b.length)&&(C=0,T=!1,b=null),(E.innerHTML&&M.innerHTML==null||E.textContent&&M.textContent==null)&&h(k,""),b?we(a.dynamicChildren,b,k,m,w,rn(p,x),_):T||te(a,p,k,null,m,w,rn(p,x),_,!1),C>0){if(C&16)ue(k,E,M,m,x);else if(C&2&&E.class!==M.class&&i(k,"class",null,M.class,x),C&4&&i(k,"style",E.style,M.style,x),C&8){const N=p.dynamicProps;for(let B=0;B{D&&Je(D,m,p,a),R&&Et(p,a,m,"updated")},w)},we=(a,p,m,w,x,_,T)=>{for(let k=0;k{if(p!==m){if(p!==ne)for(const _ in p)!es(_)&&!(_ in m)&&i(a,_,p[_],null,x,w);for(const _ in m){if(es(_))continue;const T=m[_],k=p[_];T!==k&&_!=="value"&&i(a,_,k,T,x,w)}"value"in m&&i(a,"value",p.value,m.value,x)}},qe=(a,p,m,w,x,_,T,k,C)=>{const b=p.el=a?a.el:r(""),R=p.anchor=a?a.anchor:r("");let{patchFlag:E,dynamicChildren:M,slotScopeIds:D}=p;D&&(k=k?k.concat(D):D),a==null?(n(b,m,w),n(R,m,w),Ge(p.children||[],m,R,x,_,T,k,C)):E>0&&E&64&&M&&a.dynamicChildren&&a.dynamicChildren.length===M.length?(we(a.dynamicChildren,M,m,x,_,T,k),(p.key!=null||x&&p===x.subTree)&&ki(a,p,!0)):te(a,p,m,R,x,_,T,k,C)},Fe=(a,p,m,w,x,_,T,k,C)=>{p.slotScopeIds=k,a==null?p.shapeFlag&512?x.ctx.activate(p,m,w,T,C):he(p,m,w,x,_,T,C):Ne(a,p,C)},he=(a,p,m,w,x,_,T)=>{const k=a.component=Mr(a,w,x);if(ci(a)&&(k.ctx.renderer=wt),$r(k,!1,T),k.asyncDep){if(x&&x.registerDep(k,ae,T),!a.el){const C=k.subTree=Oe(vt);Y(null,C,p,m),a.placeholder=C.el}}else ae(k,a,p,m,x,_,T)},Ne=(a,p,m)=>{const w=p.component=a.component;if(dr(a,p,m))if(w.asyncDep&&!w.asyncResolved){ee(w,p,m);return}else w.next=p,w.update();else p.el=a.el,w.vnode=p},ae=(a,p,m,w,x,_,T)=>{const k=()=>{if(a.isMounted){let{next:E,bu:M,u:D,parent:N,vnode:B}=a;{const Ue=Ei(a);if(Ue){E&&(E.el=B.el,ee(a,E,T)),Ue.asyncDep.then(()=>{Se(()=>{a.isUnmounted||b()},x)});return}}let G=E,J;Tt(a,!1),E?(E.el=B.el,ee(a,E,T)):E=B,M&&Ts(M),(J=E.props&&E.props.onVnodeBeforeUpdate)&&Je(J,N,E,B),Tt(a,!0);const ie=lo(a),Me=a.subTree;a.subTree=ie,$(Me,ie,y(Me.el),_t(Me),a,x,_),E.el=ie.el,G===null&&pr(a,ie.el),D&&Se(D,x),(J=E.props&&E.props.onVnodeUpdated)&&Se(()=>Je(J,N,E,B),x)}else{let E;const{el:M,props:D}=p,{bm:N,m:B,parent:G,root:J,type:ie}=a,Me=os(p);Tt(a,!1),N&&Ts(N),!Me&&(E=D&&D.onVnodeBeforeMount)&&Je(E,G,p),Tt(a,!0);{J.ce&&J.ce._hasShadowRoot()&&J.ce._injectChildStyle(ie,a.parent?a.parent.type:void 0);const Ue=a.subTree=lo(a);$(null,Ue,m,w,a,x,_),p.el=Ue.el}if(B&&Se(B,x),!Me&&(E=D&&D.onVnodeMounted)){const Ue=p;Se(()=>Je(E,G,Ue),x)}(p.shapeFlag&256||G&&os(G.vnode)&&G.vnode.shapeFlag&256)&&a.a&&Se(a.a,x),a.isMounted=!0,p=m=w=null}};a.scope.on();const C=a.effect=new Fo(k);a.scope.off();const b=a.update=C.run.bind(C),R=a.job=C.runIfDirty.bind(C);R.i=a,R.id=a.uid,C.scheduler=()=>jn(R),Tt(a,!0),b()},ee=(a,p,m)=>{p.component=a;const w=a.vnode.props;a.vnode=p,a.next=null,gr(a,p.props,w,m),yr(a,p.children,m),st(),Qn(a),nt()},te=(a,p,m,w,x,_,T,k,C=!1)=>{const b=a&&a.children,R=a?a.shapeFlag:0,E=p.children,{patchFlag:M,shapeFlag:D}=p;if(M>0){if(M&128){Rt(b,E,m,w,x,_,T,k,C);return}else if(M&256){Ve(b,E,m,w,x,_,T,k,C);return}}D&8?(R&16&&xt(b,x,_),E!==b&&h(m,E)):R&16?D&16?Rt(b,E,m,w,x,_,T,k,C):xt(b,x,_,!0):(R&8&&h(m,""),D&16&&Ge(E,m,w,x,_,T,k,C))},Ve=(a,p,m,w,x,_,T,k,C)=>{a=a||Lt,p=p||Lt;const b=a.length,R=p.length,E=Math.min(b,R);let M;for(M=0;MR?xt(a,x,_,!0,!1,E):Ge(p,m,w,x,_,T,k,C,E)},Rt=(a,p,m,w,x,_,T,k,C)=>{let b=0;const R=p.length;let E=a.length-1,M=R-1;for(;b<=E&&b<=M;){const D=a[b],N=p[b]=C?ct(p[b]):Ze(p[b]);if(qt(D,N))$(D,N,m,null,x,_,T,k,C);else break;b++}for(;b<=E&&b<=M;){const D=a[E],N=p[M]=C?ct(p[M]):Ze(p[M]);if(qt(D,N))$(D,N,m,null,x,_,T,k,C);else break;E--,M--}if(b>E){if(b<=M){const D=M+1,N=DM)for(;b<=E;)Ee(a[b],x,_,!0),b++;else{const D=b,N=b,B=new Map;for(b=N;b<=M;b++){const fe=p[b]=C?ct(p[b]):Ze(p[b]);fe.key!=null&&B.set(fe.key,b)}let G,J=0;const ie=M-N+1;let Me=!1,Ue=0;const Ct=new Array(ie);for(b=0;b=ie){Ee(fe,x,_,!0);continue}let de;if(fe.key!=null)de=B.get(fe.key);else for(G=N;G<=M;G++)if(Ct[G-N]===0&&qt(fe,p[G])){de=G;break}de===void 0?Ee(fe,x,_,!0):(Ct[de-N]=b+1,de>=Ue?Ue=de:Me=!0,$(fe,p[de],m,null,x,_,T,k,C),J++)}const bs=Me?Cr(Ct):Lt;for(G=bs.length-1,b=ie-1;b>=0;b--){const fe=N+b,de=p[fe],St=p[fe+1],kt=fe+1{const{el:_,type:T,transition:k,children:C,shapeFlag:b}=a;if(b&6){ot(a.component.subTree,p,m,w);return}if(b&128){a.suspense.move(p,m,w);return}if(b&64){T.move(a,p,m,wt);return}if(T===re){n(_,p,m);for(let E=0;Ek.enter(_),x));else{const{leave:E,delayLeave:M,afterLeave:D}=k,N=()=>{a.ctx.isUnmounted?o(_):n(_,p,m)},B=()=>{const G=_._isLeaving||!!_[on];_._isLeaving&&_[on](!0),k.persisted&&!G?N():E(_,()=>{N(),D&&D()})};M?M(_,N,B):B()}else n(_,p,m)},Ee=(a,p,m,w=!1,x=!1)=>{const{type:_,props:T,ref:k,children:C,dynamicChildren:b,shapeFlag:R,patchFlag:E,dirs:M,cacheIndex:D,memo:N}=a;if(E===-2&&(x=!1),k!=null&&(st(),ns(k,null,m,a,!0),nt()),D!=null&&(p.renderCache[D]=void 0),R&256){p.ctx.deactivate(a);return}const B=R&1&&M,G=!os(a);let J;if(G&&(J=T&&T.onVnodeBeforeUnmount)&&Je(J,p,a),R&6)it(a.component,m,w);else{if(R&128){a.suspense.unmount(m,w);return}B&&Et(a,null,p,"beforeUnmount"),R&64?a.type.remove(a,p,m,wt,w):b&&!b.hasOnce&&(_!==re||E>0&&E&64)?xt(b,p,m,!1,!0):(_===re&&E&384||!x&&R&16)&&xt(C,p,m),w&&ms(a)}const ie=N!=null&&D==null;(G&&(J=T&&T.onVnodeUnmounted)||B||ie)&&Se(()=>{J&&Je(J,p,a),B&&Et(a,null,p,"unmounted"),ie&&(a.el=null)},m)},ms=a=>{const{type:p,el:m,anchor:w,transition:x}=a;if(p===re){Ys(m,w);return}if(p===As){j(a);return}const _=()=>{o(m),x&&!x.persisted&&x.afterLeave&&x.afterLeave()};if(a.shapeFlag&1&&x&&!x.persisted){const{leave:T,delayLeave:k}=x,C=()=>T(m,_);k?k(a.el,_,C):C()}else _()},Ys=(a,p)=>{let m;for(;a!==p;)m=I(a),o(a),a=m;o(p)},it=(a,p,m)=>{const{bum:w,scope:x,job:_,subTree:T,um:k,m:C,a:b}=a;co(C),co(b),w&&Ts(w),x.stop(),_&&(_.flags|=8,Ee(T,a,p,m)),k&&Se(k,p),Se(()=>{a.isUnmounted=!0},p)},xt=(a,p,m,w=!1,x=!1,_=0)=>{for(let T=_;T{if(a.shapeFlag&6)return _t(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const p=I(a.anchor||a.el),m=p&&p[Fl];return m?I(m):p};let Wt=!1;const vs=(a,p,m)=>{let w;a==null?p._vnode&&(Ee(p._vnode,null,null,!0),w=p._vnode.component):$(p._vnode||null,a,p,null,null,null,m),p._vnode=a,Wt||(Wt=!0,Qn(w),ni(),Wt=!1)},wt={p:$,um:Ee,m:ot,r:ms,mt:he,mc:Ge,pc:te,pbc:we,n:_t,o:e};return{render:vs,hydrate:void 0,createApp:lr(vs)}}function rn({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Tt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function wr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ki(e,t,s=!1){const n=e.children,o=t.children;if(F(n)&&F(o))for(let i=0;i>1,e[s[r]]0&&(t[n]=s[i-1]),s[i]=n)}}for(i=s.length,l=s[i-1];i-- >0;)s[i]=l,l=t[l];return s}function Ei(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ei(t)}function co(e){if(e)for(let t=0;te.__isSuspense;function Sr(e,t){t&&t.pendingBranch?F(e)?t.effects.push(...e):t.effects.push(e):Ml(e)}const re=Symbol.for("v-fgt"),qs=Symbol.for("v-txt"),vt=Symbol.for("v-cmt"),As=Symbol.for("v-stc"),ls=[];let Ae=null;function P(e=!1){ls.push(Ae=e?null:[])}function kr(){ls.pop(),Ae=ls[ls.length-1]||null}let us=1;function uo(e,t=!1){us+=e,e<0&&Ae&&t&&(Ae.hasOnce=!0)}function Ai(e){return e.dynamicChildren=us>0?Ae||Lt:null,kr(),us>0&&Ae&&Ae.push(e),e}function A(e,t,s,n,o,i){return Ai(d(e,t,s,n,o,i,!0))}function Er(e,t,s,n,o){return Ai(Oe(e,t,s,n,o,!0))}function Oi(e){return e?e.__v_isVNode===!0:!1}function qt(e,t){return e.type===t.type&&e.key===t.key}const Ri=({key:e})=>e??null,Os=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ce(e)||me(e)||H(e)?{i:je,r:e,k:t,f:!!s}:e:null);function d(e,t=null,s=null,n=0,o=null,i=e===re?0:1,l=!1,r=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ri(t),ref:t&&Os(t),scopeId:ii,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:je};return r?(js(c,s),i&128&&e.normalize(c)):s&&(c.shapeFlag|=ce(s)?8:16),us>0&&!l&&Ae&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Ae.push(c),c}const Oe=Tr;function Tr(e,t=null,s=null,n=0,o=null,i=!1){if((!e||e===Zl)&&(e=vt),Oi(e)){const r=Bt(e,t,!0);return s&&js(r,s),us>0&&!i&&Ae&&(r.shapeFlag&6?Ae[Ae.indexOf(e)]=r:Ae.push(r)),r.patchFlag=-2,r}if(Fr(e)&&(e=e.__vccOpts),t){t=Pr(t);let{class:r,style:c}=t;r&&!ce(r)&&(t.class=Pe(r)),se(c)&&($n(c)&&!F(c)&&(c=ve({},c)),t.style=En(c))}const l=ce(e)?1:Pi(e)?128:Nl(e)?64:se(e)?4:H(e)?2:0;return d(e,t,s,n,o,l,i,!0)}function Pr(e){return e?$n(e)||yi(e)?ve({},e):e:null}function Bt(e,t,s=!1,n=!1){const{props:o,ref:i,patchFlag:l,children:r,transition:c}=e,g=t?Or(o||{},t):o,h={__v_isVNode:!0,__v_skip:!0,type:e.type,props:g,key:g&&Ri(g),ref:t&&t.ref?s&&i?F(i)?i.concat(Os(t)):[i,Os(t)]:Os(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:r,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==re?l===-1?16:l|16:l,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Bt(e.ssContent),ssFallback:e.ssFallback&&Bt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&Dn(h,c.clone(h)),h}function $e(e=" ",t=0){return Oe(qs,null,e,t)}function Ar(e,t){const s=Oe(As,null,e);return s.staticCount=t,s}function K(e="",t=!1){return t?(P(),Er(vt,null,e)):Oe(vt,null,e)}function Ze(e){return e==null||typeof e=="boolean"?Oe(vt):F(e)?Oe(re,null,e.slice()):Oi(e)?ct(e):Oe(qs,null,String(e))}function ct(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Bt(e)}function js(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(F(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),js(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!yi(t)?t._ctx=je:o===3&&je&&(je.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(H(t)){if(n&65){js(e,{default:t});return}t={default:t,_ctx:je},s=32}else t=String(t),n&64?(s=16,t=[$e(t)]):s=8;e.children=t,e.shapeFlag|=s}function Or(...e){const t={};for(let s=0;s_e||je;let Ds,xn;{const e=Bs(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),i=>{o.length>1?o.forEach(l=>l(i)):o[0](i)}};Ds=t("__VUE_INSTANCE_SETTERS__",s=>_e=s),xn=t("__VUE_SSR_SETTERS__",s=>fs=s)}const gs=e=>{const t=_e;return Ds(e),e.scope.on(),()=>{e.scope.off(),Ds(t)}},fo=()=>{_e&&_e.scope.off(),Ds(null)};function Ii(e){return e.vnode.shapeFlag&4}let fs=!1;function $r(e,t=!1,s=!1){t&&xn(t);const{props:n,children:o}=e.vnode,i=Ii(e);hr(e,n,i,t),br(e,o,s||t);const l=i?jr(e,t):void 0;return t&&xn(!1),l}function jr(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Ql);const{setup:n}=s;if(n){st();const o=e.setupContext=n.length>1?Lr(e):null,i=gs(e),l=hs(n,e,0,[e.props,o]),r=Ro(l);if(nt(),i(),(r||e.sp)&&!os(e)&&ai(e),r){if(l.then(fo,fo),t)return l.then(c=>{po(e,c)}).catch(c=>{zs(c,e,0)});e.asyncDep=l}else po(e,l)}else Mi(e)}function po(e,t,s){H(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:se(t)&&(e.setupState=Qo(t)),Mi(e)}function Mi(e,t,s){const n=e.type;e.render||(e.render=n.render||et);{const o=gs(e);st();try{er(e)}finally{nt(),o()}}}const Dr={get(e,t){return ge(e,"get",""),e[t]}};function Lr(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,Dr),slots:e.slots,emit:e.emit,expose:t}}function Js(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Qo(Cl(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in is)return is[s](e)},has(t,s){return s in t||s in is}})):e.proxy}function Fr(e){return H(e)&&"__vccOpts"in e}const _n=(e,t)=>Pl(e,t,fs),Nr="3.5.39";/** +* @vue/runtime-dom v3.5.39 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let wn;const ho=typeof window<"u"&&window.trustedTypes;if(ho)try{wn=ho.createPolicy("vue",{createHTML:e=>e})}catch{}const Ui=wn?e=>wn.createHTML(e):e=>e,Vr="http://www.w3.org/2000/svg",Hr="http://www.w3.org/1998/Math/MathML",at=typeof document<"u"?document:null,go=at&&at.createElement("template"),Br={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?at.createElementNS(Vr,e):t==="mathml"?at.createElementNS(Hr,e):s?at.createElement(e,{is:s}):at.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>at.createTextNode(e),createComment:e=>at.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>at.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,i){const l=s?s.previousSibling:t.lastChild;if(o&&(o===i||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===i||!(o=o.nextSibling)););else{go.innerHTML=Ui(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const r=go.content;if(n==="svg"||n==="mathml"){const c=r.firstChild;for(;c.firstChild;)r.appendChild(c.firstChild);r.removeChild(c)}t.insertBefore(r,s)}return[l?l.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},Kr=Symbol("_vtc");function zr(e,t,s){const n=e[Kr];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Ls=Symbol("_vod"),$i=Symbol("_vsh"),Jt={name:"show",beforeMount(e,{value:t},{transition:s}){e[Ls]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Yt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Yt(e,!0),n.enter(e)):n.leave(e,()=>{Yt(e,!1)}):Yt(e,t))},beforeUnmount(e,{value:t}){Yt(e,t)}};function Yt(e,t){e.style.display=t?e[Ls]:"none",e[$i]=!t}const Wr=Symbol(""),Gr=/(?:^|;)\s*display\s*:/;function qr(e,t,s){const n=e.style,o=ce(s);let i=!1;if(s&&!o){if(t)if(ce(t))for(const l of t.split(";")){const r=l.slice(0,l.indexOf(":")).trim();s[r]==null&&Qt(n,r,"")}else for(const l in t)s[l]==null&&Qt(n,l,"");for(const l in s){l==="display"&&(i=!0);const r=s[l];r!=null?Yr(e,l,!ce(t)&&t?t[l]:void 0,r)||Qt(n,l,r):Qt(n,l,"")}}else if(o){if(t!==s){const l=n[Wr];l&&(s+=";"+l),n.cssText=s,i=Gr.test(s)}}else t&&e.removeAttribute("style");Ls in e&&(e[Ls]=i?n.display:"",e[$i]&&(n.display="none"))}const mo=/\s*!important$/;function Qt(e,t,s){if(F(s))s.forEach(n=>Qt(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=Jr(e,t);mo.test(s)?e.setProperty(yt(n),s.replace(mo,""),"important"):e[n]=s}}const vo=["Webkit","Moz","ms"],an={};function Jr(e,t){const s=an[t];if(s)return s;let n=Be(t);if(n!=="filter"&&n in e)return an[t]=n;n=Uo(n);for(let o=0;ocn||(sa.then(()=>cn=0),cn=Date.now());function oa(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const o=s.value;if(F(o)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const l=o.slice(),r=[n];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ia=(e,t,s,n,o,i)=>{const l=o==="svg";t==="class"?zr(e,n,l):t==="style"?qr(e,s,n):Fs(t)?Ns(t)||Zr(e,t,s,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):la(e,t,n,l))?(xo(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yo(e,t,n,l,i,t!=="value")):e._isVueCE&&(ra(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ce(n)))?xo(e,Be(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),yo(e,t,n,l))};function la(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&wo(t)&&H(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return wo(t)&&ce(s)?!1:t in e}function ra(e,t){const s=e._def.props;if(!s)return!1;const n=Be(t);return Array.isArray(s)?s.some(o=>Be(o)===n):Object.keys(s).some(o=>Be(o)===n)}const bt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return F(t)?s=>Ts(t,s):t};function aa(e){e.target.composing=!0}function Co(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Le=Symbol("_assign");function So(e,t,s){return t&&(e=e.trim()),s&&(e=Hs(e)),e}const ye={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[Le]=bt(o);const i=n||o.props&&o.props.type==="number";dt(e,t?"change":"input",l=>{l.target.composing||e[Le](So(e.value,s,i))}),(s||i)&&dt(e,"change",()=>{e.value=So(e.value,s,i)}),t||(dt(e,"compositionstart",aa),dt(e,"compositionend",Co),dt(e,"change",Co))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:i}},l){if(e[Le]=bt(l),e.composing)return;const r=(i||e.type==="number")&&!/^0\d/.test(e.value)?Hs(e.value):e.value,c=t??"";if(r===c)return;const g=e.getRootNode();(g instanceof Document||g instanceof ShadowRoot)&&g.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c)}},ji={deep:!0,created(e,t,s){e[Le]=bt(s),dt(e,"change",()=>{const n=e._modelValue,o=Kt(e),i=e.checked,l=e[Le];if(F(n)){const r=Tn(n,o),c=r!==-1;if(i&&!c)l(n.concat(o));else if(!i&&c){const g=[...n];g.splice(r,1),l(g)}}else if(zt(n)){const r=new Set(n);i?r.add(o):r.delete(o),l(r)}else l(Di(e,i))})},mounted:ko,beforeUpdate(e,t,s){e[Le]=bt(s),ko(e,t,s)}};function ko(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(F(t))o=Tn(t,n.props.value)>-1;else if(zt(t))o=t.has(n.props.value);else{if(t===s)return;o=mt(t,Di(e,!0))}e.checked!==o&&(e.checked=o)}const ca={created(e,{value:t},s){e.checked=mt(t,s.props.value),e[Le]=bt(s),dt(e,"change",()=>{e[Le](Kt(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[Le]=bt(n),t!==s&&(e.checked=mt(t,n.props.value))}},Dt={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=zt(t);dt(e,"change",()=>{const i=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>s?Hs(Kt(l)):Kt(l));e[Le](e.multiple?o?new Set(i):i:i[0]),e._assigning=!0,ti(()=>{e._assigning=!1})}),e[Le]=bt(n)},mounted(e,{value:t}){Eo(e,t)},beforeUpdate(e,t,s){e[Le]=bt(s)},updated(e,{value:t}){e._assigning||Eo(e,t)}};function Eo(e,t){const s=e.multiple,n=F(t);if(!(s&&!n&&!zt(t))){for(let o=0,i=e.options.length;oString(g)===String(r)):l.selected=Tn(t,r)>-1}else l.selected=t.has(r);else if(mt(Kt(l),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Kt(e){return"_value"in e?e._value:e.value}function Di(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const ua={created(e,t,s){ks(e,t,s,null,"created")},mounted(e,t,s){ks(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){ks(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){ks(e,t,s,n,"updated")}};function fa(e,t){switch(e){case"SELECT":return Dt;case"TEXTAREA":return ye;default:switch(t){case"checkbox":return ji;case"radio":return ca;default:return ye}}}function ks(e,t,s,n,o){const l=fa(e.tagName,s.props&&s.props.type)[o];l&&l(e,t,s,n)}const da=["ctrl","shift","alt","meta"],pa={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>da.some(s=>e[`${s}Key`]&&!t.includes(s))},ha=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((o,...i)=>{for(let l=0;l{const s=e._withKeys||(e._withKeys={}),n=t.join(".");return s[n]||(s[n]=(o=>{if(!("key"in o))return;const i=yt(o.key);if(t.some(l=>l===i||ga[l]===i))return e(o)}))},ma=ve({patchProp:ia},Br);let Po;function va(){return Po||(Po=xr(ma))}const ba=((...e)=>{const t=va().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=xa(n);if(!o)return;const i=t._component;!H(i)&&!i.render&&!i.template&&(i.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const l=s(o,!1,ya(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),l},t});function ya(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function xa(e){return ce(e)?document.querySelector(e):e}const Li="pilotvault-theme";function _a(){try{return localStorage.getItem(Li)==="dark"?"dark":"light"}catch{return"light"}}const ds=L(_a());function Fi(e){ds.value=e,document.documentElement.setAttribute("data-theme",e);try{localStorage.setItem(Li,e)}catch{}}function Ao(){Fi(ds.value==="dark"?"light":"dark")}Fi(ds.value);const wa={class:"overflow-hidden rounded-lg border border-subtle bg-card shadow-xs"},Ca={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Sa={class:"text-base font-semibold text-primary"},ka={class:"pv-eyebrow"},Ea={class:"w-full text-left text-sm"},Ta={class:"border-t border-subtle px-5 py-2.5 font-mono text-xs whitespace-nowrap"},Pa={class:"text-primary"},Aa={class:"border-t border-subtle px-5 py-2.5 text-secondary"},un={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brand-text",PATCH:"text-warning",DELETE:"text-danger"};return(s,n)=>(P(),A("div",wa,[d("div",Ca,[d("div",Sa,O(e.title),1),d("span",ka,O(e.auth),1)]),d("table",Ea,[n[0]||(n[0]=d("thead",null,[d("tr",{class:"pv-eyebrow"},[d("th",{class:"px-5 py-2.5 font-medium"},"Endpoint"),d("th",{class:"px-5 py-2.5 font-medium"},"Description")])],-1)),d("tbody",null,[(P(!0),A(re,null,Ce(e.endpoints,o=>(P(),A("tr",{key:o.method+o.path,class:"transition-colors hover:bg-sunken"},[d("td",Ta,[d("span",{class:Pe(["font-semibold",t[o.method]])},O(o.method),3),d("span",Pa,O(o.path),1)]),d("td",Aa,O(o.desc),1)]))),128))])])]))}},Oa={class:"mx-auto flex max-w-5xl flex-col gap-6 px-6 pt-12 pb-16"},Ra={class:"flex items-center gap-3"},Ia={key:0,class:"pv-eyebrow hidden truncate sm:inline"},Ma=["title"],Ua={key:0,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},$a={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},ja={key:0,class:"rounded-lg border border-subtle bg-card px-5 py-10 text-center shadow-sm"},Da={key:1,class:"mx-auto w-full max-w-sm rounded-lg border border-subtle bg-card shadow-sm"},La={class:"flex flex-col gap-1"},Fa={class:"flex flex-col gap-1"},Na={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Va=["disabled"],Ha={class:"flex gap-1 self-start rounded-lg border border-subtle bg-card p-1 shadow-sm"},Ba=["onClick"],Ka={class:"flex flex-col gap-6"},za={class:"rounded-lg border border-subtle bg-card shadow-sm"},Wa={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Ga={class:"pv-eyebrow"},qa={class:"min-w-0"},Ja={class:"text-sm font-semibold text-primary"},Ya={key:0,class:"truncate font-mono text-xs text-secondary"},Xa={class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5"},Za={class:"font-mono text-xs text-secondary"},Qa={class:"flex flex-col gap-6"},ec={class:"rounded-lg border border-subtle bg-card shadow-sm"},tc={class:"flex flex-col gap-3 px-5 py-5"},sc={class:"flex flex-col gap-3 sm:flex-row"},nc={class:"flex flex-1 flex-col gap-1"},oc={class:"flex flex-1 flex-col gap-1"},ic={class:"flex flex-col gap-3 sm:flex-row"},lc={class:"flex flex-1 flex-col gap-1"},rc=["value"],ac={class:"flex flex-1 flex-col gap-1"},cc=["value"],uc={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},fc={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},dc=["disabled"],pc={class:"rounded-lg border border-subtle bg-card shadow-sm"},hc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},gc={class:"pv-eyebrow"},mc={class:"flex flex-col"},vc={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},bc={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},yc={key:2,class:"px-5 py-6 text-sm text-secondary"},xc={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},_c={class:"min-w-0 flex-1"},wc={class:"flex flex-wrap items-center gap-2"},Cc={class:"truncate text-sm font-semibold text-primary"},Sc={key:0,class:"rounded-sm bg-brand/10 px-1.5 py-0.5 font-mono text-[10px] font-medium text-brand-text"},kc={key:1,class:"rounded-sm bg-warning-tint px-1.5 py-0.5 font-mono text-[10px] font-medium text-warning"},Ec={class:"mt-0.5 font-mono text-xs text-secondary"},Tc={class:"flex shrink-0 items-center gap-2"},Pc=["onClick"],Ac=["disabled","onClick"],Oc={key:0,class:"mt-3 flex flex-col gap-3 rounded-md border border-subtle bg-sunken px-4 py-4"},Rc={class:"flex flex-col gap-3 sm:flex-row"},Ic={class:"flex flex-1 flex-col gap-1"},Mc={class:"flex flex-1 flex-col gap-1"},Uc={class:"flex flex-col gap-3 sm:flex-row"},$c={class:"flex flex-1 flex-col gap-1"},jc=["disabled"],Dc=["value"],Lc={key:0,class:"text-[11px] text-muted"},Fc={class:"flex flex-1 flex-col gap-1"},Nc=["value"],Vc={class:"flex items-center gap-2"},Hc={class:"flex items-center gap-2"},Bc=["disabled","onClick"],Kc={class:"flex flex-col gap-6"},zc={class:"rounded-lg border border-subtle bg-card shadow-sm"},Wc={class:"flex flex-col gap-3 px-5 py-5"},Gc={class:"flex flex-col gap-2 sm:flex-row"},qc=["disabled"],Jc={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Yc={key:1,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},Xc={class:"rounded-lg border border-subtle bg-card shadow-sm"},Zc={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Qc={class:"pv-eyebrow"},eu={class:"flex flex-col"},tu={key:0,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},su={key:1,class:"px-5 py-6 text-sm text-secondary"},nu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},ou={class:"min-w-0 flex-1"},iu={class:"truncate text-sm font-semibold text-primary"},lu={class:"mt-0.5 font-mono text-xs text-secondary"},ru={class:"flex shrink-0 items-center gap-2"},au=["onClick"],cu=["disabled","title","onClick"],uu={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4 sm:flex-row sm:items-end"},fu={class:"flex flex-1 flex-col gap-1"},du=["onKeyup"],pu={class:"flex items-center gap-2"},hu=["disabled","onClick"],gu={class:"flex flex-col gap-6"},mu={class:"rounded-lg border border-subtle bg-card shadow-sm"},vu={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},bu={class:"flex flex-col gap-3 px-5 py-5"},yu={class:"flex flex-col gap-1"},xu={class:"flex flex-col gap-1"},_u={class:"flex flex-col gap-1"},wu=["placeholder"],Cu={key:0,class:"font-mono text-[11px] text-muted"},Su={key:0},ku={key:1},Eu={key:1,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},Tu={key:2,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},Pu={class:"flex flex-wrap items-center gap-2"},Au=["disabled"],Ou=["disabled"],Ru={class:"flex flex-col gap-6"},Iu={class:"rounded-lg border border-subtle bg-card shadow-sm"},Mu={class:"flex flex-col"},Uu={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},$u={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},ju={key:2,class:"px-5 py-6 text-sm text-secondary"},Du={key:3,class:"flex gap-1 overflow-x-auto overflow-y-hidden border-b border-subtle px-3 pt-1"},Lu=["onClick"],Fu={key:4,class:"px-5 py-6 text-sm text-secondary"},Nu={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},Vu={class:"min-w-0 flex-1"},Hu={class:"flex flex-wrap items-center gap-2"},Bu={class:"text-sm font-semibold text-primary"},Ku=["title"],zu={key:0},Wu={class:"mt-0.5 font-mono text-xs text-secondary"},Gu={key:0,class:"mt-0.5 text-[11px] text-secondary"},qu={key:1,class:"mt-2 flex flex-col gap-1.5"},Ju={class:"rounded-sm bg-sunken px-1.5 py-0.5 font-mono text-[10px] text-secondary"},Yu={key:0,class:"font-mono text-[10px] text-muted"},Xu={key:1,class:"w-full text-[11px] text-secondary sm:w-auto"},Zu={key:2,class:"mt-1 truncate font-mono text-[11px] text-muted"},Qu={class:"flex shrink-0 items-center gap-2"},ef=["disabled","onClick"],tf=["onClick"],sf=["disabled","onClick"],nf=["disabled","onClick"],of={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4"},lf={class:"pv-eyebrow"},rf={key:0,class:"text-danger"},af=["onUpdate:modelValue"],cf=["value"],uf=["onUpdate:modelValue","type","placeholder"],ff={key:2,class:"text-[11px] text-muted"},df={class:"flex items-center gap-2"},pf=["disabled","onClick"],hf={class:"border-t border-subtle px-5 py-4"},gf={class:"flex flex-col gap-2 sm:flex-row"},mf=["disabled"],vf={key:0,class:"mt-2 text-xs font-medium text-danger"},Es="pv_panel_token",bf={__name:"App",setup(e){const t=L(localStorage.getItem(Es)||""),s=L(null),n=L(!1),o=L(!0),i=L({email:"",password:""}),l=L(""),r=L(!1),c=L("overview"),g=[{id:"overview",label:"Overview"},{id:"users",label:"Users"},{id:"organizations",label:"Organizations"},{id:"pocketbase",label:"PocketBase"},{id:"plugins",label:"Plugins"}];async function h(v){try{const u=await fetch("/api/me",{headers:{Authorization:v}});if(!u.ok)return!1;const f=await u.json();return f.role!=="superadmin"?!1:(s.value={id:f.id,email:f.email,role:f.role},!0)}catch{return!1}}async function y(v){t.value=v,localStorage.setItem(Es,v),n.value=!0,Gn(),ke(),it(),Mt(),ie()}async function I(){l.value="";const v=i.value.email.trim().toLowerCase();if(!v||!i.value.password){l.value="Enter your email and password.";return}r.value=!0;try{const u=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:v,password:i.value.password})}),f=await u.json().catch(()=>({}));if(!u.ok||!f.token){l.value="Invalid email or password.";return}if(!await h(f.token)){l.value="Access to this panel is restricted to superadmins.";return}i.value.password="",await y(f.token)}catch{l.value="Cannot reach the API server."}finally{r.value=!1}}function U(){qn(),localStorage.removeItem(Es),t.value="",s.value=null,n.value=!1}const q=L(null),$=L({url:"",adminEmail:"",adminPassword:""}),W=L(null),Y=L(""),V=L(""),X=L(!1),j=L(!1);function z(v){const u={Authorization:t.value};return v&&(u["Content-Type"]="application/json"),u}async function ke(){try{const v=await fetch("/api/admin/pb-config",{headers:z()});if(!v.ok)return;const u=await v.json();q.value=u,$.value={url:u.url||"",adminEmail:u.adminEmail||"",adminPassword:""},W.value=u.probe||null}catch{}}async function Re(){Y.value="",V.value="",j.value=!0;try{const v=await fetch("/api/admin/pb-config/test",{method:"POST",headers:z(!0),body:JSON.stringify($.value)});W.value=await v.json()}catch{V.value="Could not run the test."}finally{j.value=!1}}async function Ge(){var v;if(Y.value="",V.value="",!$.value.url.trim()){V.value="A PocketBase URL is required.";return}X.value=!0;try{const u=await fetch("/api/admin/pb-config",{method:"PUT",headers:z(!0),body:JSON.stringify($.value)}),f=await u.json().catch(()=>({}));if(!u.ok){V.value=f.error||"Could not save the connection.";return}q.value=f.config,W.value=((v=f.config)==null?void 0:v.probe)||null,$.value={url:f.config.url,adminEmail:f.config.adminEmail,adminPassword:""},Y.value=f.warning||"Connection saved."}catch{V.value="Could not reach the API server."}finally{X.value=!1}}const Ie=L([]),we=L(""),ue=L(""),qe=L(""),Fe=L({}),he=L(""),Ne=L({name:"",baseURL:"",provider:""}),ae=L(""),ee=L(!1),te=[{id:"apis-external",label:"APIs — External"},{id:"drives-external",label:"Drives — External"},{id:"drives-local",label:"Drives — Local"}],Ve=L("apis-external");function Rt(v){return v.category||"apis-external"}function ot(v){return Ie.value.filter(u=>Rt(u)===v)}const Ee=_n(()=>ot(Ve.value)),ms={builtin:"bg-success-tint text-success",external:"bg-warning-tint text-warning"},Ys={ok:"bg-success-tint text-success",degraded:"bg-warning-tint text-warning",down:"bg-danger-tint text-danger"};async function it(){we.value="";try{const v=await fetch("/api/admin/plugins",{headers:z()});if(!v.ok){we.value="Could not load plugins.";return}const u=await v.json();Ie.value=u.plugins||[];for(const f of Ie.value)f.enabled&&!f.health&&xt(f.name)}catch{we.value="Could not reach the API server."}}async function xt(v){try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v)}/health`,{method:"POST",headers:z()}),f=await u.json().catch(()=>({}));if(u.ok&&f.health){const S=_t(v);S&&(S.health=f.health)}}catch{}}function _t(v){return Ie.value.find(u=>u.name===v)}async function Wt(v){he.value=v.name,ue.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v.name)}`,{method:"PUT",headers:z(!0),body:JSON.stringify({enabled:!v.enabled})}),f=await u.json().catch(()=>({}));u.ok?f.warning&&(ue.value=`${v.name}: ${f.warning}`):ue.value=f.error||"Could not update the plugin.",await it()}finally{he.value=""}}function vs(v){qe.value=qe.value===v.name?"":v.name;const u={...v.config||{}};for(const f of v.configFields||[])(u[f.key]===void 0||u[f.key]==="")&&f.default&&(u[f.key]=f.default);Fe.value=u}async function wt(v){he.value=v.name,ue.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v.name)}`,{method:"PUT",headers:z(!0),body:JSON.stringify({config:Fe.value})}),f=await u.json().catch(()=>({}));u.ok?(ue.value=f.warning?`${v.name}: ${f.warning}`:"Configuration saved.",qe.value=""):ue.value=f.error||"Could not save the configuration.",await it()}finally{he.value=""}}async function Vn(v){he.value=v.name,ue.value="";try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v.name)}/health`,{method:"POST",headers:z()}),f=await u.json().catch(()=>({}));if(u.ok&&f.health){const S=_t(v.name);S&&(S.health=f.health)}else ue.value=f.error||"Health check failed."}finally{he.value=""}}async function a(v){if(v.kind==="external"){he.value=v.name;try{const u=await fetch(`/api/admin/plugins/${encodeURIComponent(v.name)}`,{method:"DELETE",headers:z()});if(!u.ok){const f=await u.json().catch(()=>({}));ue.value=f.error||"Could not remove the plugin."}await it()}finally{he.value=""}}}async function p(){if(ae.value="",!Ne.value.name.trim()||!Ne.value.baseURL.trim()){ae.value="Name and base URL are required.";return}ee.value=!0;try{const v=await fetch("/api/admin/plugins",{method:"POST",headers:z(!0),body:JSON.stringify(Ne.value)}),u=await v.json().catch(()=>({}));if(!v.ok){ae.value=u.error||"Could not register the plugin.";return}Ne.value={name:"",baseURL:"",provider:""},ue.value="External plugin registered.",await it()}catch{ae.value="Could not reach the API server."}finally{ee.value=!1}}const m=L([]),w=L([]),x=L(""),_=[{value:"user",label:"User"},{value:"admin",label:"Admin"},{value:"superadmin",label:"Superadmin"}],T={user:"User",admin:"Admin",superadmin:"Superadmin"},k={user:"bg-sunken text-secondary",admin:"bg-warning-tint text-warning",superadmin:"bg-success-tint text-success"},C=_n(()=>{const v={};for(const u of m.value)u.organization&&(v[u.organization]=(v[u.organization]||0)+1);return v});function b(v,u){if(!v)return u;if(v.error)return v.error;if(v.data&&typeof v.data=="object"){const f=[];for(const S in v.data)v.data[S]&&v.data[S].message&&f.push(`${S}: ${v.data[S].message}`);if(f.length)return f.join("; ")}return v.message||u}const R=L({email:"",password:"",role:"user",organization:""}),E=L(""),M=L(""),D=L(!1),N=L(""),B=L({}),G=L(""),J=L("");async function ie(){x.value="";try{const v=await fetch("/api/users",{headers:z()}),u=await v.json().catch(()=>({}));if(!v.ok){x.value=b(u,"Could not load users.");return}m.value=u.users||[]}catch{x.value="Could not reach the API server."}}async function Me(){E.value="",M.value="";const v=R.value.email.trim().toLowerCase();if(!v||!v.includes("@")){E.value="A valid email is required.";return}if(R.value.password.length<8){E.value="Password must be at least 8 characters.";return}D.value=!0;try{const u=await fetch("/api/users",{method:"POST",headers:z(!0),body:JSON.stringify({email:v,password:R.value.password,role:R.value.role,organization:R.value.organization})}),f=await u.json().catch(()=>({}));if(!u.ok){E.value=b(f,"Could not create the user.");return}R.value={email:"",password:"",role:"user",organization:""},M.value=`Created ${f.user?f.user.email:"user"}.`,await ie()}catch{E.value="Could not reach the API server."}finally{D.value=!1}}function Ue(v){J.value="",N.value=N.value===v.id?"":v.id,B.value={email:v.email,role:v.role,organization:v.organization||"",verified:!!v.verified,password:""}}async function Ct(v){J.value="",G.value=v.id;try{const u={},f=B.value;if(f.email.trim().toLowerCase()!==v.email&&(u.email=f.email.trim().toLowerCase()),f.role!==v.role&&(u.role=f.role),(f.organization||"")!==(v.organization||"")&&(u.organization=f.organization||""),f.verified!==!!v.verified&&(u.verified=f.verified),f.password&&(u.password=f.password),Object.keys(u).length===0){J.value="No changes to save.";return}const S=await fetch(`/api/users/${encodeURIComponent(v.id)}`,{method:"PATCH",headers:z(!0),body:JSON.stringify(u)}),He=await S.json().catch(()=>({}));if(!S.ok){J.value=b(He,"Could not update the user.");return}J.value=`Updated ${v.email}.`,N.value="",await ie()}catch{J.value="Could not reach the API server."}finally{G.value=""}}async function bs(v){if(v.id!==(s.value&&s.value.id)&&confirm(`Delete user ${v.email}? This cannot be undone.`)){J.value="",G.value=v.id;try{const u=await fetch(`/api/users/${encodeURIComponent(v.id)}`,{method:"DELETE",headers:z()}),f=await u.json().catch(()=>({}));if(!u.ok){J.value=b(f,"Could not delete the user.");return}J.value=`Deleted ${v.email}.`,N.value===v.id&&(N.value=""),await ie()}catch{J.value="Could not reach the API server."}finally{G.value=""}}}const fe=L(""),de=L(""),St=L(""),kt=L(!1),lt=L(""),ys=L(""),It=L(""),Te=L("");async function Mt(){try{const v=await fetch("/api/orgs",{headers:z()});if(!v.ok)return;const u=await v.json().catch(()=>({}));w.value=u.organizations||[]}catch{}}async function Hn(){de.value="",St.value="";const v=fe.value.trim();if(!v){de.value="An organization name is required.";return}kt.value=!0;try{const u=await fetch("/api/orgs",{method:"POST",headers:z(!0),body:JSON.stringify({name:v})}),f=await u.json().catch(()=>({}));if(!u.ok){de.value=b(f,"Could not create the organization.");return}fe.value="",St.value=`Created ${f.organization?f.organization.name:"organization"}.`,await Mt()}catch{de.value="Could not reach the API server."}finally{kt.value=!1}}function Ni(v){Te.value="",lt.value=lt.value===v.id?"":v.id,ys.value=v.name}async function Bn(v){Te.value="";const u=ys.value.trim();if(!u){Te.value="An organization name is required.";return}if(u===v.name){lt.value="";return}It.value=v.id;try{const f=await fetch(`/api/orgs/${encodeURIComponent(v.id)}`,{method:"PATCH",headers:z(!0),body:JSON.stringify({name:u})}),S=await f.json().catch(()=>({}));if(!f.ok){Te.value=b(S,"Could not rename the organization.");return}Te.value=`Renamed to ${u}.`,lt.value="",await Mt(),await ie()}catch{Te.value="Could not reach the API server."}finally{It.value=""}}async function Vi(v){const u=C.value[v.id]||0;if(u>0){Te.value=`${v.name} still has ${u} member${u===1?"":"s"}; reassign or remove them first.`;return}if(confirm(`Delete organization ${v.name}?`)){Te.value="",It.value=v.id;try{const f=await fetch(`/api/orgs/${encodeURIComponent(v.id)}`,{method:"DELETE",headers:z()}),S=await f.json().catch(()=>({}));if(!f.ok){Te.value=b(S,"Could not delete the organization.");return}Te.value=`Deleted ${v.name}.`,lt.value===v.id&&(lt.value=""),await Mt()}catch{Te.value="Could not reach the API server."}finally{It.value=""}}}const Xs=L(null),xs=L(null),Ut=L({apiServer:{status:"checking",detail:""},pocketBase:{status:"checking",detail:""},webApp:{status:"checking",detail:""}});let _s=null;const Hi=[{key:"apiServer",label:"API server"},{key:"pocketBase",label:"PocketBase"},{key:"webApp",label:"Web App"}],Kn={checking:{label:"checking",cls:"bg-sunken text-secondary"},ok:{label:"operational",cls:"bg-success-tint text-success"},down:{label:"unreachable",cls:"bg-danger-tint text-danger"},unreachable:{label:"unreachable",cls:"bg-danger-tint text-danger"}};function zn(v){const u=[];return typeof v.latencyMs=="number"&&u.push(v.latencyMs+"ms"),v.httpStatus&&u.push("HTTP "+v.httpStatus),v.url&&u.push(v.url),u.join(" · ")}async function Wn(){var v,u;try{const f=await fetch("/api/status");if(!f.ok)throw new Error("status "+f.status);const S=await f.json(),He=S.apiServer||{};xs.value=He.devices??0,Ut.value={apiServer:{status:"ok",detail:""},pocketBase:{status:((v=S.pocketBase)==null?void 0:v.status)==="ok"?"ok":"down",detail:zn(S.pocketBase||{})},webApp:{status:((u=S.webApp)==null?void 0:u.status)==="ok"?"ok":"down",detail:zn(S.webApp||{})}}}catch{xs.value=null,Ut.value={apiServer:{status:"unreachable",detail:""},pocketBase:{status:"unreachable",detail:""},webApp:{status:"unreachable",detail:""}}}Xs.value=new Date}function Gn(){Wn(),clearInterval(_s),_s=setInterval(Wn,1e4)}function qn(){clearInterval(_s),_s=null}fi(async()=>{t.value&&await h(t.value)?(n.value=!0,Gn(),ke(),it(),Mt(),ie()):t.value&&(localStorage.removeItem(Es),t.value=""),o.value=!1}),Ln(()=>qn());const Bi=[{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a session (via PocketBase)"},{method:"GET",path:"/api/auth/validate",desc:"Validate the current session token"},{method:"GET",path:"/api/me",desc:"Caller's id, email, role, and organization from their token"},{method:"GET",path:"/api/preferences",desc:"Read the caller's saved settings blob"},{method:"PUT",path:"/api/preferences",desc:"Persist the caller's settings onto their user record"},{method:"GET",path:"/api/devices",desc:"List connected devices and last-known state"},{method:"GET",path:"/api/devices/{id}/track",desc:"GPS track history for a device"},{method:"POST",path:"/api/devices/{id}/command",desc:"Send a command down to a device"},{method:"DELETE",path:"/api/devices/{id}",desc:"Forget a device's stored state"},{method:"GET",path:"/ws/ui",desc:"Live telemetry stream (WebSocket)"}],Ki=[{method:"GET",path:"/api/users",desc:"List users (admin: own org · superadmin: all)"},{method:"POST",path:"/api/users",desc:"Create a user {email, password, role, organization?}"},{method:"PATCH",path:"/api/users/{id}",desc:"Edit a user (role/org changes are scope-checked)"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user (not self; admins in-org only)"},{method:"GET",path:"/api/orgs",desc:"List organizations (admin: own · superadmin: all)"},{method:"POST",path:"/api/orgs",desc:"Create an organization {name} (superadmin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an empty organization (superadmin)"},{method:"GET",path:"/api/admin/pb-config",desc:"Read the PocketBase connection + live probe (superadmin)"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Test a candidate connection without applying (superadmin)"},{method:"PUT",path:"/api/admin/pb-config",desc:"Update + persist the PocketBase connection (superadmin)"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins + state + last health (superadmin)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin {name, baseURL} (superadmin)"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure a plugin (superadmin)"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin (superadmin)"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a plugin health check (superadmin)"}],zi=[{method:"GET",path:"/ws/device?id={id}",desc:"Device telemetry uplink (WebSocket)"},{method:"POST",path:"/api/telemetry?id={id}",desc:"Push a single telemetry event over HTTP"},{method:"GET",path:"/healthz",desc:"Readiness probe"}];return(v,u)=>(P(),A("div",Oa,[d("div",Ra,[u[25]||(u[25]=Ar('
PilotVault
API server
',3)),n.value&&s.value?(P(),A("span",Ia,O(s.value.email),1)):K("",!0),n.value?(P(),A("button",{key:1,class:"pv-btn-sec pv-btn-sm",onClick:U},"Sign out")):K("",!0),d("button",{class:"pv-btn-sec pv-btn-sm",title:Xt(ds)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:u[0]||(u[0]=(...f)=>Xt(Ao)&&Xt(Ao)(...f))},[Xt(ds)==="dark"?(P(),A("svg",Ua,[...u[22]||(u[22]=[d("circle",{cx:"12",cy:"12",r:"4"},null,-1),d("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(P(),A("svg",$a,[...u[23]||(u[23]=[d("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])),u[24]||(u[24]=$e(" Theme ",-1))],8,Ma)]),o.value?(P(),A("div",ja,[...u[26]||(u[26]=[d("span",{class:"pv-eyebrow"},"Checking session…",-1)])])):n.value?(P(),A(re,{key:2},[d("div",Ha,[(P(),A(re,null,Ce(g,f=>d("button",{key:f.id,class:Pe(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",c.value===f.id?"bg-brand text-on-brand":"text-secondary hover:text-primary"]),onClick:S=>c.value=f.id},O(f.label),11,Ba)),64))]),le(d("div",Ka,[d("div",za,[d("div",Wa,[u[30]||(u[30]=d("div",{class:"text-base font-semibold text-primary"},"Status",-1)),d("span",Ga,O(Xs.value?"checked "+Xs.value.toLocaleTimeString():"—"),1)]),d("div",null,[(P(),A(re,null,Ce(Hi,f=>d("div",{key:f.key,class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5 first:border-t-0"},[d("div",qa,[d("div",Ja,O(f.label),1),Ut.value[f.key].detail?(P(),A("div",Ya,O(Ut.value[f.key].detail),1)):K("",!0)]),d("span",{class:Pe(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",Kn[Ut.value[f.key].status].cls])},[u[31]||(u[31]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$e(" "+O(Kn[Ut.value[f.key].status].label),1)],2)])),64)),d("div",Xa,[u[32]||(u[32]=d("div",{class:"text-sm font-semibold text-primary"},"Devices",-1)),d("span",Za,O(xs.value===null?"—":xs.value+" online"),1)])])]),Oe(un,{title:"Client API",auth:"PocketBase session",endpoints:Bi}),Oe(un,{title:"Management API",auth:"Admin · superadmin",endpoints:Ki}),Oe(un,{title:"Device API",auth:"Device uplink",endpoints:zi})],512),[[Jt,c.value==="overview"]]),le(d("div",Qa,[d("div",ec,[u[38]||(u[38]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Add user"),d("span",{class:"pv-eyebrow"},"Create an account")],-1)),d("div",tc,[d("div",sc,[d("label",nc,[u[33]||(u[33]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[3]||(u[3]=f=>R.value.email=f),type:"email",class:"pv-input",placeholder:"pilot@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[ye,R.value.email]])]),d("label",oc,[u[34]||(u[34]=d("span",{class:"pv-eyebrow"},"Password",-1)),le(d("input",{"onUpdate:modelValue":u[4]||(u[4]=f=>R.value.password=f),type:"password",class:"pv-input",placeholder:"min. 8 characters",autocomplete:"new-password"},null,512),[[ye,R.value.password]])])]),d("div",ic,[d("label",lc,[u[35]||(u[35]=d("span",{class:"pv-eyebrow"},"Role",-1)),le(d("select",{"onUpdate:modelValue":u[5]||(u[5]=f=>R.value.role=f),class:"pv-input"},[(P(),A(re,null,Ce(_,f=>d("option",{key:f.value,value:f.value},O(f.label),9,rc)),64))],512),[[Dt,R.value.role]])]),d("label",ac,[u[37]||(u[37]=d("span",{class:"pv-eyebrow"},"Organization",-1)),le(d("select",{"onUpdate:modelValue":u[6]||(u[6]=f=>R.value.organization=f),class:"pv-input"},[u[36]||(u[36]=d("option",{value:""},"— none —",-1)),(P(!0),A(re,null,Ce(w.value,f=>(P(),A("option",{key:f.id,value:f.id},O(f.name),9,cc))),128))],512),[[Dt,R.value.organization]])])]),E.value?(P(),A("p",uc,O(E.value),1)):M.value?(P(),A("p",fc,O(M.value),1)):K("",!0),d("div",null,[d("button",{class:"pv-btn",disabled:D.value,onClick:Me},O(D.value?"Creating…":"Create user"),9,dc)])])]),d("div",pc,[d("div",hc,[d("div",null,[u[39]||(u[39]=d("div",{class:"text-base font-semibold text-primary"},"Users",-1)),d("span",gc,O(m.value.length)+" total",1)]),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:ie},"Refresh")]),d("div",mc,[x.value?(P(),A("p",vc,O(x.value),1)):K("",!0),J.value?(P(),A("p",bc,O(J.value),1)):K("",!0),!m.value.length&&!x.value?(P(),A("p",yc,"No users yet.")):K("",!0),(P(!0),A(re,null,Ce(m.value,f=>(P(),A("div",{key:f.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",xc,[d("div",_c,[d("div",wc,[d("span",Cc,O(f.email),1),d("span",{class:Pe(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",k[f.role]])},O(T[f.role]||f.role),3),f.id===(s.value&&s.value.id)?(P(),A("span",Sc,"you")):K("",!0),f.verified?K("",!0):(P(),A("span",kc,"unverified"))]),d("div",Ec,O(f.organizationName||(f.organization?f.organization:"no organization")),1)]),d("div",Tc,[d("button",{class:"pv-btn-sec pv-btn-sm",onClick:S=>Ue(f)},O(N.value===f.id?"Close":"Edit"),9,Pc),f.id!==(s.value&&s.value.id)?(P(),A("button",{key:0,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:G.value===f.id,onClick:S=>bs(f)}," Delete ",8,Ac)):K("",!0)])]),N.value===f.id?(P(),A("div",Oc,[d("div",Rc,[d("label",Ic,[u[40]||(u[40]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[7]||(u[7]=S=>B.value.email=S),type:"email",class:"pv-input",autocomplete:"off",spellcheck:"false"},null,512),[[ye,B.value.email]])]),d("label",Mc,[u[41]||(u[41]=d("span",{class:"pv-eyebrow"},"New password",-1)),le(d("input",{"onUpdate:modelValue":u[8]||(u[8]=S=>B.value.password=S),type:"password",class:"pv-input",placeholder:"leave blank to keep current",autocomplete:"new-password"},null,512),[[ye,B.value.password]])])]),d("div",Uc,[d("label",$c,[u[42]||(u[42]=d("span",{class:"pv-eyebrow"},"Role",-1)),le(d("select",{"onUpdate:modelValue":u[9]||(u[9]=S=>B.value.role=S),class:"pv-input",disabled:f.id===(s.value&&s.value.id)},[(P(),A(re,null,Ce(_,S=>d("option",{key:S.value,value:S.value},O(S.label),9,Dc)),64))],8,jc),[[Dt,B.value.role]]),f.id===(s.value&&s.value.id)?(P(),A("span",Lc,"You cannot change your own role.")):K("",!0)]),d("label",Fc,[u[44]||(u[44]=d("span",{class:"pv-eyebrow"},"Organization",-1)),le(d("select",{"onUpdate:modelValue":u[10]||(u[10]=S=>B.value.organization=S),class:"pv-input"},[u[43]||(u[43]=d("option",{value:""},"— none —",-1)),(P(!0),A(re,null,Ce(w.value,S=>(P(),A("option",{key:S.id,value:S.id},O(S.name),9,Nc))),128))],512),[[Dt,B.value.organization]])])]),d("label",Vc,[le(d("input",{"onUpdate:modelValue":u[11]||(u[11]=S=>B.value.verified=S),type:"checkbox",class:"h-4 w-4"},null,512),[[ji,B.value.verified]]),u[45]||(u[45]=d("span",{class:"text-sm text-primary"},"Verified",-1))]),d("div",Hc,[d("button",{class:"pv-btn pv-btn-sm",disabled:G.value===f.id,onClick:S=>Ct(f)},"Save changes",8,Bc),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[12]||(u[12]=S=>N.value="")},"Cancel")])])):K("",!0)]))),128))])])],512),[[Jt,c.value==="users"]]),le(d("div",Kc,[d("div",zc,[u[46]||(u[46]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Add organization"),d("span",{class:"pv-eyebrow"},"Create a tenant")],-1)),d("div",Wc,[d("div",Gc,[le(d("input",{"onUpdate:modelValue":u[13]||(u[13]=f=>fe.value=f),class:"pv-input flex-1",placeholder:"Acme Aerial Ltd.",autocomplete:"off",spellcheck:"false",onKeyup:To(Hn,["enter"])},null,544),[[ye,fe.value]]),d("button",{class:"pv-btn",disabled:kt.value,onClick:Hn},O(kt.value?"Creating…":"Create"),9,qc)]),de.value?(P(),A("p",Jc,O(de.value),1)):St.value?(P(),A("p",Yc,O(St.value),1)):K("",!0)])]),d("div",Xc,[d("div",Zc,[d("div",null,[u[47]||(u[47]=d("div",{class:"text-base font-semibold text-primary"},"Organizations",-1)),d("span",Qc,O(w.value.length)+" total",1)]),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:Mt},"Refresh")]),d("div",eu,[Te.value?(P(),A("p",tu,O(Te.value),1)):K("",!0),w.value.length?K("",!0):(P(),A("p",su,"No organizations yet.")),(P(!0),A(re,null,Ce(w.value,f=>(P(),A("div",{key:f.id,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",nu,[d("div",ou,[d("div",iu,O(f.name),1),d("div",lu,O(C.value[f.id]||0)+" member"+O((C.value[f.id]||0)===1?"":"s"),1)]),d("div",ru,[d("button",{class:"pv-btn-sec pv-btn-sm",onClick:S=>Ni(f)},O(lt.value===f.id?"Close":"Rename"),9,au),d("button",{class:"pv-btn-sec pv-btn-sm !text-danger",disabled:It.value===f.id||(C.value[f.id]||0)>0,title:(C.value[f.id]||0)>0?"Reassign or remove members first":"Delete organization",onClick:S=>Vi(f)}," Delete ",8,cu)])]),lt.value===f.id?(P(),A("div",uu,[d("label",fu,[u[48]||(u[48]=d("span",{class:"pv-eyebrow"},"Name",-1)),le(d("input",{"onUpdate:modelValue":u[14]||(u[14]=S=>ys.value=S),class:"pv-input",autocomplete:"off",spellcheck:"false",onKeyup:To(S=>Bn(f),["enter"])},null,40,du),[[ye,ys.value]])]),d("div",pu,[d("button",{class:"pv-btn pv-btn-sm",disabled:It.value===f.id,onClick:S=>Bn(f)},"Save",8,hu),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[15]||(u[15]=S=>lt.value="")},"Cancel")])])):K("",!0)]))),128))])])],512),[[Jt,c.value==="organizations"]]),le(d("div",gu,[d("div",mu,[d("div",vu,[u[50]||(u[50]=d("div",null,[d("div",{class:"text-base font-semibold text-primary"},"PocketBase connection"),d("span",{class:"pv-eyebrow"},"Settings")],-1)),W.value?(P(),A("span",{key:0,class:Pe(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",W.value.reachable?W.value.superuser?"bg-success-tint text-success":"bg-warning-tint text-warning":"bg-danger-tint text-danger"])},[u[49]||(u[49]=d("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),$e(" "+O(W.value.reachable?W.value.superuser?"connected":"reachable":"unreachable"),1)],2)):K("",!0)]),d("div",bu,[d("label",yu,[u[51]||(u[51]=d("span",{class:"pv-eyebrow"},"PocketBase URL",-1)),le(d("input",{"onUpdate:modelValue":u[16]||(u[16]=f=>$.value.url=f),class:"pv-input",placeholder:"http://10.2.1.10:8026",spellcheck:"false"},null,512),[[ye,$.value.url]])]),d("label",xu,[u[52]||(u[52]=d("span",{class:"pv-eyebrow"},"Service account email",-1)),le(d("input",{"onUpdate:modelValue":u[17]||(u[17]=f=>$.value.adminEmail=f),class:"pv-input",placeholder:"admin@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[ye,$.value.adminEmail]])]),d("label",_u,[u[53]||(u[53]=d("span",{class:"pv-eyebrow"},"Service account password",-1)),le(d("input",{"onUpdate:modelValue":u[18]||(u[18]=f=>$.value.adminPassword=f),type:"password",class:"pv-input",autocomplete:"new-password",placeholder:q.value&&q.value.adminConfigured?"leave blank to keep current":"set a password"},null,8,wu),[[ye,$.value.adminPassword]])]),W.value?(P(),A("div",Cu,[$e(" health: "+O(W.value.reachable?"ok":"down"),1),W.value.latencyMs?(P(),A("span",Su," · "+O(W.value.latencyMs)+"ms",1)):K("",!0),$e(" · superuser auth: "+O(W.value.superuser?"ok":"—"),1),W.value.detail?(P(),A("span",ku," · "+O(W.value.detail),1)):K("",!0)])):K("",!0),V.value?(P(),A("p",Eu,O(V.value),1)):Y.value?(P(),A("p",Tu,O(Y.value),1)):K("",!0),d("div",Pu,[d("button",{class:"pv-btn",disabled:X.value,onClick:Ge},O(X.value?"Saving…":"Save connection"),9,Au),d("button",{class:"pv-btn-sec",disabled:j.value,onClick:Re},O(j.value?"Testing…":"Test connection"),9,Ou)]),u[54]||(u[54]=d("p",{class:"text-[11px] text-muted"}," The service account is used only for user & organization management. Changing the URL repoints the whole API Server at a new PocketBase and may sign you out. ",-1))])])],512),[[Jt,c.value==="pocketbase"]]),le(d("div",Ru,[d("div",Iu,[d("div",{class:"flex items-center justify-between border-b border-subtle px-5 py-4"},[u[55]||(u[55]=d("div",null,[d("div",{class:"text-base font-semibold text-primary"},"Plugins"),d("span",{class:"pv-eyebrow"},"External integrations")],-1)),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:it},"Refresh")]),d("div",Mu,[we.value?(P(),A("p",Uu,O(we.value),1)):K("",!0),ue.value?(P(),A("p",$u,O(ue.value),1)):K("",!0),!Ie.value.length&&!we.value?(P(),A("p",ju,"No plugins registered yet.")):K("",!0),Ie.value.length?(P(),A("div",Du,[(P(),A(re,null,Ce(te,f=>d("button",{key:f.id,class:Pe(["-mb-px whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",Ve.value===f.id?"border-brand text-primary":"border-transparent text-secondary hover:text-primary"]),onClick:S=>Ve.value=f.id},O(f.label),11,Lu)),64))])):K("",!0),Ie.value.length&&!Ee.value.length?(P(),A("p",Fu,"No plugins in this category.")):K("",!0),(P(!0),A(re,null,Ce(Ee.value,f=>(P(),A("div",{key:f.name,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[d("div",Nu,[d("div",Vu,[d("div",Hu,[d("span",Bu,O(f.name),1),d("span",{class:Pe(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",ms[f.kind]])},O(f.kind),3),f.health?(P(),A("span",{key:0,class:Pe(["inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium",Ys[f.health.status]]),title:f.health.detail||""},[u[56]||(u[56]=d("span",{class:"h-1 w-1 rounded-full bg-current"},null,-1)),$e(O(f.health.status),1),f.health.latencyMs?(P(),A("span",zu," · "+O(f.health.latencyMs)+"ms",1)):K("",!0)],10,Ku)):K("",!0)]),d("div",Wu,O(f.provider)+" · v"+O(f.version)+" · "+O(f.authType),1),f.health&&f.health.detail?(P(),A("div",Gu,O(f.health.detail),1)):K("",!0),f.capabilities&&f.capabilities.length?(P(),A("div",qu,[u[57]||(u[57]=d("div",{class:"pv-eyebrow"},"Capabilities",-1)),(P(!0),A(re,null,Ce(f.capabilities,S=>(P(),A("div",{key:S.id,class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},[d("span",Ju,O(S.id),1),S.method||S.endpoint?(P(),A("span",Yu,O(S.method)+" "+O(S.endpoint),1)):K("",!0),S.description?(P(),A("span",Xu,O(S.description),1)):K("",!0)]))),128))])):K("",!0),f.baseURL?(P(),A("div",Zu,O(f.baseURL),1)):K("",!0)]),d("div",Qu,[d("button",{class:Pe(["pv-btn-sec pv-btn-sm",f.enabled?"!border-transparent !bg-success-tint !text-success":""]),disabled:he.value===f.name,onClick:S=>Wt(f)},[d("span",{class:Pe(["h-1.5 w-1.5 rounded-full",f.enabled?"bg-success":"bg-muted"])},null,2),$e(" "+O(f.enabled?"Enabled":"Disabled"),1)],10,ef),f.configFields&&f.configFields.length?(P(),A("button",{key:0,class:"pv-btn-sec pv-btn-sm",onClick:S=>vs(f)},"Configure",8,tf)):K("",!0),d("button",{class:"pv-btn-sec pv-btn-sm",disabled:he.value===f.name,onClick:S=>Vn(f)},"Check",8,sf),f.kind==="external"?(P(),A("button",{key:1,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:he.value===f.name,onClick:S=>a(f)},"Remove",8,nf)):K("",!0)])]),qe.value===f.name?(P(),A("div",of,[(P(!0),A(re,null,Ce(f.configFields,S=>(P(),A("label",{key:S.key,class:"flex flex-col gap-1"},[d("span",lf,[$e(O(S.label),1),S.required?(P(),A("span",rf," *")):K("",!0)]),S.type==="select"?le((P(),A("select",{key:0,"onUpdate:modelValue":He=>Fe.value[S.key]=He,class:"pv-input"},[(P(!0),A(re,null,Ce(S.options,He=>(P(),A("option",{key:He.value,value:He.value},O(He.label),9,cf))),128))],8,af)),[[Dt,Fe.value[S.key]]]):le((P(),A("input",{key:1,"onUpdate:modelValue":He=>Fe.value[S.key]=He,type:S.secret||S.type==="password"?"password":S.type==="number"?"number":"text",class:"pv-input",autocomplete:"off",placeholder:S.help||""},null,8,uf)),[[ua,Fe.value[S.key]]]),S.help?(P(),A("span",ff,O(S.help),1)):K("",!0)]))),128)),d("div",df,[d("button",{class:"pv-btn pv-btn-sm",disabled:he.value===f.name,onClick:S=>wt(f)},"Save configuration",8,pf),d("button",{class:"pv-btn-sec pv-btn-sm",onClick:u[19]||(u[19]=S=>qe.value="")},"Cancel")])])):K("",!0)]))),128)),d("div",hf,[u[58]||(u[58]=d("div",{class:"pv-eyebrow mb-2"},"Register external plugin",-1)),d("div",gf,[le(d("input",{"onUpdate:modelValue":u[20]||(u[20]=f=>Ne.value.name=f),class:"pv-input sm:w-40",placeholder:"name",autocomplete:"off",spellcheck:"false"},null,512),[[ye,Ne.value.name]]),le(d("input",{"onUpdate:modelValue":u[21]||(u[21]=f=>Ne.value.baseURL=f),class:"pv-input flex-1",placeholder:"https://plugin.example.com",autocomplete:"off",spellcheck:"false"},null,512),[[ye,Ne.value.baseURL]]),d("button",{class:"pv-btn",disabled:ee.value,onClick:p},O(ee.value?"Adding…":"Add"),9,mf)]),ae.value?(P(),A("p",vf,O(ae.value),1)):K("",!0),u[59]||(u[59]=d("p",{class:"mt-2 text-[11px] text-muted"},[$e(" A remote service that answers "),d("span",{class:"font-mono"},"GET /health"),$e(" and "),d("span",{class:"font-mono"},"GET /manifest"),$e(" — added at runtime, no rebuild. ")],-1))])])])],512),[[Jt,c.value==="plugins"]])],64)):(P(),A("div",Da,[u[29]||(u[29]=d("div",{class:"border-b border-subtle px-5 py-4"},[d("div",{class:"text-base font-semibold text-primary"},"Sign in"),d("span",{class:"pv-eyebrow"},"Superadmin access only")],-1)),d("form",{class:"flex flex-col gap-3 px-5 py-5",onSubmit:ha(I,["prevent"])},[d("label",La,[u[27]||(u[27]=d("span",{class:"pv-eyebrow"},"Email",-1)),le(d("input",{"onUpdate:modelValue":u[1]||(u[1]=f=>i.value.email=f),type:"email",autocomplete:"username",class:"pv-input",placeholder:"superadmin@pilotvault.local"},null,512),[[ye,i.value.email]])]),d("label",Fa,[u[28]||(u[28]=d("span",{class:"pv-eyebrow"},"Password",-1)),le(d("input",{"onUpdate:modelValue":u[2]||(u[2]=f=>i.value.password=f),type:"password",autocomplete:"current-password",class:"pv-input",placeholder:"••••••••"},null,512),[[ye,i.value.password]])]),l.value?(P(),A("p",Na,O(l.value),1)):K("",!0),d("button",{type:"submit",class:"pv-btn mt-1",disabled:r.value},O(r.value?"Signing in…":"Sign in"),9,Va)],32)])),u[60]||(u[60]=d("p",{class:"text-center font-mono text-[11px] text-muted"}," PilotVault — live drone telemetry, command & control. ",-1))]))}};ba(bf).mount("#app"); diff --git a/API Server/internal/api/dist/assets/index-DKDpmK_V.js b/API Server/internal/api/dist/assets/index-DKDpmK_V.js deleted file mode 100644 index fc733fe..0000000 --- a/API Server/internal/api/dist/assets/index-DKDpmK_V.js +++ /dev/null @@ -1,17 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function s(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=s(i);fetch(i.href,o)}})();/** -* @vue/shared v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function nn(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const ee={},Ct=[],Ge=()=>{},oi=()=>!1,_s=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ws=e=>e.startsWith("onUpdate:"),fe=Object.assign,on=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},bo=Object.prototype.hasOwnProperty,J=(e,t)=>bo.call(e,t),j=Array.isArray,Tt=e=>Qt(e)==="[object Map]",Mt=e=>Qt(e)==="[object Set]",En=e=>Qt(e)==="[object Date]",N=e=>typeof e=="function",ne=e=>typeof e=="string",qe=e=>typeof e=="symbol",Z=e=>e!==null&&typeof e=="object",ri=e=>(Z(e)||N(e))&&N(e.then)&&N(e.catch),li=Object.prototype.toString,Qt=e=>li.call(e),vo=e=>Qt(e).slice(8,-1),ai=e=>Qt(e)==="[object Object]",rn=e=>ne(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Nt=nn(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ss=e=>{const t=Object.create(null);return(s=>t[s]||(t[s]=e(s)))},yo=/-\w/g,Re=Ss(e=>e.replace(yo,t=>t.slice(1).toUpperCase())),xo=/\B([A-Z])/g,xt=Ss(e=>e.replace(xo,"-$1").toLowerCase()),ci=Ss(e=>e.charAt(0).toUpperCase()+e.slice(1)),Rs=Ss(e=>e?`on${ci(e)}`:""),We=(e,t)=>!Object.is(e,t),cs=(e,...t)=>{for(let s=0;s{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Cs=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pn;const Ts=()=>Pn||(Pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function ln(e){if(j(e)){const t={};for(let s=0;s{if(s){const n=s.split(wo);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function Ee(e){let t="";if(ne(e))t=e;else if(j(e))for(let s=0;sct(s,t))}const di=e=>!!(e&&e.__v_isRef===!0),U=e=>ne(e)?e:e==null?"":j(e)||Z(e)&&(e.toString===li||!N(e.toString))?di(e)?U(e.value):JSON.stringify(e,pi,2):String(e),pi=(e,t)=>di(t)?pi(e,t.value):Tt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,i],o)=>(s[Ds(n,o)+" =>"]=i,s),{})}:Mt(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>Ds(s))}:qe(t)?Ds(t):Z(t)&&!j(t)&&!ai(t)?String(t):t,Ds=(e,t="")=>{var s;return qe(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/** -* @vue/reactivity v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let le;class ko{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&le&&(le.active?(this.parent=le,this.index=(le.scopes||(le.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t0&&--this._on===0){if(le===this)le=this.prevScope;else{let t=le;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s0)return;if(Vt){let t=Vt;for(Vt=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Ht;){let t=Ht;for(Ht=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function bi(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function vi(e){let t,s=e.depsTail,n=s;for(;n;){const i=n.prevDep;n.version===-1?(n===s&&(s=i),fn(n),Oo(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=i}e.deps=t,e.depsTail=s}function Gs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(yi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function yi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===qt)||(e.globalVersion=qt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Gs(e))))return;e.flags|=2;const t=e.dep,s=te,n=De;te=e,De=!0;try{bi(e);const i=e.fn(e._value);(t.version===0||We(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{te=s,De=n,vi(e),e.flags&=-3}}function fn(e,t=!1){const{dep:s,prevSub:n,nextSub:i}=e;if(n&&(n.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let o=s.computed.deps;o;o=o.nextDep)fn(o,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Oo(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let De=!0;const xi=[];function Je(){xi.push(De),De=!1}function ze(){const e=xi.pop();De=e===void 0?!0:e}function kn(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=te;te=void 0;try{t()}finally{te=s}}}let qt=0;class Mo{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class dn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!te||!De||te===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==te)s=this.activeLink=new Mo(te,this),te.deps?(s.prevDep=te.depsTail,te.depsTail.nextDep=s,te.depsTail=s):te.deps=te.depsTail=s,_i(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=te.depsTail,s.nextDep=void 0,te.depsTail.nextDep=s,te.depsTail=s,te.deps===s&&(te.deps=n)}return s}trigger(t){this.version++,qt++,this.notify(t)}notify(t){cn();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{un()}}}function _i(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)_i(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const qs=new WeakMap,vt=Symbol(""),Js=Symbol(""),Jt=Symbol("");function ce(e,t,s){if(De&&te){let n=qs.get(e);n||qs.set(e,n=new Map);let i=n.get(s);i||(n.set(s,i=new dn),i.map=n,i.key=s),i.track()}}function st(e,t,s,n,i,o){const r=qs.get(e);if(!r){qt++;return}const l=c=>{c&&c.trigger()};if(cn(),t==="clear")r.forEach(l);else{const c=j(e),p=c&&rn(s);if(c&&s==="length"){const f=Number(n);r.forEach((m,P)=>{(P==="length"||P===Jt||!qe(P)&&P>=f)&&l(m)})}else switch((s!==void 0||r.has(void 0))&&l(r.get(s)),p&&l(r.get(Jt)),t){case"add":c?p&&l(r.get("length")):(l(r.get(vt)),Tt(e)&&l(r.get(Js)));break;case"delete":c||(l(r.get(vt)),Tt(e)&&l(r.get(Js)));break;case"set":Tt(e)&&l(r.get(vt));break}}un()}function wt(e){const t=q(e);return t===e?t:(ce(t,"iterate",Jt),ke(e)?t:t.map(Fe))}function Es(e){return ce(e=q(e),"iterate",Jt),e}function Be(e,t){return ot(e)?kt(yt(e)?Fe(t):t):Fe(t)}const Io={__proto__:null,[Symbol.iterator](){return Ls(this,Symbol.iterator,e=>Be(this,e))},concat(...e){return wt(this).concat(...e.map(t=>j(t)?wt(t):t))},entries(){return Ls(this,"entries",e=>(e[1]=Be(this,e[1]),e))},every(e,t){return Ze(this,"every",e,t,void 0,arguments)},filter(e,t){return Ze(this,"filter",e,t,s=>s.map(n=>Be(this,n)),arguments)},find(e,t){return Ze(this,"find",e,t,s=>Be(this,s),arguments)},findIndex(e,t){return Ze(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ze(this,"findLast",e,t,s=>Be(this,s),arguments)},findLastIndex(e,t){return Ze(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ze(this,"forEach",e,t,void 0,arguments)},includes(...e){return js(this,"includes",e)},indexOf(...e){return js(this,"indexOf",e)},join(e){return wt(this).join(e)},lastIndexOf(...e){return js(this,"lastIndexOf",e)},map(e,t){return Ze(this,"map",e,t,void 0,arguments)},pop(){return Dt(this,"pop")},push(...e){return Dt(this,"push",e)},reduce(e,...t){return An(this,"reduce",e,t)},reduceRight(e,...t){return An(this,"reduceRight",e,t)},shift(){return Dt(this,"shift")},some(e,t){return Ze(this,"some",e,t,void 0,arguments)},splice(...e){return Dt(this,"splice",e)},toReversed(){return wt(this).toReversed()},toSorted(e){return wt(this).toSorted(e)},toSpliced(...e){return wt(this).toSpliced(...e)},unshift(...e){return Dt(this,"unshift",e)},values(){return Ls(this,"values",e=>Be(this,e))}};function Ls(e,t,s){const n=Es(e),i=n[t]();return n!==e&&!ke(e)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=s(o.value)),o}),i}const Ro=Array.prototype;function Ze(e,t,s,n,i,o){const r=Es(e),l=r!==e&&!ke(e),c=r[t];if(c!==Ro[t]){const m=c.apply(e,o);return l?Fe(m):m}let p=s;r!==e&&(l?p=function(m,P){return s.call(this,Be(e,m),P,e)}:s.length>2&&(p=function(m,P){return s.call(this,m,P,e)}));const f=c.call(r,p,n);return l&&i?i(f):f}function An(e,t,s,n){const i=Es(e),o=i!==e&&!ke(e);let r=s,l=!1;i!==e&&(o?(l=n.length===0,r=function(p,f,m){return l&&(l=!1,p=Be(e,p)),s.call(this,p,Be(e,f),m,e)}):s.length>3&&(r=function(p,f,m){return s.call(this,p,f,m,e)}));const c=i[t](r,...n);return l?Be(e,c):c}function js(e,t,s){const n=q(e);ce(n,"iterate",Jt);const i=n[t](...s);return(i===-1||i===!1)&&mn(s[0])?(s[0]=q(s[0]),n[t](...s)):i}function Dt(e,t,s=[]){Je(),cn();const n=q(e)[t].apply(e,s);return un(),ze(),n}const Do=nn("__proto__,__v_isRef,__isVue"),wi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(qe));function Fo(e){qe(e)||(e=String(e));const t=q(this);return ce(t,"has",e),t.hasOwnProperty(e)}class Si{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const i=this._isReadonly,o=this._isShallow;if(s==="__v_isReactive")return!i;if(s==="__v_isReadonly")return i;if(s==="__v_isShallow")return o;if(s==="__v_raw")return n===(i?o?Wo:Pi:o?Ei:Ti).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const r=j(t);if(!i){let c;if(r&&(c=Io[s]))return c;if(s==="hasOwnProperty")return Fo}const l=Reflect.get(t,s,ue(t)?t:n);if((qe(s)?wi.has(s):Do(s))||(i||ce(t,"get",s),o))return l;if(ue(l)){const c=r&&rn(s)?l:l.value;return i&&Z(c)?Ys(c):c}return Z(l)?i?Ys(l):hn(l):l}}class Ci extends Si{constructor(t=!1){super(!1,t)}set(t,s,n,i){let o=t[s];const r=j(t)&&rn(s);if(!this._isShallow){const p=ot(o);if(!ke(n)&&!ot(n)&&(o=q(o),n=q(n)),!r&&ue(o)&&!ue(n))return p||(o.value=n),!0}const l=r?Number(s)e,is=e=>Reflect.getPrototypeOf(e);function No(e,t,s){return function(...n){const i=this.__v_raw,o=q(i),r=Tt(o),l=e==="entries"||e===Symbol.iterator&&r,c=e==="keys"&&r,p=i[e](...n),f=s?zs:t?kt:Fe;return!t&&ce(o,"iterate",c?Js:vt),fe(Object.create(p),{next(){const{value:m,done:P}=p.next();return P?{value:m,done:P}:{value:l?[f(m[0]),f(m[1])]:f(m),done:P}}})}}function os(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ho(e,t){const s={get(i){const o=this.__v_raw,r=q(o),l=q(i);e||(We(i,l)&&ce(r,"get",i),ce(r,"get",l));const{has:c}=is(r),p=t?zs:e?kt:Fe;if(c.call(r,i))return p(o.get(i));if(c.call(r,l))return p(o.get(l));o!==r&&o.get(i)},get size(){const i=this.__v_raw;return!e&&ce(q(i),"iterate",vt),i.size},has(i){const o=this.__v_raw,r=q(o),l=q(i);return e||(We(i,l)&&ce(r,"has",i),ce(r,"has",l)),i===l?o.has(i):o.has(i)||o.has(l)},forEach(i,o){const r=this,l=r.__v_raw,c=q(l),p=t?zs:e?kt:Fe;return!e&&ce(c,"iterate",vt),l.forEach((f,m)=>i.call(o,p(f),p(m),r))}};return fe(s,e?{add:os("add"),set:os("set"),delete:os("delete"),clear:os("clear")}:{add(i){const o=q(this),r=is(o),l=q(i),c=!t&&!ke(i)&&!ot(i)?l:i;return r.has.call(o,c)||We(i,c)&&r.has.call(o,i)||We(l,c)&&r.has.call(o,l)||(o.add(c),st(o,"add",c,c)),this},set(i,o){!t&&!ke(o)&&!ot(o)&&(o=q(o));const r=q(this),{has:l,get:c}=is(r);let p=l.call(r,i);p||(i=q(i),p=l.call(r,i));const f=c.call(r,i);return r.set(i,o),p?We(o,f)&&st(r,"set",i,o):st(r,"add",i,o),this},delete(i){const o=q(this),{has:r,get:l}=is(o);let c=r.call(o,i);c||(i=q(i),c=r.call(o,i)),l&&l.call(o,i);const p=o.delete(i);return c&&st(o,"delete",i,void 0),p},clear(){const i=q(this),o=i.size!==0,r=i.clear();return o&&st(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{s[i]=No(i,e,t)}),s}function pn(e,t){const s=Ho(e,t);return(n,i,o)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?n:Reflect.get(J(s,i)&&i in n?s:n,i,o)}const Vo={get:pn(!1,!1)},Bo={get:pn(!1,!0)},Ko={get:pn(!0,!1)};const Ti=new WeakMap,Ei=new WeakMap,Pi=new WeakMap,Wo=new WeakMap;function Go(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hn(e){return ot(e)?e:gn(e,!1,jo,Vo,Ti)}function qo(e){return gn(e,!1,$o,Bo,Ei)}function Ys(e){return gn(e,!0,Uo,Ko,Pi)}function gn(e,t,s,n,i){if(!Z(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const o=i.get(e);if(o)return o;const r=Go(vo(e));if(r===0)return e;const l=new Proxy(e,r===2?n:s);return i.set(e,l),l}function yt(e){return ot(e)?yt(e.__v_raw):!!(e&&e.__v_isReactive)}function ot(e){return!!(e&&e.__v_isReadonly)}function ke(e){return!!(e&&e.__v_isShallow)}function mn(e){return e?!!e.__v_raw:!1}function q(e){const t=e&&e.__v_raw;return t?q(t):e}function Jo(e){return!J(e,"__v_skip")&&Object.isExtensible(e)&&ui(e,"__v_skip",!0),e}const Fe=e=>Z(e)?hn(e):e,kt=e=>Z(e)?Ys(e):e;function ue(e){return e?e.__v_isRef===!0:!1}function z(e){return zo(e,!1)}function zo(e,t){return ue(e)?e:new Yo(e,t)}class Yo{constructor(t,s){this.dep=new dn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:q(t),this._value=s?t:Fe(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||ke(t)||ot(t);t=n?t:q(t),We(t,s)&&(this._rawValue=t,this._value=n?t:Fe(t),this.dep.trigger())}}function jt(e){return ue(e)?e.value:e}const Xo={get:(e,t,s)=>t==="__v_raw"?e:jt(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const i=e[t];return ue(i)&&!ue(s)?(i.value=s,!0):Reflect.set(e,t,s,n)}};function ki(e){return yt(e)?e:new Proxy(e,Xo)}class Zo{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new dn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=qt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&te!==this)return mi(this,!0),!0}get value(){const t=this.dep.track();return yi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Qo(e,t,s=!1){let n,i;return N(e)?n=e:(n=e.get,i=e.set),new Zo(n,i,s)}const rs={},ps=new WeakMap;let bt;function er(e,t=!1,s=bt){if(s){let n=ps.get(s);n||ps.set(s,n=[]),n.push(e)}}function tr(e,t,s=ee){const{immediate:n,deep:i,once:o,scheduler:r,augmentJob:l,call:c}=s,p=R=>i?R:ke(R)||i===!1||i===0?nt(R,1):nt(R);let f,m,P,A,B=!1,O=!1;if(ue(e)?(m=()=>e.value,B=ke(e)):yt(e)?(m=()=>p(e),B=!0):j(e)?(O=!0,B=e.some(R=>yt(R)||ke(R)),m=()=>e.map(R=>{if(ue(R))return R.value;if(yt(R))return p(R);if(N(R))return c?c(R,2):R()})):N(e)?t?m=c?()=>c(e,2):e:m=()=>{if(P){Je();try{P()}finally{ze()}}const R=bt;bt=f;try{return c?c(e,3,[A]):e(A)}finally{bt=R}}:m=Ge,t&&i){const R=m,G=i===!0?1/0:i;m=()=>nt(R(),G)}const H=Ao(),K=()=>{f.stop(),H&&H.active&&on(H.effects,f)};if(o&&t){const R=t;t=(...G)=>{const be=R(...G);return K(),be}}let $=O?new Array(e.length).fill(rs):rs;const W=R=>{if(!(!(f.flags&1)||!f.dirty&&!R))if(t){const G=f.run();if(R||i||B||(O?G.some((be,we)=>We(be,$[we])):We(G,$))){P&&P();const be=bt;bt=f;try{const we=[G,$===rs?void 0:O&&$[0]===rs?[]:$,A];$=G,c?c(t,3,we):t(...we)}finally{bt=be}}}else f.run()};return l&&l(W),f=new hi(m),f.scheduler=r?()=>r(W,!1):W,A=R=>er(R,!1,f),P=f.onStop=()=>{const R=ps.get(f);if(R){if(c)c(R,4);else for(const G of R)G();ps.delete(f)}},t?n?W(!0):$=f.run():r?r(W.bind(null,!0),!0):f.run(),K.pause=f.pause.bind(f),K.resume=f.resume.bind(f),K.stop=K,K}function nt(e,t=1/0,s){if(t<=0||!Z(e)||e.__v_skip||(s=s||new Map,(s.get(e)||0)>=t))return e;if(s.set(e,t),t--,ue(e))nt(e.value,t,s);else if(j(e))for(let n=0;n{nt(n,t,s)});else if(ai(e)){for(const n in e)nt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&nt(e[n],t,s)}return e}/** -* @vue/runtime-core v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function es(e,t,s,n){try{return n?e(...n):e()}catch(i){Ps(i,t,s)}}function Le(e,t,s,n){if(N(e)){const i=es(e,t,s,n);return i&&ri(i)&&i.catch(o=>{Ps(o,t,s)}),i}if(j(e)){const i=[];for(let o=0;o>>1,i=pe[n],o=zt(i);o=zt(s)?pe.push(e):pe.splice(nr(t),0,e),e.flags|=1,Mi()}}function Mi(){hs||(hs=Ai.then(Ri))}function ir(e){j(e)?Et.push(...e):at&&e.id===-1?at.splice(St+1,0,e):e.flags&1||(Et.push(e),e.flags|=1),Mi()}function On(e,t,s=Ve+1){for(;szt(s)-zt(n));if(Et.length=0,at){at.push(...t);return}for(at=t,St=0;Ste.id==null?e.flags&2?-1:1/0:e.id;function Ri(e){try{for(Ve=0;Ve{n._d&&Hn(-1);const o=gs(t);let r;try{r=e(...i)}finally{gs(o),n._d&&Hn(1)}return r};return n._n=!0,n._c=!0,n._d=!0,n}function Ce(e,t){if(Pe===null)return e;const s=Ms(Pe),n=e.dirs||(e.dirs=[]);for(let i=0;i1)return s&&N(t)?t.call(n&&n.proxy):t}}const lr=Symbol.for("v-scx"),ar=()=>us(lr);function Us(e,t,s){return Fi(e,t,s)}function Fi(e,t,s=ee){const{immediate:n,deep:i,flush:o,once:r}=s,l=fe({},s),c=t&&n||!t&&o!=="post";let p;if(Xt){if(o==="sync"){const A=ar();p=A.__watcherHandles||(A.__watcherHandles=[])}else if(!c){const A=()=>{};return A.stop=Ge,A.resume=Ge,A.pause=Ge,A}}const f=he;l.call=(A,B,O)=>Le(A,f,B,O);let m=!1;o==="post"?l.scheduler=A=>{me(A,f&&f.suspense)}:o!=="sync"&&(m=!0,l.scheduler=(A,B)=>{B?A():bn(A)}),l.augmentJob=A=>{t&&(A.flags|=4),m&&(A.flags|=2,f&&(A.id=f.uid,A.i=f))};const P=tr(e,t,l);return Xt&&(p?p.push(P):c&&P()),P}function cr(e,t,s){const n=this.proxy,i=ne(e)?e.includes(".")?Li(n,e):()=>n[e]:e.bind(n,n);let o;N(t)?o=t:(o=t.handler,s=t);const r=ts(this),l=Fi(i,o.bind(n),s);return r(),l}function Li(e,t){const s=t.split(".");return()=>{let n=e;for(let i=0;ie.__isTeleport,$s=Symbol("_leaveCb");function vn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,vn(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ji(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Mn(e,t){let s;return!!((s=Object.getOwnPropertyDescriptor(e,t))&&!s.configurable)}const ms=new WeakMap;function Bt(e,t,s,n,i=!1){if(j(e)){e.forEach((O,H)=>Bt(O,t&&(j(t)?t[H]:t),s,n,i));return}if(Kt(n)&&!i){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Bt(e,t,s,n.component.subTree);return}const o=n.shapeFlag&4?Ms(n.component):n.el,r=i?null:o,{i:l,r:c}=e,p=t&&t.r,f=l.refs===ee?l.refs={}:l.refs,m=l.setupState,P=q(m),A=m===ee?oi:O=>Mn(f,O)?!1:J(P,O),B=(O,H)=>!(H&&Mn(f,H));if(p!=null&&p!==c){if(In(t),ne(p))f[p]=null,A(p)&&(m[p]=null);else if(ue(p)){const O=t;B(p,O.k)&&(p.value=null),O.k&&(f[O.k]=null)}}if(N(c)){Je();try{es(c,l,12,[r,f])}finally{ze()}}else{const O=ne(c),H=ue(c);if(O||H){const K=()=>{if(e.f){const $=O?A(c)?m[c]:f[c]:B()||!e.k?c.value:f[e.k];if(i)j($)&&on($,o);else if(j($))$.includes(o)||$.push(o);else if(O)f[c]=[o],A(c)&&(m[c]=f[c]);else{const W=[o];B(c,e.k)&&(c.value=W),e.k&&(f[e.k]=W)}}else O?(f[c]=r,A(c)&&(m[c]=r)):H&&(B(c,e.k)&&(c.value=r),e.k&&(f[e.k]=r))};if(r){const $=()=>{K(),ms.delete(e)};$.id=-1,ms.set(e,$),me($,s)}else In(e),K()}}}function In(e){const t=ms.get(e);t&&(t.flags|=8,ms.delete(e))}Ts().requestIdleCallback;Ts().cancelIdleCallback;const Kt=e=>!!e.type.__asyncLoader,Ui=e=>e.type.__isKeepAlive;function dr(e,t){$i(e,"a",t)}function pr(e,t){$i(e,"da",t)}function $i(e,t,s=he){const n=e.__wdc||(e.__wdc=()=>{let i=s;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(ks(t,n,s),s){let i=s.parent;for(;i&&i.parent;)Ui(i.parent.vnode)&&hr(n,t,s,i),i=i.parent}}function hr(e,t,s,n){const i=ks(t,e,n,!0);yn(()=>{on(n[t],i)},s)}function ks(e,t,s=he,n=!1){if(s){const i=s[e]||(s[e]=[]),o=t.__weh||(t.__weh=(...r)=>{Je();const l=ts(s),c=Le(t,s,e,r);return l(),ze(),c});return n?i.unshift(o):i.push(o),o}}const rt=e=>(t,s=he)=>{(!Xt||e==="sp")&&ks(e,(...n)=>t(...n),s)},gr=rt("bm"),Ni=rt("m"),mr=rt("bu"),br=rt("u"),vr=rt("bum"),yn=rt("um"),yr=rt("sp"),xr=rt("rtg"),_r=rt("rtc");function wr(e,t=he){ks("ec",e,t)}const Sr=Symbol.for("v-ndc");function lt(e,t,s,n){let i;const o=s,r=j(e);if(r||ne(e)){const l=r&&yt(e);let c=!1,p=!1;l&&(c=!ke(e),p=ot(e),e=Es(e)),i=new Array(e.length);for(let f=0,m=e.length;ft(l,c,void 0,o));else{const l=Object.keys(e);i=new Array(l.length);for(let c=0,p=l.length;ce?lo(e)?Ms(e):Xs(e.parent):null,Wt=fe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Xs(e.parent),$root:e=>Xs(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vi(e),$forceUpdate:e=>e.f||(e.f=()=>{bn(e.update)}),$nextTick:e=>e.n||(e.n=Oi.bind(e.proxy)),$watch:e=>cr.bind(e)}),Ns=(e,t)=>e!==ee&&!e.__isScriptSetup&&J(e,t),Cr={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:i,props:o,accessCache:r,type:l,appContext:c}=e;if(t[0]!=="$"){const P=r[t];if(P!==void 0)switch(P){case 1:return n[t];case 2:return i[t];case 4:return s[t];case 3:return o[t]}else{if(Ns(n,t))return r[t]=1,n[t];if(i!==ee&&J(i,t))return r[t]=2,i[t];if(J(o,t))return r[t]=3,o[t];if(s!==ee&&J(s,t))return r[t]=4,s[t];Zs&&(r[t]=0)}}const p=Wt[t];let f,m;if(p)return t==="$attrs"&&ce(e.attrs,"get",""),p(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(s!==ee&&J(s,t))return r[t]=4,s[t];if(m=c.config.globalProperties,J(m,t))return m[t]},set({_:e},t,s){const{data:n,setupState:i,ctx:o}=e;return Ns(i,t)?(i[t]=s,!0):n!==ee&&J(n,t)?(n[t]=s,!0):J(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(o[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:i,props:o,type:r}},l){let c;return!!(s[l]||e!==ee&&l[0]!=="$"&&J(e,l)||Ns(t,l)||J(o,l)||J(n,l)||J(Wt,l)||J(i.config.globalProperties,l)||(c=r.__cssModules)&&c[l])},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:J(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function Rn(e){return j(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Zs=!0;function Tr(e){const t=Vi(e),s=e.proxy,n=e.ctx;Zs=!1,t.beforeCreate&&Dn(t.beforeCreate,e,"bc");const{data:i,computed:o,methods:r,watch:l,provide:c,inject:p,created:f,beforeMount:m,mounted:P,beforeUpdate:A,updated:B,activated:O,deactivated:H,beforeDestroy:K,beforeUnmount:$,destroyed:W,unmounted:R,render:G,renderTracked:be,renderTriggered:we,errorCaptured:je,serverPrefetch:Se,expose:ge,inheritAttrs:oe,components:Ue,directives:Oe,filters:ae}=t;if(p&&Er(p,n,null),r)for(const Y in r){const X=r[Y];N(X)&&(n[Y]=X.bind(s))}if(i){const Y=i.call(s,s);Z(Y)&&(e.data=hn(Y))}if(Zs=!0,o)for(const Y in o){const X=o[Y],Ie=N(X)?X.bind(s,s):N(X.get)?X.get.bind(s,s):Ge,_t=!N(X)&&N(X.set)?X.set.bind(s):Ge,Ye=co({get:Ie,set:_t});Object.defineProperty(n,Y,{enumerable:!0,configurable:!0,get:()=>Ye.value,set:ve=>Ye.value=ve})}if(l)for(const Y in l)Hi(l[Y],n,s,Y);if(c){const Y=N(c)?c.call(s):c;Reflect.ownKeys(Y).forEach(X=>{rr(X,Y[X])})}f&&Dn(f,e,"c");function se(Y,X){j(X)?X.forEach(Ie=>Y(Ie.bind(s))):X&&Y(X.bind(s))}if(se(gr,m),se(Ni,P),se(mr,A),se(br,B),se(dr,O),se(pr,H),se(wr,je),se(_r,be),se(xr,we),se(vr,$),se(yn,R),se(yr,Se),j(ge))if(ge.length){const Y=e.exposed||(e.exposed={});ge.forEach(X=>{Object.defineProperty(Y,X,{get:()=>s[X],set:Ie=>s[X]=Ie,enumerable:!0})})}else e.exposed||(e.exposed={});G&&e.render===Ge&&(e.render=G),oe!=null&&(e.inheritAttrs=oe),Ue&&(e.components=Ue),Oe&&(e.directives=Oe),Se&&ji(e)}function Er(e,t,s=Ge){j(e)&&(e=Qs(e));for(const n in e){const i=e[n];let o;Z(i)?"default"in i?o=us(i.from||n,i.default,!0):o=us(i.from||n):o=us(i),ue(o)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):t[n]=o}}function Dn(e,t,s){Le(j(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function Hi(e,t,s,n){let i=n.includes(".")?Li(s,n):()=>s[n];if(ne(e)){const o=t[e];N(o)&&Us(i,o)}else if(N(e))Us(i,e.bind(s));else if(Z(e))if(j(e))e.forEach(o=>Hi(o,t,s,n));else{const o=N(e.handler)?e.handler.bind(s):t[e.handler];N(o)&&Us(i,o,e)}}function Vi(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=e.appContext,l=o.get(t);let c;return l?c=l:!i.length&&!s&&!n?c=t:(c={},i.length&&i.forEach(p=>bs(c,p,r,!0)),bs(c,t,r)),Z(t)&&o.set(t,c),c}function bs(e,t,s,n=!1){const{mixins:i,extends:o}=t;o&&bs(e,o,s,!0),i&&i.forEach(r=>bs(e,r,s,!0));for(const r in t)if(!(n&&r==="expose")){const l=Pr[r]||s&&s[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Pr={data:Fn,props:Ln,emits:Ln,methods:Ut,computed:Ut,beforeCreate:de,created:de,beforeMount:de,mounted:de,beforeUpdate:de,updated:de,beforeDestroy:de,beforeUnmount:de,destroyed:de,unmounted:de,activated:de,deactivated:de,errorCaptured:de,serverPrefetch:de,components:Ut,directives:Ut,watch:Ar,provide:Fn,inject:kr};function Fn(e,t){return t?e?function(){return fe(N(e)?e.call(this,this):e,N(t)?t.call(this,this):t)}:t:e}function kr(e,t){return Ut(Qs(e),Qs(t))}function Qs(e){if(j(e)){const t={};for(let s=0;st==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Re(t)}Modifiers`]||e[`${xt(t)}Modifiers`];function Rr(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||ee;let i=s;const o=t.startsWith("update:"),r=o&&Ir(n,t.slice(7));r&&(r.trim&&(i=s.map(f=>ne(f)?f.trim():f)),r.number&&(i=s.map(Cs)));let l,c=n[l=Rs(t)]||n[l=Rs(Re(t))];!c&&o&&(c=n[l=Rs(xt(t))]),c&&Le(c,e,6,i);const p=n[l+"Once"];if(p){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Le(p,e,6,i)}}const Dr=new WeakMap;function Ki(e,t,s=!1){const n=s?Dr:t.emitsCache,i=n.get(e);if(i!==void 0)return i;const o=e.emits;let r={},l=!1;if(!N(e)){const c=p=>{const f=Ki(p,t,!0);f&&(l=!0,fe(r,f))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(Z(e)&&n.set(e,null),null):(j(o)?o.forEach(c=>r[c]=null):fe(r,o),Z(e)&&n.set(e,r),r)}function As(e,t){return!e||!_s(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),J(e,t[0].toLowerCase()+t.slice(1))||J(e,xt(t))||J(e,t))}function jn(e){const{type:t,vnode:s,proxy:n,withProxy:i,propsOptions:[o],slots:r,attrs:l,emit:c,render:p,renderCache:f,props:m,data:P,setupState:A,ctx:B,inheritAttrs:O}=e,H=gs(e);let K,$;try{if(s.shapeFlag&4){const R=i||n,G=R;K=Ke(p.call(G,R,f,m,A,P,B)),$=l}else{const R=t;K=Ke(R.length>1?R(m,{attrs:l,slots:r,emit:c}):R(m,null)),$=t.props?l:Fr(l)}}catch(R){Gt.length=0,Ps(R,e,1),K=_e(ut)}let W=K;if($&&O!==!1){const R=Object.keys($),{shapeFlag:G}=W;R.length&&G&7&&(o&&R.some(ws)&&($=Lr($,o)),W=At(W,$,!1,!0))}return s.dirs&&(W=At(W,null,!1,!0),W.dirs=W.dirs?W.dirs.concat(s.dirs):s.dirs),s.transition&&vn(W,s.transition),K=W,gs(H),K}const Fr=e=>{let t;for(const s in e)(s==="class"||s==="style"||_s(s))&&((t||(t={}))[s]=e[s]);return t},Lr=(e,t)=>{const s={};for(const n in e)(!ws(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function jr(e,t,s){const{props:n,children:i,component:o}=e,{props:r,children:l,patchFlag:c}=t,p=o.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?Un(n,r,p):!!r;if(c&8){const f=t.dynamicProps;for(let m=0;mObject.create(Gi),Ji=e=>Object.getPrototypeOf(e)===Gi;function $r(e,t,s,n=!1){const i={},o=qi();e.propsDefaults=Object.create(null),zi(e,t,i,o);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);s?e.props=n?i:qo(i):e.type.props?e.props=i:e.props=o,e.attrs=o}function Nr(e,t,s,n){const{props:i,attrs:o,vnode:{patchFlag:r}}=e,l=q(i),[c]=e.propsOptions;let p=!1;if((n||r>0)&&!(r&16)){if(r&8){const f=e.vnode.dynamicProps;for(let m=0;m{c=!0;const[P,A]=Yi(m,t,!0);fe(r,P),A&&l.push(...A)};!s&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}if(!o&&!c)return Z(e)&&n.set(e,Ct),Ct;if(j(o))for(let f=0;fe==="_"||e==="_ctx"||e==="$stable",_n=e=>j(e)?e.map(Ke):[Ke(e)],Vr=(e,t,s)=>{if(t._n)return t;const n=or((...i)=>_n(t(...i)),s);return n._c=!1,n},Xi=(e,t,s)=>{const n=e._ctx;for(const i in e){if(xn(i))continue;const o=e[i];if(N(o))t[i]=Vr(i,o,n);else if(o!=null){const r=_n(o);t[i]=()=>r}}},Zi=(e,t)=>{const s=_n(t);e.slots.default=()=>s},Qi=(e,t,s)=>{for(const n in t)(s||!xn(n))&&(e[n]=t[n])},Br=(e,t,s)=>{const n=e.slots=qi();if(e.vnode.shapeFlag&32){const i=t._;i?(Qi(n,t,s),s&&ui(n,"_",i,!0)):Xi(t,n)}else t&&Zi(e,t)},Kr=(e,t,s)=>{const{vnode:n,slots:i}=e;let o=!0,r=ee;if(n.shapeFlag&32){const l=t._;l?s&&l===1?o=!1:Qi(i,t,s):(o=!t.$stable,Xi(t,i)),r=t}else t&&(Zi(e,t),r={default:1});if(o)for(const l in i)!xn(l)&&r[l]==null&&delete i[l]},me=zr;function Wr(e){return Gr(e)}function Gr(e,t){const s=Ts();s.__VUE__=!0;const{insert:n,remove:i,patchProp:o,createElement:r,createText:l,createComment:c,setText:p,setElementText:f,parentNode:m,nextSibling:P,setScopeId:A=Ge,insertStaticContent:B}=e,O=(a,u,g,_=null,b=null,v=null,T=void 0,C=null,S=!!u.dynamicChildren)=>{if(a===u)return;a&&!Ft(a,u)&&(_=pt(a),ve(a,b,v,!0),a=null),u.patchFlag===-2&&(S=!1,u.dynamicChildren=null);const{type:x,ref:I,shapeFlag:E}=u;switch(x){case Os:H(a,u,g,_);break;case ut:K(a,u,g,_);break;case fs:a==null&&$(u,g,_,T);break;case re:Ue(a,u,g,_,b,v,T,C,S);break;default:E&1?G(a,u,g,_,b,v,T,C,S):E&6?Oe(a,u,g,_,b,v,T,C,S):(E&64||E&128)&&x.process(a,u,g,_,b,v,T,C,S,ht)}I!=null&&b?Bt(I,a&&a.ref,v,u||a,!u):I==null&&a&&a.ref!=null&&Bt(a.ref,null,v,a,!0)},H=(a,u,g,_)=>{if(a==null)n(u.el=l(u.children),g,_);else{const b=u.el=a.el;u.children!==a.children&&p(b,u.children)}},K=(a,u,g,_)=>{a==null?n(u.el=c(u.children||""),g,_):u.el=a.el},$=(a,u,g,_)=>{[a.el,a.anchor]=B(a.children,u,g,_,a.el,a.anchor)},W=({el:a,anchor:u},g,_)=>{let b;for(;a&&a!==u;)b=P(a),n(a,g,_),a=b;n(u,g,_)},R=({el:a,anchor:u})=>{let g;for(;a&&a!==u;)g=P(a),i(a),a=g;i(u)},G=(a,u,g,_,b,v,T,C,S)=>{if(u.type==="svg"?T="svg":u.type==="math"&&(T="mathml"),a==null)be(u,g,_,b,v,T,C,S);else{const x=a.el&&a.el._isVueCE?a.el:null;try{x&&x._beginPatch(),Se(a,u,b,v,T,C,S)}finally{x&&x._endPatch()}}},be=(a,u,g,_,b,v,T,C)=>{let S,x;const{props:I,shapeFlag:E,transition:M,dirs:L}=a;if(S=a.el=r(a.type,v,I&&I.is,I),E&8?f(S,a.children):E&16&&je(a.children,S,null,_,b,Hs(a,v),T,C),L&>(a,null,_,"created"),we(S,a,a.scopeId,T,_),I){for(const w in I)w!=="value"&&!Nt(w)&&o(S,w,null,I[w],v,_);"value"in I&&o(S,"value",null,I.value,v),(x=I.onVnodeBeforeMount)&&He(x,_,a)}L&>(a,null,_,"beforeMount");const V=qr(b,M);V&&M.beforeEnter(S),n(S,u,g),((x=I&&I.onVnodeMounted)||V||L)&&me(()=>{try{x&&He(x,_,a),V&&M.enter(S),L&>(a,null,_,"mounted")}finally{}},b)},we=(a,u,g,_,b)=>{if(g&&A(a,g),_)for(let v=0;v<_.length;v++)A(a,_[v]);if(b){let v=b.subTree;if(u===v||no(v.type)&&(v.ssContent===u||v.ssFallback===u)){const T=b.vnode;we(a,T,T.scopeId,T.slotScopeIds,b.parent)}}},je=(a,u,g,_,b,v,T,C,S=0)=>{for(let x=S;x{const C=u.el=a.el;let{patchFlag:S,dynamicChildren:x,dirs:I}=u;S|=a.patchFlag&16;const E=a.props||ee,M=u.props||ee;let L;if(g&&mt(g,!1),(L=M.onVnodeBeforeUpdate)&&He(L,g,u,a),I&>(u,a,g,"beforeUpdate"),g&&mt(g,!0),x&&(!a.dynamicChildren||a.dynamicChildren.length!==x.length)&&(S=0,T=!1,x=null),(E.innerHTML&&M.innerHTML==null||E.textContent&&M.textContent==null)&&f(C,""),x?ge(a.dynamicChildren,x,C,g,_,Hs(u,b),v):T||X(a,u,C,null,g,_,Hs(u,b),v,!1),S>0){if(S&16)oe(C,E,M,g,b);else if(S&2&&E.class!==M.class&&o(C,"class",null,M.class,b),S&4&&o(C,"style",E.style,M.style,b),S&8){const V=u.dynamicProps;for(let w=0;w{L&&He(L,g,u,a),I&>(u,a,g,"updated")},_)},ge=(a,u,g,_,b,v,T)=>{for(let C=0;C{if(u!==g){if(u!==ee)for(const v in u)!Nt(v)&&!(v in g)&&o(a,v,u[v],null,b,_);for(const v in g){if(Nt(v))continue;const T=g[v],C=u[v];T!==C&&v!=="value"&&o(a,v,C,T,b,_)}"value"in g&&o(a,"value",u.value,g.value,b)}},Ue=(a,u,g,_,b,v,T,C,S)=>{const x=u.el=a?a.el:l(""),I=u.anchor=a?a.anchor:l("");let{patchFlag:E,dynamicChildren:M,slotScopeIds:L}=u;L&&(C=C?C.concat(L):L),a==null?(n(x,g,_),n(I,g,_),je(u.children||[],g,I,b,v,T,C,S)):E>0&&E&64&&M&&a.dynamicChildren&&a.dynamicChildren.length===M.length?(ge(a.dynamicChildren,M,g,b,v,T,C),(u.key!=null||b&&u===b.subTree)&&eo(a,u,!0)):X(a,u,g,I,b,v,T,C,S)},Oe=(a,u,g,_,b,v,T,C,S)=>{u.slotScopeIds=C,a==null?u.shapeFlag&512?b.ctx.activate(u,g,_,T,S):ae(u,g,_,b,v,T,S):Me(a,u,S)},ae=(a,u,g,_,b,v,T)=>{const C=a.component=il(a,_,b);if(Ui(a)&&(C.ctx.renderer=ht),rl(C,!1,T),C.asyncDep){if(b&&b.registerDep(C,se,T),!a.el){const S=C.subTree=_e(ut);K(null,S,u,g),a.placeholder=S.el}}else se(C,a,u,g,b,v,T)},Me=(a,u,g)=>{const _=u.component=a.component;if(jr(a,u,g))if(_.asyncDep&&!_.asyncResolved){Y(_,u,g);return}else _.next=u,_.update();else u.el=a.el,_.vnode=u},se=(a,u,g,_,b,v,T)=>{const C=()=>{if(a.isMounted){let{next:E,bu:M,u:L,parent:V,vnode:w}=a;{const $e=to(a);if($e){E&&(E.el=w.el,Y(a,E,T)),$e.asyncDep.then(()=>{me(()=>{a.isUnmounted||x()},b)});return}}let d=E,h;mt(a,!1),E?(E.el=w.el,Y(a,E,T)):E=w,M&&cs(M),(h=E.props&&E.props.onVnodeBeforeUpdate)&&He(h,V,E,w),mt(a,!0);const k=jn(a),ie=a.subTree;a.subTree=k,O(ie,k,m(ie.el),pt(ie),a,b,v),E.el=k.el,d===null&&Ur(a,k.el),L&&me(L,b),(h=E.props&&E.props.onVnodeUpdated)&&me(()=>He(h,V,E,w),b)}else{let E;const{el:M,props:L}=u,{bm:V,m:w,parent:d,root:h,type:k}=a,ie=Kt(u);mt(a,!1),V&&cs(V),!ie&&(E=L&&L.onVnodeBeforeMount)&&He(E,d,u),mt(a,!0);{h.ce&&h.ce._hasShadowRoot()&&h.ce._injectChildStyle(k,a.parent?a.parent.type:void 0);const $e=a.subTree=jn(a);O(null,$e,g,_,a,b,v),u.el=$e.el}if(w&&me(w,b),!ie&&(E=L&&L.onVnodeMounted)){const $e=u;me(()=>He(E,d,$e),b)}(u.shapeFlag&256||d&&Kt(d.vnode)&&d.vnode.shapeFlag&256)&&a.a&&me(a.a,b),a.isMounted=!0,u=g=_=null}};a.scope.on();const S=a.effect=new hi(C);a.scope.off();const x=a.update=S.run.bind(S),I=a.job=S.runIfDirty.bind(S);I.i=a,I.id=a.uid,S.scheduler=()=>bn(I),mt(a,!0),x()},Y=(a,u,g)=>{u.component=a;const _=a.vnode.props;a.vnode=u,a.next=null,Nr(a,u.props,_,g),Kr(a,u.children,g),Je(),On(a),ze()},X=(a,u,g,_,b,v,T,C,S=!1)=>{const x=a&&a.children,I=a?a.shapeFlag:0,E=u.children,{patchFlag:M,shapeFlag:L}=u;if(M>0){if(M&128){_t(x,E,g,_,b,v,T,C,S);return}else if(M&256){Ie(x,E,g,_,b,v,T,C,S);return}}L&8?(I&16&&dt(x,b,v),E!==x&&f(g,E)):I&16?L&16?_t(x,E,g,_,b,v,T,C,S):dt(x,b,v,!0):(I&8&&f(g,""),L&16&&je(E,g,_,b,v,T,C,S))},Ie=(a,u,g,_,b,v,T,C,S)=>{a=a||Ct,u=u||Ct;const x=a.length,I=u.length,E=Math.min(x,I);let M;for(M=0;MI?dt(a,b,v,!0,!1,E):je(u,g,_,b,v,T,C,S,E)},_t=(a,u,g,_,b,v,T,C,S)=>{let x=0;const I=u.length;let E=a.length-1,M=I-1;for(;x<=E&&x<=M;){const L=a[x],V=u[x]=S?tt(u[x]):Ke(u[x]);if(Ft(L,V))O(L,V,g,null,b,v,T,C,S);else break;x++}for(;x<=E&&x<=M;){const L=a[E],V=u[M]=S?tt(u[M]):Ke(u[M]);if(Ft(L,V))O(L,V,g,null,b,v,T,C,S);else break;E--,M--}if(x>E){if(x<=M){const L=M+1,V=LM)for(;x<=E;)ve(a[x],b,v,!0),x++;else{const L=x,V=x,w=new Map;for(x=V;x<=M;x++){const ye=u[x]=S?tt(u[x]):Ke(u[x]);ye.key!=null&&w.set(ye.key,x)}let d,h=0;const k=M-V+1;let ie=!1,$e=0;const Rt=new Array(k);for(x=0;x=k){ve(ye,b,v,!0);continue}let Ne;if(ye.key!=null)Ne=w.get(ye.key);else for(d=V;d<=M;d++)if(Rt[d-V]===0&&Ft(ye,u[d])){Ne=d;break}Ne===void 0?ve(ye,b,v,!0):(Rt[Ne-V]=x+1,Ne>=$e?$e=Ne:ie=!0,O(ye,u[Ne],g,null,b,v,T,C,S),h++)}const Sn=ie?Jr(Rt):Ct;for(d=Sn.length-1,x=k-1;x>=0;x--){const ye=V+x,Ne=u[ye],Cn=u[ye+1],Tn=ye+1{const{el:v,type:T,transition:C,children:S,shapeFlag:x}=a;if(x&6){Ye(a.component.subTree,u,g,_);return}if(x&128){a.suspense.move(u,g,_);return}if(x&64){T.move(a,u,g,ht);return}if(T===re){n(v,u,g);for(let E=0;EC.enter(v),b));else{const{leave:E,delayLeave:M,afterLeave:L}=C,V=()=>{a.ctx.isUnmounted?i(v):n(v,u,g)},w=()=>{const d=v._isLeaving||!!v[$s];v._isLeaving&&v[$s](!0),C.persisted&&!d?V():E(v,()=>{V(),L&&L()})};M?M(v,V,w):w()}else n(v,u,g)},ve=(a,u,g,_=!1,b=!1)=>{const{type:v,props:T,ref:C,children:S,dynamicChildren:x,shapeFlag:I,patchFlag:E,dirs:M,cacheIndex:L,memo:V}=a;if(E===-2&&(b=!1),C!=null&&(Je(),Bt(C,null,g,a,!0),ze()),L!=null&&(u.renderCache[L]=void 0),I&256){u.ctx.deactivate(a);return}const w=I&1&&M,d=!Kt(a);let h;if(d&&(h=T&&T.onVnodeBeforeUnmount)&&He(h,u,a),I&6)Xe(a.component,g,_);else{if(I&128){a.suspense.unmount(g,_);return}w&>(a,null,u,"beforeUnmount"),I&64?a.type.remove(a,u,g,ht,_):x&&!x.hasOnce&&(v!==re||E>0&&E&64)?dt(x,u,g,!1,!0):(v===re&&E&384||!b&&I&16)&&dt(S,u,g),_&&ss(a)}const k=V!=null&&L==null;(d&&(h=T&&T.onVnodeUnmounted)||w||k)&&me(()=>{h&&He(h,u,a),w&>(a,null,u,"unmounted"),k&&(a.el=null)},g)},ss=a=>{const{type:u,el:g,anchor:_,transition:b}=a;if(u===re){Is(g,_);return}if(u===fs){R(a);return}const v=()=>{i(g),b&&!b.persisted&&b.afterLeave&&b.afterLeave()};if(a.shapeFlag&1&&b&&!b.persisted){const{leave:T,delayLeave:C}=b,S=()=>T(g,v);C?C(a.el,v,S):S()}else v()},Is=(a,u)=>{let g;for(;a!==u;)g=P(a),i(a),a=g;i(u)},Xe=(a,u,g)=>{const{bum:_,scope:b,job:v,subTree:T,um:C,m:S,a:x}=a;Nn(S),Nn(x),_&&cs(_),b.stop(),v&&(v.flags|=8,ve(T,a,u,g)),C&&me(C,u),me(()=>{a.isUnmounted=!0},u)},dt=(a,u,g,_=!1,b=!1,v=0)=>{for(let T=v;T{if(a.shapeFlag&6)return pt(a.component.subTree);if(a.shapeFlag&128)return a.suspense.next();const u=P(a.anchor||a.el),g=u&&u[ur];return g?P(g):u};let It=!1;const ns=(a,u,g)=>{let _;a==null?u._vnode&&(ve(u._vnode,null,null,!0),_=u._vnode.component):O(u._vnode||null,a,u,null,null,null,g),u._vnode=a,It||(It=!0,On(_),Ii(),It=!1)},ht={p:O,um:ve,m:Ye,r:ss,mt:ae,mc:je,pc:X,pbc:ge,n:pt,o:e};return{render:ns,hydrate:void 0,createApp:Mr(ns)}}function Hs({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function mt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function qr(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function eo(e,t,s=!1){const n=e.children,i=t.children;if(j(n)&&j(i))for(let o=0;o>1,e[s[l]]0&&(t[n]=s[o-1]),s[o]=n)}}for(o=s.length,r=s[o-1];o-- >0;)s[o]=r,r=t[r];return s}function to(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:to(t)}function Nn(e){if(e)for(let t=0;te.__isSuspense;function zr(e,t){t&&t.pendingBranch?j(e)?t.effects.push(...e):t.effects.push(e):ir(e)}const re=Symbol.for("v-fgt"),Os=Symbol.for("v-txt"),ut=Symbol.for("v-cmt"),fs=Symbol.for("v-stc"),Gt=[];let xe=null;function D(e=!1){Gt.push(xe=e?null:[])}function Yr(){Gt.pop(),xe=Gt[Gt.length-1]||null}let Yt=1;function Hn(e,t=!1){Yt+=e,e<0&&xe&&t&&(xe.hasOnce=!0)}function io(e){return e.dynamicChildren=Yt>0?xe||Ct:null,Yr(),Yt>0&&xe&&xe.push(e),e}function F(e,t,s,n,i,o){return io(y(e,t,s,n,i,o,!0))}function Xr(e,t,s,n,i){return io(_e(e,t,s,n,i,!0))}function oo(e){return e?e.__v_isVNode===!0:!1}function Ft(e,t){return e.type===t.type&&e.key===t.key}const ro=({key:e})=>e??null,ds=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?ne(e)||ue(e)||N(e)?{i:Pe,r:e,k:t,f:!!s}:e:null);function y(e,t=null,s=null,n=0,i=null,o=e===re?0:1,r=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&ro(t),ref:t&&ds(t),scopeId:Di,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Pe};return l?(vs(c,s),o&128&&e.normalize(c)):s&&(c.shapeFlag|=ne(s)?8:16),Yt>0&&!r&&xe&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&xe.push(c),c}const _e=Zr;function Zr(e,t=null,s=null,n=0,i=null,o=!1){if((!e||e===Sr)&&(e=ut),oo(e)){const l=At(e,t,!0);return s&&vs(l,s),Yt>0&&!o&&xe&&(l.shapeFlag&6?xe[xe.indexOf(e)]=l:xe.push(l)),l.patchFlag=-2,l}if(ul(e)&&(e=e.__vccOpts),t){t=Qr(t);let{class:l,style:c}=t;l&&!ne(l)&&(t.class=Ee(l)),Z(c)&&(mn(c)&&!j(c)&&(c=fe({},c)),t.style=ln(c))}const r=ne(e)?1:no(e)?128:fr(e)?64:Z(e)?4:N(e)?2:0;return y(e,t,s,n,i,r,o,!0)}function Qr(e){return e?mn(e)||Ji(e)?fe({},e):e:null}function At(e,t,s=!1,n=!1){const{props:i,ref:o,patchFlag:r,children:l,transition:c}=e,p=t?tl(i||{},t):i,f={__v_isVNode:!0,__v_skip:!0,type:e.type,props:p,key:p&&ro(p),ref:t&&t.ref?s&&o?j(o)?o.concat(ds(t)):[o,ds(t)]:ds(t):o,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==re?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&At(e.ssContent),ssFallback:e.ssFallback&&At(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&vn(f,c.clone(f)),f}function Te(e=" ",t=0){return _e(Os,null,e,t)}function el(e,t){const s=_e(fs,null,e);return s.staticCount=t,s}function Q(e="",t=!1){return t?(D(),Xr(ut,null,e)):_e(ut,null,e)}function Ke(e){return e==null||typeof e=="boolean"?_e(ut):j(e)?_e(re,null,e.slice()):oo(e)?tt(e):_e(Os,null,String(e))}function tt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:At(e)}function vs(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(j(t))s=16;else if(typeof t=="object")if(n&65){const i=t.default;i&&(i._c&&(i._d=!1),vs(e,i()),i._c&&(i._d=!0));return}else{s=32;const i=t._;!i&&!Ji(t)?t._ctx=Pe:i===3&&Pe&&(Pe.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(N(t)){if(n&65){vs(e,{default:t});return}t={default:t,_ctx:Pe},s=32}else t=String(t),n&64?(s=16,t=[Te(t)]):s=8;e.children=t,e.shapeFlag|=s}function tl(...e){const t={};for(let s=0;she||Pe;let ys,tn;{const e=Ts(),t=(s,n)=>{let i;return(i=e[s])||(i=e[s]=[]),i.push(n),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};ys=t("__VUE_INSTANCE_SETTERS__",s=>he=s),tn=t("__VUE_SSR_SETTERS__",s=>Xt=s)}const ts=e=>{const t=he;return ys(e),e.scope.on(),()=>{e.scope.off(),ys(t)}},Vn=()=>{he&&he.scope.off(),ys(null)};function lo(e){return e.vnode.shapeFlag&4}let Xt=!1;function rl(e,t=!1,s=!1){t&&tn(t);const{props:n,children:i}=e.vnode,o=lo(e);$r(e,n,o,t),Br(e,i,s||t);const r=o?ll(e,t):void 0;return t&&tn(!1),r}function ll(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Cr);const{setup:n}=s;if(n){Je();const i=e.setupContext=n.length>1?cl(e):null,o=ts(e),r=es(n,e,0,[e.props,i]),l=ri(r);if(ze(),o(),(l||e.sp)&&!Kt(e)&&ji(e),l){if(r.then(Vn,Vn),t)return r.then(c=>{Bn(e,c)}).catch(c=>{Ps(c,e,0)});e.asyncDep=r}else Bn(e,r)}else ao(e)}function Bn(e,t,s){N(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Z(t)&&(e.setupState=ki(t)),ao(e)}function ao(e,t,s){const n=e.type;e.render||(e.render=n.render||Ge);{const i=ts(e);Je();try{Tr(e)}finally{ze(),i()}}}const al={get(e,t){return ce(e,"get",""),e[t]}};function cl(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,al),slots:e.slots,emit:e.emit,expose:t}}function Ms(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ki(Jo(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Wt)return Wt[s](e)},has(t,s){return s in t||s in Wt}})):e.proxy}function ul(e){return N(e)&&"__vccOpts"in e}const co=(e,t)=>Qo(e,t,Xt),fl="3.5.39";/** -* @vue/runtime-dom v3.5.39 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let sn;const Kn=typeof window<"u"&&window.trustedTypes;if(Kn)try{sn=Kn.createPolicy("vue",{createHTML:e=>e})}catch{}const uo=sn?e=>sn.createHTML(e):e=>e,dl="http://www.w3.org/2000/svg",pl="http://www.w3.org/1998/Math/MathML",Qe=typeof document<"u"?document:null,Wn=Qe&&Qe.createElement("template"),hl={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const i=t==="svg"?Qe.createElementNS(dl,e):t==="mathml"?Qe.createElementNS(pl,e):s?Qe.createElement(e,{is:s}):Qe.createElement(e);return e==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:e=>Qe.createTextNode(e),createComment:e=>Qe.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Qe.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,i,o){const r=s?s.previousSibling:t.lastChild;if(i&&(i===o||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),s),!(i===o||!(i=i.nextSibling)););else{Wn.innerHTML=uo(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const l=Wn.content;if(n==="svg"||n==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,s)}return[r?r.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},gl=Symbol("_vtc");function ml(e,t,s){const n=e[gl];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const xs=Symbol("_vod"),fo=Symbol("_vsh"),Vs={name:"show",beforeMount(e,{value:t},{transition:s}){e[xs]=e.style.display==="none"?"":e.style.display,s&&t?s.beforeEnter(e):Lt(e,t)},mounted(e,{value:t},{transition:s}){s&&t&&s.enter(e)},updated(e,{value:t,oldValue:s},{transition:n}){!t!=!s&&(n?t?(n.beforeEnter(e),Lt(e,!0),n.enter(e)):n.leave(e,()=>{Lt(e,!1)}):Lt(e,t))},beforeUnmount(e,{value:t}){Lt(e,t)}};function Lt(e,t){e.style.display=t?e[xs]:"none",e[fo]=!t}const bl=Symbol(""),vl=/(?:^|;)\s*display\s*:/;function yl(e,t,s){const n=e.style,i=ne(s);let o=!1;if(s&&!i){if(t)if(ne(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();s[l]==null&&$t(n,l,"")}else for(const r in t)s[r]==null&&$t(n,r,"");for(const r in s){r==="display"&&(o=!0);const l=s[r];l!=null?_l(e,r,!ne(t)&&t?t[r]:void 0,l)||$t(n,r,l):$t(n,r,"")}}else if(i){if(t!==s){const r=n[bl];r&&(s+=";"+r),n.cssText=s,o=vl.test(s)}}else t&&e.removeAttribute("style");xs in e&&(e[xs]=o?n.display:"",e[fo]&&(n.display="none"))}const Gn=/\s*!important$/;function $t(e,t,s){if(j(s))s.forEach(n=>$t(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=xl(e,t);Gn.test(s)?e.setProperty(xt(n),s.replace(Gn,""),"important"):e[n]=s}}const qn=["Webkit","Moz","ms"],Bs={};function xl(e,t){const s=Bs[t];if(s)return s;let n=Re(t);if(n!=="filter"&&n in e)return Bs[t]=n;n=ci(n);for(let i=0;iKs||(Pl.then(()=>Ks=0),Ks=Date.now());function Al(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;const i=s.value;if(j(i)){const o=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{o.call(n),n._stopped=!0};const r=i.slice(),l=[n];for(let c=0;ce.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ol=(e,t,s,n,i,o)=>{const r=i==="svg";t==="class"?ml(e,n,r):t==="style"?yl(e,s,n):_s(t)?ws(t)||Sl(e,t,s,n,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ml(e,t,n,r))?(Yn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&zn(e,t,n,r,o,t!=="value")):e._isVueCE&&(Il(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!ne(n)))?Yn(e,Re(t),n,o,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),zn(e,t,n,r))};function Ml(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Zn(t)&&N(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return Zn(t)&&ne(s)?!1:t in e}function Il(e,t){const s=e._def.props;if(!s)return!1;const n=Re(t);return Array.isArray(s)?s.some(i=>Re(i)===n):Object.keys(s).some(i=>Re(i)===n)}const ft=e=>{const t=e.props["onUpdate:modelValue"]||!1;return j(t)?s=>cs(t,s):t};function Rl(e){e.target.composing=!0}function Qn(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Ae=Symbol("_assign");function ei(e,t,s){return t&&(e=e.trim()),s&&(e=Cs(e)),e}const et={created(e,{modifiers:{lazy:t,trim:s,number:n}},i){e[Ae]=ft(i);const o=n||i.props&&i.props.type==="number";it(e,t?"change":"input",r=>{r.target.composing||e[Ae](ei(e.value,s,o))}),(s||o)&&it(e,"change",()=>{e.value=ei(e.value,s,o)}),t||(it(e,"compositionstart",Rl),it(e,"compositionend",Qn),it(e,"change",Qn))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:i,number:o}},r){if(e[Ae]=ft(r),e.composing)return;const l=(o||e.type==="number")&&!/^0\d/.test(e.value)?Cs(e.value):e.value,c=t??"";if(l===c)return;const p=e.getRootNode();(p instanceof Document||p instanceof ShadowRoot)&&p.activeElement===e&&e.type!=="range"&&(n&&t===s||i&&e.value.trim()===c)||(e.value=c)}},Dl={deep:!0,created(e,t,s){e[Ae]=ft(s),it(e,"change",()=>{const n=e._modelValue,i=Ot(e),o=e.checked,r=e[Ae];if(j(n)){const l=an(n,i),c=l!==-1;if(o&&!c)r(n.concat(i));else if(!o&&c){const p=[...n];p.splice(l,1),r(p)}}else if(Mt(n)){const l=new Set(n);o?l.add(i):l.delete(i),r(l)}else r(ho(e,o))})},mounted:ti,beforeUpdate(e,t,s){e[Ae]=ft(s),ti(e,t,s)}};function ti(e,{value:t,oldValue:s},n){e._modelValue=t;let i;if(j(t))i=an(t,n.props.value)>-1;else if(Mt(t))i=t.has(n.props.value);else{if(t===s)return;i=ct(t,ho(e,!0))}e.checked!==i&&(e.checked=i)}const Fl={created(e,{value:t},s){e.checked=ct(t,s.props.value),e[Ae]=ft(s),it(e,"change",()=>{e[Ae](Ot(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[Ae]=ft(n),t!==s&&(e.checked=ct(t,n.props.value))}},po={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const i=Mt(t);it(e,"change",()=>{const o=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>s?Cs(Ot(r)):Ot(r));e[Ae](e.multiple?i?new Set(o):o:o[0]),e._assigning=!0,Oi(()=>{e._assigning=!1})}),e[Ae]=ft(n)},mounted(e,{value:t}){si(e,t)},beforeUpdate(e,t,s){e[Ae]=ft(s)},updated(e,{value:t}){e._assigning||si(e,t)}};function si(e,t){const s=e.multiple,n=j(t);if(!(s&&!n&&!Mt(t))){for(let i=0,o=e.options.length;iString(p)===String(l)):r.selected=an(t,l)>-1}else r.selected=t.has(l);else if(ct(Ot(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ot(e){return"_value"in e?e._value:e.value}function ho(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Ll={created(e,t,s){ls(e,t,s,null,"created")},mounted(e,t,s){ls(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){ls(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){ls(e,t,s,n,"updated")}};function jl(e,t){switch(e){case"SELECT":return po;case"TEXTAREA":return et;default:switch(t){case"checkbox":return Dl;case"radio":return Fl;default:return et}}}function ls(e,t,s,n,i){const r=jl(e.tagName,s.props&&s.props.type)[i];r&&r(e,t,s,n)}const Ul=["ctrl","shift","alt","meta"],$l={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Ul.some(s=>e[`${s}Key`]&&!t.includes(s))},Nl=(e,t)=>{if(!e)return e;const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=((i,...o)=>{for(let r=0;r{const t=Vl().createApp(...e),{mount:s}=t;return t.mount=n=>{const i=Wl(n);if(!i)return;const o=t._component;!N(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=s(i,!1,Kl(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t});function Kl(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wl(e){return ne(e)?document.querySelector(e):e}const go="pilotvault-theme";function Gl(){try{return localStorage.getItem(go)==="dark"?"dark":"light"}catch{return"light"}}const Zt=z(Gl());function mo(e){Zt.value=e,document.documentElement.setAttribute("data-theme",e);try{localStorage.setItem(go,e)}catch{}}function ii(){mo(Zt.value==="dark"?"light":"dark")}mo(Zt.value);const ql={class:"overflow-hidden rounded-lg border border-subtle bg-card shadow-xs"},Jl={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},zl={class:"text-base font-semibold text-primary"},Yl={class:"pv-eyebrow"},Xl={class:"w-full text-left text-sm"},Zl={class:"border-t border-subtle px-5 py-2.5 font-mono text-xs whitespace-nowrap"},Ql={class:"text-primary"},ea={class:"border-t border-subtle px-5 py-2.5 text-secondary"},Ws={__name:"EndpointTable",props:{title:String,auth:String,endpoints:Array},setup(e){const t={GET:"text-success",POST:"text-brand-text",PATCH:"text-warning",DELETE:"text-danger"};return(s,n)=>(D(),F("div",ql,[y("div",Jl,[y("div",zl,U(e.title),1),y("span",Yl,U(e.auth),1)]),y("table",Xl,[n[0]||(n[0]=y("thead",null,[y("tr",{class:"pv-eyebrow"},[y("th",{class:"px-5 py-2.5 font-medium"},"Endpoint"),y("th",{class:"px-5 py-2.5 font-medium"},"Description")])],-1)),y("tbody",null,[(D(!0),F(re,null,lt(e.endpoints,i=>(D(),F("tr",{key:i.method+i.path,class:"transition-colors hover:bg-sunken"},[y("td",Zl,[y("span",{class:Ee(["font-semibold",t[i.method]])},U(i.method),3),y("span",Ql,U(i.path),1)]),y("td",ea,U(i.desc),1)]))),128))])])]))}},ta={class:"mx-auto flex max-w-5xl flex-col gap-6 px-6 pt-12 pb-16"},sa={class:"flex items-center gap-3"},na={key:0,class:"pv-eyebrow hidden truncate sm:inline"},ia=["title"],oa={key:0,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},ra={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},la={key:0,class:"rounded-lg border border-subtle bg-card px-5 py-10 text-center shadow-sm"},aa={key:1,class:"mx-auto w-full max-w-sm rounded-lg border border-subtle bg-card shadow-sm"},ca={class:"flex flex-col gap-1"},ua={class:"flex flex-col gap-1"},fa={key:0,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},da=["disabled"],pa={class:"flex gap-1 self-start rounded-lg border border-subtle bg-card p-1 shadow-sm"},ha=["onClick"],ga={class:"flex flex-col gap-6"},ma={class:"rounded-lg border border-subtle bg-card shadow-sm"},ba={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},va={class:"pv-eyebrow"},ya={class:"min-w-0"},xa={class:"text-sm font-semibold text-primary"},_a={key:0,class:"truncate font-mono text-xs text-secondary"},wa={class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5"},Sa={class:"font-mono text-xs text-secondary"},Ca={class:"flex flex-col gap-6"},Ta={class:"rounded-lg border border-subtle bg-card shadow-sm"},Ea={class:"flex items-center justify-between border-b border-subtle px-5 py-4"},Pa={class:"flex flex-col gap-3 px-5 py-5"},ka={class:"flex flex-col gap-1"},Aa={class:"flex flex-col gap-1"},Oa={class:"flex flex-col gap-1"},Ma=["placeholder"],Ia={key:0,class:"font-mono text-[11px] text-muted"},Ra={key:0},Da={key:1},Fa={key:1,class:"rounded-sm bg-danger-tint px-3 py-2 text-xs font-medium text-danger"},La={key:2,class:"rounded-sm bg-success-tint px-3 py-2 text-xs font-medium text-success"},ja={class:"flex flex-wrap items-center gap-2"},Ua=["disabled"],$a=["disabled"],Na={class:"flex flex-col gap-6"},Ha={class:"rounded-lg border border-subtle bg-card shadow-sm"},Va={class:"flex flex-col"},Ba={key:0,class:"px-5 py-3 text-xs font-medium text-danger"},Ka={key:1,class:"border-b border-subtle bg-sunken px-5 py-2.5 font-mono text-xs text-secondary"},Wa={key:2,class:"px-5 py-6 text-sm text-secondary"},Ga={key:3,class:"flex gap-1 overflow-x-auto overflow-y-hidden border-b border-subtle px-3 pt-1"},qa=["onClick"],Ja={key:4,class:"px-5 py-6 text-sm text-secondary"},za={class:"flex flex-wrap items-center gap-x-3 gap-y-2"},Ya={class:"min-w-0 flex-1"},Xa={class:"flex flex-wrap items-center gap-2"},Za={class:"text-sm font-semibold text-primary"},Qa=["title"],ec={key:0},tc={class:"mt-0.5 font-mono text-xs text-secondary"},sc={key:0,class:"mt-0.5 text-[11px] text-secondary"},nc={key:1,class:"mt-2 flex flex-col gap-1.5"},ic={class:"rounded-sm bg-sunken px-1.5 py-0.5 font-mono text-[10px] text-secondary"},oc={key:0,class:"font-mono text-[10px] text-muted"},rc={key:1,class:"w-full text-[11px] text-secondary sm:w-auto"},lc={key:2,class:"mt-1 truncate font-mono text-[11px] text-muted"},ac={class:"flex shrink-0 items-center gap-2"},cc=["disabled","onClick"],uc=["onClick"],fc=["disabled","onClick"],dc=["disabled","onClick"],pc={key:0,class:"mt-3 flex flex-col gap-2 rounded-md border border-subtle bg-sunken px-4 py-4"},hc={class:"pv-eyebrow"},gc={key:0,class:"text-danger"},mc=["onUpdate:modelValue"],bc=["value"],vc=["onUpdate:modelValue","type","placeholder"],yc={key:2,class:"text-[11px] text-muted"},xc={class:"flex items-center gap-2"},_c=["disabled","onClick"],wc={class:"border-t border-subtle px-5 py-4"},Sc={class:"flex flex-col gap-2 sm:flex-row"},Cc=["disabled"],Tc={key:0,class:"mt-2 text-xs font-medium text-danger"},as="pv_panel_token",Ec={__name:"App",setup(e){const t=z(localStorage.getItem(as)||""),s=z(null),n=z(!1),i=z(!0),o=z({email:"",password:""}),r=z(""),l=z(!1),c=z("overview"),p=[{id:"overview",label:"Overview"},{id:"pocketbase",label:"PocketBase"},{id:"plugins",label:"Plugins"}];async function f(w){try{const d=await fetch("/api/me",{headers:{Authorization:w}});if(!d.ok)return!1;const h=await d.json();return h.role!=="superadmin"?!1:(s.value={email:h.email,role:h.role},!0)}catch{return!1}}async function m(w){t.value=w,localStorage.setItem(as,w),n.value=!0,I(),be(),Xe()}async function P(){r.value="";const w=o.value.email.trim().toLowerCase();if(!w||!o.value.password){r.value="Enter your email and password.";return}l.value=!0;try{const d=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:w,password:o.value.password})}),h=await d.json().catch(()=>({}));if(!d.ok||!h.token){r.value="Invalid email or password.";return}if(!await f(h.token)){r.value="Access to this panel is restricted to superadmins.";return}o.value.password="",await m(h.token)}catch{r.value="Cannot reach the API server."}finally{l.value=!1}}function A(){E(),localStorage.removeItem(as),t.value="",s.value=null,n.value=!1}const B=z(null),O=z({url:"",adminEmail:"",adminPassword:""}),H=z(null),K=z(""),$=z(""),W=z(!1),R=z(!1);function G(w){const d={Authorization:t.value};return w&&(d["Content-Type"]="application/json"),d}async function be(){try{const w=await fetch("/api/admin/pb-config",{headers:G()});if(!w.ok)return;const d=await w.json();B.value=d,O.value={url:d.url||"",adminEmail:d.adminEmail||"",adminPassword:""},H.value=d.probe||null}catch{}}async function we(){K.value="",$.value="",R.value=!0;try{const w=await fetch("/api/admin/pb-config/test",{method:"POST",headers:G(!0),body:JSON.stringify(O.value)});H.value=await w.json()}catch{$.value="Could not run the test."}finally{R.value=!1}}async function je(){var w;if(K.value="",$.value="",!O.value.url.trim()){$.value="A PocketBase URL is required.";return}W.value=!0;try{const d=await fetch("/api/admin/pb-config",{method:"PUT",headers:G(!0),body:JSON.stringify(O.value)}),h=await d.json().catch(()=>({}));if(!d.ok){$.value=h.error||"Could not save the connection.";return}B.value=h.config,H.value=((w=h.config)==null?void 0:w.probe)||null,O.value={url:h.config.url,adminEmail:h.config.adminEmail,adminPassword:""},K.value=h.warning||"Connection saved."}catch{$.value="Could not reach the API server."}finally{W.value=!1}}const Se=z([]),ge=z(""),oe=z(""),Ue=z(""),Oe=z({}),ae=z(""),Me=z({name:"",baseURL:"",provider:""}),se=z(""),Y=z(!1),X=[{id:"apis-external",label:"APIs — External"},{id:"drives-external",label:"Drives — External"},{id:"drives-local",label:"Drives — Local"}],Ie=z("apis-external");function _t(w){return w.category||"apis-external"}function Ye(w){return Se.value.filter(d=>_t(d)===w)}const ve=co(()=>Ye(Ie.value)),ss={builtin:"bg-success-tint text-success",external:"bg-warning-tint text-warning"},Is={ok:"bg-success-tint text-success",degraded:"bg-warning-tint text-warning",down:"bg-danger-tint text-danger"};async function Xe(){ge.value="";try{const w=await fetch("/api/admin/plugins",{headers:G()});if(!w.ok){ge.value="Could not load plugins.";return}const d=await w.json();Se.value=d.plugins||[];for(const h of Se.value)h.enabled&&!h.health&&dt(h.name)}catch{ge.value="Could not reach the API server."}}async function dt(w){try{const d=await fetch(`/api/admin/plugins/${encodeURIComponent(w)}/health`,{method:"POST",headers:G()}),h=await d.json().catch(()=>({}));if(d.ok&&h.health){const k=pt(w);k&&(k.health=h.health)}}catch{}}function pt(w){return Se.value.find(d=>d.name===w)}async function It(w){ae.value=w.name,oe.value="";try{const d=await fetch(`/api/admin/plugins/${encodeURIComponent(w.name)}`,{method:"PUT",headers:G(!0),body:JSON.stringify({enabled:!w.enabled})}),h=await d.json().catch(()=>({}));d.ok?h.warning&&(oe.value=`${w.name}: ${h.warning}`):oe.value=h.error||"Could not update the plugin.",await Xe()}finally{ae.value=""}}function ns(w){Ue.value=Ue.value===w.name?"":w.name;const d={...w.config||{}};for(const h of w.configFields||[])(d[h.key]===void 0||d[h.key]==="")&&h.default&&(d[h.key]=h.default);Oe.value=d}async function ht(w){ae.value=w.name,oe.value="";try{const d=await fetch(`/api/admin/plugins/${encodeURIComponent(w.name)}`,{method:"PUT",headers:G(!0),body:JSON.stringify({config:Oe.value})}),h=await d.json().catch(()=>({}));d.ok?(oe.value=h.warning?`${w.name}: ${h.warning}`:"Configuration saved.",Ue.value=""):oe.value=h.error||"Could not save the configuration.",await Xe()}finally{ae.value=""}}async function wn(w){ae.value=w.name,oe.value="";try{const d=await fetch(`/api/admin/plugins/${encodeURIComponent(w.name)}/health`,{method:"POST",headers:G()}),h=await d.json().catch(()=>({}));if(d.ok&&h.health){const k=pt(w.name);k&&(k.health=h.health)}else oe.value=h.error||"Health check failed."}finally{ae.value=""}}async function a(w){if(w.kind==="external"){ae.value=w.name;try{const d=await fetch(`/api/admin/plugins/${encodeURIComponent(w.name)}`,{method:"DELETE",headers:G()});if(!d.ok){const h=await d.json().catch(()=>({}));oe.value=h.error||"Could not remove the plugin."}await Xe()}finally{ae.value=""}}}async function u(){if(se.value="",!Me.value.name.trim()||!Me.value.baseURL.trim()){se.value="Name and base URL are required.";return}Y.value=!0;try{const w=await fetch("/api/admin/plugins",{method:"POST",headers:G(!0),body:JSON.stringify(Me.value)}),d=await w.json().catch(()=>({}));if(!w.ok){se.value=d.error||"Could not register the plugin.";return}Me.value={name:"",baseURL:"",provider:""},oe.value="External plugin registered.",await Xe()}catch{se.value="Could not reach the API server."}finally{Y.value=!1}}const g=z(null),_=z(null),b=z({apiServer:{status:"checking",detail:""},pocketBase:{status:"checking",detail:""},webApp:{status:"checking",detail:""}});let v=null;const T=[{key:"apiServer",label:"API server"},{key:"pocketBase",label:"PocketBase"},{key:"webApp",label:"Web App"}],C={checking:{label:"checking",cls:"bg-sunken text-secondary"},ok:{label:"operational",cls:"bg-success-tint text-success"},down:{label:"unreachable",cls:"bg-danger-tint text-danger"},unreachable:{label:"unreachable",cls:"bg-danger-tint text-danger"}};function S(w){const d=[];return typeof w.latencyMs=="number"&&d.push(w.latencyMs+"ms"),w.httpStatus&&d.push("HTTP "+w.httpStatus),w.url&&d.push(w.url),d.join(" · ")}async function x(){var w,d;try{const h=await fetch("/api/status");if(!h.ok)throw new Error("status "+h.status);const k=await h.json(),ie=k.apiServer||{};_.value=ie.devices??0,b.value={apiServer:{status:"ok",detail:""},pocketBase:{status:((w=k.pocketBase)==null?void 0:w.status)==="ok"?"ok":"down",detail:S(k.pocketBase||{})},webApp:{status:((d=k.webApp)==null?void 0:d.status)==="ok"?"ok":"down",detail:S(k.webApp||{})}}}catch{_.value=null,b.value={apiServer:{status:"unreachable",detail:""},pocketBase:{status:"unreachable",detail:""},webApp:{status:"unreachable",detail:""}}}g.value=new Date}function I(){x(),clearInterval(v),v=setInterval(x,1e4)}function E(){clearInterval(v),v=null}Ni(async()=>{t.value&&await f(t.value)?(n.value=!0,I(),be(),Xe()):t.value&&(localStorage.removeItem(as),t.value=""),i.value=!1}),yn(()=>E());const M=[{method:"POST",path:"/api/auth/login",desc:"Exchange email + password for a session (via PocketBase)"},{method:"GET",path:"/api/auth/validate",desc:"Validate the current session token"},{method:"GET",path:"/api/me",desc:"Caller's id, email, role, and organization from their token"},{method:"GET",path:"/api/preferences",desc:"Read the caller's saved settings blob"},{method:"PUT",path:"/api/preferences",desc:"Persist the caller's settings onto their user record"},{method:"GET",path:"/api/devices",desc:"List connected devices and last-known state"},{method:"GET",path:"/api/devices/{id}/track",desc:"GPS track history for a device"},{method:"POST",path:"/api/devices/{id}/command",desc:"Send a command down to a device"},{method:"DELETE",path:"/api/devices/{id}",desc:"Forget a device's stored state"},{method:"GET",path:"/ws/ui",desc:"Live telemetry stream (WebSocket)"}],L=[{method:"GET",path:"/api/users",desc:"List users (admin: own org · superadmin: all)"},{method:"POST",path:"/api/users",desc:"Create a user {email, password, role, organization?}"},{method:"PATCH",path:"/api/users/{id}",desc:"Edit a user (role/org changes are scope-checked)"},{method:"DELETE",path:"/api/users/{id}",desc:"Delete a user (not self; admins in-org only)"},{method:"GET",path:"/api/orgs",desc:"List organizations (admin: own · superadmin: all)"},{method:"POST",path:"/api/orgs",desc:"Create an organization {name} (superadmin)"},{method:"PATCH",path:"/api/orgs/{id}",desc:"Rename an organization (superadmin)"},{method:"DELETE",path:"/api/orgs/{id}",desc:"Delete an empty organization (superadmin)"},{method:"GET",path:"/api/admin/pb-config",desc:"Read the PocketBase connection + live probe (superadmin)"},{method:"POST",path:"/api/admin/pb-config/test",desc:"Test a candidate connection without applying (superadmin)"},{method:"PUT",path:"/api/admin/pb-config",desc:"Update + persist the PocketBase connection (superadmin)"},{method:"GET",path:"/api/admin/plugins",desc:"List plugins + state + last health (superadmin)"},{method:"POST",path:"/api/admin/plugins",desc:"Register an external plugin {name, baseURL} (superadmin)"},{method:"PUT",path:"/api/admin/plugins/{name}",desc:"Enable/disable + configure a plugin (superadmin)"},{method:"DELETE",path:"/api/admin/plugins/{name}",desc:"Remove an external plugin (superadmin)"},{method:"POST",path:"/api/admin/plugins/{name}/health",desc:"Run a plugin health check (superadmin)"}],V=[{method:"GET",path:"/ws/device?id={id}",desc:"Device telemetry uplink (WebSocket)"},{method:"POST",path:"/api/telemetry?id={id}",desc:"Push a single telemetry event over HTTP"},{method:"GET",path:"/healthz",desc:"Readiness probe"}];return(w,d)=>(D(),F("div",ta,[y("div",sa,[d[12]||(d[12]=el('
PilotVault
API server
',3)),n.value&&s.value?(D(),F("span",na,U(s.value.email),1)):Q("",!0),n.value?(D(),F("button",{key:1,class:"pv-btn-sec pv-btn-sm",onClick:A},"Sign out")):Q("",!0),y("button",{class:"pv-btn-sec pv-btn-sm",title:jt(Zt)==="dark"?"Switch to light theme":"Switch to dark theme",onClick:d[0]||(d[0]=(...h)=>jt(ii)&&jt(ii)(...h))},[jt(Zt)==="dark"?(D(),F("svg",oa,[...d[9]||(d[9]=[y("circle",{cx:"12",cy:"12",r:"4"},null,-1),y("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41"},null,-1)])])):(D(),F("svg",ra,[...d[10]||(d[10]=[y("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},null,-1)])])),d[11]||(d[11]=Te(" Theme ",-1))],8,ia)]),i.value?(D(),F("div",la,[...d[13]||(d[13]=[y("span",{class:"pv-eyebrow"},"Checking session…",-1)])])):n.value?(D(),F(re,{key:2},[y("div",pa,[(D(),F(re,null,lt(p,h=>y("button",{key:h.id,class:Ee(["rounded-md px-3.5 py-1.5 text-sm font-semibold transition",c.value===h.id?"bg-brand text-on-brand":"text-secondary hover:text-primary"]),onClick:k=>c.value=h.id},U(h.label),11,ha)),64))]),Ce(y("div",ga,[y("div",ma,[y("div",ba,[d[17]||(d[17]=y("div",{class:"text-base font-semibold text-primary"},"Status",-1)),y("span",va,U(g.value?"checked "+g.value.toLocaleTimeString():"—"),1)]),y("div",null,[(D(),F(re,null,lt(T,h=>y("div",{key:h.key,class:"flex items-center justify-between gap-3 border-t border-subtle px-5 py-3.5 first:border-t-0"},[y("div",ya,[y("div",xa,U(h.label),1),b.value[h.key].detail?(D(),F("div",_a,U(b.value[h.key].detail),1)):Q("",!0)]),y("span",{class:Ee(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",C[b.value[h.key].status].cls])},[d[18]||(d[18]=y("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Te(" "+U(C[b.value[h.key].status].label),1)],2)])),64)),y("div",wa,[d[19]||(d[19]=y("div",{class:"text-sm font-semibold text-primary"},"Devices",-1)),y("span",Sa,U(_.value===null?"—":_.value+" online"),1)])])]),_e(Ws,{title:"Client API",auth:"PocketBase session",endpoints:M}),_e(Ws,{title:"Management API",auth:"Admin · superadmin",endpoints:L}),_e(Ws,{title:"Device API",auth:"Device uplink",endpoints:V})],512),[[Vs,c.value==="overview"]]),Ce(y("div",Ca,[y("div",Ta,[y("div",Ea,[d[21]||(d[21]=y("div",null,[y("div",{class:"text-base font-semibold text-primary"},"PocketBase connection"),y("span",{class:"pv-eyebrow"},"Settings")],-1)),H.value?(D(),F("span",{key:0,class:Ee(["inline-flex shrink-0 items-center gap-1.5 rounded-sm px-2.5 py-1 font-mono text-xs font-medium",H.value.reachable?H.value.superuser?"bg-success-tint text-success":"bg-warning-tint text-warning":"bg-danger-tint text-danger"])},[d[20]||(d[20]=y("span",{class:"h-1.5 w-1.5 rounded-full bg-current"},null,-1)),Te(" "+U(H.value.reachable?H.value.superuser?"connected":"reachable":"unreachable"),1)],2)):Q("",!0)]),y("div",Pa,[y("label",ka,[d[22]||(d[22]=y("span",{class:"pv-eyebrow"},"PocketBase URL",-1)),Ce(y("input",{"onUpdate:modelValue":d[3]||(d[3]=h=>O.value.url=h),class:"pv-input",placeholder:"http://10.2.1.10:8026",spellcheck:"false"},null,512),[[et,O.value.url]])]),y("label",Aa,[d[23]||(d[23]=y("span",{class:"pv-eyebrow"},"Service account email",-1)),Ce(y("input",{"onUpdate:modelValue":d[4]||(d[4]=h=>O.value.adminEmail=h),class:"pv-input",placeholder:"admin@pilotvault.local",autocomplete:"off",spellcheck:"false"},null,512),[[et,O.value.adminEmail]])]),y("label",Oa,[d[24]||(d[24]=y("span",{class:"pv-eyebrow"},"Service account password",-1)),Ce(y("input",{"onUpdate:modelValue":d[5]||(d[5]=h=>O.value.adminPassword=h),type:"password",class:"pv-input",autocomplete:"new-password",placeholder:B.value&&B.value.adminConfigured?"leave blank to keep current":"set a password"},null,8,Ma),[[et,O.value.adminPassword]])]),H.value?(D(),F("div",Ia,[Te(" health: "+U(H.value.reachable?"ok":"down"),1),H.value.latencyMs?(D(),F("span",Ra," · "+U(H.value.latencyMs)+"ms",1)):Q("",!0),Te(" · superuser auth: "+U(H.value.superuser?"ok":"—"),1),H.value.detail?(D(),F("span",Da," · "+U(H.value.detail),1)):Q("",!0)])):Q("",!0),$.value?(D(),F("p",Fa,U($.value),1)):K.value?(D(),F("p",La,U(K.value),1)):Q("",!0),y("div",ja,[y("button",{class:"pv-btn",disabled:W.value,onClick:je},U(W.value?"Saving…":"Save connection"),9,Ua),y("button",{class:"pv-btn-sec",disabled:R.value,onClick:we},U(R.value?"Testing…":"Test connection"),9,$a)]),d[25]||(d[25]=y("p",{class:"text-[11px] text-muted"}," The service account is used only for user & organization management. Changing the URL repoints the whole API Server at a new PocketBase and may sign you out. ",-1))])])],512),[[Vs,c.value==="pocketbase"]]),Ce(y("div",Na,[y("div",Ha,[y("div",{class:"flex items-center justify-between border-b border-subtle px-5 py-4"},[d[26]||(d[26]=y("div",null,[y("div",{class:"text-base font-semibold text-primary"},"Plugins"),y("span",{class:"pv-eyebrow"},"External integrations")],-1)),y("button",{class:"pv-btn-sec pv-btn-sm",onClick:Xe},"Refresh")]),y("div",Va,[ge.value?(D(),F("p",Ba,U(ge.value),1)):Q("",!0),oe.value?(D(),F("p",Ka,U(oe.value),1)):Q("",!0),!Se.value.length&&!ge.value?(D(),F("p",Wa,"No plugins registered yet.")):Q("",!0),Se.value.length?(D(),F("div",Ga,[(D(),F(re,null,lt(X,h=>y("button",{key:h.id,class:Ee(["-mb-px whitespace-nowrap border-b-2 px-3 py-2 text-sm font-semibold transition",Ie.value===h.id?"border-brand text-primary":"border-transparent text-secondary hover:text-primary"]),onClick:k=>Ie.value=h.id},U(h.label),11,qa)),64))])):Q("",!0),Se.value.length&&!ve.value.length?(D(),F("p",Ja,"No plugins in this category.")):Q("",!0),(D(!0),F(re,null,lt(ve.value,h=>(D(),F("div",{key:h.name,class:"border-t border-subtle px-5 py-4 first:border-t-0"},[y("div",za,[y("div",Ya,[y("div",Xa,[y("span",Za,U(h.name),1),y("span",{class:Ee(["rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium uppercase tracking-wider",ss[h.kind]])},U(h.kind),3),h.health?(D(),F("span",{key:0,class:Ee(["inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5 font-mono text-[10px] font-medium",Is[h.health.status]]),title:h.health.detail||""},[d[27]||(d[27]=y("span",{class:"h-1 w-1 rounded-full bg-current"},null,-1)),Te(U(h.health.status),1),h.health.latencyMs?(D(),F("span",ec," · "+U(h.health.latencyMs)+"ms",1)):Q("",!0)],10,Qa)):Q("",!0)]),y("div",tc,U(h.provider)+" · v"+U(h.version)+" · "+U(h.authType),1),h.health&&h.health.detail?(D(),F("div",sc,U(h.health.detail),1)):Q("",!0),h.capabilities&&h.capabilities.length?(D(),F("div",nc,[d[28]||(d[28]=y("div",{class:"pv-eyebrow"},"Capabilities",-1)),(D(!0),F(re,null,lt(h.capabilities,k=>(D(),F("div",{key:k.id,class:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5"},[y("span",ic,U(k.id),1),k.method||k.endpoint?(D(),F("span",oc,U(k.method)+" "+U(k.endpoint),1)):Q("",!0),k.description?(D(),F("span",rc,U(k.description),1)):Q("",!0)]))),128))])):Q("",!0),h.baseURL?(D(),F("div",lc,U(h.baseURL),1)):Q("",!0)]),y("div",ac,[y("button",{class:Ee(["pv-btn-sec pv-btn-sm",h.enabled?"!border-transparent !bg-success-tint !text-success":""]),disabled:ae.value===h.name,onClick:k=>It(h)},[y("span",{class:Ee(["h-1.5 w-1.5 rounded-full",h.enabled?"bg-success":"bg-muted"])},null,2),Te(" "+U(h.enabled?"Enabled":"Disabled"),1)],10,cc),h.configFields&&h.configFields.length?(D(),F("button",{key:0,class:"pv-btn-sec pv-btn-sm",onClick:k=>ns(h)},"Configure",8,uc)):Q("",!0),y("button",{class:"pv-btn-sec pv-btn-sm",disabled:ae.value===h.name,onClick:k=>wn(h)},"Check",8,fc),h.kind==="external"?(D(),F("button",{key:1,class:"pv-btn-sec pv-btn-sm !text-danger",disabled:ae.value===h.name,onClick:k=>a(h)},"Remove",8,dc)):Q("",!0)])]),Ue.value===h.name?(D(),F("div",pc,[(D(!0),F(re,null,lt(h.configFields,k=>(D(),F("label",{key:k.key,class:"flex flex-col gap-1"},[y("span",hc,[Te(U(k.label),1),k.required?(D(),F("span",gc," *")):Q("",!0)]),k.type==="select"?Ce((D(),F("select",{key:0,"onUpdate:modelValue":ie=>Oe.value[k.key]=ie,class:"pv-input"},[(D(!0),F(re,null,lt(k.options,ie=>(D(),F("option",{key:ie.value,value:ie.value},U(ie.label),9,bc))),128))],8,mc)),[[po,Oe.value[k.key]]]):Ce((D(),F("input",{key:1,"onUpdate:modelValue":ie=>Oe.value[k.key]=ie,type:k.secret||k.type==="password"?"password":k.type==="number"?"number":"text",class:"pv-input",autocomplete:"off",placeholder:k.help||""},null,8,vc)),[[Ll,Oe.value[k.key]]]),k.help?(D(),F("span",yc,U(k.help),1)):Q("",!0)]))),128)),y("div",xc,[y("button",{class:"pv-btn pv-btn-sm",disabled:ae.value===h.name,onClick:k=>ht(h)},"Save configuration",8,_c),y("button",{class:"pv-btn-sec pv-btn-sm",onClick:d[6]||(d[6]=k=>Ue.value="")},"Cancel")])])):Q("",!0)]))),128)),y("div",wc,[d[29]||(d[29]=y("div",{class:"pv-eyebrow mb-2"},"Register external plugin",-1)),y("div",Sc,[Ce(y("input",{"onUpdate:modelValue":d[7]||(d[7]=h=>Me.value.name=h),class:"pv-input sm:w-40",placeholder:"name",autocomplete:"off",spellcheck:"false"},null,512),[[et,Me.value.name]]),Ce(y("input",{"onUpdate:modelValue":d[8]||(d[8]=h=>Me.value.baseURL=h),class:"pv-input flex-1",placeholder:"https://plugin.example.com",autocomplete:"off",spellcheck:"false"},null,512),[[et,Me.value.baseURL]]),y("button",{class:"pv-btn",disabled:Y.value,onClick:u},U(Y.value?"Adding…":"Add"),9,Cc)]),se.value?(D(),F("p",Tc,U(se.value),1)):Q("",!0),d[30]||(d[30]=y("p",{class:"mt-2 text-[11px] text-muted"},[Te(" A remote service that answers "),y("span",{class:"font-mono"},"GET /health"),Te(" and "),y("span",{class:"font-mono"},"GET /manifest"),Te(" — added at runtime, no rebuild. ")],-1))])])])],512),[[Vs,c.value==="plugins"]])],64)):(D(),F("div",aa,[d[16]||(d[16]=y("div",{class:"border-b border-subtle px-5 py-4"},[y("div",{class:"text-base font-semibold text-primary"},"Sign in"),y("span",{class:"pv-eyebrow"},"Superadmin access only")],-1)),y("form",{class:"flex flex-col gap-3 px-5 py-5",onSubmit:Nl(P,["prevent"])},[y("label",ca,[d[14]||(d[14]=y("span",{class:"pv-eyebrow"},"Email",-1)),Ce(y("input",{"onUpdate:modelValue":d[1]||(d[1]=h=>o.value.email=h),type:"email",autocomplete:"username",class:"pv-input",placeholder:"superadmin@pilotvault.local"},null,512),[[et,o.value.email]])]),y("label",ua,[d[15]||(d[15]=y("span",{class:"pv-eyebrow"},"Password",-1)),Ce(y("input",{"onUpdate:modelValue":d[2]||(d[2]=h=>o.value.password=h),type:"password",autocomplete:"current-password",class:"pv-input",placeholder:"••••••••"},null,512),[[et,o.value.password]])]),r.value?(D(),F("p",fa,U(r.value),1)):Q("",!0),y("button",{type:"submit",class:"pv-btn mt-1",disabled:l.value},U(l.value?"Signing in…":"Sign in"),9,da)],32)])),d[31]||(d[31]=y("p",{class:"text-center font-mono text-[11px] text-muted"}," PilotVault — live drone telemetry, command & control. ",-1))]))}};Bl(Ec).mount("#app"); diff --git a/API Server/internal/api/dist/index.html b/API Server/internal/api/dist/index.html index db6dad4..7494b8e 100644 --- a/API Server/internal/api/dist/index.html +++ b/API Server/internal/api/dist/index.html @@ -6,8 +6,8 @@ PilotVault · API Server - - + +
diff --git a/API Server/panel/src/App.vue b/API Server/panel/src/App.vue index 67cf689..951862b 100644 --- a/API Server/panel/src/App.vue +++ b/API Server/panel/src/App.vue @@ -9,7 +9,7 @@ import EndpointTable from "./components/EndpointTable.vue"; // and anyone who is not a superadmin is refused. const TOKEN_KEY = "pv_panel_token"; const token = ref(localStorage.getItem(TOKEN_KEY) || ""); -const me = ref(null); // { email, role } once verified as superadmin +const me = ref(null); // { id, email, role } once verified as superadmin const authed = ref(false); const booting = ref(true); @@ -21,6 +21,8 @@ const busy = ref(false); const tab = ref("overview"); const TABS = [ { id: "overview", label: "Overview" }, + { id: "users", label: "Users" }, + { id: "organizations", label: "Organizations" }, { id: "pocketbase", label: "PocketBase" }, { id: "plugins", label: "Plugins" }, ]; @@ -32,7 +34,7 @@ async function verify(tok) { if (!r.ok) return false; const who = await r.json(); if (who.role !== "superadmin") return false; - me.value = { email: who.email, role: who.role }; + me.value = { id: who.id, email: who.email, role: who.role }; return true; } catch { return false; @@ -46,6 +48,8 @@ async function grant(tok) { startPolling(); loadPbConfig(); loadPlugins(); + loadOrgs(); + loadUsers(); } async function doLogin() { @@ -362,6 +366,315 @@ async function registerExternal() { } } +// ---- Users & Organizations (superadmin) ---------------------------------- +// This panel is superadmin-gated, so the UI always operates with the full, +// cross-organization scope the API grants a superadmin. +const users = ref([]); // [{ id, email, role, verified, created, organization, organizationName }] +const orgs = ref([]); // [{ id, name, created }] +const umErr = ref(""); // load error banner (shared by both tabs) + +const ROLES = [ + { value: "user", label: "User" }, + { value: "admin", label: "Admin" }, + { value: "superadmin", label: "Superadmin" }, +]; +const roleLabel = { user: "User", admin: "Admin", superadmin: "Superadmin" }; +const roleBadge = { + user: "bg-sunken text-secondary", + admin: "bg-warning-tint text-warning", + superadmin: "bg-success-tint text-success", +}; + +// Member counts per organization, derived from the (complete, superadmin) user +// list — used to annotate orgs and to explain why a delete is blocked. +const orgMemberCount = computed(() => { + const m = {}; + for (const u of users.value) { + if (u.organization) m[u.organization] = (m[u.organization] || 0) + 1; + } + return m; +}); + +// Turn either our own {error} envelope or a relayed PocketBase validation error +// ({message, data:{field:{message}}}) into a single readable line. +function apiError(d, fallback) { + if (!d) return fallback; + if (d.error) return d.error; + if (d.data && typeof d.data === "object") { + const parts = []; + for (const k in d.data) { + if (d.data[k] && d.data[k].message) parts.push(`${k}: ${d.data[k].message}`); + } + if (parts.length) return parts.join("; "); + } + return d.message || fallback; +} + +function orgLabel(id) { + if (!id) return "— none —"; + const o = orgs.value.find((x) => x.id === id); + return o ? o.name : id; +} + +// -- Users -- +const newUser = ref({ email: "", password: "", role: "user", organization: "" }); +const newUserErr = ref(""); +const newUserMsg = ref(""); +const newUserBusy = ref(false); + +const editingUser = ref(""); // id of the user whose inline editor is open +const editUser = ref({}); // working copy { email, role, organization, verified, password } +const busyUser = ref(""); // id with an in-flight action +const userMsg = ref(""); + +async function loadUsers() { + umErr.value = ""; + try { + const r = await fetch("/api/users", { headers: authHeaders() }); + const d = await r.json().catch(() => ({})); + if (!r.ok) { + umErr.value = apiError(d, "Could not load users."); + return; + } + users.value = d.users || []; + } catch { + umErr.value = "Could not reach the API server."; + } +} + +async function createUser() { + newUserErr.value = ""; + newUserMsg.value = ""; + const email = newUser.value.email.trim().toLowerCase(); + if (!email || !email.includes("@")) { + newUserErr.value = "A valid email is required."; + return; + } + if (newUser.value.password.length < 8) { + newUserErr.value = "Password must be at least 8 characters."; + return; + } + newUserBusy.value = true; + try { + const r = await fetch("/api/users", { + method: "POST", + headers: authHeaders(true), + body: JSON.stringify({ + email, + password: newUser.value.password, + role: newUser.value.role, + organization: newUser.value.organization, + }), + }); + const d = await r.json().catch(() => ({})); + if (!r.ok) { + newUserErr.value = apiError(d, "Could not create the user."); + return; + } + newUser.value = { email: "", password: "", role: "user", organization: "" }; + newUserMsg.value = `Created ${d.user ? d.user.email : "user"}.`; + await loadUsers(); + } catch { + newUserErr.value = "Could not reach the API server."; + } finally { + newUserBusy.value = false; + } +} + +function startUserEdit(u) { + userMsg.value = ""; + editingUser.value = editingUser.value === u.id ? "" : u.id; + editUser.value = { + email: u.email, + role: u.role, + organization: u.organization || "", + verified: !!u.verified, + password: "", + }; +} + +async function saveUser(u) { + userMsg.value = ""; + busyUser.value = u.id; + try { + // Only send fields that actually changed; password only when set. + const patch = {}; + const e = editUser.value; + if (e.email.trim().toLowerCase() !== u.email) patch.email = e.email.trim().toLowerCase(); + if (e.role !== u.role) patch.role = e.role; + if ((e.organization || "") !== (u.organization || "")) patch.organization = e.organization || ""; + if (e.verified !== !!u.verified) patch.verified = e.verified; + if (e.password) patch.password = e.password; + if (Object.keys(patch).length === 0) { + userMsg.value = "No changes to save."; + return; + } + const r = await fetch(`/api/users/${encodeURIComponent(u.id)}`, { + method: "PATCH", + headers: authHeaders(true), + body: JSON.stringify(patch), + }); + const d = await r.json().catch(() => ({})); + if (!r.ok) { + userMsg.value = apiError(d, "Could not update the user."); + return; + } + userMsg.value = `Updated ${u.email}.`; + editingUser.value = ""; + await loadUsers(); + } catch { + userMsg.value = "Could not reach the API server."; + } finally { + busyUser.value = ""; + } +} + +async function deleteUser(u) { + if (u.id === (me.value && me.value.id)) return; // guarded in the template too + if (!confirm(`Delete user ${u.email}? This cannot be undone.`)) return; + userMsg.value = ""; + busyUser.value = u.id; + try { + const r = await fetch(`/api/users/${encodeURIComponent(u.id)}`, { + method: "DELETE", + headers: authHeaders(), + }); + const d = await r.json().catch(() => ({})); + if (!r.ok) { + userMsg.value = apiError(d, "Could not delete the user."); + return; + } + userMsg.value = `Deleted ${u.email}.`; + if (editingUser.value === u.id) editingUser.value = ""; + await loadUsers(); + } catch { + userMsg.value = "Could not reach the API server."; + } finally { + busyUser.value = ""; + } +} + +// -- Organizations -- +const newOrgName = ref(""); +const newOrgErr = ref(""); +const newOrgMsg = ref(""); +const newOrgBusy = ref(false); + +const editingOrg = ref(""); // id of the org being renamed +const editOrgName = ref(""); +const busyOrg = ref(""); +const orgMsg = ref(""); + +async function loadOrgs() { + try { + const r = await fetch("/api/orgs", { headers: authHeaders() }); + if (!r.ok) return; + const d = await r.json().catch(() => ({})); + orgs.value = d.organizations || []; + } catch { + /* leave orgs as-is; the users tab still works without names */ + } +} + +async function createOrg() { + newOrgErr.value = ""; + newOrgMsg.value = ""; + const name = newOrgName.value.trim(); + if (!name) { + newOrgErr.value = "An organization name is required."; + return; + } + newOrgBusy.value = true; + try { + const r = await fetch("/api/orgs", { + method: "POST", + headers: authHeaders(true), + body: JSON.stringify({ name }), + }); + const d = await r.json().catch(() => ({})); + if (!r.ok) { + newOrgErr.value = apiError(d, "Could not create the organization."); + return; + } + newOrgName.value = ""; + newOrgMsg.value = `Created ${d.organization ? d.organization.name : "organization"}.`; + await loadOrgs(); + } catch { + newOrgErr.value = "Could not reach the API server."; + } finally { + newOrgBusy.value = false; + } +} + +function startOrgEdit(o) { + orgMsg.value = ""; + editingOrg.value = editingOrg.value === o.id ? "" : o.id; + editOrgName.value = o.name; +} + +async function saveOrg(o) { + orgMsg.value = ""; + const name = editOrgName.value.trim(); + if (!name) { + orgMsg.value = "An organization name is required."; + return; + } + if (name === o.name) { + editingOrg.value = ""; + return; + } + busyOrg.value = o.id; + try { + const r = await fetch(`/api/orgs/${encodeURIComponent(o.id)}`, { + method: "PATCH", + headers: authHeaders(true), + body: JSON.stringify({ name }), + }); + const d = await r.json().catch(() => ({})); + if (!r.ok) { + orgMsg.value = apiError(d, "Could not rename the organization."); + return; + } + orgMsg.value = `Renamed to ${name}.`; + editingOrg.value = ""; + await loadOrgs(); + await loadUsers(); // refresh the resolved org names on user rows + } catch { + orgMsg.value = "Could not reach the API server."; + } finally { + busyOrg.value = ""; + } +} + +async function deleteOrg(o) { + const members = orgMemberCount.value[o.id] || 0; + if (members > 0) { + orgMsg.value = `${o.name} still has ${members} member${members === 1 ? "" : "s"}; reassign or remove them first.`; + return; + } + if (!confirm(`Delete organization ${o.name}?`)) return; + orgMsg.value = ""; + busyOrg.value = o.id; + try { + const r = await fetch(`/api/orgs/${encodeURIComponent(o.id)}`, { + method: "DELETE", + headers: authHeaders(), + }); + const d = await r.json().catch(() => ({})); + if (!r.ok) { + orgMsg.value = apiError(d, "Could not delete the organization."); + return; + } + orgMsg.value = `Deleted ${o.name}.`; + if (editingOrg.value === o.id) editingOrg.value = ""; + await loadOrgs(); + } catch { + orgMsg.value = "Could not reach the API server."; + } finally { + busyOrg.value = ""; + } +} + // Live health poll against this server's aggregate /api/status, which probes // PocketBase and the Web App server-side (the browser only talks to the API). const checkedAt = ref(null); @@ -435,6 +748,8 @@ onMounted(async () => { startPolling(); loadPbConfig(); loadPlugins(); + loadOrgs(); + loadUsers(); } else if (token.value) { localStorage.removeItem(TOKEN_KEY); token.value = ""; @@ -620,6 +935,198 @@ const deviceApi = [ + +
+ +
+
+
Add user
+ Create an account +
+
+
+ + +
+
+ + +
+

{{ newUserErr }}

+

{{ newUserMsg }}

+
+ +
+
+
+ + +
+
+
+
Users
+ {{ users.length }} total +
+ +
+
+

{{ umErr }}

+

{{ userMsg }}

+

No users yet.

+ +
+
+
+
+ {{ u.email }} + {{ roleLabel[u.role] || u.role }} + you + unverified +
+
+ {{ u.organizationName || (u.organization ? u.organization : "no organization") }} +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+
+
+
+
+
+ + +
+ +
+
+
Add organization
+ Create a tenant +
+
+
+ + +
+

{{ newOrgErr }}

+

{{ newOrgMsg }}

+
+
+ + +
+
+
+
Organizations
+ {{ orgs.length }} total +
+ +
+
+

{{ orgMsg }}

+

No organizations yet.

+ +
+
+
+
{{ o.name }}
+
+ {{ (orgMemberCount[o.id] || 0) }} member{{ (orgMemberCount[o.id] || 0) === 1 ? "" : "s" }} +
+
+
+ + +
+
+ + +
+ +
+ + +
+
+
+
+
+
+