@livenetworks/ashlar 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(){"use strict";function K(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function D(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!D(r))return}e.apply(console,t)}}function we(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function z(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(i),i}function T(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){T(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function q(e){return e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.tagName==="DATA"&&e.hasAttribute("value")?e.getAttribute("value"):e.textContent.trim()}function pe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function be(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const o=s[c];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let c=0;c<s.length;c++){const o=s[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&l[o.name]===1?i[o.name]=o.checked:(i[o.name]||(i[o.name]=[]),o.checked&&i[o.name].push(o.value));else if(o.type==="radio")o.checked&&(i[o.name]=o.value);else if(o.type==="select-multiple"){i[o.name]=[];for(let u=0;u<o.options.length;u++)o.options[u].selected&&i[o.name].push(o.options[u].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const u=Number(o.value);i[o.name]=o.value===""||isNaN(u)?null:u}else i[o.name]=o.value}return i}function ge(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function me(e,t){const n=e.elements,r=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const o=t[c];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(i[l.name]>1){const u=String(o).split(",").map(function(h){return h.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=ge(o);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let u=0;u<l.options.length;u++)l.options[u].selected=o.indexOf(l.options[u].value)!==-1;r.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=me,window.lnCore.serializeForm=be,window.lnCore.resolveFormMethod=pe);const P={};function ye(e,t){P[e]=t}function Ce(e){return P[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ye,window.lnCore.getDataMapper=Ce);function Ae(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function _e(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,T(function(){new MutationObserver(function(){we(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Q={};function ve(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];Q[n]=t}function Se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Q[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ve,window.lnCore.getLocaleFallback=Se,window.lnCore.ensureLocaleObserver=_e);const F={};function xe(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function J(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const c=r[l],o=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const h=o[u].trim().split(":");if(h.length!==2)continue;const f=h[0].trim(),A=h[1].trim();t[A]!=null&&c.setAttribute(f,t[A])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const c=i[l],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],o=c.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const h=o[u].trim().split(":");if(h.length!==2)continue;const f=h[0].trim(),A=h[1].trim();A in t&&c.classList.toggle(f,!!t[A])}}return e}function ke(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)J(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function G(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],c=l.attributes;for(let o=0;o<c.length;o++){const u=c[o];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Ee(e,t,n,r,i,s){const l={};for(let o=0;o<e.children.length;o++){const u=e.children[o],h=u.getAttribute("data-ln-render-key");h&&(l[h]=u)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],h=String(r(u));let f=l[h];if(f)i(f,u,o);else{const A=xe(n,s);if(!A||(G(A,u),f=A.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",h),i(f,u,o)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=G,window.lnCore.fill=J,window.lnCore.lnFill=ke,window.lnCore.renderList=Ee);function L(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function X(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function Y(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function Z(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const N=new Map;function ee(e,t){const n=(e?e.join("|"):"")+"::"+t;if(N.has(n))return N.get(n);const r=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&r.has(c)?c:t};return N.set(n,i),i}function te(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ne(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function re(e,t,n,r,i){if(!e||t===null)return!0;const s=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=o=>{i?console.warn(o,i):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${s}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function oe(e,t,n){for(const r in n){const[i,s,l]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function ie(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=ee(r.values,r.fallback);break;case"integer":i=X;break;case"float":i=te;break;case"boolean":i=Y;break;case"list":i=Z;break;case"json":i=ne;break;case"string":default:i=L;break}i||(i=L),t[r.prop]=[i,n,r.fallback]}return t}function Ie(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function Te(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=oe,window.lnCore.attrSpec=ie,window.lnCore.attrStr=L,window.lnCore.attrInt=X,window.lnCore.attrBool=Y,window.lnCore.attrList=Z,window.lnCore.attrEnum=ee,window.lnCore.attrFloat=te,window.lnCore.attrJson=ne);function k(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function le(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&k(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let o=0;o<c.length;o++)k(c[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function R(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function se(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Oe(e){const t=se(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Te(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ce(e,t,n,r){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function De(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=se(),i=r.byAttr.get(t),s=K()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&D(l)){const c=r.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let u=0;u<c.length;u++)re(c[u].spec,o,t,c[u].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&ce(c,l,t,e.oldValue),r.reactiveWildcard.length&&ce(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const o=i[c];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(le(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function qe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{De(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function B(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function M(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Fe(e){const t=$();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=B();if(e.target&&r.length)for(let i=0;i<r.length;i++){const s=r[i],l=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)s.matches&&s.matches(o.query)&&k(s,o);else if(s.matches&&s.matches(o.query)&&k(s,o),s.querySelectorAll){const u=s.querySelectorAll(o.query);for(let h=0;h<u.length;h++)k(u[h],o)}}o.onInit&&o.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],u=o.query;if(u){if(!l)s.matches&&s.matches(u)&&M(s,o);else if(s.matches&&s.matches(u)&&M(s,o),s.querySelectorAll){const h=s.querySelectorAll(u);for(let f=0;f<h.length;f++)M(h[f],o)}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Fe(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ne(e){$().push(e),e.onSubtreeChange&&e.query&&B().push(e),ae()}function ue(e,t,n,r,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,o=i.onInit||null,u=i.onAttrChange||null,h=i.effects||null,f=i.attributes||null,A=f?Ie(f):h,d=f?new Set(Object.keys(f)):null,g=i.persist||null;function a(y){const C=y||document.body;if(le(C,e,t,n),f&&K())for(const S in f){const U=f[S],E=Array.from(C.querySelectorAll("["+S+"]"));C.matches&&C.matches("["+S+"]")&&E.push(C);for(let I=0;I<E.length;I++){const x=E[I];D(x)&&re(U,x.getAttribute(S),S,r,x)}}o&&o(C)}const b=[];if(e.indexOf("[")!==-1){const y=/\[([\w-]+)/g;let C;for(;(C=y.exec(e))!==null;)b.push(C[1])}else b.push(e);Oe({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:o,observed:b.concat(s),onAttributeChange:l,onAttrChange:u,effects:A,declared:d,persist:g}),qe();const w=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,p=i.subtreeQuery||(w?e:"["+e+"]"),m={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:c,query:p};$().push(m),c&&p&&B().push(m),ae(),window[t]=a,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ue,window.lnCore.observeLifecycle=Ne);function v(){Le()>0?R(function(){a(document.body)}):a(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",v):v(),a}function Re(e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];if(!(r===""||r==null)&&(t=!0,!Number.isFinite(Number(r))))return"string"}return t?"number":"string"}function $e(e,t,n,r){if(n==="number"){const l=parseFloat(e),c=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(c)?0:c)}const i=e!=null?String(e):"",s=t!=null?String(t):"";return r?r.compare(i,s):i<s?-1:i>s?1:0}function de(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,n={},r=de(t);if(!r)return n;const i=r.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const c=l.indexOf(":"),o=c>-1?l.slice(0,c):l,u=c>-1?l.slice(c+1):"";if(o)try{n[o]=decodeURIComponent(u)}catch{n[o]=u}}return n}function H(e){if(!e)return null;const t=j();return e in t?t[e]:null}function fe(e,t){if(!e)return;const n=j();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");de(location.hash)!==i&&(location.hash=i)}function Be(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function O(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function he(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function V(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function je(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),i=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=H,window.lnCore.hashSet=fe,window.lnCore.hashLinkClick=Be,window.lnCore.resolveHashNamespace=O,window.lnCore.hashSortEncode=he,window.lnCore.hashSortDecode=V,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=je);function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He);function _(e){const t=String(e||"").trim().toLowerCase();return t==="asc"||t==="ascending"?"asc":t==="desc"||t==="descending"?"desc":"none"}function Ve(e){const t=_(e);return t==="asc"?"ascending":t==="desc"?"descending":"none"}function We(e,t){return!e||!t?!1:e.field!==null&&e.field!==void 0&&t.field!==null&&t.field!==void 0?e.field===t.field:e.column!==null&&e.column!==void 0&&t.column!==null&&t.column!==void 0?String(e.column)===String(t.column):!1}function Ue(e,t,n,r){const i=_(e);if(i==="none")return()=>0;const s=i==="desc"?-1:1,l=typeof r=="function"?r:c=>c;return function(c,o){const u=l(c),h=l(o);return $e(u,h,t,n)*s}}function W(e){return!!(!e||typeof e!="object"||e.nodeType!==1||e.tagName==="TEMPLATE"||typeof e.hasAttribute=="function"&&(e.hasAttribute("data-ln-sort-exclude")||e.hasAttribute("hidden"))||e.classList&&e.classList.contains("hidden")||e.style&&e.style.display==="none"||typeof e.matches=="function"&&e.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]"))}function Ke(e,t){if(!e||typeof e!="object"||e.nodeType!==1)return[];const n=t||(typeof e.getAttribute=="function"?e.getAttribute("data-ln-sort-items"):null)||null;if(n&&typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll(n));if(e.tagName==="TABLE"){const r=e.tBodies&&e.tBodies.length?e.tBodies[0]:typeof e.querySelector=="function"?e.querySelector("tbody"):null;if(r)return Array.from(r.children||[]);if(typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll("tbody tr, tr"))}return Array.from(e.children||[])}(function(){const e="data-ln-sort",t="lnSort",n="data-ln-sort-field",r="data-ln-sort-state",i="data-ln-sort-dir",s="data-ln-hash";if(window[t]!==void 0)return;function l(d,g){return d.getAttribute(g)||null}const c={"data-ln-sort":{prop:"targetId",type:"string",read:L,fallback:null,description:"Target table or list element ID to sort"},"data-ln-sort-field":{prop:"field",type:"string",read:l,effect:A,description:"Field name or column key to sort by"},"data-ln-sort-dir":{type:"enum",values:["asc","desc"],fallback:"asc",description:"Default or requested sort direction"},"data-ln-sort-items":{prop:"itemsSelector",type:"string",read:l,description:"CSS selector matching sortable child items"},"data-ln-sort-state":{type:"enum",values:["asc","desc","none"],fallback:"none",effect:A,description:"Active sort state applied to column or control"},"data-ln-hash":{type:"string",effect:A,description:"URL hash routing key for sort state persistence"}},o=ie(c),u=new WeakMap;function h(d,g,a){if(g){const b=d.querySelector('[data-ln-field="'+g+'"]');return b?q(b):""}return a!=null&&d.cells&&d.cells[a]?q(d.cells[a]):q(d)}function f(d){this.dom=d,oe(this,d,o);const g=d.closest("th");this.column=!this.field&&g?g.cellIndex:null,this._state=_(d.getAttribute(r)),d.hasAttribute(r)||d.setAttribute(r,this._state),this._destroyed=!1,this.nsKey=O(d,"sort"),this.hashEnabled=!!this.nsKey;const a=this;this._onClick=function(w){const p=w.target.closest("["+i+"]");if(!p)return;const m=_(p.getAttribute(i));a._apply(m)},d.addEventListener("click",this._onClick),this._onSortChange=function(w){if(a._destroyed||!w.detail)return;const p=a._resolveTarget();if(!(p&&(w.target===p||p.contains(w.target))||w.detail.targetId&&w.detail.targetId===a.targetId))return;if(We({field:a.field,column:a.column},{field:w.detail.field,column:w.detail.column})){const y=_(w.detail.direction);y&&d.getAttribute(r)!==y&&(a._state=y,d.setAttribute(r,y),a._updateAriaSort(y));return}d.getAttribute(r)!=="none"&&(a._state="none",d.setAttribute(r,"none"),a._updateAriaSort("none"))},document.addEventListener("ln-sort:change",this._onSortChange),this._onHashChange=function(){if(a._destroyed||!a.hashEnabled)return;const w=H(a.nsKey),p=V(w);if(p)a.field!==null&&p.fieldOrColumn===a.field||a.column!==null&&String(a.column)===p.fieldOrColumn?a._state!==p.direction&&a._apply(p.direction,!0):a._state!=="none"&&(a._state="none",d.setAttribute(r,"none"),a._updateAriaSort("none"));else if(a._state!=="none"){a._state="none",d.setAttribute(r,"none"),a._updateAriaSort("none");const m=a._resolveTarget();m&&(z(m,"ln-sort:change",{field:a.field,column:a.column,direction:"none",targetId:a.targetId}).defaultPrevented||a._defaultSort(m,"none"))}},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange);let b=!1;if(this.hashEnabled){const w=H(this.nsKey),p=V(w);p&&((a.field!==null&&p.fieldOrColumn===a.field||a.column!==null&&String(a.column)===p.fieldOrColumn)&&R(function(){a._destroyed||a._apply(p.direction,!0)}),b=!0)}if(!b){const w=_(d.getAttribute(r));w&&w!=="none"&&R(function(){a._destroyed||a._apply(w,!0)})}return this}f.prototype._resolveTarget=function(){return document.getElementById(this.targetId)},f.prototype._updateAriaSort=function(d){const g=this.dom.closest("th");g&&g.setAttribute("aria-sort",Ve(d))},f.prototype._apply=function(d,g){if(this._destroyed)return;if(!this.field&&this.column===null){const m=this.dom.closest("th");m&&m.cellIndex!==void 0&&(this.column=m.cellIndex)}const a=_(d);this._state=a,this.dom.getAttribute(r)!==a&&this.dom.setAttribute(r,a),this._updateAriaSort(a);const b=this._resolveTarget();if(!b)return;const w={field:this.field,column:this.column,direction:a,targetId:this.targetId};if(!g&&this.hashEnabled){const m=he(this.field!==null?this.field:this.column,a);fe(this.nsKey,m)}z(b,"ln-sort:change",w).defaultPrevented||this._defaultSort(b,a)},f.prototype._defaultSort=function(d,g){const a=Ke(d,this.itemsSelector);if(!a.length)return;const b=a[0].parentNode,w=a.filter(function(y){return!W(y)});if(!w.length)return;u.has(d)||u.set(d,w.slice());let p;if(g==="none"){const y=u.get(d)||w;u.delete(d),p=y.filter(function(C){return C.parentNode===b&&!W(C)})}else{const y=this.field,C=this.column,S=w.map(function(x){return h(x,y,C)}),U=Re(S),E=typeof Intl<"u"?new Intl.Collator(Ae(this.dom),{sensitivity:"base",numeric:!0}):null,I=Ue(g,U,E,function(x){return h(x,y,C)});p=w.slice().sort(I)}const m=document.createDocumentFragment();let v=0;for(let y=0;y<a.length;y++){const C=a[y];W(C)?m.appendChild(C):v<p.length&&m.appendChild(p[v++])}b.appendChild(m)},f.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.dom.removeEventListener("click",this._onClick),document.removeEventListener("ln-sort:change",this._onSortChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),delete this.dom[t])};function A(d,g){const a=d[t];if(!(!a||a._destroyed))if(g===n){const b=d.closest("th");a.column=!a.field&&b?b.cellIndex:null}else if(g===r){const b=_(d.getAttribute(r));b!==a._state&&a._apply(b)}else g===s&&(a.hashEnabled&&a._onHashChange&&window.removeEventListener("hashchange",a._onHashChange),a.nsKey=O(d,"sort"),a.hashEnabled=!!a.nsKey,a.hashEnabled&&window.addEventListener("hashchange",a._onHashChange))}ue(e,t,f,"ln-sort",{attributes:c,persist:{attr:r,hashActive:function(d){return!!O(d,"sort")}}})})()})();
1
+ (function(){"use strict";function K(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function D(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!D(r))return}e.apply(console,t)}}function we(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function z(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(i),i}function T(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){T(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function q(e){return e.hasAttribute("value")?e.getAttribute("value"):e.hasAttribute("data-ln-value")?e.getAttribute("data-ln-value"):e.tagName==="TIME"&&e.hasAttribute("datetime")?e.getAttribute("datetime"):e.textContent.trim()}function pe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function be(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},s=e.elements,l={};if(n)for(let c=0;c<s.length;c++){const o=s[c];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let c=0;c<s.length;c++){const o=s[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&l[o.name]===1?i[o.name]=o.checked:(i[o.name]||(i[o.name]=[]),o.checked&&i[o.name].push(o.value));else if(o.type==="radio")o.checked&&(i[o.name]=o.value);else if(o.type==="select-multiple"){i[o.name]=[];for(let u=0;u<o.options.length;u++)o.options[u].selected&&i[o.name].push(o.options[u].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const u=Number(o.value);i[o.name]=o.value===""||isNaN(u)?null:u}else i[o.name]=o.value}return i}function ge(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function me(e,t){const n=e.elements,r=[],i={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const o=t[c];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(i[l.name]>1){const u=String(o).split(",").map(function(h){return h.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=ge(o);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let u=0;u<l.options.length;u++)l.options[u].selected=o.indexOf(l.options[u].value)!==-1;r.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=me,window.lnCore.serializeForm=be,window.lnCore.resolveFormMethod=pe);const P={};function ye(e,t){P[e]=t}function Ce(e){return P[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ye,window.lnCore.getDataMapper=Ce);function Ae(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function _e(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,T(function(){new MutationObserver(function(){we(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Q={};function ve(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];Q[n]=t}function Se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Q[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ve,window.lnCore.getLocaleFallback=Se,window.lnCore.ensureLocaleObserver=_e);const F={};function xe(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function J(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const c=r[l],o=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const h=o[u].trim().split(":");if(h.length!==2)continue;const f=h[0].trim(),A=h[1].trim();t[A]!=null&&c.setAttribute(f,t[A])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const c=i[l],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],o=c.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const h=o[u].trim().split(":");if(h.length!==2)continue;const f=h[0].trim(),A=h[1].trim();A in t&&c.classList.toggle(f,!!t[A])}}return e}function ke(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)J(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function G(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const l=i[s],c=l.attributes;for(let o=0;o<c.length;o++){const u=c[o];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Ee(e,t,n,r,i,s){const l={};for(let o=0;o<e.children.length;o++){const u=e.children[o],h=u.getAttribute("data-ln-render-key");h&&(l[h]=u)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],h=String(r(u));let f=l[h];if(f)i(f,u,o);else{const A=xe(n,s);if(!A||(G(A,u),f=A.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",h),i(f,u,o)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=G,window.lnCore.fill=J,window.lnCore.lnFill=ke,window.lnCore.renderList=Ee);function L(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function X(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function Y(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function Z(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const N=new Map;function ee(e,t){const n=(e?e.join("|"):"")+"::"+t;if(N.has(n))return N.get(n);const r=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&r.has(c)?c:t};return N.set(n,i),i}function te(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ne(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function re(e,t,n,r,i){if(!e||t===null)return!0;const s=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=o=>{i?console.warn(o,i):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${s}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function oe(e,t,n){for(const r in n){const[i,s,l]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function ie(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=ee(r.values,r.fallback);break;case"integer":i=X;break;case"float":i=te;break;case"boolean":i=Y;break;case"list":i=Z;break;case"json":i=ne;break;case"string":default:i=L;break}i||(i=L),t[r.prop]=[i,n,r.fallback]}return t}function Ie(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function Te(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=oe,window.lnCore.attrSpec=ie,window.lnCore.attrStr=L,window.lnCore.attrInt=X,window.lnCore.attrBool=Y,window.lnCore.attrList=Z,window.lnCore.attrEnum=ee,window.lnCore.attrFloat=te,window.lnCore.attrJson=ne);function k(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function le(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&k(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let o=0;o<c.length;o++)k(c[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function R(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function se(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Oe(e){const t=se(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Te(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ce(e,t,n,r){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function De(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=se(),i=r.byAttr.get(t),s=K()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&D(l)){const c=r.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let u=0;u<c.length;u++)re(c[u].spec,o,t,c[u].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&ce(c,l,t,e.oldValue),r.reactiveWildcard.length&&ce(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const o=i[c];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(le(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function qe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{De(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function B(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function M(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Fe(e){const t=$();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=B();if(e.target&&r.length)for(let i=0;i<r.length;i++){const s=r[i],l=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)s.matches&&s.matches(o.query)&&k(s,o);else if(s.matches&&s.matches(o.query)&&k(s,o),s.querySelectorAll){const u=s.querySelectorAll(o.query);for(let h=0;h<u.length;h++)k(u[h],o)}}o.onInit&&o.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],u=o.query;if(u){if(!l)s.matches&&s.matches(u)&&M(s,o);else if(s.matches&&s.matches(u)&&M(s,o),s.querySelectorAll){const h=s.querySelectorAll(u);for(let f=0;f<h.length;f++)M(h[f],o)}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,T(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Fe(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ne(e){$().push(e),e.onSubtreeChange&&e.query&&B().push(e),ae()}function ue(e,t,n,r,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,o=i.onInit||null,u=i.onAttrChange||null,h=i.effects||null,f=i.attributes||null,A=f?Ie(f):h,d=f?new Set(Object.keys(f)):null,g=i.persist||null;function a(y){const C=y||document.body;if(le(C,e,t,n),f&&K())for(const v in f){const U=f[v],E=Array.from(C.querySelectorAll("["+v+"]"));C.matches&&C.matches("["+v+"]")&&E.push(C);for(let I=0;I<E.length;I++){const _=E[I];D(_)&&re(U,_.getAttribute(v),v,r,_)}}o&&o(C)}const b=[];if(e.indexOf("[")!==-1){const y=/\[([\w-]+)/g;let C;for(;(C=y.exec(e))!==null;)b.push(C[1])}else b.push(e);Oe({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:o,observed:b.concat(s),onAttributeChange:l,onAttrChange:u,effects:A,declared:d,persist:g}),qe();const w=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,p=i.subtreeQuery||(w?e:"["+e+"]"),m={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:c,query:p};$().push(m),c&&p&&B().push(m),ae(),window[t]=a,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ue,window.lnCore.observeLifecycle=Ne);function x(){Le()>0?R(function(){a(document.body)}):a(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",x):x(),a}function Re(e){let t=!1;for(let n=0;n<e.length;n++){const r=e[n];if(!(r===""||r==null)&&(t=!0,!Number.isFinite(Number(r))))return"string"}return t?"number":"string"}function $e(e,t,n,r){if(n==="number"){const l=parseFloat(e),c=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(c)?0:c)}const i=e!=null?String(e):"",s=t!=null?String(t):"";return r?r.compare(i,s):i<s?-1:i>s?1:0}function de(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,n={},r=de(t);if(!r)return n;const i=r.split("&");for(let s=0;s<i.length;s++){const l=i[s];if(!l)continue;const c=l.indexOf(":"),o=c>-1?l.slice(0,c):l,u=c>-1?l.slice(c+1):"";if(o)try{n[o]=decodeURIComponent(u)}catch{n[o]=u}}return n}function H(e){if(!e)return null;const t=j();return e in t?t[e]:null}function fe(e,t){if(!e)return;const n=j();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");de(location.hash)!==i&&(location.hash=i)}function Be(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function O(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function he(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function V(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function je(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),i=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=H,window.lnCore.hashSet=fe,window.lnCore.hashLinkClick=Be,window.lnCore.resolveHashNamespace=O,window.lnCore.hashSortEncode=he,window.lnCore.hashSortDecode=V,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=je);function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He);function S(e){const t=String(e||"").trim().toLowerCase();return t==="asc"||t==="ascending"?"asc":t==="desc"||t==="descending"?"desc":"none"}function Ve(e){const t=S(e);return t==="asc"?"ascending":t==="desc"?"descending":"none"}function We(e,t){return!e||!t?!1:e.field!==null&&e.field!==void 0&&t.field!==null&&t.field!==void 0?e.field===t.field:e.column!==null&&e.column!==void 0&&t.column!==null&&t.column!==void 0?String(e.column)===String(t.column):!1}function Ue(e,t,n,r){const i=S(e);if(i==="none")return()=>0;const s=i==="desc"?-1:1,l=typeof r=="function"?r:c=>c;return function(c,o){const u=l(c),h=l(o);return $e(u,h,t,n)*s}}function W(e){return!!(!e||typeof e!="object"||e.nodeType!==1||e.tagName==="TEMPLATE"||typeof e.hasAttribute=="function"&&(e.hasAttribute("data-ln-sort-exclude")||e.hasAttribute("hidden"))||e.classList&&e.classList.contains("hidden")||e.style&&e.style.display==="none"||typeof e.matches=="function"&&e.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]"))}function Ke(e,t){if(!e||typeof e!="object"||e.nodeType!==1)return[];const n=t||(typeof e.getAttribute=="function"?e.getAttribute("data-ln-sort-items"):null)||null;if(n&&typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll(n));if(e.tagName==="TABLE"){const r=e.tBodies&&e.tBodies.length?e.tBodies[0]:typeof e.querySelector=="function"?e.querySelector("tbody"):null;if(r)return Array.from(r.children||[]);if(typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll("tbody tr, tr"))}return Array.from(e.children||[])}(function(){const e="data-ln-sort",t="lnSort",n="data-ln-sort-field",r="data-ln-sort-state",i="data-ln-sort-dir",s="data-ln-hash";if(window[t]!==void 0)return;function l(d,g){return d.getAttribute(g)||null}const c={"data-ln-sort":{prop:"targetId",type:"string",read:L,fallback:null,description:"Target table or list element ID to sort"},"data-ln-sort-field":{prop:"field",type:"string",read:l,effect:A,description:"Field name or column key to sort by"},"data-ln-sort-dir":{type:"enum",values:["asc","desc"],fallback:"asc",description:"Default or requested sort direction"},"data-ln-sort-items":{prop:"itemsSelector",type:"string",read:l,description:"CSS selector matching sortable child items"},"data-ln-sort-state":{type:"enum",values:["asc","desc","none"],fallback:"none",effect:A,description:"Active sort state applied to column or control"},"data-ln-hash":{type:"string",effect:A,description:"URL hash routing key for sort state persistence"}},o=ie(c),u=new WeakMap;function h(d,g,a){if(g){const b=d.querySelector('[data-ln-field="'+g+'"]');return b?q(b):""}return a!=null&&d.cells&&d.cells[a]?q(d.cells[a]):q(d)}function f(d){this.dom=d,oe(this,d,o);const g=d.closest("th");this.column=!this.field&&g?g.cellIndex:null,this._state=S(d.getAttribute(r)),d.hasAttribute(r)||d.setAttribute(r,this._state),this._destroyed=!1,this.nsKey=O(d,"sort"),this.hashEnabled=!!this.nsKey;const a=this;this._onClick=function(w){const p=w.target.closest("["+i+"]");if(!p)return;const m=S(p.getAttribute(i));a._apply(m)},d.addEventListener("click",this._onClick),this._onSortChange=function(w){if(a._destroyed||!w.detail)return;const p=a._resolveTarget();if(!(p&&(w.target===p||p.contains(w.target))||w.detail.targetId&&w.detail.targetId===a.targetId))return;if(We({field:a.field,column:a.column},{field:w.detail.field,column:w.detail.column})){const y=S(w.detail.direction);y&&d.getAttribute(r)!==y&&(a._state=y,d.setAttribute(r,y),a._updateAriaSort(y));return}d.getAttribute(r)!=="none"&&(a._state="none",d.setAttribute(r,"none"),a._updateAriaSort("none"))},document.addEventListener("ln-sort:change",this._onSortChange),this._onHashChange=function(){if(a._destroyed||!a.hashEnabled)return;const w=H(a.nsKey),p=V(w);if(p)a.field!==null&&p.fieldOrColumn===a.field||a.column!==null&&String(a.column)===p.fieldOrColumn?a._state!==p.direction&&a._apply(p.direction,!0):a._state!=="none"&&(a._state="none",d.setAttribute(r,"none"),a._updateAriaSort("none"));else if(a._state!=="none"){a._state="none",d.setAttribute(r,"none"),a._updateAriaSort("none");const m=a._resolveTarget();m&&(z(m,"ln-sort:change",{field:a.field,column:a.column,direction:"none",targetId:a.targetId}).defaultPrevented||a._defaultSort(m,"none"))}},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange);let b=!1;if(this.hashEnabled){const w=H(this.nsKey),p=V(w);p&&((a.field!==null&&p.fieldOrColumn===a.field||a.column!==null&&String(a.column)===p.fieldOrColumn)&&R(function(){a._destroyed||a._apply(p.direction,!0)}),b=!0)}if(!b){const w=S(d.getAttribute(r));w&&w!=="none"&&R(function(){a._destroyed||a._apply(w,!0)})}return this}f.prototype._resolveTarget=function(){return document.getElementById(this.targetId)},f.prototype._updateAriaSort=function(d){const g=this.dom.closest("th");g&&g.setAttribute("aria-sort",Ve(d))},f.prototype._apply=function(d,g){if(this._destroyed)return;if(!this.field&&this.column===null){const m=this.dom.closest("th");m&&m.cellIndex!==void 0&&(this.column=m.cellIndex)}const a=S(d);this._state=a,this.dom.getAttribute(r)!==a&&this.dom.setAttribute(r,a),this._updateAriaSort(a);const b=this._resolveTarget();if(!b)return;const w={field:this.field,column:this.column,direction:a,targetId:this.targetId};if(!g&&this.hashEnabled){const m=he(this.field!==null?this.field:this.column,a);fe(this.nsKey,m)}z(b,"ln-sort:change",w).defaultPrevented||this._defaultSort(b,a)},f.prototype._defaultSort=function(d,g){const a=Ke(d,this.itemsSelector);if(!a.length)return;const b=a[0].parentNode,w=a.filter(function(y){return!W(y)});if(!w.length)return;u.has(d)||u.set(d,w.slice());let p;if(g==="none"){const y=u.get(d)||w;u.delete(d),p=y.filter(function(C){return C.parentNode===b&&!W(C)})}else{const y=this.field,C=this.column,v=w.map(function(_){return{el:_,val:h(_,y,C)}}),U=Re(v.map(function(_){return _.val})),E=typeof Intl<"u"?new Intl.Collator(Ae(this.dom),{sensitivity:"base",numeric:!0}):null,I=Ue(g,U,E,function(_){return _.val});v.sort(I),p=v.map(function(_){return _.el})}const m=document.createDocumentFragment();let x=0;for(let y=0;y<a.length;y++){const C=a[y];W(C)?m.appendChild(C):x<p.length&&m.appendChild(p[x++])}b.appendChild(m)},f.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.dom.removeEventListener("click",this._onClick),document.removeEventListener("ln-sort:change",this._onSortChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),delete this.dom[t])};function A(d,g){const a=d[t];if(!(!a||a._destroyed))if(g===n){const b=d.closest("th");a.column=!a.field&&b?b.cellIndex:null}else if(g===r){const b=S(d.getAttribute(r));b!==a._state&&a._apply(b)}else g===s&&(a.hashEnabled&&a._onHashChange&&window.removeEventListener("hashchange",a._onHashChange),a.nsKey=O(d,"sort"),a.hashEnabled=!!a.nsKey,a.hashEnabled&&window.addEventListener("hashchange",a._onHashChange))}ue(e,t,f,"ln-sort",{attributes:c,persist:{attr:r,hashActive:function(d){return!!O(d,"sort")}}})})()})();
@@ -245,17 +245,20 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
245
245
  } else {
246
246
  const field = this.field;
247
247
  const column = this.column;
248
- const values = items.map(function (el) { return _readItemValue(el, field, column); });
249
- const type = detectValueType(values);
248
+ const mapped = items.map(function (el) {
249
+ return { el: el, val: _readItemValue(el, field, column) };
250
+ });
251
+ const type = detectValueType(mapped.map(function (entry) { return entry.val; }));
250
252
  const collator = typeof Intl !== 'undefined'
251
253
  ? new Intl.Collator(getLocale(this.dom), { sensitivity: 'base', numeric: true })
252
254
  : null;
253
255
 
254
- const comparator = createSortComparator(direction, type, collator, function (el) {
255
- return _readItemValue(el, field, column);
256
+ const comparator = createSortComparator(direction, type, collator, function (entry) {
257
+ return entry.val;
256
258
  });
257
259
 
258
- ordered = items.slice().sort(comparator);
260
+ mapped.sort(comparator);
261
+ ordered = mapped.map(function (entry) { return entry.el; });
259
262
  }
260
263
 
261
264
  const frag = document.createDocumentFragment();
@@ -1 +1 @@
1
- (function(){"use strict";function G(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function N(t){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return t?window.lnCore._debugIsContained(t):window.lnCore._debugSink!==null;if(t&&t.closest){const e=t.closest("[data-ln-debug]");return!(!e||typeof document<"u"&&e===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const t=console.warn;console.warn=function(...e){if(typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))){let o=null;for(let s=1;s<e.length;s++)if(e[s]&&e[s].nodeType===1){o=e[s];break}if(!N(o))return}t.apply(console,e)}}function D(t,e,l){const o=l||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,o),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o}))}function _t(t,e,l){t._applyFilterAndSort(),t._vStart=-1,t._vEnd=-1,t._render(),t._updateFooter();const o={sort:t.currentSort,filters:t.currentFilters,search:t.currentSearch};o[l]=t.name,D(t.dom,e,o)}function H(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){H(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function K(t){return t.hasAttribute("data-ln-value")?t.getAttribute("data-ln-value"):t.tagName==="TIME"&&t.hasAttribute("datetime")?t.getAttribute("datetime"):t.tagName==="DATA"&&t.hasAttribute("value")?t.getAttribute("value"):t.textContent.trim()}function gt(t){const e=t.querySelector('input[name="_method"]');return((e&&e.value!==""?e.value:t.method)||"").toUpperCase()}function mt(t,e){const l=!!(e&&e.typed),o=e&&e.exclude,s={},h=t.elements,c={};if(l)for(let f=0;f<h.length;f++){const r=h[f];r.name&&r.type==="checkbox"&&!r.disabled&&(c[r.name]=(c[r.name]||0)+1)}for(let f=0;f<h.length;f++){const r=h[f];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")l&&c[r.name]===1?s[r.name]=r.checked:(s[r.name]||(s[r.name]=[]),r.checked&&s[r.name].push(r.value));else if(r.type==="radio")r.checked&&(s[r.name]=r.value);else if(r.type==="select-multiple"){s[r.name]=[];for(let p=0;p<r.options.length;p++)r.options[p].selected&&s[r.name].push(r.options[p].value)}else if(l&&r.type==="hidden")s[r.name]=r.value;else if(l&&(r.type==="number"||r.type==="range")){const p=Number(r.value);s[r.name]=r.value===""||isNaN(p)?null:p}else s[r.name]=r.value}return s}function yt(t){if(typeof t!="string")return!!t;const e=t.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!==""&&e!=="off"&&e!=="no"}function Ct(t,e){const l=t.elements,o=[],s={};for(let h=0;h<l.length;h++){const c=l[h];c.name&&c.type==="checkbox"&&(s[c.name]=(s[c.name]||0)+1)}for(let h=0;h<l.length;h++){const c=l[h];if(c.type==="file"||c.type==="submit"||c.type==="button")continue;const f=c.getAttribute("data-ln-fill-as")||c.name;if(!f||!(f in e))continue;const r=e[f];if(c.type==="checkbox"){if(Array.isArray(r))c.checked=r.indexOf(c.value)!==-1;else if(s[c.name]>1){const p=String(r).split(",").map(function(m){return m.trim()});c.checked=p.indexOf(c.value)!==-1}else c.checked=yt(r);o.push(c)}else if(c.type==="radio")c.checked=c.value===String(r),o.push(c);else if(c.type==="select-multiple"){if(Array.isArray(r))for(let p=0;p<c.options.length;p++)c.options[p].selected=r.indexOf(c.options[p].value)!==-1;o.push(c)}else c.value=r,c.tagName==="SELECT"&&r!=null&&c.setAttribute("data-ln-value",r),o.push(c)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Ct,window.lnCore.serializeForm=mt,window.lnCore.resolveFormMethod=gt);const Q={};function St(t,e){Q[t]=e}function vt(t){return Q[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=St,window.lnCore.getDataMapper=vt);function At(t){const e=t?t.closest("[lang]"):null,l=(e?e.getAttribute("lang")||e.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return l?l.trim():"en-US"}function Et(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,H(function(){new MutationObserver(function(){D(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function kt(t,e){if(!t||typeof e!="object")return;const l=t.toLowerCase().split("-")[0];Y[l]=e}function xt(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return Y[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=kt,window.lnCore.getLocaleFallback=xt,window.lnCore.ensureLocaleObserver=Et);const M={};function J(t,e){M[t]||(M[t]=document.querySelector('[data-ln-template="'+t+'"]'));const l=M[t];return l?l.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function X(t,e,l){if(t){const o=t.querySelector('[data-ln-template="'+e+'"]');if(o)return o.content.cloneNode(!0)}return J(e,l)}function Z(t,e){if(!t||!e)return t;const l=t.querySelectorAll("[data-ln-field]");for(let c=0;c<l.length;c++){const f=l[c],r=f.getAttribute("data-ln-field");e[r]!=null&&(f.textContent=e[r])}const o=t.querySelectorAll("[data-ln-attr]");for(let c=0;c<o.length;c++){const f=o[c],r=f.getAttribute("data-ln-attr").split(",");for(let p=0;p<r.length;p++){const m=r[p].trim().split(":");if(m.length!==2)continue;const v=m[0].trim(),E=m[1].trim();e[E]!=null&&f.setAttribute(v,e[E])}}const s=t.querySelectorAll("[data-ln-show]");for(let c=0;c<s.length;c++){const f=s[c],r=f.getAttribute("data-ln-show");r in e&&f.classList.toggle("hidden",!e[r])}const h=t.querySelectorAll("[data-ln-class]");for(let c=0;c<h.length;c++){const f=h[c],r=f.getAttribute("data-ln-class").split(",");for(let p=0;p<r.length;p++){const m=r[p].trim().split(":");if(m.length!==2)continue;const v=m[0].trim(),E=m[1].trim();E in e&&f.classList.toggle(v,!!e[E])}}return t}function Dt(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",t,e??null),t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0})));const l=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<l.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",l[o],e??null),l[o].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)Z(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let l=0;l<e.length;l++)e[l].textContent=""}})));function W(t,e){if(!t||!e)return t;const l=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;l.nextNode();){const h=l.currentNode;h.textContent.indexOf("{{")!==-1&&(h.textContent=h.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(c,f){return e[f]!==void 0?e[f]:""}))}const o=function(h,c){return e[c]!==void 0?e[c]:""},s=Array.from(t.querySelectorAll("*"));t.nodeType===1&&s.push(t);for(let h=0;h<s.length;h++){const c=s[h],f=c.attributes;for(let r=0;r<f.length;r++){const p=f[r];p.value.indexOf("{{")!==-1&&c.setAttribute(p.name,p.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return t}function Tt(t,e,l,o,s,h){const c={};for(let r=0;r<t.children.length;r++){const p=t.children[r],m=p.getAttribute("data-ln-render-key");m&&(c[m]=p)}const f=document.createDocumentFragment();for(let r=0;r<e.length;r++){const p=e[r],m=String(o(p));let v=c[m];if(v)s(v,p,r);else{const E=J(l,h);if(!E||(W(E,p),v=E.firstElementChild,!v))continue;v.setAttribute("data-ln-render-key",m),s(v,p,r)}f.appendChild(v)}t.textContent="",t.appendChild(f)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=Z,window.lnCore.lnFill=Dt,window.lnCore.renderList=Tt);function F(t,e,l){const o=t.getAttribute(e);return o===null?l:o}function tt(t,e,l){const o=parseInt(t.getAttribute(e),10);return isNaN(o)?l:o}function P(t,e,l=!1){const o=t.getAttribute(e);if(o===null)return!!l;const s=o.trim().toLowerCase();return!(s==="false"||s==="0")}function et(t,e){return(t.getAttribute(e)||"").split(",").map(l=>l.trim()).filter(Boolean)}const V=new Map;function nt(t,e){const l=(t?t.join("|"):"")+"::"+e;if(V.has(l))return V.get(l);const o=new Set(t||[]),s=function(h,c){const f=h.getAttribute(c);return f!==null&&o.has(f)?f:e};return V.set(l,s),s}function it(t,e,l){const o=parseFloat(t.getAttribute(e));return isNaN(o)?l:o}function lt(t,e,l){const o=t.getAttribute(e);if(!o)return l;try{return JSON.parse(o)}catch{return l}}function rt(t,e,l,o,s){if(!t||e===null)return!0;const h=o||"ln-component",c=t.type;if(c==="trigger"||c==="marker"||c==="string"||c==="list"||!c||e===""&&t.fallback!==void 0)return!0;const f=r=>{s?console.warn(r,s):console.warn(r)};if(c==="boolean"){const r=e.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(f(`[${h}] Invalid value "${e}" for boolean attribute "${l}". Allowed: "true", "false", or presence-only.`),!1):!0}if(c==="enum"){const r=t.values||[];return r.includes(e)?!0:(f(`[${h}] Invalid value "${e}" for attribute "${l}". Allowed: ${r.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(c==="integer"){if(!/^-?\d+$/.test(e))return f(`[${h}] Invalid integer "${e}" for attribute "${l}". Fallback: ${t.fallback}.`),!1;const r=parseInt(e,10);return t.min!==void 0&&r<t.min?(f(`[${h}] Value ${r} for attribute "${l}" is less than min (${t.min}).`),!1):t.max!==void 0&&r>t.max?(f(`[${h}] Value ${r} for attribute "${l}" is greater than max (${t.max}).`),!1):!0}if(c==="float")return isNaN(Number(e))?(f(`[${h}] Invalid float "${e}" for attribute "${l}". Fallback: ${t.fallback}.`),!1):!0;if(c==="json")try{return JSON.parse(e),!0}catch(r){return f(`[${h}] Invalid JSON for attribute "${l}": ${r.message}. Fallback: ${t.fallback}.`),!1}return!0}function ot(t,e,l){for(const o in l){const[s,h,c]=l[o];Object.defineProperty(t,o,{get:function(){return s(e,h,c)},enumerable:!0,configurable:!0})}return t}function st(t){const e={};for(const l in t){const o=t[l];if(!o||!o.prop)continue;let s=o.read;if(!s&&o.type)switch(o.type){case"enum":s=nt(o.values,o.fallback);break;case"integer":s=tt;break;case"float":s=it;break;case"boolean":s=P;break;case"list":s=et;break;case"json":s=lt;break;case"string":default:s=F;break}s||(s=F),e[o.prop]=[s,l,o.fallback]}return e}function Lt(t){const e={};for(const l in t){const o=t[l];o&&o.effect&&(e[l]=o.effect)}return Object.keys(e).length?e:null}function qt(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const l in t.effects)e.add(l);if(t.onAttrChange&&t.declared)for(const l of t.declared)e.add(l);return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ot,window.lnCore.attrSpec=st,window.lnCore.attrStr=F,window.lnCore.attrInt=tt,window.lnCore.attrBool=P,window.lnCore.attrList=et,window.lnCore.attrEnum=nt,window.lnCore.attrFloat=it,window.lnCore.attrJson=lt);function O(t,e){if(!t[e.attribute]){window.lnCore._persistSink&&t.hasAttribute&&t.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(t,e.selector);try{t[e.attribute]=new e.ComponentFn(t)}catch(l){console.error("["+e.attribute+"] init failed",t,l)}}}function at(t,e,l,o){if(t.nodeType!==1)return;const h=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",c={selector:e,attribute:l,ComponentFn:o};if(t.matches&&t.matches(h)&&O(t,c),t.querySelectorAll){const f=t.querySelectorAll(h);for(let r=0;r<f.length;r++)O(f[r],c)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function It(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Rt(t){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(t):setTimeout(t,0)):t()}function ct(){window.lnCore=window.lnCore||{};const t=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return t.byReactive=t.byReactive||new Map,t.reactiveWildcard=t.reactiveWildcard||[],t}function Ft(t){const e=ct(),l=t.observed||[];for(let o=0;o<l.length;o++){const s=l[o];e.byAttr.has(s)||e.byAttr.set(s,[]),e.byAttr.get(s).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const o in t.attributes){e.byDeclaredAttr.has(o)||e.byDeclaredAttr.set(o,[]);const s=e.byDeclaredAttr.get(o);s.some(h=>h.componentTag===t.componentTag)||s.push({spec:t.attributes[o],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const o=qt(t);if(o===null)e.reactiveWildcard.push(t);else for(const s of o)e.byReactive.has(s)||e.byReactive.set(s,[]),e.byReactive.get(s).push(t)}t.persist&&e.persist.push(t)}function dt(t,e,l,o){for(let s=0;s<t.length;s++){const h=t[s];if(!e[h.attribute])continue;const c=h.effects&&h.effects[l];c?c(e,l,o):h.onAttrChange&&(!h.declared||h.declared.has(l))&&h.onAttrChange(e,l,o)}}function Ot(t){const e=t.attributeName,l=e.indexOf("data-ln-")===0,o=ct(),s=o.byAttr.get(e),h=G()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(e);if(!l&&!s&&!h)return;const c=t.target;if(t.oldValue!==c.getAttribute(e)){if(h&&N(c)){const f=o.byDeclaredAttr.get(e),r=c.getAttribute(e);for(let p=0;p<f.length;p++)rt(f[p].spec,r,e,f[p].componentTag,c)}if(window.lnCore._debugSink&&(l||s)&&window.lnCore._debugSink("attr",e,c,{oldValue:t.oldValue,newValue:c.getAttribute(e)}),l){const f=o.byReactive.get(e);f&&dt(f,c,e,t.oldValue),o.reactiveWildcard.length&&dt(o.reactiveWildcard,c,e,t.oldValue)}if(s)for(let f=0;f<s.length;f++){const r=s[f];if(r.handler){r.handler(c,e,t.oldValue);continue}r.onAttributeChange&&c[r.attribute]?r.onAttributeChange(c,e):(at(c,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(c))}}}function Ht(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,H(function(){new MutationObserver(function(e){for(let l=0;l<e.length;l++)try{Ot(e[l])}catch(o){console.error("[ln-core] mutation handler failed",e[l].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function z(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function $(t,e){if(!document.contains(t))if(e.attribute){const l=t[e.attribute];if(l&&typeof l.destroy=="function")try{l.destroy()}catch(o){console.error("["+e.attribute+"] destroy failed",t,o)}delete t[e.attribute]}else e.onDestroy&&e.onDestroy(t)}function Nt(t){const e=B();if(!e.length)return;const l=t.target;if(l){const s=l.nodeType===1?l:l.parentElement;if(s&&(s.isContentEditable||s.closest&&s.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=z();if(t.target&&o.length)for(let s=0;s<o.length;s++){const h=o[s],c=h.query,f=t.target.nodeType===1?t.target.matches&&t.target.matches(c)?t.target:t.target.closest?t.target.closest(c):null:t.target.parentElement&&t.target.parentElement.closest?t.target.parentElement.closest(c):null;f&&h.onSubtreeChange(f,t)}for(let s=0;s<t.addedNodes.length;s++){const h=t.addedNodes[s];if(h.nodeType===1){const c=!!(h.firstElementChild||h.children&&h.children.length);for(let f=0;f<e.length;f++){const r=e[f];if(r.selector&&r.attribute&&r.ComponentFn){if(!c)h.matches&&h.matches(r.query)&&O(h,r);else if(h.matches&&h.matches(r.query)&&O(h,r),h.querySelectorAll){const p=h.querySelectorAll(r.query);for(let m=0;m<p.length;m++)O(p[m],r)}}r.onInit&&r.onInit(h)}}}for(let s=0;s<t.removedNodes.length;s++){const h=t.removedNodes[s];if(h.nodeType===1){const c=!!(h.firstElementChild||h.children&&h.children.length);for(let f=0;f<e.length;f++){const r=e[f],p=r.query;if(p){if(!c)h.matches&&h.matches(p)&&$(h,r);else if(h.matches&&h.matches(p)&&$(h,r),h.querySelectorAll){const m=h.querySelectorAll(p);for(let v=0;v<m.length;v++)$(m[v],r)}}}}}}function ut(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,H(function(){new MutationObserver(function(e){for(let l=0;l<e.length;l++){const o=e[l];if(o.type==="childList")try{Nt(o)}catch(s){console.error("[ln-core] lifecycle handler failed",o.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Mt(t){B().push(t),t.onSubtreeChange&&t.query&&z().push(t),ut()}function ht(t,e,l,o,s={}){const h=s.extraAttributes||[],c=s.onAttributeChange||null,f=s.onSubtreeChange||null,r=s.onInit||null,p=s.onAttrChange||null,m=s.effects||null,v=s.attributes||null,E=v?Lt(v):m,q=v?new Set(Object.keys(v)):null,I=s.persist||null;function R(b){const d=b||document.body;if(at(d,t,e,l),v&&G())for(const w in v){const _=v[w],g=Array.from(d.querySelectorAll("["+w+"]"));d.matches&&d.matches("["+w+"]")&&g.push(d);for(let y=0;y<g.length;y++){const T=g[y];N(T)&&rt(_,T.getAttribute(w),w,o,T)}}r&&r(d)}const A=[];if(t.indexOf("[")!==-1){const b=/\[([\w-]+)/g;let d;for(;(d=b.exec(t))!==null;)A.push(d[1])}else A.push(t);Ft({selector:t,attribute:e,componentTag:o,attributes:v,ComponentFn:l,onInit:r,observed:A.concat(h),onAttributeChange:c,onAttrChange:p,effects:E,declared:q,persist:I}),Ht();const n=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1,u=s.subtreeQuery||(n?t:"["+t+"]"),i={selector:t,attribute:e,ComponentFn:l,onInit:r,onSubtreeChange:f,query:u};B().push(i),f&&u&&z().push(i),ut(),window[e]=R,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ht,window.lnCore.observeLifecycle=Mt);function a(){It()>0?Rt(function(){R(document.body)}):R(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",a):a(),R}function Wt(t,e){let l=!1;return function(){l||(l=!0,queueMicrotask(function(){l=!1,t()}))}}function Pt(t){t=t||{};let e=t.windowSize>0?t.windowSize:1e3,l=t.pageSize>0?t.pageSize:200,o=t.threshold!=null?t.threshold:25,s=t.fetchDebounce!=null?t.fetchDebounce:120;const h=typeof t.requestPage=="function"?t.requestPage:function(){},c=typeof t.onChange=="function"?t.onChange:function(){},f=new Map,r=new Map,p=new Set;let m=0,v=0,E=0,q={sort:null,filters:{},search:""},I=null,R=0,A=0,n=!1;function u(d){r.set(d,++R)}function i(){return!!(q&&(q.search||q.filters&&Object.keys(q.filters).length))}function a(){if(f.size<=e)return;const d=Array.from(f.keys()).sort(function(_,g){return(r.get(_)||0)-(r.get(g)||0)});let w=0;for(;f.size>e&&w<d.length;)f.delete(d[w]),r.delete(d[w]),w++}function b(d,w){p.add(d),h(q,d,w)}return{get:function(d){return f.get(d)},has:function(d){return f.has(d)},peek:function(){return f.size?f.values().next().value:void 0},get logicalTotal(){return m},get grandTotal(){return v},get queryGen(){return E},get size(){return f.size},ensure:function(d,w){clearTimeout(I),A=d;for(let k=d;k<w;k++)f.has(k)&&u(k);if(m<=0)return;const _=Math.max(0,d-o),g=Math.min(m,w+o),y=Math.floor(_/l),T=Math.floor(Math.max(0,g-1)/l);let L=-1;for(let k=y;k<=T;k++){const C=k*l,S=Math.min(l,m-C);let x=!1;const Jt=Math.max(C,_),Xt=Math.min(C+S,g);for(let U=Jt;U<Xt;U++)if(!f.has(U)){x=!0;break}if(x&&!p.has(C)){L=C;break}}L!==-1&&(I=setTimeout(function(){b(L,l)},s))},ingest:function(d){if(d=d||{},d.queryGen!=null&&d.queryGen!==E)return!1;const w=d.offset||0,_=d.data||[];let g=0;for(let y=0;y<_.length;y++)_[y]!=null&&g++;if(g===0&&(d.provisional||d.filtered>0))return p.delete(w),!1;n&&(f.clear(),r.clear(),n=!1),d.provisional||(v=d.total!=null?d.total:v,m=d.filtered!=null?d.filtered:d.data?d.data.length:m);for(let y=0;y<_.length;y++)_[y]!=null&&(f.set(w+y,_[y]),u(w+y));return p.delete(w),a(),c(),!0},requestInitial:function(d){d&&(q=d),b(0,l)},invalidate:function(d){E++,p.clear(),clearTimeout(I),d&&(q=d),n=!0,b(0,l)},revalidate:function(){E++,p.clear(),clearTimeout(I),n=!0;const d=Math.max(0,Math.floor(A/l)*l);b(d,l)},release:function(d){p.delete(d)},destroy:function(){clearTimeout(I),f.clear(),r.clear(),p.clear()},configure:function(d){d=d||{};let w=!1;if(d.windowSize!=null&&d.windowSize>0&&d.windowSize!==e){const _=d.windowSize<e;e=d.windowSize,_&&a(),w=!0}d.pageSize!=null&&d.pageSize>0&&(l=d.pageSize),d.threshold!=null&&d.threshold>=0&&(o=d.threshold),d.fetchDebounce!=null&&d.fetchDebounce>=0&&(s=d.fetchDebounce),w&&c()},setGrandTotal:function(d){d==null||isNaN(d)||d<0||(v=d,i()||(m=d),c())}}}function ft(t){return(t||"").replace(/^#/,"")}function j(t){const e=t===void 0?location.hash:t,l={},o=ft(e);if(!o)return l;const s=o.split("&");for(let h=0;h<s.length;h++){const c=s[h];if(!c)continue;const f=c.indexOf(":"),r=f>-1?c.slice(0,f):c,p=f>-1?c.slice(f+1):"";if(r)try{l[r]=decodeURIComponent(p)}catch{l[r]=p}}return l}function Vt(t){if(!t)return null;const e=j();return t in e?e[t]:null}function Bt(t,e){if(!t)return;const l=j();e==null?delete l[t]:l[t]=String(e);const s=Object.keys(l).map(function(h){const c=l[h];return c===""?h:h+":"+encodeURIComponent(c)}).join("&");ft(location.hash)!==s&&(location.hash=s)}function zt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function $t(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const l=t.getAttribute("data-ln-hash");if(l&&l.trim()!=="")return l.trim();const o=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return o?e?o+"-"+e:o:e||null}function jt(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function Ut(t){return!t||typeof t!="string"?null:t.endsWith(".asc")?{fieldOrColumn:t.slice(0,-4),direction:"asc"}:t.endsWith(".desc")?{fieldOrColumn:t.slice(0,-5),direction:"desc"}:null}function Gt(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function Kt(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const l=t.slice(0,e),o=t.slice(e+1),s=o?o.split(",").map(function(h){try{return decodeURIComponent(h)}catch{return h}}).filter(Boolean):[];return{key:l,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=Vt,window.lnCore.hashSet=Bt,window.lnCore.hashLinkClick=zt,window.lnCore.resolveHashNamespace=$t,window.lnCore.hashSortEncode=jt,window.lnCore.hashSortDecode=Ut,window.lnCore.hashFilterEncode=Gt,window.lnCore.hashFilterDecode=Kt);function Qt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Qt);function bt(t,e,l,o,s=15){if(o<=0||l<=0)return{start:0,end:0,topPadding:0,bottomPadding:0};const h=Math.max(0,t||0),c=Math.max(0,e||0),f=Math.floor(h/l),r=Math.ceil(c/l),p=Math.max(0,f-s),m=Math.min(o,f+r+s),v=p*l,E=Math.max(0,(o-m)*l);return{start:p,end:m,topPadding:v,bottomPadding:E}}function Yt(t,e){const l=Array.isArray(t)?t.length:0,o=e instanceof Set?e:new Set(e||[]);let s=0;if(Array.isArray(t))for(let f=0;f<t.length;f++)o.has(t[f])&&s++;else s=o.size;const h=l>0&&s===l,c=s>0&&s<l;return{totalCount:l,selectedCount:s,isAllSelected:h,isIndeterminate:c}}function pt(t,e,l){const o=new Set(t);return e==null||((l!==void 0?l:!o.has(e))?o.add(e):o.delete(e)),o}function wt(t,e,l){const o=new Set(t);if(!Array.isArray(e))return o;if(l)for(let s=0;s<e.length;s++)e[s]!=null&&o.add(e[s]);else for(let s=0;s<e.length;s++)o.delete(e[s]);return o}(function(){const t="data-ln-table",e="lnTable",l="data-ln-table-empty";if(window[e]!==void 0)return;function r(n,u){if(!n||!n.isDataDriven)return;const i=n.dom.hasAttribute("data-ln-table-window");if(i&&!n._windowed)n._enterWindowedMode(),n._kickWindowInitial();else if(!i&&n._windowed)n._exitWindowedMode();else if(i&&n._windowed){const a=parseInt(u,10);a>0&&n._cache.configure({windowSize:a})}}function p(n,u){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const i=parseInt(u,10);i>0&&n._cache.configure({pageSize:i})}function m(n,u){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const i=parseInt(u,10);i>=0&&n._cache.configure({threshold:i})}function v(n,u){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const i=parseInt(u,10);i>=0&&n._cache.setGrandTotal(i)}const E={"data-ln-table":{prop:"name",type:"string",read:F,fallback:"",description:"Table instance name or identifier"},"data-ln-table-source":{prop:"source",type:"string",read:F,fallback:"",description:"Source store or coordinator addressing"},"data-ln-table-selectable":{prop:"_selectable",type:"boolean",read:P,description:"Enables row selection check controls"},"data-ln-table-window":{type:"integer",fallback:1e3,min:10,effect:r,description:"Virtual scrolling window size in rows"},"data-ln-table-window-page":{type:"integer",fallback:200,min:5,effect:p,description:"Virtual scrolling slice page size"},"data-ln-table-window-threshold":{type:"integer",fallback:50,min:0,effect:m,description:"Scroll threshold margin in pixels to trigger page fetch"},"data-ln-table-count":{type:"integer",min:0,effect:v,description:"Total record count override for virtual scrollbar calculation"},"data-ln-table-row":{type:"marker",description:"Table row template element"},"data-ln-table-row-id":{type:"string",description:"Record identifier on row element"},"data-ln-table-row-action":{type:"trigger",description:"Action trigger inside a table row"},"data-ln-table-row-select":{type:"trigger",description:"Row selection checkbox trigger"},"data-ln-table-col":{type:"string",description:"Column header identifier or field mapping"},"data-ln-table-col-select":{type:"trigger",description:"Header select-all checkbox trigger"},"data-ln-table-cell-attr":{type:"string",description:"Cell attribute template mapping"},"data-ln-table-empty":{type:"marker",description:"Container for table empty state"},"data-ln-table-select-all-label":{type:"string",description:"Accessibility label for select-all header trigger"}},q=st(E);typeof Intl<"u"&&new Intl.Collator(document.documentElement.lang||void 0,{sensitivity:"base"});function I(n,u){if(n==null||isNaN(n))return"";try{return new Intl.NumberFormat(At(u)).format(n)}catch{return String(n)}}function R(n){let u=n.parentElement;for(;u&&u!==document.body&&u!==document.documentElement;){const a=getComputedStyle(u).overflowY;if(a==="auto"||a==="scroll")return u;u=u.parentElement}return null}function A(n){this.dom=n,ot(this,n,q),this.table=n.querySelector("table"),this.tbody=n.querySelector("[data-ln-table-body]")||n.querySelector("tbody"),this.thead=n.querySelector("thead");const u=this.thead?this.thead.querySelector("tr:last-child"):null;this.ths=u?Array.from(u.querySelectorAll("th")):[],this._totalSpan=n.querySelector("[data-ln-table-total]"),this._filteredSpan=n.querySelector("[data-ln-table-filtered]"),this._filteredSpan&&(this._filteredWrap=this._filteredSpan.parentElement!==n?this._filteredSpan.parentElement:null),this._selectedSpan=n.querySelector("[data-ln-table-selected]"),this._selectedSpan&&(this._selectedWrap=this._selectedSpan.parentElement!==n?this._selectedSpan.parentElement:null),this.isDataDriven=n.hasAttribute("data-ln-table-source"),this._data=[],this._filteredData=[],this._searchTerm="",this._sortCol=-1,this._sortDir=null,this._columnFilters={},this.selectedIds=new Set,this._virtual=!1,this._rowHeight=0,this._vStart=-1,this._vEnd=-1,this._rafId=null,this._scrollHandler=null,this._scrollContainer=null,this._colgroup=null;const i=this;return this._onSetSearch=function(a){const b=(a.detail&&a.detail.query!=null?a.detail.query:a.detail&&a.detail.term!=null?a.detail.term:"").trim();i.isDataDriven?(i.currentSearch=b,D(n,"ln-table:search",{table:i.name,query:i.currentSearch}),i._requestData()):(i._searchTerm=b.toLowerCase(),i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-table:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-table:set-search",this._onSetSearch),this._onSearchChange=function(a){a.preventDefault(),i._onSetSearch(a)},n.addEventListener("ln-search:change",this._onSearchChange),this._onRequestClearFilters=function(){i.isDataDriven?(i.currentFilters={},i.currentSearch="",D(n,"ln-table:clear-filters",{table:i.name}),i._requestData()):(i._searchTerm="",i._columnFilters={},i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-table:filter",{term:"",matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-table:request-clear-filters",this._onRequestClearFilters),this._selectableActive=!1,this._selectable&&this._enableSelection(),this.isDataDriven?(this.isLoaded=!1,this.totalCount=0,this.visibleCount=0,this.currentSort=null,this.currentFilters={},this.currentSearch="",this._lastTotal=0,this._lastFiltered=0,this._hasInitialSeed=!1,this._windowed=!1,this._cache=null,this.isDataDriven&&n.hasAttribute("data-ln-table-window")&&this._enterWindowedMode(),this._onSetData=function(a){const b=a.detail||{},d=b.data||[],w=b.total!=null?b.total:d.length;if(!(i._hasInitialSeed&&!i.isLoaded&&d.length===0&&w===0)){if(i._windowed){i._cache.ingest(b)&&!b.provisional&&n.classList.remove("ln-table--loading");return}i._data=d,i._lastTotal=w,i._lastFiltered=b.filtered!=null?b.filtered:i._data.length,i.totalCount=i._lastTotal,i.visibleCount=i._lastFiltered,i.isLoaded=!0,i._hasInitialSeed=!1,n.classList.remove("ln-table--loading"),i._vStart=-1,i._vEnd=-1,i._applyFilterAndSort(),i._render(),i._updateFooter(),D(n,"ln-table:rendered",{table:i.name,total:i.totalCount,visible:i.visibleCount})}},n.addEventListener("ln-table:set-data",this._onSetData),this._onSetLoading=function(a){const b=a.detail&&a.detail.loading;n.classList.toggle("ln-table--loading",!!b),b&&(i.isLoaded=!1)},n.addEventListener("ln-table:set-loading",this._onSetLoading),this._onPageFailed=function(a){!i._windowed||!i._cache||i._cache.release(a.detail&&a.detail.offset)},n.addEventListener("ln-table:page-failed",this._onPageFailed),this._onRequestRevalidate=function(){!i._windowed||!i._cache||i._cache.revalidate()},n.addEventListener("ln-table:request-revalidate",this._onRequestRevalidate),this._onRequestInvalidate=function(){!i._windowed||!i._cache||i._requestData()},n.addEventListener("ln-table:request-invalidate",this._onRequestInvalidate),this._onSort=function(a){!a.detail||a.detail.field==null||(a.preventDefault(),i.currentSort=a.detail.direction==="none"?null:{field:a.detail.field,direction:a.detail.direction},i._requestData())},n.addEventListener("ln-sort:change",this._onSort),this._windowed&&this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden"),this._onRowClick=function(a){if(a.target.closest("[data-ln-table-row-select]")||a.target.closest("[data-ln-table-row-action]")||a.target.closest("a")||a.target.closest("button")||a.ctrlKey||a.metaKey||a.button===1)return;const b=a.target.closest("[data-ln-table-row]");if(!b)return;const d=b.getAttribute("data-ln-table-row-id"),w=b._lnRecord||{};D(n,"ln-table:row-click",{table:i.name,id:d,record:w})},this.tbody&&this.tbody.addEventListener("click",this._onRowClick),this._onRowAction=function(a){const b=a.target.closest("[data-ln-table-row-action]");if(!b)return;const d=b.closest("[data-ln-table-row]");if(!d)return;const w=b.getAttribute("data-ln-table-row-action"),_=d.getAttribute("data-ln-table-row-id"),g=d._lnRecord||{};D(n,"ln-table:row-action",{table:i.name,id:_,action:w,record:g})},this.tbody&&this.tbody.addEventListener("click",this._onRowAction),this.tbody&&this.tbody.rows.length>0&&this._parseRows(),this._windowed?this._kickWindowInitial():D(n,"ln-table:request-data",{table:this.name,sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})):(this._emptyTbodyObserver=null,this.tbody&&this.tbody.rows.length>0?this._parseRows():this.tbody&&(this._emptyTbodyObserver=new MutationObserver(function(){i.tbody.rows.length>0&&(i._emptyTbodyObserver.disconnect(),i._emptyTbodyObserver=null,i._parseRows())}),this._emptyTbodyObserver.observe(this.tbody,{childList:!0})),this._onSort=function(a){if(!a.detail||a.detail.column==null)return;a.preventDefault();const b=a.detail.direction==="none"?null:a.detail.direction;i._sortCol=b===null?-1:a.detail.column,i._sortDir=b,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),D(n,"ln-table:sorted",{column:a.detail.column,direction:a.detail.direction,matched:i._filteredData.length,total:i._data.length})},n.addEventListener("ln-sort:change",this._onSort),this._onFilterChange=function(a){if(a.preventDefault(),!a.detail)return;const b=a.detail.key,d=a.detail.values||[];if(b){if(d.length===0)delete i._columnFilters[b];else{const w=[];for(let _=0;_<d.length;_++)w.push(d[_].toLowerCase());i._columnFilters[b]=w}i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-table:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length})}},n.addEventListener("ln-filter:change",this._onFilterChange)),this}A.prototype._parseRows=function(){const n=this.tbody.rows,u=this.ths;this._data=[],n.length>0&&(this._rowHeight=n[0].offsetHeight||40),this._lockColumnWidths();for(let i=0;i<n.length;i++){const a=n[i],b=[],d=[],w=[];for(let g=0;g<a.cells.length;g++){const y=a.cells[g],T=y.textContent.trim();b[g]=K(y),d[g]=T.toLowerCase(),y.querySelector("[data-ln-table-row-action]")||w.push(T.toLowerCase())}let _=null;if(this.isDataDriven){_={};const g=a.getAttribute("data-ln-table-row-id");g!=null&&(_.id=g);for(let y=0;y<u.length;y++){const T=u[y].getAttribute("data-ln-table-col");if(T){const L=y;if(L<a.cells.length){const k=a.cells[L];_[T]=K(k)}}}}this._data.push({values:b,rawTexts:d,html:a.outerHTML,searchText:w.join(" "),id:this.isDataDriven&&_?_.id:void 0,..._})}this._filteredData=this._data.slice(),this._data.length>0&&(this._hasInitialSeed=!0),this.isDataDriven&&(this._lastTotal=this._data.length,this._lastFiltered=this._data.length,this.totalCount=this._data.length,this.visibleCount=this._data.length,this._updateFooter()),this._render(),D(this.dom,"ln-table:ready",{total:this._data.length})},A.prototype._applyFilterAndSort=function(){this._filteredData=this._data?this._data.slice():[],this.visibleCount=this.isDataDriven&&this._lastFiltered!=null?this._lastFiltered:this._filteredData.length},A.prototype._lockColumnWidths=function(){if(!this.table||!this.thead||this._colgroup)return;const n=document.createElement("colgroup");this.ths.forEach(function(u){const i=document.createElement("col");i.style.width=u.offsetWidth+"px",n.appendChild(i)}),this.table.insertBefore(n,this.table.firstChild),this.table.style.tableLayout="fixed",this._colgroup=n},A.prototype._render=function(){if(this.tbody)if(this.isDataDriven){if(this._windowed){this._renderWindowed();return}const n=this._lastTotal,u=this.visibleCount;if(n===0){this._disableVirtualScroll(),this._showEmptyState();return}if(this._filteredData.length===0||u===0){this._disableVirtualScroll(),this._showEmptyState();return}this._filteredData.length>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}else{const n=this._filteredData.length;n===0&&(this._searchTerm||Object.keys(this._columnFilters).length>0)?(this._disableVirtualScroll(),this._showEmptyState()):n>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}},A.prototype._renderAll=function(){if(this.isDataDriven){const n=this._filteredData,u=document.createDocumentFragment();for(let i=0;i<n.length;i++){const a=this._buildRow(n[i]);if(!a)break;u.appendChild(a)}this.tbody.replaceChildren(u),this._selectable&&this._updateSelectAll()}else{const n=[],u=this._filteredData;for(let i=0;i<u.length;i++)n.push(u[i].html);this.tbody.innerHTML=n.join(""),this._selectable&&this._restoreSelection()}},A.prototype._enableVirtualScroll=function(){if(this._virtual)return;this._virtual=!0,this._vStart=-1,this._vEnd=-1;const n=this;if(!this._rowHeight)if(this.tbody&&this.tbody.rows.length>0)this._rowHeight=this.tbody.rows[0].offsetHeight||40;else{let i=null;if(this._windowed){const a=this._cache?this._cache.peek():null;i=a?this._buildRow(a):this._buildPlaceholderRow()}else this.isDataDriven&&this._data.length>0&&(i=this._buildRow(this._data[0]));i&&this.tbody&&(this.tbody.appendChild(i),this._rowHeight=i.offsetHeight||40,i.remove())}this.isDataDriven?this._scrollContainer=R(this.dom):this._scrollContainer=null;const u=this._scrollContainer||window;this._scrollHandler=function(){n._rafId||(n._rafId=requestAnimationFrame(function(){n._rafId=null,n._windowed?n._renderWindowed():n._renderVirtual()}))},u.addEventListener("scroll",this._scrollHandler,{passive:!0}),window.addEventListener("resize",this._scrollHandler,{passive:!0})},A.prototype._disableVirtualScroll=function(){this._virtual&&(this._virtual=!1,this._scrollHandler&&((this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler),window.removeEventListener("resize",this._scrollHandler),this._scrollHandler=null),this._scrollContainer=null,this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._vStart=-1,this._vEnd=-1)},A.prototype._renderVirtual=function(){const n=this._filteredData,u=n.length,i=this._rowHeight;if(!i||!u)return;const a=this.thead?this.thead.offsetHeight:0,b=this._scrollContainer;let d,w;if(b){const C=this.table.getBoundingClientRect(),S=b.getBoundingClientRect(),x=C.top-S.top+b.scrollTop+a;d=b.scrollTop-x,w=b.clientHeight}else{const x=this.table.getBoundingClientRect().top+window.scrollY+a;d=window.scrollY-x,w=window.innerHeight}const _=bt(d,w,i,u,15),g=_.start,y=_.end;if(g===this._vStart&&y===this._vEnd)return;this._vStart=g,this._vEnd=y;const T=this.ths.length||1,L=_.topPadding,k=_.bottomPadding;if(this.isDataDriven){const C=document.createDocumentFragment();if(L>0){const S=document.createElement("tr");S.className="ln-table__spacer",S.setAttribute("aria-hidden","true");const x=document.createElement("td");x.setAttribute("colspan",T),x.style.height=L+"px",S.appendChild(x),C.appendChild(S)}for(let S=g;S<y;S++){const x=this._buildRow(n[S]);x&&C.appendChild(x)}if(k>0){const S=document.createElement("tr");S.className="ln-table__spacer",S.setAttribute("aria-hidden","true");const x=document.createElement("td");x.setAttribute("colspan",T),x.style.height=k+"px",S.appendChild(x),C.appendChild(S)}this.tbody.replaceChildren(C),this._selectable&&this._updateSelectAll()}else{let C="";L>0&&(C+='<tr class="ln-table__spacer" aria-hidden="true"><td colspan="'+T+'" style="height:'+L+'px;padding:0;border:none"></td></tr>');for(let S=g;S<y;S++)C+=n[S].html;k>0&&(C+='<tr class="ln-table__spacer" aria-hidden="true"><td colspan="'+T+'" style="height:'+k+'px;padding:0;border:none"></td></tr>'),this.tbody.innerHTML=C,this._selectable&&this._restoreSelection()}},A.prototype._buildPlaceholderRow=function(){const n=document.createElement("tr");n.className="ln-table__placeholder",n.setAttribute("aria-hidden","true");const u=document.createElement("td");return u.setAttribute("colspan",this.ths.length||1),u.style.height=this._rowHeight+"px",n.appendChild(u),n},A.prototype._renderWindowed=function(){if(this.isLoaded&&this._cache.logicalTotal===0){this._disableVirtualScroll(),this._showEmptyState();return}this._virtual||this._enableVirtualScroll();const n=this._rowHeight;if(!n)return;const u=this._cache.logicalTotal,i=this.thead?this.thead.offsetHeight:0,a=this._scrollContainer;let b,d;if(a){const C=this.table.getBoundingClientRect(),S=a.getBoundingClientRect(),x=C.top-S.top+a.scrollTop+i;b=a.scrollTop-x,d=a.clientHeight}else{const x=this.table.getBoundingClientRect().top+window.scrollY+i;b=window.scrollY-x,d=window.innerHeight}const w=bt(b,d,n,u,15),_=w.start,g=w.end,y=this.ths.length||1,T=w.topPadding,L=w.bottomPadding,k=document.createDocumentFragment();if(T>0){const C=document.createElement("tr");C.className="ln-table__spacer",C.setAttribute("aria-hidden","true");const S=document.createElement("td");S.setAttribute("colspan",y),S.style.height=T+"px",C.appendChild(S),k.appendChild(C)}for(let C=_;C<g;C++)if(this._cache.has(C)){const S=this._buildRow(this._cache.get(C));S&&k.appendChild(S)}else k.appendChild(this._buildPlaceholderRow());if(L>0){const C=document.createElement("tr");C.className="ln-table__spacer",C.setAttribute("aria-hidden","true");const S=document.createElement("td");S.setAttribute("colspan",y),S.style.height=L+"px",C.appendChild(S),k.appendChild(C)}this.tbody.replaceChildren(k),this._vStart=_,this._vEnd=g,this._cache.ensure(_,g)},A.prototype._showEmptyState=function(){const n=this.ths.length||1;let u=null,i=null;if(this.isDataDriven){const a=this._lastTotal!=null?this._lastTotal:this._data.length,d=this.visibleCount===0&&a>0,w=d?this.name+"-empty-filtered":this.name+"-empty";if(i=X(this.dom,w,"ln-table"),!i){const _=this.dom.querySelector("template[data-ln-table-empty]");if(_){const g=d?"search":"initial",y=_.content.querySelector('[data-ln-table-empty-when="'+g+'"]')||_.content.firstElementChild;y&&(i=document.importNode(y,!0))}}if(i)if(i.tagName==="TR")u=i;else{const _=document.createElement("td");_.setAttribute("colspan",String(n)),_.appendChild(i);const g=document.createElement("tr");g.className="ln-table__empty",g.appendChild(_),u=g}}else{const a=this.dom.querySelector("template["+l+"]"),b=document.createElement("td");b.setAttribute("colspan",String(n)),a&&b.appendChild(document.importNode(a.content,!0));const d=document.createElement("tr");d.className="ln-table__empty",d.appendChild(b),u=d}u?this.tbody.replaceChildren(u):this.tbody.replaceChildren(),D(this.dom,"ln-table:empty",{term:this.isDataDriven?this.currentSearch||"":this._searchTerm,total:this.isDataDriven?this._lastTotal!=null?this._lastTotal:this._data.length:this._data.length})},A.prototype._fillRow=function(n,u){W(n,u);const i=n.querySelectorAll("[data-ln-table-cell-attr]");for(let a=0;a<i.length;a++){const b=i[a],d=b.getAttribute("data-ln-table-cell-attr").split(",");for(let w=0;w<d.length;w++){const _=d[w].trim().split(":");if(_.length!==2)continue;const g=_[0].trim(),y=_[1].trim();u[g]!=null&&b.setAttribute(y,u[g])}}},A.prototype._buildRow=function(n){let u=X(this.dom,this.name+"-row","ln-table");if(!u){const a=this.dom.querySelector("template[data-ln-table-row]");a&&(u=document.importNode(a.content,!0))}let i=u?u.querySelector("[data-ln-table-row]")||u.firstElementChild:null;if(i)this._fillRow(i,n);else if(n&&n.html){const a=document.createElement("tbody");a.innerHTML=n.html,i=a.firstElementChild}else{i=document.createElement("tr"),i.setAttribute("data-ln-table-row","");const a=this.ths;for(let b=0;b<a.length;b++){const d=a[b].hasAttribute("data-ln-table-col-select"),w=document.createElement("td");if(d){const _=document.createElement("input");_.type="checkbox",_.setAttribute("data-ln-table-row-select",""),_.setAttribute("aria-label","Select row"),w.appendChild(_)}else{const _=a[b].getAttribute("data-ln-table-col");_&&n[_]!=null&&(w.textContent=String(n[_]))}i.appendChild(w)}}if(i._lnRecord=n,n.id!=null&&i.setAttribute("data-ln-table-row-id",n.id),this._selectable&&n.id!=null&&this.selectedIds.has(String(n.id))){i.classList.add("ln-row-selected");const a=i.querySelector("[data-ln-table-row-select]");a&&(a.checked=!0)}return i},A.prototype._requestData=function(){if(this._windowed){this.dom.classList.add("ln-table--loading"),this._cache.invalidate({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch});return}_t(this,"ln-table:request-data","table")},A.prototype._enterWindowedMode=function(){const n=this,u=this.dom,i=parseInt(u.getAttribute("data-ln-table-window"),10),a=parseInt(u.getAttribute("data-ln-table-window-page"),10),b=parseInt(u.getAttribute("data-ln-table-window-threshold"),10);this._onCacheChange=function(){!n._windowed||!n._cache||(n.totalCount=n._cache.grandTotal,n.visibleCount=n._cache.logicalTotal,n._lastTotal=n._cache.grandTotal,n.isLoaded=!0,n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),D(u,"ln-table:rendered",{table:n.name,total:n.totalCount,visible:n.visibleCount}))},this._renderBatch=Wt(this._onCacheChange),this._cache=Pt({windowSize:i>0?i:1e3,pageSize:a>0?a:200,threshold:b>=0?b:25,fetchDebounce:120,requestPage:function(d,w,_){D(u,"ln-table:request-data",{table:n.name,sort:d.sort,filters:d.filters,search:d.search,offset:w,limit:_,queryGen:n._cache.queryGen})},onChange:this._renderBatch}),this._windowed=!0,this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden")},A.prototype._kickWindowInitial=function(){if(this._data.length>0){let n=parseInt(this.dom.getAttribute("data-ln-table-count"),10);if(isNaN(n)&&this._totalSpan){const i=this._totalSpan.textContent.replace(/[^\d]/g,"");i&&(n=parseInt(i,10))}const u=n>0?n:this._data.length;this._cache.ingest({data:this._data,offset:0,total:u,filtered:u})}else this.dom.classList.add("ln-table--loading"),this._cache.requestInitial({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})},A.prototype._exitWindowedMode=function(){this._disableVirtualScroll(),this._cache&&this._cache.destroy(),this._cache=null,this._windowed=!1,this._renderBatch=null,this._onCacheChange=null,this._selectAllCheckbox&&this._selectAllCheckbox.classList.remove("hidden"),this._rowHeight=0,this._vStart=-1,this._vEnd=-1,this._data=[],this._filteredData=[],this.dom.classList.add("ln-table--loading"),this._requestData()},A.prototype._updateSelectAll=function(){if(!this._selectAllCheckbox||!this.tbody)return;const n=this.tbody.querySelectorAll("[data-ln-table-row]"),u=[];for(let a=0;a<n.length;a++){const b=n[a].getAttribute("data-ln-table-row-id");b!=null&&u.push(b)}const i=Yt(u,this.selectedIds);this._selectAllCheckbox.checked=i.isAllSelected,this._selectAllCheckbox.indeterminate=i.isIndeterminate},A.prototype._restoreSelection=function(){if(!this.tbody)return;const n=this.tbody.querySelectorAll("[data-ln-table-row]");for(let u=0;u<n.length;u++){const i=n[u].getAttribute("data-ln-table-row-id"),a=i!=null&&this.selectedIds.has(i);n[u].classList.toggle("ln-row-selected",a);const b=n[u].querySelector("[data-ln-table-row-select]");b&&(b.checked=a)}this._updateSelectAll()},Object.defineProperty(A.prototype,"selectedCount",{get:function(){return this.selectedIds.size},set:function(){}}),A.prototype._enableSelection=function(){if(this._selectableActive)return;this._selectableActive=!0;const n=this;if(this._onSelectionChange=function(u){const i=u.target.closest("[data-ln-table-row-select]");if(!i)return;const a=i.closest("[data-ln-table-row]");if(!a)return;const b=a.getAttribute("data-ln-table-row-id");b!=null&&(n.selectedIds=pt(n.selectedIds,b,i.checked),a.classList.toggle("ln-row-selected",i.checked),n.selectedCount=n.selectedIds.size,n._updateSelectAll(),n._updateFooter(),D(n.dom,"ln-table:select",{table:n.name,selectedIds:n.selectedIds,count:n.selectedCount}))},this.tbody&&this.tbody.addEventListener("change",this._onSelectionChange),this._selectAllCheckbox=this.dom.querySelector('[data-ln-table-col-select] input[type="checkbox"]')||this.dom.querySelector("[data-ln-table-col-select]"),this._selectAllCheckbox&&this._selectAllCheckbox.tagName==="TH"){const u=document.createElement("input");u.type="checkbox";const i=n.dom.querySelector('[data-ln-table-dict="select-all"]'),a=n.dom.getAttribute("data-ln-table-select-all-label")||(i?i.textContent.trim():null)||"Select all";u.setAttribute("aria-label",a),this._selectAllCheckbox.appendChild(u),this._selectAllCheckbox=u}if(this._selectAllCheckbox&&(this._onSelectAll=function(){const u=n._selectAllCheckbox.checked,i=n.tbody?n.tbody.querySelectorAll("[data-ln-table-row]"):[],a=[];for(let b=0;b<i.length;b++){const d=i[b].getAttribute("data-ln-table-row-id"),w=i[b].querySelector("[data-ln-table-row-select]");d!=null&&(a.push(d),i[b].classList.toggle("ln-row-selected",u),w&&(w.checked=u))}n.selectedIds=wt(n.selectedIds,a,u),n.selectedCount=n.selectedIds.size,D(n.dom,"ln-table:select-all",{table:n.name,selected:u}),D(n.dom,"ln-table:select",{table:n.name,selectedIds:n.selectedIds,count:n.selectedCount}),n._updateFooter()},this._selectAllCheckbox.addEventListener("change",this._onSelectAll)),this.tbody){const u=this.tbody.querySelectorAll("[data-ln-table-row]");for(let i=0;i<u.length;i++){const a=u[i].querySelector("[data-ln-table-row-select]"),b=u[i].getAttribute("data-ln-table-row-id");a&&a.checked&&b!=null&&(n.selectedIds=pt(n.selectedIds,b,!0),u[i].classList.add("ln-row-selected"))}this.selectedCount=this.selectedIds.size,this.selectedCount>0&&this._updateSelectAll()}},A.prototype._disableSelection=function(){if(!this._selectableActive)return;this._selectableActive=!1,this.tbody&&this._onSelectionChange&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll);const n=this.dom.querySelector("[data-ln-table-col-select]");if(n){const u=n.querySelector('input[type="checkbox"]');u&&u.remove()}if(this._selectAllCheckbox=null,this.selectedIds=wt(this.selectedIds,Array.from(this.selectedIds),!1),this.selectedCount=0,this.tbody){const u=this.tbody.querySelectorAll("[data-ln-table-row]");for(let i=0;i<u.length;i++){u[i].classList.remove("ln-row-selected");const a=u[i].querySelector("[data-ln-table-row-select]");a&&(a.checked=!1)}}this._updateFooter()},A.prototype._updateFooter=function(){let n=0,u=0;this.isDataDriven?(n=this._lastTotal!=null?this._lastTotal:this._data.length,u=this.visibleCount):(n=this._data.length,u=this._filteredData.length);const i=u<n;if(this._totalSpan&&(this._totalSpan.textContent=I(n,this.dom)),this._filteredSpan&&(this._filteredSpan.textContent=i?I(u,this.dom):""),this._filteredWrap&&this._filteredWrap.classList.toggle("hidden",!i),this._selectedSpan){const a=this.selectedIds?this.selectedIds.size:0;this._selectedSpan.textContent=a>0?I(a,this.dom):"",this._selectedWrap&&this._selectedWrap.classList.toggle("hidden",a===0)}},A.prototype.destroy=function(){this.dom[e]&&(this._disableVirtualScroll(),this.dom.removeEventListener("ln-table:set-search",this._onSetSearch),this.dom.removeEventListener("ln-table:request-clear-filters",this._onRequestClearFilters),this.isDataDriven?(this.dom.removeEventListener("ln-table:set-data",this._onSetData),this.dom.removeEventListener("ln-table:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-table:page-failed",this._onPageFailed),this.dom.removeEventListener("ln-table:request-revalidate",this._onRequestRevalidate),this.dom.removeEventListener("ln-table:request-invalidate",this._onRequestInvalidate),this.dom.removeEventListener("ln-sort:change",this._onSort),this.tbody&&(this.tbody.removeEventListener("click",this._onRowClick),this.tbody.removeEventListener("click",this._onRowAction)),this._cache&&this._cache.destroy()):(this._emptyTbodyObserver&&(this._emptyTbodyObserver.disconnect(),this._emptyTbodyObserver=null),this.dom.removeEventListener("ln-sort:change",this._onSort),this.dom.removeEventListener("ln-search:change",this._onSearchChange),this.dom.removeEventListener("ln-filter:change",this._onFilterChange)),this._onSelectionChange&&this.tbody&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll),this._colgroup&&(this._colgroup.remove(),this._colgroup=null),this.table&&(this.table.style.tableLayout=""),this._data=[],this._filteredData=[],delete this.dom[e])},ht(t,e,A,"ln-table",{attributes:E})})()})();
1
+ (function(){"use strict";function G(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function M(t){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return t?window.lnCore._debugIsContained(t):window.lnCore._debugSink!==null;if(t&&t.closest){const e=t.closest("[data-ln-debug]");return!(!e||typeof document<"u"&&e===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const t=console.warn;console.warn=function(...e){if(typeof e[0]=="string"&&(e[0].startsWith("[ln-")||e[0].startsWith("[lnCore"))){let o=null;for(let s=1;s<e.length;s++)if(e[s]&&e[s].nodeType===1){o=e[s];break}if(!M(o))return}t.apply(console,e)}}function D(t,e,l){const o=l||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",e,t,o),t.dispatchEvent(new CustomEvent(e,{bubbles:!0,detail:o}))}function _t(t,e,l){t._applyFilterAndSort(),t._vStart=-1,t._vEnd=-1,t._render(),t._updateFooter();const o={sort:t.currentSort,filters:t.currentFilters,search:t.currentSearch};o[l]=t.name,D(t.dom,e,o)}function H(t,e){if(!document.body){document.addEventListener("DOMContentLoaded",function(){H(t,e)}),console.warn("["+e+'] Script loaded before <body> — add "defer" to your <script> tag');return}t()}function K(t){return t.hasAttribute("value")?t.getAttribute("value"):t.hasAttribute("data-ln-value")?t.getAttribute("data-ln-value"):t.tagName==="TIME"&&t.hasAttribute("datetime")?t.getAttribute("datetime"):t.textContent.trim()}function gt(t){const e=t.querySelector('input[name="_method"]');return((e&&e.value!==""?e.value:t.method)||"").toUpperCase()}function mt(t,e){const l=!!(e&&e.typed),o=e&&e.exclude,s={},h=t.elements,c={};if(l)for(let f=0;f<h.length;f++){const r=h[f];r.name&&r.type==="checkbox"&&!r.disabled&&(c[r.name]=(c[r.name]||0)+1)}for(let f=0;f<h.length;f++){const r=h[f];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")l&&c[r.name]===1?s[r.name]=r.checked:(s[r.name]||(s[r.name]=[]),r.checked&&s[r.name].push(r.value));else if(r.type==="radio")r.checked&&(s[r.name]=r.value);else if(r.type==="select-multiple"){s[r.name]=[];for(let p=0;p<r.options.length;p++)r.options[p].selected&&s[r.name].push(r.options[p].value)}else if(l&&r.type==="hidden")s[r.name]=r.value;else if(l&&(r.type==="number"||r.type==="range")){const p=Number(r.value);s[r.name]=r.value===""||isNaN(p)?null:p}else s[r.name]=r.value}return s}function yt(t){if(typeof t!="string")return!!t;const e=t.trim().toLowerCase();return e!=="false"&&e!=="0"&&e!==""&&e!=="off"&&e!=="no"}function Ct(t,e){const l=t.elements,o=[],s={};for(let h=0;h<l.length;h++){const c=l[h];c.name&&c.type==="checkbox"&&(s[c.name]=(s[c.name]||0)+1)}for(let h=0;h<l.length;h++){const c=l[h];if(c.type==="file"||c.type==="submit"||c.type==="button")continue;const f=c.getAttribute("data-ln-fill-as")||c.name;if(!f||!(f in e))continue;const r=e[f];if(c.type==="checkbox"){if(Array.isArray(r))c.checked=r.indexOf(c.value)!==-1;else if(s[c.name]>1){const p=String(r).split(",").map(function(m){return m.trim()});c.checked=p.indexOf(c.value)!==-1}else c.checked=yt(r);o.push(c)}else if(c.type==="radio")c.checked=c.value===String(r),o.push(c);else if(c.type==="select-multiple"){if(Array.isArray(r))for(let p=0;p<c.options.length;p++)c.options[p].selected=r.indexOf(c.options[p].value)!==-1;o.push(c)}else c.value=r,c.tagName==="SELECT"&&r!=null&&c.setAttribute("data-ln-value",r),o.push(c)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Ct,window.lnCore.serializeForm=mt,window.lnCore.resolveFormMethod=gt);const Q={};function St(t,e){Q[t]=e}function vt(t){return Q[t]||{ingress:e=>e,egress:e=>e}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=St,window.lnCore.getDataMapper=vt);function At(t){const e=t?t.closest("[lang]"):null,l=(e?e.getAttribute("lang")||e.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return l?l.trim():"en-US"}function Et(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,H(function(){new MutationObserver(function(){D(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function kt(t,e){if(!t||typeof e!="object")return;const l=t.toLowerCase().split("-")[0];Y[l]=e}function xt(t){if(!t)return null;const e=t.toLowerCase().split("-")[0];return Y[e]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=kt,window.lnCore.getLocaleFallback=xt,window.lnCore.ensureLocaleObserver=Et);const N={};function J(t,e){N[t]||(N[t]=document.querySelector('[data-ln-template="'+t+'"]'));const l=N[t];return l?l.content.cloneNode(!0):(console.warn("["+(e||"ln-core")+'] Template "'+t+'" not found'),null)}function X(t,e,l){if(t){const o=t.querySelector('[data-ln-template="'+e+'"]');if(o)return o.content.cloneNode(!0)}return J(e,l)}function Z(t,e){if(!t||!e)return t;const l=t.querySelectorAll("[data-ln-field]");for(let c=0;c<l.length;c++){const f=l[c],r=f.getAttribute("data-ln-field");e[r]!=null&&(f.textContent=e[r])}const o=t.querySelectorAll("[data-ln-attr]");for(let c=0;c<o.length;c++){const f=o[c],r=f.getAttribute("data-ln-attr").split(",");for(let p=0;p<r.length;p++){const m=r[p].trim().split(":");if(m.length!==2)continue;const v=m[0].trim(),E=m[1].trim();e[E]!=null&&f.setAttribute(v,e[E])}}const s=t.querySelectorAll("[data-ln-show]");for(let c=0;c<s.length;c++){const f=s[c],r=f.getAttribute("data-ln-show");r in e&&f.classList.toggle("hidden",!e[r])}const h=t.querySelectorAll("[data-ln-class]");for(let c=0;c<h.length;c++){const f=h[c],r=f.getAttribute("data-ln-class").split(",");for(let p=0;p<r.length;p++){const m=r[p].trim().split(":");if(m.length!==2)continue;const v=m[0].trim(),E=m[1].trim();E in e&&f.classList.toggle(v,!!e[E])}}return t}function Dt(t,e){t.matches&&t.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",t,e??null),t.dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0})));const l=t.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<l.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",l[o],e??null),l[o].dispatchEvent(new CustomEvent("ln-fill",{detail:e??null,bubbles:!0}));return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(t){if(!(!t.target.matches||!t.target.matches("[data-ln-fillable]")))if(t.detail)Z(t.target,t.detail);else{const e=t.target.querySelectorAll("[data-ln-field]");for(let l=0;l<e.length;l++)e[l].textContent=""}})));function W(t,e){if(!t||!e)return t;const l=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);for(;l.nextNode();){const h=l.currentNode;h.textContent.indexOf("{{")!==-1&&(h.textContent=h.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(c,f){return e[f]!==void 0?e[f]:""}))}const o=function(h,c){return e[c]!==void 0?e[c]:""},s=Array.from(t.querySelectorAll("*"));t.nodeType===1&&s.push(t);for(let h=0;h<s.length;h++){const c=s[h],f=c.attributes;for(let r=0;r<f.length;r++){const p=f[r];p.value.indexOf("{{")!==-1&&c.setAttribute(p.name,p.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return t}function Tt(t,e,l,o,s,h){const c={};for(let r=0;r<t.children.length;r++){const p=t.children[r],m=p.getAttribute("data-ln-render-key");m&&(c[m]=p)}const f=document.createDocumentFragment();for(let r=0;r<e.length;r++){const p=e[r],m=String(o(p));let v=c[m];if(v)s(v,p,r);else{const E=J(l,h);if(!E||(W(E,p),v=E.firstElementChild,!v))continue;v.setAttribute("data-ln-render-key",m),s(v,p,r)}f.appendChild(v)}t.textContent="",t.appendChild(f)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=Z,window.lnCore.lnFill=Dt,window.lnCore.renderList=Tt);function F(t,e,l){const o=t.getAttribute(e);return o===null?l:o}function tt(t,e,l){const o=parseInt(t.getAttribute(e),10);return isNaN(o)?l:o}function P(t,e,l=!1){const o=t.getAttribute(e);if(o===null)return!!l;const s=o.trim().toLowerCase();return!(s==="false"||s==="0")}function et(t,e){return(t.getAttribute(e)||"").split(",").map(l=>l.trim()).filter(Boolean)}const V=new Map;function nt(t,e){const l=(t?t.join("|"):"")+"::"+e;if(V.has(l))return V.get(l);const o=new Set(t||[]),s=function(h,c){const f=h.getAttribute(c);return f!==null&&o.has(f)?f:e};return V.set(l,s),s}function it(t,e,l){const o=parseFloat(t.getAttribute(e));return isNaN(o)?l:o}function lt(t,e,l){const o=t.getAttribute(e);if(!o)return l;try{return JSON.parse(o)}catch{return l}}function rt(t,e,l,o,s){if(!t||e===null)return!0;const h=o||"ln-component",c=t.type;if(c==="trigger"||c==="marker"||c==="string"||c==="list"||!c||e===""&&t.fallback!==void 0)return!0;const f=r=>{s?console.warn(r,s):console.warn(r)};if(c==="boolean"){const r=e.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(f(`[${h}] Invalid value "${e}" for boolean attribute "${l}". Allowed: "true", "false", or presence-only.`),!1):!0}if(c==="enum"){const r=t.values||[];return r.includes(e)?!0:(f(`[${h}] Invalid value "${e}" for attribute "${l}". Allowed: ${r.join(", ")}. Fallback: "${t.fallback}".`),!1)}if(c==="integer"){if(!/^-?\d+$/.test(e))return f(`[${h}] Invalid integer "${e}" for attribute "${l}". Fallback: ${t.fallback}.`),!1;const r=parseInt(e,10);return t.min!==void 0&&r<t.min?(f(`[${h}] Value ${r} for attribute "${l}" is less than min (${t.min}).`),!1):t.max!==void 0&&r>t.max?(f(`[${h}] Value ${r} for attribute "${l}" is greater than max (${t.max}).`),!1):!0}if(c==="float")return isNaN(Number(e))?(f(`[${h}] Invalid float "${e}" for attribute "${l}". Fallback: ${t.fallback}.`),!1):!0;if(c==="json")try{return JSON.parse(e),!0}catch(r){return f(`[${h}] Invalid JSON for attribute "${l}": ${r.message}. Fallback: ${t.fallback}.`),!1}return!0}function ot(t,e,l){for(const o in l){const[s,h,c]=l[o];Object.defineProperty(t,o,{get:function(){return s(e,h,c)},enumerable:!0,configurable:!0})}return t}function st(t){const e={};for(const l in t){const o=t[l];if(!o||!o.prop)continue;let s=o.read;if(!s&&o.type)switch(o.type){case"enum":s=nt(o.values,o.fallback);break;case"integer":s=tt;break;case"float":s=it;break;case"boolean":s=P;break;case"list":s=et;break;case"json":s=lt;break;case"string":default:s=F;break}s||(s=F),e[o.prop]=[s,l,o.fallback]}return e}function Lt(t){const e={};for(const l in t){const o=t[l];o&&o.effect&&(e[l]=o.effect)}return Object.keys(e).length?e:null}function qt(t){if(t.onAttrChange&&!t.declared)return null;const e=new Set;if(t.effects)for(const l in t.effects)e.add(l);if(t.onAttrChange&&t.declared)for(const l of t.declared)e.add(l);return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ot,window.lnCore.attrSpec=st,window.lnCore.attrStr=F,window.lnCore.attrInt=tt,window.lnCore.attrBool=P,window.lnCore.attrList=et,window.lnCore.attrEnum=nt,window.lnCore.attrFloat=it,window.lnCore.attrJson=lt);function O(t,e){if(!t[e.attribute]){window.lnCore._persistSink&&t.hasAttribute&&t.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(t,e.selector);try{t[e.attribute]=new e.ComponentFn(t)}catch(l){console.error("["+e.attribute+"] init failed",t,l)}}}function at(t,e,l,o){if(t.nodeType!==1)return;const h=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]",c={selector:e,attribute:l,ComponentFn:o};if(t.matches&&t.matches(h)&&O(t,c),t.querySelectorAll){const f=t.querySelectorAll(h);for(let r=0;r<f.length;r++)O(f[r],c)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function It(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Rt(t){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(t):setTimeout(t,0)):t()}function ct(){window.lnCore=window.lnCore||{};const t=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return t.byReactive=t.byReactive||new Map,t.reactiveWildcard=t.reactiveWildcard||[],t}function Ft(t){const e=ct(),l=t.observed||[];for(let o=0;o<l.length;o++){const s=l[o];e.byAttr.has(s)||e.byAttr.set(s,[]),e.byAttr.get(s).push(t)}if(e.byDeclaredAttr=e.byDeclaredAttr||new Map,t.attributes)for(const o in t.attributes){e.byDeclaredAttr.has(o)||e.byDeclaredAttr.set(o,[]);const s=e.byDeclaredAttr.get(o);s.some(h=>h.componentTag===t.componentTag)||s.push({spec:t.attributes[o],componentTag:t.componentTag})}if(t.onAttrChange||t.effects){e.reactive.push(t);const o=qt(t);if(o===null)e.reactiveWildcard.push(t);else for(const s of o)e.byReactive.has(s)||e.byReactive.set(s,[]),e.byReactive.get(s).push(t)}t.persist&&e.persist.push(t)}function dt(t,e,l,o){for(let s=0;s<t.length;s++){const h=t[s];if(!e[h.attribute])continue;const c=h.effects&&h.effects[l];c?c(e,l,o):h.onAttrChange&&(!h.declared||h.declared.has(l))&&h.onAttrChange(e,l,o)}}function Ot(t){const e=t.attributeName,l=e.indexOf("data-ln-")===0,o=ct(),s=o.byAttr.get(e),h=G()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(e);if(!l&&!s&&!h)return;const c=t.target;if(t.oldValue!==c.getAttribute(e)){if(h&&M(c)){const f=o.byDeclaredAttr.get(e),r=c.getAttribute(e);for(let p=0;p<f.length;p++)rt(f[p].spec,r,e,f[p].componentTag,c)}if(window.lnCore._debugSink&&(l||s)&&window.lnCore._debugSink("attr",e,c,{oldValue:t.oldValue,newValue:c.getAttribute(e)}),l){const f=o.byReactive.get(e);f&&dt(f,c,e,t.oldValue),o.reactiveWildcard.length&&dt(o.reactiveWildcard,c,e,t.oldValue)}if(s)for(let f=0;f<s.length;f++){const r=s[f];if(r.handler){r.handler(c,e,t.oldValue);continue}r.onAttributeChange&&c[r.attribute]?r.onAttributeChange(c,e):(at(c,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(c))}}}function Ht(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,H(function(){new MutationObserver(function(e){for(let l=0;l<e.length;l++)try{Ot(e[l])}catch(o){console.error("[ln-core] mutation handler failed",e[l].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function z(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function $(t,e){if(!document.contains(t))if(e.attribute){const l=t[e.attribute];if(l&&typeof l.destroy=="function")try{l.destroy()}catch(o){console.error("["+e.attribute+"] destroy failed",t,o)}delete t[e.attribute]}else e.onDestroy&&e.onDestroy(t)}function Mt(t){const e=B();if(!e.length)return;const l=t.target;if(l){const s=l.nodeType===1?l:l.parentElement;if(s&&(s.isContentEditable||s.closest&&s.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=z();if(t.target&&o.length)for(let s=0;s<o.length;s++){const h=o[s],c=h.query,f=t.target.nodeType===1?t.target.matches&&t.target.matches(c)?t.target:t.target.closest?t.target.closest(c):null:t.target.parentElement&&t.target.parentElement.closest?t.target.parentElement.closest(c):null;f&&h.onSubtreeChange(f,t)}for(let s=0;s<t.addedNodes.length;s++){const h=t.addedNodes[s];if(h.nodeType===1){const c=!!(h.firstElementChild||h.children&&h.children.length);for(let f=0;f<e.length;f++){const r=e[f];if(r.selector&&r.attribute&&r.ComponentFn){if(!c)h.matches&&h.matches(r.query)&&O(h,r);else if(h.matches&&h.matches(r.query)&&O(h,r),h.querySelectorAll){const p=h.querySelectorAll(r.query);for(let m=0;m<p.length;m++)O(p[m],r)}}r.onInit&&r.onInit(h)}}}for(let s=0;s<t.removedNodes.length;s++){const h=t.removedNodes[s];if(h.nodeType===1){const c=!!(h.firstElementChild||h.children&&h.children.length);for(let f=0;f<e.length;f++){const r=e[f],p=r.query;if(p){if(!c)h.matches&&h.matches(p)&&$(h,r);else if(h.matches&&h.matches(p)&&$(h,r),h.querySelectorAll){const m=h.querySelectorAll(p);for(let v=0;v<m.length;v++)$(m[v],r)}}}}}}function ut(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,H(function(){new MutationObserver(function(e){for(let l=0;l<e.length;l++){const o=e[l];if(o.type==="childList")try{Mt(o)}catch(s){console.error("[ln-core] lifecycle handler failed",o.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Nt(t){B().push(t),t.onSubtreeChange&&t.query&&z().push(t),ut()}function ht(t,e,l,o,s={}){const h=s.extraAttributes||[],c=s.onAttributeChange||null,f=s.onSubtreeChange||null,r=s.onInit||null,p=s.onAttrChange||null,m=s.effects||null,v=s.attributes||null,E=v?Lt(v):m,q=v?new Set(Object.keys(v)):null,I=s.persist||null;function R(b){const d=b||document.body;if(at(d,t,e,l),v&&G())for(const w in v){const _=v[w],g=Array.from(d.querySelectorAll("["+w+"]"));d.matches&&d.matches("["+w+"]")&&g.push(d);for(let y=0;y<g.length;y++){const T=g[y];M(T)&&rt(_,T.getAttribute(w),w,o,T)}}r&&r(d)}const A=[];if(t.indexOf("[")!==-1){const b=/\[([\w-]+)/g;let d;for(;(d=b.exec(t))!==null;)A.push(d[1])}else A.push(t);Ft({selector:t,attribute:e,componentTag:o,attributes:v,ComponentFn:l,onInit:r,observed:A.concat(h),onAttributeChange:c,onAttrChange:p,effects:E,declared:q,persist:I}),Ht();const n=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1,u=s.subtreeQuery||(n?t:"["+t+"]"),i={selector:t,attribute:e,ComponentFn:l,onInit:r,onSubtreeChange:f,query:u};B().push(i),f&&u&&z().push(i),ut(),window[e]=R,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ht,window.lnCore.observeLifecycle=Nt);function a(){It()>0?Rt(function(){R(document.body)}):R(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",a):a(),R}function Wt(t,e){let l=!1;return function(){l||(l=!0,queueMicrotask(function(){l=!1,t()}))}}function Pt(t){t=t||{};let e=t.windowSize>0?t.windowSize:1e3,l=t.pageSize>0?t.pageSize:200,o=t.threshold!=null?t.threshold:25,s=t.fetchDebounce!=null?t.fetchDebounce:120;const h=typeof t.requestPage=="function"?t.requestPage:function(){},c=typeof t.onChange=="function"?t.onChange:function(){},f=new Map,r=new Map,p=new Set;let m=0,v=0,E=0,q={sort:null,filters:{},search:""},I=null,R=0,A=0,n=!1;function u(d){r.set(d,++R)}function i(){return!!(q&&(q.search||q.filters&&Object.keys(q.filters).length))}function a(){if(f.size<=e)return;const d=Array.from(f.keys()).sort(function(_,g){return(r.get(_)||0)-(r.get(g)||0)});let w=0;for(;f.size>e&&w<d.length;)f.delete(d[w]),r.delete(d[w]),w++}function b(d,w){p.add(d),h(q,d,w)}return{get:function(d){return f.get(d)},has:function(d){return f.has(d)},peek:function(){return f.size?f.values().next().value:void 0},get logicalTotal(){return m},get grandTotal(){return v},get queryGen(){return E},get size(){return f.size},ensure:function(d,w){clearTimeout(I),A=d;for(let k=d;k<w;k++)f.has(k)&&u(k);if(m<=0)return;const _=Math.max(0,d-o),g=Math.min(m,w+o),y=Math.floor(_/l),T=Math.floor(Math.max(0,g-1)/l);let L=-1;for(let k=y;k<=T;k++){const C=k*l,S=Math.min(l,m-C);let x=!1;const Jt=Math.max(C,_),Xt=Math.min(C+S,g);for(let U=Jt;U<Xt;U++)if(!f.has(U)){x=!0;break}if(x&&!p.has(C)){L=C;break}}L!==-1&&(I=setTimeout(function(){b(L,l)},s))},ingest:function(d){if(d=d||{},d.queryGen!=null&&d.queryGen!==E)return!1;const w=d.offset||0,_=d.data||[];let g=0;for(let y=0;y<_.length;y++)_[y]!=null&&g++;if(g===0&&(d.provisional||d.filtered>0))return p.delete(w),!1;n&&(f.clear(),r.clear(),n=!1),d.provisional||(v=d.total!=null?d.total:v,m=d.filtered!=null?d.filtered:d.data?d.data.length:m);for(let y=0;y<_.length;y++)_[y]!=null&&(f.set(w+y,_[y]),u(w+y));return p.delete(w),a(),c(),!0},requestInitial:function(d){d&&(q=d),b(0,l)},invalidate:function(d){E++,p.clear(),clearTimeout(I),d&&(q=d),n=!0,b(0,l)},revalidate:function(){E++,p.clear(),clearTimeout(I),n=!0;const d=Math.max(0,Math.floor(A/l)*l);b(d,l)},release:function(d){p.delete(d)},destroy:function(){clearTimeout(I),f.clear(),r.clear(),p.clear()},configure:function(d){d=d||{};let w=!1;if(d.windowSize!=null&&d.windowSize>0&&d.windowSize!==e){const _=d.windowSize<e;e=d.windowSize,_&&a(),w=!0}d.pageSize!=null&&d.pageSize>0&&(l=d.pageSize),d.threshold!=null&&d.threshold>=0&&(o=d.threshold),d.fetchDebounce!=null&&d.fetchDebounce>=0&&(s=d.fetchDebounce),w&&c()},setGrandTotal:function(d){d==null||isNaN(d)||d<0||(v=d,i()||(m=d),c())}}}function ft(t){return(t||"").replace(/^#/,"")}function j(t){const e=t===void 0?location.hash:t,l={},o=ft(e);if(!o)return l;const s=o.split("&");for(let h=0;h<s.length;h++){const c=s[h];if(!c)continue;const f=c.indexOf(":"),r=f>-1?c.slice(0,f):c,p=f>-1?c.slice(f+1):"";if(r)try{l[r]=decodeURIComponent(p)}catch{l[r]=p}}return l}function Vt(t){if(!t)return null;const e=j();return t in e?e[t]:null}function Bt(t,e){if(!t)return;const l=j();e==null?delete l[t]:l[t]=String(e);const s=Object.keys(l).map(function(h){const c=l[h];return c===""?h:h+":"+encodeURIComponent(c)}).join("&");ft(location.hash)!==s&&(location.hash=s)}function zt(t){return t.button===1||t.ctrlKey||t.metaKey||t.shiftKey?!1:(t.preventDefault(),!0)}function $t(t,e){if(!t||!t.hasAttribute("data-ln-hash"))return null;const l=t.getAttribute("data-ln-hash");if(l&&l.trim()!=="")return l.trim();const o=t.getAttribute("data-ln-sort")||t.getAttribute("data-ln-search-for")||t.getAttribute("data-ln-search")||t.getAttribute("data-ln-filter")||t.id;return o?e?o+"-"+e:o:e||null}function jt(t,e){return!e||e==="none"||t===null||t===void 0?null:String(t)+"."+e}function Ut(t){return!t||typeof t!="string"?null:t.endsWith(".asc")?{fieldOrColumn:t.slice(0,-4),direction:"asc"}:t.endsWith(".desc")?{fieldOrColumn:t.slice(0,-5),direction:"desc"}:null}function Gt(t,e){return!t||!Array.isArray(e)||e.length===0?null:t+":"+e.map(encodeURIComponent).join(",")}function Kt(t){if(!t||typeof t!="string")return null;const e=t.indexOf(":");if(e===-1)return null;const l=t.slice(0,e),o=t.slice(e+1),s=o?o.split(",").map(function(h){try{return decodeURIComponent(h)}catch{return h}}).filter(Boolean):[];return{key:l,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=Vt,window.lnCore.hashSet=Bt,window.lnCore.hashLinkClick=zt,window.lnCore.resolveHashNamespace=$t,window.lnCore.hashSortEncode=jt,window.lnCore.hashSortDecode=Ut,window.lnCore.hashFilterEncode=Gt,window.lnCore.hashFilterDecode=Kt);function Qt(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Qt);function bt(t,e,l,o,s=15){if(o<=0||l<=0)return{start:0,end:0,topPadding:0,bottomPadding:0};const h=Math.max(0,t||0),c=Math.max(0,e||0),f=Math.floor(h/l),r=Math.ceil(c/l),p=Math.max(0,f-s),m=Math.min(o,f+r+s),v=p*l,E=Math.max(0,(o-m)*l);return{start:p,end:m,topPadding:v,bottomPadding:E}}function Yt(t,e){const l=Array.isArray(t)?t.length:0,o=e instanceof Set?e:new Set(e||[]);let s=0;if(Array.isArray(t))for(let f=0;f<t.length;f++)o.has(t[f])&&s++;else s=o.size;const h=l>0&&s===l,c=s>0&&s<l;return{totalCount:l,selectedCount:s,isAllSelected:h,isIndeterminate:c}}function pt(t,e,l){const o=new Set(t);return e==null||((l!==void 0?l:!o.has(e))?o.add(e):o.delete(e)),o}function wt(t,e,l){const o=new Set(t);if(!Array.isArray(e))return o;if(l)for(let s=0;s<e.length;s++)e[s]!=null&&o.add(e[s]);else for(let s=0;s<e.length;s++)o.delete(e[s]);return o}(function(){const t="data-ln-table",e="lnTable",l="data-ln-table-empty";if(window[e]!==void 0)return;function r(n,u){if(!n||!n.isDataDriven)return;const i=n.dom.hasAttribute("data-ln-table-window");if(i&&!n._windowed)n._enterWindowedMode(),n._kickWindowInitial();else if(!i&&n._windowed)n._exitWindowedMode();else if(i&&n._windowed){const a=parseInt(u,10);a>0&&n._cache.configure({windowSize:a})}}function p(n,u){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const i=parseInt(u,10);i>0&&n._cache.configure({pageSize:i})}function m(n,u){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const i=parseInt(u,10);i>=0&&n._cache.configure({threshold:i})}function v(n,u){if(!n||!n.isDataDriven||!n._windowed||!n._cache)return;const i=parseInt(u,10);i>=0&&n._cache.setGrandTotal(i)}const E={"data-ln-table":{prop:"name",type:"string",read:F,fallback:"",description:"Table instance name or identifier"},"data-ln-table-source":{prop:"source",type:"string",read:F,fallback:"",description:"Source store or coordinator addressing"},"data-ln-table-selectable":{prop:"_selectable",type:"boolean",read:P,description:"Enables row selection check controls"},"data-ln-table-window":{type:"integer",fallback:1e3,min:10,effect:r,description:"Virtual scrolling window size in rows"},"data-ln-table-window-page":{type:"integer",fallback:200,min:5,effect:p,description:"Virtual scrolling slice page size"},"data-ln-table-window-threshold":{type:"integer",fallback:50,min:0,effect:m,description:"Scroll threshold margin in pixels to trigger page fetch"},"data-ln-table-count":{type:"integer",min:0,effect:v,description:"Total record count override for virtual scrollbar calculation"},"data-ln-table-row":{type:"marker",description:"Table row template element"},"data-ln-table-row-id":{type:"string",description:"Record identifier on row element"},"data-ln-table-row-action":{type:"trigger",description:"Action trigger inside a table row"},"data-ln-table-row-select":{type:"trigger",description:"Row selection checkbox trigger"},"data-ln-table-col":{type:"string",description:"Column header identifier or field mapping"},"data-ln-table-col-select":{type:"trigger",description:"Header select-all checkbox trigger"},"data-ln-table-cell-attr":{type:"string",description:"Cell attribute template mapping"},"data-ln-table-empty":{type:"marker",description:"Container for table empty state"},"data-ln-table-select-all-label":{type:"string",description:"Accessibility label for select-all header trigger"}},q=st(E);typeof Intl<"u"&&new Intl.Collator(document.documentElement.lang||void 0,{sensitivity:"base"});function I(n,u){if(n==null||isNaN(n))return"";try{return new Intl.NumberFormat(At(u)).format(n)}catch{return String(n)}}function R(n){let u=n.parentElement;for(;u&&u!==document.body&&u!==document.documentElement;){const a=getComputedStyle(u).overflowY;if(a==="auto"||a==="scroll")return u;u=u.parentElement}return null}function A(n){this.dom=n,ot(this,n,q),this.table=n.querySelector("table"),this.tbody=n.querySelector("[data-ln-table-body]")||n.querySelector("tbody"),this.thead=n.querySelector("thead");const u=this.thead?this.thead.querySelector("tr:last-child"):null;this.ths=u?Array.from(u.querySelectorAll("th")):[],this._totalSpan=n.querySelector("[data-ln-table-total]"),this._filteredSpan=n.querySelector("[data-ln-table-filtered]"),this._filteredSpan&&(this._filteredWrap=this._filteredSpan.parentElement!==n?this._filteredSpan.parentElement:null),this._selectedSpan=n.querySelector("[data-ln-table-selected]"),this._selectedSpan&&(this._selectedWrap=this._selectedSpan.parentElement!==n?this._selectedSpan.parentElement:null),this.isDataDriven=n.hasAttribute("data-ln-table-source"),this._data=[],this._filteredData=[],this._searchTerm="",this._sortCol=-1,this._sortDir=null,this._columnFilters={},this.selectedIds=new Set,this._virtual=!1,this._rowHeight=0,this._vStart=-1,this._vEnd=-1,this._rafId=null,this._scrollHandler=null,this._scrollContainer=null,this._colgroup=null;const i=this;return this._onSetSearch=function(a){const b=(a.detail&&a.detail.query!=null?a.detail.query:a.detail&&a.detail.term!=null?a.detail.term:"").trim();i.isDataDriven?(i.currentSearch=b,D(n,"ln-table:search",{table:i.name,query:i.currentSearch}),i._requestData()):(i._searchTerm=b.toLowerCase(),i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-table:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-table:set-search",this._onSetSearch),this._onSearchChange=function(a){a.preventDefault(),i._onSetSearch(a)},n.addEventListener("ln-search:change",this._onSearchChange),this._onRequestClearFilters=function(){i.isDataDriven?(i.currentFilters={},i.currentSearch="",D(n,"ln-table:clear-filters",{table:i.name}),i._requestData()):(i._searchTerm="",i._columnFilters={},i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-table:filter",{term:"",matched:i._filteredData.length,total:i._data.length}))},n.addEventListener("ln-table:request-clear-filters",this._onRequestClearFilters),this._selectableActive=!1,this._selectable&&this._enableSelection(),this.isDataDriven?(this.isLoaded=!1,this.totalCount=0,this.visibleCount=0,this.currentSort=null,this.currentFilters={},this.currentSearch="",this._lastTotal=0,this._lastFiltered=0,this._hasInitialSeed=!1,this._windowed=!1,this._cache=null,this.isDataDriven&&n.hasAttribute("data-ln-table-window")&&this._enterWindowedMode(),this._onSetData=function(a){const b=a.detail||{},d=b.data||[],w=b.total!=null?b.total:d.length;if(!(i._hasInitialSeed&&!i.isLoaded&&d.length===0&&w===0)){if(i._windowed){i._cache.ingest(b)&&!b.provisional&&n.classList.remove("ln-table--loading");return}i._data=d,i._lastTotal=w,i._lastFiltered=b.filtered!=null?b.filtered:i._data.length,i.totalCount=i._lastTotal,i.visibleCount=i._lastFiltered,i.isLoaded=!0,i._hasInitialSeed=!1,n.classList.remove("ln-table--loading"),i._vStart=-1,i._vEnd=-1,i._applyFilterAndSort(),i._render(),i._updateFooter(),D(n,"ln-table:rendered",{table:i.name,total:i.totalCount,visible:i.visibleCount})}},n.addEventListener("ln-table:set-data",this._onSetData),this._onSetLoading=function(a){const b=a.detail&&a.detail.loading;n.classList.toggle("ln-table--loading",!!b),b&&(i.isLoaded=!1)},n.addEventListener("ln-table:set-loading",this._onSetLoading),this._onPageFailed=function(a){!i._windowed||!i._cache||i._cache.release(a.detail&&a.detail.offset)},n.addEventListener("ln-table:page-failed",this._onPageFailed),this._onRequestRevalidate=function(){!i._windowed||!i._cache||i._cache.revalidate()},n.addEventListener("ln-table:request-revalidate",this._onRequestRevalidate),this._onRequestInvalidate=function(){!i._windowed||!i._cache||i._requestData()},n.addEventListener("ln-table:request-invalidate",this._onRequestInvalidate),this._onSort=function(a){!a.detail||a.detail.field==null||(a.preventDefault(),i.currentSort=a.detail.direction==="none"?null:{field:a.detail.field,direction:a.detail.direction},i._requestData())},n.addEventListener("ln-sort:change",this._onSort),this._windowed&&this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden"),this._onRowClick=function(a){if(a.target.closest("[data-ln-table-row-select]")||a.target.closest("[data-ln-table-row-action]")||a.target.closest("a")||a.target.closest("button")||a.ctrlKey||a.metaKey||a.button===1)return;const b=a.target.closest("[data-ln-table-row]");if(!b)return;const d=b.getAttribute("data-ln-table-row-id"),w=b._lnRecord||{};D(n,"ln-table:row-click",{table:i.name,id:d,record:w})},this.tbody&&this.tbody.addEventListener("click",this._onRowClick),this._onRowAction=function(a){const b=a.target.closest("[data-ln-table-row-action]");if(!b)return;const d=b.closest("[data-ln-table-row]");if(!d)return;const w=b.getAttribute("data-ln-table-row-action"),_=d.getAttribute("data-ln-table-row-id"),g=d._lnRecord||{};D(n,"ln-table:row-action",{table:i.name,id:_,action:w,record:g})},this.tbody&&this.tbody.addEventListener("click",this._onRowAction),this.tbody&&this.tbody.rows.length>0&&this._parseRows(),this._windowed?this._kickWindowInitial():D(n,"ln-table:request-data",{table:this.name,sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})):(this._emptyTbodyObserver=null,this.tbody&&this.tbody.rows.length>0?this._parseRows():this.tbody&&(this._emptyTbodyObserver=new MutationObserver(function(){i.tbody.rows.length>0&&(i._emptyTbodyObserver.disconnect(),i._emptyTbodyObserver=null,i._parseRows())}),this._emptyTbodyObserver.observe(this.tbody,{childList:!0})),this._onSort=function(a){if(!a.detail||a.detail.column==null)return;a.preventDefault();const b=a.detail.direction==="none"?null:a.detail.direction;i._sortCol=b===null?-1:a.detail.column,i._sortDir=b,i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),D(n,"ln-table:sorted",{column:a.detail.column,direction:a.detail.direction,matched:i._filteredData.length,total:i._data.length})},n.addEventListener("ln-sort:change",this._onSort),this._onFilterChange=function(a){if(a.preventDefault(),!a.detail)return;const b=a.detail.key,d=a.detail.values||[];if(b){if(d.length===0)delete i._columnFilters[b];else{const w=[];for(let _=0;_<d.length;_++)w.push(d[_].toLowerCase());i._columnFilters[b]=w}i._applyFilterAndSort(),i._vStart=-1,i._vEnd=-1,i._render(),i._updateFooter(),D(n,"ln-table:filter",{term:i._searchTerm,matched:i._filteredData.length,total:i._data.length})}},n.addEventListener("ln-filter:change",this._onFilterChange)),this}A.prototype._parseRows=function(){const n=this.tbody.rows,u=this.ths;this._data=[],n.length>0&&(this._rowHeight=n[0].offsetHeight||40),this._lockColumnWidths();for(let i=0;i<n.length;i++){const a=n[i],b=[],d=[],w=[];for(let g=0;g<a.cells.length;g++){const y=a.cells[g],T=y.textContent.trim();b[g]=K(y),d[g]=T.toLowerCase(),y.querySelector("[data-ln-table-row-action]")||w.push(T.toLowerCase())}let _=null;if(this.isDataDriven){_={};const g=a.getAttribute("data-ln-table-row-id");g!=null&&(_.id=g);for(let y=0;y<u.length;y++){const T=u[y].getAttribute("data-ln-table-col");if(T){const L=y;if(L<a.cells.length){const k=a.cells[L];_[T]=K(k)}}}}this._data.push({values:b,rawTexts:d,html:a.outerHTML,searchText:w.join(" "),id:this.isDataDriven&&_?_.id:void 0,..._})}this._filteredData=this._data.slice(),this._data.length>0&&(this._hasInitialSeed=!0),this.isDataDriven&&(this._lastTotal=this._data.length,this._lastFiltered=this._data.length,this.totalCount=this._data.length,this.visibleCount=this._data.length,this._updateFooter()),this._render(),D(this.dom,"ln-table:ready",{total:this._data.length})},A.prototype._applyFilterAndSort=function(){this._filteredData=this._data?this._data.slice():[],this.visibleCount=this.isDataDriven&&this._lastFiltered!=null?this._lastFiltered:this._filteredData.length},A.prototype._lockColumnWidths=function(){if(!this.table||!this.thead||this._colgroup)return;const n=document.createElement("colgroup");this.ths.forEach(function(u){const i=document.createElement("col");i.style.width=u.offsetWidth+"px",n.appendChild(i)}),this.table.insertBefore(n,this.table.firstChild),this.table.style.tableLayout="fixed",this._colgroup=n},A.prototype._render=function(){if(this.tbody)if(this.isDataDriven){if(this._windowed){this._renderWindowed();return}const n=this._lastTotal,u=this.visibleCount;if(n===0){this._disableVirtualScroll(),this._showEmptyState();return}if(this._filteredData.length===0||u===0){this._disableVirtualScroll(),this._showEmptyState();return}this._filteredData.length>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}else{const n=this._filteredData.length;n===0&&(this._searchTerm||Object.keys(this._columnFilters).length>0)?(this._disableVirtualScroll(),this._showEmptyState()):n>200?(this._enableVirtualScroll(),this._renderVirtual()):(this._disableVirtualScroll(),this._renderAll())}},A.prototype._renderAll=function(){if(this.isDataDriven){const n=this._filteredData,u=document.createDocumentFragment();for(let i=0;i<n.length;i++){const a=this._buildRow(n[i]);if(!a)break;u.appendChild(a)}this.tbody.replaceChildren(u),this._selectable&&this._updateSelectAll()}else{const n=[],u=this._filteredData;for(let i=0;i<u.length;i++)n.push(u[i].html);this.tbody.innerHTML=n.join(""),this._selectable&&this._restoreSelection()}},A.prototype._enableVirtualScroll=function(){if(this._virtual)return;this._virtual=!0,this._vStart=-1,this._vEnd=-1;const n=this;if(!this._rowHeight)if(this.tbody&&this.tbody.rows.length>0)this._rowHeight=this.tbody.rows[0].offsetHeight||40;else{let i=null;if(this._windowed){const a=this._cache?this._cache.peek():null;i=a?this._buildRow(a):this._buildPlaceholderRow()}else this.isDataDriven&&this._data.length>0&&(i=this._buildRow(this._data[0]));i&&this.tbody&&(this.tbody.appendChild(i),this._rowHeight=i.offsetHeight||40,i.remove())}this.isDataDriven?this._scrollContainer=R(this.dom):this._scrollContainer=null;const u=this._scrollContainer||window;this._scrollHandler=function(){n._rafId||(n._rafId=requestAnimationFrame(function(){n._rafId=null,n._windowed?n._renderWindowed():n._renderVirtual()}))},u.addEventListener("scroll",this._scrollHandler,{passive:!0}),window.addEventListener("resize",this._scrollHandler,{passive:!0})},A.prototype._disableVirtualScroll=function(){this._virtual&&(this._virtual=!1,this._scrollHandler&&((this._scrollContainer||window).removeEventListener("scroll",this._scrollHandler),window.removeEventListener("resize",this._scrollHandler),this._scrollHandler=null),this._scrollContainer=null,this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null),this._vStart=-1,this._vEnd=-1)},A.prototype._renderVirtual=function(){const n=this._filteredData,u=n.length,i=this._rowHeight;if(!i||!u)return;const a=this.thead?this.thead.offsetHeight:0,b=this._scrollContainer;let d,w;if(b){const C=this.table.getBoundingClientRect(),S=b.getBoundingClientRect(),x=C.top-S.top+b.scrollTop+a;d=b.scrollTop-x,w=b.clientHeight}else{const x=this.table.getBoundingClientRect().top+window.scrollY+a;d=window.scrollY-x,w=window.innerHeight}const _=bt(d,w,i,u,15),g=_.start,y=_.end;if(g===this._vStart&&y===this._vEnd)return;this._vStart=g,this._vEnd=y;const T=this.ths.length||1,L=_.topPadding,k=_.bottomPadding;if(this.isDataDriven){const C=document.createDocumentFragment();if(L>0){const S=document.createElement("tr");S.className="ln-table__spacer",S.setAttribute("aria-hidden","true");const x=document.createElement("td");x.setAttribute("colspan",T),x.style.height=L+"px",S.appendChild(x),C.appendChild(S)}for(let S=g;S<y;S++){const x=this._buildRow(n[S]);x&&C.appendChild(x)}if(k>0){const S=document.createElement("tr");S.className="ln-table__spacer",S.setAttribute("aria-hidden","true");const x=document.createElement("td");x.setAttribute("colspan",T),x.style.height=k+"px",S.appendChild(x),C.appendChild(S)}this.tbody.replaceChildren(C),this._selectable&&this._updateSelectAll()}else{let C="";L>0&&(C+='<tr class="ln-table__spacer" aria-hidden="true"><td colspan="'+T+'" style="height:'+L+'px;padding:0;border:none"></td></tr>');for(let S=g;S<y;S++)C+=n[S].html;k>0&&(C+='<tr class="ln-table__spacer" aria-hidden="true"><td colspan="'+T+'" style="height:'+k+'px;padding:0;border:none"></td></tr>'),this.tbody.innerHTML=C,this._selectable&&this._restoreSelection()}},A.prototype._buildPlaceholderRow=function(){const n=document.createElement("tr");n.className="ln-table__placeholder",n.setAttribute("aria-hidden","true");const u=document.createElement("td");return u.setAttribute("colspan",this.ths.length||1),u.style.height=this._rowHeight+"px",n.appendChild(u),n},A.prototype._renderWindowed=function(){if(this.isLoaded&&this._cache.logicalTotal===0){this._disableVirtualScroll(),this._showEmptyState();return}this._virtual||this._enableVirtualScroll();const n=this._rowHeight;if(!n)return;const u=this._cache.logicalTotal,i=this.thead?this.thead.offsetHeight:0,a=this._scrollContainer;let b,d;if(a){const C=this.table.getBoundingClientRect(),S=a.getBoundingClientRect(),x=C.top-S.top+a.scrollTop+i;b=a.scrollTop-x,d=a.clientHeight}else{const x=this.table.getBoundingClientRect().top+window.scrollY+i;b=window.scrollY-x,d=window.innerHeight}const w=bt(b,d,n,u,15),_=w.start,g=w.end,y=this.ths.length||1,T=w.topPadding,L=w.bottomPadding,k=document.createDocumentFragment();if(T>0){const C=document.createElement("tr");C.className="ln-table__spacer",C.setAttribute("aria-hidden","true");const S=document.createElement("td");S.setAttribute("colspan",y),S.style.height=T+"px",C.appendChild(S),k.appendChild(C)}for(let C=_;C<g;C++)if(this._cache.has(C)){const S=this._buildRow(this._cache.get(C));S&&k.appendChild(S)}else k.appendChild(this._buildPlaceholderRow());if(L>0){const C=document.createElement("tr");C.className="ln-table__spacer",C.setAttribute("aria-hidden","true");const S=document.createElement("td");S.setAttribute("colspan",y),S.style.height=L+"px",C.appendChild(S),k.appendChild(C)}this.tbody.replaceChildren(k),this._vStart=_,this._vEnd=g,this._cache.ensure(_,g)},A.prototype._showEmptyState=function(){const n=this.ths.length||1;let u=null,i=null;if(this.isDataDriven){const a=this._lastTotal!=null?this._lastTotal:this._data.length,d=this.visibleCount===0&&a>0,w=d?this.name+"-empty-filtered":this.name+"-empty";if(i=X(this.dom,w,"ln-table"),!i){const _=this.dom.querySelector("template[data-ln-table-empty]");if(_){const g=d?"search":"initial",y=_.content.querySelector('[data-ln-table-empty-when="'+g+'"]')||_.content.firstElementChild;y&&(i=document.importNode(y,!0))}}if(i)if(i.tagName==="TR")u=i;else{const _=document.createElement("td");_.setAttribute("colspan",String(n)),_.appendChild(i);const g=document.createElement("tr");g.className="ln-table__empty",g.appendChild(_),u=g}}else{const a=this.dom.querySelector("template["+l+"]"),b=document.createElement("td");b.setAttribute("colspan",String(n)),a&&b.appendChild(document.importNode(a.content,!0));const d=document.createElement("tr");d.className="ln-table__empty",d.appendChild(b),u=d}u?this.tbody.replaceChildren(u):this.tbody.replaceChildren(),D(this.dom,"ln-table:empty",{term:this.isDataDriven?this.currentSearch||"":this._searchTerm,total:this.isDataDriven?this._lastTotal!=null?this._lastTotal:this._data.length:this._data.length})},A.prototype._fillRow=function(n,u){W(n,u);const i=n.querySelectorAll("[data-ln-table-cell-attr]");for(let a=0;a<i.length;a++){const b=i[a],d=b.getAttribute("data-ln-table-cell-attr").split(",");for(let w=0;w<d.length;w++){const _=d[w].trim().split(":");if(_.length!==2)continue;const g=_[0].trim(),y=_[1].trim();u[g]!=null&&b.setAttribute(y,u[g])}}},A.prototype._buildRow=function(n){let u=X(this.dom,this.name+"-row","ln-table");if(!u){const a=this.dom.querySelector("template[data-ln-table-row]");a&&(u=document.importNode(a.content,!0))}let i=u?u.querySelector("[data-ln-table-row]")||u.firstElementChild:null;if(i)this._fillRow(i,n);else if(n&&n.html){const a=document.createElement("tbody");a.innerHTML=n.html,i=a.firstElementChild}else{i=document.createElement("tr"),i.setAttribute("data-ln-table-row","");const a=this.ths;for(let b=0;b<a.length;b++){const d=a[b].hasAttribute("data-ln-table-col-select"),w=document.createElement("td");if(d){const _=document.createElement("input");_.type="checkbox",_.setAttribute("data-ln-table-row-select",""),_.setAttribute("aria-label","Select row"),w.appendChild(_)}else{const _=a[b].getAttribute("data-ln-table-col");_&&n[_]!=null&&(w.textContent=String(n[_]))}i.appendChild(w)}}if(i._lnRecord=n,n.id!=null&&i.setAttribute("data-ln-table-row-id",n.id),this._selectable&&n.id!=null&&this.selectedIds.has(String(n.id))){i.classList.add("ln-row-selected");const a=i.querySelector("[data-ln-table-row-select]");a&&(a.checked=!0)}return i},A.prototype._requestData=function(){if(this._windowed){this.dom.classList.add("ln-table--loading"),this._cache.invalidate({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch});return}_t(this,"ln-table:request-data","table")},A.prototype._enterWindowedMode=function(){const n=this,u=this.dom,i=parseInt(u.getAttribute("data-ln-table-window"),10),a=parseInt(u.getAttribute("data-ln-table-window-page"),10),b=parseInt(u.getAttribute("data-ln-table-window-threshold"),10);this._onCacheChange=function(){!n._windowed||!n._cache||(n.totalCount=n._cache.grandTotal,n.visibleCount=n._cache.logicalTotal,n._lastTotal=n._cache.grandTotal,n.isLoaded=!0,n._vStart=-1,n._vEnd=-1,n._render(),n._updateFooter(),D(u,"ln-table:rendered",{table:n.name,total:n.totalCount,visible:n.visibleCount}))},this._renderBatch=Wt(this._onCacheChange),this._cache=Pt({windowSize:i>0?i:1e3,pageSize:a>0?a:200,threshold:b>=0?b:25,fetchDebounce:120,requestPage:function(d,w,_){D(u,"ln-table:request-data",{table:n.name,sort:d.sort,filters:d.filters,search:d.search,offset:w,limit:_,queryGen:n._cache.queryGen})},onChange:this._renderBatch}),this._windowed=!0,this._selectable&&this._selectAllCheckbox&&this._selectAllCheckbox.classList.add("hidden")},A.prototype._kickWindowInitial=function(){if(this._data.length>0){let n=parseInt(this.dom.getAttribute("data-ln-table-count"),10);if(isNaN(n)&&this._totalSpan){const i=this._totalSpan.textContent.replace(/[^\d]/g,"");i&&(n=parseInt(i,10))}const u=n>0?n:this._data.length;this._cache.ingest({data:this._data,offset:0,total:u,filtered:u})}else this.dom.classList.add("ln-table--loading"),this._cache.requestInitial({sort:this.currentSort,filters:this.currentFilters,search:this.currentSearch})},A.prototype._exitWindowedMode=function(){this._disableVirtualScroll(),this._cache&&this._cache.destroy(),this._cache=null,this._windowed=!1,this._renderBatch=null,this._onCacheChange=null,this._selectAllCheckbox&&this._selectAllCheckbox.classList.remove("hidden"),this._rowHeight=0,this._vStart=-1,this._vEnd=-1,this._data=[],this._filteredData=[],this.dom.classList.add("ln-table--loading"),this._requestData()},A.prototype._updateSelectAll=function(){if(!this._selectAllCheckbox||!this.tbody)return;const n=this.tbody.querySelectorAll("[data-ln-table-row]"),u=[];for(let a=0;a<n.length;a++){const b=n[a].getAttribute("data-ln-table-row-id");b!=null&&u.push(b)}const i=Yt(u,this.selectedIds);this._selectAllCheckbox.checked=i.isAllSelected,this._selectAllCheckbox.indeterminate=i.isIndeterminate},A.prototype._restoreSelection=function(){if(!this.tbody)return;const n=this.tbody.querySelectorAll("[data-ln-table-row]");for(let u=0;u<n.length;u++){const i=n[u].getAttribute("data-ln-table-row-id"),a=i!=null&&this.selectedIds.has(i);n[u].classList.toggle("ln-row-selected",a);const b=n[u].querySelector("[data-ln-table-row-select]");b&&(b.checked=a)}this._updateSelectAll()},Object.defineProperty(A.prototype,"selectedCount",{get:function(){return this.selectedIds.size},set:function(){}}),A.prototype._enableSelection=function(){if(this._selectableActive)return;this._selectableActive=!0;const n=this;if(this._onSelectionChange=function(u){const i=u.target.closest("[data-ln-table-row-select]");if(!i)return;const a=i.closest("[data-ln-table-row]");if(!a)return;const b=a.getAttribute("data-ln-table-row-id");b!=null&&(n.selectedIds=pt(n.selectedIds,b,i.checked),a.classList.toggle("ln-row-selected",i.checked),n.selectedCount=n.selectedIds.size,n._updateSelectAll(),n._updateFooter(),D(n.dom,"ln-table:select",{table:n.name,selectedIds:n.selectedIds,count:n.selectedCount}))},this.tbody&&this.tbody.addEventListener("change",this._onSelectionChange),this._selectAllCheckbox=this.dom.querySelector('[data-ln-table-col-select] input[type="checkbox"]')||this.dom.querySelector("[data-ln-table-col-select]"),this._selectAllCheckbox&&this._selectAllCheckbox.tagName==="TH"){const u=document.createElement("input");u.type="checkbox";const i=n.dom.querySelector('[data-ln-table-dict="select-all"]'),a=n.dom.getAttribute("data-ln-table-select-all-label")||(i?i.textContent.trim():null)||"Select all";u.setAttribute("aria-label",a),this._selectAllCheckbox.appendChild(u),this._selectAllCheckbox=u}if(this._selectAllCheckbox&&(this._onSelectAll=function(){const u=n._selectAllCheckbox.checked,i=n.tbody?n.tbody.querySelectorAll("[data-ln-table-row]"):[],a=[];for(let b=0;b<i.length;b++){const d=i[b].getAttribute("data-ln-table-row-id"),w=i[b].querySelector("[data-ln-table-row-select]");d!=null&&(a.push(d),i[b].classList.toggle("ln-row-selected",u),w&&(w.checked=u))}n.selectedIds=wt(n.selectedIds,a,u),n.selectedCount=n.selectedIds.size,D(n.dom,"ln-table:select-all",{table:n.name,selected:u}),D(n.dom,"ln-table:select",{table:n.name,selectedIds:n.selectedIds,count:n.selectedCount}),n._updateFooter()},this._selectAllCheckbox.addEventListener("change",this._onSelectAll)),this.tbody){const u=this.tbody.querySelectorAll("[data-ln-table-row]");for(let i=0;i<u.length;i++){const a=u[i].querySelector("[data-ln-table-row-select]"),b=u[i].getAttribute("data-ln-table-row-id");a&&a.checked&&b!=null&&(n.selectedIds=pt(n.selectedIds,b,!0),u[i].classList.add("ln-row-selected"))}this.selectedCount=this.selectedIds.size,this.selectedCount>0&&this._updateSelectAll()}},A.prototype._disableSelection=function(){if(!this._selectableActive)return;this._selectableActive=!1,this.tbody&&this._onSelectionChange&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll);const n=this.dom.querySelector("[data-ln-table-col-select]");if(n){const u=n.querySelector('input[type="checkbox"]');u&&u.remove()}if(this._selectAllCheckbox=null,this.selectedIds=wt(this.selectedIds,Array.from(this.selectedIds),!1),this.selectedCount=0,this.tbody){const u=this.tbody.querySelectorAll("[data-ln-table-row]");for(let i=0;i<u.length;i++){u[i].classList.remove("ln-row-selected");const a=u[i].querySelector("[data-ln-table-row-select]");a&&(a.checked=!1)}}this._updateFooter()},A.prototype._updateFooter=function(){let n=0,u=0;this.isDataDriven?(n=this._lastTotal!=null?this._lastTotal:this._data.length,u=this.visibleCount):(n=this._data.length,u=this._filteredData.length);const i=u<n;if(this._totalSpan&&(this._totalSpan.textContent=I(n,this.dom)),this._filteredSpan&&(this._filteredSpan.textContent=i?I(u,this.dom):""),this._filteredWrap&&this._filteredWrap.classList.toggle("hidden",!i),this._selectedSpan){const a=this.selectedIds?this.selectedIds.size:0;this._selectedSpan.textContent=a>0?I(a,this.dom):"",this._selectedWrap&&this._selectedWrap.classList.toggle("hidden",a===0)}},A.prototype.destroy=function(){this.dom[e]&&(this._disableVirtualScroll(),this.dom.removeEventListener("ln-table:set-search",this._onSetSearch),this.dom.removeEventListener("ln-table:request-clear-filters",this._onRequestClearFilters),this.isDataDriven?(this.dom.removeEventListener("ln-table:set-data",this._onSetData),this.dom.removeEventListener("ln-table:set-loading",this._onSetLoading),this.dom.removeEventListener("ln-table:page-failed",this._onPageFailed),this.dom.removeEventListener("ln-table:request-revalidate",this._onRequestRevalidate),this.dom.removeEventListener("ln-table:request-invalidate",this._onRequestInvalidate),this.dom.removeEventListener("ln-sort:change",this._onSort),this.tbody&&(this.tbody.removeEventListener("click",this._onRowClick),this.tbody.removeEventListener("click",this._onRowAction)),this._cache&&this._cache.destroy()):(this._emptyTbodyObserver&&(this._emptyTbodyObserver.disconnect(),this._emptyTbodyObserver=null),this.dom.removeEventListener("ln-sort:change",this._onSort),this.dom.removeEventListener("ln-search:change",this._onSearchChange),this.dom.removeEventListener("ln-filter:change",this._onFilterChange)),this._onSelectionChange&&this.tbody&&this.tbody.removeEventListener("change",this._onSelectionChange),this._selectAllCheckbox&&this._onSelectAll&&this._selectAllCheckbox.removeEventListener("change",this._onSelectAll),this._colgroup&&(this._colgroup.remove(),this._colgroup=null),this.table&&(this.table.style.tableLayout=""),this._data=[],this._filteredData=[],delete this.dom[e])},ht(t,e,A,"ln-table",{attributes:E})})()})();
@@ -79,8 +79,7 @@
79
79
  },
80
80
  {
81
81
  "name": "data-ln-autoresize",
82
- "description": "Automatically adjusts textarea height to match its scrollable content",
83
- "valueSet": "v"
82
+ "description": "data-ln-autoresize attribute"
84
83
  },
85
84
  {
86
85
  "name": "data-ln-autosave",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livenetworks/ashlar",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "description": "LiveNetworks unified frontend library - CSS framework and vanilla JS components",
5
5
  "license": "GPL-3.0-or-later",
6
6
  "author": "Live Networks",
@@ -12,6 +12,12 @@ textarea {
12
12
  @include form-textarea;
13
13
  }
14
14
 
15
+ [data-ln-autoresize] {
16
+ field-sizing: content;
17
+ min-height: unset;
18
+ resize: none;
19
+ }
20
+
15
21
  select {
16
22
  @include form-select;
17
23
  }
@@ -132,6 +132,12 @@
132
132
  @mixin form-textarea {
133
133
  min-height: 6rem;
134
134
  resize: vertical;
135
+
136
+ &[data-ln-autoresize] {
137
+ field-sizing: content;
138
+ min-height: unset;
139
+ resize: none;
140
+ }
135
141
  }
136
142
 
137
143
  @mixin form-select {
@@ -11,7 +11,6 @@
11
11
  // --- Modular Component Diagnostics ---
12
12
  @use '../components/ln-accordion/ln-accordion-dev';
13
13
  @use '../components/ln-ajax/ln-ajax-dev';
14
- @use '../components/ln-autoresize/ln-autoresize-dev';
15
14
  @use '../components/ln-autosave/ln-autosave-dev';
16
15
  @use '../components/ln-chart/ln-chart-dev';
17
16
  @use '../components/ln-circular-progress/ln-circular-progress-dev';
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@livenetworks/ashlar",
4
- "version": "2.1.3",
4
+ "version": "2.1.4",
5
5
  "framework": "html",
6
6
  "contributions": {
7
7
  "html": {
@@ -124,9 +124,9 @@
124
124
  },
125
125
  {
126
126
  "name": "data-ln-autoresize",
127
- "description": "Automatically adjusts textarea height to match its scrollable content",
127
+ "description": "data-ln-autoresize attribute",
128
128
  "value": {
129
- "type": "boolean"
129
+ "type": "string"
130
130
  }
131
131
  },
132
132
  {