@nordhealth/components 2.16.1-alpha.2 → 2.16.1-alpha.4

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/lib/bundle.js CHANGED
@@ -92,7 +92,7 @@ function dt(t,e){return(({finisher:t,descriptor:e})=>(n,o)=>{var r;if(void 0===o
92
92
  * @license
93
93
  * Copyright 2017 Google LLC
94
94
  * SPDX-License-Identifier: BSD-3-Clause
95
- */const Me=(t,e,n)=>{const o=new Map;for(let r=e;r<=n;r++)o.set(t[r],r);return o},Ie=kt(class extends _t{constructor(t){if(super(t),t.type!==wt)throw Error("repeat() can only be used in text expressions")}ht(t,e,n){let o;void 0===n?n=e:void 0!==e&&(o=e);const r=[],i=[];let a=0;for(const e of t)r[a]=o?o(e,a):a,i[a]=n(e,a),a++;return{values:i,keys:r}}render(t,e,n){return this.ht(t,e,n).values}update(t,[e,n,o]){var r;const i=(t=>t._$AH)(t),{values:a,keys:s}=this.ht(e,n,o);if(!Array.isArray(i))return this.ut=s,a;const l=null!==(r=this.ut)&&void 0!==r?r:this.ut=[],d=[];let c,h,u=0,p=i.length-1,v=0,b=a.length-1;for(;u<=p&&v<=b;)if(null===i[u])u++;else if(null===i[p])p--;else if(l[u]===s[v])d[v]=qt(i[u],a[v]),u++,v++;else if(l[p]===s[b])d[b]=qt(i[p],a[b]),p--,b--;else if(l[u]===s[b])d[b]=qt(i[u],a[b]),Ft(t,d[b+1],i[u]),u++,b--;else if(l[p]===s[v])d[v]=qt(i[p],a[v]),Ft(t,i[u],i[p]),p--,v++;else if(void 0===c&&(c=Me(s,v,b),h=Me(l,u,p)),c.has(l[u]))if(c.has(l[p])){const e=h.get(s[v]),n=void 0!==e?i[e]:null;if(null===n){const e=Ft(t,i[u]);qt(e,a[v]),d[v]=e}else d[v]=qt(n,a[v]),Ft(t,i[u],n),i[e]=null;v++}else jt(i[p]),p--;else jt(i[u]),u++;for(;v<=b;){const e=Ft(t,d[b+1]);qt(e,a[v]),d[v++]=e}for(;u<=p;){const t=i[u++];null!==t&&jt(t)}return this.ut=s,((t,e=Ut)=>{t._$AH=e})(t,d),I}});const Be="keyboard-arrow-up-down";var Pe=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.29008 12.3413 1.41 1.42-3.96 3.95c-.2.19-.45.29-.71.29s-.51-.1-.71-.29l-3.990002-4 1.410002-1.42 2.26 2.25v-12.54002h2v12.63002zm11.38002-6.05002-4.01-4c-.39-.39-1.02-.39-1.41 0l-3.96 3.95 1.41 1.42 2.29-2.29v12.63002h2v-12.54002l2.26 2.25 1.41-1.42z" fill="currentColor"/></svg>',title:Be,tags:"nordicon keyboard keys arrow up down shortcut"});var He=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m18.0025 4v8c0 1.1-.9 2-2 2h-12.59l3 3-1.41 1.41-4.71-4.7c-.39-.39-.39-1.02 0-1.41l4.71-4.71 1.41 1.41-3 3h12.59v-8h-4v-2h4c1.1 0 2 .9 2 2z" fill="currentColor"/></svg>',title:"keyboard-return",tags:"nordicon keyboard return key shortcut"});var Fe=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m18 2h-10.54c-.58 0-1.14.25-1.52.7l-5.14 6c-.65.75-.65 1.85 0 2.6l5.14 6c.38.44.93.7 1.52.7h10.54c1.1 0 2-.9 2-2v-12c0-1.1-.9-2-2-2zm0 14h-10.54l-5.14-6 5.14-6h10.54zm-9.54-3.88 2.12-2.12-2.12-2.12 1.41-1.41 2.12 2.12 2.12-2.12 1.41 1.41-2.12 2.12 2.12 2.12-1.41 1.41-2.12-2.12-2.12 2.12z" fill="currentColor"/></svg>',title:"keyboard-backspace",tags:"nordicon keyboard backspace back delete key shortcut"});function qe(t,e,n){return t>n?e:t<e?n:t}function Ue(t){var e;return(null===(e=t.activeElement)||void 0===e?void 0:e.shadowRoot)?Ue(t.activeElement.shadowRoot):t.activeElement||void 0}var je=["Shift","Meta","Alt","Control"],Ye="object"==typeof navigator&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"Meta":"Control";function We(t,e){return"function"==typeof t.getModifierState&&t.getModifierState(e)}function Ve(t){return t.trim().split(" ").map((function(t){var e=t.split(/\b\+/),n=e.pop();return[e=e.map((function(t){return"$mod"===t?Ye:t})),n]}))}function Xe(t,e){var n;void 0===e&&(e={});var o=null!=(n=e.timeout)?n:1e3,r=Object.keys(t).map((function(e){return[Ve(e),t[e]]})),i=new Map,a=null;return function(t){t instanceof KeyboardEvent&&(r.forEach((function(e){var n=e[0],o=e[1],r=i.get(n)||n;!function(t,e){return!(e[1].toUpperCase()!==t.key.toUpperCase()&&e[1]!==t.code||e[0].find((function(e){return!We(t,e)}))||je.find((function(n){return!e[0].includes(n)&&e[1]!==n&&We(t,n)})))}(t,r[0])?We(t,t.key)||i.delete(n):r.length>1?i.set(n,r.slice(1)):(i.delete(n),o(t))})),a&&clearTimeout(a),a=setTimeout(i.clear.bind(i),o))}}const Ke=/Arrow(Up|Down|Left|Right)/g,Ge=/Escape/g;class Qe{constructor(t,e,n=window){this.shortcuts=e,this.target=n,t.addController(this)}hostConnected(){this.shortcuts&&this.bind(this.shortcuts)}hostDisconnected(){this.unbind()}unbind(){var t;null===(t=this.unregister)||void 0===t||t.call(this)}bind(t){this.unbind(),this.shortcuts=t,this.unregister=function(t,e,n){var o;void 0===n&&(n={});var r=null!=(o=n.event)?o:"keydown",i=Xe(e,n);return t.addEventListener(r,i),function(){t.removeEventListener(r,i)}}(this.target,function(t){const e={};return Object.keys(t).forEach((n=>{if(e[n]=t[n],Ke.test(n)){const t=n.replace(Ke,((t,e)=>e));e[t]=e[n]}if(Ge.test(n)){const t=n.replace(Ge,(()=>"Esc"));e[t]=e[n]}})),e}(this.shortcuts))}}class Ze{constructor(t,e){this.host=t,this.options=e,this.handleEsc=t=>{this.options.isOpen()&&this.options.onDismiss(t)},this.handleClickOut=t=>{var e;if(!this.options.isOpen())return;const n=null!==(e=this.options.isDismissible)&&void 0!==e?e:t=>t!==this.host;t.composedPath().every(n)&&this.options.onDismiss(t)},t.addController(this),this.shortcut=new Qe(t,{Escape:this.handleEsc}),this.events=new ne(t)}hostConnected(){this.events.listen(document,"click",this.handleClickOut,!0)}}const Je=t=>e=>{e.preventDefault(),t(e)};class tn{constructor(t,e){this.host=t,t.addController(this),this.commandShortcuts=new Qe(t),this.globalShortcuts=new Qe(t,{"$mod+k":Je(e.toggleOpen)}),this.navigationShortcuts=new Qe(t,{Enter:Je(e.trigger),Backspace:e.goBack,End:Je(e.end),Home:Je(e.start),ArrowDown:Je(e.next),ArrowUp:Je(e.previous)},t)}registerCommandShortcuts(){const t={};for(const e of this.host.commands)e.shortcut&&(t[e.shortcut]=()=>{var t;return null===(t=e.handler)||void 0===t?void 0:t.call(e,this.host)});this.commandShortcuts.bind(t)}}var en=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.7098 10.7401-8.63996 8.67-1.42-1.41 7.93996-7.97-7.99996-8.03001 1.42-1.410002 8.69996 8.740002c.39.39.39 1.02001 0 1.41001z" fill="currentColor"/></svg>',title:"arrow-right",tags:"nordicon arrow right caret pointing triangle chevron"});var nn=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor"><path d="m14.4101 18.0001-1.42 1.41-8.70004-8.74c-.39-.39-.39-1.02001 0-1.41001l8.64004-8.670002 1.42 1.410002-7.94004 7.97 8.00004 8.04001z"/><path d="m14.4101 18.0001-1.42 1.41-8.70004-8.74c-.39-.39-.39-1.02001 0-1.41001l8.64004-8.670002 1.42 1.410002-7.94004 7.97 8.00004 8.04001z"/></g></svg>',title:"arrow-left",tags:"nordicon arrow left caret pointing triangle chevron"});var on=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m13.5 14h6.5v2h-6.5c-.63 0-1.22-.3-1.6-.8l-5.4-7.2h-6.5v-2h6.5c.63 0 1.22.3 1.6.8zm-1.5-8v2h8v-2z" fill="currentColor"/></svg>',title:"keyboard-option",tags:"nordicon keyboard option key shortcut"});const rn=a`:host{display:flex}.n-command{display:flex;flex:1;border-inline-start:2px solid transparent;align-items:center;color:var(--n-color-text);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-command.n-selected,.n-command:hover{cursor:pointer;background-color:var(--n-color-active)}.n-command.n-selected{border-inline-start-color:var(--n-color-accent)}nord-icon{color:var(--n-color-icon)}.n-command-icon{margin-inline-start:2px;margin-inline-end:calc(var(--n-space-s) * 1.4);line-height:var(--n-line-height-tight)}.n-selected .n-command-icon nord-icon{color:var(--n-color-icon-hover)}.n-title{flex:1;margin-inline-end:calc(var(--n-space-s)/ 2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-shortcuts{display:flex;gap:calc(var(--n-space-s)/ 2)}.n-shortcut{padding:calc(var(--n-space-s)/ 4) calc(var(--n-space-s)/ 3);text-transform:capitalize;font-size:var(--n-font-size-xs);border:1px solid var(--n-color-border-strong);font-weight:var(--n-font-weight);box-shadow:var(--n-box-shadow);border-radius:var(--n-border-radius-s);color:var(--n-color-icon);background:var(--n-color-button);line-height:var(--n-line-height-tight);min-inline-size:var(--n-space-s);display:inline-flex;align-items:center;justify-content:center;user-select:none}`,an=/(?:Key|Digit)([A-Z0-9])/g;Nt.registerIcon(nn),Nt.registerIcon(en),Nt.registerIcon(on);let sn=class extends ot{constructor(){super(...arguments),this.direction=new Oe(this),this.selected=!1}render(){return M`<div class="${ge({"n-selected":this.selected,"n-command":!0})}"><div aria-hidden="true" class="n-command-icon"><nord-icon size="s" name="${this.getIconName()}"></nord-icon></div><div class="n-title">${this.command.title}</div>${this.renderShortcut()}</div>`}ensureInView(){this.selected&&requestAnimationFrame((()=>this.scrollIntoView({block:"nearest"})))}getIconName(){return this.command.icon?this.command.icon:this.direction.isLTR?"arrow-right":"arrow-left"}renderShortcut(){if(!this.command.shortcut)return B;const t=this.command.shortcut.replace(an,"$1");return M`<nord-visually-hidden>, ${t}</nord-visually-hidden><div aria-hidden="true" class="n-shortcuts">${t.split("+").map((t=>M`<div class="n-shortcut">${"alt"===t.toLowerCase()&&navigator.platform.indexOf("Mac")>-1?M`<nord-icon name="${"keyboard-option"}" size="s"></nord-icon>`:t}</div>`))}</div>`}};sn.styles=rn,t([st({type:Object})],sn.prototype,"command",void 0),t([st({type:Boolean})],sn.prototype,"selected",void 0),t([Tt("selected")],sn.prototype,"ensureInView",null),sn=t([it("nord-command-menu-action")],sn);var ln=sn;class dn extends ye{constructor(t){super(dn.eventName),this.command=t}}dn.eventName="nord-select";const cn=a`:host{--_n-command-menu-inline-size:var(--n-command-menu-inline-size, 640px);--_n-command-menu-block-size:var(--n-command-menu-block-size, 290px);--_n-command-menu-block-start:var(--n-command-menu-block-start, 16%)}.n-modal{display:none;position:fixed;pointer-events:none;z-index:var(--n-index-modal);inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;overflow:auto}.n-modal.n-visible{display:block}.n-modal-content{position:relative;pointer-events:all;inset-block-start:var(--_n-command-menu-block-start);margin:auto;display:flex;flex-direction:column;min-inline-size:0;background:var(--n-color-surface);border-radius:var(--n-border-radius);box-shadow:var(--n-box-shadow-modal);max-inline-size:var(--_n-command-menu-inline-size);overflow:hidden}.n-bump{animation:zoom-in-zoom-out var(--n-transition-slowly)}@keyframes zoom-in-zoom-out{0%{transform:translateY(-10px) scale(.97);opacity:0}100%{transform:translateY(0) scale(1.0001);opacity:1}}.n-modal-footer{display:flex;gap:var(--n-space-s);padding:var(--n-space-s) var(--n-space-m);font-size:calc(var(--n-font-size-s) - 1px);color:var(--n-color-text-weaker)}.n-help{display:flex;align-items:center;gap:2px}.n-help+.n-help{padding-inline-start:var(--n-space-s);border-inline-start:1px solid var(--n-color-border-strong)}.n-help nord-icon{--_n-icon-size:10px;color:currentColor;margin:3px 4px}.n-help.n-backspace nord-icon{--_n-icon-size:12px}.n-search-wrapper{display:flex;border-block-end:1px solid var(--n-color-border)}[role=combobox]{flex:1;font-size:var(--n-font-size-l);font-weight:var(--n-font-weight);font-family:inherit;background:0 0;color:var(--n-color-text);border:none;border-radius:0;appearance:none;outline:0;margin:0;padding:var(--n-space-m)}[role=combobox]::-webkit-input-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=combobox]::-moz-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=combobox]::-ms-input-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=listbox]{max-block-size:var(--_n-command-menu-block-size);overflow:auto;margin:0;padding:0}.n-group-header{line-height:var(--n-line-height);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-s)/ 1.4) var(--n-space-m);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:var(--n-font-size-s);background:var(--n-color-surface-raised);font-weight:var(--n-font-weight-active);color:var(--n-color-text-weaker)}.n-command-empty{display:flex;flex:1;flex-direction:column;border-inline-start:2px solid transparent;align-items:flex-start;color:var(--n-color-text);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-command-empty .n-title{flex:1;margin-block-start:var(--n-space-s);margin-inline-end:calc(var(--n-space-s)/ 2);max-inline-size:100%;font-size:var(--n-font-size-m);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-command-empty .n-tip{flex:1;margin-block-start:var(--n-space-s);margin-block-end:var(--n-space-m);font-size:var(--n-font-size-s);color:var(--n-color-text-weaker)}`,hn={$lang:"en-US",$name:"English",$dir:"ltr","nord-command-menu":{instructions:"Press 'Enter' to confirm your input or 'Escape' to cancel",inputLabel:"Type the name of a command to run.",footerArrowKeys:"Navigate",footerEnterKey:"Select",footerEscapeKey:"Esc to dismiss",footerBackspaceKey:"Move to parent",noResults:t=>`No results for “${t}”`,tip:"Search tips: some search terms require an exact match. Try typing the entire command name, or use a different word or phrase."},"nord-calendar":{prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year"},"nord-date-picker":{modalHeading:"Choose a date",closeLabel:"Close window",buttonLabel:"Choose date",selectedDateMessage:"Selected date is"},"nord-modal":{closeLabel:"Close dialog"},"nord-nav-toggle":{label:"Toggle navigation"},"nord-textarea":{remainingCharacters:t=>`Characters remaining: ${t}`}},un=new Set,pn=new Map;function vn(){for(const t of un)t()}function bn(...t){t.forEach((t=>{const e=t.$lang.toLowerCase();pn.set(e,t)})),vn()}function gn(t){return pn.has(t)}function fn(t){const e=t.toLowerCase(),[n]=e.split("-");return pn.get(e)||pn.get(n)||hn}new MutationObserver(vn).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});const mn=()=>{};class yn{constructor(t,e={onLangChange:mn}){this.host=t,this.options=e,this.handleLangChange=()=>{const t=fn(this.lang);this.resolvedTranslation!==t&&(this.resolvedTranslation=t,this.options.onLangChange(),this.host.requestUpdate())},t.addController(this),this.resolvedTranslation=fn(this.lang)}get lang(){return this.host.lang||document.documentElement.lang}get resolvedLang(){return this.resolvedTranslation.$lang}hostConnected(){var t;this.unsubscribe=(t=this.handleLangChange,un.add(t),()=>un.delete(t)),this.options.onLangChange()}hostDisconnected(){var t;null===(t=this.unsubscribe)||void 0===t||t.call(this)}term(t,...e){var n,o;const{resolvedTranslation:r,resolvedLang:i}=this,a=this.host.localName;null==r[a]?console.warn(`NORD: Missing translations for component \`${a}\` in lang: \`${i}\``):null==r[a][t]&&console.warn(`NORD: Missing translation key \`${String(t)}\` for component \`${a}\` in lang \`${i}\``);const s=null!==(o=null===(n=r[a])||void 0===n?void 0:n[t])&&void 0!==o?o:hn[a][t];return"function"==typeof s?s(...e):s}}Nt.registerIcon(Pe),Nt.registerIcon(He),Nt.registerIcon(Fe);let xn=class extends ot{constructor(){super(...arguments),this.inputRef=Zt(),this.listRef=Zt(),this.localize=new yn(this),this.dismissController=new Ze(this,{isOpen:()=>this.open,onDismiss:()=>this.close()}),this.keyboardController=new tn(this,{trigger:()=>this.select(),goBack:()=>this.goBack(),end:()=>this.end(),start:()=>this.start(),next:()=>this.next(),previous:()=>this.previous(),toggleOpen:()=>this.toggleOpen()}),this.open=!1,this.placeholder="Type a command or search...",this.commands=[],this.search="",this.bump=!0,this.selectedIndex=0,this.filteredCommands=[]}get selected(){return this.filteredCommands[this.selectedIndex]}show(t={}){this.dispatchEvent(new ye("open",{cancelable:!0}))&&(this.open=!0,this.setParent(t.parent))}close(){var t;this.open=!1,null===(t=this.previousFocus)||void 0===t||t.focus(),this.previousFocus=void 0,this.dispatchEvent(new ye("close"))}toggleOpen(){this.open?this.close():this.show()}focus(){var t;null===(t=this.inputRef.value)||void 0===t||t.focus()}render(){var t;const e=function(t,e){var n;const o=new Map;for(const r of t){const t=r[e],i=null!==(n=o.get(t))&&void 0!==n?n:[];o.has(t)||o.set(t,[]),i.push(r),o.set(t,i)}return o}(this.filteredCommands,"section"),n=0===this.filteredCommands.length?"no-results":null===(t=this.selected)||void 0===t?void 0:t.id;return M`<div class="${ge({"n-visible":this.open,"n-modal":!0})}"><div @animationend="${this.handleAnimationEnd}" class="${ge({"n-bump":this.bump,"n-modal-content":!0})}"><div class="n-search-wrapper"><nord-visually-hidden id="instructions">${this.localize.term("instructions")}</nord-visually-hidden><input type="text" id="search" @input="${this.handleInput}" @blur="${this.handleBlur}" ${ee(this.inputRef)} placeholder="${this.placeholder}" .value="${this.search}" spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="${this.localize.term("inputLabel")}" aria-autocomplete="list" aria-haspopup="listbox" role="combobox" aria-controls="list" aria-expanded="true" aria-activedescendant="${yt(n)}" aria-describedby="instructions"></div><div class="n-modal-body"><div id="list" ${ee(this.listRef)} role="listbox">${0===this.filteredCommands.length?this.renderNoResults():Array.from(e,(([t,e])=>this.renderSection(t,e)))}</div></div><slot name="footer"><div class="n-modal-footer"><span class="n-help"><nord-icon label="Arrow keys" name="${Be}"></nord-icon>${this.localize.term("footerArrowKeys")} </span><span class="n-help"><nord-icon label="Enter key" name="${"keyboard-return"}"></nord-icon>${this.localize.term("footerEnterKey")} </span><span class="n-help">${this.localize.term("footerEscapeKey")}</span> <span class="n-help n-backspace"><nord-icon label="Backspace key" name="${"keyboard-backspace"}"></nord-icon>${this.localize.term("footerBackspaceKey")}</span></div></slot></div></div>`}renderNoResults(){return M`<div id="no-results" class="n-command-empty" role="option" aria-selected="true"><div class="n-title">${this.localize.term("noResults",this.search)}</div><div class="n-tip">${this.localize.term("tip")}</div></div>`}renderSection(t,e){const n=`section-${t}`;return M`<div role="group" aria-labelledby="${Ct(t,n)}">${t?M`<div class="n-group-header" role="presentation" id="${n}">${t}</div>`:B} ${Ie(e,(t=>t.id),(t=>{var e,n;return M`<nord-command-menu-action id="${t.id}" .command="${t}" ?selected="${this.open&&t.id===(null===(e=this.selected)||void 0===e?void 0:e.id)}" @click="${()=>this.select(t)}" role="option" aria-selected="${Ct(t.id===(null===(n=this.selected)||void 0===n?void 0:n.id),"true")}"></nord-command-menu-action>`}))}</div>`}handleCommandsChange(){this.keyboardController.registerCommandShortcuts()}handleBump(){this.open&&(this.bump=!0)}focusOnOpen(){this.open&&(this.previousFocus=Ue(document),this.focus(),this.listRef.value&&(this.listRef.value.scrollTop=0))}handleAnimationEnd(){this.bump=!1}handleBlur(){this.open&&this.focus()}handleInput(t){const e=t.target;this.setSearch(e.value)}select(t=this.selected){var e;this.commands.some((e=>e.parent===t.id))?(this.setParent(t.id),this.bump=!0,this.focus()):this.close(),this.setSearch(""),null===(e=t.handler)||void 0===e||e.call(t,this);const n=new dn(t);this.dispatchEvent(n)}start(){this.selectedIndex=0}end(){this.selectedIndex=this.filteredCommands.length-1}next(){this.selectedIndex=qe(this.selectedIndex+1,0,this.filteredCommands.length-1)}previous(){this.selectedIndex=qe(this.selectedIndex-1,0,this.filteredCommands.length-1)}goBack(){if(!this.search&&this.parent){const t=this.commands.find((t=>t.id===this.parent));this.setParent(null==t?void 0:t.parent)}}setParent(t){this.parent=t,this.setSearch("")}setSearch(t){this.search=t,this.selectedIndex=0}filterCommands(){const t=this.search.toLocaleLowerCase().split(/\s+/);this.filteredCommands=this.commands.filter((({title:e,keywords:n="",parent:o})=>{const r=`${e} ${n}`.toLocaleLowerCase(),i=t.every((t=>r.includes(t)));return(!this.parent&&this.search||o==this.parent)&&i}))}};xn.styles=[At,cn],t([st({type:Boolean})],xn.prototype,"open",void 0),t([st({type:String})],xn.prototype,"placeholder",void 0),t([st({type:Array,attribute:!1})],xn.prototype,"commands",void 0),t([lt()],xn.prototype,"parent",void 0),t([lt()],xn.prototype,"search",void 0),t([lt()],xn.prototype,"bump",void 0),t([lt()],xn.prototype,"selectedIndex",void 0),t([lt()],xn.prototype,"filteredCommands",void 0),t([Tt("commands")],xn.prototype,"handleCommandsChange",null),t([Tt("open")],xn.prototype,"handleBump",null),t([Tt("open","updated")],xn.prototype,"focusOnOpen",null),t([Tt("search"),Tt("parent"),Tt("commands")],xn.prototype,"filterCommands",null),xn=t([it("nord-command-menu")],xn);var wn=xn;var kn=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.0864 12.0402 1.8138 1.8137-4.7724 4.7724c-.2573.2573-.5789.373-.9133.373-.33447 0-.65606-.1286-.91333-.373l-4.77238-4.7724 1.81377-1.8137 3.85904 3.859 3.8591-3.859zm-3.859-7.93687 3.859 3.85907 1.8138-1.81376-4.7724-4.77238c-.5017-.50168-1.31208-.50168-1.81376 0l-4.77238 4.77238 1.81376 1.81376 3.85908-3.85907z" fill="currentColor"/></svg>',title:"interface-dropdown-small",tags:"nordicon small interface dropdown select arrow up down caret triangle chevron"});const _n=a`:host{--_n-select-block-size:var(--n-select-block-size, var(--n-space-xl))}.n-select-container{position:relative;inline-size:fit-content}:host([expand]){inline-size:100%}:host([expand]) .n-select-container{inline-size:100%}select{-webkit-appearance:none;appearance:none;position:absolute;font-size:var(--n-font-size-m);font-family:var(--n-font-family);color:var(--n-color-text);inline-size:100%;opacity:.0001;cursor:pointer;background:0 0;border:0;block-size:var(--_n-select-block-size);inset-block-end:0;inset-inline-start:0;z-index:var(--n-index-default)}option{color:initial}nord-button{--n-button-text-align:start}nord-icon{color:var(--n-color-icon)}.n-label-container:hover+.n-select-container nord-button,select:hover+nord-button{--_n-button-border-color:var(--n-button-border-color, var(--n-color-border-hover));--_n-button-background-color:var(--n-button-background-color, var(--n-color-button-hover))}.n-label-container:hover+.n-select-container nord-button nord-icon,select:hover+nord-button nord-icon{color:var(--n-color-icon-hover)}select:focus+nord-button{--n-button-border-color:var(--n-color-accent);--n-button-box-shadow:0 0 0 1px var(--n-button-border-color)}:host([disabled]){cursor:auto;pointer-events:none}:host([disabled]) nord-button{--n-input-border-color:var(--n-color-active);--_n-button-color:var(--n-color-text-weakest);--_n-button-background-color:var(--n-color-active);--_n-button-opacity:1}:host([disabled]) nord-icon{color:var(--n-color-text-weakest)}::slotted(:not([slot])){display:none}select[aria-invalid=true]+nord-button{--n-button-border-color:var(--n-color-status-danger)}`;Nt.registerIcon(kn);let zn=class extends(Ae($e(Se(le(se(ot)))))){constructor(){super(...arguments),this.defaultSlot=new ce(this),this.inputId="select",this.expand=!1}get formValue(){return this.value||void 0}render(){const t=this.options,e=this.getButtonText(t);return M`<slot></slot>${this.renderLabel()}<div class="n-select-container"><select ${ee(this.focusableRef)} id="${this.inputId}" ?disabled="${this.disabled}" ?required="${this.required}" name="${yt(this.name)}" @change="${this.handleChange}" @input="${this.handleInput}" aria-describedby="${yt(this.getDescribedBy())}" aria-invalid="${yt(this.getInvalid())}" autocomplete="${this.autocomplete}">${this.placeholder&&M`<option value="" disabled="disabled" ?selected="${!this.value}">${this.placeholder}</option>`} ${t.map((t=>this.renderOption(t)))}</select><nord-button size="${this.size}" tabindex="-1" ?disabled="${this.disabled}" ?expand="${this.expand}" aria-hidden="true" type="button"><slot slot="start" name="icon"></slot>${e}<nord-icon slot="end" name="interface-dropdown-small"></nord-icon></nord-button></div>${this.renderError()}`}get options(){return Array.from(this.querySelectorAll("option"))}getButtonText(t){const e=t.find((t=>t.value===this.value.toString()));return e?e.text:this.placeholder?this.placeholder:t[0]?t[0].text:""}renderOption(t){return M`<option value="${yt(t.value)}" ?disabled="${t.disabled}" .selected="${t.value===this.value.toString()}">${t.text}</option>`}};zn.styles=[At,Ee,_n],t([st({reflect:!0,type:Boolean})],zn.prototype,"expand",void 0),zn=t([it("nord-select")],zn);var $n=zn;const Cn=a`:host{--_n-stack-gap:var(--n-stack-gap, var(--n-space-m));display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;color:var(--n-color-text);gap:var(--_n-stack-gap);max-inline-size:100%;inline-size:100%}:host([direction=horizontal]){flex-direction:row}:host([wrap]){flex-wrap:wrap}@media (max-width:768px){:host([responsive]){flex-direction:column!important}}:host([align-items=center]){align-items:center}:host([align-items=start]){align-items:flex-start}:host([align-items=end]){align-items:flex-end}:host([justify-content=center]){justify-content:center}:host([justify-content=start]){justify-content:flex-start}:host([justify-content=end]){justify-content:flex-end}:host([justify-content=space-between]){justify-content:space-between}:host([justify-content=space-evenly]){justify-content:space-evenly}:host([justify-content=space-around]){justify-content:space-around}::slotted(*){margin:0!important;min-inline-size:0;max-inline-size:100%}:host([gap=none]){--_n-stack-gap:var(--n-stack-gap, 0)}:host([gap="s"]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-s))}:host([gap="m"]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-m))}:host([gap="l"]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-l))}:host([gap=xl]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-xl))}:host([gap=xxl]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-xxl))}`;let Sn=class extends ot{constructor(){super(...arguments),this.gap="m",this.direction="vertical",this.alignItems="stretch",this.responsive=!1,this.wrap=!1}render(){return M`<slot></slot>`}};Sn.styles=[At,Cn],t([st({reflect:!0})],Sn.prototype,"gap",void 0),t([st({reflect:!0})],Sn.prototype,"direction",void 0),t([st({reflect:!0,attribute:"align-items"})],Sn.prototype,"alignItems",void 0),t([st({reflect:!0,type:Boolean})],Sn.prototype,"responsive",void 0),t([st({reflect:!0,type:Boolean})],Sn.prototype,"wrap",void 0),t([st({reflect:!0,attribute:"justify-content"})],Sn.prototype,"justifyContent",void 0),Sn=t([it("nord-stack")],Sn);var An=Sn;const En=a`nord-table{--_n-table-td-padding:var(--n-table-td-padding, calc(var(--n-space-m) * 0.8));--_n-table-border-radius:var(--n-table-border-radius, var(--n-border-radius));all:unset;color:var(--n-color-text);-webkit-user-select:inherit;user-select:inherit;display:block;max-inline-size:100%;overflow-x:auto}nord-table table{inline-size:100%;font-size:var(--n-font-size-m);font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);line-height:var(--n-line-height-tight);text-align:start;border-spacing:0;border-collapse:separate;color:var(--n-color-text);font-variant-numeric:tabular-nums}nord-table th{border-block-end:1px solid var(--n-color-border);font-weight:var(--n-font-weight-active);font-size:var(--n-font-size-s);color:var(--n-color-text-weaker);text-align:start;background:var(--n-color-surface-raised)}nord-table td{border-block-end:1px solid var(--n-color-border);white-space:nowrap}nord-table :is(td, th){padding:var(--_n-table-td-padding) var(--n-space-s)}nord-table :is(td,th):first-child{padding-inline-start:var(--n-space-m)}nord-table :is(td,th):last-child{padding-inline-end:var(--n-space-m)}nord-table tbody tr:hover{background:var(--n-color-active)}nord-table tbody :is(.n-row-selected, .n-row-selected:hover){background:var(--n-color-active);color:var(--n-color-text);opacity:1;cursor:default}nord-table tbody :is(tr:hover,.n-row-selected) td{color:var(--n-color-text)}nord-table th[aria-sort]{cursor:pointer}nord-table th[aria-sort]:not([aria-sort=none]){color:var(--n-color-text)}nord-table[density=condensed]{--_n-table-td-padding:var(--n-table-td-padding, calc(var(--n-space-m) * 0.5))}nord-table[density=relaxed]{--_n-table-td-padding:var(--n-table-td-padding, calc(var(--n-space-m) * 1.1))}nord-card nord-table tbody tr:last-child td{border-block-end-color:transparent}nord-card nord-table th:first-child{border-start-start-radius:var(--_n-table-border-radius)}nord-card nord-table th:last-child{border-start-end-radius:var(--_n-table-border-radius)}nord-card [slot=header]~nord-table th:is(:first-child, :last-child){border-radius:0}nord-card nord-table tbody tr:last-child td:first-child{border-end-start-radius:var(--_n-table-border-radius)}nord-card nord-table tbody tr:last-child td:last-child{border-end-end-radius:var(--_n-table-border-radius)}nord-table[scroll-snap]{scroll-snap-type:inline mandatory;scroll-behavior:smooth}nord-table[scroll-snap] :is(th, td){scroll-snap-align:start}nord-table:where([striped]) tbody tr:where(:nth-child(even)){background:var(--n-color-surface-raised)}nord-table .n-table-ellipsis{max-inline-size:0;inline-size:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nord-table .n-table-align-right{text-align:end}nord-table .n-table-actions{display:flex;justify-content:center}nord-table .n-table-actions nord-button{margin-block:-10px}`;let Dn=class extends ot{constructor(){super(...arguments),this.density="default",this.scrollSnap=!1,this.striped=!1}connectedCallback(){super.connectedCallback(),this.renderStyles()}renderStyles(){const t=this.getRootNode(),e=t.nodeType===Node.DOCUMENT_NODE?t.head:t;const n=this.localName;if(t.querySelector(`style[data-component=${n}]`))return;const o=document.createDocumentFragment();H(M`<style data-component="${n}">${En}</style>`,o),e.appendChild(o)}createRenderRoot(){return this}};t([st({reflect:!0})],Dn.prototype,"density",void 0),t([st({reflect:!0,type:Boolean,attribute:"scroll-snap"})],Dn.prototype,"scrollSnap",void 0),t([st({type:Boolean,reflect:!0})],Dn.prototype,"striped",void 0),Dn=t([it("nord-table")],Dn);var Tn=Dn;const On=a`:host{--_n-textarea-inline-size:var(--n-textarea-inline-size, 240px);--_n-textarea-block-size:var(--n-textarea-block-size, 76px);--_n-input-background:var(--n-textarea-background, var(--n-color-active));--_n-input-color:var(--n-textarea-color, var(--n-color-text));--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-border-strong));--_n-input-border-radius:var(--n-textarea-border-radius, var(--n-border-radius-s))}.n-input-container{position:relative;inline-size:var(--_n-textarea-inline-size)}.n-input{min-block-size:var(--_n-textarea-block-size);transition:border var(--n-transition-slowly),box-shadow var(--n-transition-slowly),background var(--n-transition-slowly);display:block;resize:vertical}:host([resize=auto]) .n-input{resize:none;overflow:hidden}:host([expand]){--_n-textarea-inline-size:100%}.n-character-counter{margin-block-start:calc(var(--n-space-s)/ 2);color:var(--n-color-text-weaker)}.n-input:hover,.n-label-container:hover+.n-input-container .n-input{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-border-hover))}.n-input:focus{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-accent));--_n-input-background:var(--n-textarea-background, var(--n-color-surface))}.n-input[aria-invalid=true]{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-status-danger))!important}.n-input:disabled,.n-input[readonly],.n-label-container:hover+.n-input-container .n-input:disabled,.n-label-container:hover+.n-input-container .n-input[readonly]{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-active));--_n-input-color:var(--n-textarea-color, var(--n-color-text-weakest))}.n-input[readonly],.n-label-container:hover+.n-input-container .n-input[readonly]{--_n-input-color:var(--n-textarea-color, var(--n-color-text-weak))}.n-input[readonly]:focus{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-accent))}`;let Ln=class extends(Ae($e(Se(Ce(le(se(ot))))))){constructor(){super(...arguments),this.inputId="textarea",this.localize=new yn(this,{onLangChange:()=>this.handleLangChange()}),this.resize="vertical",this.expand=!1,this.characterCounter=!1}render(){var t;return M`${this.renderLabel()}<div class="n-input-container"><textarea ${ee(this.focusableRef)} id="${this.inputId}" class="n-input" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" name="${yt(this.name)}" maxlength="${yt(this.maxLength)}" .value="${null!==(t=this.value)&&void 0!==t?t:""}" placeholder="${yt(this.placeholder)}" @change="${this.handleChange}" @input="${this.handleInput}" aria-describedby="${yt(this.getDescribedBy())}" aria-invalid="${yt(this.getInvalid())}" autocomplete="${this.autocomplete}"></textarea> ${this.characterCounter?this.renderCharacterCounter():B}</div>${this.renderError()}`}renderCharacterCounter(){const{value:t,maxLength:e}=this,n="string"==typeof t?this.lengthMeasurer(t):0,o=e?e-n:null,r=e?`${n}/${e}`:n;return M`<nord-visually-hidden aria-live="polite" aria-atomic="true">${null!=o&&o<=10?this.localize.term("remainingCharacters",o):""}</nord-visually-hidden><div class="n-character-counter">${r}</div>`}handleLangChange(){const t=this.localize.resolvedLang;this.lengthMeasurer=function(t){if(Intl.Segmenter){const e=new Intl.Segmenter(t);return t=>[...e.segment(t)].length}return t=>t.length}(t)}resizeToFitContent(){const t=this.focusableRef.value;t&&("auto"===this.resize?(t.style.height="auto",t.style.height=`${t.scrollHeight}px`):t.style.height="")}};Ln.styles=[At,Ee,De,On],t([st({reflect:!0})],Ln.prototype,"resize",void 0),t([st({reflect:!0,type:Boolean})],Ln.prototype,"expand",void 0),t([st({attribute:"maxlength",type:Number})],Ln.prototype,"maxLength",void 0),t([st({type:Boolean,attribute:"character-counter"})],Ln.prototype,"characterCounter",void 0),t([Tt("resize","updated"),Tt("value","updated")],Ln.prototype,"resizeToFitContent",null),Ln=t([it("nord-textarea")],Ln);var Nn=Ln;var Rn=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m6.92903.100342-2.12132 2.121318 7.77819 7.77818-7.77828 7.77826 2.12132 2.1213 8.48536-8.4853c.7811-.7811.7811-2.04743 0-2.82848z" fill="currentColor"/></svg>',title:"arrow-right-small",tags:"nordicon arrow right small caret pointing triangle chevron"});var Mn=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m13.0712.105225 2.1213 2.121315-7.77816 7.77816 7.77826 7.7783-2.1213 2.1213-8.48539-8.4854c-.78105-.781-.78105-2.04735 0-2.82839z" fill="currentColor"/></svg>',title:"arrow-left-small",tags:"nordicon arrow left small caret pointing triangle chevron"});var In=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m.100342 6.92903 2.121318-2.12132 7.77818 7.77819 7.77826-7.77828 2.1213 2.12132-8.4853 8.48536c-.7811.7811-2.04743.7811-2.82848 0z" fill="currentColor"/></svg>',title:"arrow-down-small",tags:"nordicon arrow down small caret pointing triangle chevron"});const Bn=t=>t.preventDefault();class Pn{constructor(t,e){this.hadFirstUpdate=!1,this.initialTouchX=0,this.initialTouchY=0,this.handleTouchStart=t=>{const[{pageX:e,pageY:n}]=t.changedTouches;this.initialTouchX=e,this.initialTouchY=n},this.handleTouchEnd=t=>{const[{pageX:e,pageY:n}]=t.changedTouches,{matchesGesture:o,onSwipeEnd:r}=this.options,i=e-this.initialTouchX,a=n-this.initialTouchY,s={initialX:this.initialTouchX,initialY:this.initialTouchY,pageX:e,pageY:n,distX:i,distY:a};o(s)&&(t.preventDefault(),r(s))},t.addController(this),this.events=new ne(t),this.options={target:()=>t,...e}}hostUpdated(){if(!this.hadFirstUpdate){this.hadFirstUpdate=!0;const t=this.options.target();this.events.listen(t,"touchstart",this.handleTouchStart),this.events.listen(t,"touchmove",Bn),this.events.listen(t,"touchend",this.handleTouchEnd)}}hostDisconnected(){this.hadFirstUpdate=!1}}const Hn=({distX:t,distY:e})=>Math.abs(t)>=70&&Math.abs(e)<=70,Fn=({distX:t,distY:e})=>Math.abs(e)>=70&&Math.abs(t)<=70&&e>0,qn=/^(\d{4})-(\d{2})-(\d{2})$/;function Un(t,e,n){const o=parseInt(n,10),r=parseInt(e,10),i=parseInt(t,10);if(Number.isInteger(i)&&Number.isInteger(r)&&Number.isInteger(o)&&r>0&&r<=12&&o>0&&o<=31&&i>0){const t=new Date(i,r-1,o);return t.setFullYear(i),t}}function jn(t){if(!t)return;const e=t.match(qn);return e?Un(e[1],e[2],e[3]):void 0}function Yn(t){if(!t)return"";const e=t.getDate().toString(10),n=(t.getMonth()+1).toString(10);return`${t.getFullYear().toString(10).padStart(4,"0")}-${n.padStart(2,"0")}-${e.padStart(2,"0")}`}function Wn(){const t=new Date;return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0))}function Vn(t,e){const n=[],o={weekday:e},r=Wn();for(let e=0;e<7;e++)n[r.getDay()]=r.toLocaleDateString(t,o),r.setDate(r.getDate()+1);return n}function Xn(t,e){const n=[],o={month:e},r=Wn();r.setDate(1);for(let e=0;e<12;e++)n[r.getMonth()]=r.toLocaleDateString(t,o),r.setMonth(r.getMonth()+1);return n}function Kn(t,e){return null!=t&&null!=e&&(t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth())}function Gn(t,e){return null!=t&&null!=e&&(Kn(t,e)&&t.getDate()===e.getDate())}function Qn(t,e){const n=new Date(t);return n.setDate(n.getDate()+e),n}function Zn(t,e=1){const n=new Date(t),o=n.getDay(),r=(o<e?7:0)+o-e;return n.setDate(n.getDate()-r),n}function Jn(t,e=1){const n=new Date(t),o=n.getDay(),r=6+(o<e?-7:0)-(o-e);return n.setDate(n.getDate()+r),n}function to(t){const e=new Date(t.getFullYear(),t.getMonth(),1);return e.setFullYear(t.getFullYear()),e}function eo(t){const e=new Date(t.getFullYear(),t.getMonth()+1,0);return e.setFullYear(t.getFullYear()),e}function no(t,e){const n=new Date(t);return n.setMonth(e),n}function oo(t,e){const n=new Date(t);return n.setFullYear(e),n}function ro(t,e,n){const o=t.getTime();return e&&e instanceof Date&&o<e.getTime()?e:n&&n instanceof Date&&o>n.getTime()?n:t}function io(t,e,n){return ro(t,e,n)===t}function ao(t,e=1){return function(t,e){const n=[];let o=t;for(;!Gn(o,e);)n.push(o),o=Qn(o,1);return n.push(o),n}(Zn(to(t),e),Jn(eo(t),e))}class so extends ye{constructor(t,e){super(t),this.date=e}}const lo=a`:host{--_n-calendar-box-shadow:var(--n-calendar-box-shadow, var(--n-box-shadow-popout));--_n-calendar-border-radius:var(--n-calendar-border-radius, var(--n-border-radius-s));--_n-calendar-highlight-color:var(--n-calendar-highlight-color, var(--n-color-accent));--_n-calendar-padding:var(--n-space-m) var(--n-space-m) calc(var(--n-space-m) * 1.25);--_n-calendar-inline-size:max-content;font-feature-settings:var(--n-font-features-reduced)}.n-calendar{-webkit-user-select:none;user-select:none;background:var(--n-color-surface);box-shadow:var(--_n-calendar-box-shadow);border-radius:var(--_n-calendar-border-radius);inline-size:var(--_n-calendar-inline-size);min-inline-size:min-content;padding:var(--_n-calendar-padding)}:host([expand]){--_n-calendar-inline-size:100%}.n-calendar-table{border-collapse:collapse;border-spacing:0;color:var(--n-color-text);font-size:var(--n-font-size-m);font-weight:var(--n-font-weight);text-align:center;inline-size:100%}.n-calendar-table-header{font-size:var(--n-font-size-s);font-weight:var(--n-font-weight-active);letter-spacing:1px;padding-block-end:var(--n-space-s);text-decoration:none;text-transform:uppercase}.n-calendar-cell{text-align:center;padding:1px}.n-calendar-day{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:0 0;border:0;border-radius:var(--n-border-radius-s);color:var(--n-color-text);cursor:pointer;display:inline-block;font-family:var(--n-font-family);font-size:var(--n-font-size-m);font-weight:var(--n-font-weight);font-variant-numeric:tabular-nums;block-size:var(--n-space-xl);inline-size:var(--n-space-xl);padding:0 0 1px;position:relative;text-align:center;vertical-align:middle}.n-calendar-day[aria-current=date]{box-shadow:0 0 0 1px var(--n-color-accent);color:var(--n-color-text-link);position:relative}.n-calendar-day:hover{background:var(--n-color-active)}.n-calendar-day:focus,.n-calendar-day[aria-pressed=true]{background:var(--n-color-accent);box-shadow:none;color:var(--n-color-text-on-accent);outline:0}.n-calendar-day:active{background:var(--n-color-accent);box-shadow:none!important;color:var(--n-color-text-on-accent)}.n-calendar-day:focus{box-shadow:0 0 5px var(--n-color-accent)}.n-calendar-day:not(.is-month){box-shadow:none}.n-calendar-day:not(.is-month),.n-calendar-day[aria-disabled=true]{background:0 0;color:var(--n-color-text-weakest);cursor:default}.n-calendar-day[aria-disabled=true]{color:var(--n-color-text-weaker);text-decoration:line-through}.n-calendar-day:not(.is-month)[aria-disabled=true]{color:var(--n-color-text-weakest);text-decoration:none}.n-calendar-day[aria-disabled=true][aria-current=date]{box-shadow:0 0 0 1px var(--n-color-accent);color:var(--n-color-text-link)}.n-calendar-day[aria-disabled=true][aria-current=date]:focus{box-shadow:0 0 5px var(--n-color-accent);background:var(--n-color-accent);color:var(--n-color-text-on-accent)}.n-calendar-day[aria-disabled=true]:not([aria-current=date])::before{display:none}.n-calendar-day.is-outside{background:0 0;box-shadow:none;color:var(--n-color-text-weakest);cursor:default;pointer-events:none}.n-calendar-day.is-outside::before{display:none}.n-calendar-day.is-highlighted::after{--_n-calendar-highlight-size:5px;content:"";position:absolute;inset-inline-start:calc(50% - (var(--_n-calendar-highlight-size)/ 2));inset-block-end:calc(var(--n-space-s)/ 2);block-size:var(--_n-calendar-highlight-size);inline-size:var(--_n-calendar-highlight-size);border-radius:var(--n-border-radius-circle);background-color:var(--_n-calendar-highlight-color)}.n-calendar-day.is-highlighted.is-month:is([aria-pressed=true],:focus):not([aria-disabled=true])::after{background-color:var(--n-color-text-on-accent)}.n-calendar-day.is-highlighted:is(:not(.is-month),.is-outside,[aria-disabled=true])::after{background-color:var(--n-color-text-weakest)}.n-calendar-header{align-items:start;display:flex;justify-content:space-between;margin-block-end:var(--n-space-m);inline-size:100%}.n-calendar-nav{white-space:nowrap}.n-calendar-nav nord-button{--_n-button-padding-inline:11px;margin-inline-start:calc(var(--n-space-s)/ 2)}.n-calendar-select{display:inline-flex;margin-block-start:calc(var(--n-space-s)/ 2);position:relative;line-height:var(--n-line-height)}.n-calendar-select span{margin-inline-end:var(--n-space-s)}.n-calendar-select select{cursor:pointer;font-size:var(--n-font-size-l);block-size:100%;inset-inline-start:0;opacity:0;position:absolute;inset-block-start:0;inline-size:100%}.n-calendar-select select:focus+.n-calendar-select-label{box-shadow:0 0 0 2px var(--n-color-accent)}.n-calendar-select-label{display:flex;align-items:center;border-radius:var(--n-border-radius-s);color:var(--n-color-text);font-size:var(--n-font-size-xl);font-weight:var(--n-font-weight-active);padding-block:0;padding-inline-start:var(--n-space-s);padding-inline-end:calc(var(--n-space-s)/ 2);pointer-events:none;position:relative;inline-size:100%}`;Nt.registerIcon(Rn),Nt.registerIcon(Mn),Nt.registerIcon(In);const co=t=>e=>{e.preventDefault(),t(e)},ho=()=>!1,uo=()=>!1;let po=class extends ot{constructor(){super(...arguments),this.direction=new Oe(this),this.swipe=new Pn(this,{matchesGesture:Hn,onSwipeEnd:({distX:t})=>this.addMonths(t<0?1:-1)}),this.shortcuts=Xe({ArrowRight:co((()=>this.addDays(this.direction.isLTR?1:-1))),ArrowLeft:co((()=>this.addDays(this.direction.isLTR?-1:1))),ArrowDown:co((()=>this.addDays(7))),ArrowUp:co((()=>this.addDays(-7))),Home:co((()=>this.startOfWeek())),End:co((()=>this.endOfWeek())),PageUp:co((()=>this.addMonths(-1))),PageDown:co((()=>this.addMonths(1))),"Shift+PageUp":co((()=>this.addYears(-1))),"Shift+PageDown":co((()=>this.addYears(1)))}),this.localize=new yn(this,{onLangChange:()=>this.handleLangChange()}),this.value="",this.firstDayOfWeek=1,this.min="",this.max="",this.expand=!1,this.isDateDisabled=ho,this.isDateHighlighted=uo,this.activeFocus=!1,this.focusedDay=new Date,this.handleDaySelect=t=>{const e=io(t,jn(this.min),jn(this.max)),n=!this.isDateDisabled(t);e&&n&&(this.value=Yn(t),this.dispatchEvent(new so("change",t)))},this.handleMonthSelect=t=>{this.setMonth(parseInt(t.target.value,10))},this.handleYearSelect=t=>{this.setYear(parseInt(t.target.value,10))},this.handleNextMonthClick=t=>{t.preventDefault(),this.addMonths(1)},this.handlePreviousMonthClick=t=>{t.preventDefault(),this.addMonths(-1)},this.enableActiveFocus=()=>{this.activeFocus=!0},this.disableActiveFocus=t=>{const e=t.currentTarget,n=t.relatedTarget;n&&!e.contains(n)&&(this.activeFocus=!1)}}focus(t){var e;const n=null!==(e=null==t?void 0:t.target)&&void 0!==e?e:"day";"day"===n?this.focusedDayNode.focus():"month"===n&&this.monthSelectNode.focus()}render(){const t=new Date,e=jn(this.value),n=this.focusedDay.getMonth(),o=this.focusedDay.getFullYear(),r=jn(this.min),i=jn(this.max),a=r?to(r):void 0,s=i?eo(i):void 0,l=(e||this.focusedDay).getFullYear(),d=r?r.getFullYear():l-10,c=i?i.getFullYear():l+10;return M`<div class="n-calendar"><div class="n-calendar-header"><div><nord-visually-hidden><h2 id="${"dialog-header"}" aria-live="polite" aria-atomic="true">${this.monthNames[n]}, ${this.focusedDay.getFullYear()}</h2></nord-visually-hidden><div class="n-calendar-select"><select aria-label="${this.localize.term("monthSelectLabel")}" class="n-calendar-select-month" @input="${this.handleMonthSelect}">${this.monthNames.map(((t,e)=>M`<option value="${e}" ?selected="${e===n}" ?disabled="${!io(new Date(o,e,1),a,s)}">${t}</option>`))}</select><div class="n-calendar-select-label" aria-hidden="true"><span>${this.monthNamesShort[n]}</span><nord-icon color="var(--n-color-icon)" name="arrow-down-small" size="xxs"></nord-icon></div></div><div class="n-calendar-select"><select aria-label="${this.localize.term("yearSelectLabel")}" class="n-calendar-select-year" @input="${this.handleYearSelect}">${Ie(function(t,e){const n=[];for(let o=t;o<=e;o++)n.push(o);return n}(d,c),(t=>t),(t=>M`<option ?selected="${t===o}">${t}</option>`))}</select><div class="n-calendar-select-label" aria-hidden="true"><span>${this.focusedDay.getFullYear()}</span><nord-icon color="var(--n-color-icon)" name="arrow-down-small" size="xxs"></nord-icon></div></div></div><div class="n-calendar-nav"><nord-button class="n-calendar-prev" @click="${this.handlePreviousMonthClick}" ?disabled="${Kn(r,this.focusedDay)}" type="button"><nord-visually-hidden>${this.localize.term("prevMonthLabel")}</nord-visually-hidden><nord-icon name="${this.direction.isLTR?"arrow-left-small":"arrow-right-small"}" size="s"></nord-icon></nord-button><nord-button class="n-calendar-next" @click="${this.handleNextMonthClick}" ?disabled="${Kn(i,this.focusedDay)}" type="button"><nord-visually-hidden>${this.localize.term("nextMonthLabel")}</nord-visually-hidden><nord-icon name="${this.direction.isLTR?"arrow-right-small":"arrow-left-small"}" size="s"></nord-icon></nord-button></div></div><table class="n-calendar-table" aria-labelledby="${"dialog-header"}" @focusin="${this.enableActiveFocus}" @focusout="${this.disableActiveFocus}"><thead><tr>${h=this.dayNames,u=this.firstDayOfWeek,p=(t,e)=>M`<th class="n-calendar-table-header" scope="col"><span aria-hidden="true">${this.dayNamesShort[e]}</span><nord-visually-hidden>${t}</nord-visually-hidden></th>`,h.map(((t,e)=>{const n=(e+u)%h.length;return p(h[n],n)}))}</tr></thead><tbody>${function(t,e){const n=[];for(let o=0;o<t.length;o+=e)n.push(t.slice(o,o+e));return n}(ao(this.focusedDay,this.firstDayOfWeek),7).map((n=>M`<tr class="n-calendar-row">${n.map((n=>{const o=!io(n,r,i),a=Gn(n,t),s=this.isDateDisabled(n),l=Gn(n,e),d=Kn(n,this.focusedDay),c=this.isDateHighlighted(n),h=this.dateFormatShort.format(n),u=c&&"string"==typeof c?`${h}, ${c}`:h;return M`<td class="n-calendar-cell"><button type="button" tabindex="${Gn(n,this.focusedDay)?0:-1}" class="${ge({"n-calendar-day":!0,"is-outside":o,"is-month":d,"is-highlighted":c})}" @click="${()=>this.handleDaySelect(n)}" @keydown="${this.shortcuts}" ?disabled="${o}" aria-disabled="${Ct(s,"true")}" aria-pressed="${l?"true":"false"}" aria-current="${Ct(a,"date")}" aria-label="${u}"><span aria-hidden="true">${n.getDate()}</span></button></td>`}))}</tr>`))}</tbody></table></div>`;var h,u,p}handleValueChange(){this.setFocusedDay(jn(this.value)||new Date)}handleFocusedDayChange(){this.activeFocus&&this.focusedDayNode.focus()}handleLangChange(){const t=this.localize.resolvedLang;this.dateFormatShort=new Intl.DateTimeFormat(t,{day:"numeric",month:"long"}),this.monthNames=Xn(t,"long"),this.monthNamesShort=Xn(t,"short"),this.dayNames=Vn(t,"long"),this.dayNamesShort=Vn(t,"narrow")}addDays(t){this.setFocusedDay(Qn(this.focusedDay,t))}addMonths(t){this.setMonth(this.focusedDay.getMonth()+t)}addYears(t){this.setYear(this.focusedDay.getFullYear()+t)}startOfWeek(){this.setFocusedDay(Zn(this.focusedDay,this.firstDayOfWeek))}endOfWeek(){this.setFocusedDay(Jn(this.focusedDay,this.firstDayOfWeek))}setMonth(t){const e=no(to(this.focusedDay),t),n=eo(e),o=no(this.focusedDay,t);this.setFocusedDay(ro(o,e,n))}setYear(t){const e=oo(to(this.focusedDay),t),n=eo(e),o=oo(this.focusedDay,t);this.setFocusedDay(ro(o,e,n))}setFocusedDay(t){this.focusedDay=ro(t,jn(this.min),jn(this.max)),this.dispatchEvent(new so("nord-focus-date",this.focusedDay))}};po.styles=[At,lo],t([dt(".n-calendar-select-month",!0)],po.prototype,"monthSelectNode",void 0),t([dt('button[tabindex="0"]')],po.prototype,"focusedDayNode",void 0),t([st()],po.prototype,"value",void 0),t([st({type:Number})],po.prototype,"firstDayOfWeek",void 0),t([st()],po.prototype,"min",void 0),t([st()],po.prototype,"max",void 0),t([st({reflect:!0,type:Boolean})],po.prototype,"expand",void 0),t([st({attribute:!1})],po.prototype,"isDateDisabled",void 0),t([st({attribute:!1})],po.prototype,"isDateHighlighted",void 0),t([lt()],po.prototype,"activeFocus",void 0),t([lt()],po.prototype,"focusedDay",void 0),t([Tt("value")],po.prototype,"handleValueChange",null),t([Tt("focusedDay","updated")],po.prototype,"handleFocusedDayChange",null),po=t([it("nord-calendar")],po);var vo=po;var bo=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m18 2h-2v-2h-2v2h-8v-2h-2v2h-2c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm-14 2v2h2v-2h8v2h2v-2h2v4h-16v-4zm-2 14v-8h16v8z" fill="currentColor"/></svg>',title:"interface-calendar",tags:"nordicon interface calendar date time day week month year"});var go=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.1087 10.005 7.8867 7.8866-2.1087 2.1085-7.8866-7.8867-7.89154 7.8916-2.10356422-2.1036 7.89153422-7.8915-7.89653-7.89664 2.1137-2.11326 7.8915 7.90132 7.8864-7.89650372 2.1085 2.10861372z" fill="currentColor"/></svg>',title:"interface-close-small",tags:"nordicon interface close remove small cross delete erase symbol"});function fo(t){return t.split("-")[0]}function mo(t){return t.split("-")[1]}function yo(t){return["top","bottom"].includes(fo(t))?"x":"y"}function xo(t){return"y"===t?"height":"width"}function wo(t,e,n){let{reference:o,floating:r}=t;const i=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2,s=yo(e),l=xo(s),d=o[l]/2-r[l]/2,c="x"===s;let h;switch(fo(e)){case"top":h={x:i,y:o.y-r.height};break;case"bottom":h={x:i,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:a};break;case"left":h={x:o.x-r.width,y:a};break;default:h={x:o.x,y:o.y}}switch(mo(e)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1)}return h}function ko(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function _o(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=e,v=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(p),b=s[u?"floating"===h?"reference":"floating":h],g=ko(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(b)))||n?b:b.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:d,rootBoundary:c,strategy:l})),f=ko(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===h?{...a.floating,x:o,y:r}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[h]);return{top:g.top-f.top+v.top,bottom:f.bottom-g.bottom+v.bottom,left:g.left-f.left+v.left,right:f.right-g.right+v.right}}const zo=Math.min,$o=Math.max;function Co(t,e,n){return $o(t,zo(e,n))}const So={left:"right",right:"left",bottom:"top",top:"bottom"};function Ao(t){return t.replace(/left|right|bottom|top/g,(t=>So[t]))}const Eo={start:"end",end:"start"};function Do(t){return t.replace(/start|end/g,(t=>Eo[t]))}const To=["top","right","bottom","left"];const Oo=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:a,platform:s,elements:l}=e,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",flipAlignment:p=!0,...v}=t,b=fo(o),g=h||(b===a||!p?[Ao(a)]:function(t){const e=Ao(t);return[Do(t),e,Do(e)]}(a)),f=[a,...g],m=await _o(e,v),y=[];let x=(null==(n=r.flip)?void 0:n.overflows)||[];if(d&&y.push(m[b]),c){const{main:t,cross:e}=function(t,e,n){void 0===n&&(n=!1);const o=mo(t),r=yo(t),i=xo(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Ao(a)),{main:a,cross:Ao(a)}}(o,i,await(null==s.isRTL?void 0:s.isRTL(l.floating)));y.push(m[t],m[e])}if(x=[...x,{placement:o,overflows:y}],!y.every((t=>t<=0))){var w,k;const t=(null!=(w=null==(k=r.flip)?void 0:k.index)?w:0)+1,e=f[t];if(e)return{data:{index:t,overflows:x},reset:{placement:e}};let n="bottom";switch(u){case"bestFit":{var _;const t=null==(_=x.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:_[0].placement;t&&(n=t);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}};function Lo(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function No(t){return To.some((e=>t[e]>=0))}const Ro=function(t){let{strategy:e="referenceHidden",...n}=void 0===t?{}:t;return{name:"hide",async fn(t){const{rects:o}=t;switch(e){case"referenceHidden":{const e=Lo(await _o(t,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:No(e)}}}case"escaped":{const e=Lo(await _o(t,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:e,escaped:No(e)}}}default:return{}}}}};const Mo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:o}=e,r=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=fo(n),s=mo(n),l="x"===yo(n),d=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,h="function"==typeof e?e(t):e;let{mainAxis:u,crossAxis:p,alignmentAxis:v}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return s&&"number"==typeof v&&(p="end"===s?-1*v:v),l?{x:p*c,y:u*d}:{x:u*d,y:p*c}}(e,t);return{x:n+r.x,y:o+r.y,data:r}}}};const Io=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=t,d={x:n,y:o},c=await _o(e,l),h=yo(fo(r)),u="x"===h?"y":"x";let p=d[h],v=d[u];if(i){const t="y"===h?"bottom":"right";p=Co(p+c["y"===h?"top":"left"],p,p-c[t])}if(a){const t="y"===u?"bottom":"right";v=Co(v+c["y"===u?"top":"left"],v,v-c[t])}const b=s.fn({...e,[h]:p,[u]:v});return{...b,data:{x:b.x-n,y:b.y-o}}}}};function Bo(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function Po(t){if(null==t)return window;if(!Bo(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ho(t){return Po(t).getComputedStyle(t)}function Fo(t){return Bo(t)?"":t?(t.nodeName||"").toLowerCase():""}function qo(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function Uo(t){return t instanceof Po(t).HTMLElement}function jo(t){return t instanceof Po(t).Element}function Yo(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof Po(t).ShadowRoot||t instanceof ShadowRoot}function Wo(t){const{overflow:e,overflowX:n,overflowY:o}=Ho(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function Vo(t){return["table","td","th"].includes(Fo(t))}function Xo(t){const e=/firefox/i.test(qo()),n=Ho(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}function Ko(){return!/^((?!chrome|android).)*safari/i.test(qo())}const Go=Math.min,Qo=Math.max,Zo=Math.round;function Jo(t,e,n){var o,r,i,a;void 0===e&&(e=!1),void 0===n&&(n=!1);const s=t.getBoundingClientRect();let l=1,d=1;e&&Uo(t)&&(l=t.offsetWidth>0&&Zo(s.width)/t.offsetWidth||1,d=t.offsetHeight>0&&Zo(s.height)/t.offsetHeight||1);const c=jo(t)?Po(t):window,h=!Ko()&&n,u=(s.left+(h&&null!=(o=null==(r=c.visualViewport)?void 0:r.offsetLeft)?o:0))/l,p=(s.top+(h&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/d,v=s.width/l,b=s.height/d;return{width:v,height:b,top:p,right:u+v,bottom:p+b,left:u,x:u,y:p}}function tr(t){return(e=t,(e instanceof Po(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function er(t){return jo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nr(t){return Jo(tr(t)).left+er(t).scrollLeft}function or(t,e,n){const o=Uo(e),r=tr(e),i=Jo(t,o&&function(t){const e=Jo(t);return Zo(e.width)!==t.offsetWidth||Zo(e.height)!==t.offsetHeight}(e),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==Fo(e)||Wo(r))&&(a=er(e)),Uo(e)){const t=Jo(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else r&&(s.x=nr(r));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function rr(t){return"html"===Fo(t)?t:t.assignedSlot||t.parentNode||(Yo(t)?t.host:null)||tr(t)}function ir(t){return Uo(t)&&"fixed"!==Ho(t).position?function(t){let{offsetParent:e}=t,n=t,o=!1;for(;n&&n!==e;){const{assignedSlot:t}=n;if(t){let r=t.offsetParent;if("contents"===Ho(t).display){const e=t.hasAttribute("style"),o=t.style.display;t.style.display=Ho(n).display,r=t.offsetParent,t.style.display=o,e||t.removeAttribute("style")}n=t,e!==r&&(e=r,o=!0)}else if(Yo(n)&&n.host&&o)break;n=Yo(n)&&n.host||n.parentNode}return e}(t):null}function ar(t){const e=Po(t);let n=ir(t);for(;n&&Vo(n)&&"static"===Ho(n).position;)n=ir(n);return n&&("html"===Fo(n)||"body"===Fo(n)&&"static"===Ho(n).position&&!Xo(n))?e:n||function(t){let e=rr(t);for(Yo(e)&&(e=e.host);Uo(e)&&!["html","body"].includes(Fo(e));){if(Xo(e))return e;{const t=e.parentNode;e=Yo(t)?t.host:t}}return null}(t)||e}function sr(t){if(Uo(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=Jo(t);return{width:e.width,height:e.height}}function lr(t){const e=rr(t);return["html","body","#document"].includes(Fo(e))?t.ownerDocument.body:Uo(e)&&Wo(e)?e:lr(e)}function dr(t,e){var n;void 0===e&&(e=[]);const o=lr(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=Po(o),a=r?[i].concat(i.visualViewport||[],Wo(o)?o:[]):o,s=e.concat(a);return r?s:s.concat(dr(a))}function cr(t,e,n){return"viewport"===e?ko(function(t,e){const n=Po(t),o=tr(t),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const t=Ko();(t||!t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}(t,n)):jo(e)?function(t,e){const n=Jo(t,!1,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft;return{top:o,left:r,x:r,y:o,right:r+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e,n):ko(function(t){var e;const n=tr(t),o=er(t),r=null==(e=t.ownerDocument)?void 0:e.body,i=Qo(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Qo(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-o.scrollLeft+nr(t);const l=-o.scrollTop;return"rtl"===Ho(r||n).direction&&(s+=Qo(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(tr(t)))}function hr(t){const e=dr(t),n=["absolute","fixed"].includes(Ho(t).position)&&Uo(t)?ar(t):t;return jo(n)?e.filter((t=>jo(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&Yo(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==Fo(t))):[]}const ur={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?hr(e):[].concat(n),o],a=i[0],s=i.reduce(((t,n)=>{const o=cr(e,n,r);return t.top=Qo(o.top,t.top),t.right=Go(o.right,t.right),t.bottom=Go(o.bottom,t.bottom),t.left=Qo(o.left,t.left),t}),cr(e,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=Uo(n),i=tr(n);if(n===i)return e;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==Fo(n)||Wo(i))&&(a=er(n)),Uo(n))){const t=Jo(n,!0);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{...e,x:e.x-a.scrollLeft+s.x,y:e.y-a.scrollTop+s.y}},isElement:jo,getDimensions:sr,getOffsetParent:ar,getDocumentElement:tr,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:or(e,ar(n),o),floating:{...sr(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===Ho(t).direction};function pr(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=o,l=r&&!s,d=i&&!s,c=l||d?[...jo(t)?dr(t):[],...dr(e)]:[];c.forEach((t=>{l&&t.addEventListener("scroll",n,{passive:!0}),d&&t.addEventListener("resize",n)}));let h,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||n(),o=!1})),jo(t)&&!s&&u.observe(t),u.observe(e)}let p=s?Jo(t):null;return s&&function e(){const o=Jo(t);!p||o.x===p.x&&o.y===p.y&&o.width===p.width&&o.height===p.height||n();p=o,h=requestAnimationFrame(e)}(),n(),()=>{var t;c.forEach((t=>{l&&t.removeEventListener("scroll",n),d&&t.removeEventListener("resize",n)})),null==(t=u)||t.disconnect(),u=null,s&&cancelAnimationFrame(h)}}const vr=(t,e,n)=>(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=await(null==a.isRTL?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:c}=wo(l,o,s),h=o,u={},p=0;for(let n=0;n<i.length;n++){const{name:v,fn:b}=i[n],{x:g,y:f,data:m,reset:y}=await b({x:d,y:c,initialPlacement:o,placement:h,strategy:r,middlewareData:u,rects:l,platform:a,elements:{reference:t,floating:e}});d=null!=g?g:d,c=null!=f?f:c,u={...u,[v]:{...u[v],...m}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(l=!0===y.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:d,y:c}=wo(l,h,s))),n=-1)}return{x:d,y:c,placement:h,strategy:r,middlewareData:u}})(t,e,{platform:ur,...n});class br{constructor(t){t.addController(this)}hostDisconnected(){this.unlockScroll()}lockScroll(){if(0===br.locks.size){const t=document.documentElement.clientWidth,e=Math.abs(window.innerWidth-t),n=getComputedStyle(document.body),o=parseInt(n.paddingRight,10)||0;br.setStyle("--n-scrollbar-gutter",`${e+o}px`),br.setStyle("overflow","hidden"),br.setStyle("padding-right","var(--n-scrollbar-gutter)")}br.locks.add(this)}unlockScroll(){br.locks.delete(this),0===br.locks.size&&(br.resets.forEach((t=>t())),br.resets=[])}static setStyle(t,e){const{style:n}=document.body,o=n.getPropertyValue(t);n.setProperty(t,e),br.resets.push((()=>n.setProperty(t,o)))}}function gr(e){class n extends e{constructor(){super(...arguments),this.open=!1,this.align="start",this.position="block-end"}}return t([st({type:Boolean,reflect:!0})],n.prototype,"open",void 0),t([st({reflect:!0})],n.prototype,"align",void 0),t([st({reflect:!0})],n.prototype,"position",void 0),n}br.locks=new Set,br.resets=[];const fr=a`:host{position:fixed;pointer-events:none;z-index:var(--n-index-popout);left:var(--_n-popout-position-x);top:var(--_n-popout-position-y);color:var(--n-color-text);opacity:0;transition:opacity var(--n-transition-slowly)}.n-popout{pointer-events:none;transform:translateY(-10px) scale(.97);visibility:hidden;transition:transform var(--n-transition-slowly),visibility var(--n-transition-slowly);transform-origin:top left;will-change:transform,opacity,visibility;background:var(--n-color-surface);box-shadow:var(--n-box-shadow-popout);border-radius:var(--n-border-radius-s)}:host([open]){opacity:1}:host([open]) .n-popout{transition-property:transform;visibility:visible;pointer-events:auto;transform:translateY(0) translateX(0) scale(1)}@media (max-width:35.9375em){:host{position:fixed;inset:0;overflow-y:auto;opacity:1;background:0 0;transition:background var(--n-transition-mobile)}:host([open]){pointer-events:auto;background:var(--n-color-overlay)}:host .n-popout{position:fixed;inset:0;inset-block-start:auto;transform:translateY(100%);transition:transform var(--n-transition-mobile),visibility var(--n-transition-mobile);transform-origin:bottom center;border-radius:0}}.top-end,.top-start{transform:translateY(10px) scale(.97)}.left-end,.left-start{transform:translateX(10px) scale(.97)}.right-end,.right-start{transform:translateX(-10px) scale(.97)}.bottom-start.is-rtl,.left-end,.top-end{transform-origin:bottom right}.bottom-end,.left-start,.top-start.is-rtl{transform-origin:top right}.bottom-end.is-rtl,.right-end,.right-start{transform-origin:bottom left}.right-start,.top-end.is-rtl{transform-origin:top left}`,mr={"inline-start-start":"left-start","inline-start-end":"left-end","inline-end-start":"right-start","inline-end-end":"right-end","block-start-start":"top-start","block-start-end":"top-end","block-end-start":"bottom-start","block-end-end":"bottom-end"},yr={"inline-start-start":"right-start","inline-start-end":"right-end","inline-end-start":"left-start","inline-end-end":"left-end","block-start-start":"top-start","block-start-end":"top-end","block-end-start":"bottom-start","block-end-end":"bottom-end"},xr={"block-end":"bottom","block-start":"top","inline-start":"left","inline-end":"right"};function wr(t,e,n){if(null!=e&&null!=n){const o=`${t}-${e}`;return"ltr"===n?mr[o]:yr[o]}return xr[t]}const kr=matchMedia("(max-width: 35.9375em)");let _r=class extends(gr(ot)){constructor(){super(...arguments),this.scrollBar=new br(this),this.dismiss=new Ze(this,{isOpen:()=>this.open,onDismiss:t=>this.hide("click"!==t.type),isDismissible:t=>t!==this.popout&&t!==this.targetElement}),this.events=new ne(this),this.direction=new Oe(this),this.smallViewport=kr.matches,this.id="",this.enableScroll=()=>{this.open||this.scrollBar.unlockScroll()},this.updatePosition=async()=>{var t;const{x:e,y:n,placement:o,middlewareData:r}=await vr(this.anchorElement,this,{strategy:"fixed",placement:wr(this.position,this.align,this.direction.dir),middleware:[Mo(8),Oo(),Io({padding:8}),Ro()]});this.computedPosition=o,this.style.setProperty("--_n-popout-position-x",`${e}px`),this.style.setProperty("--_n-popout-position-y",`${n}px`),(null===(t=r.hide)||void 0===t?void 0:t.referenceHidden)&&this.hide()},this.toggleOpen=t=>{t.preventDefault(),this.open?this.hide(!1):this.smallViewport?this.show():this.updatePosition().then((()=>this.show()))},this.handleMediaQueryChange=()=>{var t;this.smallViewport=kr.matches,null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this),!this.smallViewport&&this.open?(this.cleanupAutoUpdate=pr(this.anchorElement,this,this.updatePosition),this.scrollBar.unlockScroll()):this.open&&this.scrollBar.lockScroll()}}async show(){return this.open?Promise.resolve():(this.open=!0,await this.updateComplete,this.dispatchEvent(new ye("open")),we(this.popout))}async hide(t=!0){var e;return this.open?(this.open=!1,null===(e=this.cleanupAutoUpdate)||void 0===e||e.call(this),this.dispatchEvent(new ye("close")),t&&this.targetElement.focus({preventScroll:!0}),we(this.popout)):Promise.resolve()}firstUpdated(){this.smallViewport||this.updatePosition()}connectedCallback(){super.connectedCallback(),this.targetElement=this.getToggle(),this.anchorElement=this.getAnchor(),this.events.listen(this.targetElement,"click",this.toggleOpen),this.events.listen(kr,"change",this.handleMediaQueryChange)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this),this.targetElement.removeAttribute("aria-expanded")}render(){return M`<div class="n-popout ${this.computedPosition} is-${this.direction.dir}" aria-hidden="${this.open?"false":"true"}" @transitionend="${this.enableScroll}"><slot></slot></div>`}handleIdChange(){this.id||console.warn("NORD: popout requires an id attribute and value")}handleOpenChange(){var t;this.targetElement.setAttribute("aria-expanded",`${this.open}`),this.open?this.smallViewport?this.scrollBar.lockScroll():this.cleanupAutoUpdate=pr(this.anchorElement,this,this.updatePosition):null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this)}handleAnchorChange(){var t;null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this),this.anchorElement=this.getAnchor(),this.open&&!this.smallViewport&&(this.cleanupAutoUpdate=pr(this.anchorElement,this,this.updatePosition))}getToggle(){const t=this.getRootNode().querySelector(`[aria-controls='${this.id}']`);return t instanceof HTMLSlotElement?t.assignedElements()[0]:t}getAnchor(){if(!this.anchor)return this.targetElement;const t=this.getRootNode().querySelector(`#${this.anchor}`);return t instanceof HTMLSlotElement?t.assignedElements()[0]:t}};_r.styles=[At,fr],t([dt(".n-popout",!0)],_r.prototype,"popout",void 0),t([lt()],_r.prototype,"computedPosition",void 0),t([lt()],_r.prototype,"smallViewport",void 0),t([st({reflect:!0})],_r.prototype,"id",void 0),t([st({reflect:!0})],_r.prototype,"anchor",void 0),t([Tt("id")],_r.prototype,"handleIdChange",null),t([Tt("open")],_r.prototype,"handleOpenChange",null),t([Tt("anchor")],_r.prototype,"handleAnchorChange",null),_r=t([it("nord-popout")],_r);var zr=_r;const $r=a`:host{color:var(--n-color-text);position:relative}:host(:not([expand])) .n-date-picker-input{max-inline-size:max-content}.n-date-picker-calendar{--n-calendar-box-shadow:none}@media (max-width:35.9375em){.n-date-picker-header{padding:calc(var(--n-space-s) * 1.5) var(--n-space-m);border-block-end:1px solid var(--n-color-border)}.n-date-picker-calendar{--_n-calendar-padding:var(--n-space-l)}}.n-date-picker-close-button{--n-button-border-radius:var(--n-border-radius-circle);--_n-button-padding-inline:calc(var(--n-space-s) / 1.3);--_n-button-padding-block:0;opacity:0;position:absolute;inset-block-start:calc(var(--n-space-s) * -1);inset-inline-end:calc(var(--n-space-s) * -1)}.n-date-picker-close-button:focus{opacity:1}.n-date-picker-heading{display:none;font-weight:var(--n-font-weight-active)}@media (max-width:35.9375em){.n-date-picker-close-button{opacity:1;position:relative;inset:auto}.n-date-picker-heading{display:initial}}`,Cr={parse:jn,format:Yn};Nt.registerIcon(bo),Nt.registerIcon(go);const Sr=()=>!1,Ar=()=>!1;let Er=class extends(Ae($e(Ce(le(se(ot)))))){constructor(){super(...arguments),this.swipe=new Pn(this,{target:()=>this.popout,matchesGesture:Fn,onSwipeEnd:()=>this.hide()}),this.localize=new yn(this,{onLangChange:()=>this.createDateFormatters()}),this.value="",this.open=!1,this.min="",this.max="",this.direction="right",this.firstDayOfWeek=1,this.dateAdapter=Cr,this.isDateDisabled=Sr,this.isDateHighlighted=Ar,this.expand=!1,this.handleDaySelect=t=>{t.stopPropagation(),this.setValue(t.date),this.hide()},this.handleBlur=t=>{t.stopPropagation(),this.dispatchEvent(new ye("blur"))},this.handleFocus=t=>{t.stopPropagation(),this.dispatchEvent(new ye("focus"))},this.handleInputChange=t=>{const e=t.target,n=this.dateAdapter.parse(e.value,Un);(n||""===e.value)&&this.setValue(n)}}get valueAsDate(){return jn(this.value)}set valueAsDate(t){this.value=t?Yn(t):""}get valueAsNumber(){var t,e;return null!==(e=null===(t=this.valueAsDate)||void 0===t?void 0:t.getTime())&&void 0!==e?e:NaN}set valueAsNumber(t){this.value=t?Yn(new Date(t)):""}render(){const{valueAsDate:t}=this,e=t?this.dateAdapter.format(t):"";return M`<nord-input class="n-date-picker-input" value="${e}" label="${yt(this.label)}" hint="${yt(this.hint)}" error="${yt(this.error)}" placeholder="${yt(this.placeholder)}" id="${this.inputId}" size="${this.size}" ?expand="${this.expand}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly}" ?hide-label="${this.hideLabel}" disallow-pattern="[^0-9./-]" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @input="${this.handleInputChange}" ${ee(this.focusableRef)} aria-invalid="${Ct(this.error,"true")}" aria-describedby="${yt(this.getDescribedBy())}">${this.hintSlot.isEmpty?B:M`<slot name="hint" slot="hint"></slot>`} ${this.labelSlot.isEmpty?B:M`<slot name="label" slot="label"></slot>`}<nord-button size="${this.size}" ?disabled="${this.disabled||this.readonly}" slot="end" class="n-date-picker-toggle" aria-controls="popout" type="button"><nord-icon name="interface-calendar"></nord-icon><nord-visually-hidden>${this.localize.term("buttonLabel")} ${t?M`<span>, ${this.localize.term("selectedDateMessage")} ${this.dateFormatLong.format(t)}</span>`:B}</nord-visually-hidden></nord-button></nord-input><nord-popout id="popout" anchor="${this.inputId}" align="end" position="block-end" role="dialog" aria-modal="true" ?open="${this.open}" @open="${this.handleOpen}" @close="${this.handleClose}" aria-labelledby="header"><div aria-hidden="true" tabindex="0" @focus="${this.focusLast}"></div><nord-stack class="n-date-picker-header" direction="horizontal" justify-content="space-between"><div class="n-date-picker-heading" id="header">${this.localize.term("modalHeading")}</div><nord-button class="n-date-picker-close-button" type="button" size="s" variant="plain" @click="${this.handleClose}"><nord-visually-hidden>${this.localize.term("closeLabel")}</nord-visually-hidden><nord-icon name="interface-close-small"></nord-icon></nord-button></nord-stack><nord-calendar class="n-date-picker-calendar" expand value="${this.value}" min="${this.min}" max="${this.max}" .firstDayOfWeek="${this.firstDayOfWeek}" .isDateDisabled="${this.isDateDisabled}" .isDateHighlighted="${this.isDateHighlighted}" @change="${this.handleDaySelect}"></nord-calendar><div aria-hidden="true" tabindex="0" @focus="${this.focusFirst}"></div></nord-popout>`}createDateFormatters(){this.dateFormatLong=new Intl.DateTimeFormat(this.localize.resolvedLang,{day:"numeric",month:"long",year:"numeric"})}focusFirst(){this.closeButton.focus()}focusLast(){this.calendar.focus({target:"day"})}handleOpen(){this.open=!0,this.calendar.focus({target:"month"})}handleClose(){this.open=!1}setValue(t){this.value=t?Yn(t):"",this.dispatchEvent(new ye("change"))}hide(t){this.popout.hide(t)}show(){this.popout.show()}};Er.styles=[At,Ee,De,$r],t([dt(".n-date-picker-toggle",!0)],Er.prototype,"toggleButton",void 0),t([dt(".n-date-picker-close-button",!0)],Er.prototype,"closeButton",void 0),t([dt("nord-calendar",!0)],Er.prototype,"calendar",void 0),t([dt('[role="dialog"]',!0)],Er.prototype,"popout",void 0),t([st()],Er.prototype,"value",void 0),t([st({type:Boolean,reflect:!0})],Er.prototype,"open",void 0),t([st()],Er.prototype,"min",void 0),t([st()],Er.prototype,"max",void 0),t([st()],Er.prototype,"direction",void 0),t([st({attribute:"first-day-of-week",type:Number})],Er.prototype,"firstDayOfWeek",void 0),t([st({attribute:!1})],Er.prototype,"dateAdapter",void 0),t([st({attribute:!1})],Er.prototype,"isDateDisabled",void 0),t([st({attribute:!1})],Er.prototype,"isDateHighlighted",void 0),t([st({reflect:!0,type:Boolean})],Er.prototype,"expand",void 0),Er=t([it("nord-date-picker")],Er);var Dr=Er;var Tr=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m18.9985 5.35769-9.8419 10.83221c-.27855.3095-.68088.4952-1.11417.5107h-.03095c-.41782 0-.80469-.1548-1.0987-.4488l-5.91132-5.9113 2.18193-2.1819 4.76619 4.7662 8.75862-9.62524 2.2903 2.08908z" fill="currentColor"/></svg>',title:"interface-checked-small",tags:"nordicon interface checked small symbol checkmark done ready"});var Or=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m20 8.49976v3.00004h-20v-3.00004z" fill="currentColor"/></svg>',title:"interface-remove-small",tags:"nordicon interface remove small delete erase minimize line"});const Lr=a`:host{--_n-checkbox-size:calc(var(--n-space-m) * 1.25);--_n-checkbox-accent-color:var(--n-color-accent);--_n-checkbox-border-color:var(--n-color-border-hover);--_n-checkbox-icon-size:var(--n-size-icon-s);display:inline-block}.n-flex{display:flex}.n-expand{flex:1}.n-input-container{position:relative}input{-moz-appearance:none;-webkit-appearance:none;appearance:none;border:1px solid var(--_n-checkbox-border-color);border-radius:var(--n-border-radius-s);display:block;inline-size:var(--_n-checkbox-size);block-size:var(--_n-checkbox-size);cursor:pointer}input:checked,input:indeterminate{--_n-checkbox-border-color:var(--n-color-accent);background:var(--_n-checkbox-accent-color)}input[aria-invalid]{--_n-checkbox-accent-color:var(--n-color-status-danger);--_n-checkbox-border-color:var(--_n-checkbox-accent-color)}input:focus-visible{outline:0!important}input:focus{outline:0!important;box-shadow:0 0 0 1px var(--n-color-surface),0 0 0 3px var(--n-color-accent)}input:active{opacity:.8}:host([disabled]) label{color:var(--n-color-text-weaker);cursor:default}:host([disabled]) input{--_n-checkbox-accent-color:var(--n-color-border-strong);--_n-checkbox-border-color:var(--_n-checkbox-accent-color);background:var(--_n-checkbox-accent-color);cursor:default;opacity:1}nord-icon{--_n-icon-size:var(--_n-checkbox-icon-size);display:none;position:absolute;color:var(--n-color-text-on-accent);inset:calc(var(--n-space-s)/ 2);z-index:var(--n-index-default);pointer-events:none}input:checked~.icon-checked,input:indeterminate~.icon-indeterminate{display:block}.n-label-container{margin-block-end:0}label{-webkit-user-select:none;user-select:none;font-weight:var(--n-font-weight)!important;line-height:var(--n-line-height-form);padding-inline-start:var(--n-space-s);cursor:pointer}.n-hint{padding-inline-start:var(--n-space-s)}.n-error{margin-block-start:calc(var(--n-space-s)/ 2);padding-inline-start:var(--n-space-s)}:host([size="s"]){--_n-checkbox-size:var(--n-space-m);--_n-checkbox-icon-size:var(--n-size-icon-xs)}:host([size="s"]) nord-icon{inset:calc(var(--n-space-s)/ 2.6)}:host([size="s"]:not([hide-label])) .n-input-container{margin:calc(var(--n-space-s)/ 2.6) 0}:host([size="l"]){--_n-checkbox-size:var(--n-space-l);--_n-checkbox-icon-size:var(--n-size-icon-m)}`;Nt.registerIcon(Tr),Nt.registerIcon(Or);let Nr=class extends(Ae($e(le(se(ot))))){constructor(){super(...arguments),this.indeterminate=!1,this.checked=!1}get formValue(){return this.checked?this.value||"on":void 0}render(){return M`<div class="n-flex"><div class="n-input-container"><input ${ee(this.focusableRef)} class="n-input" id="${this.inputId}" type="checkbox" name="${yt(this.name)}" .value="${this.value}" .checked="${this.checked}" .indeterminate="${this.indeterminate}" ?disabled="${this.disabled}" ?required="${this.required}" aria-describedby="${yt(this.getDescribedBy())}" aria-invalid="${yt(this.getInvalid())}" @change="${this.handleChange}"><nord-icon class="icon-checked" name="interface-checked-small"></nord-icon><nord-icon class="icon-indeterminate" name="interface-remove-small"></nord-icon></div><div class="n-expand">${this.renderLabel()} ${this.renderError()}</div></div>`}handleChange(t){const e=t.target;this.checked=e.checked,super.handleChange(t)}};Nr.styles=[At,Ee,Lr],t([st({type:Boolean})],Nr.prototype,"indeterminate",void 0),t([st({type:Boolean})],Nr.prototype,"checked",void 0),Nr=t([it("nord-checkbox")],Nr);var Rr=Nr;function Mr(t,e){const n=t.getAttribute(e);return n?n.split(/\s+/):[]}function Ir(t,e,n){t.setAttribute(e,n.join(" "))}const Br=a`:host{--_n-tooltip-max-size:var(--n-tooltip-max-size, 50ch);--_n-tooltip-background:rgba(20, 20, 20, 0.95);--_n-tooltip-color:#fff;--_n-tooltip-key-border:rgba(255, 255, 255, 0.03);--_n-tooltip-key-background:rgba(255, 255, 255, 0.1);position:fixed;pointer-events:none;visibility:hidden;opacity:0;transition:opacity var(--n-transition-slowly),visibility var(--n-transition-slowly);transition-timing-function:ease;z-index:var(--n-index-popout)}.n-tooltip{gap:var(--n-space-s);font-family:var(--n-font-family);font-size:var(--n-font-size-xs);line-height:var(--n-line-height);color:var(--_n-tooltip-color);padding:calc(var(--n-space-s)/ 1.5) var(--n-space-s);background-color:var(--_n-tooltip-background);border-radius:var(--n-border-radius-s);word-break:break-word;max-inline-size:var(--_n-tooltip-max-size)}.n-tooltip,.n-tooltip-shortcut{display:flex;align-items:center}.n-tooltip-shortcut{gap:2px}::slotted([slot=shortcut]){box-sizing:border-box;margin:0;inline-size:var(--n-size-icon-m);block-size:var(--n-size-icon-m);border-radius:var(--n-border-radius-s);border:1px solid var(--_n-tooltip-key-border)!important;padding:1px!important;text-align:center;font-size:var(--n-font-size-xs);line-height:var(--n-line-height-tight);letter-spacing:-.5px;vertical-align:middle!important;background-color:var(--_n-tooltip-key-background)}[slot=shortcut]::slotted(nord-icon:not([size])){--_n-icon-size:var(--n-size-icon-s)}`;function Pr(t){return{transition:(e,n)=>t[e][n]||e}}var Hr;function Fr(t,e){return Boolean(e.id)&&t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("aria-describedby")===e.id}function qr(t){var e;const n=null===(e=null==t?void 0:t.focusableRef)||void 0===e?void 0:e.value;return n&&"focusableRef"in n?qr(n):n}const{transition:Ur}=Pr({hidden:{show:"waiting"},visible:{hide:"hidden",reposition:"positioning",show:"positioning"},waiting:{timeout:"positioning",hide:"hidden"},positioning:{positioned:"visible",hide:"hidden"}});let jr=Hr=class extends ot{constructor(){super(...arguments),this.shortcutSlot=new ce(this,"shortcut"),this.events=new ne(this),this.proxy=document.createElement("span"),this.state="hidden",this.coords=[0,0],this.position="block-start",this.role="tooltip",this.id="",this.delay=500,this.updatePosition=t=>vr(t,this,{strategy:"fixed",placement:wr(this.position),middleware:[Mo(8),Oo(),Io({padding:8})]}).then((({x:t,y:e})=>{this.coords=[t,e],this.state=Ur(this.state,"positioned")})),this.hideTooltip=()=>{this.state=Ur(this.state,"hide")},this.reposition=()=>{this.state=Ur(this.state,"reposition")},this.handleShow=t=>{const e=t.target;Fr(e,this)&&(this.currentElement=e,this.state=Ur(this.state,"show"))},this.handleHide=t=>{t.target===this.currentElement&&this.hideTooltip()},this.hideOnEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addDescribedBy=()=>{const t=qr(this.currentElement);t&&(this.proxy.hidden=!0,this.proxy.id=this.id,this.proxy.textContent=this.textContent,t.insertAdjacentElement("afterend",this.proxy),function(t,e,n){const o=Mr(t,e);o.includes(n)||Ir(t,e,o.concat(n))}(t,"aria-describedby",this.id))},this.removeDescribedBy=()=>{const t=qr(this.currentElement);t&&(this.proxy.remove(),function(t,e,n){const o=Mr(t,e);o.includes(n)&&Ir(t,e,o.filter((t=>t!==n)))}(t,"aria-describedby",this.id))}}connectedCallback(){super.connectedCallback();const t=this.getRootNode();this.events.listen(t,"keydown",this.hideOnEscape),this.events.listen(t,"mouseover",this.handleShow),this.events.listen(t,"focusin",this.handleShow),this.events.listen(t,"mouseout",this.handleHide),this.events.listen(t,"focusout",this.handleHide),this.events.listen(t,"click",this.handleHide,{capture:!0}),this.events.listen(window,"resize",this.reposition,{passive:!0}),this.events.listen(window,"scroll",this.reposition,{passive:!0})}render(){return M`<div class="n-tooltip"><slot></slot><div class="n-tooltip-shortcut" ?hidden="${this.shortcutSlot.isEmpty}"><slot class="n-tooltip-key" name="shortcut"></slot></div></div>`}handleIdChange(){this.id||console.warn("NORD: The tooltip requires an id attribute and value")}handleStateChange(t){var e;switch(this.state){case"hidden":"waiting"===t&&this.timeoutId&&clearTimeout(this.timeoutId),this.removeDescribedBy(),this.currentElement=void 0,this.style.visibility="hidden",this.style.opacity="0";break;case"visible":{this.timeoutId=void 0,Hr.lastOpened=this,this.addDescribedBy();const[t,e]=this.coords;this.style.left=`${t}px`,this.style.top=`${e}px`,this.style.visibility="visible",this.style.opacity="1";break}case"waiting":this.timeoutId=setTimeout((()=>{this.state=Ur(this.state,"timeout")}),this.delay);break;case"positioning":Hr.lastOpened!==this&&(null===(e=Hr.lastOpened)||void 0===e||e.hideTooltip()),this.currentElement&&this.updatePosition(this.currentElement)}}};jr.styles=[At,Br],t([lt()],jr.prototype,"state",void 0),t([st({reflect:!0})],jr.prototype,"position",void 0),t([st({reflect:!0})],jr.prototype,"role",void 0),t([st({reflect:!0})],jr.prototype,"id",void 0),t([st({reflect:!0,type:Number})],jr.prototype,"delay",void 0),t([Tt("id")],jr.prototype,"handleIdChange",null),t([Tt("state")],jr.prototype,"handleStateChange",null),jr=Hr=t([it("nord-tooltip")],jr);var Yr=jr;const Wr=a`fieldset{border:none}.n-label-container{margin-block-end:calc(var(--n-space-s) * 2)}`;let Vr=class extends ot{constructor(){super(...arguments),this.errorSlot=new ce(this,"error"),this.hintSlot=new ce(this,"hint"),this.label="",this.required=!1,this.hideRequired=!1}render(){const{hasError:t}=this;return M`<fieldset aria-invalid="${Ct(t,"true")}" aria-describedby="${Ct(t,"error")}" ?aria-required="${this.required}"><legend class="n-label-container"><div class="n-label"><slot name="label">${this.label}</slot><span aria-hidden="true" class="n-required" ?hidden="${!this.required||this.hideRequired}">*</span></div><div class="n-caption n-hint" ?hidden="${!this.hasHint}"><slot name="hint">${this.hint}</slot></div></legend><slot></slot><div class="n-caption n-error" id="error" role="alert" ?hidden="${!this.hasError}"><slot name="error">${this.error}</slot></div></fieldset>`}get hasHint(){return Boolean(this.hint)||this.hintSlot.hasContent}get hasError(){return Boolean(this.error)||this.errorSlot.hasContent}};Vr.styles=[At,Ee,Wr],t([st()],Vr.prototype,"label",void 0),t([st()],Vr.prototype,"hint",void 0),t([st()],Vr.prototype,"error",void 0),t([st({type:Boolean})],Vr.prototype,"required",void 0),t([st({type:Boolean,attribute:"hide-required"})],Vr.prototype,"hideRequired",void 0),Vr=t([it("nord-fieldset")],Vr);var Xr=Vr;class Kr extends ce{constructor(t,e){super(t,e.slotName),this.options=e,this.onChange=()=>{this.syncLightDom()},this.renderHook=document.createComment(this.slotName),this.lightDom=new oe(t,{render:()=>this.hasContent?B:this.options.render(),renderOptions:{renderBefore:this.renderHook}})}hostConnected(){super.hostConnected(),this.host.appendChild(this.renderHook),this.syncLightDom()}hostDisconnected(){this.renderHook.remove()}syncLightDom(){const t=this.content;t&&this.options.syncLightDom(t)}}const Gr=a`:host{--_n-radio-size:calc(var(--n-space-m) * 1.25);display:inline-block;line-height:var(--n-line-height)}.n-flex{display:flex}.n-expand{flex:1}.n-input-container{position:relative}::slotted(input){--_n-radio-accent-color:var(--n-color-accent);-moz-appearance:none;-webkit-appearance:none;appearance:none;margin:0!important;padding:0!important;border:1px solid var(--_n-radio-border-color,var(--n-color-border-hover))!important;border-radius:var(--n-border-radius-circle)!important;transition:none!important;display:block!important;inline-size:var(--_n-radio-size)!important;block-size:var(--_n-radio-size)!important;cursor:pointer}::slotted(input:checked){--_n-radio-border-color:var(--n-color-accent);background:var(--_n-radio-accent-color)!important}::slotted(input[aria-invalid]){--_n-radio-accent-color:var(--n-color-status-danger);--_n-radio-border-color:var(--_n-radio-accent-color)}::slotted(input:active){opacity:.8}::slotted(input:focus-visible){outline:0!important}::slotted(input:focus){outline:0!important;box-shadow:0 0 0 1px var(--n-color-surface),0 0 0 3px var(--n-color-accent)!important}:host([disabled]) ::slotted(input){--_n-radio-accent-color:var(--n-color-border-strong);--_n-radio-border-color:var(--_n-radio-accent-color);background:var(--_n-radio-accent-color);cursor:default;opacity:1}:host([disabled]) ::slotted(label){color:var(--n-color-text-weaker);cursor:default}.n-dot{--_n-radio-dot-size:var(--n-space-s);--_n-radio-dot-inset:calc((var(--_n-radio-size) - var(--_n-radio-dot-size)) / 2);position:absolute;border-radius:var(--n-border-radius-circle);inline-size:var(--_n-radio-dot-size);block-size:var(--_n-radio-dot-size);background-color:var(--n-color-text-on-accent);inset-inline-start:var(--_n-radio-dot-inset);inset-block-start:var(--_n-radio-dot-inset);z-index:var(--n-index-default);pointer-events:none}.n-label-container{margin-block-end:0}::slotted(label){-webkit-user-select:none;user-select:none;font-weight:var(--n-font-weight)!important;line-height:var(--n-line-height-l)!important;padding-inline-start:var(--n-space-s)!important;cursor:pointer}.n-hint{padding-inline-start:var(--n-space-s)}.n-error{margin-block-start:calc(var(--n-space-s)/ 2);padding-inline-start:var(--n-space-s)}`;let Qr=0;const Zr=t=>`nord-radio-${t}-${Qr++}`;let Jr=class extends($e(le(se(ot)))){constructor(){super(...arguments),this.inputId=Zr("input"),this.hintId=Zr("hint"),this.errorId=Zr("error"),this.hintSlot=new Kr(this,{slotName:"hint",render:()=>this.hint?M`<div slot="hint-internal" id="${this.hintId}">${this.hint}</div>`:B,syncLightDom:t=>{t.id=this.hintId}}),this.labelSlot=new Kr(this,{slotName:"label",render:()=>this.label?M`<label slot="label-internal" for="${this.inputId}">${this.label}</label>`:B,syncLightDom:t=>{!function(t){return"label"===t.localName}(t)?console.warn('NORD: Only <label> elements should be placed in radio\'s "label" slot'):t.htmlFor=this.inputId}}),this.errorSlot=new Kr(this,{slotName:"error",render:()=>this.error?M`<div slot="error-internal" id="${this.errorId}">${this.error}</div>`:B,syncLightDom:t=>{t.id=this.hintId}}),this.inputSlot=new oe(this,{render:()=>M`<input slot="input" @blur="${this.handleBlur}" @focus="${this.handleFocus}" ${ee(this.focusableRef)} class="n-input" id="${this.inputId}" type="radio" name="${Ct(this.name)}" .value="${Ct(this.value)}" .checked="${this.checked}" ?disabled="${this.disabled}" ?required="${this.required}" aria-describedby="${Ct(this.getDescribedBy())}" aria-invalid="${Ct(this.getInvalid())}" form="${Ct(this.getAttribute("form")||void 0)}">`}),this.checked=!1,this.handleBlur=t=>{t.stopPropagation(),this.dispatchEvent(new Event("blur",{bubbles:!1,cancelable:!0}))},this.handleFocus=t=>{t.stopPropagation(),this.dispatchEvent(new Event("focus",{bubbles:!1,cancelable:!0}))}}get formValue(){}render(){return M`<div class="n-flex"><div class="n-input-container" @change="${this.handleChange}"><slot name="input"></slot>${this.checked?M`<div class="n-dot"></div>`:B}</div><div class="n-expand"><div class="n-label-container">${t=this.hideLabel,e=()=>M`<slot name="label"></slot><slot name="label-internal"></slot>`,n=t=>M`<nord-visually-hidden>${t}</nord-visually-hidden>`,t?n(e()):e()}<div class="n-caption n-hint" ?hidden="${!this.hasHint}"><slot name="hint"></slot><slot name="hint-internal"></slot></div></div><div class="n-caption n-error" role="alert" ?hidden="${!this.hasError}"><slot name="error"></slot><slot name="error-internal"></slot></div></div></div>`;var t,e,n}handleCheckedChange(t){!t&&this.checked&&this.uncheckSiblings()}uncheckSiblings(){this.getRootNode().querySelectorAll(`nord-radio[name="${this.name}"]`).forEach((t=>{t!==this&&(t.checked=!1)}))}handleChange(t){t.stopPropagation();const e=t.target;this.checked=e.checked,super.handleChange(t)}};Jr.styles=[At,Ee,Gr],t([st({type:Boolean,reflect:!0})],Jr.prototype,"checked",void 0),t([Tt("checked")],Jr.prototype,"handleCheckedChange",null),Jr=t([it("nord-radio")],Jr);var ti=Jr;const ei=a`:host{color:var(--n-color-text);--_n-header-gutter:var(--n-space-l);--_n-header-box-shadow:var(--n-box-shadow-header)}::slotted(*){margin:0!important}::slotted(a){color:var(--n-color-text-link);text-decoration:underline}::slotted(a:hover){text-decoration:none}.n-header,.n-header-end{display:flex;flex-flow:row wrap;align-items:center;gap:var(--n-space-m)}.n-header{padding:var(--n-space-m) var(--n-space-l);padding-inline-start:var(--_n-header-gutter);background-color:var(--n-color-surface);border-block-end:1px solid var(--n-color-border);box-shadow:var(--_n-header-box-shadow);min-block-size:var(--n-space-xxl)}.n-header-end{margin-inline-start:auto;gap:var(--n-space-s)}`;let ni=class extends ot{constructor(){super(...arguments),this.endSlot=new ce(this,"end")}render(){return M`<header class="n-header"><slot></slot><div class="n-header-end" ?hidden="${this.endSlot.isEmpty}"><slot name="end"></slot></div></header>`}};ni.styles=[At,ei],ni=t([it("nord-header")],ni);var oi=ni;const ri=a`:host{color:var(--n-color-text-weak);font-weight:var(--n-font-weight);line-height:var(--n-line-height-tight);white-space:nowrap;text-overflow:ellipsis;user-select:none;all:unset;display:block;font-family:var(--n-font-family);font-size:var(--n-font-size-m)}*,::after,::before{box-sizing:border-box}[role=list]{margin-block-end:var(--n-space-m);min-inline-size:100%;list-style:none;appearance:none;border:0;box-sizing:border-box;margin:0;padding:0}.n-heading{min-inline-size:100%;color:var(--n-color-nav-heading);font-size:var(--n-font-size-s);font-weight:var(--n-font-weight-active);line-height:var(--n-line-height-tight);padding-inline-start:var(--n-space-s);margin-block-start:var(--n-space-m);margin-block-end:var(--n-space-s);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;let ii=class extends ot{render(){return M`${this.heading?M`<p id="heading" aria-hidden="true" class="n-heading">${this.heading}</p>`:B}<div role="list" aria-labelledby="${this.heading?"heading":B}"><slot></slot></div>`}};ii.styles=ri,t([st()],ii.prototype,"heading",void 0),ii=t([it("nord-nav-group")],ii);var ai=ii;const si=a`:host{--_n-nav-item-box-shadow:none;all:unset;display:block;font-feature-settings:var(--n-font-features);font-family:var(--n-font-family)}*,::after,::before{box-sizing:border-box}.n-nav-item{-webkit-user-select:none;user-select:none;display:flex;align-items:center;font-family:inherit;font-size:inherit;line-height:var(--n-line-height-tight);-webkit-appearance:none;appearance:none;color:var(--n-color-text-weak);padding:var(--n-space-s);min-block-size:28px;margin-block-end:1px;border-radius:var(--n-border-radius-s);text-decoration:none;inline-size:100%;max-inline-size:100%;background:0 0;cursor:pointer;border:0;text-align:start;box-shadow:var(--_n-nav-item-box-shadow);position:relative}.n-nav-item:focus{--_n-nav-item-box-shadow:0 0 0 2px var(--n-color-accent);outline:0;position:relative;z-index:var(--n-index-masked)}@supports selector(:focus-visible){.n-nav-item:focus{--_n-nav-item-box-shadow:none}.n-nav-item:focus-visible{--_n-nav-item-box-shadow:0 0 0 2px var(--n-color-accent)}}.n-nav-item:hover{background:var(--n-color-nav-hover);color:var(--n-color-text)}.n-nav-item:active{opacity:.7}.n-nav-content{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([badge]) .n-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-inline-size:calc(100% - calc(var(--n-space-m) + var(--n-space-m)));margin-block-end:-3px}:host([active]) .n-nav-item{--_n-nav-item-box-shadow:var(--n-box-shadow);background:var(--n-color-accent);color:var(--n-color-text-on-accent);font-weight:var(--n-font-weight-active)}:host([active]) .n-nav-item:focus{--_n-nav-item-box-shadow:0 0 0 1px var(--n-color-nav-surface),0 0 0 3px var(--n-color-accent)}:host([active]) nord-icon{color:currentColor}.n-toggle-icon{color:var(--n-color-icon);margin-inline-end:var(--n-space-s);margin-inline-start:var(--n-space-s)}.n-toggle-icon.n-rtl{transform:rotate(-180deg)}[aria-expanded=true] .n-toggle-icon{transform:rotate(90deg)}.n-nav-icon{margin-inline-end:calc(var(--n-space-s) * 1.4);flex-shrink:0}::slotted(nord-nav-group){margin-inline-start:calc(var(--n-space-m) + calc(var(--n-space-s) * 1.3))}.n-nav-badge{border-radius:var(--n-border-radius-pill);background:var(--n-color-status-warning);color:rgba(0,0,0,.8);font-weight:var(--n-font-weight);font-feature-settings:var(--n-font-features-reduced);padding:4px 6px;text-align:center;min-inline-size:20px;position:absolute;margin-block-start:-2px;margin-inline-start:calc(var(--n-space-s)/ 1.5);font-size:var(--n-font-size-xs);display:inline-block}`;let li=class extends(se(ot)){constructor(){super(...arguments),this.subnavSlot=new ce(this,"subnav"),this.direction=new Oe(this),this.active=!1,this.open=!1}get hasSubNav(){return this.subnavSlot.hasContent}connectedCallback(){super.connectedCallback(),this.querySelector("nord-nav-item[active]")&&(this.open=!0)}render(){const t=M`${this.icon?M`<nord-icon class="n-nav-icon" name="${this.icon}" size="m"></nord-icon>`:B}<div class="n-nav-content"><span class="n-nav-label"><slot></slot></span>${this.badge?M`<span class="n-nav-badge">${this.badge}</span>`:B}</div>`;let e;return e=this.subnavSlot.hasContent?this.renderToggle(t):this.href?this.renderLink(t):this.renderButton(t),M`<div role="listitem">${e}<slot name="${this.subnavSlot.slotName}" ?hidden="${!this.open}"></slot></div>`}renderLink(t){return M`<a class="n-nav-item" ${ee(this.focusableRef)} aria-current="${Ct(this.active,"page")}" href="${this.href||""}">${t}</a>`}renderToggle(t){return M`<button class="n-nav-item" @click="${this.toggleOpen}" aria-expanded="${this.open?"true":"false"}" ${ee(this.focusableRef)}>${t}<nord-icon size="xxs" class="${ge({"n-toggle-icon":!0,"n-rtl":this.direction.isRTL})}" name="arrow-expand-right-small"></nord-icon></button>`}renderButton(t){return M`<button class="n-nav-item" ${ee(this.focusableRef)}>${t}</button>`}toggleOpen(){this.open=!this.open,this.dispatchEvent(new ye("toggle"))}};li.styles=si,t([st({type:Boolean,reflect:!0})],li.prototype,"active",void 0),t([st()],li.prototype,"icon",void 0),t([st()],li.prototype,"href",void 0),t([st()],li.prototype,"badge",void 0),t([st({type:Boolean})],li.prototype,"open",void 0),li=t([it("nord-nav-item")],li);var di=li;const ci=a`:host{all:unset;display:flex;flex-direction:column;block-size:100%;background:var(--n-color-background);overflow:hidden auto}*,::after,::before{box-sizing:border-box}nav{flex-grow:1;padding:var(--n-space-s) var(--n-space-m) var(--n-space-m)}slot[name=footer],slot[name=header]{display:flex;flex-direction:column;justify-content:center;--n-button-text-align:start;--n-button-background-color:transparent;--n-button-border-color:transparent;--n-button-box-shadow:none;--n-button-gradient:none;--n-button-padding-inline:calc(var(--n-space-s) / 2)}::slotted(:is([slot=header],[slot=footer]):not([open]):focus-within){--n-button-border-color:var(--n-color-accent)}slot[name=header]{--n-button-border-radius:0;--n-button-padding-inline:calc((var(--n-space-l) / 1.5) - 1px);--n-button-font-weight:var(--n-font-weight-heading);--n-button-font-size:var(--n-font-size-l);--n-button-min-block-size:calc(var(--n-space-xxl) - 2px);--n-select-block-size:var(--n-button-min-block-size);min-block-size:var(--n-button-min-block-size);padding:1px 1px 0;border-block-end:1px solid var(--n-color-border)}slot[name=footer]{--n-button-color:var(--n-color-text-weak);margin:var(--n-space-m)}slot[name=header][hidden]{display:none}::slotted(:is([slot=header]:hover,[slot=header][open])){box-shadow:0 -1px 0 1px var(--n-color-nav-hover);background-color:var(--n-color-nav-hover)}::slotted(:is([slot=footer]:hover,[slot=footer][open])){--n-button-border-color:var(--n-color-border-hover)}`;let hi=class extends ot{constructor(){super(...arguments),this.headerSlot=new ce(this,"header")}render(){return M`<slot name="header" ?hidden="${this.headerSlot.isEmpty}"></slot><nav><slot></slot></nav><slot name="footer"></slot>`}};hi.styles=ci,hi=t([it("nord-navigation")],hi);var ui=hi;
95
+ */const Me=(t,e,n)=>{const o=new Map;for(let r=e;r<=n;r++)o.set(t[r],r);return o},Ie=kt(class extends _t{constructor(t){if(super(t),t.type!==wt)throw Error("repeat() can only be used in text expressions")}ht(t,e,n){let o;void 0===n?n=e:void 0!==e&&(o=e);const r=[],i=[];let a=0;for(const e of t)r[a]=o?o(e,a):a,i[a]=n(e,a),a++;return{values:i,keys:r}}render(t,e,n){return this.ht(t,e,n).values}update(t,[e,n,o]){var r;const i=(t=>t._$AH)(t),{values:a,keys:s}=this.ht(e,n,o);if(!Array.isArray(i))return this.ut=s,a;const l=null!==(r=this.ut)&&void 0!==r?r:this.ut=[],d=[];let c,h,u=0,p=i.length-1,v=0,b=a.length-1;for(;u<=p&&v<=b;)if(null===i[u])u++;else if(null===i[p])p--;else if(l[u]===s[v])d[v]=qt(i[u],a[v]),u++,v++;else if(l[p]===s[b])d[b]=qt(i[p],a[b]),p--,b--;else if(l[u]===s[b])d[b]=qt(i[u],a[b]),Ft(t,d[b+1],i[u]),u++,b--;else if(l[p]===s[v])d[v]=qt(i[p],a[v]),Ft(t,i[u],i[p]),p--,v++;else if(void 0===c&&(c=Me(s,v,b),h=Me(l,u,p)),c.has(l[u]))if(c.has(l[p])){const e=h.get(s[v]),n=void 0!==e?i[e]:null;if(null===n){const e=Ft(t,i[u]);qt(e,a[v]),d[v]=e}else d[v]=qt(n,a[v]),Ft(t,i[u],n),i[e]=null;v++}else jt(i[p]),p--;else jt(i[u]),u++;for(;v<=b;){const e=Ft(t,d[b+1]);qt(e,a[v]),d[v++]=e}for(;u<=p;){const t=i[u++];null!==t&&jt(t)}return this.ut=s,((t,e=Ut)=>{t._$AH=e})(t,d),I}});const Be="keyboard-arrow-up-down";var Pe=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m8.29008 12.3413 1.41 1.42-3.96 3.95c-.2.19-.45.29-.71.29s-.51-.1-.71-.29l-3.990002-4 1.410002-1.42 2.26 2.25v-12.54002h2v12.63002zm11.38002-6.05002-4.01-4c-.39-.39-1.02-.39-1.41 0l-3.96 3.95 1.41 1.42 2.29-2.29v12.63002h2v-12.54002l2.26 2.25 1.41-1.42z" fill="currentColor"/></svg>',title:Be,tags:"nordicon keyboard keys arrow up down shortcut"});var He=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m18.0025 4v8c0 1.1-.9 2-2 2h-12.59l3 3-1.41 1.41-4.71-4.7c-.39-.39-.39-1.02 0-1.41l4.71-4.71 1.41 1.41-3 3h12.59v-8h-4v-2h4c1.1 0 2 .9 2 2z" fill="currentColor"/></svg>',title:"keyboard-return",tags:"nordicon keyboard return key shortcut"});var Fe=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m18 2h-10.54c-.58 0-1.14.25-1.52.7l-5.14 6c-.65.75-.65 1.85 0 2.6l5.14 6c.38.44.93.7 1.52.7h10.54c1.1 0 2-.9 2-2v-12c0-1.1-.9-2-2-2zm0 14h-10.54l-5.14-6 5.14-6h10.54zm-9.54-3.88 2.12-2.12-2.12-2.12 1.41-1.41 2.12 2.12 2.12-2.12 1.41 1.41-2.12 2.12 2.12 2.12-1.41 1.41-2.12-2.12-2.12 2.12z" fill="currentColor"/></svg>',title:"keyboard-backspace",tags:"nordicon keyboard backspace back delete key shortcut"});function qe(t,e,n){return t>n?e:t<e?n:t}function Ue(t){var e;return(null===(e=t.activeElement)||void 0===e?void 0:e.shadowRoot)?Ue(t.activeElement.shadowRoot):t.activeElement||void 0}var je=["Shift","Meta","Alt","Control"],Ye="object"==typeof navigator&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"Meta":"Control";function We(t,e){return"function"==typeof t.getModifierState&&t.getModifierState(e)}function Ve(t){return t.trim().split(" ").map((function(t){var e=t.split(/\b\+/),n=e.pop();return[e=e.map((function(t){return"$mod"===t?Ye:t})),n]}))}function Xe(t,e){var n;void 0===e&&(e={});var o=null!=(n=e.timeout)?n:1e3,r=Object.keys(t).map((function(e){return[Ve(e),t[e]]})),i=new Map,a=null;return function(t){t instanceof KeyboardEvent&&(r.forEach((function(e){var n=e[0],o=e[1],r=i.get(n)||n;!function(t,e){return!(e[1].toUpperCase()!==t.key.toUpperCase()&&e[1]!==t.code||e[0].find((function(e){return!We(t,e)}))||je.find((function(n){return!e[0].includes(n)&&e[1]!==n&&We(t,n)})))}(t,r[0])?We(t,t.key)||i.delete(n):r.length>1?i.set(n,r.slice(1)):(i.delete(n),o(t))})),a&&clearTimeout(a),a=setTimeout(i.clear.bind(i),o))}}const Ke=/Arrow(Up|Down|Left|Right)/g,Ge=/Escape/g;class Qe{constructor(t,e,n=window){this.shortcuts=e,this.target=n,t.addController(this)}hostConnected(){this.shortcuts&&this.bind(this.shortcuts)}hostDisconnected(){this.unbind()}unbind(){var t;null===(t=this.unregister)||void 0===t||t.call(this)}bind(t){this.unbind(),this.shortcuts=t,this.unregister=function(t,e,n){var o;void 0===n&&(n={});var r=null!=(o=n.event)?o:"keydown",i=Xe(e,n);return t.addEventListener(r,i),function(){t.removeEventListener(r,i)}}(this.target,function(t){const e={};return Object.keys(t).forEach((n=>{if(e[n]=t[n],Ke.test(n)){const t=n.replace(Ke,((t,e)=>e));e[t]=e[n]}if(Ge.test(n)){const t=n.replace(Ge,(()=>"Esc"));e[t]=e[n]}})),e}(this.shortcuts))}}class Ze{constructor(t,e){this.host=t,this.options=e,this.handleEsc=t=>{this.options.isOpen()&&this.options.onDismiss(t)},this.handleClickOut=t=>{var e;if(!this.options.isOpen())return;const n=null!==(e=this.options.isDismissible)&&void 0!==e?e:t=>t!==this.host;t.composedPath().every(n)&&this.options.onDismiss(t)},t.addController(this),this.shortcut=new Qe(t,{Escape:this.handleEsc}),this.events=new ne(t)}hostConnected(){this.events.listen(document,"click",this.handleClickOut,!0)}}const Je=t=>e=>{e.preventDefault(),t(e)};class tn{constructor(t,e){this.host=t,t.addController(this),this.commandShortcuts=new Qe(t),this.globalShortcuts=new Qe(t,{"$mod+k":Je(e.toggleOpen)}),this.navigationShortcuts=new Qe(t,{Enter:Je(e.trigger),Backspace:e.goBack,End:Je(e.end),Home:Je(e.start),ArrowDown:Je(e.next),ArrowUp:Je(e.previous)},t)}registerCommandShortcuts(){const t={};for(const e of this.host.commands)e.shortcut&&(t[e.shortcut]=()=>{var t;return null===(t=e.handler)||void 0===t?void 0:t.call(e,this.host)});this.commandShortcuts.bind(t)}}var en=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.7098 10.7401-8.63996 8.67-1.42-1.41 7.93996-7.97-7.99996-8.03001 1.42-1.410002 8.69996 8.740002c.39.39.39 1.02001 0 1.41001z" fill="currentColor"/></svg>',title:"arrow-right",tags:"nordicon arrow right caret pointing triangle chevron"});var nn=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor"><path d="m14.4101 18.0001-1.42 1.41-8.70004-8.74c-.39-.39-.39-1.02001 0-1.41001l8.64004-8.670002 1.42 1.410002-7.94004 7.97 8.00004 8.04001z"/><path d="m14.4101 18.0001-1.42 1.41-8.70004-8.74c-.39-.39-.39-1.02001 0-1.41001l8.64004-8.670002 1.42 1.410002-7.94004 7.97 8.00004 8.04001z"/></g></svg>',title:"arrow-left",tags:"nordicon arrow left caret pointing triangle chevron"});var on=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m13.5 14h6.5v2h-6.5c-.63 0-1.22-.3-1.6-.8l-5.4-7.2h-6.5v-2h6.5c.63 0 1.22.3 1.6.8zm-1.5-8v2h8v-2z" fill="currentColor"/></svg>',title:"keyboard-option",tags:"nordicon keyboard option key shortcut"});const rn=a`:host{display:flex}.n-command{display:flex;flex:1;border-inline-start:2px solid transparent;align-items:center;color:var(--n-color-text);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-command.n-selected,.n-command:hover{cursor:pointer;background-color:var(--n-color-active)}.n-command.n-selected{border-inline-start-color:var(--n-color-accent)}nord-icon{color:var(--n-color-icon)}.n-command-icon{margin-inline-start:2px;margin-inline-end:calc(var(--n-space-s) * 1.4);line-height:var(--n-line-height-tight)}.n-selected .n-command-icon nord-icon{color:var(--n-color-icon-hover)}.n-title{flex:1;margin-inline-end:calc(var(--n-space-s)/ 2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-shortcuts{display:flex;gap:calc(var(--n-space-s)/ 2)}.n-shortcut{padding:calc(var(--n-space-s)/ 4) calc(var(--n-space-s)/ 3);text-transform:capitalize;font-size:var(--n-font-size-xs);border:1px solid var(--n-color-border-strong);font-weight:var(--n-font-weight);box-shadow:var(--n-box-shadow);border-radius:var(--n-border-radius-s);color:var(--n-color-icon);background:var(--n-color-button);line-height:var(--n-line-height-tight);min-inline-size:var(--n-space-s);display:inline-flex;align-items:center;justify-content:center;user-select:none}`,an=/(?:Key|Digit)([A-Z0-9])/g;Nt.registerIcon(nn),Nt.registerIcon(en),Nt.registerIcon(on);let sn=class extends ot{constructor(){super(...arguments),this.direction=new Oe(this),this.selected=!1}render(){return M`<div class="${ge({"n-selected":this.selected,"n-command":!0})}"><div aria-hidden="true" class="n-command-icon"><nord-icon size="s" name="${this.getIconName()}"></nord-icon></div><div class="n-title">${this.command.title}</div>${this.renderShortcut()}</div>`}ensureInView(){this.selected&&requestAnimationFrame((()=>this.scrollIntoView({block:"nearest"})))}getIconName(){return this.command.icon?this.command.icon:this.direction.isLTR?"arrow-right":"arrow-left"}renderShortcut(){if(!this.command.shortcut)return B;const t=this.command.shortcut.replace(an,"$1");return M`<nord-visually-hidden>, ${t}</nord-visually-hidden><div aria-hidden="true" class="n-shortcuts">${t.split("+").map((t=>M`<div class="n-shortcut">${"alt"===t.toLowerCase()&&navigator.platform.indexOf("Mac")>-1?M`<nord-icon name="${"keyboard-option"}" size="s"></nord-icon>`:t}</div>`))}</div>`}};sn.styles=rn,t([st({type:Object})],sn.prototype,"command",void 0),t([st({type:Boolean})],sn.prototype,"selected",void 0),t([Tt("selected")],sn.prototype,"ensureInView",null),sn=t([it("nord-command-menu-action")],sn);var ln=sn;class dn extends ye{constructor(t){super(dn.eventName),this.command=t}}dn.eventName="nord-select";const cn=a`:host{--_n-command-menu-inline-size:var(--n-command-menu-inline-size, 640px);--_n-command-menu-block-size:var(--n-command-menu-block-size, 290px);--_n-command-menu-block-start:var(--n-command-menu-block-start, 16%)}.n-modal{display:none;position:fixed;pointer-events:none;z-index:var(--n-index-modal);inset-inline-start:0;inset-block-start:0;inline-size:100%;block-size:100%;overflow:auto}.n-modal.n-visible{display:block}.n-modal-content{position:relative;pointer-events:all;inset-block-start:var(--_n-command-menu-block-start);margin:auto;display:flex;flex-direction:column;min-inline-size:0;background:var(--n-color-surface);border-radius:var(--n-border-radius);box-shadow:var(--n-box-shadow-modal);max-inline-size:var(--_n-command-menu-inline-size);overflow:hidden}.n-bump{animation:zoom-in-zoom-out var(--n-transition-slowly)}@keyframes zoom-in-zoom-out{0%{transform:translateY(-10px) scale(.97);opacity:0}100%{transform:translateY(0) scale(1.0001);opacity:1}}.n-modal-footer{display:flex;gap:var(--n-space-s);padding:var(--n-space-s) var(--n-space-m);font-size:calc(var(--n-font-size-s) - 1px);color:var(--n-color-text-weaker)}.n-help{display:flex;align-items:center;gap:2px}.n-help+.n-help{padding-inline-start:var(--n-space-s);border-inline-start:1px solid var(--n-color-border-strong)}.n-help nord-icon{--_n-icon-size:10px;color:currentColor;margin:3px 4px}.n-help.n-backspace nord-icon{--_n-icon-size:12px}.n-search-wrapper{display:flex;border-block-end:1px solid var(--n-color-border)}[role=combobox]{flex:1;font-size:var(--n-font-size-l);font-weight:var(--n-font-weight);font-family:inherit;background:0 0;color:var(--n-color-text);border:none;border-radius:0;appearance:none;outline:0;margin:0;padding:var(--n-space-m)}[role=combobox]::-webkit-input-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=combobox]::-moz-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=combobox]::-ms-input-placeholder{color:var(--n-color-text-weaker);opacity:.6!important}[role=listbox]{max-block-size:var(--_n-command-menu-block-size);overflow:auto;margin:0;padding:0}.n-group-header{line-height:var(--n-line-height);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-s)/ 1.4) var(--n-space-m);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:var(--n-font-size-s);background:var(--n-color-surface-raised);font-weight:var(--n-font-weight-active);color:var(--n-color-text-weaker)}.n-command-empty{display:flex;flex:1;flex-direction:column;border-inline-start:2px solid transparent;align-items:flex-start;color:var(--n-color-text);border-block-end:1px solid var(--n-color-border);padding:calc(var(--n-space-m)/ 1.5) var(--n-space-m)}.n-command-empty .n-title{flex:1;margin-block-start:var(--n-space-s);margin-inline-end:calc(var(--n-space-s)/ 2);max-inline-size:100%;font-size:var(--n-font-size-m);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.n-command-empty .n-tip{flex:1;margin-block-start:var(--n-space-s);margin-block-end:var(--n-space-m);font-size:var(--n-font-size-s);color:var(--n-color-text-weaker)}`,hn={$lang:"en-US",$name:"English",$dir:"ltr","nord-command-menu":{instructions:"Press 'Enter' to confirm your input or 'Escape' to cancel",inputLabel:"Type the name of a command to run.",footerArrowKeys:"Navigate",footerEnterKey:"Select",footerEscapeKey:"Esc to dismiss",footerBackspaceKey:"Move to parent",noResults:t=>`No results for “${t}”`,tip:"Search tips: some search terms require an exact match. Try typing the entire command name, or use a different word or phrase."},"nord-calendar":{prevMonthLabel:"Previous month",nextMonthLabel:"Next month",monthSelectLabel:"Month",yearSelectLabel:"Year"},"nord-date-picker":{modalHeading:"Choose a date",closeLabel:"Close window",buttonLabel:"Choose date",selectedDateMessage:"Selected date is"},"nord-modal":{closeLabel:"Close dialog"},"nord-nav-toggle":{label:"Toggle navigation"},"nord-textarea":{remainingCharacters:t=>`Characters remaining: ${t}`}},un=new Set,pn=new Map;function vn(){for(const t of un)t()}function bn(...t){t.forEach((t=>{const e=t.$lang.toLowerCase();pn.set(e,t)})),vn()}function gn(t){return pn.has(t)}function fn(t){const e=t.toLowerCase(),[n]=e.split("-");return pn.get(e)||pn.get(n)||hn}new MutationObserver(vn).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]});const mn=()=>{};class yn{constructor(t,e={onLangChange:mn}){this.host=t,this.options=e,this.handleLangChange=()=>{const t=fn(this.lang);this.resolvedTranslation!==t&&(this.resolvedTranslation=t,this.options.onLangChange(),this.host.requestUpdate())},t.addController(this),this.resolvedTranslation=fn(this.lang)}get lang(){return this.host.lang||document.documentElement.lang}get resolvedLang(){return this.resolvedTranslation.$lang}hostConnected(){var t;this.unsubscribe=(t=this.handleLangChange,un.add(t),()=>un.delete(t)),this.options.onLangChange()}hostDisconnected(){var t;null===(t=this.unsubscribe)||void 0===t||t.call(this)}term(t,...e){var n,o;const{resolvedTranslation:r,resolvedLang:i}=this,a=this.host.localName;null==r[a]?console.warn(`NORD: Missing translations for component \`${a}\` in lang: \`${i}\``):null==r[a][t]&&console.warn(`NORD: Missing translation key \`${String(t)}\` for component \`${a}\` in lang \`${i}\``);const s=null!==(o=null===(n=r[a])||void 0===n?void 0:n[t])&&void 0!==o?o:hn[a][t];return"function"==typeof s?s(...e):s}}Nt.registerIcon(Pe),Nt.registerIcon(He),Nt.registerIcon(Fe);let xn=class extends ot{constructor(){super(...arguments),this.inputRef=Zt(),this.listRef=Zt(),this.localize=new yn(this),this.dismissController=new Ze(this,{isOpen:()=>this.open,onDismiss:()=>this.close()}),this.keyboardController=new tn(this,{trigger:()=>this.select(),goBack:()=>this.goBack(),end:()=>this.end(),start:()=>this.start(),next:()=>this.next(),previous:()=>this.previous(),toggleOpen:()=>this.toggleOpen()}),this.open=!1,this.placeholder="Type a command or search...",this.commands=[],this.search="",this.bump=!0,this.selectedIndex=0,this.filteredCommands=[]}get selected(){return this.filteredCommands[this.selectedIndex]}show(t={}){this.dispatchEvent(new ye("open",{cancelable:!0}))&&(this.open=!0,this.setParent(t.parent))}close(){var t;this.open=!1,null===(t=this.previousFocus)||void 0===t||t.focus(),this.previousFocus=void 0,this.dispatchEvent(new ye("close"))}toggleOpen(){this.open?this.close():this.show()}focus(){var t;null===(t=this.inputRef.value)||void 0===t||t.focus()}render(){var t;const e=function(t,e){var n;const o=new Map;for(const r of t){const t=r[e],i=null!==(n=o.get(t))&&void 0!==n?n:[];o.has(t)||o.set(t,[]),i.push(r),o.set(t,i)}return o}(this.filteredCommands,"section"),n=0===this.filteredCommands.length?"no-results":null===(t=this.selected)||void 0===t?void 0:t.id;return M`<div class="${ge({"n-visible":this.open,"n-modal":!0})}"><div @animationend="${this.handleAnimationEnd}" class="${ge({"n-bump":this.bump,"n-modal-content":!0})}"><div class="n-search-wrapper"><nord-visually-hidden id="instructions">${this.localize.term("instructions")}</nord-visually-hidden><input type="text" id="search" @input="${this.handleInput}" @blur="${this.handleBlur}" ${ee(this.inputRef)} placeholder="${this.placeholder}" .value="${this.search}" spellcheck="false" autocomplete="off" autocapitalize="off" aria-label="${this.localize.term("inputLabel")}" aria-autocomplete="list" aria-haspopup="listbox" role="combobox" aria-controls="list" aria-expanded="true" aria-activedescendant="${yt(n)}" aria-describedby="instructions"></div><div class="n-modal-body"><div id="list" ${ee(this.listRef)} role="listbox">${0===this.filteredCommands.length?this.renderNoResults():Array.from(e,(([t,e])=>this.renderSection(t,e)))}</div></div><slot name="footer"><div class="n-modal-footer"><span class="n-help"><nord-icon label="Arrow keys" name="${Be}"></nord-icon>${this.localize.term("footerArrowKeys")} </span><span class="n-help"><nord-icon label="Enter key" name="${"keyboard-return"}"></nord-icon>${this.localize.term("footerEnterKey")} </span><span class="n-help">${this.localize.term("footerEscapeKey")}</span> <span class="n-help n-backspace"><nord-icon label="Backspace key" name="${"keyboard-backspace"}"></nord-icon>${this.localize.term("footerBackspaceKey")}</span></div></slot></div></div>`}renderNoResults(){return M`<div id="no-results" class="n-command-empty" role="option" aria-selected="true"><div class="n-title">${this.localize.term("noResults",this.search)}</div><div class="n-tip">${this.localize.term("tip")}</div></div>`}renderSection(t,e){const n=`section-${t}`;return M`<div role="group" aria-labelledby="${Ct(t,n)}">${t?M`<div class="n-group-header" role="presentation" id="${n}">${t}</div>`:B} ${Ie(e,(t=>t.id),(t=>{var e,n;return M`<nord-command-menu-action id="${t.id}" .command="${t}" ?selected="${this.open&&t.id===(null===(e=this.selected)||void 0===e?void 0:e.id)}" @click="${()=>this.select(t)}" role="option" aria-selected="${Ct(t.id===(null===(n=this.selected)||void 0===n?void 0:n.id),"true")}"></nord-command-menu-action>`}))}</div>`}handleCommandsChange(){this.keyboardController.registerCommandShortcuts()}handleBump(){this.open&&(this.bump=!0)}focusOnOpen(){this.open&&(this.previousFocus=Ue(document),this.focus(),this.listRef.value&&(this.listRef.value.scrollTop=0))}handleAnimationEnd(){this.bump=!1}handleBlur(){this.open&&this.focus()}handleInput(t){const e=t.target;this.setSearch(e.value)}select(t=this.selected){var e;this.commands.some((e=>e.parent===t.id))?(this.setParent(t.id),this.bump=!0,this.focus()):this.close(),this.setSearch(""),null===(e=t.handler)||void 0===e||e.call(t,this);const n=new dn(t);this.dispatchEvent(n)}start(){this.selectedIndex=0}end(){this.selectedIndex=this.filteredCommands.length-1}next(){this.selectedIndex=qe(this.selectedIndex+1,0,this.filteredCommands.length-1)}previous(){this.selectedIndex=qe(this.selectedIndex-1,0,this.filteredCommands.length-1)}goBack(){if(!this.search&&this.parent){const t=this.commands.find((t=>t.id===this.parent));this.setParent(null==t?void 0:t.parent)}}setParent(t){this.parent=t,this.setSearch("")}setSearch(t){this.search=t,this.selectedIndex=0}filterCommands(){const t=this.search.toLocaleLowerCase().split(/\s+/);this.filteredCommands=this.commands.filter((({title:e,keywords:n="",parent:o})=>{const r=`${e} ${n}`.toLocaleLowerCase(),i=t.every((t=>r.includes(t)));return(!this.parent&&this.search||o==this.parent)&&i}))}};xn.styles=[At,cn],t([st({type:Boolean})],xn.prototype,"open",void 0),t([st({type:String})],xn.prototype,"placeholder",void 0),t([st({type:Array,attribute:!1})],xn.prototype,"commands",void 0),t([lt()],xn.prototype,"parent",void 0),t([lt()],xn.prototype,"search",void 0),t([lt()],xn.prototype,"bump",void 0),t([lt()],xn.prototype,"selectedIndex",void 0),t([lt()],xn.prototype,"filteredCommands",void 0),t([Tt("commands")],xn.prototype,"handleCommandsChange",null),t([Tt("open")],xn.prototype,"handleBump",null),t([Tt("open","updated")],xn.prototype,"focusOnOpen",null),t([Tt("search"),Tt("parent"),Tt("commands")],xn.prototype,"filterCommands",null),xn=t([it("nord-command-menu")],xn);var wn=xn;var kn=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m14.0864 12.0402 1.8138 1.8137-4.7724 4.7724c-.2573.2573-.5789.373-.9133.373-.33447 0-.65606-.1286-.91333-.373l-4.77238-4.7724 1.81377-1.8137 3.85904 3.859 3.8591-3.859zm-3.859-7.93687 3.859 3.85907 1.8138-1.81376-4.7724-4.77238c-.5017-.50168-1.31208-.50168-1.81376 0l-4.77238 4.77238 1.81376 1.81376 3.85908-3.85907z" fill="currentColor"/></svg>',title:"interface-dropdown-small",tags:"nordicon small interface dropdown select arrow up down caret triangle chevron"});const _n=a`:host{--_n-select-block-size:var(--n-select-block-size, var(--n-space-xl))}.n-select-container{position:relative;inline-size:fit-content}:host([expand]){inline-size:100%}:host([expand]) .n-select-container{inline-size:100%}select{-webkit-appearance:none;appearance:none;position:absolute;font-size:var(--n-font-size-m);font-family:var(--n-font-family);color:var(--n-color-text);inline-size:100%;opacity:.0001;cursor:pointer;background:0 0;border:0;block-size:var(--_n-select-block-size);inset-block-end:0;inset-inline-start:0;z-index:var(--n-index-default)}option{color:initial}nord-button{--n-button-text-align:start}nord-icon{color:var(--n-color-icon)}.n-label-container:hover+.n-select-container nord-button,select:hover+nord-button{--_n-button-border-color:var(--n-button-border-color, var(--n-color-border-hover));--_n-button-background-color:var(--n-button-background-color, var(--n-color-button-hover))}.n-label-container:hover+.n-select-container nord-button nord-icon,select:hover+nord-button nord-icon{color:var(--n-color-icon-hover)}select:focus+nord-button{--n-button-border-color:var(--n-color-accent);--n-button-box-shadow:0 0 0 1px var(--n-button-border-color)}:host([disabled]){cursor:auto;pointer-events:none}:host([disabled]) nord-button{--n-input-border-color:var(--n-color-active);--_n-button-color:var(--n-color-text-weakest);--_n-button-background-color:var(--n-color-active);--_n-button-opacity:1}:host([disabled]) nord-icon{color:var(--n-color-text-weakest)}::slotted(:not([slot])){display:none}select[aria-invalid=true]+nord-button{--n-button-border-color:var(--n-color-status-danger)}`;Nt.registerIcon(kn);let zn=class extends(Ae($e(Se(le(se(ot)))))){constructor(){super(...arguments),this.defaultSlot=new ce(this),this.inputId="select",this.expand=!1}get formValue(){return this.value||void 0}render(){const t=this.options,e=this.getButtonText(t);return M`<slot></slot>${this.renderLabel()}<div class="n-select-container"><select ${ee(this.focusableRef)} id="${this.inputId}" ?disabled="${this.disabled}" ?required="${this.required}" name="${yt(this.name)}" @change="${this.handleChange}" @input="${this.handleInput}" aria-describedby="${yt(this.getDescribedBy())}" aria-invalid="${yt(this.getInvalid())}" autocomplete="${this.autocomplete}">${this.placeholder&&M`<option value="" disabled="disabled" ?selected="${!this.value}">${this.placeholder}</option>`} ${t.map((t=>this.renderOption(t)))}</select><nord-button size="${this.size}" tabindex="-1" ?disabled="${this.disabled}" ?expand="${this.expand}" aria-hidden="true" type="button"><slot slot="start" name="icon"></slot>${e}<nord-icon slot="end" name="interface-dropdown-small"></nord-icon></nord-button></div>${this.renderError()}`}get options(){return Array.from(this.querySelectorAll("option"))}getButtonText(t){const e=t.find((t=>t.value===this.value.toString()));return e?e.text:this.placeholder?this.placeholder:t[0]?t[0].text:""}renderOption(t){return M`<option value="${yt(t.value)}" ?disabled="${t.disabled}" .selected="${t.value===this.value.toString()}">${t.text}</option>`}};zn.styles=[At,Ee,_n],t([st({reflect:!0,type:Boolean})],zn.prototype,"expand",void 0),zn=t([it("nord-select")],zn);var $n=zn;const Cn=a`:host{--_n-stack-gap:var(--n-stack-gap, var(--n-space-m));display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;color:var(--n-color-text);gap:var(--_n-stack-gap);max-inline-size:100%;inline-size:100%}:host([direction=horizontal]){flex-direction:row}:host([wrap]){flex-wrap:wrap}@media (max-width:768px){:host([responsive]){flex-direction:column!important}}:host([align-items=center]){align-items:center}:host([align-items=start]){align-items:flex-start}:host([align-items=end]){align-items:flex-end}:host([justify-content=center]){justify-content:center}:host([justify-content=start]){justify-content:flex-start}:host([justify-content=end]){justify-content:flex-end}:host([justify-content=space-between]){justify-content:space-between}:host([justify-content=space-evenly]){justify-content:space-evenly}:host([justify-content=space-around]){justify-content:space-around}::slotted(*){margin:0!important;min-inline-size:0;max-inline-size:100%}:host([gap=none]){--_n-stack-gap:var(--n-stack-gap, 0)}:host([gap="s"]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-s))}:host([gap="m"]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-m))}:host([gap="l"]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-l))}:host([gap=xl]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-xl))}:host([gap=xxl]){--_n-stack-gap:var(--n-stack-gap, var(--n-space-xxl))}`;let Sn=class extends ot{constructor(){super(...arguments),this.gap="m",this.direction="vertical",this.alignItems="stretch",this.responsive=!1,this.wrap=!1}render(){return M`<slot></slot>`}};Sn.styles=[At,Cn],t([st({reflect:!0})],Sn.prototype,"gap",void 0),t([st({reflect:!0})],Sn.prototype,"direction",void 0),t([st({reflect:!0,attribute:"align-items"})],Sn.prototype,"alignItems",void 0),t([st({reflect:!0,type:Boolean})],Sn.prototype,"responsive",void 0),t([st({reflect:!0,type:Boolean})],Sn.prototype,"wrap",void 0),t([st({reflect:!0,attribute:"justify-content"})],Sn.prototype,"justifyContent",void 0),Sn=t([it("nord-stack")],Sn);var An=Sn;const En=a`nord-table{--_n-table-td-padding:var(--n-table-td-padding, calc(var(--n-space-m) * 0.8));--_n-table-border-radius:var(--n-table-border-radius, var(--n-border-radius));all:unset;color:var(--n-color-text);-webkit-user-select:inherit;user-select:inherit;display:block;max-inline-size:100%;overflow-x:auto}nord-table table{inline-size:100%;font-size:var(--n-font-size-m);font-family:var(--n-font-family);font-feature-settings:var(--n-font-features);line-height:var(--n-line-height-tight);text-align:start;border-spacing:0;border-collapse:separate;color:var(--n-color-text);font-variant-numeric:tabular-nums}nord-table th{border-block-end:1px solid var(--n-color-border);font-weight:var(--n-font-weight-active);font-size:var(--n-font-size-s);color:var(--n-color-text-weaker);text-align:start;background:var(--n-color-surface-raised)}nord-table td{border-block-end:1px solid var(--n-color-border);white-space:nowrap}nord-table :is(td, th){padding:var(--_n-table-td-padding) var(--n-space-s)}nord-table :is(td,th):first-child{padding-inline-start:var(--n-space-m)}nord-table :is(td,th):last-child{padding-inline-end:var(--n-space-m)}nord-table tbody tr:hover{background:var(--n-color-active)}nord-table tbody :is(.n-row-selected, .n-row-selected:hover){background:var(--n-color-active);color:var(--n-color-text);opacity:1;cursor:default}nord-table tbody :is(tr:hover,.n-row-selected) td{color:var(--n-color-text)}nord-table th[aria-sort]{cursor:pointer}nord-table th[aria-sort]:not([aria-sort=none]){color:var(--n-color-text)}nord-table[density=condensed]{--_n-table-td-padding:var(--n-table-td-padding, calc(var(--n-space-m) * 0.5))}nord-table[density=relaxed]{--_n-table-td-padding:var(--n-table-td-padding, calc(var(--n-space-m) * 1.1))}nord-card nord-table tbody tr:last-child td{border-block-end-color:transparent}nord-card nord-table th:first-child{border-start-start-radius:var(--_n-table-border-radius)}nord-card nord-table th:last-child{border-start-end-radius:var(--_n-table-border-radius)}nord-card [slot=header]~nord-table th:is(:first-child, :last-child){border-radius:0}nord-card nord-table tbody tr:last-child td:first-child{border-end-start-radius:var(--_n-table-border-radius)}nord-card nord-table tbody tr:last-child td:last-child{border-end-end-radius:var(--_n-table-border-radius)}nord-table[scroll-snap]{scroll-snap-type:inline mandatory;scroll-behavior:smooth}nord-table[scroll-snap] :is(th, td){scroll-snap-align:start}nord-table:where([striped]) tbody tr:where(:nth-child(even)){background:var(--n-color-surface-raised)}nord-table .n-table-ellipsis{max-inline-size:0;inline-size:90%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}nord-table .n-table-align-right{text-align:end}nord-table .n-table-actions{display:flex;justify-content:center}nord-table .n-table-actions nord-button{margin-block:-10px}`;let Dn=class extends ot{constructor(){super(...arguments),this.density="default",this.scrollSnap=!1,this.striped=!1}connectedCallback(){super.connectedCallback(),this.renderStyles()}renderStyles(){const t=this.getRootNode(),e=t.nodeType===Node.DOCUMENT_NODE?t.head:t;const n=this.localName;if(t.querySelector(`style[data-component=${n}]`))return;const o=document.createDocumentFragment();H(M`<style data-component="${n}">${En}</style>`,o),e.appendChild(o)}createRenderRoot(){return this}};t([st({reflect:!0})],Dn.prototype,"density",void 0),t([st({reflect:!0,type:Boolean,attribute:"scroll-snap"})],Dn.prototype,"scrollSnap",void 0),t([st({type:Boolean,reflect:!0})],Dn.prototype,"striped",void 0),Dn=t([it("nord-table")],Dn);var Tn=Dn;const On=a`:host{--_n-textarea-inline-size:var(--n-textarea-inline-size, 240px);--_n-textarea-block-size:var(--n-textarea-block-size, 76px);--_n-input-background:var(--n-textarea-background, var(--n-color-active));--_n-input-color:var(--n-textarea-color, var(--n-color-text));--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-border-strong));--_n-input-border-radius:var(--n-textarea-border-radius, var(--n-border-radius-s))}.n-input-container{position:relative;inline-size:var(--_n-textarea-inline-size)}.n-input{min-block-size:var(--_n-textarea-block-size);transition:border var(--n-transition-slowly),box-shadow var(--n-transition-slowly),background var(--n-transition-slowly);display:block;resize:vertical}:host([resize=auto]) .n-input{resize:none;overflow:hidden}:host([expand]){--_n-textarea-inline-size:100%}.n-character-counter{margin-block-start:calc(var(--n-space-s)/ 2);color:var(--n-color-text-weaker)}.n-input:hover,.n-label-container:hover+.n-input-container .n-input{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-border-hover))}.n-input:focus{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-accent));--_n-input-background:var(--n-textarea-background, var(--n-color-surface))}.n-input[aria-invalid=true]{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-status-danger))!important}.n-input:disabled,.n-input[readonly],.n-label-container:hover+.n-input-container .n-input:disabled,.n-label-container:hover+.n-input-container .n-input[readonly]{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-active));--_n-input-color:var(--n-textarea-color, var(--n-color-text-weakest))}.n-input[readonly],.n-label-container:hover+.n-input-container .n-input[readonly]{--_n-input-color:var(--n-textarea-color, var(--n-color-text-weak))}.n-input[readonly]:focus{--_n-input-border-color:var(--n-textarea-border-color, var(--n-color-accent))}`;let Ln=class extends(Ae($e(Se(Ce(le(se(ot))))))){constructor(){super(...arguments),this.inputId="textarea",this.localize=new yn(this,{onLangChange:()=>this.handleLangChange()}),this.resize="vertical",this.expand=!1,this.characterCounter=!1}render(){var t;return M`${this.renderLabel()}<div class="n-input-container"><textarea ${ee(this.focusableRef)} id="${this.inputId}" class="n-input" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" name="${yt(this.name)}" maxlength="${yt(this.maxLength)}" .value="${null!==(t=this.value)&&void 0!==t?t:""}" placeholder="${yt(this.placeholder)}" @change="${this.handleChange}" @input="${this.handleInput}" aria-describedby="${yt(this.getDescribedBy())}" aria-invalid="${yt(this.getInvalid())}" autocomplete="${this.autocomplete}"></textarea> ${this.characterCounter?this.renderCharacterCounter():B}</div>${this.renderError()}`}renderCharacterCounter(){const{value:t,maxLength:e}=this,n="string"==typeof t?this.lengthMeasurer(t):0,o=e?e-n:null,r=e?`${n}/${e}`:n;return M`<nord-visually-hidden aria-live="polite" aria-atomic="true">${null!=o&&o<=10?this.localize.term("remainingCharacters",o):""}</nord-visually-hidden><div class="n-character-counter">${r}</div>`}handleLangChange(){const t=this.localize.resolvedLang;this.lengthMeasurer=function(t){if(Intl.Segmenter){const e=new Intl.Segmenter(t);return t=>[...e.segment(t)].length}return t=>t.length}(t)}resizeToFitContent(){const t=this.focusableRef.value;t&&("auto"===this.resize?(t.style.height="auto",t.style.height=`${t.scrollHeight}px`):t.style.height="")}};Ln.styles=[At,Ee,De,On],t([st({reflect:!0})],Ln.prototype,"resize",void 0),t([st({reflect:!0,type:Boolean})],Ln.prototype,"expand",void 0),t([st({attribute:"maxlength",type:Number})],Ln.prototype,"maxLength",void 0),t([st({type:Boolean,attribute:"character-counter"})],Ln.prototype,"characterCounter",void 0),t([Tt("resize","updated"),Tt("value","updated")],Ln.prototype,"resizeToFitContent",null),Ln=t([it("nord-textarea")],Ln);var Nn=Ln;var Rn=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m6.92903.100342-2.12132 2.121318 7.77819 7.77818-7.77828 7.77826 2.12132 2.1213 8.48536-8.4853c.7811-.7811.7811-2.04743 0-2.82848z" fill="currentColor"/></svg>',title:"arrow-right-small",tags:"nordicon arrow right small caret pointing triangle chevron"});var Mn=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m13.0712.105225 2.1213 2.121315-7.77816 7.77816 7.77826 7.7783-2.1213 2.1213-8.48539-8.4854c-.78105-.781-.78105-2.04735 0-2.82839z" fill="currentColor"/></svg>',title:"arrow-left-small",tags:"nordicon arrow left small caret pointing triangle chevron"});var In=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m.100342 6.92903 2.121318-2.12132 7.77818 7.77819 7.77826-7.77828 2.1213 2.12132-8.4853 8.48536c-.7811.7811-2.04743.7811-2.82848 0z" fill="currentColor"/></svg>',title:"arrow-down-small",tags:"nordicon arrow down small caret pointing triangle chevron"});const Bn=t=>t.preventDefault();class Pn{constructor(t,e){this.hadFirstUpdate=!1,this.initialTouchX=0,this.initialTouchY=0,this.handleTouchStart=t=>{const[{pageX:e,pageY:n}]=t.changedTouches;this.initialTouchX=e,this.initialTouchY=n},this.handleTouchEnd=t=>{const[{pageX:e,pageY:n}]=t.changedTouches,{matchesGesture:o,onSwipeEnd:r}=this.options,i=e-this.initialTouchX,a=n-this.initialTouchY,s={initialX:this.initialTouchX,initialY:this.initialTouchY,pageX:e,pageY:n,distX:i,distY:a};o(s)&&(t.preventDefault(),r(s))},t.addController(this),this.events=new ne(t),this.options={target:()=>t,...e}}hostUpdated(){if(!this.hadFirstUpdate){this.hadFirstUpdate=!0;const t=this.options.target();this.events.listen(t,"touchstart",this.handleTouchStart),this.events.listen(t,"touchmove",Bn),this.events.listen(t,"touchend",this.handleTouchEnd)}}hostDisconnected(){this.hadFirstUpdate=!1}}const Hn=({distX:t,distY:e})=>Math.abs(t)>=70&&Math.abs(e)<=70,Fn=({distX:t,distY:e})=>Math.abs(e)>=70&&Math.abs(t)<=70&&e>0,qn=/^(\d{4})-(\d{2})-(\d{2})$/;function Un(t,e,n){const o=parseInt(n,10),r=parseInt(e,10),i=parseInt(t,10);if(Number.isInteger(i)&&Number.isInteger(r)&&Number.isInteger(o)&&r>0&&r<=12&&o>0&&o<=31&&i>0){const t=new Date(i,r-1,o);return t.setFullYear(i),t}}function jn(t){if(!t)return;const e=t.match(qn);return e?Un(e[1],e[2],e[3]):void 0}function Yn(t){if(!t)return"";const e=t.getDate().toString(10),n=(t.getMonth()+1).toString(10);return`${t.getFullYear().toString(10).padStart(4,"0")}-${n.padStart(2,"0")}-${e.padStart(2,"0")}`}function Wn(){const t=new Date;return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0))}function Vn(t,e){const n=[],o={weekday:e},r=Wn();for(let e=0;e<7;e++)n[r.getDay()]=r.toLocaleDateString(t,o),r.setDate(r.getDate()+1);return n}function Xn(t,e){const n=[],o={month:e},r=Wn();r.setDate(1);for(let e=0;e<12;e++)n[r.getMonth()]=r.toLocaleDateString(t,o),r.setMonth(r.getMonth()+1);return n}function Kn(t,e){return null!=t&&null!=e&&(t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth())}function Gn(t,e){return null!=t&&null!=e&&(Kn(t,e)&&t.getDate()===e.getDate())}function Qn(t,e){const n=new Date(t);return n.setDate(n.getDate()+e),n}function Zn(t,e=1){const n=new Date(t),o=n.getDay(),r=(o<e?7:0)+o-e;return n.setDate(n.getDate()-r),n}function Jn(t,e=1){const n=new Date(t),o=n.getDay(),r=6+(o<e?-7:0)-(o-e);return n.setDate(n.getDate()+r),n}function to(t){const e=new Date(t.getFullYear(),t.getMonth(),1);return e.setFullYear(t.getFullYear()),e}function eo(t){const e=new Date(t.getFullYear(),t.getMonth()+1,0);return e.setFullYear(t.getFullYear()),e}function no(t,e){const n=new Date(t);return n.setMonth(e),n}function oo(t,e){const n=new Date(t);return n.setFullYear(e),n}function ro(t,e,n){const o=t.getTime();return e&&e instanceof Date&&o<e.getTime()?e:n&&n instanceof Date&&o>n.getTime()?n:t}function io(t,e,n){return ro(t,e,n)===t}function ao(t,e=1){return function(t,e){const n=[];let o=t;for(;!Gn(o,e);)n.push(o),o=Qn(o,1);return n.push(o),n}(Zn(to(t),e),Jn(eo(t),e))}class so extends ye{constructor(t,e){super(t),this.date=e}}const lo=a`:host{--_n-calendar-box-shadow:var(--n-calendar-box-shadow, var(--n-box-shadow-popout));--_n-calendar-border-radius:var(--n-calendar-border-radius, var(--n-border-radius-s));--_n-calendar-highlight-color:var(--n-calendar-highlight-color, var(--n-color-accent));--_n-calendar-padding:var(--n-space-m) var(--n-space-m) calc(var(--n-space-m) * 1.25);--_n-calendar-inline-size:max-content;font-feature-settings:var(--n-font-features-reduced)}.n-calendar{-webkit-user-select:none;user-select:none;background:var(--n-color-surface);box-shadow:var(--_n-calendar-box-shadow);border-radius:var(--_n-calendar-border-radius);inline-size:var(--_n-calendar-inline-size);min-inline-size:min-content;padding:var(--_n-calendar-padding)}:host([expand]){--_n-calendar-inline-size:100%}.n-calendar-table{border-collapse:collapse;border-spacing:0;color:var(--n-color-text);font-size:var(--n-font-size-m);font-weight:var(--n-font-weight);text-align:center;inline-size:100%}.n-calendar-table-header{font-size:var(--n-font-size-s);font-weight:var(--n-font-weight-active);letter-spacing:1px;padding-block-end:var(--n-space-s);text-decoration:none;text-transform:uppercase}.n-calendar-cell{text-align:center;padding:1px}.n-calendar-day{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:0 0;border:0;border-radius:var(--n-border-radius-s);color:var(--n-color-text);cursor:pointer;display:inline-block;font-family:var(--n-font-family);font-size:var(--n-font-size-m);font-weight:var(--n-font-weight);font-variant-numeric:tabular-nums;block-size:var(--n-space-xl);inline-size:var(--n-space-xl);padding:0 0 1px;position:relative;text-align:center;vertical-align:middle}.n-calendar-day[aria-current=date]{box-shadow:0 0 0 1px var(--n-color-accent);color:var(--n-color-text-link);position:relative}.n-calendar-day:hover{background:var(--n-color-active)}.n-calendar-day:focus,.n-calendar-day[aria-pressed=true]{background:var(--n-color-accent);box-shadow:none;color:var(--n-color-text-on-accent);outline:0}.n-calendar-day:active{background:var(--n-color-accent);box-shadow:none!important;color:var(--n-color-text-on-accent)}.n-calendar-day:focus{box-shadow:0 0 5px var(--n-color-accent)}.n-calendar-day:not(.is-month){box-shadow:none}.n-calendar-day:not(.is-month),.n-calendar-day[aria-disabled=true]{background:0 0;color:var(--n-color-text-weakest);cursor:default}.n-calendar-day[aria-disabled=true]{color:var(--n-color-text-weaker);text-decoration:line-through}.n-calendar-day:not(.is-month)[aria-disabled=true]{color:var(--n-color-text-weakest);text-decoration:none}.n-calendar-day[aria-disabled=true][aria-current=date]{box-shadow:0 0 0 1px var(--n-color-accent);color:var(--n-color-text-link)}.n-calendar-day[aria-disabled=true][aria-current=date]:focus{box-shadow:0 0 5px var(--n-color-accent);background:var(--n-color-accent);color:var(--n-color-text-on-accent)}.n-calendar-day[aria-disabled=true]:not([aria-current=date])::before{display:none}.n-calendar-day.is-outside{background:0 0;box-shadow:none;color:var(--n-color-text-weakest);cursor:default;pointer-events:none}.n-calendar-day.is-outside::before{display:none}.n-calendar-day.is-highlighted::after{--_n-calendar-highlight-size:5px;content:"";position:absolute;inset-inline-start:calc(50% - (var(--_n-calendar-highlight-size)/ 2));inset-block-end:calc(var(--n-space-s)/ 2);block-size:var(--_n-calendar-highlight-size);inline-size:var(--_n-calendar-highlight-size);border-radius:var(--n-border-radius-circle);background-color:var(--_n-calendar-highlight-color)}.n-calendar-day.is-highlighted.is-month:is([aria-pressed=true],:focus):not([aria-disabled=true])::after{background-color:var(--n-color-text-on-accent)}.n-calendar-day.is-highlighted:is(:not(.is-month),.is-outside,[aria-disabled=true])::after{background-color:var(--n-color-text-weakest)}.n-calendar-header{align-items:start;display:flex;justify-content:space-between;margin-block-end:var(--n-space-m);inline-size:100%}.n-calendar-nav{white-space:nowrap}.n-calendar-nav nord-button{--_n-button-padding-inline:11px;margin-inline-start:calc(var(--n-space-s)/ 2)}.n-calendar-select{display:inline-flex;margin-block-start:calc(var(--n-space-s)/ 2);position:relative;line-height:var(--n-line-height)}.n-calendar-select span{margin-inline-end:var(--n-space-s)}.n-calendar-select select{cursor:pointer;font-size:var(--n-font-size-l);block-size:100%;inset-inline-start:0;opacity:0;position:absolute;inset-block-start:0;inline-size:100%}.n-calendar-select select:focus+.n-calendar-select-label{box-shadow:0 0 0 2px var(--n-color-accent)}.n-calendar-select-label{display:flex;align-items:center;border-radius:var(--n-border-radius-s);color:var(--n-color-text);font-size:var(--n-font-size-xl);font-weight:var(--n-font-weight-active);padding-block:0;padding-inline-start:var(--n-space-s);padding-inline-end:calc(var(--n-space-s)/ 2);pointer-events:none;position:relative;inline-size:100%}`;Nt.registerIcon(Rn),Nt.registerIcon(Mn),Nt.registerIcon(In);const co=t=>e=>{e.preventDefault(),t(e)},ho=()=>!1,uo=()=>!1;let po=class extends ot{constructor(){super(...arguments),this.direction=new Oe(this),this.swipe=new Pn(this,{matchesGesture:Hn,onSwipeEnd:({distX:t})=>this.addMonths(t<0?1:-1)}),this.shortcuts=Xe({ArrowRight:co((()=>this.addDays(this.direction.isLTR?1:-1))),ArrowLeft:co((()=>this.addDays(this.direction.isLTR?-1:1))),ArrowDown:co((()=>this.addDays(7))),ArrowUp:co((()=>this.addDays(-7))),Home:co((()=>this.startOfWeek())),End:co((()=>this.endOfWeek())),PageUp:co((()=>this.addMonths(-1))),PageDown:co((()=>this.addMonths(1))),"Shift+PageUp":co((()=>this.addYears(-1))),"Shift+PageDown":co((()=>this.addYears(1)))}),this.localize=new yn(this,{onLangChange:()=>this.handleLangChange()}),this.value="",this.firstDayOfWeek=1,this.min="",this.max="",this.expand=!1,this.isDateDisabled=ho,this.isDateHighlighted=uo,this.activeFocus=!1,this.focusedDay=new Date,this.handleDaySelect=t=>{const e=io(t,jn(this.min),jn(this.max)),n=!this.isDateDisabled(t);e&&n&&(this.value=Yn(t),this.dispatchEvent(new so("change",t)))},this.handleMonthSelect=t=>{this.setMonth(parseInt(t.target.value,10))},this.handleYearSelect=t=>{this.setYear(parseInt(t.target.value,10))},this.handleNextMonthClick=t=>{t.preventDefault(),this.addMonths(1)},this.handlePreviousMonthClick=t=>{t.preventDefault(),this.addMonths(-1)},this.enableActiveFocus=()=>{this.activeFocus=!0},this.disableActiveFocus=t=>{const e=t.currentTarget,n=t.relatedTarget;n&&!e.contains(n)&&(this.activeFocus=!1)}}focus(t){var e;const n=null!==(e=null==t?void 0:t.target)&&void 0!==e?e:"day";"day"===n?this.focusedDayNode.focus():"month"===n&&this.monthSelectNode.focus()}render(){const t=new Date,e=jn(this.value),n=this.focusedDay.getMonth(),o=this.focusedDay.getFullYear(),r=jn(this.min),i=jn(this.max),a=r?to(r):void 0,s=i?eo(i):void 0,l=(e||this.focusedDay).getFullYear(),d=r?r.getFullYear():l-10,c=i?i.getFullYear():l+10;return M`<div class="n-calendar"><div class="n-calendar-header"><div><nord-visually-hidden><h2 id="${"dialog-header"}" aria-live="polite" aria-atomic="true">${this.monthNames[n]}, ${this.focusedDay.getFullYear()}</h2></nord-visually-hidden><div class="n-calendar-select"><select aria-label="${this.localize.term("monthSelectLabel")}" class="n-calendar-select-month" @input="${this.handleMonthSelect}">${this.monthNames.map(((t,e)=>M`<option value="${e}" ?selected="${e===n}" ?disabled="${!io(new Date(o,e,1),a,s)}">${t}</option>`))}</select><div class="n-calendar-select-label" aria-hidden="true"><span>${this.monthNamesShort[n]}</span><nord-icon color="var(--n-color-icon)" name="arrow-down-small" size="xxs"></nord-icon></div></div><div class="n-calendar-select"><select aria-label="${this.localize.term("yearSelectLabel")}" class="n-calendar-select-year" @input="${this.handleYearSelect}">${Ie(function(t,e){const n=[];for(let o=t;o<=e;o++)n.push(o);return n}(d,c),(t=>t),(t=>M`<option ?selected="${t===o}">${t}</option>`))}</select><div class="n-calendar-select-label" aria-hidden="true"><span>${this.focusedDay.getFullYear()}</span><nord-icon color="var(--n-color-icon)" name="arrow-down-small" size="xxs"></nord-icon></div></div></div><div class="n-calendar-nav"><nord-button class="n-calendar-prev" @click="${this.handlePreviousMonthClick}" ?disabled="${Kn(r,this.focusedDay)}" type="button"><nord-visually-hidden>${this.localize.term("prevMonthLabel")}</nord-visually-hidden><nord-icon name="${this.direction.isLTR?"arrow-left-small":"arrow-right-small"}" size="s"></nord-icon></nord-button><nord-button class="n-calendar-next" @click="${this.handleNextMonthClick}" ?disabled="${Kn(i,this.focusedDay)}" type="button"><nord-visually-hidden>${this.localize.term("nextMonthLabel")}</nord-visually-hidden><nord-icon name="${this.direction.isLTR?"arrow-right-small":"arrow-left-small"}" size="s"></nord-icon></nord-button></div></div><table class="n-calendar-table" aria-labelledby="${"dialog-header"}" @focusin="${this.enableActiveFocus}" @focusout="${this.disableActiveFocus}"><thead><tr>${h=this.dayNames,u=this.firstDayOfWeek,p=(t,e)=>M`<th class="n-calendar-table-header" scope="col"><span aria-hidden="true">${this.dayNamesShort[e]}</span><nord-visually-hidden>${t}</nord-visually-hidden></th>`,h.map(((t,e)=>{const n=(e+u)%h.length;return p(h[n],n)}))}</tr></thead><tbody>${function(t,e){const n=[];for(let o=0;o<t.length;o+=e)n.push(t.slice(o,o+e));return n}(ao(this.focusedDay,this.firstDayOfWeek),7).map((n=>M`<tr class="n-calendar-row">${n.map((n=>{const o=!io(n,r,i),a=Gn(n,t),s=this.isDateDisabled(n),l=Gn(n,e),d=Kn(n,this.focusedDay),c=this.isDateHighlighted(n),h=this.dateFormatShort.format(n),u=c&&"string"==typeof c?`${h}, ${c}`:h;return M`<td class="n-calendar-cell"><button type="button" tabindex="${Gn(n,this.focusedDay)?0:-1}" class="${ge({"n-calendar-day":!0,"is-outside":o,"is-month":d,"is-highlighted":c})}" @click="${()=>this.handleDaySelect(n)}" @keydown="${this.shortcuts}" ?disabled="${o}" aria-disabled="${Ct(s,"true")}" aria-pressed="${l?"true":"false"}" aria-current="${Ct(a,"date")}" aria-label="${u}"><span aria-hidden="true">${n.getDate()}</span></button></td>`}))}</tr>`))}</tbody></table></div>`;var h,u,p}handleValueChange(){this.setFocusedDay(jn(this.value)||new Date)}handleFocusedDayChange(){this.activeFocus&&this.focusedDayNode.focus()}handleLangChange(){const t=this.localize.resolvedLang;this.dateFormatShort=new Intl.DateTimeFormat(t,{day:"numeric",month:"long"}),this.monthNames=Xn(t,"long"),this.monthNamesShort=Xn(t,"short"),this.dayNames=Vn(t,"long"),this.dayNamesShort=Vn(t,"narrow")}addDays(t){this.setFocusedDay(Qn(this.focusedDay,t))}addMonths(t){this.setMonth(this.focusedDay.getMonth()+t)}addYears(t){this.setYear(this.focusedDay.getFullYear()+t)}startOfWeek(){this.setFocusedDay(Zn(this.focusedDay,this.firstDayOfWeek))}endOfWeek(){this.setFocusedDay(Jn(this.focusedDay,this.firstDayOfWeek))}setMonth(t){const e=no(to(this.focusedDay),t),n=eo(e),o=no(this.focusedDay,t);this.setFocusedDay(ro(o,e,n))}setYear(t){const e=oo(to(this.focusedDay),t),n=eo(e),o=oo(this.focusedDay,t);this.setFocusedDay(ro(o,e,n))}setFocusedDay(t){this.focusedDay=ro(t,jn(this.min),jn(this.max)),this.dispatchEvent(new so("nord-focus-date",this.focusedDay))}};po.styles=[At,lo],t([dt(".n-calendar-select-month",!0)],po.prototype,"monthSelectNode",void 0),t([dt('button[tabindex="0"]')],po.prototype,"focusedDayNode",void 0),t([st()],po.prototype,"value",void 0),t([st({type:Number})],po.prototype,"firstDayOfWeek",void 0),t([st()],po.prototype,"min",void 0),t([st()],po.prototype,"max",void 0),t([st({reflect:!0,type:Boolean})],po.prototype,"expand",void 0),t([st({attribute:!1})],po.prototype,"isDateDisabled",void 0),t([st({attribute:!1})],po.prototype,"isDateHighlighted",void 0),t([lt()],po.prototype,"activeFocus",void 0),t([lt()],po.prototype,"focusedDay",void 0),t([Tt("value")],po.prototype,"handleValueChange",null),t([Tt("focusedDay","updated")],po.prototype,"handleFocusedDayChange",null),po=t([it("nord-calendar")],po);var vo=po;var bo=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m18 2h-2v-2h-2v2h-8v-2h-2v2h-2c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm-14 2v2h2v-2h8v2h2v-2h2v4h-16v-4zm-2 14v-8h16v8z" fill="currentColor"/></svg>',title:"interface-calendar",tags:"nordicon interface calendar date time day week month year"});var go=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m12.1087 10.005 7.8867 7.8866-2.1087 2.1085-7.8866-7.8867-7.89154 7.8916-2.10356422-2.1036 7.89153422-7.8915-7.89653-7.89664 2.1137-2.11326 7.8915 7.90132 7.8864-7.89650372 2.1085 2.10861372z" fill="currentColor"/></svg>',title:"interface-close-small",tags:"nordicon interface close remove small cross delete erase symbol"});function fo(t){return t.split("-")[0]}function mo(t){return t.split("-")[1]}function yo(t){return["top","bottom"].includes(fo(t))?"x":"y"}function xo(t){return"y"===t?"height":"width"}function wo(t,e,n){let{reference:o,floating:r}=t;const i=o.x+o.width/2-r.width/2,a=o.y+o.height/2-r.height/2,s=yo(e),l=xo(s),d=o[l]/2-r[l]/2,c="x"===s;let h;switch(fo(e)){case"top":h={x:i,y:o.y-r.height};break;case"bottom":h={x:i,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:a};break;case"left":h={x:o.x-r.width,y:a};break;default:h={x:o.x,y:o.y}}switch(mo(e)){case"start":h[s]-=d*(n&&c?-1:1);break;case"end":h[s]+=d*(n&&c?-1:1)}return h}function ko(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function _o(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:a,elements:s,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:c="viewport",elementContext:h="floating",altBoundary:u=!1,padding:p=0}=e,v=function(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}(p),b=s[u?"floating"===h?"reference":"floating":h],g=ko(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(b)))||n?b:b.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:d,rootBoundary:c,strategy:l})),f=ko(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===h?{...a.floating,x:o,y:r}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[h]);return{top:g.top-f.top+v.top,bottom:f.bottom-g.bottom+v.bottom,left:g.left-f.left+v.left,right:f.right-g.right+v.right}}const zo=Math.min,$o=Math.max;function Co(t,e,n){return $o(t,zo(e,n))}const So={left:"right",right:"left",bottom:"top",top:"bottom"};function Ao(t){return t.replace(/left|right|bottom|top/g,(t=>So[t]))}const Eo={start:"end",end:"start"};function Do(t){return t.replace(/start|end/g,(t=>Eo[t]))}const To=["top","right","bottom","left"];const Oo=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:a,platform:s,elements:l}=e,{mainAxis:d=!0,crossAxis:c=!0,fallbackPlacements:h,fallbackStrategy:u="bestFit",flipAlignment:p=!0,...v}=t,b=fo(o),g=h||(b===a||!p?[Ao(a)]:function(t){const e=Ao(t);return[Do(t),e,Do(e)]}(a)),f=[a,...g],m=await _o(e,v),y=[];let x=(null==(n=r.flip)?void 0:n.overflows)||[];if(d&&y.push(m[b]),c){const{main:t,cross:e}=function(t,e,n){void 0===n&&(n=!1);const o=mo(t),r=yo(t),i=xo(r);let a="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=Ao(a)),{main:a,cross:Ao(a)}}(o,i,await(null==s.isRTL?void 0:s.isRTL(l.floating)));y.push(m[t],m[e])}if(x=[...x,{placement:o,overflows:y}],!y.every((t=>t<=0))){var w,k;const t=(null!=(w=null==(k=r.flip)?void 0:k.index)?w:0)+1,e=f[t];if(e)return{data:{index:t,overflows:x},reset:{placement:e}};let n="bottom";switch(u){case"bestFit":{var _;const t=null==(_=x.map((t=>[t,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:_[0].placement;t&&(n=t);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}};function Lo(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function No(t){return To.some((e=>t[e]>=0))}const Ro=function(t){let{strategy:e="referenceHidden",...n}=void 0===t?{}:t;return{name:"hide",async fn(t){const{rects:o}=t;switch(e){case"referenceHidden":{const e=Lo(await _o(t,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:No(e)}}}case"escaped":{const e=Lo(await _o(t,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:e,escaped:No(e)}}}default:return{}}}}};const Mo=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:o}=e,r=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=fo(n),s=mo(n),l="x"===yo(n),d=["left","top"].includes(a)?-1:1,c=i&&l?-1:1,h="function"==typeof e?e(t):e;let{mainAxis:u,crossAxis:p,alignmentAxis:v}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return s&&"number"==typeof v&&(p="end"===s?-1*v:v),l?{x:p*c,y:u*d}:{x:u*d,y:p*c}}(e,t);return{x:n+r.x,y:o+r.y,data:r}}}};const Io=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...l}=t,d={x:n,y:o},c=await _o(e,l),h=yo(fo(r)),u="x"===h?"y":"x";let p=d[h],v=d[u];if(i){const t="y"===h?"bottom":"right";p=Co(p+c["y"===h?"top":"left"],p,p-c[t])}if(a){const t="y"===u?"bottom":"right";v=Co(v+c["y"===u?"top":"left"],v,v-c[t])}const b=s.fn({...e,[h]:p,[u]:v});return{...b,data:{x:b.x-n,y:b.y-o}}}}};function Bo(t){return t&&t.document&&t.location&&t.alert&&t.setInterval}function Po(t){if(null==t)return window;if(!Bo(t)){const e=t.ownerDocument;return e&&e.defaultView||window}return t}function Ho(t){return Po(t).getComputedStyle(t)}function Fo(t){return Bo(t)?"":t?(t.nodeName||"").toLowerCase():""}function qo(){const t=navigator.userAgentData;return null!=t&&t.brands?t.brands.map((t=>t.brand+"/"+t.version)).join(" "):navigator.userAgent}function Uo(t){return t instanceof Po(t).HTMLElement}function jo(t){return t instanceof Po(t).Element}function Yo(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof Po(t).ShadowRoot||t instanceof ShadowRoot}function Wo(t){const{overflow:e,overflowX:n,overflowY:o}=Ho(t);return/auto|scroll|overlay|hidden/.test(e+o+n)}function Vo(t){return["table","td","th"].includes(Fo(t))}function Xo(t){const e=/firefox/i.test(qo()),n=Ho(t);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter}function Ko(){return!/^((?!chrome|android).)*safari/i.test(qo())}const Go=Math.min,Qo=Math.max,Zo=Math.round;function Jo(t,e,n){var o,r,i,a;void 0===e&&(e=!1),void 0===n&&(n=!1);const s=t.getBoundingClientRect();let l=1,d=1;e&&Uo(t)&&(l=t.offsetWidth>0&&Zo(s.width)/t.offsetWidth||1,d=t.offsetHeight>0&&Zo(s.height)/t.offsetHeight||1);const c=jo(t)?Po(t):window,h=!Ko()&&n,u=(s.left+(h&&null!=(o=null==(r=c.visualViewport)?void 0:r.offsetLeft)?o:0))/l,p=(s.top+(h&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/d,v=s.width/l,b=s.height/d;return{width:v,height:b,top:p,right:u+v,bottom:p+b,left:u,x:u,y:p}}function tr(t){return(e=t,(e instanceof Po(e).Node?t.ownerDocument:t.document)||window.document).documentElement;var e}function er(t){return jo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nr(t){return Jo(tr(t)).left+er(t).scrollLeft}function or(t,e,n){const o=Uo(e),r=tr(e),i=Jo(t,o&&function(t){const e=Jo(t);return Zo(e.width)!==t.offsetWidth||Zo(e.height)!==t.offsetHeight}(e),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==Fo(e)||Wo(r))&&(a=er(e)),Uo(e)){const t=Jo(e,!0);s.x=t.x+e.clientLeft,s.y=t.y+e.clientTop}else r&&(s.x=nr(r));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function rr(t){return"html"===Fo(t)?t:t.assignedSlot||t.parentNode||(Yo(t)?t.host:null)||tr(t)}function ir(t){return Uo(t)&&"fixed"!==Ho(t).position?function(t){let{offsetParent:e}=t,n=t,o=!1;for(;n&&n!==e;){const{assignedSlot:t}=n;if(t){let r=t.offsetParent;if("contents"===Ho(t).display){const e=t.hasAttribute("style"),o=t.style.display;t.style.display=Ho(n).display,r=t.offsetParent,t.style.display=o,e||t.removeAttribute("style")}n=t,e!==r&&(e=r,o=!0)}else if(Yo(n)&&n.host&&o)break;n=Yo(n)&&n.host||n.parentNode}return e}(t):null}function ar(t){const e=Po(t);let n=ir(t);for(;n&&Vo(n)&&"static"===Ho(n).position;)n=ir(n);return n&&("html"===Fo(n)||"body"===Fo(n)&&"static"===Ho(n).position&&!Xo(n))?e:n||function(t){let e=rr(t);for(Yo(e)&&(e=e.host);Uo(e)&&!["html","body"].includes(Fo(e));){if(Xo(e))return e;{const t=e.parentNode;e=Yo(t)?t.host:t}}return null}(t)||e}function sr(t){if(Uo(t))return{width:t.offsetWidth,height:t.offsetHeight};const e=Jo(t);return{width:e.width,height:e.height}}function lr(t){const e=rr(t);return["html","body","#document"].includes(Fo(e))?t.ownerDocument.body:Uo(e)&&Wo(e)?e:lr(e)}function dr(t,e){var n;void 0===e&&(e=[]);const o=lr(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=Po(o),a=r?[i].concat(i.visualViewport||[],Wo(o)?o:[]):o,s=e.concat(a);return r?s:s.concat(dr(a))}function cr(t,e,n){return"viewport"===e?ko(function(t,e){const n=Po(t),o=tr(t),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,s=0,l=0;if(r){i=r.width,a=r.height;const t=Ko();(t||!t&&"fixed"===e)&&(s=r.offsetLeft,l=r.offsetTop)}return{width:i,height:a,x:s,y:l}}(t,n)):jo(e)?function(t,e){const n=Jo(t,!1,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft;return{top:o,left:r,x:r,y:o,right:r+t.clientWidth,bottom:o+t.clientHeight,width:t.clientWidth,height:t.clientHeight}}(e,n):ko(function(t){var e;const n=tr(t),o=er(t),r=null==(e=t.ownerDocument)?void 0:e.body,i=Qo(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=Qo(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0);let s=-o.scrollLeft+nr(t);const l=-o.scrollTop;return"rtl"===Ho(r||n).direction&&(s+=Qo(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}(tr(t)))}function hr(t){const e=dr(t),n=["absolute","fixed"].includes(Ho(t).position)&&Uo(t)?ar(t):t;return jo(n)?e.filter((t=>jo(t)&&function(t,e){const n=null==e.getRootNode?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&Yo(n)){let n=e;do{if(n&&t===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(t,n)&&"body"!==Fo(t))):[]}const ur={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i=[..."clippingAncestors"===n?hr(e):[].concat(n),o],a=i[0],s=i.reduce(((t,n)=>{const o=cr(e,n,r);return t.top=Qo(o.top,t.top),t.right=Go(o.right,t.right),t.bottom=Go(o.bottom,t.bottom),t.left=Qo(o.left,t.left),t}),cr(e,a,r));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=Uo(n),i=tr(n);if(n===i)return e;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==Fo(n)||Wo(i))&&(a=er(n)),Uo(n))){const t=Jo(n,!0);s.x=t.x+n.clientLeft,s.y=t.y+n.clientTop}return{...e,x:e.x-a.scrollLeft+s.x,y:e.y-a.scrollTop+s.y}},isElement:jo,getDimensions:sr,getOffsetParent:ar,getDocumentElement:tr,getElementRects:t=>{let{reference:e,floating:n,strategy:o}=t;return{reference:or(e,ar(n),o),floating:{...sr(n),x:0,y:0}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===Ho(t).direction};function pr(t,e,n,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=o,l=r&&!s,d=i&&!s,c=l||d?[...jo(t)?dr(t):[],...dr(e)]:[];c.forEach((t=>{l&&t.addEventListener("scroll",n,{passive:!0}),d&&t.addEventListener("resize",n)}));let h,u=null;if(a){let o=!0;u=new ResizeObserver((()=>{o||n(),o=!1})),jo(t)&&!s&&u.observe(t),u.observe(e)}let p=s?Jo(t):null;return s&&function e(){const o=Jo(t);!p||o.x===p.x&&o.y===p.y&&o.width===p.width&&o.height===p.height||n();p=o,h=requestAnimationFrame(e)}(),n(),()=>{var t;c.forEach((t=>{l&&t.removeEventListener("scroll",n),d&&t.removeEventListener("resize",n)})),null==(t=u)||t.disconnect(),u=null,s&&cancelAnimationFrame(h)}}const vr=(t,e,n)=>(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,s=await(null==a.isRTL?void 0:a.isRTL(e));let l=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:c}=wo(l,o,s),h=o,u={},p=0;for(let n=0;n<i.length;n++){const{name:v,fn:b}=i[n],{x:g,y:f,data:m,reset:y}=await b({x:d,y:c,initialPlacement:o,placement:h,strategy:r,middlewareData:u,rects:l,platform:a,elements:{reference:t,floating:e}});d=null!=g?g:d,c=null!=f?f:c,u={...u,[v]:{...u[v],...m}},y&&p<=50&&(p++,"object"==typeof y&&(y.placement&&(h=y.placement),y.rects&&(l=!0===y.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):y.rects),({x:d,y:c}=wo(l,h,s))),n=-1)}return{x:d,y:c,placement:h,strategy:r,middlewareData:u}})(t,e,{platform:ur,...n});class br{constructor(t){t.addController(this)}hostDisconnected(){this.unlockScroll()}lockScroll(){if(0===br.locks.size){const t=document.documentElement.clientWidth,e=Math.abs(window.innerWidth-t),n=getComputedStyle(document.body),o=parseInt(n.paddingRight,10)||0;br.setStyle("--n-scrollbar-gutter",`${e+o}px`),br.setStyle("overflow","hidden"),br.setStyle("padding-right","var(--n-scrollbar-gutter)")}br.locks.add(this)}unlockScroll(){br.locks.delete(this),0===br.locks.size&&(br.resets.forEach((t=>t())),br.resets=[])}static setStyle(t,e){const{style:n}=document.body,o=n.getPropertyValue(t);n.setProperty(t,e),br.resets.push((()=>n.setProperty(t,o)))}}function gr(e){class n extends e{constructor(){super(...arguments),this.open=!1,this.align="start",this.position="block-end"}}return t([st({type:Boolean,reflect:!0})],n.prototype,"open",void 0),t([st({reflect:!0})],n.prototype,"align",void 0),t([st({reflect:!0})],n.prototype,"position",void 0),n}br.locks=new Set,br.resets=[];const fr=a`:host{position:fixed;pointer-events:none;z-index:var(--n-index-popout);left:var(--_n-popout-position-x);top:var(--_n-popout-position-y);color:var(--n-color-text);opacity:0;transition:opacity var(--n-transition-slowly)}.n-popout{pointer-events:none;transform:translateY(-10px) scale(.97);visibility:hidden;transition:transform var(--n-transition-slowly),visibility var(--n-transition-slowly);transform-origin:top left;will-change:transform,opacity,visibility;background:var(--n-color-surface);box-shadow:var(--n-box-shadow-popout);border-radius:var(--n-border-radius-s)}:host([open]){opacity:1}:host([open]) .n-popout{transition-property:transform;visibility:visible;pointer-events:auto;transform:translateY(0) translateX(0) scale(1)}@media (max-width:35.9375em){:host{position:fixed;inset:0;overflow-y:auto;opacity:1;background:0 0;transition:background var(--n-transition-mobile)}:host([open]){pointer-events:auto;background:var(--n-color-overlay)}:host .n-popout{position:fixed;inset:0;inset-block-start:auto;transform:translateY(100%);transition:transform var(--n-transition-mobile),visibility var(--n-transition-mobile);transform-origin:bottom center;border-radius:0}}.top-end,.top-start{transform:translateY(10px) scale(.97)}.left-end,.left-start{transform:translateX(10px) scale(.97)}.right-end,.right-start{transform:translateX(-10px) scale(.97)}.bottom-start.is-rtl,.left-end,.top-end{transform-origin:bottom right}.bottom-end,.left-start,.top-start.is-rtl{transform-origin:top right}.bottom-end.is-rtl,.right-end,.right-start{transform-origin:bottom left}.right-start,.top-end.is-rtl{transform-origin:top left}`,mr={"inline-start-start":"left-start","inline-start-end":"left-end","inline-end-start":"right-start","inline-end-end":"right-end","block-start-start":"top-start","block-start-end":"top-end","block-end-start":"bottom-start","block-end-end":"bottom-end"},yr={"inline-start-start":"right-start","inline-start-end":"right-end","inline-end-start":"left-start","inline-end-end":"left-end","block-start-start":"top-start","block-start-end":"top-end","block-end-start":"bottom-start","block-end-end":"bottom-end"},xr={"block-end":"bottom","block-start":"top","inline-start":"left","inline-end":"right"};function wr(t,e,n){if(null!=e&&null!=n){const o=`${t}-${e}`;return"ltr"===n?mr[o]:yr[o]}return xr[t]}const kr=matchMedia("(max-width: 35.9375em)");let _r=class extends(gr(ot)){constructor(){super(...arguments),this.scrollBar=new br(this),this.dismiss=new Ze(this,{isOpen:()=>this.open,onDismiss:t=>this.hide("click"!==t.type),isDismissible:t=>t!==this.popout&&t!==this.targetElement}),this.events=new ne(this),this.direction=new Oe(this),this.smallViewport=kr.matches,this.id="",this.enableScroll=()=>{this.open||this.scrollBar.unlockScroll()},this.updatePosition=async()=>{var t;const{x:e,y:n,placement:o,middlewareData:r}=await vr(this.anchorElement,this,{strategy:"fixed",placement:wr(this.position,this.align,this.direction.dir),middleware:[Mo(8),Oo(),Io({padding:8}),Ro()]});this.computedPosition=o,this.style.setProperty("--_n-popout-position-x",`${e}px`),this.style.setProperty("--_n-popout-position-y",`${n}px`),(null===(t=r.hide)||void 0===t?void 0:t.referenceHidden)&&this.hide()},this.toggleOpen=t=>{t.preventDefault(),this.open?this.hide(!1):this.smallViewport?this.show():this.updatePosition().then((()=>this.show()))},this.handleMediaQueryChange=()=>{var t;this.smallViewport=kr.matches,null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this),!this.smallViewport&&this.open?(this.cleanupAutoUpdate=pr(this.anchorElement,this,this.updatePosition),this.scrollBar.unlockScroll()):this.open&&this.scrollBar.lockScroll()}}async show(){return this.open?Promise.resolve():(this.open=!0,await this.updateComplete,this.dispatchEvent(new ye("open")),we(this.popout))}async hide(t=!0){var e;return this.open?(this.open=!1,null===(e=this.cleanupAutoUpdate)||void 0===e||e.call(this),this.dispatchEvent(new ye("close")),t&&this.targetElement.focus({preventScroll:!0}),we(this.popout)):Promise.resolve()}firstUpdated(){this.smallViewport||this.updatePosition()}connectedCallback(){super.connectedCallback(),this.targetElement=this.getToggle(),this.anchorElement=this.getAnchor(),this.events.listen(this.targetElement,"click",this.toggleOpen),this.events.listen(kr,"change",this.handleMediaQueryChange)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this),this.targetElement.removeAttribute("aria-expanded")}render(){return M`<div class="n-popout ${this.computedPosition} is-${this.direction.dir}" aria-hidden="${this.open?"false":"true"}" @transitionend="${this.enableScroll}"><slot></slot></div>`}handleIdChange(){this.id||console.warn("NORD: popout requires an id attribute and value")}handleOpenChange(){var t;this.targetElement.setAttribute("aria-expanded",`${this.open}`),this.open?this.smallViewport?this.scrollBar.lockScroll():this.cleanupAutoUpdate=pr(this.anchorElement,this,this.updatePosition):null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this)}handleAnchorChange(){var t;null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this),this.anchorElement=this.getAnchor(),this.open&&!this.smallViewport&&(this.cleanupAutoUpdate=pr(this.anchorElement,this,this.updatePosition))}getToggle(){const t=this.getRootNode().querySelector(`[aria-controls='${this.id}']`);return t instanceof HTMLSlotElement?t.assignedElements()[0]:t}getAnchor(){if(!this.anchor)return this.targetElement;const t=this.getRootNode().querySelector(`#${this.anchor}`);return t instanceof HTMLSlotElement?t.assignedElements()[0]:t}};_r.styles=[At,fr],t([dt(".n-popout",!0)],_r.prototype,"popout",void 0),t([lt()],_r.prototype,"computedPosition",void 0),t([lt()],_r.prototype,"smallViewport",void 0),t([st({reflect:!0})],_r.prototype,"id",void 0),t([st({reflect:!0})],_r.prototype,"anchor",void 0),t([Tt("id")],_r.prototype,"handleIdChange",null),t([Tt("open")],_r.prototype,"handleOpenChange",null),t([Tt("anchor")],_r.prototype,"handleAnchorChange",null),_r=t([it("nord-popout")],_r);var zr=_r;const $r=a`:host{color:var(--n-color-text);position:relative}:host(:not([expand])) .n-date-picker-input{max-inline-size:max-content}.n-date-picker-calendar{--n-calendar-box-shadow:none}@media (max-width:35.9375em){.n-date-picker-header{padding:calc(var(--n-space-s) * 1.5) var(--n-space-m);border-block-end:1px solid var(--n-color-border)}.n-date-picker-calendar{--_n-calendar-padding:var(--n-space-l)}}.n-date-picker-close-button{--n-button-border-radius:var(--n-border-radius-circle);--_n-button-padding-inline:calc(var(--n-space-s) / 1.3);--_n-button-padding-block:0;opacity:0;position:absolute;inset-block-start:calc(var(--n-space-s) * -1);inset-inline-end:calc(var(--n-space-s) * -1)}.n-date-picker-close-button:focus{opacity:1}.n-date-picker-heading{display:none;font-weight:var(--n-font-weight-active)}@media (max-width:35.9375em){.n-date-picker-close-button{opacity:1;position:relative;inset:auto}.n-date-picker-heading{display:initial}}`,Cr={parse:jn,format:Yn};Nt.registerIcon(bo),Nt.registerIcon(go);const Sr=()=>!1,Ar=()=>!1;let Er=class extends(Ae($e(Ce(le(se(ot)))))){constructor(){super(...arguments),this.swipe=new Pn(this,{target:()=>this.popout,matchesGesture:Fn,onSwipeEnd:()=>this.hide()}),this.localize=new yn(this,{onLangChange:()=>this.createDateFormatters()}),this.value="",this.open=!1,this.min="",this.max="",this.direction="right",this.firstDayOfWeek=1,this.dateAdapter=Cr,this.isDateDisabled=Sr,this.isDateHighlighted=Ar,this.expand=!1,this.handleDaySelect=t=>{t.stopPropagation(),this.setValue(t.date),this.hide()},this.handleBlur=t=>{t.stopPropagation(),this.dispatchEvent(new ye("blur"))},this.handleFocus=t=>{t.stopPropagation(),this.dispatchEvent(new ye("focus"))},this.handleInputChange=t=>{const e=t.target,n=this.dateAdapter.parse(e.value,Un);(n||""===e.value)&&this.setValue(n)}}get valueAsDate(){return jn(this.value)}set valueAsDate(t){this.value=t?Yn(t):""}get valueAsNumber(){var t,e;return null!==(e=null===(t=this.valueAsDate)||void 0===t?void 0:t.getTime())&&void 0!==e?e:NaN}set valueAsNumber(t){this.value=t?Yn(new Date(t)):""}render(){const{valueAsDate:t}=this,e=t?this.dateAdapter.format(t):"";return M`<nord-input class="n-date-picker-input" value="${e}" label="${yt(this.label)}" hint="${yt(this.hint)}" error="${yt(this.error)}" placeholder="${yt(this.placeholder)}" id="${this.inputId}" size="${this.size}" ?expand="${this.expand}" ?disabled="${this.disabled}" ?required="${this.required}" ?readonly="${this.readonly}" ?hide-label="${this.hideLabel}" disallow-pattern="[^0-9./-]" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @input="${this.handleInputChange}" ${ee(this.focusableRef)} aria-invalid="${Ct(this.error,"true")}" aria-describedby="${yt(this.getDescribedBy())}">${this.hintSlot.isEmpty?B:M`<slot name="hint" slot="hint"></slot>`} ${this.labelSlot.isEmpty?B:M`<slot name="label" slot="label"></slot>`}<nord-button size="${this.size}" ?disabled="${this.disabled||this.readonly}" slot="end" class="n-date-picker-toggle" aria-controls="popout" type="button"><nord-icon name="interface-calendar"></nord-icon><nord-visually-hidden>${this.localize.term("buttonLabel")} ${t?M`<span>, ${this.localize.term("selectedDateMessage")} ${this.dateFormatLong.format(t)}</span>`:B}</nord-visually-hidden></nord-button></nord-input><nord-popout id="popout" anchor="${this.inputId}" align="end" position="block-end" role="dialog" aria-modal="true" ?open="${this.open}" @open="${this.handleOpen}" @close="${this.handleClose}" aria-labelledby="header"><div aria-hidden="true" tabindex="0" @focus="${this.focusLast}"></div><nord-stack class="n-date-picker-header" direction="horizontal" justify-content="space-between"><div class="n-date-picker-heading" id="header">${this.localize.term("modalHeading")}</div><nord-button class="n-date-picker-close-button" type="button" size="s" variant="plain" @click="${this.handleClose}"><nord-visually-hidden>${this.localize.term("closeLabel")}</nord-visually-hidden><nord-icon name="interface-close-small"></nord-icon></nord-button></nord-stack><nord-calendar class="n-date-picker-calendar" expand value="${this.value}" min="${this.min}" max="${this.max}" .firstDayOfWeek="${this.firstDayOfWeek}" .isDateDisabled="${this.isDateDisabled}" .isDateHighlighted="${this.isDateHighlighted}" @change="${this.handleDaySelect}"></nord-calendar><div aria-hidden="true" tabindex="0" @focus="${this.focusFirst}"></div></nord-popout>`}createDateFormatters(){this.dateFormatLong=new Intl.DateTimeFormat(this.localize.resolvedLang,{day:"numeric",month:"long",year:"numeric"})}focusFirst(){this.closeButton.focus()}focusLast(){this.calendar.focus({target:"day"})}handleOpen(){this.open=!0,this.calendar.focus({target:"month"})}handleClose(){this.open=!1}setValue(t){this.value=t?Yn(t):"",this.dispatchEvent(new ye("change"))}hide(t){this.popout.hide(t)}show(){this.popout.show()}};Er.styles=[At,Ee,De,$r],t([dt(".n-date-picker-toggle",!0)],Er.prototype,"toggleButton",void 0),t([dt(".n-date-picker-close-button",!0)],Er.prototype,"closeButton",void 0),t([dt("nord-calendar",!0)],Er.prototype,"calendar",void 0),t([dt('[role="dialog"]',!0)],Er.prototype,"popout",void 0),t([st()],Er.prototype,"value",void 0),t([st({type:Boolean,reflect:!0})],Er.prototype,"open",void 0),t([st()],Er.prototype,"min",void 0),t([st()],Er.prototype,"max",void 0),t([st()],Er.prototype,"direction",void 0),t([st({attribute:"first-day-of-week",type:Number})],Er.prototype,"firstDayOfWeek",void 0),t([st({attribute:!1})],Er.prototype,"dateAdapter",void 0),t([st({attribute:!1})],Er.prototype,"isDateDisabled",void 0),t([st({attribute:!1})],Er.prototype,"isDateHighlighted",void 0),t([st({reflect:!0,type:Boolean})],Er.prototype,"expand",void 0),Er=t([it("nord-date-picker")],Er);var Dr=Er;var Tr=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m18.9985 5.35769-9.8419 10.83221c-.27855.3095-.68088.4952-1.11417.5107h-.03095c-.41782 0-.80469-.1548-1.0987-.4488l-5.91132-5.9113 2.18193-2.1819 4.76619 4.7662 8.75862-9.62524 2.2903 2.08908z" fill="currentColor"/></svg>',title:"interface-checked-small",tags:"nordicon interface checked small symbol checkmark done ready"});var Or=Object.freeze({__proto__:null,default:'<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="m20 8.49976v3.00004h-20v-3.00004z" fill="currentColor"/></svg>',title:"interface-remove-small",tags:"nordicon interface remove small delete erase minimize line"});const Lr=a`:host{--_n-checkbox-size:calc(var(--n-space-m) * 1.25);--_n-checkbox-accent-color:var(--n-color-accent);--_n-checkbox-border-color:var(--n-color-border-hover);--_n-checkbox-icon-size:var(--n-size-icon-s);display:inline-block}.n-flex{display:flex}.n-expand{flex:1}.n-input-container{position:relative}input{-moz-appearance:none;-webkit-appearance:none;appearance:none;border:1px solid var(--_n-checkbox-border-color);border-radius:var(--n-border-radius-s);display:block;inline-size:var(--_n-checkbox-size);block-size:var(--_n-checkbox-size);cursor:pointer}input:checked,input:indeterminate{--_n-checkbox-border-color:var(--n-color-accent);background:var(--_n-checkbox-accent-color)}input[aria-invalid]{--_n-checkbox-accent-color:var(--n-color-status-danger);--_n-checkbox-border-color:var(--_n-checkbox-accent-color)}input:focus-visible{outline:0!important}input:focus{outline:0!important;box-shadow:0 0 0 1px var(--n-color-surface),0 0 0 3px var(--n-color-accent)}input:active{opacity:.8}:host([disabled]) label{color:var(--n-color-text-weaker);cursor:default}:host([disabled]) input{--_n-checkbox-accent-color:var(--n-color-border-strong);--_n-checkbox-border-color:var(--_n-checkbox-accent-color);background:var(--_n-checkbox-accent-color);cursor:default;opacity:1}nord-icon{--_n-icon-size:var(--_n-checkbox-icon-size);display:none;position:absolute;color:var(--n-color-text-on-accent);inset:calc(var(--n-space-s)/ 2);z-index:var(--n-index-default);pointer-events:none}input:checked~.icon-checked,input:indeterminate~.icon-indeterminate{display:block}.n-label-container{margin-block-end:0}label{-webkit-user-select:none;user-select:none;font-weight:var(--n-font-weight)!important;line-height:var(--n-line-height-form);padding-inline-start:var(--n-space-s);cursor:pointer}.n-hint{padding-inline-start:var(--n-space-s)}.n-error{margin-block-start:calc(var(--n-space-s)/ 2);padding-inline-start:var(--n-space-s)}:host([size="s"]){--_n-checkbox-size:var(--n-space-m);--_n-checkbox-icon-size:var(--n-size-icon-xs)}:host([size="s"]) nord-icon{inset:calc(var(--n-space-s)/ 2.6)}:host([size="s"]:not([hide-label])) .n-input-container{margin:calc(var(--n-space-s)/ 2.6) 0}:host([size="l"]){--_n-checkbox-size:var(--n-space-l);--_n-checkbox-icon-size:var(--n-size-icon-m)}`;Nt.registerIcon(Tr),Nt.registerIcon(Or);let Nr=class extends(Ae($e(le(se(ot))))){constructor(){super(...arguments),this.indeterminate=!1,this.checked=!1}get formValue(){return this.checked?this.value||"on":void 0}render(){return M`<div class="n-flex"><div class="n-input-container"><input ${ee(this.focusableRef)} class="n-input" id="${this.inputId}" type="checkbox" name="${yt(this.name)}" .value="${this.value}" .checked="${this.checked}" .indeterminate="${this.indeterminate}" ?disabled="${this.disabled}" ?required="${this.required}" aria-describedby="${yt(this.getDescribedBy())}" aria-invalid="${yt(this.getInvalid())}" @change="${this.handleChange}"><nord-icon class="icon-checked" name="interface-checked-small"></nord-icon><nord-icon class="icon-indeterminate" name="interface-remove-small"></nord-icon></div><div class="n-expand">${this.renderLabel()} ${this.renderError()}</div></div>`}handleChange(t){const e=t.target;this.checked=e.checked,super.handleChange(t)}};Nr.styles=[At,Ee,Lr],t([st({type:Boolean})],Nr.prototype,"indeterminate",void 0),t([st({type:Boolean})],Nr.prototype,"checked",void 0),Nr=t([it("nord-checkbox")],Nr);var Rr=Nr;function Mr(t,e){const n=t.getAttribute(e);return n?n.split(/\s+/):[]}function Ir(t,e,n){t.setAttribute(e,n.join(" "))}const Br=a`:host{--_n-tooltip-max-size:var(--n-tooltip-max-size, 50ch);--_n-tooltip-background:rgba(20, 20, 20, 0.95);--_n-tooltip-color:#fff;--_n-tooltip-key-border:rgba(255, 255, 255, 0.03);--_n-tooltip-key-background:rgba(255, 255, 255, 0.1);position:fixed;pointer-events:none;visibility:hidden;opacity:0;transition:opacity var(--n-transition-slowly),visibility var(--n-transition-slowly);transition-timing-function:ease;z-index:var(--n-index-popout)}.n-tooltip{gap:var(--n-space-s);font-family:var(--n-font-family);font-size:var(--n-font-size-xs);line-height:var(--n-line-height);color:var(--_n-tooltip-color);padding:calc(var(--n-space-s)/ 1.5) var(--n-space-s);background-color:var(--_n-tooltip-background);border-radius:var(--n-border-radius-s);word-break:break-word;max-inline-size:var(--_n-tooltip-max-size)}.n-tooltip,.n-tooltip-shortcut{display:flex;align-items:center}.n-tooltip-shortcut{gap:2px}::slotted([slot=shortcut]){box-sizing:border-box;margin:0;inline-size:var(--n-size-icon-m);block-size:var(--n-size-icon-m);border-radius:var(--n-border-radius-s);border:1px solid var(--_n-tooltip-key-border)!important;padding:1px!important;text-align:center;font-size:var(--n-font-size-xs);line-height:var(--n-line-height-tight);letter-spacing:-.5px;vertical-align:middle!important;background-color:var(--_n-tooltip-key-background)}[slot=shortcut]::slotted(nord-icon:not([size])){--_n-icon-size:var(--n-size-icon-s)}`;function Pr(t){return{transition:(e,n)=>t[e][n]||e}}var Hr;function Fr(t,e){return Boolean(e.id)&&t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("aria-describedby")===e.id}function qr(t){var e;const n=null===(e=null==t?void 0:t.focusableRef)||void 0===e?void 0:e.value;return n&&"focusableRef"in n?qr(n):n}const{transition:Ur}=Pr({hidden:{show:"waiting"},visible:{hide:"hidden",reposition:"positioning",show:"positioning"},waiting:{timeout:"positioning",hide:"hidden"},positioning:{positioned:"visible",hide:"hidden"}});let jr=Hr=class extends ot{constructor(){super(...arguments),this.shortcutSlot=new ce(this,"shortcut"),this.events=new ne(this),this.proxy=document.createElement("span"),this.state="hidden",this.coords=[0,0],this.position="block-start",this.role="tooltip",this.id="",this.delay=500,this.updatePosition=t=>vr(t,this,{strategy:"fixed",placement:wr(this.position),middleware:[Mo(8),Oo(),Io({padding:8})]}).then((({x:t,y:e})=>{this.coords=[t,e],this.state=Ur(this.state,"positioned")})),this.hideTooltip=()=>{this.state=Ur(this.state,"hide")},this.reposition=()=>{this.state=Ur(this.state,"reposition")},this.handleShow=t=>{const e=t.target;Fr(e,this)&&(this.currentElement=e,this.state=Ur(this.state,"show"))},this.handleHide=t=>{t.target===this.currentElement&&this.hideTooltip()},this.hideOnEscape=t=>{"Escape"===t.key&&this.hideTooltip()},this.addDescribedBy=()=>{const t=qr(this.currentElement);t&&(this.proxy.hidden=!0,this.proxy.id=this.id,this.proxy.textContent=this.textContent,t.insertAdjacentElement("afterend",this.proxy),function(t,e,n){const o=Mr(t,e);o.includes(n)||Ir(t,e,o.concat(n))}(t,"aria-describedby",this.id))},this.removeDescribedBy=()=>{const t=qr(this.currentElement);t&&(this.proxy.remove(),function(t,e,n){const o=Mr(t,e);o.includes(n)&&Ir(t,e,o.filter((t=>t!==n)))}(t,"aria-describedby",this.id))}}connectedCallback(){super.connectedCallback();const t=this.getRootNode();this.events.listen(t,"keydown",this.hideOnEscape),this.events.listen(t,"mouseover",this.handleShow),this.events.listen(t,"focusin",this.handleShow),this.events.listen(t,"mouseout",this.handleHide),this.events.listen(t,"focusout",this.handleHide),this.events.listen(t,"click",this.handleHide,{capture:!0}),this.events.listen(window,"resize",this.reposition,{passive:!0}),this.events.listen(window,"scroll",this.reposition,{passive:!0})}render(){return M`<div class="n-tooltip"><slot></slot><div class="n-tooltip-shortcut" ?hidden="${this.shortcutSlot.isEmpty}"><slot class="n-tooltip-key" name="shortcut"></slot></div></div>`}handleIdChange(){this.id||console.warn("NORD: The tooltip requires an id attribute and value")}handleStateChange(t){var e;switch(this.state){case"hidden":"waiting"===t&&this.timeoutId&&clearTimeout(this.timeoutId),this.removeDescribedBy(),this.currentElement=void 0,this.style.visibility="hidden",this.style.opacity="0";break;case"visible":{this.timeoutId=void 0,Hr.lastOpened=this,this.addDescribedBy();const[t,e]=this.coords;this.style.left=`${t}px`,this.style.top=`${e}px`,this.style.visibility="visible",this.style.opacity="1";break}case"waiting":this.timeoutId=setTimeout((()=>{this.state=Ur(this.state,"timeout")}),this.delay);break;case"positioning":Hr.lastOpened!==this&&(null===(e=Hr.lastOpened)||void 0===e||e.hideTooltip()),this.currentElement&&this.updatePosition(this.currentElement)}}};jr.styles=[At,Br],t([lt()],jr.prototype,"state",void 0),t([st({reflect:!0})],jr.prototype,"position",void 0),t([st({reflect:!0})],jr.prototype,"role",void 0),t([st({reflect:!0})],jr.prototype,"id",void 0),t([st({reflect:!0,type:Number})],jr.prototype,"delay",void 0),t([Tt("id")],jr.prototype,"handleIdChange",null),t([Tt("state")],jr.prototype,"handleStateChange",null),jr=Hr=t([it("nord-tooltip")],jr);var Yr=jr;const Wr=a`fieldset{border:none}.n-label-container{margin-block-end:calc(var(--n-space-s) * 2)}`;let Vr=class extends ot{constructor(){super(...arguments),this.errorSlot=new ce(this,"error"),this.hintSlot=new ce(this,"hint"),this.label="",this.required=!1,this.hideRequired=!1}render(){const{hasError:t}=this;return M`<fieldset aria-invalid="${Ct(t,"true")}" aria-describedby="${Ct(t,"error")}" ?aria-required="${this.required}"><legend class="n-label-container"><div class="n-label"><slot name="label">${this.label}</slot><span aria-hidden="true" class="n-required" ?hidden="${!this.required||this.hideRequired}">*</span></div><div class="n-caption n-hint" ?hidden="${!this.hasHint}"><slot name="hint">${this.hint}</slot></div></legend><slot></slot><div class="n-caption n-error" id="error" role="alert" ?hidden="${!this.hasError}"><slot name="error">${this.error}</slot></div></fieldset>`}get hasHint(){return Boolean(this.hint)||this.hintSlot.hasContent}get hasError(){return Boolean(this.error)||this.errorSlot.hasContent}};Vr.styles=[At,Ee,Wr],t([st()],Vr.prototype,"label",void 0),t([st()],Vr.prototype,"hint",void 0),t([st()],Vr.prototype,"error",void 0),t([st({type:Boolean})],Vr.prototype,"required",void 0),t([st({type:Boolean,attribute:"hide-required"})],Vr.prototype,"hideRequired",void 0),Vr=t([it("nord-fieldset")],Vr);var Xr=Vr;class Kr extends ce{constructor(t,e){super(t,e.slotName),this.options=e,this.onChange=()=>{this.syncLightDom()},this.renderHook=document.createComment(this.slotName),this.lightDom=new oe(t,{render:()=>this.hasContent?B:this.options.render(),renderOptions:{renderBefore:this.renderHook}})}hostConnected(){super.hostConnected(),this.host.appendChild(this.renderHook),this.syncLightDom()}hostDisconnected(){this.renderHook.remove()}syncLightDom(){const t=this.content;t&&this.options.syncLightDom(t)}}const Gr=a`:host{--_n-radio-size:calc(var(--n-space-m) * 1.25);display:inline-block;line-height:var(--n-line-height)}.n-flex{display:flex}.n-expand{flex:1}.n-input-container{position:relative}::slotted(input){--_n-radio-accent-color:var(--n-color-accent);-moz-appearance:none;-webkit-appearance:none;appearance:none;margin:0!important;padding:0!important;border:1px solid var(--_n-radio-border-color,var(--n-color-border-hover))!important;border-radius:var(--n-border-radius-circle)!important;transition:none!important;display:block!important;inline-size:var(--_n-radio-size)!important;block-size:var(--_n-radio-size)!important;cursor:pointer}::slotted(input:checked){--_n-radio-border-color:var(--n-color-accent);background:var(--_n-radio-accent-color)!important}::slotted(input[aria-invalid]){--_n-radio-accent-color:var(--n-color-status-danger);--_n-radio-border-color:var(--_n-radio-accent-color)}::slotted(input:active){opacity:.8}::slotted(input:focus-visible){outline:0!important}::slotted(input:focus){outline:0!important;box-shadow:0 0 0 1px var(--n-color-surface),0 0 0 3px var(--n-color-accent)!important}:host([disabled]) ::slotted(input){--_n-radio-accent-color:var(--n-color-border-strong);--_n-radio-border-color:var(--_n-radio-accent-color);background:var(--_n-radio-accent-color);cursor:default;opacity:1}:host([disabled]) ::slotted(label){color:var(--n-color-text-weaker);cursor:default}.n-dot{--_n-radio-dot-size:var(--n-space-s);--_n-radio-dot-inset:calc((var(--_n-radio-size) - var(--_n-radio-dot-size)) / 2);position:absolute;border-radius:var(--n-border-radius-circle);inline-size:var(--_n-radio-dot-size);block-size:var(--_n-radio-dot-size);background-color:var(--n-color-text-on-accent);inset-inline-start:var(--_n-radio-dot-inset);inset-block-start:var(--_n-radio-dot-inset);z-index:var(--n-index-default);pointer-events:none}.n-label-container{margin-block-end:0}::slotted(label){-webkit-user-select:none;user-select:none;font-weight:var(--n-font-weight)!important;line-height:var(--n-line-height-l)!important;padding-inline-start:var(--n-space-s)!important;cursor:pointer}.n-hint{padding-inline-start:var(--n-space-s)}.n-error{margin-block-start:calc(var(--n-space-s)/ 2);padding-inline-start:var(--n-space-s)}`;let Qr=0;const Zr=t=>`nord-radio-${t}-${Qr++}`;let Jr=class extends($e(le(se(ot)))){constructor(){super(...arguments),this.inputId=Zr("input"),this.hintId=Zr("hint"),this.errorId=Zr("error"),this.hintSlot=new Kr(this,{slotName:"hint",render:()=>this.hint?M`<div slot="hint-internal" id="${this.hintId}">${this.hint}</div>`:B,syncLightDom:t=>{t.id=this.hintId}}),this.labelSlot=new Kr(this,{slotName:"label",render:()=>this.label?M`<label slot="label-internal" for="${this.inputId}">${this.label}</label>`:B,syncLightDom:t=>{!function(t){return"label"===t.localName}(t)?console.warn('NORD: Only <label> elements should be placed in radio\'s "label" slot'):t.htmlFor=this.inputId}}),this.errorSlot=new Kr(this,{slotName:"error",render:()=>this.error?M`<div slot="error-internal" id="${this.errorId}">${this.error}</div>`:B,syncLightDom:t=>{t.id=this.hintId}}),this.inputSlot=new oe(this,{render:()=>M`<input slot="input" @blur="${this.handleBlur}" @focus="${this.handleFocus}" ${ee(this.focusableRef)} class="n-input" id="${this.inputId}" type="radio" name="${Ct(this.name)}" .value="${Ct(this.value)}" .checked="${this.checked}" ?disabled="${this.disabled}" ?required="${this.required}" aria-describedby="${Ct(this.getDescribedBy())}" aria-invalid="${Ct(this.getInvalid())}" form="${Ct(this.getAttribute("form")||void 0)}">`}),this.checked=!1,this.handleBlur=t=>{t.stopPropagation(),this.dispatchEvent(new Event("blur",{bubbles:!1,cancelable:!0}))},this.handleFocus=t=>{t.stopPropagation(),this.dispatchEvent(new Event("focus",{bubbles:!1,cancelable:!0}))}}get formValue(){}render(){return M`<div class="n-flex"><div class="n-input-container" @change="${this.handleChange}"><slot name="input"></slot>${this.checked?M`<div class="n-dot"></div>`:B}</div><div class="n-expand"><div class="n-label-container">${t=this.hideLabel,e=()=>M`<slot name="label"></slot><slot name="label-internal"></slot>`,n=t=>M`<nord-visually-hidden>${t}</nord-visually-hidden>`,t?n(e()):e()}<div class="n-caption n-hint" ?hidden="${!this.hasHint}"><slot name="hint"></slot><slot name="hint-internal"></slot></div></div><div class="n-caption n-error" role="alert" ?hidden="${!this.hasError}"><slot name="error"></slot><slot name="error-internal"></slot></div></div></div>`;var t,e,n}handleCheckedChange(t){!t&&this.checked&&this.uncheckSiblings()}uncheckSiblings(){this.getRootNode().querySelectorAll(`nord-radio[name="${this.name}"]`).forEach((t=>{t!==this&&(t.checked=!1)}))}handleChange(t){t.stopPropagation();const e=t.target;this.checked=e.checked,super.handleChange(t)}};Jr.styles=[At,Ee,Gr],t([st({type:Boolean,reflect:!0})],Jr.prototype,"checked",void 0),t([Tt("checked")],Jr.prototype,"handleCheckedChange",null),Jr=t([it("nord-radio")],Jr);var ti=Jr;const ei=a`:host{color:var(--n-color-text);--_n-header-gutter:var(--n-space-l);--_n-header-box-shadow:var(--n-box-shadow-header)}::slotted(*){margin:0!important}::slotted(a){color:var(--n-color-text-link);text-decoration:underline}::slotted(a:hover){text-decoration:none}.n-header,.n-header-end{display:flex;flex-flow:row wrap;align-items:center;gap:var(--n-space-m)}.n-header{padding:var(--n-space-s) var(--n-space-l);padding-inline-start:var(--_n-header-gutter);background-color:var(--n-color-surface);border-block-end:1px solid var(--n-color-border);box-shadow:var(--_n-header-box-shadow);min-block-size:52px}.n-header-end{margin-inline-start:auto;gap:var(--n-space-s)}`;let ni=class extends ot{constructor(){super(...arguments),this.endSlot=new ce(this,"end")}render(){return M`<header class="n-header"><slot></slot><div class="n-header-end" ?hidden="${this.endSlot.isEmpty}"><slot name="end"></slot></div></header>`}};ni.styles=[At,ei],ni=t([it("nord-header")],ni);var oi=ni;const ri=a`:host{color:var(--n-color-text-weak);font-weight:var(--n-font-weight);line-height:var(--n-line-height-tight);white-space:nowrap;text-overflow:ellipsis;user-select:none;all:unset;display:block;font-family:var(--n-font-family);font-size:var(--n-font-size-m)}*,::after,::before{box-sizing:border-box}[role=list]{margin-block-end:var(--n-space-m);min-inline-size:100%;list-style:none;appearance:none;border:0;box-sizing:border-box;margin:0;padding:0}.n-heading{min-inline-size:100%;color:var(--n-color-nav-heading);font-size:var(--n-font-size-s);font-weight:var(--n-font-weight-active);line-height:var(--n-line-height-tight);padding-inline-start:var(--n-space-s);margin-block-start:var(--n-space-m);margin-block-end:var(--n-space-s);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}`;let ii=class extends ot{render(){return M`${this.heading?M`<p id="heading" aria-hidden="true" class="n-heading">${this.heading}</p>`:B}<div role="list" aria-labelledby="${this.heading?"heading":B}"><slot></slot></div>`}};ii.styles=ri,t([st()],ii.prototype,"heading",void 0),ii=t([it("nord-nav-group")],ii);var ai=ii;const si=a`:host{--_n-nav-item-box-shadow:none;all:unset;display:block;font-feature-settings:var(--n-font-features);font-family:var(--n-font-family)}*,::after,::before{box-sizing:border-box}.n-nav-item{-webkit-user-select:none;user-select:none;display:flex;align-items:center;font-family:inherit;font-size:inherit;line-height:var(--n-line-height-tight);-webkit-appearance:none;appearance:none;color:var(--n-color-text-weak);padding:var(--n-space-s);min-block-size:28px;margin-block-end:1px;border-radius:var(--n-border-radius-s);text-decoration:none;inline-size:100%;max-inline-size:100%;background:0 0;cursor:pointer;border:0;text-align:start;box-shadow:var(--_n-nav-item-box-shadow);position:relative}.n-nav-item:focus{--_n-nav-item-box-shadow:0 0 0 2px var(--n-color-accent);outline:0;position:relative;z-index:var(--n-index-masked)}@supports selector(:focus-visible){.n-nav-item:focus{--_n-nav-item-box-shadow:none}.n-nav-item:focus-visible{--_n-nav-item-box-shadow:0 0 0 2px var(--n-color-accent)}}.n-nav-item:hover{background:var(--n-color-nav-hover);color:var(--n-color-text)}.n-nav-item:active{opacity:.7}.n-nav-content{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host([badge]) .n-nav-label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:inline-block;max-inline-size:calc(100% - calc(var(--n-space-m) + var(--n-space-m)));margin-block-end:-3px}:host([open]) .n-nav-item{background:var(--n-color-nav-hover);color:var(--n-color-text)}:host([active]) .n-nav-item{--_n-nav-item-box-shadow:var(--n-box-shadow);background:var(--n-color-accent);color:var(--n-color-text-on-accent);font-weight:var(--n-font-weight-active)}:host([active]) .n-nav-item:focus{--_n-nav-item-box-shadow:0 0 0 1px var(--n-color-nav-surface),0 0 0 3px var(--n-color-accent)}:host([active]) nord-icon{color:currentColor}.n-toggle-icon{color:var(--n-color-icon);margin-inline-end:var(--n-space-s);margin-inline-start:var(--n-space-s)}.n-toggle-icon.n-rtl{transform:rotate(-180deg)}[aria-expanded=true] .n-toggle-icon{transform:rotate(90deg)}.n-nav-icon{margin-inline-end:calc(var(--n-space-s) * 1.4);flex-shrink:0}::slotted(nord-nav-group){margin-inline-start:calc(var(--n-space-m) + calc(var(--n-space-s) * 1.3))}.n-nav-badge{border-radius:var(--n-border-radius-pill);background:var(--n-color-status-warning);color:rgba(0,0,0,.8);font-weight:var(--n-font-weight);font-feature-settings:var(--n-font-features-reduced);padding:4px 6px;text-align:center;min-inline-size:20px;position:absolute;margin-block-start:-2px;margin-inline-start:calc(var(--n-space-s)/ 1.5);font-size:var(--n-font-size-xs);display:inline-block}`;let li=class extends(se(ot)){constructor(){super(...arguments),this.subnavSlot=new ce(this,"subnav"),this.direction=new Oe(this),this.active=!1,this.open=!1}get hasSubNav(){return this.subnavSlot.hasContent}connectedCallback(){super.connectedCallback(),this.querySelector("nord-nav-item[active]")&&(this.open=!0)}render(){const t=M`${this.icon?M`<nord-icon class="n-nav-icon" name="${this.icon}" size="m"></nord-icon>`:B}<div class="n-nav-content"><span class="n-nav-label"><slot></slot></span>${this.badge?M`<span class="n-nav-badge">${this.badge}</span>`:B}</div>`;let e;return e=this.subnavSlot.hasContent?this.renderToggle(t):this.href?this.renderLink(t):this.renderButton(t),M`<div role="listitem">${e}<slot name="${this.subnavSlot.slotName}" ?hidden="${!this.open}"></slot></div>`}renderLink(t){return M`<a class="n-nav-item" ${ee(this.focusableRef)} aria-current="${Ct(this.active,"page")}" href="${this.href||""}">${t}</a>`}renderToggle(t){return M`<button class="n-nav-item" @click="${this.toggleOpen}" aria-expanded="${this.open?"true":"false"}" ${ee(this.focusableRef)}>${t}<nord-icon size="xxs" class="${ge({"n-toggle-icon":!0,"n-rtl":this.direction.isRTL})}" name="arrow-expand-right-small"></nord-icon></button>`}renderButton(t){return M`<button class="n-nav-item" ${ee(this.focusableRef)}>${t}</button>`}toggleOpen(){this.open=!this.open,this.dispatchEvent(new ye("toggle"))}};li.styles=si,t([st({type:Boolean,reflect:!0})],li.prototype,"active",void 0),t([st()],li.prototype,"icon",void 0),t([st()],li.prototype,"href",void 0),t([st()],li.prototype,"badge",void 0),t([st({type:Boolean})],li.prototype,"open",void 0),li=t([it("nord-nav-item")],li);var di=li;const ci=a`:host{all:unset;display:flex;flex-direction:column;block-size:100%;background:var(--n-color-background);overflow:hidden auto}*,::after,::before{box-sizing:border-box}nav{flex-grow:1;padding:var(--n-space-s) var(--n-space-m) var(--n-space-m)}slot[name=footer],slot[name=header]{display:flex;flex-direction:column;justify-content:center;--n-button-text-align:start;--n-button-background-color:transparent;--n-button-border-color:transparent;--n-button-box-shadow:none;--n-button-gradient:none;--n-button-padding-inline:calc(var(--n-space-s) / 2)}::slotted(:is([slot=header],[slot=footer]):not([open]):focus-within){--n-button-border-color:var(--n-color-accent)}slot[name=header]{--n-button-border-radius:0;--n-button-padding-inline:calc((var(--n-space-l) / 1.5) - 1px);--n-button-font-weight:var(--n-font-weight-heading);--n-button-font-size:var(--n-font-size-l);--n-button-min-block-size:calc(var(--n-space-xxl) - 2px);--n-select-block-size:var(--n-button-min-block-size);min-block-size:var(--n-button-min-block-size);padding:1px 1px 0;border-block-end:1px solid var(--n-color-border)}slot[name=footer]{--n-button-color:var(--n-color-text-weak);margin:var(--n-space-m)}slot[name=header][hidden]{display:none}::slotted(:is([slot=header]:hover,[slot=header][open])){box-shadow:0 -1px 0 1px var(--n-color-nav-hover);background-color:var(--n-color-nav-hover)}::slotted(:is([slot=footer]:hover,[slot=footer][open])){--n-button-border-color:var(--n-color-border-hover)}`;let hi=class extends ot{constructor(){super(...arguments),this.headerSlot=new ce(this,"header")}render(){return M`<slot name="header" ?hidden="${this.headerSlot.isEmpty}"></slot><nav><slot></slot></nav><slot name="footer"></slot>`}};hi.styles=ci,hi=t([it("nord-navigation")],hi);var ui=hi;
96
96
  /**
97
97
  * @license
98
98
  * Copyright 2018 Google LLC