nish-ui 2.1.2 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/base-tailwind.css +3 -1
- package/dist/base.css +3 -1
- package/dist/chart.js +1 -1
- package/dist/elements-all.js +1 -1
- package/dist/elements-charts.js +1 -1
- package/dist/elements-data.js +1 -1
- package/dist/elements-forms.js +1 -1
- package/dist/elements.js +3 -3
- package/dist/esm/components/calendar-base.js +291 -0
- package/dist/esm/components/calendar-classes.js +78 -0
- package/dist/esm/components/calendar.js +22 -254
- package/dist/esm/components/date-range-picker.js +213 -0
- package/dist/esm/components/forms.js +1 -0
- package/dist/esm/components/layout.js +8 -1
- package/dist/esm/components/range-calendar.js +122 -0
- package/dist/esm/components/strings.js +9 -0
- package/dist/esm/components/time-field-classes.js +110 -0
- package/dist/esm/components/time-field.js +308 -0
- package/dist/esm/components/tree-view.js +40 -46
- package/dist/esm/index.js +6 -0
- package/dist/esm/runtime.js +1 -1
- package/dist/format.js +1 -1
- package/dist/index.d.ts +161 -10
- package/dist/nish.css +3 -1
- package/dist/theme.d.ts +18 -0
- package/dist/theme.global.js +10 -1
- package/dist/theme.js +10 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -260,7 +260,7 @@ More than 100 components, each with live stories, props and guidelines on the
|
|
|
260
260
|
[docs site](https://design.nish.software/#/components):
|
|
261
261
|
|
|
262
262
|
- **Actions and inputs:** Button, IconButton, Input, Textarea, Select, Combobox, DatePicker,
|
|
263
|
-
Calendar, MultiSelect, Checkbox, Switch, RadioGroup, Slider, TagInput, FileDropzone,
|
|
263
|
+
DateRangePicker, Calendar, RangeCalendar, TimeField, MultiSelect, Checkbox, Switch, RadioGroup, Slider, TagInput, FileDropzone,
|
|
264
264
|
NumberField, Segmented, Chip, SearchInput, Field, FieldGroup, Label
|
|
265
265
|
- **Feedback:** Toast, Callout, Spinner, Skeleton, Progress, EmptyState, ErrorState, StatusDot,
|
|
266
266
|
Meter, LoadingBar, ConnectionBanner, AppErrorBoundary
|
package/dist/base-tailwind.css
CHANGED
|
@@ -59,7 +59,9 @@
|
|
|
59
59
|
.nish-no-scrollbar::-webkit-scrollbar {
|
|
60
60
|
display: none;
|
|
61
61
|
}
|
|
62
|
-
/* Bottom padding that clears bottom bars (the nav already includes the safe area).
|
|
62
|
+
/* Bottom padding that clears bottom bars (the nav already includes the safe area). It is in
|
|
63
|
+
the base layer, so any padding utility on the same element (py-6) beats it; React
|
|
64
|
+
components use the same value as a pb-[...] utility instead (PageContainer). */
|
|
63
65
|
.nish-pad-bottom-inset {
|
|
64
66
|
padding-bottom: max(calc(var(--nish-bottom-inset) + 1rem), calc(1rem + env(safe-area-inset-bottom)));
|
|
65
67
|
}
|
package/dist/base.css
CHANGED
|
@@ -59,7 +59,9 @@
|
|
|
59
59
|
.nish-no-scrollbar::-webkit-scrollbar {
|
|
60
60
|
display: none;
|
|
61
61
|
}
|
|
62
|
-
/* Bottom padding that clears bottom bars (the nav already includes the safe area).
|
|
62
|
+
/* Bottom padding that clears bottom bars (the nav already includes the safe area). It is in
|
|
63
|
+
the base layer, so any padding utility on the same element (py-6) beats it; React
|
|
64
|
+
components use the same value as a pb-[...] utility instead (PageContainer). */
|
|
63
65
|
.nish-pad-bottom-inset {
|
|
64
66
|
padding-bottom: max(calc(var(--nish-bottom-inset) + 1rem), calc(1rem + env(safe-area-inset-bottom)));
|
|
65
67
|
}
|
package/dist/chart.js
CHANGED
|
@@ -264,7 +264,7 @@ var THEMES = /* @__PURE__ */ Object.fromEntries(
|
|
|
264
264
|
var DEFAULT_THEME = "dark";
|
|
265
265
|
|
|
266
266
|
// src/runtime.ts
|
|
267
|
-
var version = true ? "2.
|
|
267
|
+
var version = true ? "2.2.0" : "dev";
|
|
268
268
|
var KEY = /* @__PURE__ */ Symbol.for("nish-ui.runtime.v1");
|
|
269
269
|
function runtime() {
|
|
270
270
|
const g = globalThis;
|
package/dist/elements-all.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Qn=["emerald","indigo","amber","lime","rose","sky","violet","teal"],Ur=["accent","ok","loss","warn","info",...Qn],ce={emerald:"#34d399",indigo:"#8b93ff",amber:"#fbbf24",lime:"#a3e635",rose:"#fb7185",sky:"#38bdf8",violet:"#c084fc",teal:"#2dd4bf"},Zn={emerald:"#046d4f",indigo:"#4e45e3",amber:"#9b4708",lime:"#41690d",rose:"#b8113a",sky:"#036499",violet:"#7e22ce",teal:"#0e6b64"},es=["#8b93ff","#34d399","#fbbf24","#fb7185","#38bdf8","#c084fc","#fb923c","#a3e635"],ts=["#6366f1","#059669","#c96d06","#f43f5e","#0284c7","#a855f7","#ea580c","#5a910c"],ie=i=>Object.fromEntries(i.map((e,t)=>[`chart-${t+1}`,e])),is={dark:{label:"Dark",scheme:"dark",colors:{bg:"#0a0b0f",surface:"#111218",elevated:"#191b23",overlay:"#22252f",line:"#262935","line-strong":"#3a3e4d","line-control":"#666975",hi:"#ececf1",hi2:"#a8aab7",hi3:"#8a8d9b",ghost:"#6b6e7c",accent:"#8b93ff",accent2:"#c084fc","on-accent":"#0a0b0f",ok:"#34d399",loss:"#f87171",warn:"#fbbf24",info:"#38bdf8",scrim:"#000000","invert-bg":"#ececf1","invert-text":"#111218",...ie(es),...ce}},light:{label:"Light",scheme:"light",colors:{bg:"#f7f6f3",surface:"#ffffff",elevated:"#f1f0ec",overlay:"#e6e4de",line:"#e2e0da","line-strong":"#c9c6bd","line-control":"#8a8881",hi:"#17171c",hi2:"#4f515c",hi3:"#626470",ghost:"#8a8c98",accent:"#4338ca",accent2:"#7e22ce","on-accent":"#ffffff","on-accent2":"#ffffff","on-ok":"#0a0a0c","on-loss":"#ffffff","on-warn":"#0a0a0c","on-info":"#0a0a0c",ok:"#065f46","ok-fill":"#059669","loss-fill":"#dc2626","warn-fill":"#c96d06","info-fill":"#0284c7",loss:"#a91b1b",warn:"#92400e",info:"#075985",scrim:"#17171c","invert-bg":"#17171c","invert-text":"#f7f6f3",...ie(ts),...Zn}},slate:{label:"Slate",scheme:"dark",colors:{bg:"#18181b",surface:"#202024",elevated:"#2c2c32",overlay:"#36363d",line:"#3a3a42","line-strong":"#52525b","line-control":"#77777e",hi:"#f4f4f5",hi2:"#b8b8c0",hi3:"#a0a0a8",ghost:"#71717a",accent:"#a5b4fc",accent2:"#c084fc","on-accent":"#18181b",ok:"#4ade80",loss:"#fda4af",warn:"#facc15",info:"#38bdf8",scrim:"#000000","invert-bg":"#f4f4f5","invert-text":"#202024",...ie(["#818cf8","#4ade80","#facc15","#fb7185","#38bdf8","#c084fc","#fb923c","#a3e635"]),...ce,indigo:"#9aa1ff",rose:"#fc8395",violet:"#c792fc"}},terminal:{label:"Terminal",scheme:"dark",colors:{bg:"#050807",surface:"#0c110e",elevated:"#141c17",overlay:"#1c2820",line:"#233028","line-strong":"#34483b","line-control":"#5c6c61",hi:"#d1fae5",hi2:"#8fc4a8",hi3:"#74a68b",ghost:"#4f7a62",accent:"#34d399",accent2:"#2dd4bf","on-accent":"#050807",ok:"#4ade80",loss:"#f87171",warn:"#fbbf24",info:"#67e8f9",scrim:"#000000","invert-bg":"#d1fae5","invert-text":"#0c110e",...ie(["#34d399","#67e8f9","#fbbf24","#f87171","#a3e635","#c084fc","#fb923c","#2dd4bf"]),...ce}},mocha:{label:"Mocha",scheme:"dark",colors:{bg:"#1c1917",surface:"#292524",elevated:"#393432",overlay:"#44403c",line:"#44403c","line-strong":"#57534e","line-control":"#83807c",hi:"#f5f0eb",hi2:"#c6c0bb",hi3:"#b2ada8",ghost:"#78716c",accent:"#fdba74",accent2:"#f472b6","on-accent":"#1c1917",ok:"#4ade80",loss:"#fca5a5",warn:"#facc15",info:"#7dd3fc",scrim:"#000000","invert-bg":"#f5f0eb","invert-text":"#292524",...ie(["#fb923c","#4ade80","#facc15","#f472b6","#7dd3fc","#c4b5fd","#f87171","#bef264"]),...ce,indigo:"#a9afff",rose:"#fc99a7",sky:"#3ebff8",violet:"#cfa2fd"}},ocean:{label:"Ocean",scheme:"dark",colors:{bg:"#020c18",surface:"#061528",elevated:"#0a243e",overlay:"#103658",line:"#123050","line-strong":"#1f4a72","line-control":"#507291",hi:"#e0f2fe",hi2:"#9ccde6",hi3:"#6fa9c6",ghost:"#3f7392",accent:"#38bdf8",accent2:"#a78bfa","on-accent":"#020c18",ok:"#34d399",loss:"#fb7185",warn:"#fbbf24",info:"#7dd3fc",scrim:"#000000","invert-bg":"#38bdf8","invert-text":"#020c18",...ie(["#38bdf8","#34d399","#fbbf24","#fb7185","#a78bfa","#2dd4bf","#fb923c","#a3e635"]),...ce}},contrast:{label:"High contrast",scheme:"dark",colors:{bg:"#000000",surface:"#080808",elevated:"#141414",overlay:"#222222",line:"#4a4a4a","line-strong":"#8a8a8a","line-control":"#8a8a8a",hi:"#ffffff",hi2:"#d4d4d4",hi3:"#bdbdbd",ghost:"#8f8f8f",accent:"#ffd60a",accent2:"#7dd3fc","on-accent":"#000000",ok:"#4ade80",loss:"#ff6b6b",warn:"#ffd60a",info:"#7dd3fc",scrim:"#000000","invert-bg":"#ffffff","invert-text":"#000000",...ie(["#ffd60a","#4ade80","#7dd3fc","#ff6b6b","#c4b5fd","#fb923c","#f9a8d4","#bef264"]),...ce}}},ns=i=>{let e=i.colors,t=Object.fromEntries(["ok","loss","warn","info"].flatMap(n=>[[`${n}-fill`,e[`${n}-fill`]??e[n]],[`on-${n}`,e[`on-${n}`]??e["on-accent"]]]));return{...i,colors:{...e,...t,"on-accent2":e["on-accent2"]??e["on-accent"]}}},he=Object.fromEntries(Object.entries(is).map(([i,e])=>[i,ns(e)])),ui="dark";var ss="2.1.2";var rs=Symbol.for("nish-ui.runtime.v1");function os(){let i=globalThis;return i[rs]??={versions:new Set,slots:{}}}function as(i){i.versions.add(ss),i.versions.size>1&&!i.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(i.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...i.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var mi=!1;function de(i,e){let t=os();return mi||(mi=!0,as(t)),i in t.slots||(t.slots[i]=e()),t.slots[i]}function Ee(i){if(i==null)return null;let e=String(i),t=0,n=e.length;for(;t<n&&e.charCodeAt(t)<=32;)t++;for(;n>t&&e.charCodeAt(n-1)<=32;)n--;let s=e.slice(t,n).replace(/[\t\n\r]/g,"");if(s===""||s!==s.trim()||/[\u0000-\u001f\u007f]/.test(s))return null;let r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(s);if(!r)return s;let o=r[1].toLowerCase();return o==="http"||o==="https"||o==="mailto"||o==="tel"?s:null}var ue={close:"Close",cancel:"Cancel",menu:"Menu",back:"Back: ",contextMenu:"Actions",sortAnnounce:(i,e)=>e?`Sorted by ${i}, ${e==="asc"?"ascending":"descending"}`:"Sorting cleared",dismiss:"Dismiss",moreCount:i=>`${i} more`,copy:"Copy",copied:"Copied",hubTitle:"Back to nish.software",hubLabel:"\u2190 nish.software",moreActions:"More actions",more:"More",legend:"Legend",optional:"Optional",search:"Search",clearSearch:"Clear search",remove:"Remove",removeNamed:i=>`Remove ${i}`,noMatches:"No matches",clear:"Clear",searching:"Searching\u2026",invalidDate:"Enter a valid date.",chooseDate:"Choose date",changeDate:i=>`Change date, ${i}`,previousMonth:"Previous month",nextMonth:"Next month",month:"Month",year:"Year",dayToken:"DD",monthToken:"MM",yearToken:"YYYY",optionAdded:i=>`Added ${i}`,optionRemoved:i=>`Removed ${i}`,clearAll:"Clear all",maxSelected:i=>`You can pick up to ${i}`,carouselRole:"carousel",slideRole:"slide",slideLabel:(i,e)=>`${i} of ${e}`,previousSlide:"Previous slide",nextSlide:"Next slide",goToSlide:i=>`Go to slide ${i}`,slidePicker:"Choose slide",startRotation:"Start slide rotation",stopRotation:"Stop slide rotation",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",loading:"Loading",failedToLoad:"Failed to load",retry:"Retry",actions:"Actions",offline:"You're offline",nothingHere:"Nothing here yet",loadingNamed:i=>`Loading ${i}`,sortBy:"Sort by",sortDefault:"Default",noData:"No data",noDataNamed:i=>`${i}: no data`,filters:"Filters",clearFilters:"Clear filters",done:"Done",activeCount:i=>`${i} active`,newCount:i=>`${i} new`,sections:"Sections",theme:"Theme",sidebar:"Sidebar",expandSidebar:"Expand sidebar",collapseSidebar:"Collapse sidebar",skipToContent:"Skip to content",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeToggleLabel:(i,e)=>`Theme: ${i}. Switch to ${e}`,themePreset:"Theme preset",themePresetPlaceholder:"Preset\u2026",errorStaleTitle:"A new version is available",errorStaleBody:"Reload the page to get the latest version.",errorTitle:"Something went wrong",errorBody:"An unexpected error occurred.",errorDetails:"Details",errorTryAgain:"Try again",errorReload:"Reload page",saving:"Saving\u2026",saved:"Saved",saveFailed:"Could not save",enterNumber:"Enter a number",resizeColumns:"Resize columns",resizeRows:"Resize rows",layoutPresets:"Layout presets",live:"Live",offlineBadge:"Offline",progress:"Progress",workflow:"Workflow",activity:"Activity",other:"Other",waiting:"Waiting",noActivity:"No activity yet",systemMap:"System map",zoomOut:"Zoom out",zoomIn:"Zoom in",fitToScreen:"Fit to screen",followActivity:"Follow activity",canvasLines:"Lines",serviceTokens:"Service tokens",serviceTokensIntro:"Machine clients, like the nish MCP server, use these tokens to read this app. Revoking one stops it at once.",loadingServiceTokens:"Loading service tokens",tokenRevoke:"Revoke",tokenRevoked:"Revoked",tokenRevokedAt:i=>`Revoked ${i}`,tokenRevokeNamed:i=>`Revoke ${i}`,tokenRevokeTitle:i=>`Revoke ${i}?`,tokenRevokeFailed:"Could not revoke the token.",inboxMarkHandled:"Mark handled",inboxSnooze:"Snooze",inboxActions:"Actions",inboxViews:"Inbox views",inboxOpen:"Open",inboxSnoozed:"Snoozed",inboxHandled:"Handled",inboxFilterBySource:"Filter by source",inboxHappened:i=>`Happened ${i} times`,previousPage:"Previous page",nextPage:"Next page",pageLabel:i=>`Page ${i}`,paginationLabel:"Pagination",breadcrumbs:"Breadcrumbs",removeTag:i=>`Remove ${i}`,dropzoneLabel:"Drop files here or browse",browseFiles:"Browse files",removeFile:i=>`Remove ${i}`,avatar:"Avatar",avatarMore:i=>`${i} more`,sliderMin:"Minimum",sliderMax:"Maximum",accordion:"Accordion",progressIndeterminate:"Loading"};var pi="nish-theme",fi="nish.software",ls=3600*24*365,me=()=>de("theme",()=>({extra:{},listeners:new Set,watching:!1,switchId:0})),cs=i=>{globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`nish-ui: ${i}`)};function qe(){if(typeof document>"u")return pi;let i=document.documentElement.getAttribute("data-nish-storage-key");return i&&/^[A-Za-z0-9_-]+$/.test(i)?i:pi}var we=(i,e)=>Object.prototype.hasOwnProperty.call(i,e);function Nt(i){return typeof i=="string"&&(we(he,i)||we(me().extra,i))}function hs(){if(typeof document>"u")return null;try{let i=document.cookie.match(new RegExp(`(?:^|;\\s*)${qe()}=([a-z0-9-]+)`));return i?i[1]:null}catch{return null}}var bi=(i,e)=>e===i||e.endsWith("."+i);function ds(i,e){let t=i.toLowerCase(),n=(e??"").trim().toLowerCase().replace(/^\./,"");return n?bi(n,t)?n:null:bi(fi,t)?fi:null}function us(){return typeof location>"u"||typeof document>"u"?null:ds(location.hostname,document.documentElement.getAttribute("data-nish-domain"))}function pe(){let i=null;try{i=hs()??localStorage.getItem(qe())}catch{}return i==="system"||Nt(i)?i:"system"}function ms(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: light)").matches?"light":ui}function ps(){let i=document.documentElement.getAttribute("data-nish-themes");return i?i.split(/\s+/).filter(Nt):null}function xi(i=pe()){let e=i==="system"?ms():i,t=typeof document>"u"?null:ps();return t&&!t.includes(e)&&(e=Ve(e)),e}function Ve(i){let{extra:e}=me();return we(he,i)?he[i].scheme:we(e,i)?e[i]:"dark"}function wi(i=pe()){let e=xi(i),t=document.documentElement,n=t.getAttribute("data-theme");return n&&n!==e&&fs(t),t.setAttribute("data-theme",e),t.setAttribute("data-scheme",Ve(e)),t.setAttribute("data-theme-choice",i),t.style.colorScheme=Ve(e),vs(),me().listeners.forEach(s=>s(i,e)),e}function fs(i){let e=me(),t=++e.switchId;i.setAttribute("data-nish-theme-switching","");let n=()=>{e.switchId===t&&i.removeAttribute("data-nish-theme-switching")};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>requestAnimationFrame(n)):setTimeout(n,32)}function bs(i){if(i!=="system"&&!Nt(i))return cs(`unknown theme "${String(i)}" ignored. Register it with registerThemes() first.`),xi(pe());let e=qe();try{localStorage.setItem(e,i)}catch{}try{let t=us();if(t){let n=location.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${i}; Domain=.${t}; Path=/; Max-Age=${ls}; SameSite=Lax${n}`}}catch{}return wi(i)}function gs(i){return getComputedStyle(document.documentElement).getPropertyValue(`--nish-${i}`).trim()}function vs(){let i=gs("bg");if(!i)return;let e=document.querySelector('meta[name="theme-color"][data-nish]')??document.querySelector('meta[name="theme-color"]:not([media]):not([data-nish-keep])');e||(e=document.createElement("meta"),e.name="theme-color",(document.head||document.documentElement).appendChild(e)),e.setAttribute("data-nish",""),e.content=i}function ys(){let i=me();if(i.watching||typeof window>"u")return;i.watching=!0;let e=()=>{let t=pe();(t!==document.documentElement.getAttribute("data-theme-choice")||t==="system")&&wi(t)};typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: light)").addEventListener("change",e),window.addEventListener("storage",t=>{t.key===qe()&&e()}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function Es(i){ys();let{listeners:e}=me();return e.add(i),()=>{e.delete(i)}}var Ue=["system","light","dark"];function xs(){let i=Si(pe());return bs(i),i}var gi="http://www.w3.org/2000/svg";function $t(i,e,t={}){let n=document.createElementNS(gi,"svg"),s={width:String(i),height:String(i),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",...t};for(let r of Object.keys(s))n.setAttribute(r,s[r]);for(let[r,o]of e){let l=document.createElementNS(gi,r);for(let a of Object.keys(o))l.setAttribute(a,o[a]);n.appendChild(l)}return n}var vi={system:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["path",{d:"M8 21h8M12 17v4"}]],light:[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2M12 20v2m-7.07-2.93 1.41-1.41M17.66 6.34l1.41-1.41M2 12h2m16 0h2M4.93 4.93l1.41 1.41m11.32 11.32 1.41 1.41"}]],dark:[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9"}]]},ws=()=>({system:ue.themeSystem,light:ue.themeLight,dark:ue.themeDark}),Ss="set on another site";function Si(i){let e=Ue.indexOf(i);return Ue[(e+1)%Ue.length]}function _t(i,e){return i==="system"||i==="light"||i==="dark"?e[i]:we(he,i)?he[i].label:i.charAt(0).toUpperCase()+i.slice(1)}function Ti(i,e={}){let t={...ws(),...e.labels},n=e.strings?.themeToggleLabel??ue.themeToggleLabel,s=e.elsewhereLabel??Ss;i.tagName==="BUTTON"&&!i.getAttribute("type")&&i.setAttribute("type","button");let r=Object.keys(vi).map(c=>$t(16,vi[c],{"data-icon":c}));if(e.showLabel){let c=document.createElement("span");c.setAttribute("data-theme-word",""),c.setAttribute("aria-hidden","true"),r.push(c)}i.replaceChildren(...r);let o=i.querySelector("[data-theme-word]"),l=c=>{let d=c==="system"||c==="light"||c==="dark"?c:Ve(c);i.setAttribute("data-choice",c),i.querySelectorAll("svg[data-icon]").forEach(m=>{m.getAttribute("data-icon")===d?m.removeAttribute("display"):m.setAttribute("display","none")});let u=Ue.includes(c)?"":` (${s})`,b=n(`${_t(c,t)}${u}`,_t(Si(c),t));i.setAttribute("aria-label",b),i.setAttribute("title",b),o&&(o.textContent=_t(c,t))},a=()=>{xs()};i.addEventListener("click",a);let h=Es(c=>l(c));return l(pe()),()=>{i.removeEventListener("click",a),h()}}var yi=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4M12 17h.01"}]],Ei=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4M12 8h.01"}]],Ts={neutral:Ei,info:Ei,ok:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]],warn:yi,loss:yi},Ls=6e3,K=null,xe=null;function Li(i,e={}){xe?.(),(!K||!K.isConnected)&&(K=document.createElement("div"),K.setAttribute("role","status"),K.setAttribute("aria-live","polite"),K.className="nish-toast-region",document.body.appendChild(K));let t=K,n=document.createElement("div");n.className="nish-toast"+(e.tone&&e.tone!=="neutral"?` nish-toast--${e.tone}`:"");let s=document.createElement("span");s.className="nish-toast-icon",s.setAttribute("aria-hidden","true"),s.append($t(15,Ts[e.tone??"neutral"])),n.append(s);let r=document.createElement("p");r.className="nish-toast-body",r.append(typeof i=="string"?document.createTextNode(i):i),n.append(r);let o=null,l=e.duration==="sticky"?1/0:e.duration??Ls,a=0,h=0,c=()=>{o!=null&&clearTimeout(o),o=null,n.remove(),xe===c&&(xe=null)},d=p=>{Number.isFinite(p)&&(a=Date.now(),o=setTimeout(c,p))},u=()=>{h+=1,!(h>1||o==null)&&(clearTimeout(o),o=null,l=Math.max(0,l-(Date.now()-a)))},b=()=>{h!==0&&(h-=1,h===0&&d(Math.max(l,1e3)))},m=e.action,w=m?.href!=null?Ee(m.href):null;if(m&&(m.href==null||w!=null)){let p=document.createElement(m.href!=null?"a":"button");p.className="nish-toast-action",p.textContent=m.label,w!=null?p.href=w:p.type="button",p.addEventListener("click",()=>{m.onClick?.(),c()}),n.append(p)}let g=document.createElement("button");return g.type="button",g.className="nish-toast-close",g.setAttribute("aria-label",e.dismissLabel??e.strings?.dismiss??ue.dismiss),g.append($t(14,[["path",{d:"M18 6 6 18M6 6l12 12"}]])),g.addEventListener("click",c),n.append(g),n.addEventListener("pointerenter",p=>p.pointerType==="mouse"&&u()),n.addEventListener("pointerleave",p=>p.pointerType==="mouse"&&b()),n.addEventListener("focusin",p=>!n.contains(p.relatedTarget)&&u()),n.addEventListener("focusout",p=>!n.contains(p.relatedTarget)&&b()),n.addEventListener("keydown",p=>{p.key==="Escape"&&c()}),setTimeout(()=>{xe===c&&(t.append(n),d(l))},50),xe=c,c}var As=()=>typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function Ai(i){if(typeof document>"u")return()=>{};let e=!1,t=!1;if(i.open)return()=>s();let n=document.activeElement instanceof HTMLElement?document.activeElement:null;function s(){if(e||!i.open)return;e=!0;let p,S=()=>{i.removeEventListener("animationend",v),p!==void 0&&clearTimeout(p),i.removeAttribute("data-closing"),i.style.transform="",i.style.transition="",e=!1,i.open&&i.close()},v=H=>{H.target===i&&S()};if(As()){S();return}i.style.transform="",i.setAttribute("data-closing",""),i.addEventListener("animationend",v),p=setTimeout(S,260)}let r=p=>{p.preventDefault(),s()},o=p=>{p.key==="Escape"&&p.stopPropagation()},l=p=>{if(p.target===i){let S=i.getBoundingClientRect();p.clientX>=S.left&&p.clientX<=S.right&&p.clientY>=S.top&&p.clientY<=S.bottom||s();return}p.target instanceof Element&&p.target.closest("[data-sheet-close]")&&s()},a=0,h=0,c=0,d=0,u=1,b=p=>{if(p.pointerType==="mouse"||e||!p.isPrimary||typeof matchMedia<"u"&&matchMedia("(min-width: 640px)").matches)return;let S=i.getBoundingClientRect();!(p.target instanceof Element&&p.target.closest(".nish-sheet-header")!=null)&&p.clientY-S.top>28||(t=!0,a=h=p.clientY,c=p.timeStamp,d=0,u=S.height||1,i.style.transition="none",i.setPointerCapture?.(p.pointerId))},m=p=>{if(!t)return;let S=p.clientY-a,v=p.timeStamp-c;v>0&&(d=(p.clientY-h)/v),h=p.clientY,c=p.timeStamp,i.style.transform=`translateY(${S>=0?S:S*.3}px)`},w=p=>{if(!t)return;t=!1,i.releasePointerCapture?.(p.pointerId);let S=p.clientY-a;if(p.type!=="pointercancel"&&(S>u*.3||d>.5)){s();return}i.style.transition="transform 180ms var(--nish-ease-out, ease-out)",i.style.transform="",setTimeout(()=>{e||(i.style.transition="")},200)},g=()=>{i.removeEventListener("cancel",r),i.removeEventListener("keydown",o),i.removeEventListener("click",l),i.removeEventListener("pointerdown",b),i.removeEventListener("pointermove",m),i.removeEventListener("pointerup",w),i.removeEventListener("pointercancel",w),i.removeEventListener("close",g),n?.isConnected&&n.focus()};return i.addEventListener("cancel",r),i.addEventListener("keydown",o),i.addEventListener("click",l),i.addEventListener("pointerdown",b),i.addEventListener("pointermove",m),i.addEventListener("pointerup",w),i.addEventListener("pointercancel",w),i.addEventListener("close",g),i.showModal(),s}function Rt(i,e){if(typeof document>"u")return()=>{};let t=document.documentElement,n=()=>{let r=i.offsetHeight;r>0?t.style.setProperty(e,`${r}px`):t.style.removeProperty(e)};n();let s;return typeof ResizeObserver<"u"?(s=new ResizeObserver(n),s.observe(i)):window.addEventListener("resize",n),()=>{s?.disconnect(),window.removeEventListener("resize",n),t.style.removeProperty(e)}}function Ci(i,e={}){if(typeof document>"u")return()=>{};let t=Array.from(i.querySelectorAll('a[href^="#"]')).filter(m=>m.hash.length>1),n=m=>{try{return document.getElementById(decodeURIComponent(m.hash.slice(1)))}catch{return null}},s=e.height===!1?()=>{}:Rt(i,"--nish-sticky-extra"),r=null,o=()=>{let m=i.scrollWidth-i.clientWidth;i.dataset.atStart=String(i.scrollLeft<=1),i.dataset.atEnd=String(m<=1||i.scrollLeft>=m-1)},l=m=>{let w=m.offsetLeft-i.offsetLeft,g=i.clientWidth;w<i.scrollLeft+24?i.scrollLeft=Math.max(0,w-24):w+m.offsetWidth>i.scrollLeft+g-24&&(i.scrollLeft=w+m.offsetWidth-g+24)},a=m=>{m!==r&&(r?.removeAttribute("aria-current"),r=m,m&&(m.setAttribute("aria-current","true"),l(m)))},h=()=>{let m=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--nish-header-h"))||0,w=e.offset??m+i.offsetHeight+8,g=t[0]??null;for(let S of t){let v=n(S);v&&v.getBoundingClientRect().top<=w+1&&(g=S)}let p=document.documentElement;if(window.innerHeight+window.scrollY>=p.scrollHeight-2)for(let S of t)n(S)&&(g=S);a(g)},c=0,d=()=>{c||(c=requestAnimationFrame(()=>{c=0,h()}))},u=m=>{let w=m.target instanceof Element?m.target.closest('a[href^="#"]'):null;w&&t.includes(w)&&a(w)};o(),h(),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),i.addEventListener("scroll",o,{passive:!0}),i.addEventListener("click",u);let b;return typeof ResizeObserver<"u"&&(b=new ResizeObserver(()=>{o(),d()}),b.observe(i)),()=>{c&&cancelAnimationFrame(c),window.removeEventListener("scroll",d),window.removeEventListener("resize",d),i.removeEventListener("scroll",o),i.removeEventListener("click",u),b?.disconnect(),s(),r?.removeAttribute("aria-current"),delete i.dataset.atStart,delete i.dataset.atEnd}}var ki=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var z=function(i,e,t,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!s:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(i,t):s?s.value=t:e.set(i,t),t},R=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},fe,We,je,Se,Ot,Te,Ge,ne,Le,Y,Ke,Mi;var _={__proto__:null};_.enumerable=!0;Object.freeze(_);var Ht=(Y=class{constructor(e,t={}){if(fe.set(this,!1),We.set(this,!1),je.set(this,!1),Se.set(this,!1),Ot.set(this,Date.now()),Te.set(this,!1),Ge.set(this,void 0),ne.set(this,void 0),Le.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof t!="object"||!t)throw new Error('The "options" argument must be an object');let{bubbles:n,cancelable:s,composed:r}=t;z(this,fe,!!s,"f"),z(this,We,!!n,"f"),z(this,je,!!r,"f"),z(this,Ge,`${e}`,"f"),z(this,ne,null,"f"),z(this,Le,!1,"f")}initEvent(e,t,n){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){z(this,Se,!0,"f")}get target(){return R(this,ne,"f")}get currentTarget(){return R(this,ne,"f")}get srcElement(){return R(this,ne,"f")}get type(){return R(this,Ge,"f")}get cancelable(){return R(this,fe,"f")}get defaultPrevented(){return R(this,fe,"f")&&R(this,Se,"f")}get timeStamp(){return R(this,Ot,"f")}composedPath(){return R(this,Le,"f")?[R(this,ne,"f")]:[]}get returnValue(){return!R(this,fe,"f")||!R(this,Se,"f")}get bubbles(){return R(this,We,"f")}get composed(){return R(this,je,"f")}get eventPhase(){return R(this,Le,"f")?Y.AT_TARGET:Y.NONE}get cancelBubble(){return R(this,Te,"f")}set cancelBubble(e){e&&z(this,Te,!0,"f")}stopPropagation(){z(this,Te,!0,"f")}get isTrusted(){return!1}},fe=new WeakMap,We=new WeakMap,je=new WeakMap,Se=new WeakMap,Ot=new WeakMap,Te=new WeakMap,Ge=new WeakMap,ne=new WeakMap,Le=new WeakMap,Y.NONE=0,Y.CAPTURING_PHASE=1,Y.AT_TARGET=2,Y.BUBBLING_PHASE=3,Y);Object.defineProperties(Ht.prototype,{initEvent:_,stopImmediatePropagation:_,preventDefault:_,target:_,currentTarget:_,srcElement:_,type:_,cancelable:_,defaultPrevented:_,timeStamp:_,composedPath:_,returnValue:_,bubbles:_,composed:_,eventPhase:_,cancelBubble:_,stopPropagation:_,isTrusted:_});var _i=(Mi=class extends Ht{constructor(e,t={}){super(e,t),Ke.set(this,void 0),z(this,Ke,t?.detail??null,"f")}initCustomEvent(e,t,n,s){throw new Error("Method not implemented.")}get detail(){return R(this,Ke,"f")}},Ke=new WeakMap,Mi);Object.defineProperties(_i.prototype,{detail:_});var V=Ht,Pt=_i;var O;var no=(O=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},O.STYLE_RULE=1,O.CHARSET_RULE=2,O.IMPORT_RULE=3,O.MEDIA_RULE=4,O.FONT_FACE_RULE=5,O.PAGE_RULE=6,O.NAMESPACE_RULE=10,O.KEYFRAMES_RULE=7,O.KEYFRAME_RULE=8,O.SUPPORTS_RULE=12,O.COUNTER_STYLE_RULE=11,O.FONT_FEATURE_VALUES_RULE=14,O.MARGIN_RULE=9,O);globalThis.Event??=V;globalThis.CustomEvent??=Pt;var It=Symbol(),$i=i=>typeof i=="boolean"?i:i?.capture??!1,q={__proto__:null};q.enumerable=!0;Object.freeze(q);var Ye=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,n){if(t==null)return;let s=$i(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);if(r===void 0)r=new Map,s.set(e,r);else if(r.has(t))return;let o=typeof n=="object"&&n?n:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,n)),r.set(t,o??{})}removeEventListener(e,t,n){if(t==null)return;let s=$i(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);r!==void 0&&(r.delete(t),r.size||s.delete(e))}dispatchEvent(e){let t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));let n=!1,s=!1,r=V.NONE,o=null,l=null,a=null,h=e.stopPropagation,c=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return o??l},...q},srcElement:{get(){return e.target},...q},currentTarget:{get(){return a},...q},eventPhase:{get(){return r},...q},composedPath:{value:()=>t,...q},stopPropagation:{value:()=>{n=!0,h.call(e)},...q},stopImmediatePropagation:{value:()=>{s=!0,c.call(e)},...q}});let d=(g,p,S)=>{typeof g=="function"?g(e):typeof g?.handleEvent=="function"&&g.handleEvent(e),p.once&&S.delete(g)},u=()=>(a=null,r=V.NONE,!e.defaultPrevented),b=t.slice().reverse();o=!this.__host||!e.composed?this:null;let m=g=>{for(l=this;l.__host&&g.includes(l.__host);)l=l.__host};for(let g of b){!o&&(!l||l===g.__host)&&m(b.slice(b.indexOf(g))),a=g,r=g===e.target?V.AT_TARGET:V.CAPTURING_PHASE;let p=g.__captureEventListeners.get(e.type);if(p){for(let[S,v]of p)if(d(S,v,p),s)return u()}if(n)return u()}let w=e.bubbles?t:[this];l=null;for(let g of w){!o&&(!l||g===l.__host)&&m(w.slice(0,w.indexOf(g)+1)),a=g,r=g===e.target?V.AT_TARGET:V.BUBBLING_PHASE;let p=g.__eventListeners.get(e.type);if(p){for(let[S,v]of p)if(d(S,v,p),s)return u()}if(n)return u()}return u()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,Oi,Ms]}};var Ni=new WeakMap,Ae=i=>{let e=Ni.get(i);return e===void 0&&Ni.set(i,e=new Map),e},Ce=class extends Ye{getRootNode(e){return e?.composed?Dt:this.__host?.__shadowRoot??Dt}};var Ri=class extends Ce{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var Oi=new Ri,Dt=Oi;var Hi=class extends Ce{constructor(e){if(super(),e!==It)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:Xe,customElements:zt,document:Dt,Document:Ri,Element:Pi,EventTarget:Ye,HTMLElement:Di,Node:Ce,ShadowRoot:Ii,window:this,Window:Hi})}};var Pi=class extends Ce{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(Ae(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){Ae(this).set(e,String(t))}removeAttribute(e){Ae(this).delete(e)}toggleAttribute(e,t){if(this.hasAttribute(e)){if(t===void 0||!t)return this.removeAttribute(e),!1}else return t===void 0||t?(this.setAttribute(e,""),!0):!1;return!0}hasAttribute(e){return Ae(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;let t=new Ii(It,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new ki(this);return this.__internals=e,e}getAttribute(e){return Ae(this).get(e)??null}};var Di=class extends Pi{},Bt=Di;var Ii=class extends Ce{get host(){return this.__host}constructor(e,t){if(super(),e!==e)throw new TypeError("Illegal constructor");this.mode=t.mode}};globalThis.litServerRoot??=Object.defineProperty(new Bt,"localName",{get(){return"lit-server-root"}});function Cs(){let i,e;return{promise:new Promise((n,s)=>{i=n,e=s}),resolve:i,reject:e}}var Xe=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,t){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
|
|
1
|
+
var Qn=["emerald","indigo","amber","lime","rose","sky","violet","teal"],Ur=["accent","ok","loss","warn","info",...Qn],ce={emerald:"#34d399",indigo:"#8b93ff",amber:"#fbbf24",lime:"#a3e635",rose:"#fb7185",sky:"#38bdf8",violet:"#c084fc",teal:"#2dd4bf"},Zn={emerald:"#046d4f",indigo:"#4e45e3",amber:"#9b4708",lime:"#41690d",rose:"#b8113a",sky:"#036499",violet:"#7e22ce",teal:"#0e6b64"},es=["#8b93ff","#34d399","#fbbf24","#fb7185","#38bdf8","#c084fc","#fb923c","#a3e635"],ts=["#6366f1","#059669","#c96d06","#f43f5e","#0284c7","#a855f7","#ea580c","#5a910c"],ie=i=>Object.fromEntries(i.map((e,t)=>[`chart-${t+1}`,e])),is={dark:{label:"Dark",scheme:"dark",colors:{bg:"#0a0b0f",surface:"#111218",elevated:"#191b23",overlay:"#22252f",line:"#262935","line-strong":"#3a3e4d","line-control":"#666975",hi:"#ececf1",hi2:"#a8aab7",hi3:"#8a8d9b",ghost:"#6b6e7c",accent:"#8b93ff",accent2:"#c084fc","on-accent":"#0a0b0f",ok:"#34d399",loss:"#f87171",warn:"#fbbf24",info:"#38bdf8",scrim:"#000000","invert-bg":"#ececf1","invert-text":"#111218",...ie(es),...ce}},light:{label:"Light",scheme:"light",colors:{bg:"#f7f6f3",surface:"#ffffff",elevated:"#f1f0ec",overlay:"#e6e4de",line:"#e2e0da","line-strong":"#c9c6bd","line-control":"#8a8881",hi:"#17171c",hi2:"#4f515c",hi3:"#626470",ghost:"#8a8c98",accent:"#4338ca",accent2:"#7e22ce","on-accent":"#ffffff","on-accent2":"#ffffff","on-ok":"#0a0a0c","on-loss":"#ffffff","on-warn":"#0a0a0c","on-info":"#0a0a0c",ok:"#065f46","ok-fill":"#059669","loss-fill":"#dc2626","warn-fill":"#c96d06","info-fill":"#0284c7",loss:"#a91b1b",warn:"#92400e",info:"#075985",scrim:"#17171c","invert-bg":"#17171c","invert-text":"#f7f6f3",...ie(ts),...Zn}},slate:{label:"Slate",scheme:"dark",colors:{bg:"#18181b",surface:"#202024",elevated:"#2c2c32",overlay:"#36363d",line:"#3a3a42","line-strong":"#52525b","line-control":"#77777e",hi:"#f4f4f5",hi2:"#b8b8c0",hi3:"#a0a0a8",ghost:"#71717a",accent:"#a5b4fc",accent2:"#c084fc","on-accent":"#18181b",ok:"#4ade80",loss:"#fda4af",warn:"#facc15",info:"#38bdf8",scrim:"#000000","invert-bg":"#f4f4f5","invert-text":"#202024",...ie(["#818cf8","#4ade80","#facc15","#fb7185","#38bdf8","#c084fc","#fb923c","#a3e635"]),...ce,indigo:"#9aa1ff",rose:"#fc8395",violet:"#c792fc"}},terminal:{label:"Terminal",scheme:"dark",colors:{bg:"#050807",surface:"#0c110e",elevated:"#141c17",overlay:"#1c2820",line:"#233028","line-strong":"#34483b","line-control":"#5c6c61",hi:"#d1fae5",hi2:"#8fc4a8",hi3:"#74a68b",ghost:"#4f7a62",accent:"#34d399",accent2:"#2dd4bf","on-accent":"#050807",ok:"#4ade80",loss:"#f87171",warn:"#fbbf24",info:"#67e8f9",scrim:"#000000","invert-bg":"#d1fae5","invert-text":"#0c110e",...ie(["#34d399","#67e8f9","#fbbf24","#f87171","#a3e635","#c084fc","#fb923c","#2dd4bf"]),...ce}},mocha:{label:"Mocha",scheme:"dark",colors:{bg:"#1c1917",surface:"#292524",elevated:"#393432",overlay:"#44403c",line:"#44403c","line-strong":"#57534e","line-control":"#83807c",hi:"#f5f0eb",hi2:"#c6c0bb",hi3:"#b2ada8",ghost:"#78716c",accent:"#fdba74",accent2:"#f472b6","on-accent":"#1c1917",ok:"#4ade80",loss:"#fca5a5",warn:"#facc15",info:"#7dd3fc",scrim:"#000000","invert-bg":"#f5f0eb","invert-text":"#292524",...ie(["#fb923c","#4ade80","#facc15","#f472b6","#7dd3fc","#c4b5fd","#f87171","#bef264"]),...ce,indigo:"#a9afff",rose:"#fc99a7",sky:"#3ebff8",violet:"#cfa2fd"}},ocean:{label:"Ocean",scheme:"dark",colors:{bg:"#020c18",surface:"#061528",elevated:"#0a243e",overlay:"#103658",line:"#123050","line-strong":"#1f4a72","line-control":"#507291",hi:"#e0f2fe",hi2:"#9ccde6",hi3:"#6fa9c6",ghost:"#3f7392",accent:"#38bdf8",accent2:"#a78bfa","on-accent":"#020c18",ok:"#34d399",loss:"#fb7185",warn:"#fbbf24",info:"#7dd3fc",scrim:"#000000","invert-bg":"#38bdf8","invert-text":"#020c18",...ie(["#38bdf8","#34d399","#fbbf24","#fb7185","#a78bfa","#2dd4bf","#fb923c","#a3e635"]),...ce}},contrast:{label:"High contrast",scheme:"dark",colors:{bg:"#000000",surface:"#080808",elevated:"#141414",overlay:"#222222",line:"#4a4a4a","line-strong":"#8a8a8a","line-control":"#8a8a8a",hi:"#ffffff",hi2:"#d4d4d4",hi3:"#bdbdbd",ghost:"#8f8f8f",accent:"#ffd60a",accent2:"#7dd3fc","on-accent":"#000000",ok:"#4ade80",loss:"#ff6b6b",warn:"#ffd60a",info:"#7dd3fc",scrim:"#000000","invert-bg":"#ffffff","invert-text":"#000000",...ie(["#ffd60a","#4ade80","#7dd3fc","#ff6b6b","#c4b5fd","#fb923c","#f9a8d4","#bef264"]),...ce}}},ns=i=>{let e=i.colors,t=Object.fromEntries(["ok","loss","warn","info"].flatMap(n=>[[`${n}-fill`,e[`${n}-fill`]??e[n]],[`on-${n}`,e[`on-${n}`]??e["on-accent"]]]));return{...i,colors:{...e,...t,"on-accent2":e["on-accent2"]??e["on-accent"]}}},he=Object.fromEntries(Object.entries(is).map(([i,e])=>[i,ns(e)])),ui="dark";var ss="2.2.0";var rs=Symbol.for("nish-ui.runtime.v1");function os(){let i=globalThis;return i[rs]??={versions:new Set,slots:{}}}function as(i){i.versions.add(ss),i.versions.size>1&&!i.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(i.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...i.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var mi=!1;function de(i,e){let t=os();return mi||(mi=!0,as(t)),i in t.slots||(t.slots[i]=e()),t.slots[i]}function Ee(i){if(i==null)return null;let e=String(i),t=0,n=e.length;for(;t<n&&e.charCodeAt(t)<=32;)t++;for(;n>t&&e.charCodeAt(n-1)<=32;)n--;let s=e.slice(t,n).replace(/[\t\n\r]/g,"");if(s===""||s!==s.trim()||/[\u0000-\u001f\u007f]/.test(s))return null;let r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(s);if(!r)return s;let o=r[1].toLowerCase();return o==="http"||o==="https"||o==="mailto"||o==="tel"?s:null}var ue={close:"Close",cancel:"Cancel",menu:"Menu",back:"Back: ",contextMenu:"Actions",sortAnnounce:(i,e)=>e?`Sorted by ${i}, ${e==="asc"?"ascending":"descending"}`:"Sorting cleared",dismiss:"Dismiss",moreCount:i=>`${i} more`,copy:"Copy",copied:"Copied",hubTitle:"Back to nish.software",hubLabel:"\u2190 nish.software",moreActions:"More actions",more:"More",legend:"Legend",optional:"Optional",search:"Search",clearSearch:"Clear search",remove:"Remove",removeNamed:i=>`Remove ${i}`,noMatches:"No matches",clear:"Clear",searching:"Searching\u2026",invalidDate:"Enter a valid date.",chooseDate:"Choose date",changeDate:i=>`Change date, ${i}`,previousMonth:"Previous month",nextMonth:"Next month",month:"Month",year:"Year",dayToken:"DD",monthToken:"MM",yearToken:"YYYY",chooseDates:"Choose dates",changeDates:i=>`Change dates, ${i}`,dateRange:(i,e)=>`${i} to ${e}`,rangeStarted:i=>`Start date ${i}. Pick the end date.`,invalidDateRange:"Enter a valid date range.",hour:"Hour",minute:"Minute",dayPeriod:"AM/PM",invalidTime:"Enter a valid time.",optionAdded:i=>`Added ${i}`,optionRemoved:i=>`Removed ${i}`,clearAll:"Clear all",maxSelected:i=>`You can pick up to ${i}`,carouselRole:"carousel",slideRole:"slide",slideLabel:(i,e)=>`${i} of ${e}`,previousSlide:"Previous slide",nextSlide:"Next slide",goToSlide:i=>`Go to slide ${i}`,slidePicker:"Choose slide",startRotation:"Start slide rotation",stopRotation:"Stop slide rotation",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",loading:"Loading",failedToLoad:"Failed to load",retry:"Retry",actions:"Actions",offline:"You're offline",nothingHere:"Nothing here yet",loadingNamed:i=>`Loading ${i}`,sortBy:"Sort by",sortDefault:"Default",noData:"No data",noDataNamed:i=>`${i}: no data`,filters:"Filters",clearFilters:"Clear filters",done:"Done",activeCount:i=>`${i} active`,newCount:i=>`${i} new`,sections:"Sections",theme:"Theme",sidebar:"Sidebar",expandSidebar:"Expand sidebar",collapseSidebar:"Collapse sidebar",skipToContent:"Skip to content",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeToggleLabel:(i,e)=>`Theme: ${i}. Switch to ${e}`,themePreset:"Theme preset",themePresetPlaceholder:"Preset\u2026",errorStaleTitle:"A new version is available",errorStaleBody:"Reload the page to get the latest version.",errorTitle:"Something went wrong",errorBody:"An unexpected error occurred.",errorDetails:"Details",errorTryAgain:"Try again",errorReload:"Reload page",saving:"Saving\u2026",saved:"Saved",saveFailed:"Could not save",enterNumber:"Enter a number",resizeColumns:"Resize columns",resizeRows:"Resize rows",layoutPresets:"Layout presets",live:"Live",offlineBadge:"Offline",progress:"Progress",workflow:"Workflow",activity:"Activity",other:"Other",waiting:"Waiting",noActivity:"No activity yet",systemMap:"System map",zoomOut:"Zoom out",zoomIn:"Zoom in",fitToScreen:"Fit to screen",followActivity:"Follow activity",canvasLines:"Lines",serviceTokens:"Service tokens",serviceTokensIntro:"Machine clients, like the nish MCP server, use these tokens to read this app. Revoking one stops it at once.",loadingServiceTokens:"Loading service tokens",tokenRevoke:"Revoke",tokenRevoked:"Revoked",tokenRevokedAt:i=>`Revoked ${i}`,tokenRevokeNamed:i=>`Revoke ${i}`,tokenRevokeTitle:i=>`Revoke ${i}?`,tokenRevokeFailed:"Could not revoke the token.",inboxMarkHandled:"Mark handled",inboxSnooze:"Snooze",inboxActions:"Actions",inboxViews:"Inbox views",inboxOpen:"Open",inboxSnoozed:"Snoozed",inboxHandled:"Handled",inboxFilterBySource:"Filter by source",inboxHappened:i=>`Happened ${i} times`,previousPage:"Previous page",nextPage:"Next page",pageLabel:i=>`Page ${i}`,paginationLabel:"Pagination",breadcrumbs:"Breadcrumbs",removeTag:i=>`Remove ${i}`,dropzoneLabel:"Drop files here or browse",browseFiles:"Browse files",removeFile:i=>`Remove ${i}`,avatar:"Avatar",avatarMore:i=>`${i} more`,sliderMin:"Minimum",sliderMax:"Maximum",accordion:"Accordion",progressIndeterminate:"Loading"};var pi="nish-theme",fi="nish.software",ls=3600*24*365,me=()=>de("theme",()=>({extra:{},listeners:new Set,watching:!1,switchId:0})),cs=i=>{globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`nish-ui: ${i}`)};function qe(){if(typeof document>"u")return pi;let i=document.documentElement.getAttribute("data-nish-storage-key");return i&&/^[A-Za-z0-9_-]+$/.test(i)?i:pi}var we=(i,e)=>Object.prototype.hasOwnProperty.call(i,e);function Nt(i){return typeof i=="string"&&(we(he,i)||we(me().extra,i))}function hs(){if(typeof document>"u")return null;try{let i=document.cookie.match(new RegExp(`(?:^|;\\s*)${qe()}=([a-z0-9-]+)`));return i?i[1]:null}catch{return null}}var bi=(i,e)=>e===i||e.endsWith("."+i);function ds(i,e){let t=i.toLowerCase(),n=(e??"").trim().toLowerCase().replace(/^\./,"");return n?bi(n,t)?n:null:bi(fi,t)?fi:null}function us(){return typeof location>"u"||typeof document>"u"?null:ds(location.hostname,document.documentElement.getAttribute("data-nish-domain"))}function pe(){let i=null;try{i=hs()??localStorage.getItem(qe())}catch{}return i==="system"||Nt(i)?i:"system"}function ms(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: light)").matches?"light":ui}function ps(){let i=document.documentElement.getAttribute("data-nish-themes");return i?i.split(/\s+/).filter(Nt):null}function xi(i=pe()){let e=i==="system"?ms():i,t=typeof document>"u"?null:ps();return t&&!t.includes(e)&&(e=Ve(e)),e}function Ve(i){let{extra:e}=me();return we(he,i)?he[i].scheme:we(e,i)?e[i]:"dark"}function wi(i=pe()){let e=xi(i),t=document.documentElement,n=t.getAttribute("data-theme");return n&&n!==e&&fs(t),t.setAttribute("data-theme",e),t.setAttribute("data-scheme",Ve(e)),t.setAttribute("data-theme-choice",i),t.style.colorScheme=Ve(e),vs(),me().listeners.forEach(s=>s(i,e)),e}function fs(i){let e=me(),t=++e.switchId;i.setAttribute("data-nish-theme-switching","");let n=()=>{e.switchId===t&&i.removeAttribute("data-nish-theme-switching")};typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>requestAnimationFrame(n)):setTimeout(n,32)}function bs(i){if(i!=="system"&&!Nt(i))return cs(`unknown theme "${String(i)}" ignored. Register it with registerThemes() first.`),xi(pe());let e=qe();try{localStorage.setItem(e,i)}catch{}try{let t=us();if(t){let n=location.protocol==="https:"?"; Secure":"";document.cookie=`${e}=${i}; Domain=.${t}; Path=/; Max-Age=${ls}; SameSite=Lax${n}`}}catch{}return wi(i)}function gs(i){return getComputedStyle(document.documentElement).getPropertyValue(`--nish-${i}`).trim()}function vs(){let i=gs("bg");if(!i)return;let e=document.querySelector('meta[name="theme-color"][data-nish]')??document.querySelector('meta[name="theme-color"]:not([media]):not([data-nish-keep])');e||(e=document.createElement("meta"),e.name="theme-color",(document.head||document.documentElement).appendChild(e)),e.setAttribute("data-nish",""),e.content=i}function ys(){let i=me();if(i.watching||typeof window>"u")return;i.watching=!0;let e=()=>{let t=pe();(t!==document.documentElement.getAttribute("data-theme-choice")||t==="system")&&wi(t)};typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: light)").addEventListener("change",e),window.addEventListener("storage",t=>{t.key===qe()&&e()}),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function Es(i){ys();let{listeners:e}=me();return e.add(i),()=>{e.delete(i)}}var Ue=["system","light","dark"];function xs(){let i=Si(pe());return bs(i),i}var gi="http://www.w3.org/2000/svg";function $t(i,e,t={}){let n=document.createElementNS(gi,"svg"),s={width:String(i),height:String(i),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false",...t};for(let r of Object.keys(s))n.setAttribute(r,s[r]);for(let[r,o]of e){let l=document.createElementNS(gi,r);for(let a of Object.keys(o))l.setAttribute(a,o[a]);n.appendChild(l)}return n}var vi={system:[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["path",{d:"M8 21h8M12 17v4"}]],light:[["circle",{cx:"12",cy:"12",r:"4"}],["path",{d:"M12 2v2M12 20v2m-7.07-2.93 1.41-1.41M17.66 6.34l1.41-1.41M2 12h2m16 0h2M4.93 4.93l1.41 1.41m11.32 11.32 1.41 1.41"}]],dark:[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9"}]]},ws=()=>({system:ue.themeSystem,light:ue.themeLight,dark:ue.themeDark}),Ss="set on another site";function Si(i){let e=Ue.indexOf(i);return Ue[(e+1)%Ue.length]}function _t(i,e){return i==="system"||i==="light"||i==="dark"?e[i]:we(he,i)?he[i].label:i.charAt(0).toUpperCase()+i.slice(1)}function Ti(i,e={}){let t={...ws(),...e.labels},n=e.strings?.themeToggleLabel??ue.themeToggleLabel,s=e.elsewhereLabel??Ss;i.tagName==="BUTTON"&&!i.getAttribute("type")&&i.setAttribute("type","button");let r=Object.keys(vi).map(c=>$t(16,vi[c],{"data-icon":c}));if(e.showLabel){let c=document.createElement("span");c.setAttribute("data-theme-word",""),c.setAttribute("aria-hidden","true"),r.push(c)}i.replaceChildren(...r);let o=i.querySelector("[data-theme-word]"),l=c=>{let d=c==="system"||c==="light"||c==="dark"?c:Ve(c);i.setAttribute("data-choice",c),i.querySelectorAll("svg[data-icon]").forEach(m=>{m.getAttribute("data-icon")===d?m.removeAttribute("display"):m.setAttribute("display","none")});let u=Ue.includes(c)?"":` (${s})`,b=n(`${_t(c,t)}${u}`,_t(Si(c),t));i.setAttribute("aria-label",b),i.setAttribute("title",b),o&&(o.textContent=_t(c,t))},a=()=>{xs()};i.addEventListener("click",a);let h=Es(c=>l(c));return l(pe()),()=>{i.removeEventListener("click",a),h()}}var yi=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4M12 17h.01"}]],Ei=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4M12 8h.01"}]],Ts={neutral:Ei,info:Ei,ok:[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]],warn:yi,loss:yi},Ls=6e3,K=null,xe=null;function Li(i,e={}){xe?.(),(!K||!K.isConnected)&&(K=document.createElement("div"),K.setAttribute("role","status"),K.setAttribute("aria-live","polite"),K.className="nish-toast-region",document.body.appendChild(K));let t=K,n=document.createElement("div");n.className="nish-toast"+(e.tone&&e.tone!=="neutral"?` nish-toast--${e.tone}`:"");let s=document.createElement("span");s.className="nish-toast-icon",s.setAttribute("aria-hidden","true"),s.append($t(15,Ts[e.tone??"neutral"])),n.append(s);let r=document.createElement("p");r.className="nish-toast-body",r.append(typeof i=="string"?document.createTextNode(i):i),n.append(r);let o=null,l=e.duration==="sticky"?1/0:e.duration??Ls,a=0,h=0,c=()=>{o!=null&&clearTimeout(o),o=null,n.remove(),xe===c&&(xe=null)},d=p=>{Number.isFinite(p)&&(a=Date.now(),o=setTimeout(c,p))},u=()=>{h+=1,!(h>1||o==null)&&(clearTimeout(o),o=null,l=Math.max(0,l-(Date.now()-a)))},b=()=>{h!==0&&(h-=1,h===0&&d(Math.max(l,1e3)))},m=e.action,w=m?.href!=null?Ee(m.href):null;if(m&&(m.href==null||w!=null)){let p=document.createElement(m.href!=null?"a":"button");p.className="nish-toast-action",p.textContent=m.label,w!=null?p.href=w:p.type="button",p.addEventListener("click",()=>{m.onClick?.(),c()}),n.append(p)}let g=document.createElement("button");return g.type="button",g.className="nish-toast-close",g.setAttribute("aria-label",e.dismissLabel??e.strings?.dismiss??ue.dismiss),g.append($t(14,[["path",{d:"M18 6 6 18M6 6l12 12"}]])),g.addEventListener("click",c),n.append(g),n.addEventListener("pointerenter",p=>p.pointerType==="mouse"&&u()),n.addEventListener("pointerleave",p=>p.pointerType==="mouse"&&b()),n.addEventListener("focusin",p=>!n.contains(p.relatedTarget)&&u()),n.addEventListener("focusout",p=>!n.contains(p.relatedTarget)&&b()),n.addEventListener("keydown",p=>{p.key==="Escape"&&c()}),setTimeout(()=>{xe===c&&(t.append(n),d(l))},50),xe=c,c}var As=()=>typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function Ai(i){if(typeof document>"u")return()=>{};let e=!1,t=!1;if(i.open)return()=>s();let n=document.activeElement instanceof HTMLElement?document.activeElement:null;function s(){if(e||!i.open)return;e=!0;let p,S=()=>{i.removeEventListener("animationend",v),p!==void 0&&clearTimeout(p),i.removeAttribute("data-closing"),i.style.transform="",i.style.transition="",e=!1,i.open&&i.close()},v=H=>{H.target===i&&S()};if(As()){S();return}i.style.transform="",i.setAttribute("data-closing",""),i.addEventListener("animationend",v),p=setTimeout(S,260)}let r=p=>{p.preventDefault(),s()},o=p=>{p.key==="Escape"&&p.stopPropagation()},l=p=>{if(p.target===i){let S=i.getBoundingClientRect();p.clientX>=S.left&&p.clientX<=S.right&&p.clientY>=S.top&&p.clientY<=S.bottom||s();return}p.target instanceof Element&&p.target.closest("[data-sheet-close]")&&s()},a=0,h=0,c=0,d=0,u=1,b=p=>{if(p.pointerType==="mouse"||e||!p.isPrimary||typeof matchMedia<"u"&&matchMedia("(min-width: 640px)").matches)return;let S=i.getBoundingClientRect();!(p.target instanceof Element&&p.target.closest(".nish-sheet-header")!=null)&&p.clientY-S.top>28||(t=!0,a=h=p.clientY,c=p.timeStamp,d=0,u=S.height||1,i.style.transition="none",i.setPointerCapture?.(p.pointerId))},m=p=>{if(!t)return;let S=p.clientY-a,v=p.timeStamp-c;v>0&&(d=(p.clientY-h)/v),h=p.clientY,c=p.timeStamp,i.style.transform=`translateY(${S>=0?S:S*.3}px)`},w=p=>{if(!t)return;t=!1,i.releasePointerCapture?.(p.pointerId);let S=p.clientY-a;if(p.type!=="pointercancel"&&(S>u*.3||d>.5)){s();return}i.style.transition="transform 180ms var(--nish-ease-out, ease-out)",i.style.transform="",setTimeout(()=>{e||(i.style.transition="")},200)},g=()=>{i.removeEventListener("cancel",r),i.removeEventListener("keydown",o),i.removeEventListener("click",l),i.removeEventListener("pointerdown",b),i.removeEventListener("pointermove",m),i.removeEventListener("pointerup",w),i.removeEventListener("pointercancel",w),i.removeEventListener("close",g),n?.isConnected&&n.focus()};return i.addEventListener("cancel",r),i.addEventListener("keydown",o),i.addEventListener("click",l),i.addEventListener("pointerdown",b),i.addEventListener("pointermove",m),i.addEventListener("pointerup",w),i.addEventListener("pointercancel",w),i.addEventListener("close",g),i.showModal(),s}function Rt(i,e){if(typeof document>"u")return()=>{};let t=document.documentElement,n=()=>{let r=i.offsetHeight;r>0?t.style.setProperty(e,`${r}px`):t.style.removeProperty(e)};n();let s;return typeof ResizeObserver<"u"?(s=new ResizeObserver(n),s.observe(i)):window.addEventListener("resize",n),()=>{s?.disconnect(),window.removeEventListener("resize",n),t.style.removeProperty(e)}}function Ci(i,e={}){if(typeof document>"u")return()=>{};let t=Array.from(i.querySelectorAll('a[href^="#"]')).filter(m=>m.hash.length>1),n=m=>{try{return document.getElementById(decodeURIComponent(m.hash.slice(1)))}catch{return null}},s=e.height===!1?()=>{}:Rt(i,"--nish-sticky-extra"),r=null,o=()=>{let m=i.scrollWidth-i.clientWidth;i.dataset.atStart=String(i.scrollLeft<=1),i.dataset.atEnd=String(m<=1||i.scrollLeft>=m-1)},l=m=>{let w=m.offsetLeft-i.offsetLeft,g=i.clientWidth;w<i.scrollLeft+24?i.scrollLeft=Math.max(0,w-24):w+m.offsetWidth>i.scrollLeft+g-24&&(i.scrollLeft=w+m.offsetWidth-g+24)},a=m=>{m!==r&&(r?.removeAttribute("aria-current"),r=m,m&&(m.setAttribute("aria-current","true"),l(m)))},h=()=>{let m=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--nish-header-h"))||0,w=e.offset??m+i.offsetHeight+8,g=t[0]??null;for(let S of t){let v=n(S);v&&v.getBoundingClientRect().top<=w+1&&(g=S)}let p=document.documentElement;if(window.innerHeight+window.scrollY>=p.scrollHeight-2)for(let S of t)n(S)&&(g=S);a(g)},c=0,d=()=>{c||(c=requestAnimationFrame(()=>{c=0,h()}))},u=m=>{let w=m.target instanceof Element?m.target.closest('a[href^="#"]'):null;w&&t.includes(w)&&a(w)};o(),h(),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),i.addEventListener("scroll",o,{passive:!0}),i.addEventListener("click",u);let b;return typeof ResizeObserver<"u"&&(b=new ResizeObserver(()=>{o(),d()}),b.observe(i)),()=>{c&&cancelAnimationFrame(c),window.removeEventListener("scroll",d),window.removeEventListener("resize",d),i.removeEventListener("scroll",o),i.removeEventListener("click",u),b?.disconnect(),s(),r?.removeAttribute("aria-current"),delete i.dataset.atStart,delete i.dataset.atEnd}}var ki=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var z=function(i,e,t,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!s:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(i,t):s?s.value=t:e.set(i,t),t},R=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},fe,We,je,Se,Ot,Te,Ge,ne,Le,Y,Ke,Mi;var _={__proto__:null};_.enumerable=!0;Object.freeze(_);var Ht=(Y=class{constructor(e,t={}){if(fe.set(this,!1),We.set(this,!1),je.set(this,!1),Se.set(this,!1),Ot.set(this,Date.now()),Te.set(this,!1),Ge.set(this,void 0),ne.set(this,void 0),Le.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof t!="object"||!t)throw new Error('The "options" argument must be an object');let{bubbles:n,cancelable:s,composed:r}=t;z(this,fe,!!s,"f"),z(this,We,!!n,"f"),z(this,je,!!r,"f"),z(this,Ge,`${e}`,"f"),z(this,ne,null,"f"),z(this,Le,!1,"f")}initEvent(e,t,n){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){z(this,Se,!0,"f")}get target(){return R(this,ne,"f")}get currentTarget(){return R(this,ne,"f")}get srcElement(){return R(this,ne,"f")}get type(){return R(this,Ge,"f")}get cancelable(){return R(this,fe,"f")}get defaultPrevented(){return R(this,fe,"f")&&R(this,Se,"f")}get timeStamp(){return R(this,Ot,"f")}composedPath(){return R(this,Le,"f")?[R(this,ne,"f")]:[]}get returnValue(){return!R(this,fe,"f")||!R(this,Se,"f")}get bubbles(){return R(this,We,"f")}get composed(){return R(this,je,"f")}get eventPhase(){return R(this,Le,"f")?Y.AT_TARGET:Y.NONE}get cancelBubble(){return R(this,Te,"f")}set cancelBubble(e){e&&z(this,Te,!0,"f")}stopPropagation(){z(this,Te,!0,"f")}get isTrusted(){return!1}},fe=new WeakMap,We=new WeakMap,je=new WeakMap,Se=new WeakMap,Ot=new WeakMap,Te=new WeakMap,Ge=new WeakMap,ne=new WeakMap,Le=new WeakMap,Y.NONE=0,Y.CAPTURING_PHASE=1,Y.AT_TARGET=2,Y.BUBBLING_PHASE=3,Y);Object.defineProperties(Ht.prototype,{initEvent:_,stopImmediatePropagation:_,preventDefault:_,target:_,currentTarget:_,srcElement:_,type:_,cancelable:_,defaultPrevented:_,timeStamp:_,composedPath:_,returnValue:_,bubbles:_,composed:_,eventPhase:_,cancelBubble:_,stopPropagation:_,isTrusted:_});var _i=(Mi=class extends Ht{constructor(e,t={}){super(e,t),Ke.set(this,void 0),z(this,Ke,t?.detail??null,"f")}initCustomEvent(e,t,n,s){throw new Error("Method not implemented.")}get detail(){return R(this,Ke,"f")}},Ke=new WeakMap,Mi);Object.defineProperties(_i.prototype,{detail:_});var V=Ht,Pt=_i;var O;var no=(O=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},O.STYLE_RULE=1,O.CHARSET_RULE=2,O.IMPORT_RULE=3,O.MEDIA_RULE=4,O.FONT_FACE_RULE=5,O.PAGE_RULE=6,O.NAMESPACE_RULE=10,O.KEYFRAMES_RULE=7,O.KEYFRAME_RULE=8,O.SUPPORTS_RULE=12,O.COUNTER_STYLE_RULE=11,O.FONT_FEATURE_VALUES_RULE=14,O.MARGIN_RULE=9,O);globalThis.Event??=V;globalThis.CustomEvent??=Pt;var It=Symbol(),$i=i=>typeof i=="boolean"?i:i?.capture??!1,q={__proto__:null};q.enumerable=!0;Object.freeze(q);var Ye=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,n){if(t==null)return;let s=$i(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);if(r===void 0)r=new Map,s.set(e,r);else if(r.has(t))return;let o=typeof n=="object"&&n?n:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,n)),r.set(t,o??{})}removeEventListener(e,t,n){if(t==null)return;let s=$i(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);r!==void 0&&(r.delete(t),r.size||s.delete(e))}dispatchEvent(e){let t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));let n=!1,s=!1,r=V.NONE,o=null,l=null,a=null,h=e.stopPropagation,c=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return o??l},...q},srcElement:{get(){return e.target},...q},currentTarget:{get(){return a},...q},eventPhase:{get(){return r},...q},composedPath:{value:()=>t,...q},stopPropagation:{value:()=>{n=!0,h.call(e)},...q},stopImmediatePropagation:{value:()=>{s=!0,c.call(e)},...q}});let d=(g,p,S)=>{typeof g=="function"?g(e):typeof g?.handleEvent=="function"&&g.handleEvent(e),p.once&&S.delete(g)},u=()=>(a=null,r=V.NONE,!e.defaultPrevented),b=t.slice().reverse();o=!this.__host||!e.composed?this:null;let m=g=>{for(l=this;l.__host&&g.includes(l.__host);)l=l.__host};for(let g of b){!o&&(!l||l===g.__host)&&m(b.slice(b.indexOf(g))),a=g,r=g===e.target?V.AT_TARGET:V.CAPTURING_PHASE;let p=g.__captureEventListeners.get(e.type);if(p){for(let[S,v]of p)if(d(S,v,p),s)return u()}if(n)return u()}let w=e.bubbles?t:[this];l=null;for(let g of w){!o&&(!l||g===l.__host)&&m(w.slice(0,w.indexOf(g)+1)),a=g,r=g===e.target?V.AT_TARGET:V.BUBBLING_PHASE;let p=g.__eventListeners.get(e.type);if(p){for(let[S,v]of p)if(d(S,v,p),s)return u()}if(n)return u()}return u()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,Oi,Ms]}};var Ni=new WeakMap,Ae=i=>{let e=Ni.get(i);return e===void 0&&Ni.set(i,e=new Map),e},Ce=class extends Ye{getRootNode(e){return e?.composed?Dt:this.__host?.__shadowRoot??Dt}};var Ri=class extends Ce{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var Oi=new Ri,Dt=Oi;var Hi=class extends Ce{constructor(e){if(super(),e!==It)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:Xe,customElements:zt,document:Dt,Document:Ri,Element:Pi,EventTarget:Ye,HTMLElement:Di,Node:Ce,ShadowRoot:Ii,window:this,Window:Hi})}};var Pi=class extends Ce{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(Ae(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){Ae(this).set(e,String(t))}removeAttribute(e){Ae(this).delete(e)}toggleAttribute(e,t){if(this.hasAttribute(e)){if(t===void 0||!t)return this.removeAttribute(e),!1}else return t===void 0||t?(this.setAttribute(e,""),!0):!1;return!0}hasAttribute(e){return Ae(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;let t=new Ii(It,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new ki(this);return this.__internals=e,e}getAttribute(e){return Ae(this).get(e)??null}};var Di=class extends Pi{},Bt=Di;var Ii=class extends Ce{get host(){return this.__host}constructor(e,t){if(super(),e!==e)throw new TypeError("Illegal constructor");this.mode=t.mode}};globalThis.litServerRoot??=Object.defineProperty(new Bt,"localName",{get(){return"lit-server-root"}});function Cs(){let i,e;return{promise:new Promise((n,s)=>{i=n,e=s}),resolve:i,reject:e}}var Xe=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,t){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
|
|
2
2
|
Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:t.observedAttributes??[]}),this.__reverseDefinitions.set(t,e),this.__pendingWhenDefineds.get(e)?.resolve(t),this.__pendingWhenDefineds.delete(e)}get(e){return this.__definitions.get(e)?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}initialize(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){let t=this.__definitions.get(e);if(t)return t.ctor;let n=this.__pendingWhenDefineds.get(e);return n||(n=Cs(),this.__pendingWhenDefineds.set(e,n)),n.promise}},ks=Xe;var zt=new ks,Ms=new Hi(It);var ke=globalThis,Qe=ke.ShadowRoot&&(ke.ShadyCSS===void 0||ke.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zi=Symbol(),Bi=new WeakMap,Je=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==zi)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Qe&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=Bi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Bi.set(t,e))}return e}toString(){return this.cssText}},Fi=i=>new Je(typeof i=="string"?i:i+"",void 0,zi);var Ui=(i,e)=>{if(Qe)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let n=document.createElement("style"),s=ke.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=t.cssText,i.appendChild(n)}},Ft=Qe||ke.CSSStyleSheet===void 0?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return Fi(t)})(i):i;var{is:_s,defineProperty:$s,getOwnPropertyDescriptor:Ns,getOwnPropertyNames:Rs,getOwnPropertySymbols:Os,getPrototypeOf:Hs}=Object,_e=globalThis;_e.customElements??=zt;var Vi=_e.trustedTypes,Ps=Vi?Vi.emptyScript:"",Ds=_e.reactiveElementPolyfillSupport,Me=(i,e)=>i,Ut={toAttribute(i,e){switch(e){case Boolean:i=i?Ps:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Wi=(i,e)=>!_s(i,e),qi={attribute:!0,type:String,converter:Ut,reflect:!1,useDefault:!1,hasChanged:Wi};Symbol.metadata??=Symbol("metadata"),_e.litPropertyMetadata??=new WeakMap;var W=class extends(globalThis.HTMLElement??Bt){static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=qi){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),s=this.getPropertyDescriptor(e,n,t);s!==void 0&&$s(this.prototype,e,s)}}static getPropertyDescriptor(e,t,n){let{get:s,set:r}=Ns(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){let l=s?.call(this);r?.call(this,o),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??qi}static _$Ei(){if(this.hasOwnProperty(Me("elementProperties")))return;let e=Hs(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Me("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Me("properties"))){let t=this.properties,n=[...Rs(t),...Os(t)];for(let s of n)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[n,s]of t)this.elementProperties.set(n,s)}this._$Eh=new Map;for(let[t,n]of this.elementProperties){let s=this._$Eu(t,n);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let s of n)t.unshift(Ft(s))}else e!==void 0&&t.push(Ft(e));return t}static _$Eu(e,t){let n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ui(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,n);if(s!==void 0&&n.reflect===!0){let r=(n.converter?.toAttribute!==void 0?n.converter:Ut).toAttribute(t,n.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){let n=this.constructor,s=n._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let r=n.getPropertyOptions(s),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:Ut;this._$Em=s;let l=o.fromAttribute(t,r.type);this[s]=l??this._$Ej?.get(s)??l,this._$Em=null}}requestUpdate(e,t,n,s=!1,r){if(e!==void 0){let o=this.constructor;if(s===!1&&(r=this[e]),n??=o.getPropertyOptions(e),!((n.hasChanged??Wi)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,n))))return;this.C(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:s,wrapped:r},o){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[s,r]of n){let{wrapped:o}=r,l=this[s];o!==!0||this._$AL.has(s)||l===void 0||this.C(s,void 0,r,l)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(t)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};W.elementStyles=[],W.shadowRootOptions={mode:"open"},W[Me("elementProperties")]=new Map,W[Me("finalized")]=new Map,Ds?.({ReactiveElement:W}),(_e.reactiveElementVersions??=[]).push("2.1.2");var et=globalThis,ji=i=>i,Ze=et.trustedTypes,Gi=Ze?Ze.createPolicy("lit-html",{createHTML:i=>i}):void 0,Zi="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,en="?"+X,Is=`<${en}>`,oe=et.document===void 0?{createTreeWalker:()=>({})}:document,Ne=()=>oe.createComment(""),Re=i=>i===null||typeof i!="object"&&typeof i!="function",Yt=Array.isArray,Bs=i=>Yt(i)||typeof i?.[Symbol.iterator]=="function",Vt=`[
|
|
3
3
|
\f\r]`,$e=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ki=/-->/g,Yi=/>/g,se=RegExp(`>|${Vt}(?:([^\\s"'>=/]+)(${Vt}*=${Vt}*(?:[^
|
|
4
4
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),Xi=/'/g,Ji=/"/g,tn=/^(?:script|style|textarea|title)$/i,Xt=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),C=Xt(1),M=Xt(2),Io=Xt(3),ae=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),Qi=new WeakMap,re=oe.createTreeWalker(oe,129);function nn(i,e){if(!Yt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Gi!==void 0?Gi.createHTML(e):e}var zs=(i,e)=>{let t=i.length-1,n=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=$e;for(let l=0;l<t;l++){let a=i[l],h,c,d=-1,u=0;for(;u<a.length&&(o.lastIndex=u,c=o.exec(a),c!==null);)u=o.lastIndex,o===$e?c[1]==="!--"?o=Ki:c[1]!==void 0?o=Yi:c[2]!==void 0?(tn.test(c[2])&&(s=RegExp("</"+c[2],"g")),o=se):c[3]!==void 0&&(o=se):o===se?c[0]===">"?(o=s??$e,d=-1):c[1]===void 0?d=-2:(d=o.lastIndex-c[2].length,h=c[1],o=c[3]===void 0?se:c[3]==='"'?Ji:Xi):o===Ji||o===Xi?o=se:o===Ki||o===Yi?o=$e:(o=se,s=void 0);let b=o===se&&i[l+1].startsWith("/>")?" ":"";r+=o===$e?a+Is:d>=0?(n.push(h),a.slice(0,d)+Zi+a.slice(d)+X+b):a+X+(d===-2?l:b)}return[nn(i,r+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},Oe=class i{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,o=0,l=e.length-1,a=this.parts,[h,c]=zs(e,t);if(this.el=i.createElement(h,n),re.currentNode=this.el.content,t===2||t===3){let d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(s=re.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let d of s.getAttributeNames())if(d.endsWith(Zi)){let u=c[o++],b=s.getAttribute(d).split(X),m=/([.?@])?(.*)/.exec(u);a.push({type:1,index:r,name:m[2],strings:b,ctor:m[1]==="."?Wt:m[1]==="?"?jt:m[1]==="@"?Gt:ge}),s.removeAttribute(d)}else d.startsWith(X)&&(a.push({type:6,index:r}),s.removeAttribute(d));if(tn.test(s.tagName)){let d=s.textContent.split(X),u=d.length-1;if(u>0){s.textContent=Ze?Ze.emptyScript:"";for(let b=0;b<u;b++)s.append(d[b],Ne()),re.nextNode(),a.push({type:2,index:++r});s.append(d[u],Ne())}}}else if(s.nodeType===8)if(s.data===en)a.push({type:2,index:r});else{let d=-1;for(;(d=s.data.indexOf(X,d+1))!==-1;)a.push({type:7,index:r}),d+=X.length-1}r++}}static createElement(e,t){let n=oe.createElement("template");return n.innerHTML=e,n}};function be(i,e,t=i,n){if(e===ae)return e;let s=n!==void 0?t._$Co?.[n]:t._$Cl,r=Re(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(i),s._$AT(i,t,n)),n!==void 0?(t._$Co??=[])[n]=s:t._$Cl=s),s!==void 0&&(e=be(i,s._$AS(i,e.values),s,n)),e}var qt=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,s=(e?.creationScope??oe).importNode(t,!0);re.currentNode=s;let r=re.nextNode(),o=0,l=0,a=n[0];for(;a!==void 0;){if(o===a.index){let h;a.type===2?h=new He(r,r.nextSibling,this,e):a.type===1?h=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(h=new Kt(r,this,e)),this._$AV.push(h),a=n[++l]}o!==a?.index&&(r=re.nextNode(),o++)}return re.currentNode=oe,s}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},He=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,s){this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=be(this,e,t),Re(e)?e===y||e==null||e===""?(this._$AH!==y&&this._$AR(),this._$AH=y):e!==this._$AH&&e!==ae&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Bs(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==y&&Re(this._$AH)?this._$AA.nextSibling.data=e:this.T(oe.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Oe.createElement(nn(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(t);else{let r=new qt(s,this),o=r.u(this.options);r.p(t),this.T(o),this._$AH=r}}_$AC(e){let t=Qi.get(e.strings);return t===void 0&&Qi.set(e.strings,t=new Oe(e)),t}k(e){Yt(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,s=0;for(let r of e)s===t.length?t.push(n=new i(this.O(Ne()),this.O(Ne()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let n=ji(e).nextSibling;ji(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},ge=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,s,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=y}_$AI(e,t=this,n,s){let r=this.strings,o=!1;if(r===void 0)e=be(this,e,t,0),o=!Re(e)||e!==this._$AH&&e!==ae,o&&(this._$AH=e);else{let l=e,a,h;for(e=r[0],a=0;a<r.length-1;a++)h=be(this,l[n+a],t,a),h===ae&&(h=this._$AH[a]),o||=!Re(h)||h!==this._$AH[a],h===y?e=y:e!==y&&(e+=(h??"")+r[a+1]),this._$AH[a]=h}o&&!s&&this.j(e)}j(e){e===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},Wt=class extends ge{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===y?void 0:e}},jt=class extends ge{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==y)}},Gt=class extends ge{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){if((e=be(this,e,t,0)??y)===ae)return;let n=this._$AH,s=e===y&&n!==y||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==y&&(n===y||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},Kt=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){be(this,e)}};var Fs=et.litHtmlPolyfillSupport;Fs?.(Oe,He),(et.litHtmlVersions??=[]).push("3.3.3");var sn=(i,e,t)=>{let n=t?.renderBefore??e,s=n._$litPart$;if(s===void 0){let r=t?.renderBefore??null;n._$litPart$=s=new He(e.insertBefore(Ne(),r),r,void 0,t??{})}return s._$AI(i),s};var Jt=globalThis,J=class extends W{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=sn(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ae}};J._$litElement$=!0,J.finalized=!0,Jt.litElementHydrateSupport?.({LitElement:J});var Us=Jt.litElementPolyfillSupport;Us?.({LitElement:J});(Jt.litElementVersions??=[]).push("4.2.2");var rn={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:i=>`${i} result${i===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:i=>`${i} active`,remove:"Remove",removeNamed:i=>`Remove ${i}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:i=>`${i}: no data`,seriesNumber:i=>`Series ${i}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark"};function Qt(){return de("element-strings",()=>({values:{...rn},listeners:new Set}))}function Vs(i){let e=Qt(),t={...e.values};for(let[n,s]of Object.entries(i))s!==void 0&&Object.hasOwn(rn,n)&&(t[n]=s);e.values=t;for(let n of Array.from(e.listeners))n()}function T(){return Qt().values}function on(i){let e=Qt().listeners;return e.add(i),()=>{e.delete(i)}}var E=class extends J{#e=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#e??=on(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=null}stringsChanged(){this.requestUpdate()}};function k(i){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i,{once:!0}):i()}function x(i,e){customElements.get(i)||customElements.define(i,e)}function Q(i){return!!i&&getComputedStyle(i).direction==="rtl"}function tt(i,e){let t=null,n=()=>Array.from(i.querySelectorAll(":scope > a")),s=()=>{let o=location.pathname,l=null,a=-1;for(let h of n()){if(e?.(h),!h.getAttribute("href"))continue;let c;try{c=new URL(h.getAttribute("href"),location.href)}catch{continue}if(c.origin!==location.origin)continue;if(c.hash&&c.pathname===location.pathname){c.hash===location.hash&&(l=h,a=1/0);continue}let d=c.pathname;(d==="/"?o==="/":o===d||o.startsWith(d.endsWith("/")?d:`${d}/`))&&d.length>a&&(l=h,a=d.length)}if(!l){t?.removeAttribute("aria-current"),t=null;return}for(let h of n())h.removeAttribute("aria-current");l.setAttribute("aria-current","page"),t=l},r=new MutationObserver(()=>{r.disconnect(),s(),r.observe(i,{childList:!0})});return s(),window.addEventListener("popstate",s),window.addEventListener("hashchange",s),r.observe(i,{childList:!0}),()=>{window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s),r.disconnect()}}var it=class extends E{static properties={label:{type:String,reflect:!0},lg:{type:Boolean,reflect:!0}};#e=null;#i=null;#t=null;constructor(){super(),this.label="",this.lg=!1}connectedCallback(){super.connectedCallback(),k(()=>this.#n())}#n(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > nav.nish-bottom-nav");if(!e){for(e=document.createElement("nav"),e.className="nish-bottom-nav";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#r(),this.#t=tt(e,t=>t.classList.add("nish-bottom-nav-item")),this.#i=Rt(e,"--nish-bottom-nav-h")}disconnectedCallback(){super.disconnectedCallback(),this.#e=null,this.#t?.(),this.#t=null,this.#i?.(),this.#i=null}updated(e){this.#r()}#r(){this.#e&&(this.#e.setAttribute("aria-label",this.label||T().sections),this.#e.classList.toggle("nish-bottom-nav--lg",this.lg))}};x("nish-bottom-nav",it);var an=0,nt=class extends E{static properties={open:{type:Boolean,reflect:!0},label:{type:String}};dialog=null;opener=null;value="";waiting=!1;constructor(){super(),this.open=!1,this.label=null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onTrigger),this.wrap()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onTrigger),this.dialog?.open&&(this.value="",this.open=!1,this.dialog.close())}show(){this.open=!0}close(e=""){this.dialog?.open&&(this.value=e),this.open=!1}onTrigger=e=>{if(!this.id||!(e.target instanceof Element))return;let t=e.target.closest("[data-dialog-open]");t&&t.getAttribute("data-dialog-open")===this.id&&this.show()};wrap(){if(this.dialog){this.syncLabel(),this.syncOpen();return}if(document.readyState==="loading"){this.waiting||(this.waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this.waiting=!1,this.isConnected&&this.wrap()},{once:!0}));return}let e=document.createElement("dialog");e.className="nish-dialog",e.append(...Array.from(this.childNodes)),this.append(e),e.addEventListener("click",this.onDialogClick),e.addEventListener("keydown",this.onKey),e.addEventListener("cancel",this.onCancel),e.addEventListener("close",this.onDialogClose),this.dialog=e,this.syncLabel(),this.syncOpen()}syncLabel(){let e=this.dialog;if(!e)return;let t=e.querySelector(".nish-dialog-title"),n=e.querySelector(".nish-dialog-body");t?(t.id||(t.id=`nish-dialog-title-${++an}`),e.setAttribute("aria-labelledby",t.id),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label")),n?(n.id||(n.id=`nish-dialog-body-${++an}`),e.setAttribute("aria-describedby",n.id)):e.removeAttribute("aria-describedby")}syncOpen(){let e=this.dialog;!e||!this.isConnected||(this.open&&!e.open?(this.opener=document.activeElement instanceof HTMLElement?document.activeElement:null,e.returnValue="",e.showModal()):!this.open&&e.open&&e.close())}onDialogClick=e=>{let t=this.dialog;if(t){if(e.target===t){let n=t.getBoundingClientRect();e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom||this.close();return}if(e.target instanceof Element){let n=e.target.closest("[data-dialog-close]");n&&n.closest("dialog")===t&&this.close(n.getAttribute("value")??"")}}};onKey=e=>{e.key==="Escape"&&e.stopPropagation()};onCancel=e=>{e.preventDefault(),this.close()};onDialogClose=()=>{let e=this.value||this.dialog?.returnValue||"";this.value="",this.open&&(this.open=!1);let t=this.opener;this.opener=null,t?.isConnected&&t.focus(),this.dispatchEvent(new CustomEvent("nish-close",{bubbles:!0,detail:{value:e}}))};updated(e){e.has("label")&&this.syncLabel(),e.has("open")&&this.syncOpen()}};x("nish-dialog",nt);var qs=0,st=class extends E{static properties={open:{type:Boolean,reflect:!0},label:{type:String}};dialog=null;closeSheet=null;waiting=!1;constructor(){super(),this.open=!1,this.label=null}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.onTrigger),this.wrap()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.onTrigger),this.dialog?.open&&(this.open=!1,this.dialog.close())}show(){this.open=!0}close(){this.open=!1}onTrigger=e=>{if(!this.id||!(e.target instanceof Element))return;let t=e.target.closest("[data-sheet-open]");t&&t.getAttribute("data-sheet-open")===this.id&&this.show()};wrap(){if(this.dialog){this.syncLabel(),this.syncOpen();return}if(document.readyState==="loading"){this.waiting||(this.waiting=!0,document.addEventListener("DOMContentLoaded",()=>{this.waiting=!1,this.isConnected&&this.wrap()},{once:!0}));return}let e=document.createElement("dialog");e.className="nish-sheet",e.append(...Array.from(this.childNodes)),this.append(e),e.addEventListener("close",this.onDialogClose),this.dialog=e,this.syncLabel(),this.syncOpen()}syncLabel(){let e=this.dialog;if(!e)return;let t=e.querySelector(".nish-sheet-title");t?(t.id||(t.id=`nish-sheet-title-${++qs}`),e.setAttribute("aria-labelledby",t.id),e.removeAttribute("aria-label")):(e.removeAttribute("aria-labelledby"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label"))}syncOpen(){let e=this.dialog;!e||!this.isConnected||(this.open&&!e.open?this.closeSheet=Ai(e):!this.open&&e.open&&this.closeSheet?.())}onDialogClose=()=>{this.closeSheet=null,this.open&&(this.open=!1),this.dispatchEvent(new CustomEvent("nish-close",{bubbles:!0}))};updated(e){e.has("label")&&this.syncLabel(),e.has("open")&&this.syncOpen()}};x("nish-sheet",st);var rt=class extends E{static properties={labelled:{type:Boolean,reflect:!0},pill:{type:Boolean,reflect:!0},labelSystem:{attribute:"label-system"},labelLight:{attribute:"label-light"},labelDark:{attribute:"label-dark"}};#e=null;#i=null;constructor(){super(),this.labelled=!1,this.pill=!1}connectedCallback(){super.connectedCallback(),this.#c()}disconnectedCallback(){super.disconnectedCallback(),this.#a()}updated(e){this.#e&&this.#t!==this.#r()&&this.#c()}#t="";#n(){let e=T();return[this.labelSystem||e.themeSystem,this.labelLight||e.themeLight,this.labelDark||e.themeDark]}#r(){return JSON.stringify([this.labelled,this.pill,...this.#n()])}#a(){this.#i?.(),this.#i=null,this.#e?.remove(),this.#e=null}#c(){this.#a(),this.#t=this.#r();let e=document.createElement("button");e.className="nish-theme-btn",e.classList.toggle("nish-theme-btn--labelled",this.labelled),e.classList.toggle("nish-theme-btn--pill",this.pill),this.prepend(e),this.#e=e;let[t,n,s]=this.#n(),r={system:t,light:n,dark:s};this.#i=Ti(e,{showLabel:this.labelled,labels:r})}};x("nish-theme-toggle",rt);var ln="http://www.w3.org/2000/svg";function cn(i,e){let t=document.createElementNS(ln,"svg");for(let[n,s]of Object.entries({width:String(i),height:String(i),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))t.setAttribute(n,s);for(let n of e){let s=document.createElementNS(ln,"path");s.setAttribute("d",n),t.appendChild(s)}return t}var ot=i=>cn(i,["M18 6 6 18M6 6l12 12"]),hn=i=>cn(i,["M22 3H2l8 9.46V19l4 2v-8.54L22 3z"]);var at=class extends E{static properties={label:{type:String,reflect:!0},scrollable:{attribute:"scroll",type:Boolean,reflect:!0},single:{type:Boolean,reflect:!0}};#e=null;#i=null;#t=null;#n=e=>this.#u(e);constructor(){super(),this.label="",this.scrollable=!1,this.single=!1}get values(){return this.#e?this.#a().filter(e=>e.getAttribute("aria-pressed")==="true").map(e=>this.#s(e)):this.#t??[]}set values(e){if(!this.#e){this.#t=[...e];return}let t=new Set(e),n=!1;for(let s of this.#a()){let r=t.has(this.#s(s))&&!(this.single&&n);r&&(n=!0),s.setAttribute("aria-pressed",String(r))}}connectedCallback(){super.connectedCallback(),k(()=>this.#l())}disconnectedCallback(){super.disconnectedCallback(),this.#i?.disconnect(),this.#i=null,this.#e?.removeEventListener("click",this.#n),this.#e=null}updated(e){this.#o(),this.#r()}#r(){if(!this.#e)return;let e=T();for(let t of this.#a()){let n=t.querySelector(":scope > [data-nish-remove]");if(!n)continue;let s=this.#c(t);n.setAttribute("aria-label",s?e.removeNamed(s):e.remove)}}#a(){return this.#e?Array.from(this.#e.querySelectorAll(":scope > button, :scope > .nish-chip")):[]}#c(e){let t="";return e.childNodes.forEach(n=>{(n.nodeType===Node.TEXT_NODE||n instanceof HTMLElement&&!n.hasAttribute("data-nish-remove"))&&(t+=n.textContent??"")}),t.trim()}#s(e){return e.getAttribute("value")??this.#c(e)}#l(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > div.nish-chips");if(!e){for(e=document.createElement("div"),e.className="nish-chips";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,e.setAttribute("role","group"),e.addEventListener("click",this.#n),this.#o(),this.#d(),this.#t&&(this.values=this.#t,this.#t=null),this.#i=new MutationObserver(()=>{this.#i?.disconnect(),this.#d(),this.#h()}),this.#h()}#h(){this.#e&&this.#i?.observe(this.#e,{childList:!0})}#o(){this.#e&&(this.label?this.#e.setAttribute("aria-label",this.label):this.#e.removeAttribute("aria-label"),this.#e.classList.toggle("nish-chips--scroll",this.scrollable))}#d(){for(let e of this.#a())if(e.classList.add("nish-chip"),e instanceof HTMLButtonElement)e.hasAttribute("type")||(e.type="button"),e.hasAttribute("aria-pressed")||e.setAttribute("aria-pressed","false");else if(e.hasAttribute("data-removable")&&!e.querySelector(":scope > [data-nish-remove]")){let t=this.#c(e),n=document.createElement("button");n.type="button",n.className="nish-icon-btn nish-icon-btn--xs",n.setAttribute("data-nish-remove",""),n.setAttribute("aria-label",t?T().removeNamed(t):T().remove),n.appendChild(ot(12)),e.appendChild(n)}}#u(e){let t=e.target;if(!t||!this.#e)return;let n=t.closest("[data-nish-remove]");if(n&&this.#e.contains(n)){let o=n.parentElement,l=this.#s(o);o.remove(),this.dispatchEvent(new CustomEvent("nish-remove",{bubbles:!0,detail:{value:l}}));return}let s=t.closest("button");if(!s||s.parentElement!==this.#e||s.disabled||!s.hasAttribute("aria-pressed"))return;let r=s.getAttribute("aria-pressed")!=="true";if(r&&this.single)for(let o of this.#a())o!==s&&o.hasAttribute("aria-pressed")&&o.setAttribute("aria-pressed","false");s.setAttribute("aria-pressed",String(r)),this.dispatchEvent(new CustomEvent("nish-change",{bubbles:!0,detail:{values:this.values}}))}};x("nish-chip-group",at);var dn=(i,e)=>{let t=e.trim().toLowerCase();return t?i.label.toLowerCase().includes(t)||(i.hint?.toLowerCase().includes(t)??!1):!0};var Gs=0,un="http://www.w3.org/2000/svg",Ks="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function mn(i){let e=document.createElementNS(un,"svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("width","16"),e.setAttribute("height","16"),e.setAttribute("fill","none"),e.setAttribute("stroke","currentColor"),e.setAttribute("stroke-width","2"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-linejoin","round"),e.setAttribute("aria-hidden","true");let t=document.createElementNS(un,"path");return t.setAttribute("d",i),e.append(t),e}var lt=class extends E{static properties={value:{type:String,reflect:!0},placeholder:{type:String},label:{type:String},allowCustom:{type:Boolean,attribute:"allow-custom",reflect:!0},emptyText:{type:String,attribute:"empty-text"},size:{type:String,reflect:!0},disabled:{type:Boolean,reflect:!0},loading:{type:Boolean,reflect:!0},name:{type:String},options:{attribute:!1},filter:{attribute:!1}};#e=++Gs;#i=null;#t=null;#n=null;#r=null;#a=null;#c=null;#s=!1;#l="";#h=!1;#o=-1;#d;#u=!1;constructor(){super(),this.value=null,this.placeholder=null,this.label=null,this.allowCustom=!1,this.emptyText="",this.size=null,this.disabled=!1,this.loading=!1,this.name=null,this.options=[],this.filter=null}get input(){return this.#t}connectedCallback(){if(super.connectedCallback(),this.#i){this.#S();return}this.#u||(this.#u=!0,k(()=>{this.#u=!1,this.isConnected&&this.#m()}))}disconnectedCallback(){super.disconnectedCallback(),window.clearTimeout(this.#d),this.#f()}#m(){if(this.#i)return;let e=Array.from(this.querySelectorAll(":scope > option")),t=e.map(a=>({value:a.value,label:a.textContent?.trim()??a.value,hint:a.dataset.hint||void 0,disabled:a.disabled||void 0}));for(let a of e)a.remove();this.options.length===0&&t.length>0&&(this.options=t);let n=document.createElement("div");n.className="nish-combobox";let s=document.createElement("input");s.type="text",s.className="nish-input nish-combobox-input",s.setAttribute("role","combobox"),s.setAttribute("aria-autocomplete","list"),s.setAttribute("aria-expanded","false"),s.autocomplete="off",s.setAttribute("autocapitalize","off"),s.spellcheck=!1,s.addEventListener("input",()=>this.#M(s.value)),s.addEventListener("keydown",a=>this.#$(a)),s.addEventListener("focus",()=>this.#w()),s.addEventListener("click",()=>this.#w()),s.addEventListener("blur",()=>{this.#k()||(this.#f(),this.#v(),this.#S())}),s.addEventListener("change",a=>a.stopPropagation());let r=document.createElement("button");r.type="button",r.className="nish-icon-btn nish-combobox-clear",r.tabIndex=-1,r.hidden=!0,r.append(mn("M18 6 6 18M6 6l12 12")),r.addEventListener("mousedown",a=>a.preventDefault()),r.addEventListener("click",()=>{this.#f(),this.#L(null,null),s.focus()});let o=document.createElement("span");o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),o.style.cssText=Ks;let l=document.createElement("input");l.type="hidden",n.append(s,r,o),this.append(n,l),this.#i=n,this.#t=s,this.#n=r,this.#r=o,this.#c=l,this.#S()}updated(e){e.has("value")&&e.get("value")!==void 0&&this.#v(),e.has("disabled")&&this.disabled&&this.#f(),(e.has("options")||e.has("filter")||e.has("loading"))&&this.#E(),this.#S()}get#g(){return this.options.find(e=>e.value===this.value)??null}get#b(){return this.value!=null&&this.value!==""}get#x(){return this.#h?this.#l:this.#g?.label??this.value??""}get#p(){let e=this.filter??dn;return(this.#h?this.options.filter(n=>e(n,this.#l)):this.options).slice(0,50)}#E(){this.#o>=this.#p.length&&(this.#o=-1)}#v(){this.#h=!1,this.#l=""}#w(){if(this.#s||this.disabled||!this.#t)return;this.#s=!0;let e=this.#g,t=e?this.#p.findIndex(n=>n.value===e.value):-1;this.#o=t>=0?t:-1,this.#S()}#f(){this.#s=!1,this.#o=-1,this.#a?.remove(),this.#a=null,this.#t&&(this.#t.setAttribute("aria-expanded","false"),this.#t.removeAttribute("aria-controls"),this.#t.removeAttribute("aria-activedescendant")),this.#r&&(this.#r.textContent="")}#y(e,t){let n=this.#p,s=n.length;if(s===0)return-1;let r=e;for(let o=0;o<s;o++)if(r=(r+t+s)%s,!n[r].disabled)return r;return-1}#T(e){return e===1?this.#y(-1,1):this.#y(0,-1)}#L(e,t){this.value=e,this.#v(),this.#S();let n={value:e,option:t};this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent("nish-change",{bubbles:!0,detail:n}))}#A(e){e.disabled||(this.#f(),this.#L(e.value,e))}#k(){return!this.#h||this.#l.trim()!==""||!this.#b?!1:(this.#f(),this.#L(null,null),!0)}#C(){let e=this.#l.trim();if(!this.allowCustom||!this.#h||!e)return!1;let t=this.options.find(n=>!n.disabled&&n.label.toLowerCase()===e.toLowerCase());return this.#f(),t?this.#L(t.value,t):this.#L(e,null),!0}#M(e){this.#l=e,this.#h=!0,this.#s=!0,this.allowCustom||e.trim()===""?this.#o=-1:this.#o=this.#p.findIndex(t=>!t.disabled),window.clearTimeout(this.#d),this.#d=window.setTimeout(()=>{this.dispatchEvent(new CustomEvent("nish-query",{bubbles:!0,detail:{query:e}}))},200),this.#S()}#$(e){if(this.disabled)return;let t=this.#p;switch(e.key){case"ArrowDown":case"ArrowUp":{e.preventDefault();let n=e.key==="ArrowDown"?1:-1;if(this.#s){this.#_(this.#o<0?this.#T(n):this.#y(this.#o,n));break}else{this.#s=!0;let s=this.#g,r=s?t.findIndex(o=>o.value===s.value):-1;this.#o=r>=0?r:this.#T(n)}this.#S();break}case"Home":case"End":this.#s&&(e.preventDefault(),this.#_(this.#T(e.key==="Home"?1:-1)));break;case"Enter":this.#s&&this.#o>=0&&t[this.#o]?(e.preventDefault(),this.#A(t[this.#o])):(this.#k()||this.#C()||this.#s)&&e.preventDefault();break;case"Escape":this.#s?(e.preventDefault(),e.stopPropagation(),this.#f(),this.#S()):this.#h&&(e.preventDefault(),e.stopPropagation(),this.#v(),this.#S());break;case"Tab":this.#f();break}}#S(){let e=this.#t,t=this.#i;if(!e||!t||!this.#n||!this.#c||!this.#r)return;t.classList.toggle("nish-combobox--sm",this.size==="sm");let n=this.#x;e.value!==n&&(e.value=n),e.disabled=this.disabled,this.placeholder?e.placeholder=this.placeholder:e.removeAttribute("placeholder"),this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label"),this.#n.setAttribute("aria-label",T().clear),this.#n.hidden=!(this.#b&&!this.disabled);let s=this.#c;if(this.name?s.name=this.name:s.removeAttribute("name"),s.value=this.value??"",s.disabled=this.disabled,!this.#s){this.#a&&this.#f();return}this.#N(e,t,this.#r)}#_(e){let t=this.#o;this.#o=e;let n=this.#a,s=this.#t;if(!n||!s||!this.#s){this.#S();return}n.querySelector("[data-active]")?.removeAttribute("data-active");let r=e>=0?n.querySelector(`[data-index="${e}"]`):null;if(!r){t!==e?this.#S():s.removeAttribute("aria-activedescendant");return}r.dataset.active="",s.setAttribute("aria-activedescendant",r.id),r.scrollIntoView?.({block:"nearest"})}#N(e,t,n){let s=T(),r=`nish-cb-list-${this.#e}`,o=this.#p,l=this.#g,a=this.#a;if(!a){a=document.createElement("ul"),a.id=r,a.className="nish-combobox-list",a.setAttribute("role","listbox");let c=d=>{let u=d.target?.closest("li[data-index]");if(!u||!a.contains(u))return null;let b=Number(u.dataset.index),m=this.#p[b];return m?{o:m,i:b}:null};a.addEventListener("mousedown",d=>d.preventDefault()),a.addEventListener("mousemove",d=>{let u=c(d);u&&!u.o.disabled&&this.#o!==u.i&&this.#_(u.i)}),a.addEventListener("click",d=>{let u=c(d);u&&this.#A(u.o)}),this.#a=a,t.append(a)}this.label?(a.setAttribute("aria-label",this.label),a.removeAttribute("aria-labelledby")):(a.removeAttribute("aria-label"),e.id||(e.id=`nish-cb-${this.#e}`),a.setAttribute("aria-labelledby",e.id));let h=o.map((c,d)=>{let u=document.createElement("li");u.id=`${r}-opt-${d}`,u.className="nish-combobox-option",u.setAttribute("role","option"),u.dataset.index=String(d),u.setAttribute("aria-selected",String(l?.value===c.value)),c.disabled&&u.setAttribute("aria-disabled","true"),d===this.#o&&(u.dataset.active="");let b=document.createElement("span");if(b.className="nish-combobox-label",b.textContent=c.label,u.append(b),c.hint){let m=document.createElement("span");m.className="nish-combobox-hint",m.textContent=c.hint,u.append(m)}return l?.value===c.value&&u.append(mn("M20 6 9 17l-5-5")),u});if(this.loading){let c=document.createElement("li");c.setAttribute("role","presentation"),c.className="nish-combobox-loading";let d=document.createElement("span");d.className="nish-spinner nish-spinner--sm",d.setAttribute("aria-hidden","true"),c.append(d,document.createTextNode(s.searching)),h.push(c)}else if(o.length===0){let c=document.createElement("li");c.setAttribute("role","presentation"),c.className="nish-combobox-empty",c.textContent=this.emptyText||s.noMatches,h.push(c)}a.replaceChildren(...h),e.setAttribute("aria-expanded","true"),e.setAttribute("aria-controls",r),this.#o>=0&&o[this.#o]?e.setAttribute("aria-activedescendant",`${r}-opt-${this.#o}`):e.removeAttribute("aria-activedescendant"),n.textContent=this.loading?s.searching:o.length===0?this.emptyText||s.noMatches:s.resultCount(o.length),this.#R(a,e),a.querySelector(`[data-index="${this.#o}"]`)?.scrollIntoView?.({block:"nearest"})}#R(e,t){e.style.top="",e.style.bottom="",e.style.marginTop="",e.style.marginBottom="",delete e.dataset.above;let n=t.getBoundingClientRect(),s=e.getBoundingClientRect().height,r=window.innerHeight-n.bottom;s>r&&n.top>r&&(e.dataset.above="",e.style.top="auto",e.style.bottom="100%",e.style.marginTop="0",e.style.marginBottom="4px")}};x("nish-combobox",lt);var pn=1500,fn="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0",Ys=M`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><rect width="14" height="14" x="8" y="8" rx="2"></rect><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path></svg>`,Xs=M`<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="var(--nish-ok)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M20 6 9 17l-5-5"></path></svg>`;async function Js(i){try{if(navigator.clipboard&&window.isSecureContext)return await navigator.clipboard.writeText(i),!0}catch{}let e=document.createElement("textarea");e.value=i,e.setAttribute("readonly",""),e.style.cssText="position:fixed;top:-1000px;opacity:0";let t=document.activeElement;document.body.appendChild(e),e.select();let n=!1;try{n=document.execCommand("copy")}catch{n=!1}return e.remove(),t?.focus?.(),n}var ct=class extends E{static properties={value:{type:String,reflect:!0},for:{type:String,reflect:!0},label:{type:String,reflect:!0},copiedLabel:{attribute:"copied-label",reflect:!0},icon:{type:Boolean,reflect:!0},copied:{state:!0},manual:{state:!0}};#e=null;constructor(){super(),this.value=null,this.for=null,this.label="",this.copiedLabel="",this.icon=!1,this.copied=!1,this.manual=!1}disconnectedCallback(){super.disconnectedCallback(),this.#e&&clearTimeout(this.#e),this.#e=null,this.copied=!1,this.manual=!1}#i(){return this.value!=null?this.value:(this.for?document.getElementById(this.for):null)?.textContent??""}async#t(){let e=this.#i();if(!await Js(e)){await this.#n();return}this.manual=!1,this.copied=!0,this.dispatchEvent(new CustomEvent("nish-copy",{bubbles:!0,detail:{text:e}})),this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{this.copied=!1,this.#e=null},pn)}async#n(){this.copied=!1,this.manual=!0,await this.updateComplete;let e=this.value==null&&this.for?document.getElementById(this.for):null;if(e){let t=document.createRange();t.selectNodeContents(e);let n=window.getSelection();n?.removeAllRanges(),n?.addRange(t)}else{let t=this.querySelector("textarea[data-copy-source]");t?.focus(),t?.select()}this.#e&&clearTimeout(this.#e),this.#e=setTimeout(()=>{document.activeElement?.matches("textarea[data-copy-source]")&&this.contains(document.activeElement)&&this.querySelector("button")?.focus(),this.manual=!1,this.#e=null},pn)}render(){let e=T(),t=this.copiedLabel||e.copied,n=this.copied?t:this.manual?e.copyManual:this.label||e.copy,s=this.copied?Xs:Ys;return C`${this.icon?C`<button type="button" class="nish-icon-btn nish-icon-btn--sm nish-copy-btn" aria-label=${n} title=${n} ?data-copied=${this.copied} @click=${()=>this.#t()}>
|
package/dist/elements-charts.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var be=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(t){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=t}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var L=function(n,t,e,s,r){if(s==="m")throw new TypeError("Private method is not writable");if(s==="a"&&!r)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?n!==t||!r:!t.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return s==="a"?r.call(n,e):r?r.value=e:t.set(n,e),e},x=function(n,t,e,s){if(e==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?n!==t||!s:!t.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e==="m"?s:e==="a"?s.call(n):s?s.value:t.get(n)},nt,Tt,Mt,lt,Vt,ht,Ct,q,ct,W,Nt,ve;var b={__proto__:null};b.enumerable=!0;Object.freeze(b);var Gt=(W=class{constructor(t,e={}){if(nt.set(this,!1),Tt.set(this,!1),Mt.set(this,!1),lt.set(this,!1),Vt.set(this,Date.now()),ht.set(this,!1),Ct.set(this,void 0),q.set(this,void 0),ct.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof e!="object"||!e)throw new Error('The "options" argument must be an object');let{bubbles:s,cancelable:r,composed:i}=e;L(this,nt,!!r,"f"),L(this,Tt,!!s,"f"),L(this,Mt,!!i,"f"),L(this,Ct,`${t}`,"f"),L(this,q,null,"f"),L(this,ct,!1,"f")}initEvent(t,e,s){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){L(this,lt,!0,"f")}get target(){return x(this,q,"f")}get currentTarget(){return x(this,q,"f")}get srcElement(){return x(this,q,"f")}get type(){return x(this,Ct,"f")}get cancelable(){return x(this,nt,"f")}get defaultPrevented(){return x(this,nt,"f")&&x(this,lt,"f")}get timeStamp(){return x(this,Vt,"f")}composedPath(){return x(this,ct,"f")?[x(this,q,"f")]:[]}get returnValue(){return!x(this,nt,"f")||!x(this,lt,"f")}get bubbles(){return x(this,Tt,"f")}get composed(){return x(this,Mt,"f")}get eventPhase(){return x(this,ct,"f")?W.AT_TARGET:W.NONE}get cancelBubble(){return x(this,ht,"f")}set cancelBubble(t){t&&L(this,ht,!0,"f")}stopPropagation(){L(this,ht,!0,"f")}get isTrusted(){return!1}},nt=new WeakMap,Tt=new WeakMap,Mt=new WeakMap,lt=new WeakMap,Vt=new WeakMap,ht=new WeakMap,Ct=new WeakMap,q=new WeakMap,ct=new WeakMap,W.NONE=0,W.CAPTURING_PHASE=1,W.AT_TARGET=2,W.BUBBLING_PHASE=3,W);Object.defineProperties(Gt.prototype,{initEvent:b,stopImmediatePropagation:b,preventDefault:b,target:b,currentTarget:b,srcElement:b,type:b,cancelable:b,defaultPrevented:b,timeStamp:b,composedPath:b,returnValue:b,bubbles:b,composed:b,eventPhase:b,cancelBubble:b,stopPropagation:b,isTrusted:b});var $e=(ve=class extends Gt{constructor(t,e={}){super(t,e),Nt.set(this,void 0),L(this,Nt,e?.detail??null,"f")}initCustomEvent(t,e,s,r){throw new Error("Method not implemented.")}get detail(){return x(this,Nt,"f")}},Nt=new WeakMap,ve);Object.defineProperties($e.prototype,{detail:b});var U=Gt,Yt=$e;var R;var Ss=(R=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},R.STYLE_RULE=1,R.CHARSET_RULE=2,R.IMPORT_RULE=3,R.MEDIA_RULE=4,R.FONT_FACE_RULE=5,R.PAGE_RULE=6,R.NAMESPACE_RULE=10,R.KEYFRAMES_RULE=7,R.KEYFRAME_RULE=8,R.SUPPORTS_RULE=12,R.COUNTER_STYLE_RULE=11,R.FONT_FEATURE_VALUES_RULE=14,R.MARGIN_RULE=9,R);globalThis.Event??=U;globalThis.CustomEvent??=Yt;var qt=Symbol(),Se=n=>typeof n=="boolean"?n:n?.capture??!1,F={__proto__:null};F.enumerable=!0;Object.freeze(F);var Ot=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(t,e,s){if(e==null)return;let r=Se(s)?this.__captureEventListeners:this.__eventListeners,i=r.get(t);if(i===void 0)i=new Map,r.set(t,i);else if(i.has(e))return;let o=typeof s=="object"&&s?s:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(t,e,s)),i.set(e,o??{})}removeEventListener(t,e,s){if(e==null)return;let r=Se(s)?this.__captureEventListeners:this.__eventListeners,i=r.get(t);i!==void 0&&(i.delete(e),i.size||r.delete(t))}dispatchEvent(t){let e=this.__resolveFullEventPath();!t.composed&&this.__host&&(e=e.slice(0,e.indexOf(this.__host)));let s=!1,r=!1,i=U.NONE,o=null,h=null,l=null,u=t.stopPropagation,g=t.stopImmediatePropagation;Object.defineProperties(t,{target:{get(){return o??h},...F},srcElement:{get(){return t.target},...F},currentTarget:{get(){return l},...F},eventPhase:{get(){return i},...F},composedPath:{value:()=>e,...F},stopPropagation:{value:()=>{s=!0,u.call(t)},...F},stopImmediatePropagation:{value:()=>{r=!0,g.call(t)},...F}});let c=(m,A,S)=>{typeof m=="function"?m(t):typeof m?.handleEvent=="function"&&m.handleEvent(t),A.once&&S.delete(m)},y=()=>(l=null,i=U.NONE,!t.defaultPrevented),_=e.slice().reverse();o=!this.__host||!t.composed?this:null;let $=m=>{for(h=this;h.__host&&m.includes(h.__host);)h=h.__host};for(let m of _){!o&&(!h||h===m.__host)&&$(_.slice(_.indexOf(m))),l=m,i=m===t.target?U.AT_TARGET:U.CAPTURING_PHASE;let A=m.__captureEventListeners.get(t.type);if(A){for(let[S,N]of A)if(c(S,N,A),r)return y()}if(s)return y()}let C=t.bubbles?e:[this];h=null;for(let m of C){!o&&(!h||m===h.__host)&&$(C.slice(0,C.indexOf(m)+1)),l=m,i=m===t.target?U.AT_TARGET:U.BUBBLING_PHASE;let A=m.__eventListeners.get(t.type);if(A){for(let[S,N]of A)if(c(S,N,A),r)return y()}if(s)return y()}return y()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,we,Cn]}};var Ee=new WeakMap,ut=n=>{let t=Ee.get(n);return t===void 0&&Ee.set(n,t=new Map),t},dt=class extends Ot{getRootNode(t){return t?.composed?Kt:this.__host?.__shadowRoot??Kt}};var xe=class extends dt{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var we=new xe,Kt=we;var Ae=class extends dt{constructor(t){if(super(),t!==qt)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:Pt,customElements:Xt,document:Kt,Document:xe,Element:Re,EventTarget:Ot,HTMLElement:Te,Node:dt,ShadowRoot:Me,window:this,Window:Ae})}};var Re=class extends dt{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(ut(this)).map(([t,e])=>({name:t,value:e}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(t,e){ut(this).set(t,String(e))}removeAttribute(t){ut(this).delete(t)}toggleAttribute(t,e){if(this.hasAttribute(t)){if(e===void 0||!e)return this.removeAttribute(t),!1}else return e===void 0||e?(this.setAttribute(t,""),!0):!1;return!0}hasAttribute(t){return ut(this).has(t)}attachShadow(t){this.__shadowRootMode=t.mode;let e=new Me(qt,t);return e.__eventTargetParent=this,e.__host=this,this.__shadowRoot=e}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let t=new be(this);return this.__internals=t,t}getAttribute(t){return ut(this).get(t)??null}};var Te=class extends Re{},Jt=Te;var Me=class extends dt{get host(){return this.__host}constructor(t,e){if(super(),t!==t)throw new TypeError("Illegal constructor");this.mode=e.mode}};globalThis.litServerRoot??=Object.defineProperty(new Jt,"localName",{get(){return"lit-server-root"}});function Tn(){let n,t;return{promise:new Promise((s,r)=>{n=s,t=r}),resolve:n,reject:t}}var Pt=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(t,e){if(this.__definitions.has(t))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${t}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
|
|
2
2
|
Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(this.__reverseDefinitions.has(e))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(e)}`);e.__localName=t,this.__definitions.set(t,{ctor:e,observedAttributes:e.observedAttributes??[]}),this.__reverseDefinitions.set(e,t),this.__pendingWhenDefineds.get(t)?.resolve(e),this.__pendingWhenDefineds.delete(t)}get(t){return this.__definitions.get(t)?.ctor}getName(t){return this.__reverseDefinitions.get(t)??null}initialize(t){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(t){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(t){let e=this.__definitions.get(t);if(e)return e.ctor;let s=this.__pendingWhenDefineds.get(t);return s||(s=Tn(),this.__pendingWhenDefineds.set(t,s)),s.promise}},Mn=Pt;var Xt=new Mn,Cn=new Ae(qt);var pt=globalThis,Dt=pt.ShadowRoot&&(pt.ShadyCSS===void 0||pt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ne=Symbol(),Ce=new WeakMap,Lt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==Ne)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Dt&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Ce.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Ce.set(e,t))}return t}toString(){return this.cssText}},Oe=n=>new Lt(typeof n=="string"?n:n+"",void 0,Ne);var Pe=(n,t)=>{if(Dt)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),r=pt.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,n.appendChild(s)}},Zt=Dt||pt.CSSStyleSheet===void 0?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Oe(e)})(n):n;var{is:Nn,defineProperty:On,getOwnPropertyDescriptor:Pn,getOwnPropertyNames:Ln,getOwnPropertySymbols:Dn,getPrototypeOf:In}=Object,ft=globalThis;ft.customElements??=Xt;var Le=ft.trustedTypes,kn=Le?Le.emptyScript:"",Un=ft.reactiveElementPolyfillSupport,mt=(n,t)=>n,Qt={toAttribute(n,t){switch(t){case Boolean:n=n?kn:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},Ie=(n,t)=>!Nn(n,t),De={attribute:!0,type:String,converter:Qt,reflect:!1,useDefault:!1,hasChanged:Ie};Symbol.metadata??=Symbol("metadata"),ft.litPropertyMetadata??=new WeakMap;var H=class extends(globalThis.HTMLElement??Jt){static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=De){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&On(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=Pn(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){let h=r?.call(this);i?.call(this,o),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??De}static _$Ei(){if(this.hasOwnProperty(mt("elementProperties")))return;let t=In(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(mt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(mt("properties"))){let e=this.properties,s=[...Ln(e),...Dn(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(Zt(r))}else t!==void 0&&e.push(Zt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Pe(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:Qt).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Qt;this._$Em=r;let h=o.fromAttribute(e,i.type);this[r]=h??this._$Ej?.get(r)??h,this._$Em=null}}requestUpdate(t,e,s,r=!1,i){if(t!==void 0){let o=this.constructor;if(r===!1&&(i=this[t]),s??=o.getPropertyOptions(t),!((s.hasChanged??Ie)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),i!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:o}=i,h=this[r];o!==!0||this._$AL.has(r)||h===void 0||this.C(r,void 0,i,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};H.elementStyles=[],H.shadowRootOptions={mode:"open"},H[mt("elementProperties")]=new Map,H[mt("finalized")]=new Map,Un?.({ReactiveElement:H}),(ft.reactiveElementVersions??=[]).push("2.1.2");var kt=globalThis,ke=n=>n,It=kt.trustedTypes,Ue=It?It.createPolicy("lit-html",{createHTML:n=>n}):void 0,je="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,Ve="?"+j,Fn=`<${Ve}>`,Z=kt.document===void 0?{createTreeWalker:()=>({})}:document,yt=()=>Z.createComment(""),_t=n=>n===null||typeof n!="object"&&typeof n!="function",oe=Array.isArray,Hn=n=>oe(n)||typeof n?.[Symbol.iterator]=="function",te=`[
|
|
3
3
|
\f\r]`,gt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fe=/-->/g,He=/>/g,J=RegExp(`>|${te}(?:([^\\s"'>=/]+)(${te}*=${te}*(?:[^
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Be=/'/g,ze=/"/g,Ge=/^(?:script|style|textarea|title)$/i,ae=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),w=ae(1),T=ae(2),nr=ae(3),Q=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),We=new WeakMap,X=Z.createTreeWalker(Z,129);function Ye(n,t){if(!oe(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ue!==void 0?Ue.createHTML(t):t}var Bn=(n,t)=>{let e=n.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",o=gt;for(let h=0;h<e;h++){let l=n[h],u,g,c=-1,y=0;for(;y<l.length&&(o.lastIndex=y,g=o.exec(l),g!==null);)y=o.lastIndex,o===gt?g[1]==="!--"?o=Fe:g[1]!==void 0?o=He:g[2]!==void 0?(Ge.test(g[2])&&(r=RegExp("</"+g[2],"g")),o=J):g[3]!==void 0&&(o=J):o===J?g[0]===">"?(o=r??gt,c=-1):g[1]===void 0?c=-2:(c=o.lastIndex-g[2].length,u=g[1],o=g[3]===void 0?J:g[3]==='"'?ze:Be):o===ze||o===Be?o=J:o===Fe||o===He?o=gt:(o=J,r=void 0);let _=o===J&&n[h+1].startsWith("/>")?" ":"";i+=o===gt?l+Fn:c>=0?(s.push(u),l.slice(0,c)+je+l.slice(c)+j+_):l+j+(c===-2?h:_)}return[Ye(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},bt=class n{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,o=0,h=t.length-1,l=this.parts,[u,g]=Bn(t,e);if(this.el=n.createElement(u,s),X.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=X.nextNode())!==null&&l.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(let c of r.getAttributeNames())if(c.endsWith(je)){let y=g[o++],_=r.getAttribute(c).split(j),$=/([.?@])?(.*)/.exec(y);l.push({type:1,index:i,name:$[2],strings:_,ctor:$[1]==="."?ne:$[1]==="?"?se:$[1]==="@"?re:rt}),r.removeAttribute(c)}else c.startsWith(j)&&(l.push({type:6,index:i}),r.removeAttribute(c));if(Ge.test(r.tagName)){let c=r.textContent.split(j),y=c.length-1;if(y>0){r.textContent=It?It.emptyScript:"";for(let _=0;_<y;_++)r.append(c[_],yt()),X.nextNode(),l.push({type:2,index:++i});r.append(c[y],yt())}}}else if(r.nodeType===8)if(r.data===Ve)l.push({type:2,index:i});else{let c=-1;for(;(c=r.data.indexOf(j,c+1))!==-1;)l.push({type:7,index:i}),c+=j.length-1}i++}}static createElement(t,e){let s=Z.createElement("template");return s.innerHTML=t,s}};function st(n,t,e=n,s){if(t===Q)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=_t(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(n),r._$AT(n,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=st(n,r._$AS(n,t.values),r,s)),t}var ee=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??Z).importNode(e,!0);X.currentNode=r;let i=X.nextNode(),o=0,h=0,l=s[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new vt(i,i.nextSibling,this,t):l.type===1?u=new l.ctor(i,l.name,l.strings,this,t):l.type===6&&(u=new ie(i,this,t)),this._$AV.push(u),l=s[++h]}o!==l?.index&&(i=X.nextNode(),o++)}return X.currentNode=Z,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},vt=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=st(this,t,e),_t(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==Q&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Hn(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&_t(this._$AH)?this._$AA.nextSibling.data=t:this.T(Z.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=bt.createElement(Ye(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new ee(r,this),o=i.u(this.options);i.p(e),this.T(o),this._$AH=i}}_$AC(t){let e=We.get(t.strings);return e===void 0&&We.set(t.strings,e=new bt(t)),e}k(t){oe(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new n(this.O(yt()),this.O(yt()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=ke(t).nextSibling;ke(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},rt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=f}_$AI(t,e=this,s,r){let i=this.strings,o=!1;if(i===void 0)t=st(this,t,e,0),o=!_t(t)||t!==this._$AH&&t!==Q,o&&(this._$AH=t);else{let h=t,l,u;for(t=i[0],l=0;l<i.length-1;l++)u=st(this,h[s+l],e,l),u===Q&&(u=this._$AH[l]),o||=!_t(u)||u!==this._$AH[l],u===f?t=f:t!==f&&(t+=(u??"")+i[l+1]),this._$AH[l]=u}o&&!r&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ne=class extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},se=class extends rt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},re=class extends rt{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=st(this,t,e,0)??f)===Q)return;let s=this._$AH,r=t===f&&s!==f||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==f&&(s===f||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ie=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){st(this,t)}};var zn=kt.litHtmlPolyfillSupport;zn?.(bt,vt),(kt.litHtmlVersions??=[]).push("3.3.3");var Ke=(n,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new vt(t.insertBefore(yt(),i),i,void 0,e??{})}return r._$AI(n),r};var le=globalThis,V=class extends H{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ke(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}};V._$litElement$=!0,V.finalized=!0,le.litElementHydrateSupport?.({LitElement:V});var Wn=le.litElementPolyfillSupport;Wn?.({LitElement:V});(le.litElementVersions??=[]).push("4.2.2");var jn="2.1.2";var Vn=Symbol.for("nish-ui.runtime.v1");function Gn(){let n=globalThis;return n[Vn]??={versions:new Set,slots:{}}}function Yn(n){n.versions.add(jn),n.versions.size>1&&!n.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(n.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...n.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var qe=!1;function Ut(n,t){let e=Gn();return qe||(qe=!0,Yn(e)),n in e.slots||(e.slots[n]=t()),e.slots[n]}var Je={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:n=>`${n} result${n===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:n=>`${n} active`,remove:"Remove",removeNamed:n=>`Remove ${n}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:n=>`${n}: no data`,seriesNumber:n=>`Series ${n}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark"};function he(){return Ut("element-strings",()=>({values:{...Je},listeners:new Set}))}function Kn(n){let t=he(),e={...t.values};for(let[s,r]of Object.entries(n))r!==void 0&&Object.hasOwn(Je,s)&&(e[s]=r);t.values=e;for(let s of Array.from(t.listeners))s()}function it(){return he().values}function Xe(n){let t=he().listeners;return t.add(n),()=>{t.delete(n)}}var $t=class extends V{#t=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#t??=Xe(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(),this.#t=null}stringsChanged(){this.requestUpdate()}};function St(n,t){customElements.get(n)||customElements.define(n,t)}var Et="\u2013",de="\u2212",ue="en-US",qn=Ut("format",()=>({locale:ue})),Ze=new Map;function Jn(n){let t=Ze.get(n);if(t===void 0){try{t=Intl.getCanonicalLocales(n)[0]??ue}catch{t=ue}Ze.set(n,t)}return t}function xt(n){return n?.locale?Jn(n.locale):qn.locale}function en(n){return n==="en"||n==="en-US"}var Qe=new Map;function nn(n,t){let e=Qe.get(n);return e===void 0&&(e=t(),Qe.set(n,e)),e}function Xn(n,t,e){return nn(`n|${n}|${t}|${e}`,()=>new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:e}))}function tt(n,t,e,s){return nn(`d|${n}|${t}|${s??""}`,()=>new Intl.DateTimeFormat(n,s?{...e,timeZone:s}:e))}function pe(n){return typeof n=="number"&&Number.isFinite(n)}function G(n,t,e,s){return Xn(s,t,e).format(n)}var ce=[[1e12,"T"],[1e9,"B"],[1e6,"M"],[1e3,"k"]];function sn(n,t,e){for(let s=0;s<ce.length;s++){let[r,i]=ce[s];if(!(n<r)){if(s>0&&Number((n/r).toFixed(t))>=1e3){let[o,h]=ce[s-1];return G(n/o,0,t,e)+h}return G(n/r,0,t,e)+i}}return G(n,0,t,e)}function rn(n,t){return Number(Math.abs(n).toFixed(t))===0}var tn=new Map;function Zn(n,t){let e=`${t}|${n}`,s=tn.get(e);if(s===void 0){try{s=new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??n}catch{s=n+" "}tn.set(e,s)}return s}function Qn(n,t,e){let s=Zn(t.currency??"USD",e);if(t.compact&&n>=1e3)return s+sn(n,1,e);let r=t.cents??"auto",i=Math.round(n*100)%100!==0,o=r==="always"||r==="auto"&&(n<1e3||i);return s+(o?G(n,2,2,e):G(n,0,0,e))}function on(n,t={}){if(!pe(n))return Et;let e=Qn(Math.abs(n),t,xt(t));return n<0&&Math.round(Math.abs(n)*100)>0?de+e:e}function an(n,t={}){if(!pe(n))return Et;let e=t.digits??1,s=t.fromRatio??!0?n*100:n,r=G(Math.abs(s),e,e,xt(t))+"%";return rn(s,e)?r:s<0?de+r:t.signed?"+"+r:r}function ln(n,t={}){if(!pe(n))return Et;let e=xt(t),s=n<0&&!rn(n,t.digits??2)?de:"",r=Math.abs(n);return t.compact&&r>=1e3?s+sn(r,t.digits??1,e):s+(t.digits===void 0?G(r,0,2,e):G(r,t.digits,t.digits,e))}var ts=/^(\d{4})-(\d{2})-(\d{2})$/;function hn(n){if(n==null)return null;let t,e=!1;if(n instanceof Date)t=n;else if(typeof n=="number")t=new Date(n);else{let s=ts.exec(n.trim());e=!!s,t=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):new Date(n)}return Number.isNaN(t.getTime())?null:{d:t,dayOnly:e}}function cn(n,t){return n.dayOnly?void 0:t.timeZone}function Ft(n){return n.replace(/[\u202f\u00a0]/g," ")}var Sr=[[60,"minute","m"],[3600,"hour","h"],[86400,"day","d"],[86400*30,"month","mo"],[86400*365,"year","y"]];var es={month:"short",day:"numeric",year:"numeric"},ns={weekday:"long",month:"long",day:"numeric",year:"numeric"},ss={month:"short",day:"numeric"},rs={weekday:"short"},is={month:"numeric",day:"numeric"},os={hour:"numeric",minute:"2-digit"},as={hour:"numeric",minute:"2-digit",hour12:!0},ls={year:"numeric",month:"numeric",day:"numeric"};function hs(n,t){if(!t)return{year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()};let e={year:0,month:0,day:0};for(let s of tt("en-US","ymd",ls,t).formatToParts(n))(s.type==="year"||s.type==="month"||s.type==="day")&&(e[s.type]=Number(s.value));return e}function cs(n,t,e,s){let r=cn(n,e);switch(t){case"medium":return Ft(tt(s,"medium",es,r).format(n.d));case"long":return Ft(tt(s,"long",ns,r).format(n.d));case"weekday":{let i=tt(s,"weekday",rs,r).format(n.d);if(!en(s))return`${i} ${tt(s,"md",is,r).format(n.d)}`;let o=hs(n.d,r);return`${i} ${o.month}/${o.day}`}default:return Ft(tt(s,"short",ss,r).format(n.d))}}function un(n,t="short",e={}){let s=hn(n);return s?cs(s,t,e,xt(e)):Et}function us(n,t,e){let s=en(e);return Ft(tt(e,s?"time12":"time",s?as:os,cn(n,t)).format(n.d))}function dn(n,t={}){let e=hn(n);return e?us(e,t,xt(t)):Et}var pn={ok:"var(--nish-ok-fill)",warn:"var(--nish-warn-fill)",loss:"var(--nish-loss-fill)",info:"var(--nish-info-fill)",accent:"var(--nish-accent)"};function B(n,t){return n&&Object.hasOwn(pn,n)?pn[n]:n&&/^chart-[1-8]$/.test(n)?`var(--nish-${n})`:`var(--nish-chart-${(Math.trunc(t)%8+8)%8+1})`}var D={grid:"var(--nish-line)",axis:"var(--nish-line-strong)",zero:"var(--nish-hi3)",text:"var(--nish-hi3)"},mn,ds=n=>Math.abs(n)<1e3?String(Math.round(n*100)/100):(mn??=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),mn.format(n));function ot(n,t=ds){let e=(n??"").trim();if(!e)return t;let s=e.indexOf(":"),r=(s<0?e:e.slice(0,s)).toLowerCase(),i=s<0?"":e.slice(s+1).trim();switch(r){case"number":return o=>ln(o);case"percent":{let o=i!==""&&Number.isInteger(Number(i))&&Number(i)>=0&&Number(i)<=10?Number(i):1;return h=>an(h,{digits:o})}case"currency":return o=>on(o,{currency:i||"USD"});case"date":{let o=i==="medium"||i==="long"||i==="weekday"?i:"short";return h=>un(h,o)}case"time":return o=>dn(o);default:return t}}function me(n,t,e){let s=Math.max(2,Math.floor(e));return Array.from({length:s},(r,i)=>n+(t-n)*i/(s-1))}function gn(n,t){if(n===t){let s=Math.abs(n)*.05||1;return[n-s,t+s]}let e=(t-n)*.06;return[n-e,t+e]}function yn(n,t){let e=0,s=n.length-1;for(;s-e>1;){let r=e+s>>1;n[r]<t?e=r:s=r}return Math.abs(n[e]-t)<=Math.abs(n[s]-t)?e:s}function Y(n){if(n==null||n==="")return null;let t=typeof n=="number"?n:Number(n);return Number.isFinite(t)?t:null}function fe(n){if(!Array.isArray(n))return[];let t=[];return n.forEach((e,s)=>{if(Array.isArray(e)){let r=Y(e[0]);r!==null&&t.push({x:r,y:Y(e[1])})}else if(e&&typeof e=="object"){let r=e,i=Y(r.x);i!==null&&t.push({x:i,y:Y(r.y)})}else t.push({x:s,y:Y(e)})}),t}function _n(n){return Array.isArray(n)?n.map((t,e)=>{let s=t&&typeof t=="object"?t:{};return{label:typeof s.label=="string"&&s.label?s.label:it().seriesNumber(e+1),tone:typeof s.tone=="string"?s.tone:void 0,points:fe(s.points??s.data)}}):[]}function bn(n){return Array.isArray(n)?n.map((t,e)=>{if(Array.isArray(t))return{label:String(t[0]??""),value:Y(t[1])??0};if(t&&typeof t=="object"){let s=t;return{label:s.label==null?String(e+1):String(s.label),value:Y(s.value)??0}}return{label:String(e+1),value:Y(t)??0}}):[]}var wt={fromAttribute(n){if(!n)return[];try{let t=JSON.parse(n);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute(n){try{return JSON.stringify(n)}catch{return""}}},K=class extends $t{static properties={label:{type:String,reflect:!0},height:{type:Number,reflect:!0},tone:{type:String,reflect:!0},empty:{type:String,reflect:!0},yFormat:{type:String,attribute:"y-format",reflect:!0},xFormat:{type:String,attribute:"x-format",reflect:!0},width:{state:!0}};ro=null;themeObserver=null;constructor(){super(),this.label="",this.tone="",this.empty="",this.yFormat="",this.xFormat="",this.width=0}connectedCallback(){super.connectedCallback(),getComputedStyle(this).display==="inline"&&(this.style.display="block"),this.width=this.clientWidth,typeof ResizeObserver<"u"&&(this.ro=new ResizeObserver(()=>{this.clientWidth!==this.width&&(this.width=this.clientWidth)}),this.ro.observe(this)),this.themeObserver=new MutationObserver(()=>this.requestUpdate()),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]})}disconnectedCallback(){super.disconnectedCallback(),this.ro?.disconnect(),this.ro=null,this.themeObserver?.disconnect(),this.themeObserver=null}get plotHeight(){return this.height>0?this.height:200}},fn=0;function vn(){return fn+=1,`nish-chart-${fn}`}var Ht="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";var $n=18,ps=22,Bt=class extends K{static properties={...K.properties,data:{converter:wt},xTicks:{type:String,attribute:"x-ticks",reflect:!0},showValues:{type:Boolean,attribute:"show-values",reflect:!0},selected:{state:!0},coarse:{state:!0}};mq=null;onCoarse=()=>{this.coarse=!!this.mq?.matches};constructor(){super(),this.data=[],this.height=140,this.xTicks="ends",this.showValues=!1,this.selected=null,this.coarse=!1}connectedCallback(){super.connectedCallback(),typeof window<"u"&&window.matchMedia&&(this.mq=window.matchMedia("(pointer: coarse)"),this.coarse=this.mq.matches,this.mq.addEventListener("change",this.onCoarse))}disconnectedCallback(){super.disconnectedCallback(),this.mq?.removeEventListener("change",this.onCoarse),this.mq=null}render(){let t=it(),e=this.label,s=this.height>0?this.height:140,r=bn(this.data),i=ot(this.yFormat),o=ot(this.xFormat,d=>String(d)),h=d=>this.xFormat&&d.trim()!==""&&Number.isFinite(Number(d))?o(Number(d)):d;if(!r.length)return w`<div class="nish-chart">
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Be=/'/g,ze=/"/g,Ge=/^(?:script|style|textarea|title)$/i,ae=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),w=ae(1),T=ae(2),nr=ae(3),Q=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),We=new WeakMap,X=Z.createTreeWalker(Z,129);function Ye(n,t){if(!oe(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ue!==void 0?Ue.createHTML(t):t}var Bn=(n,t)=>{let e=n.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",o=gt;for(let h=0;h<e;h++){let l=n[h],u,g,c=-1,y=0;for(;y<l.length&&(o.lastIndex=y,g=o.exec(l),g!==null);)y=o.lastIndex,o===gt?g[1]==="!--"?o=Fe:g[1]!==void 0?o=He:g[2]!==void 0?(Ge.test(g[2])&&(r=RegExp("</"+g[2],"g")),o=J):g[3]!==void 0&&(o=J):o===J?g[0]===">"?(o=r??gt,c=-1):g[1]===void 0?c=-2:(c=o.lastIndex-g[2].length,u=g[1],o=g[3]===void 0?J:g[3]==='"'?ze:Be):o===ze||o===Be?o=J:o===Fe||o===He?o=gt:(o=J,r=void 0);let _=o===J&&n[h+1].startsWith("/>")?" ":"";i+=o===gt?l+Fn:c>=0?(s.push(u),l.slice(0,c)+je+l.slice(c)+j+_):l+j+(c===-2?h:_)}return[Ye(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},bt=class n{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,o=0,h=t.length-1,l=this.parts,[u,g]=Bn(t,e);if(this.el=n.createElement(u,s),X.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=X.nextNode())!==null&&l.length<h;){if(r.nodeType===1){if(r.hasAttributes())for(let c of r.getAttributeNames())if(c.endsWith(je)){let y=g[o++],_=r.getAttribute(c).split(j),$=/([.?@])?(.*)/.exec(y);l.push({type:1,index:i,name:$[2],strings:_,ctor:$[1]==="."?ne:$[1]==="?"?se:$[1]==="@"?re:rt}),r.removeAttribute(c)}else c.startsWith(j)&&(l.push({type:6,index:i}),r.removeAttribute(c));if(Ge.test(r.tagName)){let c=r.textContent.split(j),y=c.length-1;if(y>0){r.textContent=It?It.emptyScript:"";for(let _=0;_<y;_++)r.append(c[_],yt()),X.nextNode(),l.push({type:2,index:++i});r.append(c[y],yt())}}}else if(r.nodeType===8)if(r.data===Ve)l.push({type:2,index:i});else{let c=-1;for(;(c=r.data.indexOf(j,c+1))!==-1;)l.push({type:7,index:i}),c+=j.length-1}i++}}static createElement(t,e){let s=Z.createElement("template");return s.innerHTML=t,s}};function st(n,t,e=n,s){if(t===Q)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=_t(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(n),r._$AT(n,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=st(n,r._$AS(n,t.values),r,s)),t}var ee=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??Z).importNode(e,!0);X.currentNode=r;let i=X.nextNode(),o=0,h=0,l=s[0];for(;l!==void 0;){if(o===l.index){let u;l.type===2?u=new vt(i,i.nextSibling,this,t):l.type===1?u=new l.ctor(i,l.name,l.strings,this,t):l.type===6&&(u=new ie(i,this,t)),this._$AV.push(u),l=s[++h]}o!==l?.index&&(i=X.nextNode(),o++)}return X.currentNode=Z,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},vt=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=st(this,t,e),_t(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==Q&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Hn(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&_t(this._$AH)?this._$AA.nextSibling.data=t:this.T(Z.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=bt.createElement(Ye(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new ee(r,this),o=i.u(this.options);i.p(e),this.T(o),this._$AH=i}}_$AC(t){let e=We.get(t.strings);return e===void 0&&We.set(t.strings,e=new bt(t)),e}k(t){oe(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new n(this.O(yt()),this.O(yt()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=ke(t).nextSibling;ke(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},rt=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=f}_$AI(t,e=this,s,r){let i=this.strings,o=!1;if(i===void 0)t=st(this,t,e,0),o=!_t(t)||t!==this._$AH&&t!==Q,o&&(this._$AH=t);else{let h=t,l,u;for(t=i[0],l=0;l<i.length-1;l++)u=st(this,h[s+l],e,l),u===Q&&(u=this._$AH[l]),o||=!_t(u)||u!==this._$AH[l],u===f?t=f:t!==f&&(t+=(u??"")+i[l+1]),this._$AH[l]=u}o&&!r&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ne=class extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}},se=class extends rt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}},re=class extends rt{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=st(this,t,e,0)??f)===Q)return;let s=this._$AH,r=t===f&&s!==f||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==f&&(s===f||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ie=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){st(this,t)}};var zn=kt.litHtmlPolyfillSupport;zn?.(bt,vt),(kt.litHtmlVersions??=[]).push("3.3.3");var Ke=(n,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new vt(t.insertBefore(yt(),i),i,void 0,e??{})}return r._$AI(n),r};var le=globalThis,V=class extends H{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ke(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return Q}};V._$litElement$=!0,V.finalized=!0,le.litElementHydrateSupport?.({LitElement:V});var Wn=le.litElementPolyfillSupport;Wn?.({LitElement:V});(le.litElementVersions??=[]).push("4.2.2");var jn="2.2.0";var Vn=Symbol.for("nish-ui.runtime.v1");function Gn(){let n=globalThis;return n[Vn]??={versions:new Set,slots:{}}}function Yn(n){n.versions.add(jn),n.versions.size>1&&!n.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(n.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...n.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var qe=!1;function Ut(n,t){let e=Gn();return qe||(qe=!0,Yn(e)),n in e.slots||(e.slots[n]=t()),e.slots[n]}var Je={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:n=>`${n} result${n===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:n=>`${n} active`,remove:"Remove",removeNamed:n=>`Remove ${n}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:n=>`${n}: no data`,seriesNumber:n=>`Series ${n}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark"};function he(){return Ut("element-strings",()=>({values:{...Je},listeners:new Set}))}function Kn(n){let t=he(),e={...t.values};for(let[s,r]of Object.entries(n))r!==void 0&&Object.hasOwn(Je,s)&&(e[s]=r);t.values=e;for(let s of Array.from(t.listeners))s()}function it(){return he().values}function Xe(n){let t=he().listeners;return t.add(n),()=>{t.delete(n)}}var $t=class extends V{#t=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#t??=Xe(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(),this.#t=null}stringsChanged(){this.requestUpdate()}};function St(n,t){customElements.get(n)||customElements.define(n,t)}var Et="\u2013",de="\u2212",ue="en-US",qn=Ut("format",()=>({locale:ue})),Ze=new Map;function Jn(n){let t=Ze.get(n);if(t===void 0){try{t=Intl.getCanonicalLocales(n)[0]??ue}catch{t=ue}Ze.set(n,t)}return t}function xt(n){return n?.locale?Jn(n.locale):qn.locale}function en(n){return n==="en"||n==="en-US"}var Qe=new Map;function nn(n,t){let e=Qe.get(n);return e===void 0&&(e=t(),Qe.set(n,e)),e}function Xn(n,t,e){return nn(`n|${n}|${t}|${e}`,()=>new Intl.NumberFormat(n,{minimumFractionDigits:t,maximumFractionDigits:e}))}function tt(n,t,e,s){return nn(`d|${n}|${t}|${s??""}`,()=>new Intl.DateTimeFormat(n,s?{...e,timeZone:s}:e))}function pe(n){return typeof n=="number"&&Number.isFinite(n)}function G(n,t,e,s){return Xn(s,t,e).format(n)}var ce=[[1e12,"T"],[1e9,"B"],[1e6,"M"],[1e3,"k"]];function sn(n,t,e){for(let s=0;s<ce.length;s++){let[r,i]=ce[s];if(!(n<r)){if(s>0&&Number((n/r).toFixed(t))>=1e3){let[o,h]=ce[s-1];return G(n/o,0,t,e)+h}return G(n/r,0,t,e)+i}}return G(n,0,t,e)}function rn(n,t){return Number(Math.abs(n).toFixed(t))===0}var tn=new Map;function Zn(n,t){let e=`${t}|${n}`,s=tn.get(e);if(s===void 0){try{s=new Intl.NumberFormat(t,{style:"currency",currency:n,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??n}catch{s=n+" "}tn.set(e,s)}return s}function Qn(n,t,e){let s=Zn(t.currency??"USD",e);if(t.compact&&n>=1e3)return s+sn(n,1,e);let r=t.cents??"auto",i=Math.round(n*100)%100!==0,o=r==="always"||r==="auto"&&(n<1e3||i);return s+(o?G(n,2,2,e):G(n,0,0,e))}function on(n,t={}){if(!pe(n))return Et;let e=Qn(Math.abs(n),t,xt(t));return n<0&&Math.round(Math.abs(n)*100)>0?de+e:e}function an(n,t={}){if(!pe(n))return Et;let e=t.digits??1,s=t.fromRatio??!0?n*100:n,r=G(Math.abs(s),e,e,xt(t))+"%";return rn(s,e)?r:s<0?de+r:t.signed?"+"+r:r}function ln(n,t={}){if(!pe(n))return Et;let e=xt(t),s=n<0&&!rn(n,t.digits??2)?de:"",r=Math.abs(n);return t.compact&&r>=1e3?s+sn(r,t.digits??1,e):s+(t.digits===void 0?G(r,0,2,e):G(r,t.digits,t.digits,e))}var ts=/^(\d{4})-(\d{2})-(\d{2})$/;function hn(n){if(n==null)return null;let t,e=!1;if(n instanceof Date)t=n;else if(typeof n=="number")t=new Date(n);else{let s=ts.exec(n.trim());e=!!s,t=s?new Date(Number(s[1]),Number(s[2])-1,Number(s[3])):new Date(n)}return Number.isNaN(t.getTime())?null:{d:t,dayOnly:e}}function cn(n,t){return n.dayOnly?void 0:t.timeZone}function Ft(n){return n.replace(/[\u202f\u00a0]/g," ")}var Sr=[[60,"minute","m"],[3600,"hour","h"],[86400,"day","d"],[86400*30,"month","mo"],[86400*365,"year","y"]];var es={month:"short",day:"numeric",year:"numeric"},ns={weekday:"long",month:"long",day:"numeric",year:"numeric"},ss={month:"short",day:"numeric"},rs={weekday:"short"},is={month:"numeric",day:"numeric"},os={hour:"numeric",minute:"2-digit"},as={hour:"numeric",minute:"2-digit",hour12:!0},ls={year:"numeric",month:"numeric",day:"numeric"};function hs(n,t){if(!t)return{year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate()};let e={year:0,month:0,day:0};for(let s of tt("en-US","ymd",ls,t).formatToParts(n))(s.type==="year"||s.type==="month"||s.type==="day")&&(e[s.type]=Number(s.value));return e}function cs(n,t,e,s){let r=cn(n,e);switch(t){case"medium":return Ft(tt(s,"medium",es,r).format(n.d));case"long":return Ft(tt(s,"long",ns,r).format(n.d));case"weekday":{let i=tt(s,"weekday",rs,r).format(n.d);if(!en(s))return`${i} ${tt(s,"md",is,r).format(n.d)}`;let o=hs(n.d,r);return`${i} ${o.month}/${o.day}`}default:return Ft(tt(s,"short",ss,r).format(n.d))}}function un(n,t="short",e={}){let s=hn(n);return s?cs(s,t,e,xt(e)):Et}function us(n,t,e){let s=en(e);return Ft(tt(e,s?"time12":"time",s?as:os,cn(n,t)).format(n.d))}function dn(n,t={}){let e=hn(n);return e?us(e,t,xt(t)):Et}var pn={ok:"var(--nish-ok-fill)",warn:"var(--nish-warn-fill)",loss:"var(--nish-loss-fill)",info:"var(--nish-info-fill)",accent:"var(--nish-accent)"};function B(n,t){return n&&Object.hasOwn(pn,n)?pn[n]:n&&/^chart-[1-8]$/.test(n)?`var(--nish-${n})`:`var(--nish-chart-${(Math.trunc(t)%8+8)%8+1})`}var D={grid:"var(--nish-line)",axis:"var(--nish-line-strong)",zero:"var(--nish-hi3)",text:"var(--nish-hi3)"},mn,ds=n=>Math.abs(n)<1e3?String(Math.round(n*100)/100):(mn??=new Intl.NumberFormat("en-US",{maximumFractionDigits:0}),mn.format(n));function ot(n,t=ds){let e=(n??"").trim();if(!e)return t;let s=e.indexOf(":"),r=(s<0?e:e.slice(0,s)).toLowerCase(),i=s<0?"":e.slice(s+1).trim();switch(r){case"number":return o=>ln(o);case"percent":{let o=i!==""&&Number.isInteger(Number(i))&&Number(i)>=0&&Number(i)<=10?Number(i):1;return h=>an(h,{digits:o})}case"currency":return o=>on(o,{currency:i||"USD"});case"date":{let o=i==="medium"||i==="long"||i==="weekday"?i:"short";return h=>un(h,o)}case"time":return o=>dn(o);default:return t}}function me(n,t,e){let s=Math.max(2,Math.floor(e));return Array.from({length:s},(r,i)=>n+(t-n)*i/(s-1))}function gn(n,t){if(n===t){let s=Math.abs(n)*.05||1;return[n-s,t+s]}let e=(t-n)*.06;return[n-e,t+e]}function yn(n,t){let e=0,s=n.length-1;for(;s-e>1;){let r=e+s>>1;n[r]<t?e=r:s=r}return Math.abs(n[e]-t)<=Math.abs(n[s]-t)?e:s}function Y(n){if(n==null||n==="")return null;let t=typeof n=="number"?n:Number(n);return Number.isFinite(t)?t:null}function fe(n){if(!Array.isArray(n))return[];let t=[];return n.forEach((e,s)=>{if(Array.isArray(e)){let r=Y(e[0]);r!==null&&t.push({x:r,y:Y(e[1])})}else if(e&&typeof e=="object"){let r=e,i=Y(r.x);i!==null&&t.push({x:i,y:Y(r.y)})}else t.push({x:s,y:Y(e)})}),t}function _n(n){return Array.isArray(n)?n.map((t,e)=>{let s=t&&typeof t=="object"?t:{};return{label:typeof s.label=="string"&&s.label?s.label:it().seriesNumber(e+1),tone:typeof s.tone=="string"?s.tone:void 0,points:fe(s.points??s.data)}}):[]}function bn(n){return Array.isArray(n)?n.map((t,e)=>{if(Array.isArray(t))return{label:String(t[0]??""),value:Y(t[1])??0};if(t&&typeof t=="object"){let s=t;return{label:s.label==null?String(e+1):String(s.label),value:Y(s.value)??0}}return{label:String(e+1),value:Y(t)??0}}):[]}var wt={fromAttribute(n){if(!n)return[];try{let t=JSON.parse(n);return Array.isArray(t)?t:[]}catch{return[]}},toAttribute(n){try{return JSON.stringify(n)}catch{return""}}},K=class extends $t{static properties={label:{type:String,reflect:!0},height:{type:Number,reflect:!0},tone:{type:String,reflect:!0},empty:{type:String,reflect:!0},yFormat:{type:String,attribute:"y-format",reflect:!0},xFormat:{type:String,attribute:"x-format",reflect:!0},width:{state:!0}};ro=null;themeObserver=null;constructor(){super(),this.label="",this.tone="",this.empty="",this.yFormat="",this.xFormat="",this.width=0}connectedCallback(){super.connectedCallback(),getComputedStyle(this).display==="inline"&&(this.style.display="block"),this.width=this.clientWidth,typeof ResizeObserver<"u"&&(this.ro=new ResizeObserver(()=>{this.clientWidth!==this.width&&(this.width=this.clientWidth)}),this.ro.observe(this)),this.themeObserver=new MutationObserver(()=>this.requestUpdate()),this.themeObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme","class"]})}disconnectedCallback(){super.disconnectedCallback(),this.ro?.disconnect(),this.ro=null,this.themeObserver?.disconnect(),this.themeObserver=null}get plotHeight(){return this.height>0?this.height:200}},fn=0;function vn(){return fn+=1,`nish-chart-${fn}`}var Ht="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";var $n=18,ps=22,Bt=class extends K{static properties={...K.properties,data:{converter:wt},xTicks:{type:String,attribute:"x-ticks",reflect:!0},showValues:{type:Boolean,attribute:"show-values",reflect:!0},selected:{state:!0},coarse:{state:!0}};mq=null;onCoarse=()=>{this.coarse=!!this.mq?.matches};constructor(){super(),this.data=[],this.height=140,this.xTicks="ends",this.showValues=!1,this.selected=null,this.coarse=!1}connectedCallback(){super.connectedCallback(),typeof window<"u"&&window.matchMedia&&(this.mq=window.matchMedia("(pointer: coarse)"),this.coarse=this.mq.matches,this.mq.addEventListener("change",this.onCoarse))}disconnectedCallback(){super.disconnectedCallback(),this.mq?.removeEventListener("change",this.onCoarse),this.mq=null}render(){let t=it(),e=this.label,s=this.height>0?this.height:140,r=bn(this.data),i=ot(this.yFormat),o=ot(this.xFormat,d=>String(d)),h=d=>this.xFormat&&d.trim()!==""&&Number.isFinite(Number(d))?o(Number(d)):d;if(!r.length)return w`<div class="nish-chart">
|
|
5
5
|
<div class="nish-empty" role="img" aria-label=${t.noDataNamed(e)} style="height:${s}px;box-sizing:border-box">${this.empty||t.noDataYet}</div>
|
|
6
6
|
</div>`;let l=this.width,u=B(this.tone,0),g=r.map(d=>Number.isFinite(d.value)?d.value:0),c=Math.max(0,...g),y=Math.min(0,...g),_=c-y||1,$=Math.max(0,s-$n-ps),C=$n+c/_*$,m=l/r.length,A=Math.max(1,m*.72),S=this.showValues,N=S||this.coarse,et=this.xTicks==="all",I=this.selected!=null&&this.selected<r.length?this.selected:null,O=d=>{let v=d.currentTarget.getBoundingClientRect(),M=Math.floor((d.clientX-v.left)/(v.width||1)*r.length);this.selected=Math.min(r.length-1,Math.max(0,M))},at=d=>{if(d.key==="ArrowLeft"||d.key==="ArrowRight"){d.preventDefault();let v=d.key==="ArrowRight"?1:-1,M=this.selected;this.selected=M==null?v>0?0:r.length-1:Math.min(r.length-1,Math.max(0,M+v))}else d.key==="Escape"&&(this.selected=null)},At=l>0?w`<svg
|
|
7
7
|
width=${l}
|