@livenetworks/ashlar 2.1.8 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ln-accordion/ln-accordion.js +1 -1
- package/components/ln-ajax/ln-ajax.js +1 -1
- package/components/ln-api-connector/ln-api-connector.js +1 -1
- package/components/ln-api-queue/ln-api-queue.js +1 -1
- package/components/ln-autosave/ln-autosave.js +1 -1
- package/components/ln-chart/ln-chart.js +1 -1
- package/components/ln-circular-progress/ln-circular-progress.js +1 -1
- package/components/ln-confirm/ln-confirm.js +1 -1
- package/components/ln-core/README.md +25 -0
- package/components/ln-core/index.js +1 -0
- package/components/ln-core/ln-core.schema.json +14 -4
- package/components/ln-core/query.js +113 -0
- package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
- package/components/ln-data-coordinator/README.md +4 -0
- package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
- package/components/ln-data-store/ln-data-store.js +1 -1
- package/components/ln-date/ln-date.js +1 -1
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-debug/src/generated-attributes.js +2 -0
- package/components/ln-dropdown/ln-dropdown.js +1 -1
- package/components/ln-editor/ln-editor.js +1 -1
- package/components/ln-external-links/ln-external-links.js +1 -1
- package/components/ln-fill/ln-fill.js +1 -1
- package/components/ln-filter/README.md +1 -0
- package/components/ln-filter/ln-filter.js +1 -1
- package/components/ln-filter/ln-filter.schema.json +8 -0
- package/components/ln-filter/src/ln-filter.js +67 -2
- package/components/ln-form/ln-form.js +1 -1
- package/components/ln-http/ln-http.js +1 -1
- package/components/ln-icon/ln-icon.js +1 -1
- package/components/ln-include/ln-include.js +1 -1
- package/components/ln-key/ln-key.js +1 -1
- package/components/ln-link/ln-link.js +1 -1
- package/components/ln-list/ln-list.js +1 -1
- package/components/ln-modal/ln-modal.js +1 -1
- package/components/ln-nav/ln-nav.js +1 -1
- package/components/ln-number/ln-number.js +1 -1
- package/components/ln-obfuscator/ln-obfuscator.js +1 -1
- package/components/ln-options/ln-options.js +1 -1
- package/components/ln-persist/ln-persist.js +1 -1
- package/components/ln-picklist/ln-picklist.js +1 -1
- package/components/ln-popover/ln-popover.js +1 -1
- package/components/ln-progress/ln-progress.js +1 -1
- package/components/ln-router/ln-router.js +1 -1
- package/components/ln-scroll/ln-scroll.js +1 -1
- package/components/ln-search/README.md +1 -0
- package/components/ln-search/ln-search.js +1 -1
- package/components/ln-search/ln-search.schema.json +8 -0
- package/components/ln-search/src/ln-search.js +54 -2
- package/components/ln-slug/ln-slug.js +1 -1
- package/components/ln-sort/README.md +1 -0
- package/components/ln-sort/ln-sort.js +1 -1
- package/components/ln-sort/ln-sort.schema.json +112 -104
- package/components/ln-sort/src/ln-sort.js +78 -3
- package/components/ln-sortable/ln-sortable.js +1 -1
- package/components/ln-stat/ln-stat.js +1 -1
- package/components/ln-table/README.md +22 -3
- package/components/ln-table/ln-table.js +1 -1
- package/components/ln-table/ln-table.schema.json +8 -0
- package/components/ln-table/src/ln-table.js +72 -5
- package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
- package/components/ln-tabs/ln-tabs.js +1 -1
- package/components/ln-time/ln-time.js +1 -1
- package/components/ln-toast/ln-toast.js +1 -1
- package/components/ln-toggle/ln-toggle.js +1 -1
- package/components/ln-tooltip/ln-tooltip.js +1 -1
- package/components/ln-translations/ln-translations.js +1 -1
- package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
- package/components/ln-upload/ln-upload.js +1 -1
- package/components/ln-validate/ln-validate.js +1 -1
- package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
- package/ln-ashlar.html-data.json +9 -0
- package/package.json +1 -1
- package/theme/components/_ln-table.scss +9 -0
- package/web-types.json +15 -1
|
@@ -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 T(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 n=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){n=t[i];break}if(!T(n))return}e.apply(console,t)}}function be(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function z(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(i),i}function E(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){E(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function O(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 ge(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function me(e,t){const r=!!(t&&t.typed),n=t&&t.exclude,i={},s=e.elements,l={};if(r)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")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")r&&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 a=0;a<o.options.length;a++)o.options[a].selected&&i[o.name].push(o.options[a].value)}else if(r&&o.type==="hidden")i[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const a=Number(o.value);i[o.name]=o.value===""||isNaN(a)?null:a}else i[o.name]=o.value}return i}function ye(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Ce(e,t){const r=e.elements,n=[],i={};for(let s=0;s<r.length;s++){const l=r[s];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<r.length;s++){const l=r[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 a=String(o).split(",").map(function(h){return h.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=ye(o);n.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),n.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let a=0;a<l.options.length;a++)l.options[a].selected=o.indexOf(l.options[a].value)!==-1;n.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),n.push(l)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Ce,window.lnCore.serializeForm=me,window.lnCore.resolveFormMethod=ge);const P={};function Ae(e,t){P[e]=t}function _e(e){return P[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ae,window.lnCore.getDataMapper=_e);function ve(e){const t=e?e.closest("[lang]"):null,r=(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 r?r.trim():"en-US"}function Se(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,E(function(){new MutationObserver(function(){be(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Q={};function xe(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];Q[r]=t}function ke(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=xe,window.lnCore.getLocaleFallback=ke,window.lnCore.ensureLocaleObserver=Se);const D={};function Ee(e,t){D[e]||(D[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=D[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function J(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let l=0;l<r.length;l++){const c=r[l],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<n.length;l++){const c=n[l],o=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<o.length;a++){const h=o[a].trim().split(":");if(h.length!==2)continue;const f=h[0].trim(),C=h[1].trim();t[C]!=null&&c.setAttribute(f,t[C])}}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 a=0;a<o.length;a++){const h=o[a].trim().split(":");if(h.length!==2)continue;const f=h[0].trim(),C=h[1].trim();C in t&&c.classList.toggle(f,!!t[C])}}return e}function Ie(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 r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<r.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[n],t??null),r[n].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 r=0;r<t.length;r++)t[r].textContent=""}})));function G(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.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 n=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 a=c[o];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function Le(e,t,r,n,i,s){const l={};for(let o=0;o<e.children.length;o++){const a=e.children[o],h=a.getAttribute("data-ln-render-key");h&&(l[h]=a)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const a=t[o],h=String(n(a));let f=l[h];if(f)i(f,a,o);else{const C=Ee(r,s);if(!C||(G(C,a),f=C.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",h),i(f,a,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=Ie,window.lnCore.renderList=Le);function I(e,t,r){const n=e.getAttribute(t);return n===null?r:n}function X(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function Y(e,t,r=!1){const n=e.getAttribute(t);if(n===null)return!!r;const i=n.trim().toLowerCase();return!(i==="false"||i==="0")}function Z(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const q=new Map;function ee(e,t){const r=(e?e.join("|"):"")+"::"+t;if(q.has(r))return q.get(r);const n=new Set(e||[]),i=function(s,l){const c=s.getAttribute(l);return c!==null&&n.has(c)?c:t};return q.set(r,i),i}function te(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function ne(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function re(e,t,r,n,i){if(!e||t===null)return!0;const s=n||"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 "${r}". 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 "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${s}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function oe(e,t,r){for(const n in r){const[i,s,l]=r[n];Object.defineProperty(e,n,{get:function(){return i(t,s,l)},enumerable:!0,configurable:!0})}return e}function ie(e){const t={};for(const r in e){const n=e[r];if(!n||!n.prop)continue;let i=n.read;if(!i&&n.type)switch(n.type){case"enum":i=ee(n.values,n.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=I;break}i||(i=I),t[n.prop]=[i,r,n.fallback]}return t}function Te(e){const t={};for(const r in e){const n=e[r];n&&n.effect&&(t[r]=n.effect)}return Object.keys(t).length?t:null}function Oe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=oe,window.lnCore.attrSpec=ie,window.lnCore.attrStr=I,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(r){console.error("["+t.attribute+"] init failed",e,r)}}}function le(e,t,r,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:n};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 De(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function F(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 qe(e){const t=se(),r=e.observed||[];for(let n=0;n<r.length;n++){const i=r[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const i=t.byDeclaredAttr.get(n);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=Oe(e);if(n===null)t.reactiveWildcard.push(e);else for(const i of n)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ce(e,t,r,n){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const l=s.effects&&s.effects[r];l?l(t,r,n):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,n)}}function Fe(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=se(),i=n.byAttr.get(t),s=K()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!i&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&T(l)){const c=n.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let a=0;a<c.length;a++)re(c[a].spec,o,t,c[a].componentTag,l)}if(window.lnCore._debugSink&&(r||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const c=n.byReactive.get(t);c&&ce(c,l,t,e.oldValue),n.reactiveWildcard.length&&ce(n.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 Ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,E(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Fe(t[r])}catch(n){console.error("[ln-core] mutation handler failed",t[r].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function N(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function R(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function $(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ue(e){const t=N();if(!t.length)return;const r=e.target;if(r){const i=r.nodeType===1?r:r.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const n=R();if(e.target&&n.length)for(let i=0;i<n.length;i++){const s=n[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 a=s.querySelectorAll(o.query);for(let h=0;h<a.length;h++)k(a[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){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],a=o.query;if(a){if(!l)s.matches&&s.matches(a)&&$(s,o);else if(s.matches&&s.matches(a)&&$(s,o),s.querySelectorAll){const h=s.querySelectorAll(a);for(let f=0;f<h.length;f++)$(h[f],o)}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,E(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.type==="childList")try{ue(n)}catch(i){console.error("[ln-core] lifecycle handler failed",n.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function de(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let n=0;n<r.length;n++){const i=r[n];if(i.type==="childList")try{ue(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Re(e){N().push(e),e.onSubtreeChange&&e.query&&R().push(e),ae()}function fe(e,t,r,n,i={}){const s=i.extraAttributes||[],l=i.onAttributeChange||null,c=i.onSubtreeChange||null,o=i.onInit||null,a=i.onAttrChange||null,h=i.effects||null,f=i.attributes||null,C=f?Te(f):h,d=f?new Set(Object.keys(f)):null,m=i.persist||null;function u(y){const A=y||document.body;if(le(A,e,t,r),f&&K())for(const x in f){const V=f[x],v=Array.from(A.querySelectorAll("["+x+"]"));A.matches&&A.matches("["+x+"]")&&v.push(A);for(let W=0;W<v.length;W++){const U=v[W];T(U)&&re(V,U.getAttribute(x),x,n,U)}}o&&o(A)}const g=[];if(e.indexOf("[")!==-1){const y=/\[([\w-]+)/g;let A;for(;(A=y.exec(e))!==null;)g.push(A[1])}else g.push(e);qe({selector:e,attribute:t,componentTag:n,attributes:f,ComponentFn:r,onInit:o,observed:g.concat(s),onAttributeChange:l,onAttrChange:a,effects:C,declared:d,persist:m}),Ne();const w=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,b=i.subtreeQuery||(w?e:"["+e+"]"),p={selector:e,attribute:t,ComponentFn:r,onInit:o,onSubtreeChange:c,query:b};N().push(p),c&&b&&R().push(p),ae(),window[t]=u,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=fe,window.lnCore.observeLifecycle=Re,window.lnCore.withoutLifecycle=de);function _(){De()>0?F(function(){u(document.body)}):u(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",_):_(),u}function $e(e){let t=!1;for(let r=0;r<e.length;r++){const n=e[r];if(!(n===""||n==null)&&(t=!0,!Number.isFinite(Number(n))))return"string"}return t?"number":"string"}function Be(e,t,r,n){if(r==="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 n?n.compare(i,s):i<s?-1:i>s?1:0}function he(e){return(e||"").replace(/^#/,"")}function B(e){const t=e===void 0?location.hash:e,r={},n=he(t);if(!n)return r;const i=n.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,a=c>-1?l.slice(c+1):"";if(o)try{r[o]=decodeURIComponent(a)}catch{r[o]=a}}return r}function M(e){if(!e)return null;const t=B();return e in t?t[e]:null}function we(e,t){if(!e)return;const r=B();t==null?delete r[e]:r[e]=String(t);const i=Object.keys(r).map(function(s){const l=r[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");he(location.hash)!==i&&(location.hash=i)}function Me(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function L(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function pe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function j(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 je(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function He(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),n=e.slice(t+1),i=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=B,window.lnCore.hashGet=M,window.lnCore.hashSet=we,window.lnCore.hashLinkClick=Me,window.lnCore.resolveHashNamespace=L,window.lnCore.hashSortEncode=pe,window.lnCore.hashSortDecode=j,window.lnCore.hashFilterEncode=je,window.lnCore.hashFilterDecode=He);function Ve(){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=Ve);function S(e){const t=String(e||"").trim().toLowerCase();return t==="asc"||t==="ascending"?"asc":t==="desc"||t==="descending"?"desc":"none"}function We(e){const t=S(e);return t==="asc"?"ascending":t==="desc"?"descending":"none"}function Ue(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 Ke(e,t,r,n){const i=S(e);if(i==="none")return()=>0;const s=i==="desc"?-1:1,l=typeof n=="function"?n:c=>c;return function(c,o){const a=l(c),h=l(o);return Be(a,h,t,r)*s}}function H(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 ze(e,t){if(!e||typeof e!="object"||e.nodeType!==1)return[];const r=t||(typeof e.getAttribute=="function"?e.getAttribute("data-ln-sort-items"):null)||null;if(r&&typeof e.querySelectorAll=="function")return Array.from(e.querySelectorAll(r));if(e.tagName==="TABLE"){const n=e.tBodies&&e.tBodies.length?e.tBodies[0]:typeof e.querySelector=="function"?e.querySelector("tbody"):null;if(n)return Array.from(n.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",r="data-ln-sort-field",n="data-ln-sort-state",i="data-ln-sort-dir",s="data-ln-hash";if(window[t]!==void 0)return;function l(d,m){return d.getAttribute(m)||null}const c={"data-ln-sort":{prop:"targetId",type:"string",read:I,fallback:null,description:"Target table or list element ID to sort"},"data-ln-sort-field":{prop:"field",type:"string",read:l,effect:C,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:C,description:"Active sort state applied to column or control"},"data-ln-hash":{type:"string",effect:C,description:"URL hash routing key for sort state persistence"}},o=ie(c),a=new WeakMap;function h(d,m,u){if(m){const g=d.querySelector('[data-ln-field="'+m+'"]');return g?O(g):""}return u!=null&&d.cells&&d.cells[u]?O(d.cells[u]):O(d)}function f(d){this.dom=d,oe(this,d,o);const m=d.closest("th");this.column=!this.field&&m?m.cellIndex:null,this._state=S(d.getAttribute(n)),d.hasAttribute(n)||d.setAttribute(n,this._state),this._destroyed=!1,this.nsKey=L(d,"sort"),this.hashEnabled=!!this.nsKey;const u=this;this._onClick=function(w){const b=w.target.closest("["+i+"]");if(!b)return;const p=S(b.getAttribute(i));u._apply(p)},d.addEventListener("click",this._onClick),this._onSortChange=function(w){if(u._destroyed||!w.detail)return;const b=u._resolveTarget();if(!(b&&(w.target===b||b.contains(w.target))||w.detail.targetId&&w.detail.targetId===u.targetId))return;if(Ue({field:u.field,column:u.column},{field:w.detail.field,column:w.detail.column})){const y=S(w.detail.direction);y&&d.getAttribute(n)!==y&&(u._state=y,d.setAttribute(n,y),u._updateAriaSort(y));return}d.getAttribute(n)!=="none"&&(u._state="none",d.setAttribute(n,"none"),u._updateAriaSort("none"))},document.addEventListener("ln-sort:change",this._onSortChange),this._onHashChange=function(){if(u._destroyed||!u.hashEnabled)return;const w=M(u.nsKey),b=j(w);if(b)u.field!==null&&b.fieldOrColumn===u.field||u.column!==null&&String(u.column)===b.fieldOrColumn?u._state!==b.direction&&u._apply(b.direction,!0):u._state!=="none"&&(u._state="none",d.setAttribute(n,"none"),u._updateAriaSort("none"));else if(u._state!=="none"){u._state="none",d.setAttribute(n,"none"),u._updateAriaSort("none");const p=u._resolveTarget();p&&(z(p,"ln-sort:change",{field:u.field,column:u.column,direction:"none",targetId:u.targetId}).defaultPrevented||u._defaultSort(p,"none"))}},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange);let g=!1;if(this.hashEnabled){const w=M(this.nsKey),b=j(w);b&&((u.field!==null&&b.fieldOrColumn===u.field||u.column!==null&&String(u.column)===b.fieldOrColumn)&&F(function(){u._destroyed||u._apply(b.direction,!0)}),g=!0)}if(!g){const w=S(d.getAttribute(n));w&&w!=="none"&&F(function(){u._destroyed||u._apply(w,!0)})}return this}f.prototype._resolveTarget=function(){return document.getElementById(this.targetId)},f.prototype._updateAriaSort=function(d){const m=this.dom.closest("th");m&&m.setAttribute("aria-sort",We(d))},f.prototype._apply=function(d,m){if(this._destroyed)return;if(!this.field&&this.column===null){const p=this.dom.closest("th");p&&p.cellIndex!==void 0&&(this.column=p.cellIndex)}const u=S(d);this._state=u,this.dom.getAttribute(n)!==u&&this.dom.setAttribute(n,u),this._updateAriaSort(u);const g=this._resolveTarget();if(!g)return;const w={field:this.field,column:this.column,direction:u,targetId:this.targetId};if(!m&&this.hashEnabled){const p=pe(this.field!==null?this.field:this.column,u);we(this.nsKey,p)}z(g,"ln-sort:change",w).defaultPrevented||this._defaultSort(g,u)},f.prototype._defaultSort=function(d,m){const u=ze(d,this.itemsSelector);if(!u.length)return;const g=u[0].parentNode,w=u.filter(function(p){return!H(p)});if(!w.length)return;a.has(d)||a.set(d,w.slice());let b;if(m==="none"){const p=a.get(d)||w;a.delete(d),b=p.filter(function(_){return _.parentNode===g&&!H(_)})}else{const p=this.field,_=this.column,y=w.map(function(v){return{el:v,val:h(v,p,_)}}),A=$e(y.map(function(v){return v.val})),x=typeof Intl<"u"?new Intl.Collator(ve(this.dom),{sensitivity:"base",numeric:!0}):null,V=Ke(m,A,x,function(v){return v.val});y.sort(V),b=y.map(function(v){return v.el})}de(function(){const p=document.createDocumentFragment();let _=0;for(let y=0;y<u.length;y++){const A=u[y];H(A)?p.appendChild(A):_<b.length&&p.appendChild(b[_++])}g.appendChild(p)})},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 C(d,m){const u=d[t];if(!(!u||u._destroyed))if(m===r){const g=d.closest("th");u.column=!u.field&&g?g.cellIndex:null}else if(m===n){const g=S(d.getAttribute(n));g!==u._state&&u._apply(g)}else m===s&&(u.hashEnabled&&u._onHashChange&&window.removeEventListener("hashchange",u._onHashChange),u.nsKey=L(d,"sort"),u.hashEnabled=!!u.nsKey,u.hashEnabled&&window.addEventListener("hashchange",u._onHashChange))}fe(e,t,f,"ln-sort",{attributes:c,persist:{attr:n,hashActive:function(d){return!!L(d,"sort")}}})})()})();
|
|
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 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 _e(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 R(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 q(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){q(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function F(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 Se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ve(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},c=e.elements,l={};if(n)for(let a=0;a<c.length;a++){const o=c[a];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let a=0;a<c.length;a++){const o=c[a];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 Ee(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function xe(e,t){const n=e.elements,r=[],i={};for(let c=0;c<n.length;c++){const l=n[c];l.name&&l.type==="checkbox"&&(i[l.name]=(i[l.name]||0)+1)}for(let c=0;c<n.length;c++){const l=n[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const o=t[a];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=Ee(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=xe,window.lnCore.serializeForm=ve,window.lnCore.resolveFormMethod=Se);const X={};function ke(e,t){X[e]=t}function qe(e){return X[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ke,window.lnCore.getDataMapper=qe);function Le(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 Ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,q(function(){new MutationObserver(function(){_e(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function Te(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];Y[n]=t}function Oe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Y[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Te,window.lnCore.getLocaleFallback=Oe,window.lnCore.ensureLocaleObserver=Ie);const N={};function De(e,t){N[e]||(N[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=N[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Z(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const a=n[l],o=a.getAttribute("data-ln-field");t[o]!=null&&(a.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const a=r[l],o=a.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 b=h[0].trim(),A=h[1].trim();t[A]!=null&&a.setAttribute(b,t[A])}}const i=e.querySelectorAll("[data-ln-show]");for(let l=0;l<i.length;l++){const a=i[l],o=a.getAttribute("data-ln-show");o in t&&a.classList.toggle("hidden",!t[o])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const a=c[l],o=a.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 b=h[0].trim(),A=h[1].trim();A in t&&a.classList.toggle(b,!!t[A])}}return e}function Re(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)Z(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 ee(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const c=n.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const r=function(c,l){return t[l]!==void 0?t[l]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let c=0;c<i.length;c++){const l=i[c],a=l.attributes;for(let o=0;o<a.length;o++){const u=a[o];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Fe(e,t,n,r,i,c){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 a=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],h=String(r(u));let b=l[h];if(b)i(b,u,o);else{const A=De(n,c);if(!A||(ee(A,u),b=A.firstElementChild,!b))continue;b.setAttribute("data-ln-render-key",h),i(b,u,o)}a.appendChild(b)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=ee,window.lnCore.fill=Z,window.lnCore.lnFill=Re,window.lnCore.renderList=Fe);function L(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function te(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function ne(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 re(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function oe(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),i=function(c,l){const a=c.getAttribute(l);return a!==null&&r.has(a)?a:t};return $.set(n,i),i}function ie(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function le(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function se(e,t,n,r,i){if(!e||t===null)return!0;const c=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=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"?(a(`[${c}] 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:(a(`[${c}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${c}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(a(`[${c}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(a(`[${c}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${c}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return a(`[${c}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function ce(e,t,n){for(const r in n){const[i,c,l]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,c,l)},enumerable:!0,configurable:!0})}return e}function ae(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=oe(r.values,r.fallback);break;case"integer":i=te;break;case"float":i=ie;break;case"boolean":i=ne;break;case"list":i=re;break;case"json":i=le;break;case"string":default:i=L;break}i||(i=L),t[r.prop]=[i,n,r.fallback]}return t}function Ne(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 $e(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=ce,window.lnCore.attrSpec=ae,window.lnCore.attrStr=L,window.lnCore.attrInt=te,window.lnCore.attrBool=ne,window.lnCore.attrList=re,window.lnCore.attrEnum=oe,window.lnCore.attrFloat=ie,window.lnCore.attrJson=le);function x(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 ue(e,t,n,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(c)&&x(e,l),e.querySelectorAll){const a=e.querySelectorAll(c);for(let o=0;o<a.length;o++)x(a[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function I(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 de(){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 Pe(e){const t=de(),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(c=>c.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=$e(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 fe(e,t,n,r){for(let i=0;i<e.length;i++){const c=e[i];if(!t[c.attribute])continue;const l=c.effects&&c.effects[n];l?l(t,n,r):c.onAttrChange&&(!c.declared||c.declared.has(n))&&c.onAttrChange(t,n,r)}}function Me(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=de(),i=r.byAttr.get(t),c=G()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&D(l)){const a=r.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let u=0;u<a.length;u++)se(a[u].spec,o,t,a[u].componentTag,l)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const a=r.byReactive.get(t);a&&fe(a,l,t,e.oldValue),r.reactiveWildcard.length&&fe(r.reactiveWildcard,l,t,e.oldValue)}if(i)for(let a=0;a<i.length;a++){const o=i[a];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(ue(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function je(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,q(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Me(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 B(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function P(){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 he(e){const t=B();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=P();if(e.target&&r.length)for(let i=0;i<r.length;i++){const c=r[i],l=c.query,a=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;a&&c.onSubtreeChange(a,e)}for(let i=0;i<e.addedNodes.length;i++){const c=e.addedNodes[i];if(c.nodeType===1){const l=!!(c.firstElementChild||c.children&&c.children.length);for(let a=0;a<t.length;a++){const o=t[a];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)c.matches&&c.matches(o.query)&&x(c,o);else if(c.matches&&c.matches(o.query)&&x(c,o),c.querySelectorAll){const u=c.querySelectorAll(o.query);for(let h=0;h<u.length;h++)x(u[h],o)}}o.onInit&&o.onInit(c)}}}for(let i=0;i<e.removedNodes.length;i++){const c=e.removedNodes[i];if(c.nodeType===1){if(document.contains(c))continue;const l=!!(c.firstElementChild||c.children&&c.children.length);for(let a=0;a<t.length;a++){const o=t[a],u=o.query;if(u){if(!l)c.matches&&c.matches(u)&&M(c,o);else if(c.matches&&c.matches(u)&&M(c,o),c.querySelectorAll){const h=c.querySelectorAll(u);for(let b=0;b<h.length;b++)M(h[b],o)}}}}}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,q(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{he(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function pe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const i=n[r];if(i.type==="childList")try{he(i)}catch(c){console.error("[ln-core] lifecycle handler failed",i.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Ue(e){B().push(e),e.onSubtreeChange&&e.query&&P().push(e),we()}function be(e,t,n,r,i={}){const c=i.extraAttributes||[],l=i.onAttributeChange||null,a=i.onSubtreeChange||null,o=i.onInit||null,u=i.onAttrChange||null,h=i.effects||null,b=i.attributes||null,A=b?Ne(b):h,E=b?new Set(Object.keys(b)):null,d=i.persist||null;function g(C){const m=C||document.body;if(ue(m,e,t,n),b&&G())for(const S in b){const z=b[S],k=Array.from(m.querySelectorAll("["+S+"]"));m.matches&&m.matches("["+S+"]")&&k.push(m);for(let _=0;_<k.length;_++){const J=k[_];D(J)&&se(z,J.getAttribute(S),S,r,J)}}o&&o(m)}const s=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let m;for(;(m=C.exec(e))!==null;)s.push(m[1])}else s.push(e);Pe({selector:e,attribute:t,componentTag:r,attributes:b,ComponentFn:n,onInit:o,observed:s.concat(c),onAttributeChange:l,onAttrChange:u,effects:A,declared:E,persist:d}),je();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,w=i.subtreeQuery||(y?e:"["+e+"]"),p={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:a,query:w};B().push(p),a&&w&&P().push(p),we(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=be,window.lnCore.observeLifecycle=Ue,window.lnCore.withoutLifecycle=pe);function f(){Be()>0?I(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function Ve(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 He(e,t,n,r){if(n==="number"){const l=parseFloat(e),a=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(a)?0:a)}const i=e!=null?String(e):"",c=t!=null?String(t):"";return r?r.compare(i,c):i<c?-1:i>c?1:0}function ge(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,n={},r=ge(t);if(!r)return n;const i=r.split("&");for(let c=0;c<i.length;c++){const l=i[c];if(!l)continue;const a=l.indexOf(":"),o=a>-1?l.slice(0,a):l,u=a>-1?l.slice(a+1):"";if(o)try{n[o]=decodeURIComponent(u)}catch{n[o]=u}}return n}function U(e){if(!e)return null;const t=j();return e in t?t[e]:null}function me(e,t){if(!e)return;const n=j();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(c){const l=n[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");ge(location.hash)!==i&&(location.hash=i)}function We(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function T(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 ye(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 Ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Qe(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(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=U,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=We,window.lnCore.resolveHashNamespace=T,window.lnCore.hashSortEncode=ye,window.lnCore.hashSortDecode=V,window.lnCore.hashFilterEncode=Ke,window.lnCore.hashFilterDecode=Qe);function ze(e){return(e||"").replace(/^\?/,"")}function H(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=ze(t);if(!r)return n;const i=new URLSearchParams(r);for(const[c,l]of i.entries())n[c]=l;return n}function W(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ce(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function O(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");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 Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function K(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function Je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ge(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=H,window.lnCore.queryGet=W,window.lnCore.querySet=Ce,window.lnCore.resolveQueryParam=O,window.lnCore.querySortEncode=Ae,window.lnCore.querySortDecode=K,window.lnCore.queryFilterEncode=Je,window.lnCore.queryFilterDecode=Ge);function Xe(){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=Xe);function v(e){const t=String(e||"").trim().toLowerCase();return t==="asc"||t==="ascending"?"asc":t==="desc"||t==="descending"?"desc":"none"}function Ye(e){const t=v(e);return t==="asc"?"ascending":t==="desc"?"descending":"none"}function Ze(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 et(e,t,n,r){const i=v(e);if(i==="none")return()=>0;const c=i==="desc"?-1:1,l=typeof r=="function"?r:a=>a;return function(a,o){const u=l(a),h=l(o);return He(u,h,t,n)*c}}function Q(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 tt(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",c="data-ln-hash",l="data-ln-query";if(window[t]!==void 0)return;function a(d,g){return d.getAttribute(g)||null}const o={"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:a,effect:E,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:a,description:"CSS selector matching sortable child items"},"data-ln-sort-state":{type:"enum",values:["asc","desc","none"],fallback:"none",effect:E,description:"Active sort state applied to column or control"},"data-ln-hash":{type:"string",effect:E,description:"URL hash routing key for sort state persistence"},"data-ln-query":{type:"string",effect:E,description:"URL query parameter name for sort state persistence"}},u=ae(o),h=new WeakMap;function b(d,g,s){if(g){const y=d.querySelector('[data-ln-field="'+g+'"]');return y?F(y):""}return s!=null&&d.cells&&d.cells[s]?F(d.cells[s]):F(d)}function A(d){this.dom=d,ce(this,d,u);const g=d.closest("th");this.column=!this.field&&g?g.cellIndex:null,this._state=v(d.getAttribute(r)),d.hasAttribute(r)||d.setAttribute(r,this._state),this._destroyed=!1,this.nsKey=T(d,"sort"),this.hashEnabled=!!this.nsKey,this.queryParam=O(d,"sort"),this.queryEnabled=!!this.queryParam;const s=this;this._onClick=function(w){const p=w.target.closest("["+i+"]");if(!p)return;const f=v(p.getAttribute(i));s._apply(f)},d.addEventListener("click",this._onClick),this._onSortChange=function(w){if(s._destroyed||!w.detail)return;const p=s._resolveTarget();if(!(p&&(w.target===p||p.contains(w.target))||w.detail.targetId&&w.detail.targetId===s.targetId))return;if(Ze({field:s.field,column:s.column},{field:w.detail.field,column:w.detail.column})){const m=v(w.detail.direction);m&&d.getAttribute(r)!==m&&(s._state=m,d.setAttribute(r,m),s._updateAriaSort(m));return}d.getAttribute(r)!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"))},document.addEventListener("ln-sort:change",this._onSortChange),this._onHashChange=function(){if(s._destroyed||!s.hashEnabled)return;const w=U(s.nsKey),p=V(w);if(p)s.field!==null&&p.fieldOrColumn===s.field||s.column!==null&&String(s.column)===p.fieldOrColumn?s._state!==p.direction&&s._apply(p.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const f=s._resolveTarget();f&&(R(f,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(f,"none"))}},this._onPopState=function(){if(s._destroyed||!s.queryEnabled)return;const w=W(s.queryParam),p=H(),f=K(w,p);if(f)s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn?s._state!==f.direction&&s._apply(f.direction,!0):s._state!=="none"&&(s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none"));else if(s._state!=="none"){s._state="none",d.setAttribute(r,"none"),s._updateAriaSort("none");const C=s._resolveTarget();C&&(R(C,"ln-sort:change",{field:s.field,column:s.column,direction:"none",targetId:s.targetId}).defaultPrevented||s._defaultSort(C,"none"))}},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange),this.queryEnabled&&window.addEventListener("popstate",this._onPopState);let y=!1;if(this.hashEnabled){const w=U(this.nsKey),p=V(w);p&&((s.field!==null&&p.fieldOrColumn===s.field||s.column!==null&&String(s.column)===p.fieldOrColumn)&&I(function(){s._destroyed||s._apply(p.direction,!0)}),y=!0)}else if(this.queryEnabled){const w=W(this.queryParam),p=H(),f=K(w,p);f&&((s.field!==null&&f.fieldOrColumn===s.field||s.column!==null&&String(s.column)===f.fieldOrColumn)&&I(function(){s._destroyed||s._apply(f.direction,!0)}),y=!0)}if(!y){const w=v(d.getAttribute(r));w&&w!=="none"&&I(function(){s._destroyed||s._apply(w,!0)})}return this}A.prototype._resolveTarget=function(){return document.getElementById(this.targetId)},A.prototype._updateAriaSort=function(d){const g=this.dom.closest("th");g&&g.setAttribute("aria-sort",Ye(d))},A.prototype._apply=function(d,g){if(this._destroyed)return;if(!this.field&&this.column===null){const f=this.dom.closest("th");f&&f.cellIndex!==void 0&&(this.column=f.cellIndex)}const s=v(d);this._state=s,this.dom.getAttribute(r)!==s&&this.dom.setAttribute(r,s),this._updateAriaSort(s);const y=this._resolveTarget();if(!y)return;const w={field:this.field,column:this.column,direction:s,targetId:this.targetId};if(!g){if(this.hashEnabled){const f=ye(this.field!==null?this.field:this.column,s);me(this.nsKey,f)}else if(this.queryEnabled){const f=Ae(this.field!==null?this.field:this.column,s);Ce(this.queryParam,f)}}R(y,"ln-sort:change",w).defaultPrevented||this._defaultSort(y,s)},A.prototype._defaultSort=function(d,g){const s=tt(d,this.itemsSelector);if(!s.length)return;const y=s[0].parentNode,w=s.filter(function(f){return!Q(f)});if(!w.length)return;h.has(d)||h.set(d,w.slice());let p;if(g==="none"){const f=h.get(d)||w;h.delete(d),p=f.filter(function(C){return C.parentNode===y&&!Q(C)})}else{const f=this.field,C=this.column,m=w.map(function(_){return{el:_,val:b(_,f,C)}}),S=Ve(m.map(function(_){return _.val})),z=typeof Intl<"u"?new Intl.Collator(Le(this.dom),{sensitivity:"base",numeric:!0}):null,k=et(g,S,z,function(_){return _.val});m.sort(k),p=m.map(function(_){return _.el})}pe(function(){const f=document.createDocumentFragment();let C=0;for(let m=0;m<s.length;m++){const S=s[m];Q(S)?f.appendChild(S):C<p.length&&f.appendChild(p[C++])}y.appendChild(f)})},A.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),this.queryEnabled&&this._onPopState&&window.removeEventListener("popstate",this._onPopState),delete this.dom[t])};function E(d,g){const s=d[t];if(!(!s||s._destroyed))if(g===n){const y=d.closest("th");s.column=!s.field&&y?y.cellIndex:null}else if(g===r){const y=v(d.getAttribute(r));y!==s._state&&s._apply(y)}else g===c?(s.hashEnabled&&s._onHashChange&&window.removeEventListener("hashchange",s._onHashChange),s.nsKey=T(d,"sort"),s.hashEnabled=!!s.nsKey,s.hashEnabled&&window.addEventListener("hashchange",s._onHashChange)):g===l&&(s.queryEnabled&&s._onPopState&&window.removeEventListener("popstate",s._onPopState),s.queryParam=O(d,"sort"),s.queryEnabled=!!s.queryParam,s.queryEnabled&&window.addEventListener("popstate",s._onPopState))}be(e,t,A,"ln-sort",{attributes:o,persist:{attr:r,hashActive:function(d){return!!T(d,"sort")||!!O(d,"sort")}}})})()})();
|
|
@@ -1,104 +1,112 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
-
"component": "ln-sort",
|
|
4
|
-
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
-
"attributes": {
|
|
6
|
-
"data-ln-debug": {
|
|
7
|
-
"direction": null,
|
|
8
|
-
"sources": [
|
|
9
|
-
"ln-sort-dev.scss"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"data-ln-empty": {
|
|
13
|
-
"direction": "author",
|
|
14
|
-
"sources": [
|
|
15
|
-
"src/sort-model.js"
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
"data-ln-empty-state": {
|
|
19
|
-
"direction": "author",
|
|
20
|
-
"sources": [
|
|
21
|
-
"src/sort-model.js"
|
|
22
|
-
]
|
|
23
|
-
},
|
|
24
|
-
"data-ln-field": {
|
|
25
|
-
"direction": "author",
|
|
26
|
-
"sources": [
|
|
27
|
-
"src/ln-sort.js"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
"data-ln-hash": {
|
|
31
|
-
"direction": null,
|
|
32
|
-
"sources": [
|
|
33
|
-
"src/ln-sort.js"
|
|
34
|
-
],
|
|
35
|
-
"type": "string",
|
|
36
|
-
"description": "URL hash routing key for sort state persistence"
|
|
37
|
-
},
|
|
38
|
-
"data-ln-
|
|
39
|
-
"direction": null,
|
|
40
|
-
"sources": [
|
|
41
|
-
"ln-sort
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
"src/ln-sort.js"
|
|
51
|
-
],
|
|
52
|
-
"type": "
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
]
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
"data-ln-sort-
|
|
75
|
-
"direction":
|
|
76
|
-
"sources": [
|
|
77
|
-
"src/ln-sort.js"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
"src/
|
|
87
|
-
],
|
|
88
|
-
"type": "
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
"
|
|
101
|
-
]
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
+
"component": "ln-sort",
|
|
4
|
+
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
+
"attributes": {
|
|
6
|
+
"data-ln-debug": {
|
|
7
|
+
"direction": null,
|
|
8
|
+
"sources": [
|
|
9
|
+
"ln-sort-dev.scss"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"data-ln-empty": {
|
|
13
|
+
"direction": "author",
|
|
14
|
+
"sources": [
|
|
15
|
+
"src/sort-model.js"
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"data-ln-empty-state": {
|
|
19
|
+
"direction": "author",
|
|
20
|
+
"sources": [
|
|
21
|
+
"src/sort-model.js"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"data-ln-field": {
|
|
25
|
+
"direction": "author",
|
|
26
|
+
"sources": [
|
|
27
|
+
"src/ln-sort.js"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"data-ln-hash": {
|
|
31
|
+
"direction": null,
|
|
32
|
+
"sources": [
|
|
33
|
+
"src/ln-sort.js"
|
|
34
|
+
],
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "URL hash routing key for sort state persistence"
|
|
37
|
+
},
|
|
38
|
+
"data-ln-query": {
|
|
39
|
+
"direction": null,
|
|
40
|
+
"sources": [
|
|
41
|
+
"src/ln-sort.js"
|
|
42
|
+
],
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "URL query parameter name for sort state persistence"
|
|
45
|
+
},
|
|
46
|
+
"data-ln-sort": {
|
|
47
|
+
"direction": null,
|
|
48
|
+
"sources": [
|
|
49
|
+
"ln-sort-dev.scss",
|
|
50
|
+
"src/ln-sort.js"
|
|
51
|
+
],
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Target table or list element ID to sort"
|
|
54
|
+
},
|
|
55
|
+
"data-ln-sort-dir": {
|
|
56
|
+
"direction": "author",
|
|
57
|
+
"sources": [
|
|
58
|
+
"src/ln-sort.js"
|
|
59
|
+
],
|
|
60
|
+
"type": "enum",
|
|
61
|
+
"values": [
|
|
62
|
+
"asc",
|
|
63
|
+
"desc"
|
|
64
|
+
],
|
|
65
|
+
"fallback": "asc",
|
|
66
|
+
"description": "Default or requested sort direction"
|
|
67
|
+
},
|
|
68
|
+
"data-ln-sort-exclude": {
|
|
69
|
+
"direction": "author",
|
|
70
|
+
"sources": [
|
|
71
|
+
"src/sort-model.js"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"data-ln-sort-field": {
|
|
75
|
+
"direction": null,
|
|
76
|
+
"sources": [
|
|
77
|
+
"src/ln-sort.js"
|
|
78
|
+
],
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "Field name or column key to sort by"
|
|
81
|
+
},
|
|
82
|
+
"data-ln-sort-items": {
|
|
83
|
+
"direction": "author",
|
|
84
|
+
"sources": [
|
|
85
|
+
"src/ln-sort.js",
|
|
86
|
+
"src/sort-model.js"
|
|
87
|
+
],
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "CSS selector matching sortable child items"
|
|
90
|
+
},
|
|
91
|
+
"data-ln-sort-state": {
|
|
92
|
+
"direction": "both",
|
|
93
|
+
"sources": [
|
|
94
|
+
"src/ln-sort.js"
|
|
95
|
+
],
|
|
96
|
+
"type": "enum",
|
|
97
|
+
"values": [
|
|
98
|
+
"asc",
|
|
99
|
+
"desc",
|
|
100
|
+
"none"
|
|
101
|
+
],
|
|
102
|
+
"fallback": "none",
|
|
103
|
+
"description": "Active sort state applied to column or control"
|
|
104
|
+
},
|
|
105
|
+
"data-ln-table-empty": {
|
|
106
|
+
"direction": "author",
|
|
107
|
+
"sources": [
|
|
108
|
+
"src/sort-model.js"
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { compareValues, detectValueType, dispatchCancelable, getLocale, hashGet, hashSet, hashSortDecode, hashSortEncode, queueBoot, readValue, registerComponent, resolveHashNamespace, withoutLifecycle, attrStr, attrSpec, defineAttrs } from '../../ln-core';
|
|
1
|
+
import { compareValues, detectValueType, dispatchCancelable, getLocale, hashGet, hashSet, hashSortDecode, hashSortEncode, queryGet, querySet, queryParse, querySortDecode, querySortEncode, queueBoot, readValue, registerComponent, resolveHashNamespace, resolveQueryParam, withoutLifecycle, attrStr, attrSpec, defineAttrs } from '../../ln-core';
|
|
2
2
|
import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortTarget, normalizeSortDirection, resolveSortItems } from './sort-model.js';
|
|
3
3
|
|
|
4
4
|
(function () {
|
|
@@ -8,6 +8,7 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
8
8
|
const STATE_ATTR = 'data-ln-sort-state';
|
|
9
9
|
const DIR_ATTR = 'data-ln-sort-dir';
|
|
10
10
|
const HASH_ATTR = 'data-ln-hash';
|
|
11
|
+
const QUERY_ATTR = 'data-ln-query';
|
|
11
12
|
|
|
12
13
|
if (window[DOM_ATTRIBUTE] !== undefined) return;
|
|
13
14
|
|
|
@@ -22,7 +23,8 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
22
23
|
'data-ln-sort-dir': { type: 'enum', values: ['asc', 'desc'], fallback: 'asc', description: 'Default or requested sort direction' },
|
|
23
24
|
'data-ln-sort-items': { prop: 'itemsSelector', type: 'string', read: _readOrNull, description: 'CSS selector matching sortable child items' },
|
|
24
25
|
'data-ln-sort-state': { type: 'enum', values: ['asc', 'desc', 'none'], fallback: 'none', effect: _syncAttribute, description: 'Active sort state applied to column or control' },
|
|
25
|
-
'data-ln-hash': { type: 'string', effect: _syncAttribute, description: 'URL hash routing key for sort state persistence' }
|
|
26
|
+
'data-ln-hash': { type: 'string', effect: _syncAttribute, description: 'URL hash routing key for sort state persistence' },
|
|
27
|
+
'data-ln-query': { type: 'string', effect: _syncAttribute, description: 'URL query parameter name for sort state persistence' }
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
const ATTR_SPEC = attrSpec(ATTRIBUTES);
|
|
@@ -59,6 +61,9 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
59
61
|
this.nsKey = resolveHashNamespace(dom, 'sort');
|
|
60
62
|
this.hashEnabled = !!this.nsKey;
|
|
61
63
|
|
|
64
|
+
this.queryParam = resolveQueryParam(dom, 'sort');
|
|
65
|
+
this.queryEnabled = !!this.queryParam;
|
|
66
|
+
|
|
62
67
|
const self = this;
|
|
63
68
|
|
|
64
69
|
this._onClick = function (e) {
|
|
@@ -136,9 +141,49 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
136
141
|
}
|
|
137
142
|
};
|
|
138
143
|
|
|
144
|
+
// ─── Popstate change listener ──────────────────────────────
|
|
145
|
+
this._onPopState = function () {
|
|
146
|
+
if (self._destroyed || !self.queryEnabled) return;
|
|
147
|
+
const qVal = queryGet(self.queryParam);
|
|
148
|
+
const allParams = queryParse();
|
|
149
|
+
const decoded = querySortDecode(qVal, allParams);
|
|
150
|
+
if (decoded) {
|
|
151
|
+
const matches = (self.field !== null && decoded.fieldOrColumn === self.field)
|
|
152
|
+
|| (self.column !== null && String(self.column) === decoded.fieldOrColumn);
|
|
153
|
+
if (matches) {
|
|
154
|
+
if (self._state !== decoded.direction) self._apply(decoded.direction, true);
|
|
155
|
+
} else {
|
|
156
|
+
if (self._state !== 'none') {
|
|
157
|
+
self._state = 'none';
|
|
158
|
+
dom.setAttribute(STATE_ATTR, 'none');
|
|
159
|
+
self._updateAriaSort('none');
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
} else {
|
|
163
|
+
if (self._state !== 'none') {
|
|
164
|
+
self._state = 'none';
|
|
165
|
+
dom.setAttribute(STATE_ATTR, 'none');
|
|
166
|
+
self._updateAriaSort('none');
|
|
167
|
+
const target = self._resolveTarget();
|
|
168
|
+
if (target) {
|
|
169
|
+
const evt = dispatchCancelable(target, 'ln-sort:change', {
|
|
170
|
+
field: self.field,
|
|
171
|
+
column: self.column,
|
|
172
|
+
direction: 'none',
|
|
173
|
+
targetId: self.targetId
|
|
174
|
+
});
|
|
175
|
+
if (!evt.defaultPrevented) self._defaultSort(target, 'none');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
139
181
|
if (this.hashEnabled) {
|
|
140
182
|
window.addEventListener('hashchange', this._onHashChange);
|
|
141
183
|
}
|
|
184
|
+
if (this.queryEnabled) {
|
|
185
|
+
window.addEventListener('popstate', this._onPopState);
|
|
186
|
+
}
|
|
142
187
|
|
|
143
188
|
// ─── Restore State on Boot ─────────────────────────────────
|
|
144
189
|
let restored = false;
|
|
@@ -157,6 +202,21 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
157
202
|
}
|
|
158
203
|
restored = true;
|
|
159
204
|
}
|
|
205
|
+
} else if (this.queryEnabled) {
|
|
206
|
+
const qVal = queryGet(this.queryParam);
|
|
207
|
+
const allParams = queryParse();
|
|
208
|
+
const decoded = querySortDecode(qVal, allParams);
|
|
209
|
+
if (decoded) {
|
|
210
|
+
const matches = (self.field !== null && decoded.fieldOrColumn === self.field)
|
|
211
|
+
|| (self.column !== null && String(self.column) === decoded.fieldOrColumn);
|
|
212
|
+
if (matches) {
|
|
213
|
+
queueBoot(function () {
|
|
214
|
+
if (self._destroyed) return;
|
|
215
|
+
self._apply(decoded.direction, true);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
restored = true;
|
|
219
|
+
}
|
|
160
220
|
}
|
|
161
221
|
|
|
162
222
|
if (!restored) {
|
|
@@ -210,6 +270,9 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
210
270
|
if (this.hashEnabled) {
|
|
211
271
|
const encoded = hashSortEncode(this.field !== null ? this.field : this.column, normalized);
|
|
212
272
|
hashSet(this.nsKey, encoded);
|
|
273
|
+
} else if (this.queryEnabled) {
|
|
274
|
+
const encoded = querySortEncode(this.field !== null ? this.field : this.column, normalized);
|
|
275
|
+
querySet(this.queryParam, encoded);
|
|
213
276
|
}
|
|
214
277
|
}
|
|
215
278
|
|
|
@@ -286,6 +349,9 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
286
349
|
if (this.hashEnabled && this._onHashChange) {
|
|
287
350
|
window.removeEventListener('hashchange', this._onHashChange);
|
|
288
351
|
}
|
|
352
|
+
if (this.queryEnabled && this._onPopState) {
|
|
353
|
+
window.removeEventListener('popstate', this._onPopState);
|
|
354
|
+
}
|
|
289
355
|
delete this.dom[DOM_ATTRIBUTE];
|
|
290
356
|
};
|
|
291
357
|
|
|
@@ -311,6 +377,15 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
311
377
|
if (instance.hashEnabled) {
|
|
312
378
|
window.addEventListener('hashchange', instance._onHashChange);
|
|
313
379
|
}
|
|
380
|
+
} else if (attrName === QUERY_ATTR) {
|
|
381
|
+
if (instance.queryEnabled && instance._onPopState) {
|
|
382
|
+
window.removeEventListener('popstate', instance._onPopState);
|
|
383
|
+
}
|
|
384
|
+
instance.queryParam = resolveQueryParam(el, 'sort');
|
|
385
|
+
instance.queryEnabled = !!instance.queryParam;
|
|
386
|
+
if (instance.queryEnabled) {
|
|
387
|
+
window.addEventListener('popstate', instance._onPopState);
|
|
388
|
+
}
|
|
314
389
|
}
|
|
315
390
|
}
|
|
316
391
|
|
|
@@ -320,7 +395,7 @@ import { createSortComparator, getAriaSortValue, isExcludedSortItem, isSameSortT
|
|
|
320
395
|
attributes: ATTRIBUTES,
|
|
321
396
|
persist: {
|
|
322
397
|
attr: STATE_ATTR,
|
|
323
|
-
hashActive: function (el) { return !!resolveHashNamespace(el, 'sort'); }
|
|
398
|
+
hashActive: function (el) { return !!resolveHashNamespace(el, 'sort') || !!resolveQueryParam(el, 'sort'); }
|
|
324
399
|
}
|
|
325
400
|
});
|
|
326
401
|
})();
|