nish-ui 3.1.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -6
- package/dist/base-tailwind.css +30 -15
- package/dist/base.css +30 -15
- package/dist/chart.js +2 -2
- package/dist/elements-all.js +78 -78
- package/dist/elements-charts.d.ts +1 -1
- package/dist/elements-charts.js +43 -42
- package/dist/elements-data.d.ts +10 -0
- package/dist/elements-data.js +4 -5
- package/dist/elements-forms.js +9 -9
- package/dist/elements.d.ts +1 -0
- package/dist/elements.js +4 -4
- package/dist/esm/chart-values.js +2 -1
- package/dist/esm/combobox-filter.js +6 -5
- package/dist/esm/command-filter.js +83 -0
- package/dist/esm/components/accordion.js +5 -3
- package/dist/esm/components/app-shell.js +9 -5
- package/dist/esm/components/breadcrumbs.js +8 -4
- package/dist/esm/components/calendar-base.js +33 -6
- package/dist/esm/components/calendar-classes.js +14 -2
- package/dist/esm/components/canvas/follow-caption.js +31 -21
- package/dist/esm/components/canvas/follow.js +5 -6
- package/dist/esm/components/canvas/minimap.js +3 -3
- package/dist/esm/components/canvas/system-canvas.js +3 -1
- package/dist/esm/components/canvas/view.js +0 -2
- package/dist/esm/components/carousel.js +2 -3
- package/dist/esm/components/charts.js +18 -7
- package/dist/esm/components/combobox.js +20 -9
- package/dist/esm/components/command.js +25 -63
- package/dist/esm/components/context-menu.js +2 -1
- package/dist/esm/components/data-classes.js +23 -8
- package/dist/esm/components/data.js +19 -10
- package/dist/esm/components/display.js +24 -15
- package/dist/esm/components/drawer.js +17 -4
- package/dist/esm/components/error-boundary.js +3 -3
- package/dist/esm/components/feedback.js +4 -4
- package/dist/esm/components/file-dropzone.js +39 -7
- package/dist/esm/components/filters.js +42 -1
- package/dist/esm/components/flow.js +12 -9
- package/dist/esm/components/forms-classes.js +3 -1
- package/dist/esm/components/forms.js +8 -6
- package/dist/esm/components/hooks.js +47 -13
- package/dist/esm/components/hover-card.js +2 -1
- package/dist/esm/components/inbox.js +9 -2
- package/dist/esm/components/latest.js +4 -2
- package/dist/esm/components/layout.js +7 -4
- package/dist/esm/components/menu.js +14 -1
- package/dist/esm/components/modal.js +17 -4
- package/dist/esm/components/multi-select.js +7 -7
- package/dist/esm/components/nav-classes.js +9 -0
- package/dist/esm/components/nav.js +32 -12
- package/dist/esm/components/navigate.js +1 -1
- package/dist/esm/components/overlay-dialog.js +35 -1
- package/dist/esm/components/pagination.js +1 -1
- package/dist/esm/components/primitives-classes.js +4 -4
- package/dist/esm/components/primitives.js +18 -5
- package/dist/esm/components/progress.js +2 -1
- package/dist/esm/components/radio-group.js +1 -1
- package/dist/esm/components/resource-classes.js +7 -3
- package/dist/esm/components/resource.js +17 -6
- package/dist/esm/components/segmented.js +2 -0
- package/dist/esm/components/separator.js +6 -1
- package/dist/esm/components/service-tokens.js +18 -7
- package/dist/esm/components/settings.js +21 -1
- package/dist/esm/components/slider.js +5 -1
- package/dist/esm/components/split.js +4 -2
- package/dist/esm/components/strings.js +17 -4
- package/dist/esm/components/table.js +15 -3
- package/dist/esm/components/tabs.js +3 -2
- package/dist/esm/components/tag-input.js +5 -1
- package/dist/esm/components/time-field.js +15 -7
- package/dist/esm/components/toast-card.js +5 -3
- package/dist/esm/components/toast-store.js +16 -4
- package/dist/esm/components/toast.js +4 -1
- package/dist/esm/components/tooltip.js +3 -2
- package/dist/esm/components/url-state.js +5 -2
- package/dist/esm/components/virtual-table.js +2 -2
- package/dist/esm/components/virtual.js +8 -4
- package/dist/esm/format.js +27 -4
- package/dist/esm/runtime.js +9 -2
- package/dist/esm/server/inbox/client.js +4 -0
- package/dist/esm/split-layout.js +2 -1
- package/dist/esm/theme.js +38 -15
- package/dist/esm/tokens.mjs +1 -1
- package/dist/format.d.ts +5 -3
- package/dist/format.js +36 -7
- package/dist/inbox-client.d.ts +6 -2
- package/dist/inbox-client.js +4 -1
- package/dist/index.d.ts +65 -30
- package/dist/nish-components.css +70 -23
- package/dist/nish-components.min.css +1 -1
- package/dist/nish.css +30 -15
- package/dist/nish.min.css +1 -1
- package/dist/node/vite.js +1 -1
- package/dist/server/hono.d.ts +10 -3
- package/dist/server/hono.js +108 -11
- package/dist/server/index.d.ts +21 -13
- package/dist/server/index.js +124 -29
- package/dist/service-tokens.d.ts +4 -4
- package/dist/{spa-7myD4xvA.d.ts → spa-FwS7yZ8p.d.ts} +36 -7
- package/dist/split-layout.js +2 -2
- package/dist/system-canvas.d.ts +11 -10
- package/dist/theme.d.ts +30 -2
- package/dist/theme.global.js +53 -21
- package/dist/theme.js +53 -20
- package/package.json +3 -2
- package/dist/tokens.js +0 -425
package/dist/elements-data.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
function Ft(i,e){let t=e.trim().toLowerCase().split(/\s+/).filter(Boolean);if(t.length===0)return!0;let n=[i.label,i.hint??"",...i.keywords??[]].join(`
|
|
2
|
-
`).toLowerCase();return t.every(s=>n.includes(s))}function tt(i,e){let t=[],n=new Map;for(let s of i){if(!Ft(s,e))continue;let r=s.group??null,o=n.get(r);o||(o=[],n.set(r,o),t.push(r)),o.push(s)}return t.sort((s,r)=>s===null?-1:r===null?1:0),t.flatMap(s=>n.get(s)).slice(0,50)}function Re(i){if(i==null)return null;let e=String(i),t=0,n=e.length;for(;t<n&&e.charCodeAt(t)<=32;)t++;for(;n>t&&e.charCodeAt(n-1)<=32;)n--;let s=e.slice(t,n).replace(/[\t\n\r]/g,"");if(s===""||s!==s.trim()||/[\u0000-\u001f\u007f]/.test(s))return null;let r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(s);if(!r)return s;let o=r[1].toLowerCase();return o==="http"||o==="https"||o==="mailto"||o==="tel"?s:null}var nt=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var N=function(i,e,t,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!s:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(i,t):s?s.value=t:e.set(i,t),t},S=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},G,ue,me,X,ke,Q,pe,U,J,H,fe,st;var v={__proto__:null};v.enumerable=!0;Object.freeze(v);var $e=(H=class{constructor(e,t={}){if(G.set(this,!1),ue.set(this,!1),me.set(this,!1),X.set(this,!1),ke.set(this,Date.now()),Q.set(this,!1),pe.set(this,void 0),U.set(this,void 0),J.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof t!="object"||!t)throw new Error('The "options" argument must be an object');let{bubbles:n,cancelable:s,composed:r}=t;N(this,G,!!s,"f"),N(this,ue,!!n,"f"),N(this,me,!!r,"f"),N(this,pe,`${e}`,"f"),N(this,U,null,"f"),N(this,J,!1,"f")}initEvent(e,t,n){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){N(this,X,!0,"f")}get target(){return S(this,U,"f")}get currentTarget(){return S(this,U,"f")}get srcElement(){return S(this,U,"f")}get type(){return S(this,pe,"f")}get cancelable(){return S(this,G,"f")}get defaultPrevented(){return S(this,G,"f")&&S(this,X,"f")}get timeStamp(){return S(this,ke,"f")}composedPath(){return S(this,J,"f")?[S(this,U,"f")]:[]}get returnValue(){return!S(this,G,"f")||!S(this,X,"f")}get bubbles(){return S(this,ue,"f")}get composed(){return S(this,me,"f")}get eventPhase(){return S(this,J,"f")?H.AT_TARGET:H.NONE}get cancelBubble(){return S(this,Q,"f")}set cancelBubble(e){e&&N(this,Q,!0,"f")}stopPropagation(){N(this,Q,!0,"f")}get isTrusted(){return!1}},G=new WeakMap,ue=new WeakMap,me=new WeakMap,X=new WeakMap,ke=new WeakMap,Q=new WeakMap,pe=new WeakMap,U=new WeakMap,J=new WeakMap,H.NONE=0,H.CAPTURING_PHASE=1,H.AT_TARGET=2,H.BUBBLING_PHASE=3,H);Object.defineProperties($e.prototype,{initEvent:v,stopImmediatePropagation:v,preventDefault:v,target:v,currentTarget:v,srcElement:v,type:v,cancelable:v,defaultPrevented:v,timeStamp:v,composedPath:v,returnValue:v,bubbles:v,composed:v,eventPhase:v,cancelBubble:v,stopPropagation:v,isTrusted:v});var it=(st=class extends $e{constructor(e,t={}){super(e,t),fe.set(this,void 0),N(this,fe,t?.detail??null,"f")}initCustomEvent(e,t,n,s){throw new Error("Method not implemented.")}get detail(){return S(this,fe,"f")}},fe=new WeakMap,st);Object.defineProperties(it.prototype,{detail:v});var R=$e,Pe=it;var _;var On=(_=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},_.STYLE_RULE=1,_.CHARSET_RULE=2,_.IMPORT_RULE=3,_.MEDIA_RULE=4,_.FONT_FACE_RULE=5,_.PAGE_RULE=6,_.NAMESPACE_RULE=10,_.KEYFRAMES_RULE=7,_.KEYFRAME_RULE=8,_.SUPPORTS_RULE=12,_.COUNTER_STYLE_RULE=11,_.FONT_FEATURE_VALUES_RULE=14,_.MARGIN_RULE=9,_);globalThis.Event??=R;globalThis.CustomEvent??=Pe;var Oe=Symbol(),rt=i=>typeof i=="boolean"?i:i?.capture??!1,k={__proto__:null};k.enumerable=!0;Object.freeze(k);var ge=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,n){if(t==null)return;let s=rt(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);if(r===void 0)r=new Map,s.set(e,r);else if(r.has(t))return;let o=typeof n=="object"&&n?n:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,n)),r.set(t,o??{})}removeEventListener(e,t,n){if(t==null)return;let s=rt(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);r!==void 0&&(r.delete(t),r.size||s.delete(e))}dispatchEvent(e){let t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));let n=!1,s=!1,r=R.NONE,o=null,l=null,a=null,c=e.stopPropagation,d=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return o??l},...k},srcElement:{get(){return e.target},...k},currentTarget:{get(){return a},...k},eventPhase:{get(){return r},...k},composedPath:{value:()=>t,...k},stopPropagation:{value:()=>{n=!0,c.call(e)},...k},stopImmediatePropagation:{value:()=>{s=!0,d.call(e)},...k}});let h=(m,b,M)=>{typeof m=="function"?m(e):typeof m?.handleEvent=="function"&&m.handleEvent(e),b.once&&M.delete(m)},u=()=>(a=null,r=R.NONE,!e.defaultPrevented),g=t.slice().reverse();o=!this.__host||!e.composed?this:null;let A=m=>{for(l=this;l.__host&&m.includes(l.__host);)l=l.__host};for(let m of g){!o&&(!l||l===m.__host)&&A(g.slice(g.indexOf(m))),a=m,r=m===e.target?R.AT_TARGET:R.CAPTURING_PHASE;let b=m.__captureEventListeners.get(e.type);if(b){for(let[M,D]of b)if(h(M,D,b),s)return u()}if(n)return u()}let p=e.bubbles?t:[this];l=null;for(let m of p){!o&&(!l||m===l.__host)&&A(p.slice(0,p.indexOf(m)+1)),a=m,r=m===e.target?R.AT_TARGET:R.BUBBLING_PHASE;let b=m.__eventListeners.get(e.type);if(b){for(let[M,D]of b)if(h(M,D,b),s)return u()}if(n)return u()}return u()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,lt,qt]}};var ot=new WeakMap,Z=i=>{let e=ot.get(i);return e===void 0&&ot.set(i,e=new Map),e},ee=class extends ge{getRootNode(e){return e?.composed?He:this.__host?.__shadowRoot??He}};var at=class extends ee{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var lt=new at,He=lt;var ct=class extends ee{constructor(e){if(super(),e!==Oe)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:ve,customElements:De,document:He,Document:at,Element:ht,EventTarget:ge,HTMLElement:dt,Node:ee,ShadowRoot:ut,window:this,Window:ct})}};var ht=class extends ee{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(Z(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){Z(this).set(e,String(t))}removeAttribute(e){Z(this).delete(e)}toggleAttribute(e,t){if(this.hasAttribute(e)){if(t===void 0||!t)return this.removeAttribute(e),!1}else return t===void 0||t?(this.setAttribute(e,""),!0):!1;return!0}hasAttribute(e){return Z(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;let t=new ut(Oe,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new nt(this);return this.__internals=e,e}getAttribute(e){return Z(this).get(e)??null}};var dt=class extends ht{},Ie=dt;var ut=class extends ee{get host(){return this.__host}constructor(e,t){if(super(),e!==e)throw new TypeError("Illegal constructor");this.mode=t.mode}};globalThis.litServerRoot??=Object.defineProperty(new Ie,"localName",{get(){return"lit-server-root"}});function Gt(){let i,e;return{promise:new Promise((n,s)=>{i=n,e=s}),resolve:i,reject:e}}var ve=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,t){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
|
|
3
|
-
|
|
4
|
-
\f\r]`,ie=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,wt=/-->/g,_t=/>/g,B=RegExp(`>|${ze}(?:([^\\s"'>=/]+)(${ze}*=${ze}*(?:[^
|
|
5
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Tt=/'/g,At=/"/g,xt=/^(?:script|style|textarea|title)$/i,Ye=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),gs=Ye(1),vs=Ye(2),Es=Ye(3),W=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),Lt=new WeakMap,z=V.createTreeWalker(V,129);function Nt(i,e){if(!qe(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return St!==void 0?St.createHTML(e):e}var rn=(i,e)=>{let t=i.length-1,n=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=ie;for(let l=0;l<t;l++){let a=i[l],c,d,h=-1,u=0;for(;u<a.length&&(o.lastIndex=u,d=o.exec(a),d!==null);)u=o.lastIndex,o===ie?d[1]==="!--"?o=wt:d[1]!==void 0?o=_t:d[2]!==void 0?(xt.test(d[2])&&(s=RegExp("</"+d[2],"g")),o=B):d[3]!==void 0&&(o=B):o===B?d[0]===">"?(o=s??ie,h=-1):d[1]===void 0?h=-2:(h=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?B:d[3]==='"'?At:Tt):o===At||o===Tt?o=B:o===wt||o===_t?o=ie:(o=B,s=void 0);let g=o===B&&i[l+1].startsWith("/>")?" ":"";r+=o===ie?a+nn:h>=0?(n.push(c),a.slice(0,h)+Ct+a.slice(h)+O+g):a+O+(h===-2?l:g)}return[Nt(i,r+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},ae=class i{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,o=0,l=e.length-1,a=this.parts,[c,d]=rn(e,t);if(this.el=i.createElement(c,n),z.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=z.nextNode())!==null&&a.length<l;){if(s.nodeType===1){if(s.hasAttributes())for(let h of s.getAttributeNames())if(h.endsWith(Ct)){let u=d[o++],g=s.getAttribute(h).split(O),A=/([.?@])?(.*)/.exec(u);a.push({type:1,index:r,name:A[2],strings:g,ctor:A[1]==="."?We:A[1]==="?"?Fe:A[1]==="@"?Ge:q}),s.removeAttribute(h)}else h.startsWith(O)&&(a.push({type:6,index:r}),s.removeAttribute(h));if(xt.test(s.tagName)){let h=s.textContent.split(O),u=h.length-1;if(u>0){s.textContent=ye?ye.emptyScript:"";for(let g=0;g<u;g++)s.append(h[g],re()),z.nextNode(),a.push({type:2,index:++r});s.append(h[u],re())}}}else if(s.nodeType===8)if(s.data===Mt)a.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(O,h+1))!==-1;)a.push({type:7,index:r}),h+=O.length-1}r++}}static createElement(e,t){let n=V.createElement("template");return n.innerHTML=e,n}};function j(i,e,t=i,n){if(e===W)return e;let s=n!==void 0?t._$Co?.[n]:t._$Cl,r=oe(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(i),s._$AT(i,t,n)),n!==void 0?(t._$Co??=[])[n]=s:t._$Cl=s),s!==void 0&&(e=j(i,s._$AS(i,e.values),s,n)),e}var Ve=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,s=(e?.creationScope??V).importNode(t,!0);z.currentNode=s;let r=z.nextNode(),o=0,l=0,a=n[0];for(;a!==void 0;){if(o===a.index){let c;a.type===2?c=new le(r,r.nextSibling,this,e):a.type===1?c=new a.ctor(r,a.name,a.strings,this,e):a.type===6&&(c=new je(r,this,e)),this._$AV.push(c),a=n[++l]}o!==a?.index&&(r=z.nextNode(),o++)}return z.currentNode=V,s}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},le=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,s){this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=j(this,e,t),oe(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==W&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):sn(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==E&&oe(this._$AH)?this._$AA.nextSibling.data=e:this.T(V.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=ae.createElement(Nt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(t);else{let r=new Ve(s,this),o=r.u(this.options);r.p(t),this.T(o),this._$AH=r}}_$AC(e){let t=Lt.get(e.strings);return t===void 0&&Lt.set(e.strings,t=new ae(e)),t}k(e){qe(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,s=0;for(let r of e)s===t.length?t.push(n=new i(this.O(re()),this.O(re()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let n=yt(e).nextSibling;yt(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},q=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,s,r){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=E}_$AI(e,t=this,n,s){let r=this.strings,o=!1;if(r===void 0)e=j(this,e,t,0),o=!oe(e)||e!==this._$AH&&e!==W,o&&(this._$AH=e);else{let l=e,a,c;for(e=r[0],a=0;a<r.length-1;a++)c=j(this,l[n+a],t,a),c===W&&(c=this._$AH[a]),o||=!oe(c)||c!==this._$AH[a],c===E?e=E:e!==E&&(e+=(c??"")+r[a+1]),this._$AH[a]=c}o&&!s&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},We=class extends q{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}},Fe=class extends q{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==E)}},Ge=class extends q{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){if((e=j(this,e,t,0)??E)===W)return;let n=this._$AH,s=e===E&&n!==E||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==E&&(n===E||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},je=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){j(this,e)}};var on=Se.litHtmlPolyfillSupport;on?.(ae,le),(Se.litHtmlVersions??=[]).push("3.3.3");var Rt=(i,e,t)=>{let n=t?.renderBefore??e,s=n._$litPart$;if(s===void 0){let r=t?.renderBefore??null;n._$litPart$=s=new le(e.insertBefore(re(),r),r,void 0,t??{})}return s._$AI(i),s};var Ke=globalThis,I=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Rt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return W}};I._$litElement$=!0,I.finalized=!0,Ke.litElementHydrateSupport?.({LitElement:I});var an=Ke.litElementPolyfillSupport;an?.({LitElement:I});(Ke.litElementVersions??=[]).push("4.2.2");var ln="3.1.0";var cn=Symbol.for("nish-ui.runtime.v1");function hn(){let i=globalThis;return i[cn]??={versions:new Set,slots:{}}}function dn(i){i.versions.add(ln),i.versions.size>1&&!i.warned&&globalThis.process?.env?.NODE_ENV!=="production"&&(i.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...i.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var kt=!1;function $t(i,e){let t=hn();return kt||(kt=!0,dn(t)),i in t.slots||(t.slots[i]=e()),t.slots[i]}var Y={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:i=>`${i} result${i===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",onThisPage:"On this page",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:i=>`${i} active`,remove:"Remove",removeNamed:i=>`Remove ${i}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:i=>`${i}: no data`,seriesNumber:i=>`Series ${i}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeToggleLabel:(i,e)=>`Theme: ${i}. Switch to ${e}`,themeElsewhere:"set on another site"};function Xe(){return $t("element-strings",()=>({values:{...Y},listeners:new Set}))}function un(i){let e=Xe(),t={...e.values};for(let[n,s]of Object.entries(i))s!==void 0&&Object.hasOwn(Y,n)&&(t[n]=s);e.values=t;for(let n of Array.from(e.listeners))n()}function x(){let i=Xe(),e=i.values;return Object.keys(Y).some(n=>e[n]===void 0)&&(i.values={...Y,...Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0))}),i.values}function Pt(i){let e=Xe().listeners;return e.add(i),()=>{e.delete(i)}}var w=class extends I{#e=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#e??=Pt(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=null}stringsChanged(){this.requestUpdate()}};function L(i){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i,{once:!0}):i()}function T(i,e){customElements.get(i)||customElements.define(i,e)}function ce(i){return!!i&&getComputedStyle(i).direction==="rtl"}var pn=0,he="http://www.w3.org/2000/svg",fn="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function gn(){let i=document.createElementNS(he,"svg");for(let[t,n]of Object.entries({viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))i.setAttribute(t,n);let e=document.createElementNS(he,"path");return e.setAttribute("d","M18 6 6 18M6 6l12 12"),i.append(e),i}function vn(){let i=document.createElementNS(he,"svg");for(let[n,s]of Object.entries({viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))i.setAttribute(n,s);let e=document.createElementNS(he,"circle");e.setAttribute("cx","11"),e.setAttribute("cy","11"),e.setAttribute("r","8");let t=document.createElementNS(he,"path");return t.setAttribute("d","m21 21-4.3-4.3"),i.append(e,t),i}function Ht(i){globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`nish-ui: <nish-command-palette> did not follow an unsafe href (${JSON.stringify(i.slice(0,40))}). Only relative, #, http(s), mailto and tel URLs are followed.`)}function En(i){if(!(i instanceof HTMLElement))return!1;let e=i.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"||i.isContentEditable}var we=class extends w{static properties={open:{type:Boolean,reflect:!0},hotkey:{type:Boolean,reflect:!0},placeholder:{type:String},emptyText:{type:String,attribute:"empty-text"},items:{attribute:!1}};#e=++pn;#t=null;#n=null;#i=null;#r=null;#l=null;#o="";#s=0;#a=[];#c=new Map;#h=null;#u;#f=!1;#g=!1;constructor(){super(),this.open=!1,this.hotkey=!1,this.placeholder="",this.emptyText="",this.items=[]}connectedCallback(){if(super.connectedCallback(),this.#d(),this.#t){this.#p();return}this.#f||(this.#f=!0,L(()=>{this.#f=!1,this.isConnected&&this.#m()}))}disconnectedCallback(){super.disconnectedCallback(),this.#y(!1),window.clearTimeout(this.#u),this.#t?.open&&(this.open=!1,this.#t.close())}show(){this.open=!0}close(){this.open=!1}#y(e){e!==this.#g&&(this.#g=e,e?document.addEventListener("keydown",this.#b):document.removeEventListener("keydown",this.#b))}#d(){this.#y(this.hotkey&&this.isConnected)}#b=e=>{e.defaultPrevented||e.isComposing||!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!=="k"||En(e.target)||(e.preventDefault(),this.open=!0)};#m(){if(this.#t)return;let e=Array.from(this.querySelectorAll(":scope > a, :scope > button"));if(this.items.length===0&&e.length>0){let c=new Set,d=[];for(let h of e){let u=h.dataset.id||h.getAttribute("href")||`item-${d.length+1}`;for(;c.has(u);)u=`${u}-${d.length+1}`;c.add(u);let g=(h.dataset.keywords??"").split(/[,\s]+/).map(A=>A.trim()).filter(Boolean);d.push({id:u,label:h.textContent?.trim()??u,group:h.dataset.group||void 0,hint:h.dataset.hint||void 0,keywords:g.length?g:void 0,href:h.getAttribute("href")??void 0}),this.#c.set(u,h)}this.items=d}for(let c of e)c.hidden=!0;let t=document.createElement("dialog");t.className="nish-command";let n=`nish-command-list-${this.#e}`,s=document.createElement("input");s.type="text",s.setAttribute("role","combobox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-controls",n),s.setAttribute("aria-autocomplete","list"),s.autocomplete="off",s.setAttribute("autocapitalize","off"),s.setAttribute("autocorrect","off"),s.spellcheck=!1,s.addEventListener("input",()=>this.#_(s.value)),s.addEventListener("keydown",c=>this.#A(c)),s.addEventListener("change",c=>c.stopPropagation());let r=document.createElement("div");r.className="nish-command-input";let o=document.createElement("button");o.type="button",o.className="nish-icon-btn",o.append(gn()),o.addEventListener("click",()=>{this.open=!1}),r.append(vn(),s,o);let l=document.createElement("div");l.className="nish-command-list",l.id=n,l.setAttribute("role","listbox"),l.addEventListener("mousedown",c=>c.preventDefault()),l.addEventListener("mousemove",c=>{let d=c.target?.closest("[data-index]");if(!d)return;let h=Number(d.dataset.index);h!==this.#s&&this.#E(h,!1)}),l.addEventListener("click",c=>{let d=c.target?.closest("[data-index]"),h=d?this.#a[Number(d.dataset.index)]:void 0;h&&this.#L(h)});let a=document.createElement("span");a.setAttribute("role","status"),a.setAttribute("aria-live","polite"),a.style.cssText=fn,t.append(r,l,a),t.addEventListener("click",this.#C),t.addEventListener("cancel",this.#T),t.addEventListener("close",this.#M),t.addEventListener("keydown",c=>{c.key==="Escape"&&c.stopPropagation()}),this.append(t),this.#t=t,this.#n=s,this.#i=l,this.#r=a,this.#l=o,this.#v(),this.#p()}updated(e){e.has("hotkey")&&this.#d(),(e.has("placeholder")||e.has("emptyText"))&&this.#v(),e.has("items")&&this.#t?.open&&this.#w(),e.has("open")&&this.#p()}stringsChanged(){this.#v(),this.#t?.open&&this.#w(),super.stringsChanged()}#v(){let e=this.#n;if(!e)return;let t=x(),n=this.placeholder||t.searchPlaceholder;e.placeholder=n,e.setAttribute("aria-label",n.replace(/…$/,"")||t.search),this.#t?.setAttribute("aria-label",t.search),this.#l?.setAttribute("aria-label",t.close),this.#i?.setAttribute("aria-label",t.results)}#p(){let e=this.#t;!e||!this.isConnected||(this.open&&!e.open?(this.#h=document.activeElement instanceof HTMLElement?document.activeElement:null,this.#o="",this.#s=0,this.#n&&(this.#n.value=""),e.showModal(),this.#w(),this.#n?.focus()):!this.open&&e.open&&e.close())}#S(e){return`nish-command-${this.#e}-opt-${e}`}#w(){let e=this.#i,t=this.#n;if(!e||!t)return;let n=x();this.#a=tt(this.items,this.#o),this.#s>=this.#a.length&&(this.#s=0),e.textContent="";let s=0,r,o=e;for(let l of this.#a){let a=l.group??null;if(a!==r)if(r=a,a===null)o=e;else{let h=document.createElement("div");h.className="nish-command-group",h.setAttribute("role","group");let u=document.createElement("div");u.id=`nish-command-${this.#e}-group-${s}`,u.textContent=a,h.setAttribute("aria-labelledby",u.id),h.append(u),e.append(h),o=h}let c=document.createElement("div");c.className="nish-command-item",c.id=this.#S(s),c.dataset.index=String(s),c.setAttribute("role","option"),c.setAttribute("aria-selected",s===this.#s?"true":"false");let d=document.createElement("span");if(d.textContent=l.label,c.append(d),l.hint){let h=document.createElement("span");h.className="nish-command-item-hint",h.textContent=l.hint,c.append(h)}o.append(c),s++}if(this.#a.length===0){let l=document.createElement("div");l.className="nish-command-empty",l.textContent=this.emptyText||n.noResults,e.append(l)}this.#a.length?t.setAttribute("aria-activedescendant",this.#S(this.#s)):t.removeAttribute("aria-activedescendant"),this.#r&&(this.#r.textContent=this.#a.length?n.resultCount(this.#a.length):this.emptyText||n.noResults)}#E(e,t=!0){let n=this.#a.length;if(n===0)return;this.#s=(e%n+n)%n;let s=this.#i;if(s){for(let r of Array.from(s.querySelectorAll("[data-index]"))){let o=Number(r.dataset.index)===this.#s;r.setAttribute("aria-selected",o?"true":"false"),o&&t&&r.scrollIntoView?.({block:"nearest"})}this.#n?.setAttribute("aria-activedescendant",this.#S(this.#s))}}#_(e){this.#o=e,this.#s=0,this.#w(),window.clearTimeout(this.#u),this.#u=window.setTimeout(()=>{this.dispatchEvent(new CustomEvent("nish-query",{bubbles:!0,detail:{query:e}}))},200)}#A(e){if(e.isComposing)return;let t=this.#a.length;switch(e.key){case"ArrowDown":e.preventDefault(),this.#E(this.#s+1);break;case"ArrowUp":e.preventDefault(),this.#E(this.#s-1);break;case"Home":t&&!this.#o&&(e.preventDefault(),this.#E(0));break;case"End":t&&!this.#o&&(e.preventDefault(),this.#E(t-1));break;case"Enter":{e.preventDefault();let n=this.#a[this.#s];n&&this.#L(n);break}}}#L(e){let t=this.#c.get(e.id);if(this.open=!1,this.#t?.close(),this.dispatchEvent(new CustomEvent("nish-select",{bubbles:!0,detail:{id:e.id}})),t){let n=t.getAttribute("href");n!==null&&Re(n)===null?Ht(n):t.click()}else if(e.href){let n=Re(e.href);n===null?Ht(e.href):window.location.assign(n)}}#C=e=>{let t=this.#t;if(!t||e.target!==t)return;let n=t.getBoundingClientRect();e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom||(this.open=!1)};#T=e=>{e.preventDefault(),this.open=!1};#M=()=>{window.clearTimeout(this.#u),this.open&&(this.open=!1);let e=this.#h;this.#h=null,e?.isConnected&&e.focus(),this.dispatchEvent(new CustomEvent("nish-close",{bubbles:!0}))}};T("nish-command-palette",we);var Ot="http://www.w3.org/2000/svg";function It(i,e){let t=document.createElementNS(Ot,"svg");for(let[n,s]of Object.entries({width:String(i),height:String(i),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))t.setAttribute(n,s);for(let n of e){let s=document.createElementNS(Ot,"path");s.setAttribute("d",n),t.appendChild(s)}return t}var Dt=i=>It(i,["M18 6 6 18M6 6l12 12"]),Ut=i=>It(i,["M22 3H2l8 9.46V19l4 2v-8.54L22 3z"]);var Ws=3600*24*365;function bn(i,e){if(typeof document>"u")return()=>{};let t=document.documentElement,n=()=>{let r=i.offsetHeight;r>0?t.style.setProperty(e,`${r}px`):t.style.removeProperty(e)};n();let s;return typeof ResizeObserver<"u"?(s=new ResizeObserver(n),s.observe(i)):window.addEventListener("resize",n),()=>{s?.disconnect(),window.removeEventListener("resize",n),t.style.removeProperty(e)}}function Bt(i,e={}){let t=Object.assign(()=>{},{lock:f=>{}});if(typeof document>"u")return t;let n=Array.from(i.querySelectorAll('a[href^="#"]')).filter(f=>f.hash.length>1),s=f=>{try{return document.getElementById(decodeURIComponent(f.hash.slice(1)))}catch{return null}},r=e.height===!1?()=>{}:bn(i,"--nish-sticky-extra"),o=null,l=null,a=null,c=()=>{let f=i.scrollWidth-i.clientWidth,y=getComputedStyle(i).direction==="rtl"?i.scrollLeft+f:i.scrollLeft;i.dataset.atStart=String(y<=1),i.dataset.atEnd=String(f<=1||y>=f-1)},d=f=>{let y=f.getBoundingClientRect().left-i.getBoundingClientRect().left+i.scrollLeft-i.clientLeft,C=i.clientWidth;y<i.scrollLeft+24?i.scrollLeft=Math.max(0,y-24):y+f.offsetWidth>i.scrollLeft+C-24&&(i.scrollLeft=y+f.offsetWidth-C+24)},h=f=>{f!==o&&(o?.removeAttribute("aria-current"),o=f,f&&(f.setAttribute("aria-current","true"),d(f)))},u=()=>{let f=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--nish-header-h"))||0,y=e.offset??f+i.offsetHeight+8,C=n[0]??null;for(let P of n){let F=s(P);F&&F.getBoundingClientRect().top<=y+1&&(C=P)}let de=document.documentElement;if(window.innerHeight+window.scrollY>=de.scrollHeight-2)for(let P of n)s(P)&&(C=P);h(l??C)},g=()=>{a?.(),a=null,l=null},A=f=>{let y=n.find(Ne=>{try{return decodeURIComponent(Ne.hash.slice(1))===f}catch{return!1}});if(!y)return;g(),l=y,h(y);let C=()=>{g(),m()},de=Ne=>{["ArrowUp","ArrowDown","PageUp","PageDown","Home","End"," "].includes(Ne.key)&&C()},P=!1,F=()=>{P=!0},K=setTimeout(F,400),Ze=()=>{P?C():(clearTimeout(K),K=setTimeout(F,200))},et=()=>{clearTimeout(K),K=setTimeout(F,50)};window.addEventListener("wheel",C,{passive:!0}),window.addEventListener("touchstart",C,{passive:!0}),window.addEventListener("keydown",de),window.addEventListener("scroll",Ze,{passive:!0}),window.addEventListener("scrollend",et),a=()=>{clearTimeout(K),window.removeEventListener("wheel",C),window.removeEventListener("touchstart",C),window.removeEventListener("keydown",de),window.removeEventListener("scroll",Ze),window.removeEventListener("scrollend",et)}},p=0,m=()=>{p||(p=requestAnimationFrame(()=>{p=0,u()}))},b=f=>{let y=f.target instanceof Element?f.target.closest('a[href^="#"]'):null;y&&n.includes(y)&&h(y)};c(),u(),window.addEventListener("scroll",m,{passive:!0}),window.addEventListener("resize",m),i.addEventListener("scroll",c,{passive:!0}),i.addEventListener("click",b);let M;return typeof ResizeObserver<"u"&&(M=new ResizeObserver(()=>{c(),m()}),M.observe(i)),Object.assign(()=>{g(),p&&cancelAnimationFrame(p),window.removeEventListener("scroll",m),window.removeEventListener("resize",m),i.removeEventListener("scroll",c),i.removeEventListener("click",b),M?.disconnect(),r(),o?.removeAttribute("aria-current"),delete i.dataset.atStart,delete i.dataset.atEnd},{lock:A})}var yn={md:"(max-width: 767.98px)",lg:"(max-width: 1023.98px)"},Sn=0;function _e(i){let e=document.createElement("div");return e.className=i,e}var Te=class extends w{static properties={activeCount:{attribute:"active-count",type:Number,reflect:!0},sheetTitle:{attribute:"sheet-title",type:String,reflect:!0},sheetBelow:{attribute:"sheet-below",type:String,reflect:!0},sticky:{type:Boolean,reflect:!0}};#e=null;#t=_e("nish-filter-bar-search");#n=_e("nish-filter-bar-chips");#i=_e("nish-filter-bar-trailing");#r=_e("nish-filter-bar-summary");#l=null;#o=null;#s=null;#a=null;#c=null;#h=null;#u=null;#f=null;#g=null;#y=null;#d=[];#b=null;#m=null;#v="";#p=null;#S=()=>this.#T();constructor(){super(),this.activeCount=0,this.sheetTitle="",this.sheetBelow="md",this.sticky=!1}connectedCallback(){super.connectedCallback(),L(()=>this.#w())}disconnectedCallback(){if(super.disconnectedCallback(),this.#m?.removeEventListener("change",this.#S),this.#m=null,this.#v="",this.#p?.disconnect(),this.#p=null,this.#e){this.#c?.close();for(let e of this.#d)this.appendChild(e);for(let e of[this.#t,this.#i,this.#r])for(;e.firstChild;)this.appendChild(e.firstChild);this.#e.remove(),this.#c?.remove(),this.#e=null,this.#l=null,this.#o=null,this.#u=null,this.#f=null,this.#g=null,this.#a=null,this.#c=null,this.#h=null,this.#d=[],this.#b=null}}updated(e){this.#e&&(this.#C(),this.#T())}#w(){if(!this.isConnected||this.#e)return;let e=document.createElement("div");e.className="nish-filter-bar",this.#r.setAttribute("aria-live","polite"),e.append(this.#t,this.#n,this.#i,this.#r),this.#e=e;for(let t of Array.from(this.childNodes))this.#_(t);this.appendChild(e),this.#A(),this.#C(),this.#T(),this.#p=new MutationObserver(t=>{for(let n of t)n.addedNodes.forEach(s=>{s!==e&&s.parentNode===this&&this.#_(s)});this.#T()}),this.#p.observe(this,{childList:!0}),this.#p.observe(this.#n,{childList:!0}),this.#h&&this.#p.observe(this.#h,{childList:!0})}#E(){this.#d=this.#d.filter(e=>e.parentNode===this.#n||e.parentNode===this.#h)}#_(e){if(e===this.#e||e instanceof Comment)return;if(!(e instanceof HTMLElement)){e.parentNode?.removeChild(e);return}let t=e.getAttribute("data-slot");t==="trailing"?this.#i.appendChild(e):t==="summary"?this.#r.appendChild(e):e.localName==="nish-search"&&!this.#t.firstChild?this.#t.appendChild(e):(this.#E(),this.#d.includes(e)||this.#d.push(e),(this.#b==="compact"?this.#h??this.#n:this.#n).appendChild(e))}#A(){let e=++Sn,t=document.createElement("button");t.type="button",t.className="nish-btn nish-btn--secondary nish-filter-btn",t.setAttribute("aria-haspopup","dialog"),this.#o=document.createTextNode(""),t.append(Ut(16),this.#o);let n=document.createElement("span");n.className="nish-badge nish-badge--accent",t.appendChild(n),t.addEventListener("click",()=>this.#c?.show()),this.#l=t,this.#s=n;let s=document.createElement("button");s.type="button",s.className="nish-btn nish-btn--ghost nish-filter-bar-clear",s.addEventListener("click",()=>this.#L()),this.#a=s;let r=document.createElement("nish-sheet"),o=document.createElement("header");o.className="nish-sheet-header";let l=document.createElement("h2");l.className="nish-sheet-title",l.id=`nish-filter-sheet-title-${e}`,o.appendChild(l);let a=document.createElement("button");a.type="button",a.className="nish-icon-btn",a.setAttribute("data-sheet-close",""),this.#f=a,a.appendChild(Dt(16)),o.appendChild(a);let c=document.createElement("div");c.className="nish-sheet-body nish-filter-sheet-body";let d=document.createElement("footer");d.className="nish-sheet-footer";let h=document.createElement("button");h.type="button",h.className="nish-btn nish-btn--ghost",h.addEventListener("click",()=>this.#L());let u=document.createElement("button");u.type="button",u.className="nish-btn nish-btn--primary",u.style.marginInlineStart="auto",this.#g=u,u.addEventListener("click",()=>this.#c?.close()),d.append(h,u),r.append(o,c,d),this.#c=r,this.#h=c,this.#u=h,this.#y=l}#L(){this.dispatchEvent(new CustomEvent("nish-clear",{bubbles:!0}))}#C(){let e=yn[this.sheetBelow==="lg"?"lg":"md"];e!==this.#v&&(this.#m?.removeEventListener("change",this.#S),this.#v=e,this.#m=typeof matchMedia>"u"?null:matchMedia(e),this.#m?.addEventListener("change",this.#S))}#T(){let e=this.#e,t=this.#c,n=this.#h,s=this.#l,r=this.#a;if(!e||!t||!n||!s||!r)return;this.#E();let o=this.#m?.matches?"compact":"wide";o!==this.#b&&(o==="compact"?(this.#n.remove(),r.remove(),this.#t.after(s),n.append(...this.#d),e.appendChild(t)):(t.close(),s.remove(),this.#n.append(...this.#d,r),this.#t.after(this.#n),t.remove()),this.#b=o,e.setAttribute("data-compact",String(o==="compact")));let l=Math.max(0,Number.isFinite(this.activeCount)?Math.floor(this.activeCount):0);e.classList.toggle("nish-filter-bar--sticky",this.sticky),s.hidden=this.#d.length===0,r.hidden=l===0,this.#s&&(this.#s.textContent=String(l),this.#s.hidden=l===0,this.#s.setAttribute("aria-label",x().activeCount(l))),this.#u&&(this.#u.disabled=l===0);let a=x();this.#y&&(this.#y.textContent=this.sheetTitle||a.filters),this.#o&&(this.#o.data=a.filters),r.textContent=a.clearFilters,this.#u&&(this.#u.textContent=a.clear),this.#g&&(this.#g.textContent=a.showResults),this.#f?.setAttribute("aria-label",a.close)}};T("nish-filter-bar",Te);function zt(i,e){let t=null,n=()=>Array.from(i.querySelectorAll(":scope > a")),s=()=>{let o=location.pathname,l=null,a=-1;for(let c of n()){if(e?.(c),!c.getAttribute("href"))continue;let d;try{d=new URL(c.getAttribute("href"),location.href)}catch{continue}if(d.origin!==location.origin)continue;let h=c.getAttribute("href").trim();if(h==="#"||h.startsWith("?")||d.pathname===location.pathname&&!d.hash&&h.startsWith("#"))continue;if(d.hash&&d.pathname===location.pathname){d.hash===location.hash&&(l=c,a=1/0);continue}let u=d.pathname;(u==="/"?o==="/":o===u||o.startsWith(u.endsWith("/")?u:`${u}/`))&&u.length>a&&(l=c,a=u.length)}if(!l){t?.removeAttribute("aria-current"),t=null;return}for(let c of n())c.removeAttribute("aria-current");l.setAttribute("aria-current","page"),t=l},r=new MutationObserver(()=>{r.disconnect(),s(),r.observe(i,{childList:!0})});return s(),window.addEventListener("popstate",s),window.addEventListener("hashchange",s),r.observe(i,{childList:!0}),()=>{window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s),r.disconnect()}}var Ae=class extends w{static properties={label:{type:String,reflect:!0}};#e=null;#t=null;#n=null;constructor(){super(),this.label=""}connectedCallback(){super.connectedCallback(),L(()=>this.#i())}disconnectedCallback(){super.disconnectedCallback(),this.#n?.disconnect(),this.#n=null,this.#e=null,this.#t?.(),this.#t=null}updated(e){this.#l()}#i(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > nav.nish-nav-rail");if(!e){for(e=document.createElement("nav"),e.className="nish-nav-rail";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#r(e),this.#l(),this.#t=zt(e,t=>t.classList.add("nish-nav-rail-item")),this.#n=new MutationObserver(t=>{let n=this.#e;if(!n)return;let s=!1;for(let r of t)r.target===this&&r.addedNodes.forEach(o=>{o!==n&&o.nodeType===1&&o.parentNode===this&&(n.appendChild(o),s=!0)});(s||t.some(r=>r.target!==this))&&this.#r(n)}),this.#n.observe(this,{childList:!0}),this.#n.observe(e,{childList:!0,subtree:!0})}#r(e){let t=e.querySelector(':scope > [data-slot="tools"]'),n=e.querySelector(':scope > [data-slot="footer"]');t?.classList.add("nish-nav-rail-tools"),n?.classList.add("nish-nav-rail-footer");let s=[t,n].filter(a=>!!a),r=Array.from(e.children),o=s.length;if(!s.every((a,c)=>r[r.length-o+c]===a))for(let a of s)e.appendChild(a);for(let a of Array.from(e.querySelectorAll(":scope > .nish-nav-rail-tools a, :scope > .nish-nav-rail-footer a")))a.classList.add("nish-nav-rail-item")}#l(){this.#e&&this.#e.setAttribute("aria-label",this.label||x().sections)}};T("nish-nav-rail",Ae);var wn='[aria-pressed="true"],[aria-selected="true"],[aria-current]:not([aria-current="false"]),[aria-checked="true"]',Le=class extends w{static properties={label:{type:String,reflect:!0},bleed:{type:Boolean,reflect:!0},snap:{type:Boolean,reflect:!0},fade:{reflect:!0,converter:{fromAttribute:e=>e!=="false",toAttribute:e=>e?null:"false"}}};#e=null;#t=null;#n=null;#i=()=>this.#o();constructor(){super(),this.label="",this.bleed=!1,this.snap=!1,this.fade=!0}connectedCallback(){super.connectedCallback(),L(()=>this.#r())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.removeEventListener("scroll",this.#i),this.#t?.disconnect(),this.#t=null,this.#n?.disconnect(),this.#n=null,this.#e=null}updated(e){this.#s()}#r(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > div.nish-scroll-row");if(!e){for(e=document.createElement("div"),e.className="nish-scroll-row";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#n?.disconnect(),this.#n=new MutationObserver(()=>{let n=this.#e;if(n)for(let s of Array.from(this.childNodes))s!==n&&s.nodeType===1&&n.appendChild(s)}),this.#n.observe(this,{childList:!0}),this.#s(),e.addEventListener("scroll",this.#i,{passive:!0}),typeof ResizeObserver<"u"&&(this.#t=new ResizeObserver(()=>this.#o()),this.#t.observe(e));let t=e.querySelector(wn);t&&this.#l(e,t),this.#o()}#l(e,t){let n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),r=8;s.left<n.left+r?e.scrollLeft+=s.left-n.left-r:s.right>n.right-r&&(e.scrollLeft+=s.right-n.right+r)}#o(){let e=this.#e;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=ce(e)?e.scrollLeft+t:e.scrollLeft;e.dataset.atStart=String(n<=1),e.dataset.atEnd=String(t<=1||n>=t-1)}#s(){let e=this.#e;e&&(this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label"),e.classList.toggle("nish-scroll-row--bleed",this.bleed),e.classList.toggle("nish-scroll-row--snap",this.snap),e.classList.toggle("nish-scroll-row--no-fade",!this.fade))}};T("nish-scroll-row",Le);var Vt={fromAttribute:i=>i!=="false",toAttribute:i=>i?null:"false"},Ce=class extends w{static properties={label:{type:String,reflect:!0},sticky:{reflect:!0,converter:Vt},updateHash:{attribute:"update-hash",reflect:!0,converter:Vt}};#e=null;#t=null;#n=null;#i=null;#r=e=>this.#c(e);constructor(){super(),this.label="",this.sticky=!0,this.updateHash=!0}connectedCallback(){super.connectedCallback(),L(()=>this.#l())}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(),this.#t=null,this.#s=null,this.#n?.disconnect(),this.#n=null,this.#i?.disconnect(),this.#i=null,this.#e?.removeEventListener("click",this.#r),this.#e=null}updated(e){this.#o()}#l(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > nav.nish-subnav");if(!e){for(e=document.createElement("nav"),e.className="nish-subnav";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#o(),e.addEventListener("click",this.#r),this.#a(e),this.#n=new MutationObserver(()=>{this.#t?.(),this.#a(e)}),this.#n.observe(e,{childList:!0}),this.#i=new MutationObserver(()=>{let t=this.#e;if(t)for(let n of Array.from(this.childNodes))n!==t&&n.nodeType===1&&t.appendChild(n)}),this.#i.observe(this,{childList:!0})}#o(){let e=this.#e;e&&(e.setAttribute("aria-label",this.label||x().onThisPage||Y.onThisPage),e.style.position=this.sticky?"":"static",this.#s!==null&&this.#s!==this.sticky&&this.#a(e))}#s=null;#a(e){this.#t?.(),this.#t=Bt(e,{height:this.sticky}),this.#s=this.sticky}#c(e){let t=e.target instanceof Element?e.target.closest('a[href^="#"]'):null;if(!t||!this.#e?.contains(t)||t.hash.length<2||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n;try{n=decodeURIComponent(t.hash.slice(1))}catch{return}let s=document.getElementById(n);if(!s)return;e.preventDefault();let r=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(this.#t?.lock(n),s.scrollIntoView({behavior:r?"auto":"smooth",block:"start"}),this.updateHash)try{history.replaceState(history.state,"",`#${t.hash.slice(1)}`)}catch{}this.dispatchEvent(new CustomEvent("nish-select",{bubbles:!0,detail:{id:n}}))}};T("nish-section-nav",Ce);var Wt=5,_n="(max-width: 639.98px) and (pointer: coarse)";function Qe(i,e){let t=()=>Array.from({length:e},()=>100/e);if(e===0)return[];if(!i||i.length!==e||!i.every(s=>Number.isFinite(s)&&s>0))return t();let n=i.reduce((s,r)=>s+r,0);return i.map(s=>s/n*100)}var Tn={fromAttribute(i){if(i==null||i.trim()==="")return null;let e=i.split(",").map(t=>Number(t.trim()));return e.every(t=>Number.isFinite(t))?e:null},toAttribute(i){return i&&i.length?i.map(e=>Math.round(e*100)/100).join(","):null}},Me=class extends w{static properties={orientation:{type:String,reflect:!0},sizes:{converter:Tn,reflect:!0},min:{type:Number},storageKey:{type:String,attribute:"storage-key"}};#e=[];#t=[];#n=null;#i=null;#r=!1;#l=null;#o=!1;#s=!1;#a=!1;constructor(){super(),this.orientation="row",this.sizes=null,this.min=120,this.storageKey=null}connectedCallback(){if(super.connectedCallback(),typeof window.matchMedia=="function"&&(this.#i=window.matchMedia(_n),this.#r=this.#i.matches,this.#i.addEventListener("change",this.#y)),this.#s){this.#c(),this.#h();return}this.#o||(this.#o=!0,L(()=>{this.#o=!1,this.isConnected&&(this.#s=!0,this.#c(),this.#h())}))}disconnectedCallback(){super.disconnectedCallback(),this.#i?.removeEventListener("change",this.#y),this.#i=null,this.#n?.disconnect(),this.#n=null,this.#E()}updated(e){this.#s&&(e.size===0||e.has("orientation")||e.has("sizes")||e.has("min"))&&this.#g()}#c(){typeof MutationObserver>"u"||(this.#n??=new MutationObserver(()=>this.#h()),this.#n.observe(this,{childList:!0}))}#h(){if(!this.isConnected)return;this.#n?.disconnect();let e=[];for(let t of Array.from(this.childNodes)){if(!(t instanceof HTMLElement))continue;if(t.classList.contains("nish-split-divider")){t.remove();continue}if(t.classList.contains("nish-split-pane")){e.push(t);continue}let n=document.createElement("div");n.className="nish-split-pane",this.insertBefore(n,t),n.append(t),e.push(n)}this.#e=e,this.#t=[];for(let t=0;t<e.length-1;t++){let n=document.createElement("div");n.className="nish-split-divider",n.setAttribute("role","separator"),n.tabIndex=0,n.style.touchAction="none",n.addEventListener("pointerdown",s=>this.#p(s,t)),n.addEventListener("pointermove",s=>this.#S(s)),n.addEventListener("pointerup",s=>this.#w(s)),n.addEventListener("pointercancel",s=>this.#w(s)),n.addEventListener("keydown",s=>this.#A(s,t)),n.addEventListener("dblclick",()=>this.#_()),this.insertBefore(n,e[t+1]),this.#t.push(n)}this.#u(),this.#g(),this.#n?.observe(this,{childList:!0})}#u(){if(!(this.#a||!this.storageKey||this.#e.length===0)){this.#a=!0;try{let e=window.localStorage.getItem(this.storageKey);if(!e)return;let t=JSON.parse(e);Array.isArray(t)&&t.length===this.#e.length&&t.every(n=>typeof n=="number"&&Number.isFinite(n)&&n>0)&&(this.sizes=Qe(t,this.#e.length))}catch{}}}get#f(){return Qe(this.sizes,this.#e.length)}#g(){let e=this.orientation!=="column",t=this.#f,n=x();this.style.display="flex",this.style.flexDirection=this.#r?"column":e?"row":"column",this.style.minWidth="0",this.style.minHeight="0",this.#e.forEach((s,r)=>{s.style.minWidth="0",this.#r?(s.style.minHeight="var(--nish-split-stack-h, 16rem)",s.style.flex="none"):(s.style.minHeight="0",s.style.flex=`${t[r]} 1 0%`);let o=s.children.length===1?s.firstElementChild:null;o?.localName==="nish-split"&&(s.style.display="flex",o.style.flex="1 1 auto")}),this.#t.forEach((s,r)=>{s.hidden=this.#r,s.classList.toggle("nish-split-divider--v",e),s.classList.toggle("nish-split-divider--h",!e),s.setAttribute("aria-orientation",e?"vertical":"horizontal"),s.setAttribute("aria-label",e?n.resizeColumns:n.resizeRows),s.setAttribute("aria-valuenow",String(Math.round(t[r]))),s.setAttribute("aria-valuemin","0"),s.setAttribute("aria-valuemax","100")})}#y=e=>{this.#r=e.matches,this.#g()};#d(e){let t=e.getBoundingClientRect();return this.orientation==="column"?t.height:t.width}#b(e,t,n,s){let r=e[t]+e[t+1],o=Math.min(s,r/2),l=Math.min(Math.max(e[t]+n,o),r-o),a=e.slice();return a[t]=l,a[t+1]=r-l,a}#m(e){if(this.storageKey)try{window.localStorage.setItem(this.storageKey,JSON.stringify(e))}catch{}}#v(e){this.sizes=e,this.dispatchEvent(new CustomEvent("nish-resize",{bubbles:!0,detail:{sizes:e}}))}#p(e,t){if(e.button!==0||this.#r)return;let n=this.#t[t];if(!n)return;e.preventDefault(),n.setPointerCapture?.(e.pointerId);let s=[];for(let o of Array.from(this.querySelectorAll("iframe")))s.push([o,o.style.pointerEvents]),o.style.pointerEvents="none";let r=this.#e.reduce((o,l)=>o+this.#d(l),0);this.#l={pointerId:e.pointerId,start:this.orientation==="column"?e.clientY:e.clientX,index:t,sizes:this.#f,total:r,restore:s},this.setAttribute("data-dragging","")}#S(e){let t=this.#l;if(!t||t.pointerId!==e.pointerId||t.total<=0)return;let n=this.orientation==="column"?e.clientY:e.clientX,s=this.orientation!=="column"&&ce(this)?-1:1,r=(n-t.start)*s/t.total*100;r!==0&&this.#v(this.#b(t.sizes,t.index,r,this.min/t.total*100))}#w(e){let t=this.#l;if(!t||t.pointerId!==e.pointerId)return;let n=this.#t[t.index];n?.hasPointerCapture?.(e.pointerId)&&n.releasePointerCapture(e.pointerId),this.#E()}#E(){let e=this.#l;if(e){this.#l=null,this.sizes&&this.#m(this.sizes);for(let[t,n]of e.restore)t.style.pointerEvents=n;this.removeAttribute("data-dragging")}}#_(){if(this.#r||this.#e.length<2)return;let e=Qe(null,this.#e.length);this.#v(e),this.#m(e)}#A(e,t){if(e.key==="Enter"){e.preventDefault(),this.#_();return}let n=this.orientation!=="column",s=n&&ce(this),r=n?s?"ArrowRight":"ArrowLeft":"ArrowUp",o=n?s?"ArrowLeft":"ArrowRight":"ArrowDown";if(e.key!==r&&e.key!==o)return;e.preventDefault();let l=this.#e.reduce((h,u)=>h+this.#d(u),0),a=l>0?this.min/l*100:0,c=this.#f,d=this.#b(c,t,e.key===o?Wt:-Wt,a);d[t]!==c[t]&&(this.#v(d),this.#m(d))}};T("nish-split",Me);var Je="http://www.w3.org/2000/svg";function An(){let i=document.createElementNS(Je,"svg");i.setAttribute("width","10"),i.setAttribute("height","10"),i.setAttribute("viewBox","0 0 10 10"),i.setAttribute("aria-hidden","true"),i.setAttribute("focusable","false");for(let e of["M2 4 5 1l3 3","M2 6l3 3 3-3"]){let t=document.createElementNS(Je,"path");t.setAttribute("d",e),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.5"),t.setAttribute("opacity","0.35"),i.appendChild(t)}return i}function Ln(i){return(i.target instanceof Element?i.target:i.target.parentElement)?.closest("thead")?!0:Array.from(i.addedNodes).some(t=>t instanceof Element&&(t.localName==="thead"||t.localName==="table"||t.localName==="tr"||t.localName==="th"||t.querySelector("thead")!==null))}function Cn(i){let e=i.replace(/\u2212/g,"-").replace(/[\s,$€£%]/g,""),t=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)[a-z/]*$/i.exec(e);if(!t)return null;let n=Number(t[1]);return Number.isFinite(n)?n:null}var Mn=/^[\u2013\u2014]$/,xe=class extends w{static properties={manual:{type:Boolean,reflect:!0}};#e=null;#t=e=>this.#a(e);constructor(){super(),this.manual=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.#t),L(()=>this.#n())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.#t),this.#e?.disconnect(),this.#e=null}#n(){!this.isConnected||this.#e||(this.#l(),this.#e=new MutationObserver(e=>{e.some(Ln)&&(this.#e?.disconnect(),this.#l(),this.#i())}),this.#i())}#i(){this.#e?.observe(this,{childList:!0,subtree:!0})}#r(){return Array.from(this.querySelectorAll("thead th[data-sort]"))}#l(){for(let e of this.#r()){if(e.hasAttribute("scope")||e.setAttribute("scope","col"),e.hasAttribute("aria-sort")||e.setAttribute("aria-sort","none"),e.querySelector(":scope > .nish-th-sort"))continue;let t=document.createElement("button");for(t.type="button",t.className="nish-th-sort";e.firstChild;)t.appendChild(e.firstChild);t.appendChild(An()),e.appendChild(t),this.#o(e)}}#o(e){let t=e.querySelectorAll(".nish-th-sort svg path"),n=e.getAttribute("aria-sort");t[0]?.setAttribute("opacity",n==="ascending"?"1":"0.35"),t[1]?.setAttribute("opacity",n==="descending"?"1":"0.35")}#s(e){let t=e.getAttribute("data-sort");if(t)return t;let n=e.querySelector(".nish-th-sort"),s="";return(n??e).childNodes.forEach(r=>{(r.nodeType===Node.TEXT_NODE||r instanceof HTMLElement&&r.namespaceURI!==Je)&&(s+=r.textContent??"")}),s.trim()}#a(e){let n=e.target?.closest(".nish-th-sort"),s=n?.closest("th[data-sort]");if(!n||!s||!this.contains(s))return;let r=s.getAttribute("aria-sort")==="ascending"?"descending":"ascending";for(let o of this.#r())o.setAttribute("aria-sort",o===s?r:"none"),this.#o(o);this.manual||this.#c(s,r),this.dispatchEvent(new CustomEvent("nish-sort",{bubbles:!0,detail:{column:this.#s(s),direction:r==="ascending"?"asc":"desc"}}))}#c(e,t){let n=e.cellIndex,s=t==="ascending"?1:-1,r=e.closest("table");if(!r)return;let o=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0});for(let l of Array.from(r.tBodies)){let a=Array.from(l.rows).map((p,m)=>{let b=p.cells[n],M=b?(b.getAttribute("data-value")??b.textContent??"").trim():"",D=Mn.test(M)?"":M;return{row:p,key:D,num:Cn(D),order:m}}),c=a.filter(p=>p.key!==""),d=a.filter(p=>p.key===""),h=e.classList.contains("nish-th--num")||c.length>0&&c.every(p=>p.num!==null),u=h?c.filter(p=>p.num!==null):c,g=h?c.filter(p=>p.num===null):[];u.sort((p,m)=>(h?p.num-m.num:o.compare(p.key,m.key))*s||p.order-m.order),g.sort((p,m)=>o.compare(p.key,m.key)*s||p.order-m.order);let A=document.createDocumentFragment();for(let p of[...u,...g,...d])A.appendChild(p.row);l.appendChild(A)}}};T("nish-table-sort",xe);export{we as NishCommandPalette,w as NishElement,Te as NishFilterBar,Ae as NishNavRail,Le as NishScrollRow,Ce as NishSectionNav,Me as NishSplit,xe as NishTableSort,un as configureStrings,T as define};
|
|
1
|
+
function Gt(i,e){return e===0||!/[a-z0-9]/i.test(i[e-1])}function tt(i,e){let t=i.indexOf(e);if(t>=0){let r=t===0?0:2,o=t;if(r===2)for(let a=t;a>=0;a=i.indexOf(e,a+1)){if(Gt(i,a)){r=1,o=a;break}if(a+1>=i.length)break}return{tier:r,idx:Array.from({length:e.length},(a,l)=>o+l)}}let n=[],s=0;for(let r of e){let o=i.indexOf(r,s);if(o<0)return null;n.push(o),s=o+1}return{tier:3,idx:n}}function jt(i,e){let t=e.trim().toLowerCase();if(!t)return i.slice(0,50).map(s=>({item:s,marks:[]}));let n=[];return i.forEach((s,r)=>{let o=tt(s.label.toLowerCase(),t);if(o){n.push({r:{item:s,marks:o.idx},score:o.tier,order:r});return}let a=null;for(let l of s.keywords??[]){let c=tt(l.toLowerCase(),t);c&&c.tier<3&&(a===null||c.tier<a)&&(a=c.tier)}a!==null&&n.push({r:{item:s,marks:[]},score:4+a,order:r})}),n.sort((s,r)=>s.score-r.score||s.order-r.order),n.slice(0,50).map(s=>s.r)}function nt(i,e){let t=[],n=new Map;for(let{item:s}of jt(i,e)){let r=s.group??null,o=n.get(r);o||(o=[],n.set(r,o),t.push(r)),o.push(s)}return t.sort((s,r)=>s===null?-1:r===null?1:0),t.flatMap(s=>n.get(s))}function Re(i){if(i==null)return null;let e=String(i),t=0,n=e.length;for(;t<n&&e.charCodeAt(t)<=32;)t++;for(;n>t&&e.charCodeAt(n-1)<=32;)n--;let s=e.slice(t,n).replace(/[\t\n\r]/g,"");if(s===""||s!==s.trim()||/[\u0000-\u001f\u007f]/.test(s))return null;let r=/^([a-zA-Z][a-zA-Z0-9+.-]*):/.exec(s);if(!r)return s;let o=r[1].toLowerCase();return o==="http"||o==="https"||o==="mailto"||o==="tel"?s:null}var st=class{get shadowRoot(){return this.__host.__shadowRoot}constructor(e){this.ariaActiveDescendantElement=null,this.ariaAtomic="",this.ariaAutoComplete="",this.ariaBrailleLabel="",this.ariaBrailleRoleDescription="",this.ariaBusy="",this.ariaChecked="",this.ariaColCount="",this.ariaColIndex="",this.ariaColIndexText="",this.ariaColSpan="",this.ariaControlsElements=null,this.ariaCurrent="",this.ariaDescribedByElements=null,this.ariaDescription="",this.ariaDetailsElements=null,this.ariaDisabled="",this.ariaErrorMessageElements=null,this.ariaExpanded="",this.ariaFlowToElements=null,this.ariaHasPopup="",this.ariaHidden="",this.ariaInvalid="",this.ariaKeyShortcuts="",this.ariaLabel="",this.ariaLabelledByElements=null,this.ariaLevel="",this.ariaLive="",this.ariaModal="",this.ariaMultiLine="",this.ariaMultiSelectable="",this.ariaOrientation="",this.ariaOwnsElements=null,this.ariaPlaceholder="",this.ariaPosInSet="",this.ariaPressed="",this.ariaReadOnly="",this.ariaRelevant="",this.ariaRequired="",this.ariaRoleDescription="",this.ariaRowCount="",this.ariaRowIndex="",this.ariaRowIndexText="",this.ariaRowSpan="",this.ariaSelected="",this.ariaSetSize="",this.ariaSort="",this.ariaValueMax="",this.ariaValueMin="",this.ariaValueNow="",this.ariaValueText="",this.role="",this.form=null,this.labels=[],this.states=new Set,this.validationMessage="",this.validity={},this.willValidate=!0,this.__host=e}checkValidity(){return console.warn("`ElementInternals.checkValidity()` was called on the server.This method always returns true."),!0}reportValidity(){return!0}setFormValue(){}setValidity(){}};var N=function(i,e,t,n,s){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?i!==e||!s:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?s.call(i,t):s?s.value=t:e.set(i,t),t},S=function(i,e,t,n){if(t==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?i!==e||!n:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?n:t==="a"?n.call(i):n?n.value:e.get(i)},G,ue,me,X,ke,Z,pe,U,Q,H,fe,it;var v={__proto__:null};v.enumerable=!0;Object.freeze(v);var $e=(H=class{constructor(e,t={}){if(G.set(this,!1),ue.set(this,!1),me.set(this,!1),X.set(this,!1),ke.set(this,Date.now()),Z.set(this,!1),pe.set(this,void 0),U.set(this,void 0),Q.set(this,void 0),this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,arguments.length===0)throw new Error("The type argument must be specified");if(typeof t!="object"||!t)throw new Error('The "options" argument must be an object');let{bubbles:n,cancelable:s,composed:r}=t;N(this,G,!!s,"f"),N(this,ue,!!n,"f"),N(this,me,!!r,"f"),N(this,pe,`${e}`,"f"),N(this,U,null,"f"),N(this,Q,!1,"f")}initEvent(e,t,n){throw new Error("Method not implemented.")}stopImmediatePropagation(){this.stopPropagation()}preventDefault(){N(this,X,!0,"f")}get target(){return S(this,U,"f")}get currentTarget(){return S(this,U,"f")}get srcElement(){return S(this,U,"f")}get type(){return S(this,pe,"f")}get cancelable(){return S(this,G,"f")}get defaultPrevented(){return S(this,G,"f")&&S(this,X,"f")}get timeStamp(){return S(this,ke,"f")}composedPath(){return S(this,Q,"f")?[S(this,U,"f")]:[]}get returnValue(){return!S(this,G,"f")||!S(this,X,"f")}get bubbles(){return S(this,ue,"f")}get composed(){return S(this,me,"f")}get eventPhase(){return S(this,Q,"f")?H.AT_TARGET:H.NONE}get cancelBubble(){return S(this,Z,"f")}set cancelBubble(e){e&&N(this,Z,!0,"f")}stopPropagation(){N(this,Z,!0,"f")}get isTrusted(){return!1}},G=new WeakMap,ue=new WeakMap,me=new WeakMap,X=new WeakMap,ke=new WeakMap,Z=new WeakMap,pe=new WeakMap,U=new WeakMap,Q=new WeakMap,H.NONE=0,H.CAPTURING_PHASE=1,H.AT_TARGET=2,H.BUBBLING_PHASE=3,H);Object.defineProperties($e.prototype,{initEvent:v,stopImmediatePropagation:v,preventDefault:v,target:v,currentTarget:v,srcElement:v,type:v,cancelable:v,defaultPrevented:v,timeStamp:v,composedPath:v,returnValue:v,bubbles:v,composed:v,eventPhase:v,cancelBubble:v,stopPropagation:v,isTrusted:v});var rt=(it=class extends $e{constructor(e,t={}){super(e,t),fe.set(this,void 0),N(this,fe,t?.detail??null,"f")}initCustomEvent(e,t,n,s){throw new Error("Method not implemented.")}get detail(){return S(this,fe,"f")}},fe=new WeakMap,it);Object.defineProperties(rt.prototype,{detail:v});var R=$e,Pe=rt;var _;var zn=(_=class{constructor(){this.STYLE_RULE=1,this.CHARSET_RULE=2,this.IMPORT_RULE=3,this.MEDIA_RULE=4,this.FONT_FACE_RULE=5,this.PAGE_RULE=6,this.NAMESPACE_RULE=10,this.KEYFRAMES_RULE=7,this.KEYFRAME_RULE=8,this.SUPPORTS_RULE=12,this.COUNTER_STYLE_RULE=11,this.FONT_FEATURE_VALUES_RULE=14,this.MARGIN_RULE=9,this.__parentStyleSheet=null,this.cssText=""}get parentRule(){return null}get parentStyleSheet(){return this.__parentStyleSheet}get type(){return 0}},_.STYLE_RULE=1,_.CHARSET_RULE=2,_.IMPORT_RULE=3,_.MEDIA_RULE=4,_.FONT_FACE_RULE=5,_.PAGE_RULE=6,_.NAMESPACE_RULE=10,_.KEYFRAMES_RULE=7,_.KEYFRAME_RULE=8,_.SUPPORTS_RULE=12,_.COUNTER_STYLE_RULE=11,_.FONT_FEATURE_VALUES_RULE=14,_.MARGIN_RULE=9,_);globalThis.Event??=R;globalThis.CustomEvent??=Pe;var Oe=Symbol(),ot=i=>typeof i=="boolean"?i:i?.capture??!1,k={__proto__:null};k.enumerable=!0;Object.freeze(k);var ge=class{constructor(){this.__eventListeners=new Map,this.__captureEventListeners=new Map}addEventListener(e,t,n){if(t==null)return;let s=ot(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);if(r===void 0)r=new Map,s.set(e,r);else if(r.has(t))return;let o=typeof n=="object"&&n?n:{};o.signal?.addEventListener("abort",()=>this.removeEventListener(e,t,n)),r.set(t,o??{})}removeEventListener(e,t,n){if(t==null)return;let s=ot(n)?this.__captureEventListeners:this.__eventListeners,r=s.get(e);r!==void 0&&(r.delete(t),r.size||s.delete(e))}dispatchEvent(e){let t=this.__resolveFullEventPath();!e.composed&&this.__host&&(t=t.slice(0,t.indexOf(this.__host)));let n=!1,s=!1,r=R.NONE,o=null,a=null,l=null,c=e.stopPropagation,d=e.stopImmediatePropagation;Object.defineProperties(e,{target:{get(){return o??a},...k},srcElement:{get(){return e.target},...k},currentTarget:{get(){return l},...k},eventPhase:{get(){return r},...k},composedPath:{value:()=>t,...k},stopPropagation:{value:()=>{n=!0,c.call(e)},...k},stopImmediatePropagation:{value:()=>{s=!0,d.call(e)},...k}});let h=(m,E,M)=>{typeof m=="function"?m(e):typeof m?.handleEvent=="function"&&m.handleEvent(e),E.once&&M.delete(m)},u=()=>(l=null,r=R.NONE,!e.defaultPrevented),g=t.slice().reverse();o=!this.__host||!e.composed?this:null;let A=m=>{for(a=this;a.__host&&m.includes(a.__host);)a=a.__host};for(let m of g){!o&&(!a||a===m.__host)&&A(g.slice(g.indexOf(m))),l=m,r=m===e.target?R.AT_TARGET:R.CAPTURING_PHASE;let E=m.__captureEventListeners.get(e.type);if(E){for(let[M,D]of E)if(h(M,D,E),s)return u()}if(n)return u()}let p=e.bubbles?t:[this];a=null;for(let m of p){!o&&(!a||m===a.__host)&&A(p.slice(0,p.indexOf(m)+1)),l=m,r=m===e.target?R.AT_TARGET:R.BUBBLING_PHASE;let E=m.__eventListeners.get(e.type);if(E){for(let[M,D]of E)if(h(M,D,E),s)return u()}if(n)return u()}return u()}__resolveFullEventPath(){return this.__eventPathCache?this.__eventPathCache:this.__eventTargetParent?this.__eventPathCache=[this,...this.__eventTargetParent.__resolveFullEventPath()]:this.__eventPathCache=[this,ct,Yt]}};var at=new WeakMap,J=i=>{let e=at.get(i);return e===void 0&&at.set(i,e=new Map),e},ee=class extends ge{getRootNode(e){return e?.composed?He:this.__host?.__shadowRoot??He}};var lt=class extends ee{get adoptedStyleSheets(){return[]}createTreeWalker(){return{}}createTextNode(){return{}}createElement(){return{}}};var ct=new lt,He=ct;var ht=class extends ee{constructor(e){if(super(),e!==Oe)throw new TypeError("Illegal constructor");Object.assign(this,globalThis,{CustomElementRegistry:ve,customElements:De,document:He,Document:lt,Element:dt,EventTarget:ge,HTMLElement:ut,Node:ee,ShadowRoot:mt,window:this,Window:ht})}};var dt=class extends ee{constructor(){super(...arguments),this.__shadowRootMode=null,this.__shadowRoot=null,this.__internals=null}get attributes(){return Array.from(J(this)).map(([e,t])=>({name:e,value:t}))}get shadowRoot(){return this.__shadowRootMode==="closed"?null:this.__shadowRoot}get localName(){return this.constructor.__localName}get tagName(){return this.localName?.toUpperCase()}setAttribute(e,t){J(this).set(e,String(t))}removeAttribute(e){J(this).delete(e)}toggleAttribute(e,t){if(this.hasAttribute(e)){if(t===void 0||!t)return this.removeAttribute(e),!1}else return t===void 0||t?(this.setAttribute(e,""),!0):!1;return!0}hasAttribute(e){return J(this).has(e)}attachShadow(e){this.__shadowRootMode=e.mode;let t=new mt(Oe,e);return t.__eventTargetParent=this,t.__host=this,this.__shadowRoot=t}attachInternals(){if(this.__internals!==null)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");let e=new st(this);return this.__internals=e,e}getAttribute(e){return J(this).get(e)??null}};var ut=class extends dt{},Ie=ut;var mt=class extends ee{get host(){return this.__host}constructor(e,t){if(super(),e!==e)throw new TypeError("Illegal constructor");this.mode=t.mode}};globalThis.litServerRoot??=Object.defineProperty(new Ie,"localName",{get(){return"lit-server-root"}});function qt(){let i,e;return{promise:new Promise((n,s)=>{i=n,e=s}),resolve:i,reject:e}}var ve=class{constructor(){this.__definitions=new Map,this.__reverseDefinitions=new Map,this.__pendingWhenDefineds=new Map}define(e,t){if(this.__definitions.has(e))if(process.env.NODE_ENV==="development")console.warn(`'CustomElementRegistry' already has "${e}" defined. This may have been caused by live reload or hot module replacement in which case it can be safely ignored.
|
|
2
|
+
Make sure to test your application with a production build as repeat registrations will throw in production.`);else throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the name "${e}" has already been used with this registry`);if(this.__reverseDefinitions.has(t))throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': the constructor has already been used with this registry for the tag name ${this.__reverseDefinitions.get(t)}`);t.__localName=e,this.__definitions.set(e,{ctor:t,observedAttributes:t.observedAttributes??[]}),this.__reverseDefinitions.set(t,e),this.__pendingWhenDefineds.get(e)?.resolve(t),this.__pendingWhenDefineds.delete(e)}get(e){return this.__definitions.get(e)?.ctor}getName(e){return this.__reverseDefinitions.get(e)??null}initialize(e){throw new Error("customElements.initialize is not currently supported in SSR. Please file a bug if you need it.")}upgrade(e){throw new Error("customElements.upgrade is not currently supported in SSR. Please file a bug if you need it.")}async whenDefined(e){let t=this.__definitions.get(e);if(t)return t.ctor;let n=this.__pendingWhenDefineds.get(e);return n||(n=qt(),this.__pendingWhenDefineds.set(e,n)),n.promise}},Kt=ve;var De=new Kt,Yt=new ht(Oe);var te=globalThis,Ee=te.ShadowRoot&&(te.ShadyCSS===void 0||te.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ft=Symbol(),pt=new WeakMap,be=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==ft)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(Ee&&e===void 0){let n=t!==void 0&&t.length===1;n&&(e=pt.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&pt.set(t,e))}return e}toString(){return this.cssText}},gt=i=>new be(typeof i=="string"?i:i+"",void 0,ft);var vt=(i,e)=>{if(Ee)i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let n=document.createElement("style"),s=te.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=t.cssText,i.appendChild(n)}},Ue=Ee||te.CSSStyleSheet===void 0?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(let n of e.cssRules)t+=n.cssText;return gt(t)})(i):i;var{is:Xt,defineProperty:Zt,getOwnPropertyDescriptor:Qt,getOwnPropertyNames:Jt,getOwnPropertySymbols:en,getPrototypeOf:tn}=Object,se=globalThis;se.customElements??=De;var bt=se.trustedTypes,nn=bt?bt.emptyScript:"",sn=se.reactiveElementPolyfillSupport,ne=(i,e)=>i,Be={toAttribute(i,e){switch(e){case Boolean:i=i?nn:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},yt=(i,e)=>!Xt(i,e),Et={attribute:!0,type:String,converter:Be,reflect:!1,useDefault:!1,hasChanged:yt};Symbol.metadata??=Symbol("metadata"),se.litPropertyMetadata??=new WeakMap;var $=class extends(globalThis.HTMLElement??Ie){static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Et){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let n=Symbol(),s=this.getPropertyDescriptor(e,n,t);s!==void 0&&Zt(this.prototype,e,s)}}static getPropertyDescriptor(e,t,n){let{get:s,set:r}=Qt(this.prototype,e)??{get(){return this[t]},set(o){this[t]=o}};return{get:s,set(o){let a=s?.call(this);r?.call(this,o),this.requestUpdate(e,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Et}static _$Ei(){if(this.hasOwnProperty(ne("elementProperties")))return;let e=tn(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(ne("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ne("properties"))){let t=this.properties,n=[...Jt(t),...en(t)];for(let s of n)this.createProperty(s,t[s])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[n,s]of t)this.elementProperties.set(n,s)}this._$Eh=new Map;for(let[t,n]of this.elementProperties){let s=this._$Eu(t,n);s!==void 0&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let s of n)t.unshift(Ue(s))}else e!==void 0&&t.push(Ue(e));return t}static _$Eu(e,t){let n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let n of t.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return vt(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$ET(e,t){let n=this.constructor.elementProperties.get(e),s=this.constructor._$Eu(e,n);if(s!==void 0&&n.reflect===!0){let r=(n.converter?.toAttribute!==void 0?n.converter:Be).toAttribute(t,n.type);this._$Em=e,r==null?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(e,t){let n=this.constructor,s=n._$Eh.get(e);if(s!==void 0&&this._$Em!==s){let r=n.getPropertyOptions(s),o=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:Be;this._$Em=s;let a=o.fromAttribute(t,r.type);this[s]=a??this._$Ej?.get(s)??a,this._$Em=null}}requestUpdate(e,t,n,s=!1,r){if(e!==void 0){let o=this.constructor;if(s===!1&&(r=this[e]),n??=o.getPropertyOptions(e),!((n.hasChanged??yt)(r,t)||n.useDefault&&n.reflect&&r===this._$Ej?.get(e)&&!this.hasAttribute(o._$Eu(e,n))))return;this.C(e,t,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:n,reflect:s,wrapped:r},o){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),r!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(t=void 0),this._$AL.set(e,t)),s===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[s,r]of n){let{wrapped:o}=r,a=this[s];o!==!0||this._$AL.has(s)||a===void 0||this.C(s,void 0,r,a)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(t)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[ne("elementProperties")]=new Map,$[ne("finalized")]=new Map,sn?.({ReactiveElement:$}),(se.reactiveElementVersions??=[]).push("2.1.2");var Se=globalThis,St=i=>i,ye=Se.trustedTypes,wt=ye?ye.createPolicy("lit-html",{createHTML:i=>i}):void 0,Mt="$lit$",O=`lit$${Math.random().toFixed(9).slice(2)}$`,xt="?"+O,rn=`<${xt}>`,V=Se.document===void 0?{createTreeWalker:()=>({})}:document,re=()=>V.createComment(""),oe=i=>i===null||typeof i!="object"&&typeof i!="function",qe=Array.isArray,on=i=>qe(i)||typeof i?.[Symbol.iterator]=="function",ze=`[
|
|
3
|
+
\f\r]`,ie=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,_t=/-->/g,Tt=/>/g,B=RegExp(`>|${ze}(?:([^\\s"'>=/]+)(${ze}*=${ze}*(?:[^
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,Lt=/"/g,Nt=/^(?:script|style|textarea|title)$/i,Ke=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),Ss=Ke(1),ws=Ke(2),_s=Ke(3),W=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),Ct=new WeakMap,z=V.createTreeWalker(V,129);function Rt(i,e){if(!qe(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return wt!==void 0?wt.createHTML(e):e}var an=(i,e)=>{let t=i.length-1,n=[],s,r=e===2?"<svg>":e===3?"<math>":"",o=ie;for(let a=0;a<t;a++){let l=i[a],c,d,h=-1,u=0;for(;u<l.length&&(o.lastIndex=u,d=o.exec(l),d!==null);)u=o.lastIndex,o===ie?d[1]==="!--"?o=_t:d[1]!==void 0?o=Tt:d[2]!==void 0?(Nt.test(d[2])&&(s=RegExp("</"+d[2],"g")),o=B):d[3]!==void 0&&(o=B):o===B?d[0]===">"?(o=s??ie,h=-1):d[1]===void 0?h=-2:(h=o.lastIndex-d[2].length,c=d[1],o=d[3]===void 0?B:d[3]==='"'?Lt:At):o===Lt||o===At?o=B:o===_t||o===Tt?o=ie:(o=B,s=void 0);let g=o===B&&i[a+1].startsWith("/>")?" ":"";r+=o===ie?l+rn:h>=0?(n.push(c),l.slice(0,h)+Mt+l.slice(h)+O+g):l+O+(h===-2?a:g)}return[Rt(i,r+(i[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},ae=class i{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,o=0,a=e.length-1,l=this.parts,[c,d]=an(e,t);if(this.el=i.createElement(c,n),z.currentNode=this.el.content,t===2||t===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(s=z.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes())for(let h of s.getAttributeNames())if(h.endsWith(Mt)){let u=d[o++],g=s.getAttribute(h).split(O),A=/([.?@])?(.*)/.exec(u);l.push({type:1,index:r,name:A[2],strings:g,ctor:A[1]==="."?We:A[1]==="?"?Fe:A[1]==="@"?Ge:q}),s.removeAttribute(h)}else h.startsWith(O)&&(l.push({type:6,index:r}),s.removeAttribute(h));if(Nt.test(s.tagName)){let h=s.textContent.split(O),u=h.length-1;if(u>0){s.textContent=ye?ye.emptyScript:"";for(let g=0;g<u;g++)s.append(h[g],re()),z.nextNode(),l.push({type:2,index:++r});s.append(h[u],re())}}}else if(s.nodeType===8)if(s.data===xt)l.push({type:2,index:r});else{let h=-1;for(;(h=s.data.indexOf(O,h+1))!==-1;)l.push({type:7,index:r}),h+=O.length-1}r++}}static createElement(e,t){let n=V.createElement("template");return n.innerHTML=e,n}};function j(i,e,t=i,n){if(e===W)return e;let s=n!==void 0?t._$Co?.[n]:t._$Cl,r=oe(e)?void 0:e._$litDirective$;return s?.constructor!==r&&(s?._$AO?.(!1),r===void 0?s=void 0:(s=new r(i),s._$AT(i,t,n)),n!==void 0?(t._$Co??=[])[n]=s:t._$Cl=s),s!==void 0&&(e=j(i,s._$AS(i,e.values),s,n)),e}var Ve=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:n}=this._$AD,s=(e?.creationScope??V).importNode(t,!0);z.currentNode=s;let r=z.nextNode(),o=0,a=0,l=n[0];for(;l!==void 0;){if(o===l.index){let c;l.type===2?c=new le(r,r.nextSibling,this,e):l.type===1?c=new l.ctor(r,l.name,l.strings,this,e):l.type===6&&(c=new je(r,this,e)),this._$AV.push(c),l=n[++a]}o!==l?.index&&(r=z.nextNode(),o++)}return z.currentNode=V,s}p(e){let t=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}},le=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,n,s){this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=j(this,e,t),oe(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==W&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):on(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==b&&oe(this._$AH)?this._$AA.nextSibling.data=e:this.T(V.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:n}=e,s=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=ae.createElement(Rt(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===s)this._$AH.p(t);else{let r=new Ve(s,this),o=r.u(this.options);r.p(t),this.T(o),this._$AH=r}}_$AC(e){let t=Ct.get(e.strings);return t===void 0&&Ct.set(e.strings,t=new ae(e)),t}k(e){qe(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,n,s=0;for(let r of e)s===t.length?t.push(n=new i(this.O(re()),this.O(re()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let n=St(e).nextSibling;St(e).remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},q=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,n,s,r){this.type=1,this._$AH=b,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=b}_$AI(e,t=this,n,s){let r=this.strings,o=!1;if(r===void 0)e=j(this,e,t,0),o=!oe(e)||e!==this._$AH&&e!==W,o&&(this._$AH=e);else{let a=e,l,c;for(e=r[0],l=0;l<r.length-1;l++)c=j(this,a[n+l],t,l),c===W&&(c=this._$AH[l]),o||=!oe(c)||c!==this._$AH[l],c===b?e=b:e!==b&&(e+=(c??"")+r[l+1]),this._$AH[l]=c}o&&!s&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},We=class extends q{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}},Fe=class extends q{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==b)}},Ge=class extends q{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){if((e=j(this,e,t,0)??b)===W)return;let n=this._$AH,s=e===b&&n!==b||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,r=e!==b&&(n===b||s);s&&this.element.removeEventListener(this.name,this,n),r&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},je=class{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){j(this,e)}};var ln=Se.litHtmlPolyfillSupport;ln?.(ae,le),(Se.litHtmlVersions??=[]).push("3.3.3");var kt=(i,e,t)=>{let n=t?.renderBefore??e,s=n._$litPart$;if(s===void 0){let r=t?.renderBefore??null;n._$litPart$=s=new le(e.insertBefore(re(),r),r,void 0,t??{})}return s._$AI(i),s};var Ye=globalThis,I=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=kt(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return W}};I._$litElement$=!0,I.finalized=!0,Ye.litElementHydrateSupport?.({LitElement:I});var cn=Ye.litElementPolyfillSupport;cn?.({LitElement:I});(Ye.litElementVersions??=[]).push("4.2.2");var hn="3.3.0";var dn=Symbol.for("nish-ui.runtime.v1");function un(){let i=globalThis;return i[dn]??={versions:new Set,slots:{}}}function mn(){try{return process.env.NODE_ENV!=="production"}catch{return!1}}function pn(i){i.versions.add(hn),i.versions.size>1&&!i.warned&&mn()&&(i.warned=!0,console.warn(`nish-ui: two versions are loaded on this page (${[...i.versions].join(", ")}). Overlays, toasts and theme state are shared, but mixing versions is unsupported.`))}var $t=!1;function Pt(i,e){let t=un();return $t||($t=!0,pn(t)),i in t.slots||(t.slots[i]=e()),t.slots[i]}var K={close:"Close",search:"Search",searchPlaceholder:"Search\u2026",noResults:"No results",results:"Results",resultCount:i=>`${i} result${i===1?"":"s"}`,noMatches:"No matches",searching:"Searching\u2026",clear:"Clear",copy:"Copy",copied:"Copied",copyManual:"Press Ctrl+C",optional:"Optional",sections:"Sections",onThisPage:"On this page",filters:"Filters",clearFilters:"Clear filters",showResults:"Show results",activeCount:i=>`${i} active`,remove:"Remove",removeNamed:i=>`Remove ${i}`,resizeColumns:"Resize columns",resizeRows:"Resize rows",legend:"Legend",noDataYet:"No data yet",noDataNamed:i=>`${i}: no data`,seriesNumber:i=>`Series ${i}`,trend:"Trend",themeSystem:"System",themeLight:"Light",themeDark:"Dark",themeToggleLabel:(i,e)=>`Theme: ${i}. Switch to ${e}`,themeElsewhere:"set on another site"};function Xe(){return Pt("element-strings",()=>({values:{...K},listeners:new Set}))}function fn(i){let e=Xe(),t={...e.values};for(let[n,s]of Object.entries(i))s!==void 0&&Object.hasOwn(K,n)&&(t[n]=s);e.values=t;for(let n of Array.from(e.listeners))n()}function x(){let i=Xe(),e=i.values;return Object.keys(K).some(n=>e[n]===void 0)&&(i.values={...K,...Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0))}),i.values}function Ht(i){let e=Xe().listeners;return e.add(i),()=>{e.delete(i)}}var w=class extends I{#e=null;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#e??=Ht(()=>this.stringsChanged())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.(),this.#e=null}stringsChanged(){this.requestUpdate()}};function L(i){document.readyState==="loading"?document.addEventListener("DOMContentLoaded",i,{once:!0}):i()}function T(i,e){customElements.get(i)||customElements.define(i,e)}function ce(i){return!!i&&getComputedStyle(i).direction==="rtl"}var vn=0,he="http://www.w3.org/2000/svg",bn="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0";function En(){let i=document.createElementNS(he,"svg");for(let[t,n]of Object.entries({viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))i.setAttribute(t,n);let e=document.createElementNS(he,"path");return e.setAttribute("d","M18 6 6 18M6 6l12 12"),i.append(e),i}function yn(){let i=document.createElementNS(he,"svg");for(let[n,s]of Object.entries({viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))i.setAttribute(n,s);let e=document.createElementNS(he,"circle");e.setAttribute("cx","11"),e.setAttribute("cy","11"),e.setAttribute("r","8");let t=document.createElementNS(he,"path");return t.setAttribute("d","m21 21-4.3-4.3"),i.append(e,t),i}function Ot(i){globalThis.process?.env?.NODE_ENV!=="production"&&console.warn(`nish-ui: <nish-command-palette> did not follow an unsafe href (${JSON.stringify(i.slice(0,40))}). Only relative, #, http(s), mailto and tel URLs are followed.`)}function Sn(i){if(!(i instanceof HTMLElement))return!1;let e=i.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"||i.isContentEditable}var we=class extends w{static properties={open:{type:Boolean,reflect:!0},hotkey:{type:Boolean,reflect:!0},placeholder:{type:String},emptyText:{type:String,attribute:"empty-text"},items:{attribute:!1}};#e=++vn;#t=null;#n=null;#i=null;#r=null;#l=null;#o="";#s=0;#a=[];#c=new Map;#h=null;#u;#f=!1;#g=!1;constructor(){super(),this.open=!1,this.hotkey=!1,this.placeholder="",this.emptyText="",this.items=[]}connectedCallback(){if(super.connectedCallback(),this.#d(),this.#t){this.#p();return}this.#f||(this.#f=!0,L(()=>{this.#f=!1,this.isConnected&&this.#m()}))}disconnectedCallback(){super.disconnectedCallback(),this.#y(!1),window.clearTimeout(this.#u),this.#t?.open&&(this.open=!1,this.#t.close())}show(){this.open=!0}close(){this.open=!1}#y(e){e!==this.#g&&(this.#g=e,e?document.addEventListener("keydown",this.#E):document.removeEventListener("keydown",this.#E))}#d(){this.#y(this.hotkey&&this.isConnected)}#E=e=>{e.defaultPrevented||e.isComposing||!(e.ctrlKey||e.metaKey)||e.altKey||e.shiftKey||e.key.toLowerCase()!=="k"||Sn(e.target)||(e.preventDefault(),this.open=!0)};#m(){if(this.#t)return;let e=Array.from(this.querySelectorAll(":scope > a, :scope > button"));if(this.items.length===0&&e.length>0){let c=new Set,d=[];for(let h of e){let u=h.dataset.id||h.getAttribute("href")||`item-${d.length+1}`;for(;c.has(u);)u=`${u}-${d.length+1}`;c.add(u);let g=(h.dataset.keywords??"").split(/[,\s]+/).map(A=>A.trim()).filter(Boolean);d.push({id:u,label:h.textContent?.trim()??u,group:h.dataset.group||void 0,hint:h.dataset.hint||void 0,keywords:g.length?g:void 0,href:h.getAttribute("href")??void 0}),this.#c.set(u,h)}this.items=d}for(let c of e)c.hidden=!0;let t=document.createElement("dialog");t.className="nish-command";let n=`nish-command-list-${this.#e}`,s=document.createElement("input");s.type="text",s.setAttribute("role","combobox"),s.setAttribute("aria-expanded","true"),s.setAttribute("aria-controls",n),s.setAttribute("aria-autocomplete","list"),s.autocomplete="off",s.setAttribute("autocapitalize","off"),s.setAttribute("autocorrect","off"),s.spellcheck=!1,s.addEventListener("input",()=>this.#_(s.value)),s.addEventListener("keydown",c=>this.#A(c)),s.addEventListener("change",c=>c.stopPropagation());let r=document.createElement("div");r.className="nish-command-input";let o=document.createElement("button");o.type="button",o.className="nish-icon-btn",o.append(En()),o.addEventListener("click",()=>{this.open=!1}),r.append(yn(),s,o);let a=document.createElement("div");a.className="nish-command-list",a.id=n,a.setAttribute("role","listbox"),a.addEventListener("mousedown",c=>c.preventDefault()),a.addEventListener("mousemove",c=>{let d=c.target?.closest("[data-index]");if(!d)return;let h=Number(d.dataset.index);h!==this.#s&&this.#b(h,!1)}),a.addEventListener("click",c=>{let d=c.target?.closest("[data-index]"),h=d?this.#a[Number(d.dataset.index)]:void 0;h&&this.#L(h)});let l=document.createElement("span");l.setAttribute("role","status"),l.setAttribute("aria-live","polite"),l.style.cssText=bn,t.append(r,a,l),t.addEventListener("click",this.#C),t.addEventListener("cancel",this.#T),t.addEventListener("close",this.#M),t.addEventListener("keydown",c=>{c.key==="Escape"&&c.stopPropagation()}),this.append(t),this.#t=t,this.#n=s,this.#i=a,this.#r=l,this.#l=o,this.#v(),this.#p()}updated(e){e.has("hotkey")&&this.#d(),(e.has("placeholder")||e.has("emptyText"))&&this.#v(),e.has("items")&&this.#t?.open&&this.#w(),e.has("open")&&this.#p()}stringsChanged(){this.#v(),this.#t?.open&&this.#w(),super.stringsChanged()}#v(){let e=this.#n;if(!e)return;let t=x(),n=this.placeholder||t.searchPlaceholder;e.placeholder=n,e.setAttribute("aria-label",n.replace(/…$/,"")||t.search),this.#t?.setAttribute("aria-label",t.search),this.#l?.setAttribute("aria-label",t.close),this.#i?.setAttribute("aria-label",t.results)}#p(){let e=this.#t;!e||!this.isConnected||(this.open&&!e.open?(this.#h=document.activeElement instanceof HTMLElement?document.activeElement:null,this.#o="",this.#s=0,this.#n&&(this.#n.value=""),e.showModal(),this.#w(),this.#n?.focus()):!this.open&&e.open&&e.close())}#S(e){return`nish-command-${this.#e}-opt-${e}`}#w(){let e=this.#i,t=this.#n;if(!e||!t)return;let n=x();this.#a=nt(this.items,this.#o),this.#s>=this.#a.length&&(this.#s=0),e.textContent="";let s=0,r,o=e;for(let a of this.#a){let l=a.group??null;if(l!==r)if(r=l,l===null)o=e;else{let h=document.createElement("div");h.className="nish-command-group",h.setAttribute("role","group");let u=document.createElement("div");u.id=`nish-command-${this.#e}-group-${s}`,u.textContent=l,h.setAttribute("aria-labelledby",u.id),h.append(u),e.append(h),o=h}let c=document.createElement("div");c.className="nish-command-item",c.id=this.#S(s),c.dataset.index=String(s),c.setAttribute("role","option"),c.setAttribute("aria-selected",s===this.#s?"true":"false");let d=document.createElement("span");if(d.textContent=a.label,c.append(d),a.hint){let h=document.createElement("span");h.className="nish-command-item-hint",h.textContent=a.hint,c.append(h)}o.append(c),s++}if(this.#a.length===0){let a=document.createElement("div");a.className="nish-command-empty",a.textContent=this.emptyText||n.noResults,e.append(a)}this.#a.length?t.setAttribute("aria-activedescendant",this.#S(this.#s)):t.removeAttribute("aria-activedescendant"),this.#r&&(this.#r.textContent=this.#a.length?n.resultCount(this.#a.length):this.emptyText||n.noResults)}#b(e,t=!0){let n=this.#a.length;if(n===0)return;this.#s=(e%n+n)%n;let s=this.#i;if(s){for(let r of Array.from(s.querySelectorAll("[data-index]"))){let o=Number(r.dataset.index)===this.#s;r.setAttribute("aria-selected",o?"true":"false"),o&&t&&r.scrollIntoView?.({block:"nearest"})}this.#n?.setAttribute("aria-activedescendant",this.#S(this.#s))}}#_(e){this.#o=e,this.#s=0,this.#w(),window.clearTimeout(this.#u),this.#u=window.setTimeout(()=>{this.dispatchEvent(new CustomEvent("nish-query",{bubbles:!0,detail:{query:e}}))},200)}#A(e){if(e.isComposing)return;let t=this.#a.length;switch(e.key){case"ArrowDown":e.preventDefault(),this.#b(this.#s+1);break;case"ArrowUp":e.preventDefault(),this.#b(this.#s-1);break;case"Home":t&&!this.#o&&(e.preventDefault(),this.#b(0));break;case"End":t&&!this.#o&&(e.preventDefault(),this.#b(t-1));break;case"Enter":{e.preventDefault();let n=this.#a[this.#s];n&&this.#L(n);break}}}#L(e){let t=this.#c.get(e.id);if(this.open=!1,this.#t?.close(),this.dispatchEvent(new CustomEvent("nish-select",{bubbles:!0,detail:{id:e.id}})),t){let n=t.getAttribute("href");n!==null&&Re(n)===null?Ot(n):t.click()}else if(e.href){let n=Re(e.href);n===null?Ot(e.href):window.location.assign(n)}}#C=e=>{let t=this.#t;if(!t||e.target!==t)return;let n=t.getBoundingClientRect();e.clientX>=n.left&&e.clientX<=n.right&&e.clientY>=n.top&&e.clientY<=n.bottom||(this.open=!1)};#T=e=>{e.preventDefault(),this.open=!1};#M=()=>{window.clearTimeout(this.#u),this.open&&(this.open=!1);let e=this.#h;this.#h=null,e?.isConnected&&e.focus(),this.dispatchEvent(new CustomEvent("nish-close",{bubbles:!0}))}};T("nish-command-palette",we);var It="http://www.w3.org/2000/svg";function Dt(i,e){let t=document.createElementNS(It,"svg");for(let[n,s]of Object.entries({width:String(i),height:String(i),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true",focusable:"false"}))t.setAttribute(n,s);for(let n of e){let s=document.createElementNS(It,"path");s.setAttribute("d",n),t.appendChild(s)}return t}var Ut=i=>Dt(i,["M18 6 6 18M6 6l12 12"]),Bt=i=>Dt(i,["M22 3H2l8 9.46V19l4 2v-8.54L22 3z"]);var Ks=3600*24*365;function wn(i,e){if(typeof document>"u")return()=>{};let t=document.documentElement,n=()=>{let r=i.offsetHeight;r>0?t.style.setProperty(e,`${r}px`):t.style.removeProperty(e)};n();let s;return typeof ResizeObserver<"u"?(s=new ResizeObserver(n),s.observe(i)):window.addEventListener("resize",n),()=>{s?.disconnect(),window.removeEventListener("resize",n),t.style.removeProperty(e)}}function zt(i,e={}){let t=Object.assign(()=>{},{lock:f=>{}});if(typeof document>"u")return t;let n=Array.from(i.querySelectorAll('a[href^="#"]')).filter(f=>f.hash.length>1),s=f=>{try{return document.getElementById(decodeURIComponent(f.hash.slice(1)))}catch{return null}},r=e.height===!1?()=>{}:wn(i,"--nish-sticky-extra"),o=null,a=null,l=null,c=()=>{let f=i.scrollWidth-i.clientWidth,y=getComputedStyle(i).direction==="rtl"?i.scrollLeft+f:i.scrollLeft;i.dataset.atStart=String(y<=1),i.dataset.atEnd=String(f<=1||y>=f-1)},d=f=>{let y=f.getBoundingClientRect().left-i.getBoundingClientRect().left+i.scrollLeft-i.clientLeft,C=i.clientWidth;y<i.scrollLeft+24?i.scrollLeft=Math.max(0,y-24):y+f.offsetWidth>i.scrollLeft+C-24&&(i.scrollLeft=y+f.offsetWidth-C+24)},h=f=>{f!==o&&(o?.removeAttribute("aria-current"),o=f,f&&(f.setAttribute("aria-current","true"),d(f)))},u=()=>{let f=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--nish-header-h"))||0,y=e.offset??f+i.offsetHeight+8,C=n[0]??null;for(let P of n){let F=s(P);F&&F.getBoundingClientRect().top<=y+1&&(C=P)}let de=document.documentElement;if(window.innerHeight+window.scrollY>=de.scrollHeight-2)for(let P of n)s(P)&&(C=P);h(a??C)},g=()=>{l?.(),l=null,a=null},A=f=>{let y=n.find(Ne=>{try{return decodeURIComponent(Ne.hash.slice(1))===f}catch{return!1}});if(!y)return;g(),a=y,h(y);let C=()=>{g(),m()},de=Ne=>{["ArrowUp","ArrowDown","PageUp","PageDown","Home","End"," "].includes(Ne.key)&&C()},P=!1,F=()=>{P=!0},Y=setTimeout(F,400),Je=()=>{P?C():(clearTimeout(Y),Y=setTimeout(F,200))},et=()=>{clearTimeout(Y),Y=setTimeout(F,50)};window.addEventListener("wheel",C,{passive:!0}),window.addEventListener("touchstart",C,{passive:!0}),window.addEventListener("keydown",de),window.addEventListener("scroll",Je,{passive:!0}),window.addEventListener("scrollend",et),l=()=>{clearTimeout(Y),window.removeEventListener("wheel",C),window.removeEventListener("touchstart",C),window.removeEventListener("keydown",de),window.removeEventListener("scroll",Je),window.removeEventListener("scrollend",et)}},p=0,m=()=>{p||(p=requestAnimationFrame(()=>{p=0,u()}))},E=f=>{let y=f.target instanceof Element?f.target.closest('a[href^="#"]'):null;y&&n.includes(y)&&h(y)};c(),u(),window.addEventListener("scroll",m,{passive:!0}),window.addEventListener("resize",m),i.addEventListener("scroll",c,{passive:!0}),i.addEventListener("click",E);let M;return typeof ResizeObserver<"u"&&(M=new ResizeObserver(()=>{c(),m()}),M.observe(i)),Object.assign(()=>{g(),p&&cancelAnimationFrame(p),window.removeEventListener("scroll",m),window.removeEventListener("resize",m),i.removeEventListener("scroll",c),i.removeEventListener("click",E),M?.disconnect(),r(),o?.removeAttribute("aria-current"),delete i.dataset.atStart,delete i.dataset.atEnd},{lock:A})}var _n={md:"(max-width: 767.98px)",lg:"(max-width: 1023.98px)"},Tn=0;function _e(i){let e=document.createElement("div");return e.className=i,e}var Te=class extends w{static properties={activeCount:{attribute:"active-count",type:Number,reflect:!0},sheetTitle:{attribute:"sheet-title",type:String,reflect:!0},sheetBelow:{attribute:"sheet-below",type:String,reflect:!0},sticky:{type:Boolean,reflect:!0}};#e=null;#t=_e("nish-filter-bar-search");#n=_e("nish-filter-bar-chips");#i=_e("nish-filter-bar-trailing");#r=_e("nish-filter-bar-summary");#l=null;#o=null;#s=null;#a=null;#c=null;#h=null;#u=null;#f=null;#g=null;#y=null;#d=[];#E=null;#m=null;#v="";#p=null;#S=()=>this.#T();constructor(){super(),this.activeCount=0,this.sheetTitle="",this.sheetBelow="md",this.sticky=!1}connectedCallback(){super.connectedCallback(),L(()=>this.#w())}disconnectedCallback(){if(super.disconnectedCallback(),this.#m?.removeEventListener("change",this.#S),this.#m=null,this.#v="",this.#p?.disconnect(),this.#p=null,this.#e){this.#c?.close();for(let e of this.#d)this.appendChild(e);for(let e of[this.#t,this.#i,this.#r])for(;e.firstChild;)this.appendChild(e.firstChild);this.#e.remove(),this.#c?.remove(),this.#e=null,this.#l=null,this.#o=null,this.#u=null,this.#f=null,this.#g=null,this.#a=null,this.#c=null,this.#h=null,this.#d=[],this.#E=null}}updated(e){this.#e&&(this.#C(),this.#T())}#w(){if(!this.isConnected||this.#e)return;let e=document.createElement("div");e.className="nish-filter-bar",this.#r.setAttribute("aria-live","polite"),e.append(this.#t,this.#n,this.#i,this.#r),this.#e=e;for(let t of Array.from(this.childNodes))this.#_(t);this.appendChild(e),this.#A(),this.#C(),this.#T(),this.#p=new MutationObserver(t=>{for(let n of t)n.addedNodes.forEach(s=>{s!==e&&s.parentNode===this&&this.#_(s)});this.#T()}),this.#p.observe(this,{childList:!0}),this.#p.observe(this.#n,{childList:!0}),this.#h&&this.#p.observe(this.#h,{childList:!0})}#b(){this.#d=this.#d.filter(e=>e.parentNode===this.#n||e.parentNode===this.#h)}#_(e){if(e===this.#e||e instanceof Comment)return;if(!(e instanceof HTMLElement)){e.parentNode?.removeChild(e);return}let t=e.getAttribute("data-slot");t==="trailing"?this.#i.appendChild(e):t==="summary"?this.#r.appendChild(e):e.localName==="nish-search"&&!this.#t.firstChild?this.#t.appendChild(e):(this.#b(),this.#d.includes(e)||this.#d.push(e),(this.#E==="compact"?this.#h??this.#n:this.#n).appendChild(e))}#A(){let e=++Tn,t=document.createElement("button");t.type="button",t.className="nish-btn nish-btn--secondary nish-filter-btn",t.setAttribute("aria-haspopup","dialog"),this.#o=document.createTextNode(""),t.append(Bt(16),this.#o);let n=document.createElement("span");n.className="nish-badge nish-badge--accent",t.appendChild(n),t.addEventListener("click",()=>this.#c?.show()),this.#l=t,this.#s=n;let s=document.createElement("button");s.type="button",s.className="nish-btn nish-btn--ghost nish-filter-bar-clear",s.addEventListener("click",()=>this.#L()),this.#a=s;let r=document.createElement("nish-sheet"),o=document.createElement("header");o.className="nish-sheet-header";let a=document.createElement("h2");a.className="nish-sheet-title",a.id=`nish-filter-sheet-title-${e}`,o.appendChild(a);let l=document.createElement("button");l.type="button",l.className="nish-icon-btn",l.setAttribute("data-sheet-close",""),this.#f=l,l.appendChild(Ut(16)),o.appendChild(l);let c=document.createElement("div");c.className="nish-sheet-body nish-filter-sheet-body";let d=document.createElement("footer");d.className="nish-sheet-footer";let h=document.createElement("button");h.type="button",h.className="nish-btn nish-btn--ghost",h.addEventListener("click",()=>this.#L());let u=document.createElement("button");u.type="button",u.className="nish-btn nish-btn--primary",u.style.marginInlineStart="auto",this.#g=u,u.addEventListener("click",()=>this.#c?.close()),d.append(h,u),r.append(o,c,d),this.#c=r,this.#h=c,this.#u=h,this.#y=a}#L(){this.dispatchEvent(new CustomEvent("nish-clear",{bubbles:!0}))}#C(){let e=_n[this.sheetBelow==="lg"?"lg":"md"];e!==this.#v&&(this.#m?.removeEventListener("change",this.#S),this.#v=e,this.#m=typeof matchMedia>"u"?null:matchMedia(e),this.#m?.addEventListener("change",this.#S))}#T(){let e=this.#e,t=this.#c,n=this.#h,s=this.#l,r=this.#a;if(!e||!t||!n||!s||!r)return;this.#b();let o=this.#m?.matches?"compact":"wide";o!==this.#E&&(o==="compact"?(this.#n.remove(),r.remove(),this.#t.after(s),n.append(...this.#d),e.appendChild(t)):(t.close(),s.remove(),this.#n.append(...this.#d,r),this.#t.after(this.#n),t.remove()),this.#E=o,e.setAttribute("data-compact",String(o==="compact")));let a=Math.max(0,Number.isFinite(this.activeCount)?Math.floor(this.activeCount):0);e.classList.toggle("nish-filter-bar--sticky",this.sticky),s.hidden=this.#d.length===0,r.hidden=a===0,this.#s&&(this.#s.textContent=String(a),this.#s.hidden=a===0,this.#s.setAttribute("aria-label",x().activeCount(a))),this.#u&&(this.#u.disabled=a===0);let l=x();this.#y&&(this.#y.textContent=this.sheetTitle||l.filters),this.#o&&(this.#o.data=l.filters),r.textContent=l.clearFilters,this.#u&&(this.#u.textContent=l.clear),this.#g&&(this.#g.textContent=l.showResults),this.#f?.setAttribute("aria-label",l.close)}};T("nish-filter-bar",Te);function Vt(i,e){let t=null,n=()=>Array.from(i.querySelectorAll(":scope > a")),s=()=>{let o=location.pathname,a=null,l=-1;for(let c of n()){if(e?.(c),!c.getAttribute("href"))continue;let d;try{d=new URL(c.getAttribute("href"),location.href)}catch{continue}if(d.origin!==location.origin)continue;let h=c.getAttribute("href").trim();if(h==="#"||h.startsWith("?")||d.pathname===location.pathname&&!d.hash&&h.startsWith("#"))continue;if(d.hash&&d.pathname===location.pathname){d.hash===location.hash&&(a=c,l=1/0);continue}let u=d.pathname;(u==="/"?o==="/":o===u||o.startsWith(u.endsWith("/")?u:`${u}/`))&&u.length>l&&(a=c,l=u.length)}if(!a){t?.removeAttribute("aria-current"),t=null;return}for(let c of n())c.removeAttribute("aria-current");a.setAttribute("aria-current","page"),t=a},r=new MutationObserver(()=>{r.disconnect(),s(),r.observe(i,{childList:!0})});return s(),window.addEventListener("popstate",s),window.addEventListener("hashchange",s),r.observe(i,{childList:!0}),()=>{window.removeEventListener("popstate",s),window.removeEventListener("hashchange",s),r.disconnect()}}var Ae=class extends w{static properties={label:{type:String,reflect:!0}};#e=null;#t=null;#n=null;constructor(){super(),this.label=""}connectedCallback(){super.connectedCallback(),L(()=>this.#i())}disconnectedCallback(){super.disconnectedCallback(),this.#n?.disconnect(),this.#n=null,this.#e=null,this.#t?.(),this.#t=null}updated(e){this.#l()}#i(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > nav.nish-nav-rail");if(!e){for(e=document.createElement("nav"),e.className="nish-nav-rail";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#r(e),this.#l(),this.#t=Vt(e,t=>t.classList.add("nish-nav-rail-item")),this.#n=new MutationObserver(t=>{let n=this.#e;if(!n)return;let s=!1;for(let r of t)r.target===this&&r.addedNodes.forEach(o=>{o!==n&&o.nodeType===1&&o.parentNode===this&&(n.appendChild(o),s=!0)});(s||t.some(r=>r.target!==this))&&this.#r(n)}),this.#n.observe(this,{childList:!0}),this.#n.observe(e,{childList:!0,subtree:!0})}#r(e){let t=e.querySelector(':scope > [data-slot="tools"]'),n=e.querySelector(':scope > [data-slot="footer"]');t?.classList.add("nish-nav-rail-tools"),n?.classList.add("nish-nav-rail-footer");let s=[t,n].filter(l=>!!l),r=Array.from(e.children),o=s.length;if(!s.every((l,c)=>r[r.length-o+c]===l))for(let l of s)e.appendChild(l);for(let l of Array.from(e.querySelectorAll(":scope > .nish-nav-rail-tools a, :scope > .nish-nav-rail-footer a")))l.classList.add("nish-nav-rail-item")}#l(){this.#e&&this.#e.setAttribute("aria-label",this.label||x().sections)}};T("nish-nav-rail",Ae);var An='[aria-pressed="true"],[aria-selected="true"],[aria-current]:not([aria-current="false"]),[aria-checked="true"]',Le=class extends w{static properties={label:{type:String,reflect:!0},bleed:{type:Boolean,reflect:!0},snap:{type:Boolean,reflect:!0},fade:{reflect:!0,converter:{fromAttribute:e=>e!=="false",toAttribute:e=>e?null:"false"}}};#e=null;#t=null;#n=null;#i=()=>this.#o();constructor(){super(),this.label="",this.bleed=!1,this.snap=!1,this.fade=!0}connectedCallback(){super.connectedCallback(),L(()=>this.#r())}disconnectedCallback(){super.disconnectedCallback(),this.#e?.removeEventListener("scroll",this.#i),this.#t?.disconnect(),this.#t=null,this.#n?.disconnect(),this.#n=null,this.#e=null}updated(e){this.#s()}#r(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > div.nish-scroll-row");if(!e){for(e=document.createElement("div"),e.className="nish-scroll-row";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#n?.disconnect(),this.#n=new MutationObserver(()=>{let n=this.#e;if(n)for(let s of Array.from(this.childNodes))s!==n&&s.nodeType===1&&n.appendChild(s)}),this.#n.observe(this,{childList:!0}),this.#s(),e.addEventListener("scroll",this.#i,{passive:!0}),typeof ResizeObserver<"u"&&(this.#t=new ResizeObserver(()=>this.#o()),this.#t.observe(e));let t=e.querySelector(An);t&&this.#l(e,t),this.#o()}#l(e,t){let n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),r=8;s.left<n.left+r?e.scrollLeft+=s.left-n.left-r:s.right>n.right-r&&(e.scrollLeft+=s.right-n.right+r)}#o(){let e=this.#e;if(!e)return;let t=e.scrollWidth-e.clientWidth,n=ce(e)?e.scrollLeft+t:e.scrollLeft;e.dataset.atStart=String(n<=1),e.dataset.atEnd=String(t<=1||n>=t-1)}#s(){let e=this.#e;e&&(this.label?e.setAttribute("aria-label",this.label):e.removeAttribute("aria-label"),e.classList.toggle("nish-scroll-row--bleed",this.bleed),e.classList.toggle("nish-scroll-row--snap",this.snap),e.classList.toggle("nish-scroll-row--no-fade",!this.fade))}};T("nish-scroll-row",Le);var Wt={fromAttribute:i=>i!=="false",toAttribute:i=>i?null:"false"},Ce=class extends w{static properties={label:{type:String,reflect:!0},sticky:{reflect:!0,converter:Wt},updateHash:{attribute:"update-hash",reflect:!0,converter:Wt}};#e=null;#t=null;#n=null;#i=null;#r=e=>this.#c(e);constructor(){super(),this.label="",this.sticky=!0,this.updateHash=!0}connectedCallback(){super.connectedCallback(),L(()=>this.#l())}disconnectedCallback(){super.disconnectedCallback(),this.#t?.(),this.#t=null,this.#s=null,this.#n?.disconnect(),this.#n=null,this.#i?.disconnect(),this.#i=null,this.#e?.removeEventListener("click",this.#r),this.#e=null}updated(e){this.#o()}#l(){if(!this.isConnected||this.#e)return;let e=this.querySelector(":scope > nav.nish-subnav");if(!e){for(e=document.createElement("nav"),e.className="nish-subnav";this.firstChild;)e.appendChild(this.firstChild);this.appendChild(e)}this.#e=e,this.#o(),e.addEventListener("click",this.#r),this.#a(e),this.#n=new MutationObserver(()=>{this.#t?.(),this.#a(e)}),this.#n.observe(e,{childList:!0}),this.#i=new MutationObserver(()=>{let t=this.#e;if(t)for(let n of Array.from(this.childNodes))n!==t&&n.nodeType===1&&t.appendChild(n)}),this.#i.observe(this,{childList:!0})}#o(){let e=this.#e;e&&(e.setAttribute("aria-label",this.label||x().onThisPage||K.onThisPage),e.style.position=this.sticky?"":"static",this.#s!==null&&this.#s!==this.sticky&&this.#a(e))}#s=null;#a(e){this.#t?.(),this.#t=zt(e,{height:this.sticky}),this.#s=this.sticky}#c(e){let t=e.target instanceof Element?e.target.closest('a[href^="#"]'):null;if(!t||!this.#e?.contains(t)||t.hash.length<2||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n;try{n=decodeURIComponent(t.hash.slice(1))}catch{return}let s=document.getElementById(n);if(!s)return;e.preventDefault();let r=typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;if(this.#t?.lock(n),s.scrollIntoView({behavior:r?"auto":"smooth",block:"start"}),!s.hasAttribute("tabindex")&&!s.matches("a[href],button,input,select,textarea,summary")&&(s.tabIndex=-1),s.focus({preventScroll:!0}),this.updateHash)try{history.replaceState(history.state,"",`#${t.hash.slice(1)}`)}catch{}this.dispatchEvent(new CustomEvent("nish-select",{bubbles:!0,detail:{id:n}}))}};T("nish-section-nav",Ce);var Ft=5,Ln="(max-width: 639.98px) and (pointer: coarse)";function Ze(i,e){let t=()=>Array.from({length:e},()=>100/e);if(e===0)return[];if(!i||i.length!==e||!i.every(s=>Number.isFinite(s)&&s>0))return t();let n=i.reduce((s,r)=>s+r,0);return i.map(s=>s/n*100)}var Cn={fromAttribute(i){if(i==null||i.trim()==="")return null;let e=i.split(",").map(t=>Number(t.trim()));return e.every(t=>Number.isFinite(t))?e:null},toAttribute(i){return i&&i.length?i.map(e=>Math.round(e*100)/100).join(","):null}},Me=class extends w{static properties={orientation:{type:String,reflect:!0},sizes:{converter:Cn,reflect:!0},min:{type:Number},storageKey:{type:String,attribute:"storage-key"}};#e=[];#t=[];#n=null;#i=null;#r=!1;#l=null;#o=!1;#s=!1;#a=!1;constructor(){super(),this.orientation="row",this.sizes=null,this.min=120,this.storageKey=null}connectedCallback(){if(super.connectedCallback(),typeof window.matchMedia=="function"&&(this.#i=window.matchMedia(Ln),this.#r=this.#i.matches,this.#i.addEventListener("change",this.#y)),this.#s){this.#c(),this.#h();return}this.#o||(this.#o=!0,L(()=>{this.#o=!1,this.isConnected&&(this.#s=!0,this.#c(),this.#h())}))}disconnectedCallback(){super.disconnectedCallback(),this.#i?.removeEventListener("change",this.#y),this.#i=null,this.#n?.disconnect(),this.#n=null,this.#b()}updated(e){this.#s&&(e.size===0||e.has("orientation")||e.has("sizes")||e.has("min"))&&this.#g()}#c(){typeof MutationObserver>"u"||(this.#n??=new MutationObserver(()=>this.#h()),this.#n.observe(this,{childList:!0}))}#h(){if(!this.isConnected)return;this.#n?.disconnect();let e=[];for(let t of Array.from(this.childNodes)){if(!(t instanceof HTMLElement))continue;if(t.classList.contains("nish-split-divider")){t.remove();continue}if(t.classList.contains("nish-split-pane")){e.push(t);continue}let n=document.createElement("div");n.className="nish-split-pane",this.insertBefore(n,t),n.append(t),e.push(n)}this.#e=e,this.#t=[];for(let t=0;t<e.length-1;t++){let n=document.createElement("div");n.className="nish-split-divider",n.setAttribute("role","separator"),n.tabIndex=0,n.style.touchAction="none",n.addEventListener("pointerdown",s=>this.#p(s,t)),n.addEventListener("pointermove",s=>this.#S(s)),n.addEventListener("pointerup",s=>this.#w(s)),n.addEventListener("pointercancel",s=>this.#w(s)),n.addEventListener("keydown",s=>this.#A(s,t)),n.addEventListener("dblclick",()=>this.#_()),this.insertBefore(n,e[t+1]),this.#t.push(n)}this.#u(),this.#g(),this.#n?.observe(this,{childList:!0})}#u(){if(!(this.#a||!this.storageKey||this.#e.length===0)){this.#a=!0;try{let e=window.localStorage.getItem(this.storageKey);if(!e)return;let t=JSON.parse(e);Array.isArray(t)&&t.length===this.#e.length&&t.every(n=>typeof n=="number"&&Number.isFinite(n)&&n>0)&&(this.sizes=Ze(t,this.#e.length))}catch{}}}get#f(){return Ze(this.sizes,this.#e.length)}#g(){let e=this.orientation!=="column",t=this.#f,n=x();this.classList.add("nish-split"),this.style.display="flex",this.style.flexDirection=this.#r?"column":e?"row":"column",this.style.minWidth="0",this.style.minHeight="0",this.#e.forEach((s,r)=>{s.style.minWidth="0",this.#r?(s.style.minHeight="var(--nish-split-stack-h, 16rem)",s.style.flex="none"):(s.style.minHeight="0",s.style.flex=`${t[r]} 1 0%`);let o=s.children.length===1?s.firstElementChild:null;o?.localName==="nish-split"&&(s.style.display="flex",o.style.flex="1 1 auto")}),this.#t.forEach((s,r)=>{s.hidden=this.#r,s.classList.toggle("nish-split-divider--v",e),s.classList.toggle("nish-split-divider--h",!e),s.setAttribute("aria-orientation",e?"vertical":"horizontal"),s.setAttribute("aria-label",e?n.resizeColumns:n.resizeRows),s.setAttribute("aria-valuenow",String(Math.round(t[r]))),s.setAttribute("aria-valuemin","0"),s.setAttribute("aria-valuemax","100")})}#y=e=>{this.#r=e.matches,this.#g()};#d(e){let t=e.getBoundingClientRect();return this.orientation==="column"?t.height:t.width}#E(e,t,n,s){let r=e[t]+e[t+1],o=Math.min(s,r/2),a=Math.min(Math.max(e[t]+n,o),r-o),l=e.slice();return l[t]=a,l[t+1]=r-a,l}#m(e){if(this.storageKey)try{window.localStorage.setItem(this.storageKey,JSON.stringify(e))}catch{}}#v(e){this.sizes=e,this.dispatchEvent(new CustomEvent("nish-resize",{bubbles:!0,detail:{sizes:e}}))}#p(e,t){if(e.button!==0||this.#r)return;let n=this.#t[t];if(!n)return;e.preventDefault(),n.setPointerCapture?.(e.pointerId);let s=[];for(let o of Array.from(this.querySelectorAll("iframe")))s.push([o,o.style.pointerEvents]),o.style.pointerEvents="none";let r=this.#e.reduce((o,a)=>o+this.#d(a),0);this.#l={pointerId:e.pointerId,start:this.orientation==="column"?e.clientY:e.clientX,index:t,sizes:this.#f,total:r,restore:s},this.setAttribute("data-dragging","")}#S(e){let t=this.#l;if(!t||t.pointerId!==e.pointerId||t.total<=0)return;let n=this.orientation==="column"?e.clientY:e.clientX,s=this.orientation!=="column"&&ce(this)?-1:1,r=(n-t.start)*s/t.total*100;r!==0&&this.#v(this.#E(t.sizes,t.index,r,this.min/t.total*100))}#w(e){let t=this.#l;if(!t||t.pointerId!==e.pointerId)return;let n=this.#t[t.index];n?.hasPointerCapture?.(e.pointerId)&&n.releasePointerCapture(e.pointerId),this.#b()}#b(){let e=this.#l;if(e){this.#l=null,this.sizes&&this.#m(this.sizes);for(let[t,n]of e.restore)t.style.pointerEvents=n;this.removeAttribute("data-dragging")}}#_(){if(this.#r||this.#e.length<2)return;let e=Ze(null,this.#e.length);this.#v(e),this.#m(e)}#A(e,t){if(e.key==="Enter"){e.preventDefault(),this.#_();return}let n=this.orientation!=="column",s=n&&ce(this),r=n?s?"ArrowRight":"ArrowLeft":"ArrowUp",o=n?s?"ArrowLeft":"ArrowRight":"ArrowDown";if(e.key!==r&&e.key!==o)return;e.preventDefault();let a=this.#e.reduce((h,u)=>h+this.#d(u),0),l=a>0?this.min/a*100:0,c=this.#f,d=this.#E(c,t,e.key===o?Ft:-Ft,l);d[t]!==c[t]&&(this.#v(d),this.#m(d))}};T("nish-split",Me);var Qe="http://www.w3.org/2000/svg";function Mn(){let i=document.createElementNS(Qe,"svg");i.setAttribute("width","10"),i.setAttribute("height","10"),i.setAttribute("viewBox","0 0 10 10"),i.setAttribute("aria-hidden","true"),i.setAttribute("focusable","false");for(let e of["M2 4 5 1l3 3","M2 6l3 3 3-3"]){let t=document.createElementNS(Qe,"path");t.setAttribute("d",e),t.setAttribute("fill","none"),t.setAttribute("stroke","currentColor"),t.setAttribute("stroke-width","1.5"),t.setAttribute("opacity","0.35"),i.appendChild(t)}return i}function xn(i){return(i.target instanceof Element?i.target:i.target.parentElement)?.closest("thead")?!0:Array.from(i.addedNodes).some(t=>t instanceof Element&&(t.localName==="thead"||t.localName==="table"||t.localName==="tr"||t.localName==="th"||t.querySelector("thead")!==null))}var Nn={k:1e3,K:1e3,M:1e6,B:1e9,T:1e12},Rn=new Set(["USD","EUR","GBP","CHF","JPY","CAD","AUD","NZD","SEK","NOK","DKK","PLN","CZK","HUF","INR","CNY","KRW","BRL","MXN","ZAR","SGD","HKD","AED","TRY","RUB","ILS","THB","US","CA","AU","NZ","HK","kr","R","Rs","Fr","A","C"]);function kn(i){let e=i.replace(/−/g,"-").replace(/[\s,%]/g,"").replace(/\p{Sc}/gu,""),t=0;for(;t<e.length&&t<4&&/[A-Za-z]/.test(e[t]);)t++;t>0&&t<=3&&t<e.length&&/\d/.test(e[t])&&Rn.has(e.slice(0,t))||(t=0);let n=/^([+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)([a-z/]*)$/i.exec(e.slice(t));if(!n)return null;let s=n[2]==="B"&&/\sB\s*$/.test(i),r=Number(n[1])*(s?1:Nn[n[2]]??1);return Number.isFinite(r)?r:null}var $n=/^[\u2013\u2014]$/,xe=class extends w{static properties={manual:{type:Boolean,reflect:!0}};#e=null;#t=e=>this.#a(e);constructor(){super(),this.manual=!1}connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.#t),L(()=>this.#n())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("click",this.#t),this.#e?.disconnect(),this.#e=null}#n(){!this.isConnected||this.#e||(this.#l(),this.#e=new MutationObserver(e=>{e.some(xn)&&(this.#e?.disconnect(),this.#l(),this.#i())}),this.#i())}#i(){this.#e?.observe(this,{childList:!0,subtree:!0})}#r(){return Array.from(this.querySelectorAll("thead th[data-sort]"))}#l(){for(let e of this.#r()){if(e.hasAttribute("scope")||e.setAttribute("scope","col"),e.hasAttribute("aria-sort")||e.setAttribute("aria-sort","none"),e.querySelector(":scope > .nish-th-sort"))continue;let t=document.createElement("button");for(t.type="button",t.className="nish-th-sort";e.firstChild;)t.appendChild(e.firstChild);t.appendChild(Mn()),e.appendChild(t),this.#o(e)}}#o(e){let t=e.querySelectorAll(".nish-th-sort svg path"),n=e.getAttribute("aria-sort");t[0]?.setAttribute("opacity",n==="ascending"?"1":"0.35"),t[1]?.setAttribute("opacity",n==="descending"?"1":"0.35")}#s(e){let t=e.getAttribute("data-sort");if(t)return t;let n=e.querySelector(".nish-th-sort"),s="";return(n??e).childNodes.forEach(r=>{(r.nodeType===Node.TEXT_NODE||r instanceof HTMLElement&&r.namespaceURI!==Qe)&&(s+=r.textContent??"")}),s.trim()}#a(e){let n=e.target?.closest(".nish-th-sort"),s=n?.closest("th[data-sort]");if(!n||!s||!this.contains(s))return;let r=s.getAttribute("aria-sort")==="ascending"?"descending":"ascending";for(let o of this.#r())o.setAttribute("aria-sort",o===s?r:"none"),this.#o(o);this.manual||this.#c(s,r),this.dispatchEvent(new CustomEvent("nish-sort",{bubbles:!0,detail:{column:this.#s(s),direction:r==="ascending"?"asc":"desc"}}))}#c(e,t){let n=e.cellIndex,s=t==="ascending"?1:-1,r=e.closest("table");if(!r)return;let o=new Intl.Collator(void 0,{sensitivity:"base",numeric:!0});for(let a of Array.from(r.tBodies)){let l=Array.from(a.rows).map((p,m)=>{let E=p.cells[n],M=E?(E.getAttribute("data-value")??E.textContent??"").trim():"",D=$n.test(M)?"":M;return{row:p,key:D,num:kn(D),order:m}}),c=l.filter(p=>p.key!==""),d=l.filter(p=>p.key===""),h=e.classList.contains("nish-th--num")||c.length>0&&c.every(p=>p.num!==null),u=h?c.filter(p=>p.num!==null):c,g=h?c.filter(p=>p.num===null):[];u.sort((p,m)=>(h?p.num-m.num:o.compare(p.key,m.key))*s||p.order-m.order),g.sort((p,m)=>o.compare(p.key,m.key)*s||p.order-m.order);let A=document.createDocumentFragment();for(let p of[...u,...g,...d])A.appendChild(p.row);a.appendChild(A)}}};T("nish-table-sort",xe);export{we as NishCommandPalette,w as NishElement,Te as NishFilterBar,Ae as NishNavRail,Le as NishScrollRow,Ce as NishSectionNav,Me as NishSplit,xe as NishTableSort,fn as configureStrings,T as define};
|
|
6
5
|
/*! Bundled license information:
|
|
7
6
|
|
|
8
7
|
@lit-labs/ssr-dom-shim/lib/element-internals.js:
|