@livenetworks/ashlar 2.0.10 → 2.1.1

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.
Files changed (64) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-ajax/src/ln-ajax.js +15 -26
  4. package/components/ln-api-connector/ln-api-connector.js +1 -1
  5. package/components/ln-api-queue/ln-api-queue.js +1 -1
  6. package/components/ln-autoresize/ln-autoresize.js +1 -1
  7. package/components/ln-autosave/ln-autosave.js +1 -1
  8. package/components/ln-chart/ln-chart.js +1 -1
  9. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  10. package/components/ln-confirm/ln-confirm.js +1 -1
  11. package/components/ln-core/helpers.js +1 -1
  12. package/components/ln-core/index.js +1 -1
  13. package/components/ln-core/lifecycle.js +106 -40
  14. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  15. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  16. package/components/ln-data-store/ln-data-store.js +1 -1
  17. package/components/ln-date/ln-date.js +1 -1
  18. package/components/ln-debug/ln-debug.js +1 -1
  19. package/components/ln-dropdown/ln-dropdown.js +1 -1
  20. package/components/ln-editor/ln-editor.js +1 -1
  21. package/components/ln-editor/src/ln-editor.js +45 -12
  22. package/components/ln-external-links/ln-external-links.js +1 -1
  23. package/components/ln-external-links/src/ln-external-links.js +9 -21
  24. package/components/ln-filter/ln-filter.js +1 -1
  25. package/components/ln-form/ln-form.js +1 -1
  26. package/components/ln-icon/ln-icon.js +1 -1
  27. package/components/ln-icon/src/ln-icon.js +14 -16
  28. package/components/ln-include/ln-include.js +1 -1
  29. package/components/ln-key/ln-key.js +1 -1
  30. package/components/ln-link/ln-link.js +1 -1
  31. package/components/ln-link/src/ln-link.js +16 -26
  32. package/components/ln-list/ln-list.js +1 -1
  33. package/components/ln-modal/ln-modal.js +1 -1
  34. package/components/ln-nav/ln-nav.js +1 -1
  35. package/components/ln-nav/src/ln-nav.js +5 -4
  36. package/components/ln-number/ln-number.js +1 -1
  37. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  38. package/components/ln-options/ln-options.js +1 -1
  39. package/components/ln-persist/ln-persist.js +1 -1
  40. package/components/ln-picklist/ln-picklist.js +1 -1
  41. package/components/ln-popover/ln-popover.js +1 -1
  42. package/components/ln-progress/ln-progress.js +1 -1
  43. package/components/ln-progress/src/ln-progress.js +9 -21
  44. package/components/ln-router/ln-router.js +1 -1
  45. package/components/ln-scroll/ln-scroll.js +1 -1
  46. package/components/ln-search/ln-search.js +1 -1
  47. package/components/ln-slug/ln-slug.js +1 -1
  48. package/components/ln-sort/ln-sort.js +1 -1
  49. package/components/ln-sortable/ln-sortable.js +1 -1
  50. package/components/ln-stat/ln-stat.js +1 -1
  51. package/components/ln-table/ln-table.js +1 -1
  52. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  53. package/components/ln-tabs/ln-tabs.js +1 -1
  54. package/components/ln-time/ln-time.js +1 -1
  55. package/components/ln-toast/ln-toast.js +1 -1
  56. package/components/ln-toggle/ln-toggle.js +1 -1
  57. package/components/ln-tooltip/ln-tooltip.js +1 -1
  58. package/components/ln-translations/ln-translations.js +1 -1
  59. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  60. package/components/ln-upload/ln-upload.js +1 -1
  61. package/components/ln-validate/ln-validate.js +1 -1
  62. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  63. package/package.json +1 -1
  64. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function U(){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 o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!D(r))return}e.apply(console,t)}}function L(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 be(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(o),o}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 K(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 ye(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function me(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,o={},s=e.elements,i={};if(n)for(let a=0;a<s.length;a++){const l=s[a];l.name&&l.type==="checkbox"&&!l.disabled&&(i[l.name]=(i[l.name]||0)+1)}for(let a=0;a<s.length;a++){const l=s[a];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(r&&l.matches&&l.matches(r)))if(l.type==="checkbox")n&&i[l.name]===1?o[l.name]=l.checked:(o[l.name]||(o[l.name]=[]),l.checked&&o[l.name].push(l.value));else if(l.type==="radio")l.checked&&(o[l.name]=l.value);else if(l.type==="select-multiple"){o[l.name]=[];for(let f=0;f<l.options.length;f++)l.options[f].selected&&o[l.name].push(l.options[f].value)}else if(n&&l.type==="hidden")o[l.name]=l.value;else if(n&&(l.type==="number"||l.type==="range")){const f=Number(l.value);o[l.name]=l.value===""||isNaN(f)?null:f}else o[l.name]=l.value}return o}function Ce(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Ae(e,t){const n=e.elements,r=[],o={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(o[i.name]=(o[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const l=t[a];if(i.type==="checkbox"){if(Array.isArray(l))i.checked=l.indexOf(i.value)!==-1;else if(o[i.name]>1){const f=String(l).split(",").map(function(b){return b.trim()});i.checked=f.indexOf(i.value)!==-1}else i.checked=Ce(l);r.push(i)}else if(i.type==="radio")i.checked=i.value===String(l),r.push(i);else if(i.type==="select-multiple"){if(Array.isArray(l))for(let f=0;f<i.options.length;f++)i.options[f].selected=l.indexOf(i.options[f].value)!==-1;r.push(i)}else i.value=l,i.tagName==="SELECT"&&l!=null&&i.setAttribute("data-ln-value",l),r.push(i)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Ae,window.lnCore.serializeForm=me,window.lnCore.resolveFormMethod=ye);const Q={};function ve(e,t){Q[e]=t}function ke(e){return Q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ve,window.lnCore.getDataMapper=ke);function _e(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,q(function(){new MutationObserver(function(){L(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const P={};function xe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];P[n]=t}function Se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return P[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=xe,window.lnCore.getLocaleFallback=Se,window.lnCore.ensureLocaleObserver=_e);const N={};function Ie(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 J(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const a=n[i],l=a.getAttribute("data-ln-field");t[l]!=null&&(a.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const a=r[i],l=a.getAttribute("data-ln-attr").split(",");for(let f=0;f<l.length;f++){const b=l[f].trim().split(":");if(b.length!==2)continue;const m=b[0].trim(),A=b[1].trim();t[A]!=null&&a.setAttribute(m,t[A])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const a=o[i],l=a.getAttribute("data-ln-show");l in t&&a.classList.toggle("hidden",!t[l])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const a=s[i],l=a.getAttribute("data-ln-class").split(",");for(let f=0;f<l.length;f++){const b=l[f].trim().split(":");if(b.length!==2)continue;const m=b[0].trim(),A=b[1].trim();A in t&&a.classList.toggle(m,!!t[A])}}return e}function Ee(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(i,a){return t[a]!==void 0?t[a]:""}))}const r=function(s,i){return t[i]!==void 0?t[i]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const i=o[s],a=i.attributes;for(let l=0;l<a.length;l++){const f=a[l];f.value.indexOf("{{")!==-1&&i.setAttribute(f.name,f.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Te(e,t,n,r,o,s){const i={};for(let l=0;l<e.children.length;l++){const f=e.children[l],b=f.getAttribute("data-ln-render-key");b&&(i[b]=f)}const a=document.createDocumentFragment();for(let l=0;l<t.length;l++){const f=t[l],b=String(r(f));let m=i[b];if(m)o(m,f,l);else{const A=Ie(n,s);if(!A||(G(A,f),m=A.firstElementChild,!m))continue;m.setAttribute("data-ln-render-key",b),o(m,f,l)}a.appendChild(m)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=G,window.lnCore.fill=J,window.lnCore.lnFill=Ee,window.lnCore.renderList=Te);function R(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function z(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function X(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function Y(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const B=new Map;function Z(e,t){const n=(e?e.join("|"):"")+"::"+t;if(B.has(n))return B.get(n);const r=new Set(e||[]),o=function(s,i){const a=s.getAttribute(i);return a!==null&&r.has(a)?a:t};return B.set(n,o),o}function ee(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function te(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function ne(e,t,n,r,o){if(!e||t===null)return!0;const s=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=l=>{o?console.warn(l,o):console.warn(l)};if(i==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const l=e.values||[];return l.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(a(`[${s}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(a(`[${s}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(l){return a(`[${s}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function re(e,t,n){for(const r in n){const[o,s,i]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,s,i)},enumerable:!0,configurable:!0})}return e}function oe(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Z(r.values,r.fallback);break;case"integer":o=z;break;case"float":o=ee;break;case"boolean":o=X;break;case"list":o=Y;break;case"json":o=te;break;case"string":default:o=R;break}o||(o=R),t[r.prop]=[o,n,r.fallback]}return t}function Le(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 qe(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=re,window.lnCore.attrSpec=oe,window.lnCore.attrStr=R,window.lnCore.attrInt=z,window.lnCore.attrBool=X,window.lnCore.attrList=Y,window.lnCore.attrEnum=Z,window.lnCore.attrFloat=ee,window.lnCore.attrJson=te);function M(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&i.push(e);for(const a of i)if(!a[n]){window.lnCore._persistSink&&a.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(a,t);try{a[n]=new r(a)}catch(l){console.error("["+n+"] init failed",a,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Re(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function E(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 ie(){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=ie(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).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 o=t.byDeclaredAttr.get(r);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=qe(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function le(e,t,n,r){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Fe(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=ie(),o=r.byAttr.get(n);if(U()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&D(t)){const s=r.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let a=0;a<s.length;a++)ne(s[a].spec,i,n,s[a].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const s=r.byReactive.get(n);s&&le(s,t,n,e.oldValue),r.reactiveWildcard.length&&le(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const i=o[s];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(M(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function De(){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{Fe(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 se(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Ne(e){const t=se();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,s=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;s&&r.onSubtreeChange(s,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const s=t[o];M(r,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const s=t[o],i=s.query,a=Array.from(r.querySelectorAll(i));r.matches&&r.matches(i)&&a.push(r);for(let l=0;l<a.length;l++){const f=a[l];if(!document.contains(f)){const b=f[s.attribute];if(b&&typeof b.destroy=="function")try{b.destroy()}catch(m){console.error("["+s.attribute+"] destroy failed",f,m)}delete f[s.attribute]}}}}}}function Be(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,q(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Ne(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ae(e,t,n,r,o={}){const s=o.extraAttributes||[],i=o.onAttributeChange||null,a=o.onSubtreeChange||null,l=o.onInit||null,f=o.onAttrChange||null,b=o.effects||null,m=o.attributes||null,A=m?Le(m):b,v=m?new Set(Object.keys(m)):null,T=o.persist||null;function _(u){const d=u||document.body;if(M(d,e,t,n),m&&U())for(const c in m){const g=m[c],p=Array.from(d.querySelectorAll("["+c+"]"));d.matches&&d.matches("["+c+"]")&&p.push(d);for(let h=0;h<p.length;h++){const w=p[h];D(w)&&ne(g,w.getAttribute(c),c,r,w)}}l&&l(d)}const x=[];if(e.indexOf("[")!==-1){const u=/\[([\w-]+)/g;let d;for(;(d=u.exec(e))!==null;)x.push(d[1])}else x.push(e);Oe({selector:e,attribute:t,componentTag:r,attributes:m,ComponentFn:n,onInit:l,observed:x.concat(s),onAttributeChange:i,onAttrChange:f,effects:A,declared:v,persist:T}),De();const H=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,W=o.subtreeQuery||(H?e:"["+e+"]");se().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:a,query:W}),Be(),window[t]=_,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ae);function I(){Re()>0?E(function(){_(document.body)}):_(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",I):I(),_}function ue(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function ce(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,n={},r=ce(t);if(!r)return n;const o=r.split("&");for(let s=0;s<o.length;s++){const i=o[s];if(!i)continue;const a=i.indexOf(":"),l=a>-1?i.slice(0,a):i,f=a>-1?i.slice(a+1):"";if(l)try{n[l]=decodeURIComponent(f)}catch{n[l]=f}}return n}function j(e){if(!e)return null;const t=$();return e in t?t[e]:null}function de(e,t){if(!e)return;const n=$();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");ce(location.hash)!==o&&(location.hash=o)}function Me(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 $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(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 fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function V(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),o=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=j,window.lnCore.hashSet=de,window.lnCore.hashLinkClick=Me,window.lnCore.resolveHashNamespace=O,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=fe,window.lnCore.hashFilterDecode=V);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 he(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const n=String(e).trim().toLowerCase();for(let r=0;r<t.length;r++)if(String(t[r]).trim().toLowerCase()===n)return!0;return!1}function He(e,t){if(!Array.isArray(e)||!Array.isArray(t))return e!==t;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function We(e,t,n){if(!t||typeof t!="object")return!0;const r=Object.keys(t);if(r.length===0)return!0;for(let o=0;o<r.length;o++){const s=t[r[o]];let i="";if(s.col!==null&&s.col!==void 0?i=e[s.col]||"":s.attr&&n&&typeof n.getAttribute=="function"&&(i=n.getAttribute(s.attr)||""),!he(i,s.values))return!1}return!0}function ge(e,t,n,r){if(r!=null&&!isNaN(r))return parseInt(r,10);if(t&&typeof t.getAttribute=="function"){const o=t.getAttribute("data-ln-filter-col");if(o!==null&&!isNaN(parseInt(o,10)))return parseInt(o,10);if(typeof t.closest=="function"){const s=t.closest("th");if(s&&typeof s.cellIndex=="number")return s.cellIndex;const i=t.closest("[data-ln-popover], [id]");if(i&&i.id){const a=e&&e.ownerDocument?e.ownerDocument:t.ownerDocument||(typeof document<"u"?document:null);if(a&&typeof a.querySelector=="function"){const l=a.querySelector('[data-ln-popover-for="'+i.id+'"]');if(l&&typeof l.closest=="function"){const f=l.closest("th");if(f&&typeof f.cellIndex=="number")return f.cellIndex}}}}}if(e&&n&&typeof e.querySelectorAll=="function"){const o=e.querySelectorAll("thead th, tr:first-child th"),s=String(n).trim().toLowerCase();for(let i=0;i<o.length;i++){const a=o[i],l=a.getAttribute("data-ln-table-filter-col")||a.getAttribute("data-ln-filter-col")||a.getAttribute("data-ln-filter-key")||a.getAttribute("data-ln-table-col")||a.getAttribute("data-ln-col")||a.getAttribute("data-ln-field");if(l&&l.trim().toLowerCase()===s)return typeof a.cellIndex=="number"?a.cellIndex:i}if(t){const i=t.closest?t.closest("[data-ln-popover], [id]"):null,a=i&&i.id||t.id||null;if(a)for(let l=0;l<o.length;l++){const f=o[l];if(typeof f.querySelector=="function"&&f.querySelector('[data-ln-popover-for="'+a+'"]'))return typeof f.cellIndex=="number"?f.cellIndex:l}}for(let i=0;i<o.length;i++){const a=o[i],f=Array.from(a.childNodes||[]).filter(m=>m.nodeType===3),b=(f.length>0?f.map(m=>m.textContent.trim()).join(" "):a.textContent||"").trim().toLowerCase();if(b&&b===s)return typeof a.cellIndex=="number"?a.cellIndex:i}}return null}function Ue(e){if(!Array.isArray(e))return{key:null,values:[]};let t=null;const n=[];for(let r=0;r<e.length;r++){const o=e[r];!t&&o.key&&(t=o.key),o.checked&&!o.isReset&&o.value&&n.push(o.value)}return{key:t,values:n}}function Ke(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function pe(e){return e?e.split(",").map(function(t){try{return decodeURIComponent(t)}catch{return t}}).filter(Boolean):[]}(function(){const e="data-ln-filter",t="lnFilter",n="data-ln-filter-key",r="data-ln-filter-value",o="data-ln-filter-hide",s="data-ln-filter-reset",i="data-ln-filter-col",a="data-ln-hash",l="data-ln-filter-values",f="data-ln-filter-target",b=new WeakMap;if(window[t]!==void 0)return;const m={"data-ln-filter":{prop:"targetId",type:"string",read:R,fallback:null,effect:I,description:"Target table or list element ID to filter"},"data-ln-hash":{type:"string",effect:I,description:"URL hash routing key for filter state persistence"},"data-ln-filter-values":{type:"string",effect:I,description:"Encoded active filter values"},"data-ln-filter-col":{type:"string",description:"Column name or index filter specifier"},"data-ln-filter-key":{type:"string",description:"Field key for filter matching"},"data-ln-filter-reset":{type:"trigger",description:"Filter reset button or option trigger"},"data-ln-filter-value":{type:"string",description:"Value to match for this filter input"},"data-ln-filter-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"},"data-ln-filter-target":{type:"marker",description:"Marker on target container or table observed by ln-filter"}},A=oe(m);function v(u){return u.hasAttribute(s)||!u.getAttribute(r)}function T(u){const d=u.dom.querySelectorAll("["+n+"]"),c=[];for(let p=0;p<d.length;p++){const h=d[p];c.push({key:h.getAttribute(n),value:h.getAttribute(r)||"",checked:h.checked,isReset:v(h)})}const g=Ue(c);return{key:g.key,values:g.values,targetId:u.targetId}}function _(u,d,c){const g=u.querySelectorAll("["+n+"]"),p=Array.isArray(c)&&c.length>0;for(let h=0;h<g.length;h++){const w=g[h];v(w)?w.checked=!p:p&&w.getAttribute(n)===d&&c.indexOf(w.getAttribute(r))!==-1?w.checked=!0:w.checked=!1}}function x(u){this.dom=u,re(this,u,A);const d=u.getAttribute(i);this.colIndex=d!==null?parseInt(d,10):null,this._lastSnapshot=null,this._destroyed=!1,this.nsKey=O(u,"filter"),this.hashEnabled=!!this.nsKey;const c=this,g=ue(function(){c._render()});this._queueRender=g;const p=ue(function(){c._destroyed||c._applyDomFilter()});this._queueDomFilter=p;function h(){if(!c.targetId)return;const y=document.getElementById(c.targetId);y&&!y.hasAttribute(f)&&y.setAttribute(f,c.targetId)}this._ensureTargetMarked=h,h(),E(function(){c._destroyed||h()}),this._attachHandlers(),this._onHashChange=function(){if(c._destroyed||!c.hashEnabled)return;const y=j(c.nsKey),C=V(y);C&&C.key&&C.values.length>0?_(c.dom,C.key,C.values):_(c.dom,null,[]),c._render()},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange);let w=!1;if(this.hashEnabled){const y=j(this.nsKey),C=V(y);C&&C.key&&C.values.length>0&&(_(u,C.key,C.values),E(function(){c._destroyed||c._render()}),w=!0)}if(!w){const y=pe(u.getAttribute(l));if(y.length>0){const C=u.querySelector("["+n+"]"),S=C?C.getAttribute(n):null;S&&(_(u,S,y),E(function(){c._destroyed||c._render()}),w=!0)}}if(!w){const y=u.querySelectorAll("["+n+"]");for(let C=0;C<y.length;C++)if(y[C].checked&&!v(y[C])){E(function(){c._destroyed||c._render()});break}}return this}x.prototype._attachHandlers=function(){const u=this;this._onDomChange=function(d){const c=d.target;if(!c||!c.hasAttribute||!c.hasAttribute(n))return;const g=Array.from(u.dom.querySelectorAll("["+n+"]"));if(v(c)){for(let p=0;p<g.length;p++)v(g[p])||(g[p].checked=!1);c.checked=!0,u._queueRender();return}if(c.checked){for(let h=0;h<g.length;h++)v(g[h])&&(g[h].checked=!1);let p=!1;for(let h=0;h<g.length;h++)if(v(g[h])){p=!0;break}if(p){let h=!0;for(let w=0;w<g.length;w++)if(!v(g[w])&&!g[w].checked){h=!1;break}if(h)for(let w=0;w<g.length;w++)v(g[w])?g[w].checked=!0:g[w].checked=!1}}else{let p=!1;for(let h=0;h<g.length;h++)if(!v(g[h])&&g[h].checked){p=!0;break}if(!p)for(let h=0;h<g.length;h++)v(g[h])&&(g[h].checked=!0)}u._queueRender()},this.dom.addEventListener("change",this._onDomChange)},x.prototype._render=function(){const u=this,d=T(this),c=this._lastSnapshot;if(!(!c||c.key!==d.key||He(c.values,d.values)))return;d.key===null||d.values.length;const p=document.getElementById(u.targetId),h={key:d.key,values:d.values.slice(),targetId:u.targetId};L(u.dom,"ln-filter:change",h);let w=!1;p&&p!==u.dom&&be(p,"ln-filter:change",h).defaultPrevented&&(w=!0);const y=c&&c.values.length>0,C=d.values.length===0;if(y&&C){const k={targetId:u.targetId};L(u.dom,"ln-filter:reset",k),p&&p!==u.dom&&L(p,"ln-filter:reset",k)}this._lastSnapshot={key:d.key,values:d.values.slice()};const S=Ke(d.values);if(S?this.dom.setAttribute(l,S):this.dom.removeAttribute(l),this.hashEnabled){const k=fe(d.key,d.values);de(this.nsKey,k)}w||u._applyDomFilter(p)},x.prototype._applyDomFilter=function(u){const d=u||document.getElementById(this.targetId);if(!d)return;const c=T(this),g=c.key===null||c.values.length===0,p=d.tagName==="TABLE"?d:d.querySelector?d.querySelector("table"):null;if(p)this._filterTableRows(c,p);else{const h=d.children;for(let w=0;w<h.length;w++){const y=h[w];if(y.removeAttribute(o),g)continue;const C=y.getAttribute("data-"+c.key);C!==null&&(he(C,c.values)||y.setAttribute(o,"true"))}}};function H(u){if(!u)return"";const d=u.querySelector?u.querySelector("[data-ln-value]"):null;return K(d||u)}function W(u){return!!(!u||typeof u!="object"||u.tagName==="TEMPLATE"||typeof u.hasAttribute=="function"&&(u.hasAttribute("data-ln-sort-exclude")||u.hasAttribute("hidden"))||u.classList&&u.classList.contains("hidden")||u.style&&u.style.display==="none"||typeof u.matches=="function"&&u.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]")||typeof u.querySelector=="function"&&u.querySelector(".empty-state, [data-ln-empty], [data-ln-empty-state]"))}x.prototype._filterTableRows=function(u,d){if(!d){const y=document.getElementById(this.targetId);if(!y||(d=y.tagName==="TABLE"?y:y.querySelector?y.querySelector("table"):null,!d))return}const c=ge(d,this.dom,u.key,this.colIndex),g=u.key||this.dom.getAttribute("data-ln-filter-key")||(c!==null?"col"+c:"attr-filter"),p=u.values;b.has(d)||b.set(d,{});const h=b.get(d);g&&p.length>0?h[g]={col:c,values:p.slice(),attr:"data-"+g}:g&&delete h[g];const w=d.tBodies;for(let y=0;y<w.length;y++){const C=w[y].rows;for(let S=0;S<C.length;S++){const k=C[S];if(W(k))continue;const we={};for(let F=0;F<k.cells.length;F++)we[F]=H(k.cells[F]);We(we,h,k)?k.removeAttribute(o):k.setAttribute(o,"true")}}},x.prototype.destroy=function(){if(!this.dom[t])return;this._destroyed=!0;const u=document.getElementById(this.targetId);if(u){const d=u.tagName==="TABLE"?u:u.querySelector?u.querySelector("table"):null;if(d&&b.has(d)){const c=b.get(d),g=ge(d,this.dom,this.dom.getAttribute("data-ln-filter-key"),this.colIndex),p=this.dom.getAttribute("data-ln-filter-key")||(g!==null?"col"+g:this.colIndex!==null?"col"+this.colIndex:null);p&&c[p]&&(delete c[p],this._filterTableRows({key:null,values:[]},d)),Object.keys(c).length===0&&b.delete(d)}this.targetId&&document.querySelectorAll("["+e+'="'+this.targetId+'"]').length<=1&&u.removeAttribute(f)}this._onDomChange&&(this.dom.removeEventListener("change",this._onDomChange),delete this._onDomChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),delete this.dom[t]};function I(u,d){const c=u[t];if(!(!c||c._destroyed))if(d===a)c.hashEnabled&&c._onHashChange&&window.removeEventListener("hashchange",c._onHashChange),c.nsKey=O(u,"filter"),c.hashEnabled=!!c.nsKey,c.hashEnabled&&window.addEventListener("hashchange",c._onHashChange);else if(d===l){const g=pe(u.getAttribute(l)),p=u.querySelector("["+n+"]"),h=p?p.getAttribute(n):null;h&&(_(u,h,g),c._render())}else d===e&&(c.targetId=u.getAttribute(e)||null,c._ensureTargetMarked(),c._render())}ae(e,t,x,"ln-filter",{attributes:m,subtreeQuery:"["+e+"], ["+f+"]",onSubtreeChange:function(u,d){if(d.addedNodes.length===0&&d.removedNodes.length===0)return;let c=null,g=null;if(u.hasAttribute(f)?(g=u,c=u.getAttribute(f)||u.id):u.hasAttribute(e)&&(c=u.getAttribute(e),g=c?document.getElementById(c):null),!c||!g)return;const p=document.querySelectorAll("["+e+'="'+c+'"]');for(let h=0;h<p.length;h++){const w=p[h][t];w&&!w._destroyed&&T(w).values.length>0&&w._queueDomFilter()}},persist:{attr:l,hashActive:function(u){return!!O(u,"filter")}}})})()})();
1
+ (function(){"use strict";function Q(){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(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 i=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){i=t[r];break}if(!N(i))return}e.apply(console,t)}}function L(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function Ce(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(r),r}function R(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){R(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function P(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 Ae(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),i=t&&t.exclude,r={},a=e.elements,l={};if(n)for(let s=0;s<a.length;s++){const o=a[s];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<a.length;s++){const o=a[s];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(i&&o.matches&&o.matches(i)))if(o.type==="checkbox")n&&l[o.name]===1?r[o.name]=o.checked:(r[o.name]||(r[o.name]=[]),o.checked&&r[o.name].push(o.value));else if(o.type==="radio")o.checked&&(r[o.name]=o.value);else if(o.type==="select-multiple"){r[o.name]=[];for(let d=0;d<o.options.length;d++)o.options[d].selected&&r[o.name].push(o.options[d].value)}else if(n&&o.type==="hidden")r[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const d=Number(o.value);r[o.name]=o.value===""||isNaN(d)?null:d}else r[o.name]=o.value}return r}function ke(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function _e(e,t){const n=e.elements,i=[],r={};for(let a=0;a<n.length;a++){const l=n[a];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let a=0;a<n.length;a++){const l=n[a];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const o=t[s];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(r[l.name]>1){const d=String(o).split(",").map(function(w){return w.trim()});l.checked=d.indexOf(l.value)!==-1}else l.checked=ke(o);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let d=0;d<l.options.length;d++)l.options[d].selected=o.indexOf(l.options[d].value)!==-1;i.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=_e,window.lnCore.serializeForm=ve,window.lnCore.resolveFormMethod=Ae);const J={};function Se(e,t){J[e]=t}function xe(e){return J[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Se,window.lnCore.getDataMapper=xe);function Ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,R(function(){new MutationObserver(function(){L(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const G={};function Ee(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];G[n]=t}function Te(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return G[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ee,window.lnCore.getLocaleFallback=Te,window.lnCore.ensureLocaleObserver=Ie);const B={};function qe(e,t){B[e]||(B[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=B[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 s=n[l],o=s.getAttribute("data-ln-field");t[o]!=null&&(s.textContent=t[o])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const s=i[l],o=s.getAttribute("data-ln-attr").split(",");for(let d=0;d<o.length;d++){const w=o[d].trim().split(":");if(w.length!==2)continue;const m=w[0].trim(),A=w[1].trim();t[A]!=null&&s.setAttribute(m,t[A])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const s=r[l],o=s.getAttribute("data-ln-show");o in t&&s.classList.toggle("hidden",!t[o])}const a=e.querySelectorAll("[data-ln-class]");for(let l=0;l<a.length;l++){const s=a[l],o=s.getAttribute("data-ln-class").split(",");for(let d=0;d<o.length;d++){const w=o[d].trim().split(":");if(w.length!==2)continue;const m=w[0].trim(),A=w[1].trim();A in t&&s.classList.toggle(m,!!t[A])}}return e}function Le(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 i=0;i<n.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[i],t??null),n[i].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 X(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const i=function(a,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let a=0;a<r.length;a++){const l=r[a],s=l.attributes;for(let o=0;o<s.length;o++){const d=s[o];d.value.indexOf("{{")!==-1&&l.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function Re(e,t,n,i,r,a){const l={};for(let o=0;o<e.children.length;o++){const d=e.children[o],w=d.getAttribute("data-ln-render-key");w&&(l[w]=d)}const s=document.createDocumentFragment();for(let o=0;o<t.length;o++){const d=t[o],w=String(i(d));let m=l[w];if(m)r(m,d,o);else{const A=qe(n,a);if(!A||(X(A,d),m=A.firstElementChild,!m))continue;m.setAttribute("data-ln-render-key",w),r(m,d,o)}s.appendChild(m)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=X,window.lnCore.fill=z,window.lnCore.lnFill=Le,window.lnCore.renderList=Re);function O(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function Y(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function Z(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const r=i.trim().toLowerCase();return!(r==="false"||r==="0")}function ee(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const M=new Map;function te(e,t){const n=(e?e.join("|"):"")+"::"+t;if(M.has(n))return M.get(n);const i=new Set(e||[]),r=function(a,l){const s=a.getAttribute(l);return s!==null&&i.has(s)?s:t};return M.set(n,r),r}function ne(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function re(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function oe(e,t,n,i,r){if(!e||t===null)return!0;const a=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=o=>{r?console.warn(o,r):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(s(`[${a}] 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:(s(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(s(`[${a}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(s(`[${a}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return s(`[${a}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function ie(e,t,n){for(const i in n){const[r,a,l]=n[i];Object.defineProperty(e,i,{get:function(){return r(t,a,l)},enumerable:!0,configurable:!0})}return e}function le(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let r=i.read;if(!r&&i.type)switch(i.type){case"enum":r=te(i.values,i.fallback);break;case"integer":r=Y;break;case"float":r=ne;break;case"boolean":r=Z;break;case"list":r=ee;break;case"json":r=re;break;case"string":default:r=O;break}r||(r=O),t[i.prop]=[r,n,i.fallback]}return t}function Oe(e){const t={};for(const n in e){const i=e[n];i&&i.effect&&(t[n]=i.effect)}return Object.keys(t).length?t:null}function De(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=ie,window.lnCore.attrSpec=le,window.lnCore.attrStr=O,window.lnCore.attrInt=Y,window.lnCore.attrBool=Z,window.lnCore.attrList=ee,window.lnCore.attrEnum=te,window.lnCore.attrFloat=ne,window.lnCore.attrJson=re);function E(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 se(e,t,n,i){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(a)&&E(e,l),e.querySelectorAll){const s=e.querySelectorAll(a);for(let o=0;o<s.length;o++)E(s[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Fe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function T(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 ae(){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 Ne(e){const t=ae(),n=e.observed||[];for(let i=0;i<n.length;i++){const r=n[i];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const r=t.byDeclaredAttr.get(i);r.some(a=>a.componentTag===e.componentTag)||r.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=De(e);if(i===null)t.reactiveWildcard.push(e);else for(const r of i)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function ce(e,t,n,i){for(let r=0;r<e.length;r++){const a=e[r];if(!t[a.attribute])continue;const l=a.effects&&a.effects[n];l?l(t,n,i):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,i)}}function Be(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=ae(),r=i.byAttr.get(t),a=Q()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!r&&!a)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(a&&N(l)){const s=i.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let d=0;d<s.length;d++)oe(s[d].spec,o,t,s[d].componentTag,l)}if(window.lnCore._debugSink&&(n||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const s=i.byReactive.get(t);s&&ce(s,l,t,e.oldValue),i.reactiveWildcard.length&&ce(i.reactiveWildcard,l,t,e.oldValue)}if(r)for(let s=0;s<r.length;s++){const o=r[s];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(se(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function Me(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,R(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Be(t[n])}catch(i){console.error("[ln-core] mutation handler failed",t[n].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function j(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function $e(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}if(e.target)for(let i=0;i<t.length;i++){const r=t[i];if(r.onSubtreeChange&&r.query){const a=r.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(a)?e.target:e.target.closest?e.target.closest(a):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(a):null;l&&r.onSubtreeChange(l,e)}}for(let i=0;i<e.addedNodes.length;i++){const r=e.addedNodes[i];if(r.nodeType===1){const a=!!(r.firstElementChild||r.children&&r.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!a)r.matches&&r.matches(s.query)&&E(r,s);else if(r.matches&&r.matches(s.query)&&E(r,s),r.querySelectorAll){const o=r.querySelectorAll(s.query);for(let d=0;d<o.length;d++)E(o[d],s)}}s.onInit&&s.onInit(r)}}}for(let i=0;i<e.removedNodes.length;i++){const r=e.removedNodes[i];if(r.nodeType===1){const a=!!(r.firstElementChild||r.children&&r.children.length);for(let l=0;l<t.length;l++){const s=t[l],o=s.query;if(o){if(!a)r.matches&&r.matches(o)&&j(r,s);else if(r.matches&&r.matches(o)&&j(r,s),r.querySelectorAll){const d=r.querySelectorAll(o);for(let w=0;w<d.length;w++)j(d[w],s)}}}}}}function ue(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,R(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{$e(i)}catch(r){console.error("[ln-core] lifecycle handler failed",i.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function je(e){$().push(e),ue()}function de(e,t,n,i,r={}){const a=r.extraAttributes||[],l=r.onAttributeChange||null,s=r.onSubtreeChange||null,o=r.onInit||null,d=r.onAttrChange||null,w=r.effects||null,m=r.attributes||null,A=m?Oe(m):w,v=m?new Set(Object.keys(m)):null,q=r.persist||null;function _(c){const f=c||document.body;if(se(f,e,t,n),m&&Q())for(const u in m){const g=m[u],p=Array.from(f.querySelectorAll("["+u+"]"));f.matches&&f.matches("["+u+"]")&&p.push(f);for(let h=0;h<p.length;h++){const b=p[h];N(b)&&oe(g,b.getAttribute(u),u,i,b)}}o&&o(f)}const S=[];if(e.indexOf("[")!==-1){const c=/\[([\w-]+)/g;let f;for(;(f=c.exec(e))!==null;)S.push(f[1])}else S.push(e);Ne({selector:e,attribute:t,componentTag:i,attributes:m,ComponentFn:n,onInit:o,observed:S.concat(a),onAttributeChange:l,onAttrChange:d,effects:A,declared:v,persist:q}),Me();const U=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,K=r.subtreeQuery||(U?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:s,query:K}),ue(),window[t]=_,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=de,window.lnCore.observeLifecycle=je);function I(){Fe()>0?T(function(){_(document.body)}):_(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",I):I(),_}function fe(e,t){let n=!1;return function(){n||(n=!0,queueMicrotask(function(){n=!1,e()}))}}function he(e){return(e||"").replace(/^#/,"")}function V(e){const t=e===void 0?location.hash:e,n={},i=he(t);if(!i)return n;const r=i.split("&");for(let a=0;a<r.length;a++){const l=r[a];if(!l)continue;const s=l.indexOf(":"),o=s>-1?l.slice(0,s):l,d=s>-1?l.slice(s+1):"";if(o)try{n[o]=decodeURIComponent(d)}catch{n[o]=d}}return n}function H(e){if(!e)return null;const t=V();return e in t?t[e]:null}function ge(e,t){if(!e)return;const n=V();t==null?delete n[e]:n[e]=String(t);const r=Object.keys(n).map(function(a){const l=n[a];return l===""?a:a+":"+encodeURIComponent(l)}).join("&");he(location.hash)!==r&&(location.hash=r)}function Ve(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function D(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 i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function He(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function We(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 pe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function W(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),i=e.slice(t+1),r=i?i.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=V,window.lnCore.hashGet=H,window.lnCore.hashSet=ge,window.lnCore.hashLinkClick=Ve,window.lnCore.resolveHashNamespace=D,window.lnCore.hashSortEncode=He,window.lnCore.hashSortDecode=We,window.lnCore.hashFilterEncode=pe,window.lnCore.hashFilterDecode=W);function Ue(){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=Ue);function be(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const n=String(e).trim().toLowerCase();for(let i=0;i<t.length;i++)if(String(t[i]).trim().toLowerCase()===n)return!0;return!1}function Ke(e,t){if(!Array.isArray(e)||!Array.isArray(t))return e!==t;if(e.length!==t.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!0;return!1}function Qe(e,t,n){if(!t||typeof t!="object")return!0;const i=Object.keys(t);if(i.length===0)return!0;for(let r=0;r<i.length;r++){const a=t[i[r]];let l="";if(a.col!==null&&a.col!==void 0?l=e[a.col]||"":a.attr&&n&&typeof n.getAttribute=="function"&&(l=n.getAttribute(a.attr)||""),!be(l,a.values))return!1}return!0}function we(e,t,n,i){if(i!=null&&!isNaN(i))return parseInt(i,10);if(t&&typeof t.getAttribute=="function"){const r=t.getAttribute("data-ln-filter-col");if(r!==null&&!isNaN(parseInt(r,10)))return parseInt(r,10);if(typeof t.closest=="function"){const a=t.closest("th");if(a&&typeof a.cellIndex=="number")return a.cellIndex;const l=t.closest("[data-ln-popover], [id]");if(l&&l.id){const s=e&&e.ownerDocument?e.ownerDocument:t.ownerDocument||(typeof document<"u"?document:null);if(s&&typeof s.querySelector=="function"){const o=s.querySelector('[data-ln-popover-for="'+l.id+'"]');if(o&&typeof o.closest=="function"){const d=o.closest("th");if(d&&typeof d.cellIndex=="number")return d.cellIndex}}}}}if(e&&n&&typeof e.querySelectorAll=="function"){const r=e.querySelectorAll("thead th, tr:first-child th"),a=String(n).trim().toLowerCase();for(let l=0;l<r.length;l++){const s=r[l],o=s.getAttribute("data-ln-table-filter-col")||s.getAttribute("data-ln-filter-col")||s.getAttribute("data-ln-filter-key")||s.getAttribute("data-ln-table-col")||s.getAttribute("data-ln-col")||s.getAttribute("data-ln-field");if(o&&o.trim().toLowerCase()===a)return typeof s.cellIndex=="number"?s.cellIndex:l}if(t){const l=t.closest?t.closest("[data-ln-popover], [id]"):null,s=l&&l.id||t.id||null;if(s)for(let o=0;o<r.length;o++){const d=r[o];if(typeof d.querySelector=="function"&&d.querySelector('[data-ln-popover-for="'+s+'"]'))return typeof d.cellIndex=="number"?d.cellIndex:o}}for(let l=0;l<r.length;l++){const s=r[l],d=Array.from(s.childNodes||[]).filter(m=>m.nodeType===3),w=(d.length>0?d.map(m=>m.textContent.trim()).join(" "):s.textContent||"").trim().toLowerCase();if(w&&w===a)return typeof s.cellIndex=="number"?s.cellIndex:l}}return null}function Pe(e){if(!Array.isArray(e))return{key:null,values:[]};let t=null;const n=[];for(let i=0;i<e.length;i++){const r=e[i];!t&&r.key&&(t=r.key),r.checked&&!r.isReset&&r.value&&n.push(r.value)}return{key:t,values:n}}function Je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function ye(e){return e?e.split(",").map(function(t){try{return decodeURIComponent(t)}catch{return t}}).filter(Boolean):[]}(function(){const e="data-ln-filter",t="lnFilter",n="data-ln-filter-key",i="data-ln-filter-value",r="data-ln-filter-hide",a="data-ln-filter-reset",l="data-ln-filter-col",s="data-ln-hash",o="data-ln-filter-values",d="data-ln-filter-target",w=new WeakMap;if(window[t]!==void 0)return;const m={"data-ln-filter":{prop:"targetId",type:"string",read:O,fallback:null,effect:I,description:"Target table or list element ID to filter"},"data-ln-hash":{type:"string",effect:I,description:"URL hash routing key for filter state persistence"},"data-ln-filter-values":{type:"string",effect:I,description:"Encoded active filter values"},"data-ln-filter-col":{type:"string",description:"Column name or index filter specifier"},"data-ln-filter-key":{type:"string",description:"Field key for filter matching"},"data-ln-filter-reset":{type:"trigger",description:"Filter reset button or option trigger"},"data-ln-filter-value":{type:"string",description:"Value to match for this filter input"},"data-ln-filter-hide":{type:"enum",values:["collapse","none"],fallback:"collapse",description:"CSS hiding strategy for non-matching rows"},"data-ln-filter-target":{type:"marker",description:"Marker on target container or table observed by ln-filter"}},A=le(m);function v(c){return c.hasAttribute(a)||!c.getAttribute(i)}function q(c){const f=c.dom.querySelectorAll("["+n+"]"),u=[];for(let p=0;p<f.length;p++){const h=f[p];u.push({key:h.getAttribute(n),value:h.getAttribute(i)||"",checked:h.checked,isReset:v(h)})}const g=Pe(u);return{key:g.key,values:g.values,targetId:c.targetId}}function _(c,f,u){const g=c.querySelectorAll("["+n+"]"),p=Array.isArray(u)&&u.length>0;for(let h=0;h<g.length;h++){const b=g[h];v(b)?b.checked=!p:p&&b.getAttribute(n)===f&&u.indexOf(b.getAttribute(i))!==-1?b.checked=!0:b.checked=!1}}function S(c){this.dom=c,ie(this,c,A);const f=c.getAttribute(l);this.colIndex=f!==null?parseInt(f,10):null,this._lastSnapshot=null,this._destroyed=!1,this.nsKey=D(c,"filter"),this.hashEnabled=!!this.nsKey;const u=this,g=fe(function(){u._render()});this._queueRender=g;const p=fe(function(){u._destroyed||u._applyDomFilter()});this._queueDomFilter=p;function h(){if(!u.targetId)return;const y=document.getElementById(u.targetId);y&&!y.hasAttribute(d)&&y.setAttribute(d,u.targetId)}this._ensureTargetMarked=h,h(),T(function(){u._destroyed||h()}),this._attachHandlers(),this._onHashChange=function(){if(u._destroyed||!u.hashEnabled)return;const y=H(u.nsKey),C=W(y);C&&C.key&&C.values.length>0?_(u.dom,C.key,C.values):_(u.dom,null,[]),u._render()},this.hashEnabled&&window.addEventListener("hashchange",this._onHashChange);let b=!1;if(this.hashEnabled){const y=H(this.nsKey),C=W(y);C&&C.key&&C.values.length>0&&(_(c,C.key,C.values),T(function(){u._destroyed||u._render()}),b=!0)}if(!b){const y=ye(c.getAttribute(o));if(y.length>0){const C=c.querySelector("["+n+"]"),x=C?C.getAttribute(n):null;x&&(_(c,x,y),T(function(){u._destroyed||u._render()}),b=!0)}}if(!b){const y=c.querySelectorAll("["+n+"]");for(let C=0;C<y.length;C++)if(y[C].checked&&!v(y[C])){T(function(){u._destroyed||u._render()});break}}return this}S.prototype._attachHandlers=function(){const c=this;this._onDomChange=function(f){const u=f.target;if(!u||!u.hasAttribute||!u.hasAttribute(n))return;const g=Array.from(c.dom.querySelectorAll("["+n+"]"));if(v(u)){for(let p=0;p<g.length;p++)v(g[p])||(g[p].checked=!1);u.checked=!0,c._queueRender();return}if(u.checked){for(let h=0;h<g.length;h++)v(g[h])&&(g[h].checked=!1);let p=!1;for(let h=0;h<g.length;h++)if(v(g[h])){p=!0;break}if(p){let h=!0;for(let b=0;b<g.length;b++)if(!v(g[b])&&!g[b].checked){h=!1;break}if(h)for(let b=0;b<g.length;b++)v(g[b])?g[b].checked=!0:g[b].checked=!1}}else{let p=!1;for(let h=0;h<g.length;h++)if(!v(g[h])&&g[h].checked){p=!0;break}if(!p)for(let h=0;h<g.length;h++)v(g[h])&&(g[h].checked=!0)}c._queueRender()},this.dom.addEventListener("change",this._onDomChange)},S.prototype._render=function(){const c=this,f=q(this),u=this._lastSnapshot;if(!(!u||u.key!==f.key||Ke(u.values,f.values)))return;f.key===null||f.values.length;const p=document.getElementById(c.targetId),h={key:f.key,values:f.values.slice(),targetId:c.targetId};L(c.dom,"ln-filter:change",h);let b=!1;p&&p!==c.dom&&Ce(p,"ln-filter:change",h).defaultPrevented&&(b=!0);const y=u&&u.values.length>0,C=f.values.length===0;if(y&&C){const k={targetId:c.targetId};L(c.dom,"ln-filter:reset",k),p&&p!==c.dom&&L(p,"ln-filter:reset",k)}this._lastSnapshot={key:f.key,values:f.values.slice()};const x=Je(f.values);if(x?this.dom.setAttribute(o,x):this.dom.removeAttribute(o),this.hashEnabled){const k=pe(f.key,f.values);ge(this.nsKey,k)}b||c._applyDomFilter(p)},S.prototype._applyDomFilter=function(c){const f=c||document.getElementById(this.targetId);if(!f)return;const u=q(this),g=u.key===null||u.values.length===0,p=f.tagName==="TABLE"?f:f.querySelector?f.querySelector("table"):null;if(p)this._filterTableRows(u,p);else{const h=f.children;for(let b=0;b<h.length;b++){const y=h[b];if(y.removeAttribute(r),g)continue;const C=y.getAttribute("data-"+u.key);C!==null&&(be(C,u.values)||y.setAttribute(r,"true"))}}};function U(c){if(!c)return"";const f=c.querySelector?c.querySelector("[data-ln-value]"):null;return P(f||c)}function K(c){return!!(!c||typeof c!="object"||c.tagName==="TEMPLATE"||typeof c.hasAttribute=="function"&&(c.hasAttribute("data-ln-sort-exclude")||c.hasAttribute("hidden"))||c.classList&&c.classList.contains("hidden")||c.style&&c.style.display==="none"||typeof c.matches=="function"&&c.matches(".empty-state, .ln-table__empty, .ln-table__empty-state, [data-ln-empty], [data-ln-empty-state], [data-ln-table-empty]")||typeof c.querySelector=="function"&&c.querySelector(".empty-state, [data-ln-empty], [data-ln-empty-state]"))}S.prototype._filterTableRows=function(c,f){if(!f){const y=document.getElementById(this.targetId);if(!y||(f=y.tagName==="TABLE"?y:y.querySelector?y.querySelector("table"):null,!f))return}const u=we(f,this.dom,c.key,this.colIndex),g=c.key||this.dom.getAttribute("data-ln-filter-key")||(u!==null?"col"+u:"attr-filter"),p=c.values;w.has(f)||w.set(f,{});const h=w.get(f);g&&p.length>0?h[g]={col:u,values:p.slice(),attr:"data-"+g}:g&&delete h[g];const b=f.tBodies;for(let y=0;y<b.length;y++){const C=b[y].rows;for(let x=0;x<C.length;x++){const k=C[x];if(K(k))continue;const me={};for(let F=0;F<k.cells.length;F++)me[F]=U(k.cells[F]);Qe(me,h,k)?k.removeAttribute(r):k.setAttribute(r,"true")}}},S.prototype.destroy=function(){if(!this.dom[t])return;this._destroyed=!0;const c=document.getElementById(this.targetId);if(c){const f=c.tagName==="TABLE"?c:c.querySelector?c.querySelector("table"):null;if(f&&w.has(f)){const u=w.get(f),g=we(f,this.dom,this.dom.getAttribute("data-ln-filter-key"),this.colIndex),p=this.dom.getAttribute("data-ln-filter-key")||(g!==null?"col"+g:this.colIndex!==null?"col"+this.colIndex:null);p&&u[p]&&(delete u[p],this._filterTableRows({key:null,values:[]},f)),Object.keys(u).length===0&&w.delete(f)}this.targetId&&document.querySelectorAll("["+e+'="'+this.targetId+'"]').length<=1&&c.removeAttribute(d)}this._onDomChange&&(this.dom.removeEventListener("change",this._onDomChange),delete this._onDomChange),this.hashEnabled&&this._onHashChange&&window.removeEventListener("hashchange",this._onHashChange),delete this.dom[t]};function I(c,f){const u=c[t];if(!(!u||u._destroyed))if(f===s)u.hashEnabled&&u._onHashChange&&window.removeEventListener("hashchange",u._onHashChange),u.nsKey=D(c,"filter"),u.hashEnabled=!!u.nsKey,u.hashEnabled&&window.addEventListener("hashchange",u._onHashChange);else if(f===o){const g=ye(c.getAttribute(o)),p=c.querySelector("["+n+"]"),h=p?p.getAttribute(n):null;h&&(_(c,h,g),u._render())}else f===e&&(u.targetId=c.getAttribute(e)||null,u._ensureTargetMarked(),u._render())}de(e,t,S,"ln-filter",{attributes:m,subtreeQuery:"["+e+"], ["+d+"]",onSubtreeChange:function(c,f){if(f.addedNodes.length===0&&f.removedNodes.length===0)return;let u=null,g=null;if(c.hasAttribute(d)?(g=c,u=c.getAttribute(d)||c.id):c.hasAttribute(e)&&(u=c.getAttribute(e),g=u?document.getElementById(u):null),!u||!g)return;const p=document.querySelectorAll("["+e+'="'+u+'"]');for(let h=0;h<p.length;h++){const b=p[h][t];b&&!b._destroyed&&q(b).values.length>0&&b._queueDomFilter()}},persist:{attr:o,hashActive:function(c){return!!D(c,"filter")}}})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function E(){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 g(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 i=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){i=t[l];break}if(!g(i))return}e.apply(console,t)}}function z(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function G(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function X(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,l={},s=e.elements,o={};if(n)for(let a=0;a<s.length;a++){const r=s[a];r.name&&r.type==="checkbox"&&!r.disabled&&(o[r.name]=(o[r.name]||0)+1)}for(let a=0;a<s.length;a++){const r=s[a];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(i&&r.matches&&r.matches(i)))if(r.type==="checkbox")n&&o[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let c=0;c<r.options.length;c++)r.options[c].selected&&l[r.name].push(r.options[c].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const c=Number(r.value);l[r.name]=r.value===""||isNaN(c)?null:c}else l[r.name]=r.value}return l}function Y(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function L(e,t){const n=e.elements,i=[],l={};for(let s=0;s<n.length;s++){const o=n[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const a=o.getAttribute("data-ln-fill-as")||o.name;if(!a||!(a in t))continue;const r=t[a];if(o.type==="checkbox"){if(Array.isArray(r))o.checked=r.indexOf(o.value)!==-1;else if(l[o.name]>1){const c=String(r).split(",").map(function(u){return u.trim()});o.checked=c.indexOf(o.value)!==-1}else o.checked=Y(r);i.push(o)}else if(o.type==="radio")o.checked=o.value===String(r),i.push(o);else if(o.type==="select-multiple"){if(Array.isArray(r))for(let c=0;c<o.options.length;c++)o.options[c].selected=r.indexOf(o.options[c].value)!==-1;i.push(o)}else o.value=r,o.tagName==="SELECT"&&r!=null&&o.setAttribute("data-ln-value",r),i.push(o)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=L,window.lnCore.serializeForm=X,window.lnCore.resolveFormMethod=G);const T={};function Z(e,t){T[e]=t}function ee(e){return T[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Z,window.lnCore.getDataMapper=ee);function te(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){z(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const I={};function ne(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];I[n]=t}function oe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return I[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ne,window.lnCore.getLocaleFallback=oe,window.lnCore.ensureLocaleObserver=te);const C={};function re(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=C[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function F(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const a=n[o],r=a.getAttribute("data-ln-field");t[r]!=null&&(a.textContent=t[r])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const a=i[o],r=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<r.length;c++){const u=r[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&a.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const a=l[o],r=a.getAttribute("data-ln-show");r in t&&a.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const a=s[o],r=a.getAttribute("data-ln-class").split(",");for(let c=0;c<r.length;c++){const u=r[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&a.classList.toggle(d,!!t[f])}}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 n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<n.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[i],t??null),n[i].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)F(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 $(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(o,a){return t[a]!==void 0?t[a]:""}))}const i=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],a=o.attributes;for(let r=0;r<a.length;r++){const c=a[r];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function le(e,t,n,i,l,s){const o={};for(let r=0;r<e.children.length;r++){const c=e.children[r],u=c.getAttribute("data-ln-render-key");u&&(o[u]=c)}const a=document.createDocumentFragment();for(let r=0;r<t.length;r++){const c=t[r],u=String(i(c));let d=o[u];if(d)l(d,c,r);else{const f=re(n,s);if(!f||($(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,c,r)}a.appendChild(d)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=F,window.lnCore.lnFill=ie,window.lnCore.renderList=le);function b(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function M(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function D(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function R(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const y=new Map;function N(e,t){const n=(e?e.join("|"):"")+"::"+t;if(y.has(n))return y.get(n);const i=new Set(e||[]),l=function(s,o){const a=s.getAttribute(o);return a!==null&&i.has(a)?a:t};return y.set(n,l),l}function q(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function B(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function j(e,t,n,i,l){if(!e||t===null)return!0;const s=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const a=r=>{l?console.warn(r,l):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(a(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(a(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return a(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function U(e,t,n){for(const i in n){const[l,s,o]=n[i];Object.defineProperty(e,i,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function W(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=N(i.values,i.fallback);break;case"integer":l=M;break;case"float":l=q;break;case"boolean":l=D;break;case"list":l=R;break;case"json":l=B;break;case"string":default:l=b;break}l||(l=b),t[i.prop]=[l,n,i.fallback]}return t}function se(e){const t={};for(const n in e){const i=e[n];i&&i.effect&&(t[n]=i.effect)}return Object.keys(t).length?t:null}function ae(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=U,window.lnCore.attrSpec=W,window.lnCore.attrStr=b,window.lnCore.attrInt=M,window.lnCore.attrBool=D,window.lnCore.attrList=R,window.lnCore.attrEnum=N,window.lnCore.attrFloat=q,window.lnCore.attrJson=B);function A(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&o.push(e);for(const a of o)if(!a[n]){window.lnCore._persistSink&&a.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(a,t);try{a[n]=new i(a)}catch(r){console.error("["+n+"] init failed",a,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ue(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 H(){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 de(e){const t=H(),n=e.observed||[];for(let i=0;i<n.length;i++){const l=n[i];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const l=t.byDeclaredAttr.get(i);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=ae(e);if(i===null)t.reactiveWildcard.push(e);else for(const l of i)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function V(e,t,n,i){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,i):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,i)}}function fe(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const i=H(),l=i.byAttr.get(n);if(E()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(n)&&g(t)){const s=i.byDeclaredAttr.get(n),o=t.getAttribute(n);for(let a=0;a<s.length;a++)j(s[a].spec,o,n,s[a].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const s=i.byReactive.get(n);s&&V(s,t,n,e.oldValue),i.reactiveWildcard.length&&V(i.reactiveWildcard,t,n,e.oldValue)}if(l)for(let s=0;s<l.length;s++){const o=l[s];if(o.handler){o.handler(t,n,e.oldValue);continue}o.onAttributeChange&&t[o.attribute]?o.onAttributeChange(t,n):(A(t,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(t))}}function we(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{fe(t[n])}catch(i){console.error("[ln-core] mutation handler failed",t[n].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function P(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function he(e){const t=P();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const i=t[n];if(i.onSubtreeChange){const l=i.query,s=e.target.nodeType===1?e.target.matches(l)?e.target:e.target.closest(l):e.target.parentElement?e.target.parentElement.closest(l):null;s&&i.onSubtreeChange(s,e)}}for(let n=0;n<e.addedNodes.length;n++){const i=e.addedNodes[n];if(i.nodeType===1)for(let l=0;l<t.length;l++){const s=t[l];A(i,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(i)}}for(let n=0;n<e.removedNodes.length;n++){const i=e.removedNodes[n];if(i.nodeType===1)for(let l=0;l<t.length;l++){const s=t[l],o=s.query,a=Array.from(i.querySelectorAll(o));i.matches&&i.matches(o)&&a.push(i);for(let r=0;r<a.length;r++){const c=a[r];if(!document.contains(c)){const u=c[s.attribute];if(u&&typeof u.destroy=="function")try{u.destroy()}catch(d){console.error("["+s.attribute+"] destroy failed",c,d)}delete c[s.attribute]}}}}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{he(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Q(e,t,n,i,l={}){const s=l.extraAttributes||[],o=l.onAttributeChange||null,a=l.onSubtreeChange||null,r=l.onInit||null,c=l.onAttrChange||null,u=l.effects||null,d=l.attributes||null,f=d?se(d):u,ke=d?new Set(Object.keys(d)):null,Se=l.persist||null;function m(x){const w=x||document.body;if(A(w,e,t,n),d&&E())for(const h in d){const Le=d[h],k=Array.from(w.querySelectorAll("["+h+"]"));w.matches&&w.matches("["+h+"]")&&k.push(w);for(let S=0;S<k.length;S++){const O=k[S];g(O)&&j(Le,O.getAttribute(h),h,i,O)}}r&&r(w)}const _=[];if(e.indexOf("[")!==-1){const x=/\[([\w-]+)/g;let w;for(;(w=x.exec(e))!==null;)_.push(w[1])}else _.push(e);de({selector:e,attribute:t,componentTag:i,attributes:d,ComponentFn:n,onInit:r,observed:_.concat(s),onAttributeChange:o,onAttrChange:c,effects:f,declared:ke,persist:Se}),we();const Oe=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ee=l.subtreeQuery||(Oe?e:"["+e+"]");P().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:a,query:Ee}),pe(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Q);function K(){ce()>0?ue(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",K):K(),m}function J(e){return(e||"").replace(/^#/,"")}function v(e){const t=e===void 0?location.hash:e,n={},i=J(t);if(!i)return n;const l=i.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const a=o.indexOf(":"),r=a>-1?o.slice(0,a):o,c=a>-1?o.slice(a+1):"";if(r)try{n[r]=decodeURIComponent(c)}catch{n[r]=c}}return n}function be(e){if(!e)return null;const t=v();return e in t?t[e]:null}function me(e,t){if(!e)return;const n=v();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");J(location.hash)!==l&&(location.hash=l)}function ge(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ce(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 i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function ye(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ae(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 ve(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function _e(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),i=e.slice(t+1),l=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=v,window.lnCore.hashGet=be,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=ge,window.lnCore.resolveHashNamespace=Ce,window.lnCore.hashSortEncode=ye,window.lnCore.hashSortDecode=Ae,window.lnCore.hashFilterEncode=ve,window.lnCore.hashFilterDecode=_e);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(){const e="data-ln-form",t="lnForm";if(window[t]!==void 0)return;const n={"data-ln-form":{type:"marker",description:"Identifies the form element as an enhanced ln-form"},"data-ln-form-action-edit":{prop:"_actionEdit",type:"string",read:b,fallback:"",description:"URL template or endpoint used when editing an existing record"},"data-ln-form-action-method":{prop:"_actionMethod",type:"enum",values:["PUT","POST","PATCH"],fallback:"PUT",description:"HTTP method used when submitting edit action"}},i=W(n);function l(s){this.dom=s,U(this,s,i),this._baseAction=s.getAttribute("action")||"";const o=this;function a(){const c=o.dom.querySelectorAll('input[type="hidden"]:not([name="_method"])');for(let u=0;u<c.length;u++)c[u].hasAttribute("data-ln-initial-value")||c[u].setAttribute("data-ln-initial-value",c[u].getAttribute("value")||"")}function r(){const c=o.dom.querySelectorAll('input[type="hidden"]:not([name="_method"])');for(let u=0;u<c.length;u++)c[u].value=c[u].getAttribute("data-ln-initial-value")||""}return a(),this._onLnFill=function(c){c.target===o.dom&&(c.detail?(a(),o.fill(c.detail),o._applyActionMode(c.detail)):(o.dom.reset(),r()))},this._onReset=function(){o._applyActionMode(null),r()},s.addEventListener("ln-fill",this._onLnFill),s.addEventListener("reset",this._onReset),this}l.prototype.fill=function(s){const o=L(this.dom,s);for(let a=0;a<o.length;a++){const r=o[a],c=r.tagName==="SELECT"||r.type==="checkbox"||r.type==="radio";r.dispatchEvent(new Event(c?"change":"input",{bubbles:!0}))}},l.prototype._ensureMethodInput=function(){let s=this.dom.querySelector('input[name="_method"]');return s||(s=document.createElement("input"),s.type="hidden",s.name="_method",s.value="",this.dom.appendChild(s)),s},l.prototype._applyActionMode=function(s){if(!this.dom.hasAttribute("data-ln-form-action-edit"))return;const o=s&&s.id!=null&&s.id!==""?s.id:null,a=this._ensureMethodInput();if(o!==null){const r=this._actionEdit;r?this.dom.setAttribute("action",r.replace(":id",encodeURIComponent(o))):this.dom.setAttribute("action",this._baseAction.replace(/\/$/,"")+"/"+encodeURIComponent(o)),a.value=this._actionMethod||"PUT"}else this.dom.setAttribute("action",this._baseAction),a.value=""},l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-fill",this._onLnFill),this.dom.removeEventListener("reset",this._onReset),delete this.dom[t])},Q(e,t,l,"ln-form",{attributes:n})})()})();
1
+ (function(){"use strict";function T(){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 C(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 l=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){l=t[o];break}if(!C(l))return}e.apply(console,t)}}function Y(e,t,i){const l=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const i=!!(t&&t.typed),l=t&&t.exclude,o={},s=e.elements,r={};if(i)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(r[n.name]=(r[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")i&&r[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&o[n.name].push(n.options[a].value)}else if(i&&n.type==="hidden")o[n.name]=n.value;else if(i&&(n.type==="number"||n.type==="range")){const a=Number(n.value);o[n.name]=n.value===""||isNaN(a)?null:a}else o[n.name]=n.value}return o}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function I(e,t){const i=e.elements,l=[],o={};for(let s=0;s<i.length;s++){const r=i[s];r.name&&r.type==="checkbox"&&(o[r.name]=(o[r.name]||0)+1)}for(let s=0;s<i.length;s++){const r=i[s];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const c=r.getAttribute("data-ln-fill-as")||r.name;if(!c||!(c in t))continue;const n=t[c];if(r.type==="checkbox"){if(Array.isArray(n))r.checked=n.indexOf(r.value)!==-1;else if(o[r.name]>1){const a=String(n).split(",").map(function(u){return u.trim()});r.checked=a.indexOf(r.value)!==-1}else r.checked=te(n);l.push(r)}else if(r.type==="radio")r.checked=r.value===String(n),l.push(r);else if(r.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<r.options.length;a++)r.options[a].selected=n.indexOf(r.options[a].value)!==-1;l.push(r)}else r.value=n,r.tagName==="SELECT"&&n!=null&&r.setAttribute("data-ln-value",n),l.push(r)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=I,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const D={};function ne(e,t){D[e]=t}function oe(e){return D[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ne,window.lnCore.getDataMapper=oe);function re(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){Y(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const F={};function ie(e,t){if(!e||typeof t!="object")return;const i=e.toLowerCase().split("-")[0];F[i]=t}function le(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return F[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ie,window.lnCore.getLocaleFallback=le,window.lnCore.ensureLocaleObserver=re);const y={};function se(e,t){y[e]||(y[e]=document.querySelector('[data-ln-template="'+e+'"]'));const i=y[e];return i?i.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function q(e,t){if(!e||!t)return e;const i=e.querySelectorAll("[data-ln-field]");for(let r=0;r<i.length;r++){const c=i[r],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<l.length;r++){const c=l[r],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let r=0;r<o.length;r++){const c=o[r],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const c=s[r],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function ce(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 i=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<i.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[l],t??null),i[l].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)q(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let i=0;i<t.length;i++)t[i].textContent=""}})));function $(e,t){if(!e||!t)return e;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){const s=i.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const l=function(s,r){return t[r]!==void 0?t[r]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const r=o[s],c=r.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&r.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function ae(e,t,i,l,o,s){const r={};for(let n=0;n<e.children.length;n++){const a=e.children[n],u=a.getAttribute("data-ln-render-key");u&&(r[u]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],u=String(l(a));let d=r[u];if(d)o(d,a,n);else{const f=se(i,s);if(!f||($(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,a,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=q,window.lnCore.lnFill=ce,window.lnCore.renderList=ae);function g(e,t,i){const l=e.getAttribute(t);return l===null?i:l}function M(e,t,i){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?i:l}function R(e,t,i=!1){const l=e.getAttribute(t);if(l===null)return!!i;const o=l.trim().toLowerCase();return!(o==="false"||o==="0")}function N(e,t){return(e.getAttribute(t)||"").split(",").map(i=>i.trim()).filter(Boolean)}const A=new Map;function B(e,t){const i=(e?e.join("|"):"")+"::"+t;if(A.has(i))return A.get(i);const l=new Set(e||[]),o=function(s,r){const c=s.getAttribute(r);return c!==null&&l.has(c)?c:t};return A.set(i,o),o}function j(e,t,i){const l=parseFloat(e.getAttribute(t));return isNaN(l)?i:l}function U(e,t,i){const l=e.getAttribute(t);if(!l)return i;try{return JSON.parse(l)}catch{return i}}function W(e,t,i,l,o){if(!e||t===null)return!0;const s=l||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=n=>{o?console.warn(n,o):console.warn(n)};if(r==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${i}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${i}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${i}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function H(e,t,i){for(const l in i){const[o,s,r]=i[l];Object.defineProperty(e,l,{get:function(){return o(t,s,r)},enumerable:!0,configurable:!0})}return e}function V(e){const t={};for(const i in e){const l=e[i];if(!l||!l.prop)continue;let o=l.read;if(!o&&l.type)switch(l.type){case"enum":o=B(l.values,l.fallback);break;case"integer":o=M;break;case"float":o=j;break;case"boolean":o=R;break;case"list":o=N;break;case"json":o=U;break;case"string":default:o=g;break}o||(o=g),t[l.prop]=[o,i,l.fallback]}return t}function ue(e){const t={};for(const i in e){const l=e[i];l&&l.effect&&(t[i]=l.effect)}return Object.keys(t).length?t:null}function de(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const i in e.effects)t.add(i);if(e.onAttrChange&&e.declared)for(const i of e.declared)t.add(i);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=H,window.lnCore.attrSpec=V,window.lnCore.attrStr=g,window.lnCore.attrInt=M,window.lnCore.attrBool=R,window.lnCore.attrList=N,window.lnCore.attrEnum=B,window.lnCore.attrFloat=j,window.lnCore.attrJson=U);function h(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(i){console.error("["+t.attribute+"] init failed",e,i)}}}function P(e,t,i,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:i,ComponentFn:l};if(e.matches&&e.matches(s)&&h(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)h(c[n],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function fe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function we(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 Q(){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 he(e){const t=Q(),i=e.observed||[];for(let l=0;l<i.length;l++){const o=i[l];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const o=t.byDeclaredAttr.get(l);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=de(e);if(l===null)t.reactiveWildcard.push(e);else for(const o of l)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function J(e,t,i,l){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const r=s.effects&&s.effects[i];r?r(t,i,l):s.onAttrChange&&(!s.declared||s.declared.has(i))&&s.onAttrChange(t,i,l)}}function pe(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,l=Q(),o=l.byAttr.get(t),s=T()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!i&&!o&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&C(r)){const c=l.byDeclaredAttr.get(t),n=r.getAttribute(t);for(let a=0;a<c.length;a++)W(c[a].spec,n,t,c[a].componentTag,r)}if(window.lnCore._debugSink&&(i||o)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),i){const c=l.byReactive.get(t);c&&J(c,r,t,e.oldValue),l.reactiveWildcard.length&&J(l.reactiveWildcard,r,t,e.oldValue)}if(o)for(let c=0;c<o.length;c++){const n=o[c];if(n.handler){n.handler(r,t,e.oldValue);continue}n.onAttributeChange&&r[n.attribute]?n.onAttributeChange(r,t):(P(r,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(r))}}}function be(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++)try{pe(t[i])}catch(l){console.error("[ln-core] mutation handler failed",t[i].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function v(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function _(e,t){if(!document.contains(e))if(t.attribute){const i=e[t.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ge(e){const t=v();if(!t.length)return;const i=e.target;if(i){const l=i.nodeType===1?i:i.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let l=0;l<t.length;l++){const o=t[l];if(o.onSubtreeChange&&o.query){const s=o.query,r=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;r&&o.onSubtreeChange(r,e)}}for(let l=0;l<e.addedNodes.length;l++){const o=e.addedNodes[l];if(o.nodeType===1){const s=!!(o.firstElementChild||o.children&&o.children.length);for(let r=0;r<t.length;r++){const c=t[r];if(c.selector&&c.attribute&&c.ComponentFn){if(!s)o.matches&&o.matches(c.query)&&h(o,c);else if(o.matches&&o.matches(c.query)&&h(o,c),o.querySelectorAll){const n=o.querySelectorAll(c.query);for(let a=0;a<n.length;a++)h(n[a],c)}}c.onInit&&c.onInit(o)}}}for(let l=0;l<e.removedNodes.length;l++){const o=e.removedNodes[l];if(o.nodeType===1){const s=!!(o.firstElementChild||o.children&&o.children.length);for(let r=0;r<t.length;r++){const c=t[r],n=c.query;if(n){if(!s)o.matches&&o.matches(n)&&_(o,c);else if(o.matches&&o.matches(n)&&_(o,c),o.querySelectorAll){const a=o.querySelectorAll(n);for(let u=0;u<a.length;u++)_(a[u],c)}}}}}}function K(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++){const l=t[i];if(l.type==="childList")try{ge(l)}catch(o){console.error("[ln-core] lifecycle handler failed",l.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function me(e){v().push(e),K()}function z(e,t,i,l,o={}){const s=o.extraAttributes||[],r=o.onAttributeChange||null,c=o.onSubtreeChange||null,n=o.onInit||null,a=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,f=d?ue(d):u,Le=d?new Set(Object.keys(d)):null,Oe=o.persist||null;function m(S){const w=S||document.body;if(P(w,e,t,i),d&&T())for(const p in d){const De=d[p],E=Array.from(w.querySelectorAll("["+p+"]"));w.matches&&w.matches("["+p+"]")&&E.push(w);for(let L=0;L<E.length;L++){const O=E[L];C(O)&&W(De,O.getAttribute(p),p,l,O)}}n&&n(w)}const k=[];if(e.indexOf("[")!==-1){const S=/\[([\w-]+)/g;let w;for(;(w=S.exec(e))!==null;)k.push(w[1])}else k.push(e);he({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:i,onInit:n,observed:k.concat(s),onAttributeChange:r,onAttrChange:a,effects:f,declared:Le,persist:Oe}),be();const Te=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ie=o.subtreeQuery||(Te?e:"["+e+"]");v().push({selector:e,attribute:t,ComponentFn:i,onInit:n,onSubtreeChange:c,query:Ie}),K(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=me);function X(){fe()>0?we(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),m}function G(e){return(e||"").replace(/^#/,"")}function x(e){const t=e===void 0?location.hash:e,i={},l=G(t);if(!l)return i;const o=l.split("&");for(let s=0;s<o.length;s++){const r=o[s];if(!r)continue;const c=r.indexOf(":"),n=c>-1?r.slice(0,c):r,a=c>-1?r.slice(c+1):"";if(n)try{i[n]=decodeURIComponent(a)}catch{i[n]=a}}return i}function Ce(e){if(!e)return null;const t=x();return e in t?t[e]:null}function ye(e,t){if(!e)return;const i=x();t==null?delete i[e]:i[e]=String(t);const o=Object.keys(i).map(function(s){const r=i[s];return r===""?s:s+":"+encodeURIComponent(r)}).join("&");G(location.hash)!==o&&(location.hash=o)}function Ae(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ve(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const i=e.getAttribute("data-ln-hash");if(i&&i.trim()!=="")return i.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function _e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function xe(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 Se(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const i=e.slice(0,t),l=e.slice(t+1),o=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:i,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=x,window.lnCore.hashGet=Ce,window.lnCore.hashSet=ye,window.lnCore.hashLinkClick=Ae,window.lnCore.resolveHashNamespace=ve,window.lnCore.hashSortEncode=_e,window.lnCore.hashSortDecode=xe,window.lnCore.hashFilterEncode=ke,window.lnCore.hashFilterDecode=Se);function Ee(){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=Ee),(function(){const e="data-ln-form",t="lnForm";if(window[t]!==void 0)return;const i={"data-ln-form":{type:"marker",description:"Identifies the form element as an enhanced ln-form"},"data-ln-form-action-edit":{prop:"_actionEdit",type:"string",read:g,fallback:"",description:"URL template or endpoint used when editing an existing record"},"data-ln-form-action-method":{prop:"_actionMethod",type:"enum",values:["PUT","POST","PATCH"],fallback:"PUT",description:"HTTP method used when submitting edit action"}},l=V(i);function o(s){this.dom=s,H(this,s,l),this._baseAction=s.getAttribute("action")||"";const r=this;function c(){const a=r.dom.querySelectorAll('input[type="hidden"]:not([name="_method"])');for(let u=0;u<a.length;u++)a[u].hasAttribute("data-ln-initial-value")||a[u].setAttribute("data-ln-initial-value",a[u].getAttribute("value")||"")}function n(){const a=r.dom.querySelectorAll('input[type="hidden"]:not([name="_method"])');for(let u=0;u<a.length;u++)a[u].value=a[u].getAttribute("data-ln-initial-value")||""}return c(),this._onLnFill=function(a){a.target===r.dom&&(a.detail?(c(),r.fill(a.detail),r._applyActionMode(a.detail)):(r.dom.reset(),n()))},this._onReset=function(){r._applyActionMode(null),n()},s.addEventListener("ln-fill",this._onLnFill),s.addEventListener("reset",this._onReset),this}o.prototype.fill=function(s){const r=I(this.dom,s);for(let c=0;c<r.length;c++){const n=r[c],a=n.tagName==="SELECT"||n.type==="checkbox"||n.type==="radio";n.dispatchEvent(new Event(a?"change":"input",{bubbles:!0}))}},o.prototype._ensureMethodInput=function(){let s=this.dom.querySelector('input[name="_method"]');return s||(s=document.createElement("input"),s.type="hidden",s.name="_method",s.value="",this.dom.appendChild(s)),s},o.prototype._applyActionMode=function(s){if(!this.dom.hasAttribute("data-ln-form-action-edit"))return;const r=s&&s.id!=null&&s.id!==""?s.id:null,c=this._ensureMethodInput();if(r!==null){const n=this._actionEdit;n?this.dom.setAttribute("action",n.replace(":id",encodeURIComponent(r))):this.dom.setAttribute("action",this._baseAction.replace(/\/$/,"")+"/"+encodeURIComponent(r)),c.value=this._actionMethod||"PUT"}else this.dom.setAttribute("action",this._baseAction),c.value=""},o.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-fill",this._onLnFill),this.dom.removeEventListener("reset",this._onReset),delete this.dom[t])},z(e,t,o,"ln-form",{attributes:i})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";(function(){const h="ln-icon-sprite",a="#ln-icon-",s="#ln-icon-custom-",d=new Set,l=new Set;let c=null;const y=(window.LN_ICON_CDN||"https://cdn.jsdelivr.net/npm/@tabler/icons@3.31.0/icons/outline").replace(/\/$/,""),g=(window.LN_ICON_CUSTOM_CDN||"").replace(/\/$/,""),u="lni:",m="lni:v",w="1";function v(){try{if(localStorage.getItem(m)!==w){for(let t=localStorage.length-1;t>=0;t--){const e=localStorage.key(t);e&&e.indexOf(u)===0&&localStorage.removeItem(e)}localStorage.setItem(m,w)}}catch{}}v();function N(){return c||(c=document.getElementById(h),c||(c=document.createElementNS("http://www.w3.org/2000/svg","svg"),c.id=h,c.setAttribute("hidden",""),c.setAttribute("aria-hidden","true"),c.appendChild(document.createElementNS("http://www.w3.org/2000/svg","defs")),document.body.insertBefore(c,document.body.firstChild))),c}function A(t){return t.indexOf(s)===0?g+"/"+t.slice(s.length)+".svg":y+"/"+t.slice(a.length)+".svg"}function S(t,e){const o=e.match(/viewBox="([^"]+)"/),n=o?o[1]:"0 0 24 24",i=e.match(/<svg[^>]*>([\s\S]*?)<\/svg>/i),I=i?i[1].trim():"",p=e.match(/<svg([^>]*)>/i),O=p?p[1]:"",r=document.createElementNS("http://www.w3.org/2000/svg","symbol");r.id=t,r.setAttribute("viewBox",n),["fill","stroke","stroke-width","stroke-linecap","stroke-linejoin"].forEach(function(_){const b=O.match(new RegExp(_+'="([^"]*)"'));b&&r.setAttribute(_,b[1])}),r.innerHTML=I,N().querySelector("defs").appendChild(r)}function f(t){if(d.has(t)||l.has(t))return;if(t.indexOf(s)===0&&!g){console.warn("[ln-icon] Custom icon requested but no CUSTOM_CDN configured:",t);return}const e=t.slice(1);try{const n=localStorage.getItem(u+e);if(n){S(e,n),d.add(t);return}}catch{}l.add(t);const o=A(t);fetch(o).then(function(n){if(!n.ok)throw new Error(n.status);return n.text()}).then(function(n){S(e,n),d.add(t),l.delete(t);try{localStorage.setItem(u+e,n)}catch{}}).catch(function(n){console.error("[ln-icon] Fetch failed for:",e,n),l.delete(t)})}function C(t){const e='use[href^="'+a+'"], use[href^="'+s+'"]',o=t.querySelectorAll?t.querySelectorAll(e):[];if(t.matches&&t.matches(e)){const n=t.getAttribute("href");n&&f(n)}Array.prototype.forEach.call(o,function(n){const i=n.getAttribute("href");i&&f(i)})}function E(){C(document),new MutationObserver(function(t){t.forEach(function(e){if(e.type==="childList")e.addedNodes.forEach(function(o){o.nodeType===1&&C(o)});else if(e.type==="attributes"&&e.attributeName==="href"){const o=e.target.getAttribute("href");o&&(o.indexOf(a)===0||o.indexOf(s)===0)&&f(o)}})}).observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href"]})}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",E):E()})()})();
1
+ (function(){"use strict";function X(){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 E(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 i=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){i=t[o];break}if(!E(i))return}e.apply(console,t)}}function z(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function m(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){m(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function G(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Q(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,o={},s=e.elements,l={};if(r)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&l[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&o[n.name].push(n.options[a].value)}else if(r&&n.type==="hidden")o[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const a=Number(n.value);o[n.name]=n.value===""||isNaN(a)?null:a}else o[n.name]=n.value}return o}function Y(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Z(e,t){const r=e.elements,i=[],o={};for(let s=0;s<r.length;s++){const l=r[s];l.name&&l.type==="checkbox"&&(o[l.name]=(o[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 n=t[c];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(o[l.name]>1){const a=String(n).split(",").map(function(d){return d.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=Y(n);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<l.options.length;a++)l.options[a].selected=n.indexOf(l.options[a].value)!==-1;i.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Z,window.lnCore.serializeForm=Q,window.lnCore.resolveFormMethod=G);const O={};function ee(e,t){O[e]=t}function te(e){return O[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ee,window.lnCore.getDataMapper=te);function ne(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,m(function(){new MutationObserver(function(){z(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const L={};function re(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];L[r]=t}function oe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return L[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=re,window.lnCore.getLocaleFallback=oe,window.lnCore.ensureLocaleObserver=ne);const A={};function ie(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=A[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(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],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const c=i[l],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const h=d[0].trim(),p=d[1].trim();t[p]!=null&&c.setAttribute(h,t[p])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const c=o[l],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const h=d[0].trim(),p=d[1].trim();p in t&&c.classList.toggle(h,!!t[p])}}return e}function le(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 i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].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)N(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 I(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 i=function(s,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const l=o[s],c=l.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function se(e,t,r,i,o,s){const l={};for(let n=0;n<e.children.length;n++){const a=e.children[n],d=a.getAttribute("data-ln-render-key");d&&(l[d]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],d=String(i(a));let h=l[d];if(h)o(h,a,n);else{const p=ie(r,s);if(!p||(I(p,a),h=p.firstElementChild,!h))continue;h.setAttribute("data-ln-render-key",d),o(h,a,n)}c.appendChild(h)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=I,window.lnCore.fill=N,window.lnCore.lnFill=le,window.lnCore.renderList=se);function v(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function D(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function F(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const o=i.trim().toLowerCase();return!(o==="false"||o==="0")}function $(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const x=new Map;function q(e,t){const r=(e?e.join("|"):"")+"::"+t;if(x.has(r))return x.get(r);const i=new Set(e||[]),o=function(s,l){const c=s.getAttribute(l);return c!==null&&i.has(c)?c:t};return x.set(r,o),o}function M(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function R(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function ce(e,t,r,i,o){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=n=>{o?console.warn(n,o):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.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 n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} 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(n){return c(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function ae(e,t,r){for(const i in r){const[o,s,l]=r[i];Object.defineProperty(e,i,{get:function(){return o(t,s,l)},enumerable:!0,configurable:!0})}return e}function ue(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let o=i.read;if(!o&&i.type)switch(i.type){case"enum":o=q(i.values,i.fallback);break;case"integer":o=D;break;case"float":o=M;break;case"boolean":o=F;break;case"list":o=$;break;case"json":o=R;break;case"string":default:o=v;break}o||(o=v),t[i.prop]=[o,r,i.fallback]}return t}function de(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=ae,window.lnCore.attrSpec=ue,window.lnCore.attrStr=v,window.lnCore.attrInt=D,window.lnCore.attrBool=F,window.lnCore.attrList=$,window.lnCore.attrEnum=q,window.lnCore.attrFloat=M,window.lnCore.attrJson=R);function C(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 fe(e,t,r,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(s)&&C(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)C(c[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function T(){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 we(e){const t=T(),r=e.observed||[];for(let i=0;i<r.length;i++){const o=r[i];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const o=t.byDeclaredAttr.get(i);o.some(s=>s.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=de(e);if(i===null)t.reactiveWildcard.push(e);else for(const o of i)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function B(e,t,r,i){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const l=s.effects&&s.effects[r];l?l(t,r,i):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,i)}}function he(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=T(),o=i.byAttr.get(t),s=X()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!o&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&E(l)){const c=i.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let a=0;a<c.length;a++)ce(c[a].spec,n,t,c[a].componentTag,l)}if(window.lnCore._debugSink&&(r||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const c=i.byReactive.get(t);c&&B(c,l,t,e.oldValue),i.reactiveWildcard.length&&B(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let c=0;c<o.length;c++){const n=o[c];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(fe(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,m(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{he(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function j(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function be(e){const t=j();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}if(e.target)for(let i=0;i<t.length;i++){const o=t[i];if(o.onSubtreeChange&&o.query){const s=o.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;l&&o.onSubtreeChange(l,e)}}for(let i=0;i<e.addedNodes.length;i++){const o=e.addedNodes[i];if(o.nodeType===1){const s=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const c=t[l];if(c.selector&&c.attribute&&c.ComponentFn){if(!s)o.matches&&o.matches(c.query)&&C(o,c);else if(o.matches&&o.matches(c.query)&&C(o,c),o.querySelectorAll){const n=o.querySelectorAll(c.query);for(let a=0;a<n.length;a++)C(n[a],c)}}c.onInit&&c.onInit(o)}}}for(let i=0;i<e.removedNodes.length;i++){const o=e.removedNodes[i];if(o.nodeType===1){const s=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const c=t[l],n=c.query;if(n){if(!s)o.matches&&o.matches(n)&&S(o,c);else if(o.matches&&o.matches(n)&&S(o,c),o.querySelectorAll){const a=o.querySelectorAll(n);for(let d=0;d<a.length;d++)S(a[d],c)}}}}}}function ge(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,m(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{be(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function me(e,t){we({observed:e,handler:t}),pe()}function Ce(e){j().push(e),ge()}function W(e){return(e||"").replace(/^#/,"")}function _(e){const t=e===void 0?location.hash:e,r={},i=W(t);if(!i)return r;const o=i.split("&");for(let s=0;s<o.length;s++){const l=o[s];if(!l)continue;const c=l.indexOf(":"),n=c>-1?l.slice(0,c):l,a=c>-1?l.slice(c+1):"";if(n)try{r[n]=decodeURIComponent(a)}catch{r[n]=a}}return r}function ye(e){if(!e)return null;const t=_();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const r=_();t==null?delete r[e]:r[e]=String(t);const o=Object.keys(r).map(function(s){const l=r[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");W(location.hash)!==o&&(location.hash=o)}function ve(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function xe(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 i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function _e(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 Ee(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),i=e.slice(t+1),o=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=_,window.lnCore.hashGet=ye,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=ve,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=_e,window.lnCore.hashFilterEncode=ke,window.lnCore.hashFilterDecode=Ee);function Oe(){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=Oe),(function(){const e="ln-icon-sprite",t="#ln-icon-",r="#ln-icon-custom-",i=new Set,o=new Set;let s=null;const l=(window.LN_ICON_CDN||"https://cdn.jsdelivr.net/npm/@tabler/icons@3.31.0/icons/outline").replace(/\/$/,""),c=(window.LN_ICON_CUSTOM_CDN||"").replace(/\/$/,""),n="lni:",a="lni:v",d="1";function h(){try{if(localStorage.getItem(a)!==d){for(let u=localStorage.length-1;u>=0;u--){const w=localStorage.key(u);w&&w.indexOf(n)===0&&localStorage.removeItem(w)}localStorage.setItem(a,d)}}catch{}}h();function p(){return s||(s=document.getElementById(e),s||(s=document.createElementNS("http://www.w3.org/2000/svg","svg"),s.id=e,s.setAttribute("hidden",""),s.setAttribute("aria-hidden","true"),s.appendChild(document.createElementNS("http://www.w3.org/2000/svg","defs")),document.body.insertBefore(s,document.body.firstChild))),s}function Le(u){return u.indexOf(r)===0?c+"/"+u.slice(r.length)+".svg":l+"/"+u.slice(t.length)+".svg"}function V(u,w){const b=w.match(/viewBox="([^"]+)"/),f=b?b[1]:"0 0 24 24",g=w.match(/<svg[^>]*>([\s\S]*?)<\/svg>/i),Ne=g?g[1].trim():"",K=w.match(/<svg([^>]*)>/i),Ie=K?K[1]:"",y=document.createElementNS("http://www.w3.org/2000/svg","symbol");y.id=u,y.setAttribute("viewBox",f),["fill","stroke","stroke-width","stroke-linecap","stroke-linejoin"].forEach(function(P){const J=Ie.match(new RegExp(P+'="([^"]*)"'));J&&y.setAttribute(P,J[1])}),y.innerHTML=Ne,p().querySelector("defs").appendChild(y)}function k(u){if(i.has(u)||o.has(u))return;if(u.indexOf(r)===0&&!c){console.warn("[ln-icon] Custom icon requested but no CUSTOM_CDN configured:",u);return}const w=u.slice(1);try{const f=localStorage.getItem(n+w);if(f){V(w,f),i.add(u);return}}catch{}o.add(u);const b=Le(u);fetch(b).then(function(f){if(!f.ok)throw new Error(f.status);return f.text()}).then(function(f){V(w,f),i.add(u),o.delete(u);try{localStorage.setItem(n+w,f)}catch{}}).catch(function(f){console.error("[ln-icon] Fetch failed for:",w,f),o.delete(u)})}function U(u){const w='use[href^="'+t+'"], use[href^="'+r+'"]',b=u.querySelectorAll?u.querySelectorAll(w):[];if(u.matches&&u.matches(w)){const f=u.getAttribute("href");f&&k(f)}Array.prototype.forEach.call(b,function(f){const g=f.getAttribute("href");g&&k(g)})}function H(){U(document),m(function(){Ce({onInit:function(u){U(u)}}),me(["href"],function(u){if((u.tagName?u.tagName.toLowerCase():"")==="use"){const b=u.getAttribute("href");b&&(b.indexOf(t)===0||b.indexOf(r)===0)&&k(b)}})},"ln-icon")}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",H):H()})()})();
@@ -16,6 +16,8 @@
16
16
  // <svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-home"></use></svg>
17
17
  // <svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-custom-file-pdf"></use></svg>
18
18
 
19
+ import { guardBody, observeAttributes, observeLifecycle } from '../../ln-core';
20
+
19
21
  (function () {
20
22
  const SPRITE_ID = 'ln-icon-sprite';
21
23
  const PREFIX_LN = '#ln-icon-';
@@ -143,27 +145,23 @@
143
145
 
144
146
  function _init() {
145
147
  _scan(document);
146
- new MutationObserver(function (mutations) {
147
- mutations.forEach(function (m) {
148
- if (m.type === 'childList') {
149
- m.addedNodes.forEach(function (node) {
150
- if (node.nodeType === 1) _scan(node);
151
- });
152
- } else if (m.type === 'attributes' && m.attributeName === 'href') {
153
- // A <use href="..."> was swapped at runtime (e.g. ln-confirm
154
- // replacing an icon). Trigger a load for the new target.
155
- const h = m.target.getAttribute('href');
148
+ guardBody(function () {
149
+ observeLifecycle({
150
+ onInit: function (node) {
151
+ _scan(node);
152
+ }
153
+ });
154
+
155
+ observeAttributes(['href'], function (el) {
156
+ const tag = el.tagName ? el.tagName.toLowerCase() : '';
157
+ if (tag === 'use') {
158
+ const h = el.getAttribute('href');
156
159
  if (h && (h.indexOf(PREFIX_LN) === 0 || h.indexOf(PREFIX_LNC) === 0)) {
157
160
  _load(h);
158
161
  }
159
162
  }
160
163
  });
161
- }).observe(document.body, {
162
- childList: true,
163
- subtree: true,
164
- attributes: true,
165
- attributeFilter: ['href']
166
- });
164
+ }, 'ln-icon');
167
165
  }
168
166
 
169
167
  if (document.readyState === 'loading') {
@@ -1 +1 @@
1
- (function(){"use strict";function T(){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 C(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 o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!C(o))return}e.apply(console,t)}}function m(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function G(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function X(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&l[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);l[r.name]=r.value===""||isNaN(u)?null:u}else l[r.name]=r.value}return l}function Y(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Z(e,t){const n=e.elements,o=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(r).split(",").map(function(d){return d.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=Y(r);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<i.options.length;u++)i.options[u].selected=r.indexOf(i.options[u].value)!==-1;o.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),o.push(i)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Z,window.lnCore.serializeForm=X,window.lnCore.resolveFormMethod=G);const I={};function ee(e,t){I[e]=t}function te(e){return I[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ee,window.lnCore.getDataMapper=te);function ne(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){m(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function oe(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];$[n]=t}function re(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=oe,window.lnCore.getLocaleFallback=re,window.lnCore.ensureLocaleObserver=ne);const y={};function ie(e,t){y[e]||(y[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=y[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function D(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const d=r[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],r=c.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const d=r[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(a,!!t[f])}}return e}function le(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 o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].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)D(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 F(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(i,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let r=0;r<c.length;r++){const u=c[r];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function se(e,t,n,o,l,s){const i={};for(let r=0;r<e.children.length;r++){const u=e.children[r],d=u.getAttribute("data-ln-render-key");d&&(i[d]=u)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],d=String(o(u));let a=i[d];if(a)l(a,u,r);else{const f=ie(n,s);if(!f||(F(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),l(a,u,r)}c.appendChild(a)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=F,window.lnCore.fill=D,window.lnCore.lnFill=le,window.lnCore.renderList=se);function p(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function M(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function N(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const l=o.trim().toLowerCase();return!(l==="false"||l==="0")}function R(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const A=new Map;function q(e,t){const n=(e?e.join("|"):"")+"::"+t;if(A.has(n))return A.get(n);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return A.set(n,l),l}function B(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function j(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function H(e,t,n,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function W(e,t,n){for(const o in n){const[l,s,i]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function U(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=q(o.values,o.fallback);break;case"integer":l=M;break;case"float":l=B;break;case"boolean":l=N;break;case"list":l=R;break;case"json":l=j;break;case"string":default:l=p;break}l||(l=p),t[o.prop]=[l,n,o.fallback]}return t}function ce(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function ue(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=W,window.lnCore.attrSpec=U,window.lnCore.attrStr=p,window.lnCore.attrInt=M,window.lnCore.attrBool=N,window.lnCore.attrList=R,window.lnCore.attrEnum=q,window.lnCore.attrFloat=B,window.lnCore.attrJson=j);function _(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&i.push(e);for(const c of i)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new o(c)}catch(r){console.error("["+n+"] init failed",c,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function de(){typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=(window.lnCore._bootHolds||0)+1)}function x(){if(typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=Math.max(0,(window.lnCore._bootHolds||0)-1),window.lnCore._bootHolds===0&&window.lnCore._bootQueue)){const e=window.lnCore._bootQueue;window.lnCore._bootQueue=[];for(let t=0;t<e.length;t++)e[t]()}}function ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function fe(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 V(){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 we(e){const t=V(),n=e.observed||[];for(let o=0;o<n.length;o++){const l=n[o];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const l=t.byDeclaredAttr.get(o);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ue(e);if(o===null)t.reactiveWildcard.push(e);else for(const l of o)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function Q(e,t,n,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function he(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=V(),l=o.byAttr.get(n);if(T()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&C(t)){const s=o.byDeclaredAttr.get(n),i=t.getAttribute(n);for(let c=0;c<s.length;c++)H(s[c].spec,i,n,s[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const s=o.byReactive.get(n);s&&Q(s,t,n,e.oldValue),o.reactiveWildcard.length&&Q(o.reactiveWildcard,t,n,e.oldValue)}if(l)for(let s=0;s<l.length;s++){const i=l[s];if(i.handler){i.handler(t,n,e.oldValue);continue}i.onAttributeChange&&t[i.attribute]?i.onAttributeChange(t,n):(_(t,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(t))}}function be(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{he(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function J(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function pe(e){const t=J();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange){const l=o.query,s=e.target.nodeType===1?e.target.matches(l)?e.target:e.target.closest(l):e.target.parentElement?e.target.parentElement.closest(l):null;s&&o.onSubtreeChange(s,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1)for(let l=0;l<t.length;l++){const s=t[l];_(o,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(o)}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1)for(let l=0;l<t.length;l++){const s=t[l],i=s.query,c=Array.from(o.querySelectorAll(i));o.matches&&o.matches(i)&&c.push(o);for(let r=0;r<c.length;r++){const u=c[r];if(!document.contains(u)){const d=u[s.attribute];if(d&&typeof d.destroy=="function")try{d.destroy()}catch(a){console.error("["+s.attribute+"] destroy failed",u,a)}delete u[s.attribute]}}}}}}function ge(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{pe(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function K(e,t,n,o,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,a=l.attributes||null,f=a?ce(a):d,Oe=a?new Set(Object.keys(a)):null,Le=l.persist||null;function g(S){const w=S||document.body;if(_(w,e,t,n),a&&T())for(const h in a){const Ie=a[h],O=Array.from(w.querySelectorAll("["+h+"]"));w.matches&&w.matches("["+h+"]")&&O.push(w);for(let L=0;L<O.length;L++){const E=O[L];C(E)&&H(Ie,E.getAttribute(h),h,o,E)}}r&&r(w)}const k=[];if(e.indexOf("[")!==-1){const S=/\[([\w-]+)/g;let w;for(;(w=S.exec(e))!==null;)k.push(w[1])}else k.push(e);we({selector:e,attribute:t,componentTag:o,attributes:a,ComponentFn:n,onInit:r,observed:k.concat(s),onAttributeChange:i,onAttrChange:u,effects:f,declared:Oe,persist:Le}),be();const Ee=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Te=l.subtreeQuery||(Ee?e:"["+e+"]");J().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:Te}),ge(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=K);function z(){ae()>0?fe(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",z):z(),g}function P(e){return(e||"").replace(/^#/,"")}function v(e){const t=e===void 0?location.hash:e,n={},o=P(t);if(!o)return n;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function Ce(e){if(!e)return null;const t=v();return e in t?t[e]:null}function me(e,t){if(!e)return;const n=v();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");P(location.hash)!==l&&(location.hash=l)}function ye(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ae(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 o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function _e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function xe(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 ve(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function ke(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),l=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=v,window.lnCore.hashGet=Ce,window.lnCore.hashSet=me,window.lnCore.hashLinkClick=ye,window.lnCore.resolveHashNamespace=Ae,window.lnCore.hashSortEncode=_e,window.lnCore.hashSortDecode=xe,window.lnCore.hashFilterEncode=ve,window.lnCore.hashFilterDecode=ke);function Se(){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=Se),(function(){const e="template[data-ln-include]",t="lnInclude";if(window[t]!==void 0)return;const n={"data-ln-include":{prop:"url",read:p,type:"string",fallback:"",description:"URL of external HTML template to fetch and include"}},o=U(n),l=new Map;function s(i){if(this.dom=i,W(this,i,o),this._held=!1,this._destroyed=!1,!this.url)return this;de(),this._held=!0;const c=this,r=this.url;let u=l.get(r);return u||(u=fetch(r).then(function(d){if(!d.ok)throw new Error("HTTP error! status: "+d.status);return d.text()}).catch(function(d){throw l.delete(r),d}),l.set(r,u)),u.then(function(d){if(c._destroyed)return;const a=document.createElement("template");a.innerHTML=d,c.dom.content.appendChild(a.content),m(c.dom,"ln-include:loaded",{target:c.dom,url:c.url}),c._held&&(c._held=!1,x())}).catch(function(d){c._destroyed||(console.error("[ln-include] Failed to fetch template from "+c.url+":",d),m(c.dom,"ln-include:error",{target:c.dom,url:c.url,error:d}),c._held&&(c._held=!1,x()))}),this}s.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._held&&(this._held=!1,x()),delete this.dom[t])},K(e,t,s,"ln-include",{attributes:n})})()})();
1
+ (function(){"use strict";function I(){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(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 i=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){i=t[o];break}if(!m(i))return}e.apply(console,t)}}function y(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,o={},c=e.elements,l={};if(r)for(let s=0;s<c.length;s++){const n=c[s];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let s=0;s<c.length;s++){const n=c[s];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&l[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&o[n.name].push(n.options[u].value)}else if(r&&n.type==="hidden")o[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const u=Number(n.value);o[n.name]=n.value===""||isNaN(u)?null:u}else o[n.name]=n.value}return o}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const r=e.elements,i=[],o={};for(let c=0;c<r.length;c++){const l=r[c];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let c=0;c<r.length;c++){const l=r[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const n=t[s];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(o[l.name]>1){const u=String(n).split(",").map(function(d){return d.trim()});l.checked=u.indexOf(l.value)!==-1}else l.checked=te(n);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<l.options.length;u++)l.options[u].selected=n.indexOf(l.options[u].value)!==-1;i.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const q={};function oe(e,t){q[e]=t}function re(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=re);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){y(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const F={};function le(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];F[r]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return F[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=ie);const A={};function ce(e,t){A[e]||(A[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=A[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let l=0;l<r.length;l++){const s=r[l],n=s.getAttribute("data-ln-field");t[n]!=null&&(s.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const s=i[l],n=s.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&s.setAttribute(a,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const s=o[l],n=s.getAttribute("data-ln-show");n in t&&s.classList.toggle("hidden",!t[n])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const s=c[l],n=s.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const d=n[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&s.classList.toggle(a,!!t[f])}}return e}function ue(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 i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].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)$(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 M(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const c=r.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const i=function(c,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let c=0;c<o.length;c++){const l=o[c],s=l.attributes;for(let n=0;n<s.length;n++){const u=s[n];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function de(e,t,r,i,o,c){const l={};for(let n=0;n<e.children.length;n++){const u=e.children[n],d=u.getAttribute("data-ln-render-key");d&&(l[d]=u)}const s=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],d=String(i(u));let a=l[d];if(a)o(a,u,n);else{const f=ce(r,c);if(!f||(M(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),o(a,u,n)}s.appendChild(a)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=$,window.lnCore.lnFill=ue,window.lnCore.renderList=de);function g(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function N(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function R(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const o=i.trim().toLowerCase();return!(o==="false"||o==="0")}function B(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const _=new Map;function j(e,t){const r=(e?e.join("|"):"")+"::"+t;if(_.has(r))return _.get(r);const i=new Set(e||[]),o=function(c,l){const s=c.getAttribute(l);return s!==null&&i.has(s)?s:t};return _.set(r,o),o}function H(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function W(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function U(e,t,r,i,o){if(!e||t===null)return!0;const c=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=n=>{o?console.warn(n,o):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(s(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(s(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${c}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(s(`[${c}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(s(`[${c}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${c}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return s(`[${c}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function V(e,t,r){for(const i in r){const[o,c,l]=r[i];Object.defineProperty(e,i,{get:function(){return o(t,c,l)},enumerable:!0,configurable:!0})}return e}function Q(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let o=i.read;if(!o&&i.type)switch(i.type){case"enum":o=j(i.values,i.fallback);break;case"integer":o=N;break;case"float":o=H;break;case"boolean":o=R;break;case"list":o=B;break;case"json":o=W;break;case"string":default:o=g;break}o||(o=g),t[i.prop]=[o,r,i.fallback]}return t}function ae(e){const t={};for(const r in e){const i=e[r];i&&i.effect&&(t[r]=i.effect)}return Object.keys(t).length?t:null}function fe(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=V,window.lnCore.attrSpec=Q,window.lnCore.attrStr=g,window.lnCore.attrInt=N,window.lnCore.attrBool=R,window.lnCore.attrList=B,window.lnCore.attrEnum=j,window.lnCore.attrFloat=H,window.lnCore.attrJson=W);function h(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 J(e,t,r,i){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(c)&&h(e,l),e.querySelectorAll){const s=e.querySelectorAll(c);for(let n=0;n<s.length;n++)h(s[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function we(){typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=(window.lnCore._bootHolds||0)+1)}function x(){if(typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=Math.max(0,(window.lnCore._bootHolds||0)-1),window.lnCore._bootHolds===0&&window.lnCore._bootQueue)){const e=window.lnCore._bootQueue;window.lnCore._bootQueue=[];for(let t=0;t<e.length;t++)e[t]()}}function he(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function be(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 K(){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=K(),r=e.observed||[];for(let i=0;i<r.length;i++){const o=r[i];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const o=t.byDeclaredAttr.get(i);o.some(c=>c.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=fe(e);if(i===null)t.reactiveWildcard.push(e);else for(const o of i)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function P(e,t,r,i){for(let o=0;o<e.length;o++){const c=e[o];if(!t[c.attribute])continue;const l=c.effects&&c.effects[r];l?l(t,r,i):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,i)}}function ge(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=K(),o=i.byAttr.get(t),c=I()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!o&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&m(l)){const s=i.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let u=0;u<s.length;u++)U(s[u].spec,n,t,s[u].componentTag,l)}if(window.lnCore._debugSink&&(r||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const s=i.byReactive.get(t);s&&P(s,l,t,e.oldValue),i.reactiveWildcard.length&&P(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const n=o[s];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(J(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{ge(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function v(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function k(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function me(e){const t=v();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}if(e.target)for(let i=0;i<t.length;i++){const o=t[i];if(o.onSubtreeChange&&o.query){const c=o.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(c)?e.target:e.target.closest?e.target.closest(c):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(c):null;l&&o.onSubtreeChange(l,e)}}for(let i=0;i<e.addedNodes.length;i++){const o=e.addedNodes[i];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!c)o.matches&&o.matches(s.query)&&h(o,s);else if(o.matches&&o.matches(s.query)&&h(o,s),o.querySelectorAll){const n=o.querySelectorAll(s.query);for(let u=0;u<n.length;u++)h(n[u],s)}}s.onInit&&s.onInit(o)}}}for(let i=0;i<e.removedNodes.length;i++){const o=e.removedNodes[i];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l],n=s.query;if(n){if(!c)o.matches&&o.matches(n)&&k(o,s);else if(o.matches&&o.matches(n)&&k(o,s),o.querySelectorAll){const u=o.querySelectorAll(n);for(let d=0;d<u.length;d++)k(u[d],s)}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{me(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ye(e){v().push(e),z()}function G(e,t,r,i,o={}){const c=o.extraAttributes||[],l=o.onAttributeChange||null,s=o.onSubtreeChange||null,n=o.onInit||null,u=o.onAttrChange||null,d=o.effects||null,a=o.attributes||null,f=a?ae(a):d,De=a?new Set(Object.keys(a)):null,Te=o.persist||null;function C(E){const w=E||document.body;if(J(w,e,t,r),a&&I())for(const b in a){const Fe=a[b],L=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&L.push(w);for(let D=0;D<L.length;D++){const T=L[D];m(T)&&U(Fe,T.getAttribute(b),b,i,T)}}n&&n(w)}const O=[];if(e.indexOf("[")!==-1){const E=/\[([\w-]+)/g;let w;for(;(w=E.exec(e))!==null;)O.push(w[1])}else O.push(e);pe({selector:e,attribute:t,componentTag:i,attributes:a,ComponentFn:r,onInit:n,observed:O.concat(c),onAttributeChange:l,onAttrChange:u,effects:f,declared:De,persist:Te}),Ce();const Ie=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,qe=o.subtreeQuery||(Ie?e:"["+e+"]");v().push({selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:s,query:qe}),z(),window[t]=C,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=ye);function Y(){he()>0?be(function(){C(document.body)}):C(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Y):Y(),C}function X(e){return(e||"").replace(/^#/,"")}function S(e){const t=e===void 0?location.hash:e,r={},i=X(t);if(!i)return r;const o=i.split("&");for(let c=0;c<o.length;c++){const l=o[c];if(!l)continue;const s=l.indexOf(":"),n=s>-1?l.slice(0,s):l,u=s>-1?l.slice(s+1):"";if(n)try{r[n]=decodeURIComponent(u)}catch{r[n]=u}}return r}function Ae(e){if(!e)return null;const t=S();return e in t?t[e]:null}function _e(e,t){if(!e)return;const r=S();t==null?delete r[e]:r[e]=String(t);const o=Object.keys(r).map(function(c){const l=r[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");X(location.hash)!==o&&(location.hash=o)}function xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ve(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 i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function ke(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Se(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 Oe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ee(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),i=e.slice(t+1),o=i?i.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:r,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=S,window.lnCore.hashGet=Ae,window.lnCore.hashSet=_e,window.lnCore.hashLinkClick=xe,window.lnCore.resolveHashNamespace=ve,window.lnCore.hashSortEncode=ke,window.lnCore.hashSortDecode=Se,window.lnCore.hashFilterEncode=Oe,window.lnCore.hashFilterDecode=Ee);function Le(){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=Le),(function(){const e="template[data-ln-include]",t="lnInclude";if(window[t]!==void 0)return;const r={"data-ln-include":{prop:"url",read:g,type:"string",fallback:"",description:"URL of external HTML template to fetch and include"}},i=Q(r),o=new Map;function c(l){if(this.dom=l,V(this,l,i),this._held=!1,this._destroyed=!1,!this.url)return this;we(),this._held=!0;const s=this,n=this.url;let u=o.get(n);return u||(u=fetch(n).then(function(d){if(!d.ok)throw new Error("HTTP error! status: "+d.status);return d.text()}).catch(function(d){throw o.delete(n),d}),o.set(n,u)),u.then(function(d){if(s._destroyed)return;const a=document.createElement("template");a.innerHTML=d,s.dom.content.appendChild(a.content),y(s.dom,"ln-include:loaded",{target:s.dom,url:s.url}),s._held&&(s._held=!1,x())}).catch(function(d){s._destroyed||(console.error("[ln-include] Failed to fetch template from "+s.url+":",d),y(s.dom,"ln-include:error",{target:s.dom,url:s.url,error:d}),s._held&&(s._held=!1,x()))}),this}c.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._held&&(this._held=!1,x()),delete this.dom[t])},G(e,t,c,"ln-include",{attributes:r})})()})();