@livenetworks/ashlar 2.1.0 → 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 (55) 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-api-connector/ln-api-connector.js +1 -1
  4. package/components/ln-api-queue/ln-api-queue.js +1 -1
  5. package/components/ln-autoresize/ln-autoresize.js +1 -1
  6. package/components/ln-autosave/ln-autosave.js +1 -1
  7. package/components/ln-chart/ln-chart.js +1 -1
  8. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  9. package/components/ln-confirm/ln-confirm.js +1 -1
  10. package/components/ln-core/lifecycle.js +9 -0
  11. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  12. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  13. package/components/ln-data-store/ln-data-store.js +1 -1
  14. package/components/ln-date/ln-date.js +1 -1
  15. package/components/ln-debug/ln-debug.js +1 -1
  16. package/components/ln-dropdown/ln-dropdown.js +1 -1
  17. package/components/ln-editor/ln-editor.js +1 -1
  18. package/components/ln-editor/src/ln-editor.js +45 -12
  19. package/components/ln-external-links/ln-external-links.js +1 -1
  20. package/components/ln-filter/ln-filter.js +1 -1
  21. package/components/ln-form/ln-form.js +1 -1
  22. package/components/ln-icon/ln-icon.js +1 -1
  23. package/components/ln-include/ln-include.js +1 -1
  24. package/components/ln-key/ln-key.js +1 -1
  25. package/components/ln-link/ln-link.js +1 -1
  26. package/components/ln-list/ln-list.js +1 -1
  27. package/components/ln-modal/ln-modal.js +1 -1
  28. package/components/ln-nav/ln-nav.js +1 -1
  29. package/components/ln-number/ln-number.js +1 -1
  30. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  31. package/components/ln-options/ln-options.js +1 -1
  32. package/components/ln-picklist/ln-picklist.js +1 -1
  33. package/components/ln-popover/ln-popover.js +1 -1
  34. package/components/ln-progress/ln-progress.js +1 -1
  35. package/components/ln-router/ln-router.js +1 -1
  36. package/components/ln-scroll/ln-scroll.js +1 -1
  37. package/components/ln-search/ln-search.js +1 -1
  38. package/components/ln-slug/ln-slug.js +1 -1
  39. package/components/ln-sort/ln-sort.js +1 -1
  40. package/components/ln-sortable/ln-sortable.js +1 -1
  41. package/components/ln-stat/ln-stat.js +1 -1
  42. package/components/ln-table/ln-table.js +1 -1
  43. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  44. package/components/ln-tabs/ln-tabs.js +1 -1
  45. package/components/ln-time/ln-time.js +1 -1
  46. package/components/ln-toast/ln-toast.js +1 -1
  47. package/components/ln-toggle/ln-toggle.js +1 -1
  48. package/components/ln-tooltip/ln-tooltip.js +1 -1
  49. package/components/ln-translations/ln-translations.js +1 -1
  50. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  51. package/components/ln-upload/ln-upload.js +1 -1
  52. package/components/ln-validate/ln-validate.js +1 -1
  53. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  54. package/package.json +1 -1
  55. package/web-types.json +1 -1
@@ -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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!C(n))return}e.apply(console,t)}}function Y(e,t,i){const n=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}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),n=t&&t.exclude,l={},s=e.elements,r={};if(i)for(let c=0;c<s.length;c++){const o=s[c];o.name&&o.type==="checkbox"&&!o.disabled&&(r[o.name]=(r[o.name]||0)+1)}for(let c=0;c<s.length;c++){const o=s[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")i&&r[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let a=0;a<o.options.length;a++)o.options[a].selected&&l[o.name].push(o.options[a].value)}else if(i&&o.type==="hidden")l[o.name]=o.value;else if(i&&(o.type==="number"||o.type==="range")){const a=Number(o.value);l[o.name]=o.value===""||isNaN(a)?null:a}else l[o.name]=o.value}return l}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,n=[],l={};for(let s=0;s<i.length;s++){const r=i[s];r.name&&r.type==="checkbox"&&(l[r.name]=(l[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 o=t[c];if(r.type==="checkbox"){if(Array.isArray(o))r.checked=o.indexOf(r.value)!==-1;else if(l[r.name]>1){const a=String(o).split(",").map(function(u){return u.trim()});r.checked=a.indexOf(r.value)!==-1}else r.checked=te(o);n.push(r)}else if(r.type==="radio")r.checked=r.value===String(o),n.push(r);else if(r.type==="select-multiple"){if(Array.isArray(o))for(let a=0;a<r.options.length;a++)r.options[a].selected=o.indexOf(r.options[a].value)!==-1;n.push(r)}else r.value=o,r.tagName==="SELECT"&&o!=null&&r.setAttribute("data-ln-value",o),n.push(r)}return n}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],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<n.length;r++){const c=n[r],o=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<o.length;a++){const u=o[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 l=e.querySelectorAll("[data-ln-show]");for(let r=0;r<l.length;r++){const c=l[r],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let r=0;r<s.length;r++){const c=s[r],o=c.getAttribute("data-ln-class").split(",");for(let a=0;a<o.length;a++){const u=o[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 n=0;n<i.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[n],t??null),i[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)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 n=function(s,r){return t[r]!==void 0?t[r]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const r=l[s],c=r.attributes;for(let o=0;o<c.length;o++){const a=c[o];a.value.indexOf("{{")!==-1&&r.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function ae(e,t,i,n,l,s){const r={};for(let o=0;o<e.children.length;o++){const a=e.children[o],u=a.getAttribute("data-ln-render-key");u&&(r[u]=a)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const a=t[o],u=String(n(a));let d=r[u];if(d)l(d,a,o);else{const f=se(i,s);if(!f||($(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,a,o)}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 m(e,t,i){const n=e.getAttribute(t);return n===null?i:n}function M(e,t,i){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?i:n}function R(e,t,i=!1){const n=e.getAttribute(t);if(n===null)return!!i;const l=n.trim().toLowerCase();return!(l==="false"||l==="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 n=new Set(e||[]),l=function(s,r){const c=s.getAttribute(r);return c!==null&&n.has(c)?c:t};return A.set(i,l),l}function j(e,t,i){const n=parseFloat(e.getAttribute(t));return isNaN(n)?i:n}function U(e,t,i){const n=e.getAttribute(t);if(!n)return i;try{return JSON.parse(n)}catch{return i}}function W(e,t,i,n,l){if(!e||t===null)return!0;const s=n||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=o=>{l?console.warn(o,l):console.warn(o)};if(r==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${i}". Allowed: ${o.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 o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} 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(o){return c(`[${s}] Invalid JSON for attribute "${i}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function H(e,t,i){for(const n in i){const[l,s,r]=i[n];Object.defineProperty(e,n,{get:function(){return l(t,s,r)},enumerable:!0,configurable:!0})}return e}function V(e){const t={};for(const i in e){const n=e[i];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=B(n.values,n.fallback);break;case"integer":l=M;break;case"float":l=j;break;case"boolean":l=R;break;case"list":l=N;break;case"json":l=U;break;case"string":default:l=m;break}l||(l=m),t[n.prop]=[l,i,n.fallback]}return t}function ue(e){const t={};for(const i in e){const n=e[i];n&&n.effect&&(t[i]=n.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=m,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,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:i,ComponentFn:n};if(e.matches&&e.matches(s)&&h(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let o=0;o<c.length;o++)h(c[o],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 n=0;n<i.length;n++){const l=i[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=de(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function J(e,t,i,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const r=s.effects&&s.effects[i];r?r(t,i,n):s.onAttrChange&&(!s.declared||s.declared.has(i))&&s.onAttrChange(t,i,n)}}function pe(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,n=Q(),l=n.byAttr.get(t),s=T()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!i&&!l&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&C(r)){const c=n.byDeclaredAttr.get(t),o=r.getAttribute(t);for(let a=0;a<c.length;a++)W(c[a].spec,o,t,c[a].componentTag,r)}if(window.lnCore._debugSink&&(i||l)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),i){const c=n.byReactive.get(t);c&&J(c,r,t,e.oldValue),n.reactiveWildcard.length&&J(n.reactiveWildcard,r,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const o=l[c];if(o.handler){o.handler(r,t,e.oldValue);continue}o.onAttributeChange&&r[o.attribute]?o.onAttributeChange(r,t):(P(r,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.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(n){console.error("[ln-core] mutation handler failed",t[i].target,n)}}).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(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function me(e){const t=v();if(t.length){if(e.target)for(let i=0;i<t.length;i++){const n=t[i];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let i=0;i<e.addedNodes.length;i++){const n=e.addedNodes[i];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const r=t[s];if(r.selector&&r.attribute&&r.ComponentFn){if(!l)n.matches&&n.matches(r.query)&&h(n,r);else if(n.matches&&n.matches(r.query)&&h(n,r),n.querySelectorAll){const c=n.querySelectorAll(r.query);for(let o=0;o<c.length;o++)h(c[o],r)}}r.onInit&&r.onInit(n)}}}for(let i=0;i<e.removedNodes.length;i++){const n=e.removedNodes[i];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const r=t[s],c=r.query;if(c){if(!l)n.matches&&n.matches(c)&&_(n,r);else if(n.matches&&n.matches(c)&&_(n,r),n.querySelectorAll){const o=n.querySelectorAll(c);for(let a=0;a<o.length;a++)_(o[a],r)}}}}}}}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 n=t[i];if(n.type==="childList")try{me(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ge(e){v().push(e),K()}function z(e,t,i,n,l={}){const s=l.extraAttributes||[],r=l.onAttributeChange||null,c=l.onSubtreeChange||null,o=l.onInit||null,a=l.onAttrChange||null,u=l.effects||null,d=l.attributes||null,f=d?ue(d):u,Le=d?new Set(Object.keys(d)):null,Oe=l.persist||null;function g(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,n,O)}}o&&o(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:n,attributes:d,ComponentFn:i,onInit:o,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=l.subtreeQuery||(Te?e:"["+e+"]");v().push({selector:e,attribute:t,ComponentFn:i,onInit:o,onSubtreeChange:c,query:Ie}),K(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=ge);function X(){fe()>0?we(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),g}function G(e){return(e||"").replace(/^#/,"")}function x(e){const t=e===void 0?location.hash:e,i={},n=G(t);if(!n)return i;const l=n.split("&");for(let s=0;s<l.length;s++){const r=l[s];if(!r)continue;const c=r.indexOf(":"),o=c>-1?r.slice(0,c):r,a=c>-1?r.slice(c+1):"";if(o)try{i[o]=decodeURIComponent(a)}catch{i[o]=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 l=Object.keys(i).map(function(s){const r=i[s];return r===""?s:s+":"+encodeURIComponent(r)}).join("&");G(location.hash)!==l&&(location.hash=l)}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 n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function _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),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:i,values:l}}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:m,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"}},n=V(i);function l(s){this.dom=s,H(this,s,n),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 o(){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(),o()))},this._onReset=function(){r._applyActionMode(null),o()},s.addEventListener("ln-fill",this._onLnFill),s.addEventListener("reset",this._onReset),this}l.prototype.fill=function(s){const r=I(this.dom,s);for(let c=0;c<r.length;c++){const o=r[c],a=o.tagName==="SELECT"||o.type==="checkbox"||o.type==="radio";o.dispatchEvent(new Event(a?"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 r=s&&s.id!=null&&s.id!==""?s.id:null,c=this._ensureMethodInput();if(r!==null){const o=this._actionEdit;o?this.dom.setAttribute("action",o.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=""},l.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,l,"ln-form",{attributes:i})})()})();
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 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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!E(n))return}e.apply(console,t)}}function z(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function 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),n=t&&t.exclude,l={},s=e.elements,i={};if(r)for(let c=0;c<s.length;c++){const o=s[c];o.name&&o.type==="checkbox"&&!o.disabled&&(i[o.name]=(i[o.name]||0)+1)}for(let c=0;c<s.length;c++){const o=s[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")r&&i[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let a=0;a<o.options.length;a++)o.options[a].selected&&l[o.name].push(o.options[a].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const a=Number(o.value);l[o.name]=o.value===""||isNaN(a)?null:a}else l[o.name]=o.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 r=e.elements,n=[],l={};for(let s=0;s<r.length;s++){const i=r[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<r.length;s++){const i=r[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 o=t[c];if(i.type==="checkbox"){if(Array.isArray(o))i.checked=o.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(o).split(",").map(function(d){return d.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=Y(o);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(o),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(o))for(let a=0;a<i.options.length;a++)i.options[a].selected=o.indexOf(i.options[a].value)!==-1;n.push(i)}else i.value=o,i.tagName==="SELECT"&&o!=null&&i.setAttribute("data-ln-value",o),n.push(i)}return n}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 i=0;i<r.length;i++){const c=r[i],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const c=n[i],o=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<o.length;a++){const d=o[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 l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],o=c.getAttribute("data-ln-class").split(",");for(let a=0;a<o.length;a++){const d=o[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 n=0;n<r.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[n],t??null),r[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)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(i,c){return t[c]!==void 0?t[c]:""}))}const n=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 o=0;o<c.length;o++){const a=c[o];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function se(e,t,r,n,l,s){const i={};for(let o=0;o<e.children.length;o++){const a=e.children[o],d=a.getAttribute("data-ln-render-key");d&&(i[d]=a)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const a=t[o],d=String(n(a));let h=i[d];if(h)l(h,a,o);else{const p=ie(r,s);if(!p||(I(p,a),h=p.firstElementChild,!h))continue;h.setAttribute("data-ln-render-key",d),l(h,a,o)}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 n=e.getAttribute(t);return n===null?r:n}function D(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function F(e,t,r=!1){const n=e.getAttribute(t);if(n===null)return!!r;const l=n.trim().toLowerCase();return!(l==="false"||l==="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 n=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&n.has(c)?c:t};return x.set(r,l),l}function M(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function R(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function ce(e,t,r,n,l){if(!e||t===null)return!0;const s=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=o=>{l?console.warn(o,l):console.warn(o)};if(i==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${s}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function ae(e,t,r){for(const n in r){const[l,s,i]=r[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function ue(e){const t={};for(const r in e){const n=e[r];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=q(n.values,n.fallback);break;case"integer":l=D;break;case"float":l=M;break;case"boolean":l=F;break;case"list":l=$;break;case"json":l=R;break;case"string":default:l=v;break}l||(l=v),t[n.prop]=[l,r,n.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,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(s)&&C(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let o=0;o<c.length;o++)C(c[o],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function B(){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=B(),r=e.observed||[];for(let n=0;n<r.length;n++){const l=r[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=de(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function T(e,t,r,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[r];i?i(t,r,n):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,n)}}function he(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=B(),l=n.byAttr.get(t),s=X()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&E(i)){const c=n.byDeclaredAttr.get(t),o=i.getAttribute(t);for(let a=0;a<c.length;a++)ce(c[a].spec,o,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const c=n.byReactive.get(t);c&&T(c,i,t,e.oldValue),n.reactiveWildcard.length&&T(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const o=l[c];if(o.handler){o.handler(i,t,e.oldValue);continue}o.onAttributeChange&&i[o.attribute]?o.onAttributeChange(i,t):(fe(i,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(i))}}}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(n){console.error("[ln-core] mutation handler failed",t[r].target,n)}}).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(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function be(e){const t=j();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const n=t[r];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let r=0;r<e.addedNodes.length;r++){const n=e.addedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&C(n,i);else if(n.matches&&n.matches(i.query)&&C(n,i),n.querySelectorAll){const c=n.querySelectorAll(i.query);for(let o=0;o<c.length;o++)C(c[o],i)}}i.onInit&&i.onInit(n)}}}for(let r=0;r<e.removedNodes.length;r++){const n=e.removedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],c=i.query;if(c){if(!l)n.matches&&n.matches(c)&&S(n,i);else if(n.matches&&n.matches(c)&&S(n,i),n.querySelectorAll){const o=n.querySelectorAll(c);for(let a=0;a<o.length;a++)S(o[a],i)}}}}}}}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 n=t[r];if(n.type==="childList")try{be(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).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={},n=W(t);if(!n)return r;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),o=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(o)try{r[o]=decodeURIComponent(a)}catch{r[o]=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 l=Object.keys(r).map(function(s){const i=r[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");W(location.hash)!==l&&(location.hash=l)}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 n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function 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),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}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-",n=new Set,l=new Set;let s=null;const i=(window.LN_ICON_CDN||"https://cdn.jsdelivr.net/npm/@tabler/icons@3.31.0/icons/outline").replace(/\/$/,""),c=(window.LN_ICON_CUSTOM_CDN||"").replace(/\/$/,""),o="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(o)===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":i+"/"+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(n.has(u)||l.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(o+w);if(f){V(w,f),n.add(u);return}}catch{}l.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),n.add(u),l.delete(u);try{localStorage.setItem(o+w,f)}catch{}}).catch(function(f){console.error("[ln-icon] Fetch failed for:",w,f),l.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()})()})();
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()})()})();
@@ -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 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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!m(n))return}e.apply(console,t)}}function y(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}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 o=!!(t&&t.typed),n=t&&t.exclude,l={},c=e.elements,i={};if(o)for(let s=0;s<c.length;s++){const r=c[s];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let s=0;s<c.length;s++){const r=c[s];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(n&&r.matches&&r.matches(n)))if(r.type==="checkbox")o&&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(o&&r.type==="hidden")l[r.name]=r.value;else if(o&&(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 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 o=e.elements,n=[],l={};for(let c=0;c<o.length;c++){const i=o[c];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let c=0;c<o.length;c++){const i=o[c];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const s=i.getAttribute("data-ln-fill-as")||i.name;if(!s||!(s in t))continue;const r=t[s];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=te(r);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),n.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;n.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),n.push(i)}return n}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 o=e.toLowerCase().split("-")[0];F[o]=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 o=A[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const s=o[i],r=s.getAttribute("data-ln-field");t[r]!=null&&(s.textContent=t[r])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const s=n[i],r=s.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&&s.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const s=l[i],r=s.getAttribute("data-ln-show");r in t&&s.classList.toggle("hidden",!t[r])}const c=e.querySelectorAll("[data-ln-class]");for(let i=0;i<c.length;i++){const s=c[i],r=s.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&&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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function M(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const c=o.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,s){return t[s]!==void 0?t[s]:""}))}const n=function(c,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let c=0;c<l.length;c++){const i=l[c],s=i.attributes;for(let r=0;r<s.length;r++){const u=s[r];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function de(e,t,o,n,l,c){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 s=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],d=String(n(u));let a=i[d];if(a)l(a,u,r);else{const f=ce(o,c);if(!f||(M(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),l(a,u,r)}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,o){const n=e.getAttribute(t);return n===null?o:n}function N(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function R(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function B(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const _=new Map;function j(e,t){const o=(e?e.join("|"):"")+"::"+t;if(_.has(o))return _.get(o);const n=new Set(e||[]),l=function(c,i){const s=c.getAttribute(i);return s!==null&&n.has(s)?s:t};return _.set(o,l),l}function H(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function W(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function U(e,t,o,n,l){if(!e||t===null)return!0;const c=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const s=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"?(s(`[${c}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(s(`[${c}] Invalid value "${t}" for attribute "${o}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return s(`[${c}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(s(`[${c}] Value ${r} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(s(`[${c}] Value ${r} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(s(`[${c}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return s(`[${c}] Invalid JSON for attribute "${o}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function V(e,t,o){for(const n in o){const[l,c,i]=o[n];Object.defineProperty(e,n,{get:function(){return l(t,c,i)},enumerable:!0,configurable:!0})}return e}function Q(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=j(n.values,n.fallback);break;case"integer":l=N;break;case"float":l=H;break;case"boolean":l=R;break;case"list":l=B;break;case"json":l=W;break;case"string":default:l=g;break}l||(l=g),t[n.prop]=[l,o,n.fallback]}return t}function ae(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.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 o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);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(o){console.error("["+t.attribute+"] init failed",e,o)}}}function J(e,t,o,n){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(c)&&h(e,i),e.querySelectorAll){const s=e.querySelectorAll(c);for(let r=0;r<s.length;r++)h(s[r],i)}}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(),o=e.observed||[];for(let n=0;n<o.length;n++){const l=o[n];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 n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(c=>c.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=fe(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function P(e,t,o,n){for(let l=0;l<e.length;l++){const c=e[l];if(!t[c.attribute])continue;const i=c.effects&&c.effects[o];i?i(t,o,n):c.onAttrChange&&(!c.declared||c.declared.has(o))&&c.onAttrChange(t,o,n)}}function ge(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=K(),l=n.byAttr.get(t),c=T()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!l&&!c)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(c&&m(i)){const s=n.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let u=0;u<s.length;u++)U(s[u].spec,r,t,s[u].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const s=n.byReactive.get(t);s&&P(s,i,t,e.oldValue),n.reactiveWildcard.length&&P(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let s=0;s<l.length;s++){const r=l[s];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(J(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{ge(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).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 o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function me(e){const t=v();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const l=n.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;c&&n.onSubtreeChange(c,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let c=0;c<t.length;c++){const i=t[c];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&h(n,i);else if(n.matches&&n.matches(i.query)&&h(n,i),n.querySelectorAll){const s=n.querySelectorAll(i.query);for(let r=0;r<s.length;r++)h(s[r],i)}}i.onInit&&i.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let c=0;c<t.length;c++){const i=t[c],s=i.query;if(s){if(!l)n.matches&&n.matches(s)&&k(n,i);else if(n.matches&&n.matches(s)&&k(n,i),n.querySelectorAll){const r=n.querySelectorAll(s);for(let u=0;u<r.length;u++)k(r[u],i)}}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{me(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ye(e){v().push(e),z()}function G(e,t,o,n,l={}){const c=l.extraAttributes||[],i=l.onAttributeChange||null,s=l.onSubtreeChange||null,r=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,a=l.attributes||null,f=a?ae(a):d,De=a?new Set(Object.keys(a)):null,Ie=l.persist||null;function C(L){const w=L||document.body;if(J(w,e,t,o),a&&T())for(const b in a){const Fe=a[b],E=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&E.push(w);for(let D=0;D<E.length;D++){const I=E[D];m(I)&&U(Fe,I.getAttribute(b),b,n,I)}}r&&r(w)}const O=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let w;for(;(w=L.exec(e))!==null;)O.push(w[1])}else O.push(e);pe({selector:e,attribute:t,componentTag:n,attributes:a,ComponentFn:o,onInit:r,observed:O.concat(c),onAttributeChange:i,onAttrChange:u,effects:f,declared:De,persist:Ie}),Ce();const Te=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,qe=l.subtreeQuery||(Te?e:"["+e+"]");v().push({selector:e,attribute:t,ComponentFn:o,onInit:r,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,o={},n=X(t);if(!n)return o;const l=n.split("&");for(let c=0;c<l.length;c++){const i=l[c];if(!i)continue;const s=i.indexOf(":"),r=s>-1?i.slice(0,s):i,u=s>-1?i.slice(s+1):"";if(r)try{o[r]=decodeURIComponent(u)}catch{o[r]=u}}return o}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 o=S();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(c){const i=o[c];return i===""?c:c+":"+encodeURIComponent(i)}).join("&");X(location.hash)!==l&&(location.hash=l)}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 o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function 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 Le(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:o,values:l}}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=Le);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="template[data-ln-include]",t="lnInclude";if(window[t]!==void 0)return;const o={"data-ln-include":{prop:"url",read:g,type:"string",fallback:"",description:"URL of external HTML template to fetch and include"}},n=Q(o),l=new Map;function c(i){if(this.dom=i,V(this,i,n),this._held=!1,this._destroyed=!1,!this.url)return this;we(),this._held=!0;const s=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(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:o})})()})();
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})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function W(){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 R(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 l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){r=t[l];break}if(!R(r))return}e.apply(console,t)}}function V(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 ue(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(l),l}function S(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){S(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ae(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function fe(e){if(!e)return!1;if(typeof e.closest=="function")return!!e.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])');const t=String(e.tagName||"").toLowerCase();return t==="input"||t==="textarea"||t==="select"||!!e.isContentEditable}function de(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function we(e,t){return!e||!document.contains(e)||de(e)||t&&typeof e[t]!="function"?!1:ae(e)}function he(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function pe(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,l={},s=e.elements,o={};if(n)for(let c=0;c<s.length;c++){const i=s[c];i.name&&i.type==="checkbox"&&!i.disabled&&(o[i.name]=(o[i.name]||0)+1)}for(let c=0;c<s.length;c++){const i=s[c];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(r&&i.matches&&i.matches(r)))if(i.type==="checkbox")n&&o[i.name]===1?l[i.name]=i.checked:(l[i.name]||(l[i.name]=[]),i.checked&&l[i.name].push(i.value));else if(i.type==="radio")i.checked&&(l[i.name]=i.value);else if(i.type==="select-multiple"){l[i.name]=[];for(let u=0;u<i.options.length;u++)i.options[u].selected&&l[i.name].push(i.options[u].value)}else if(n&&i.type==="hidden")l[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const u=Number(i.value);l[i.name]=i.value===""||isNaN(u)?null:u}else l[i.name]=i.value}return l}function be(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ge(e,t){const n=e.elements,r=[],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 c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const i=t[c];if(o.type==="checkbox"){if(Array.isArray(i))o.checked=i.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(i).split(",").map(function(d){return d.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=be(i);r.push(o)}else if(o.type==="radio")o.checked=o.value===String(i),r.push(o);else if(o.type==="select-multiple"){if(Array.isArray(i))for(let u=0;u<o.options.length;u++)o.options[u].selected=i.indexOf(o.options[u].value)!==-1;r.push(o)}else o.value=i,o.tagName==="SELECT"&&i!=null&&o.setAttribute("data-ln-value",i),r.push(o)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ge,window.lnCore.serializeForm=pe,window.lnCore.resolveFormMethod=he);const H={};function ye(e,t){H[e]=t}function me(e){return H[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ye,window.lnCore.getDataMapper=me);function Ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,S(function(){new MutationObserver(function(){V(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const P={};function Ae(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];P[n]=t}function ke(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=Ae,window.lnCore.getLocaleFallback=ke,window.lnCore.ensureLocaleObserver=Ce);const F={};function xe(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const c=n[o],i=c.getAttribute("data-ln-field");t[i]!=null&&(c.textContent=t[i])}const r=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<r.length;o++){const c=r[o],i=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<i.length;u++){const d=i[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();t[h]!=null&&c.setAttribute(f,t[h])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const c=l[o],i=c.getAttribute("data-ln-show");i in t&&c.classList.toggle("hidden",!t[i])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],i=c.getAttribute("data-ln-class").split(",");for(let u=0;u<i.length;u++){const d=i[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();h in t&&c.classList.toggle(f,!!t[h])}}return e}function Se(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Q(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,c){return t[c]!==void 0?t[c]:""}))}const r=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],c=o.attributes;for(let i=0;i<c.length;i++){const u=c[i];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function _e(e,t,n,r,l,s){const o={};for(let i=0;i<e.children.length;i++){const u=e.children[i],d=u.getAttribute("data-ln-render-key");d&&(o[d]=u)}const c=document.createDocumentFragment();for(let i=0;i<t.length;i++){const u=t[i],d=String(r(u));let f=o[d];if(f)l(f,u,i);else{const h=xe(n,s);if(!h||(Q(h,u),f=h.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),l(f,u,i)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=z,window.lnCore.lnFill=Se,window.lnCore.renderList=_e);function q(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function J(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function G(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const l=r.trim().toLowerCase();return!(l==="false"||l==="0")}function X(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const M=new Map;function Y(e,t){const n=(e?e.join("|"):"")+"::"+t;if(M.has(n))return M.get(n);const r=new Set(e||[]),l=function(s,o){const c=s.getAttribute(o);return c!==null&&r.has(c)?c:t};return M.set(n,l),l}function Z(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ee(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function te(e,t,n,r,l){if(!e||t===null)return!0;const s=r||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=i=>{l?console.warn(i,l):console.warn(i)};if(o==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const i=e.values||[];return i.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(c(`[${s}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(c(`[${s}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(i){return c(`[${s}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,n){for(const r in n){const[l,s,o]=n[r];Object.defineProperty(e,r,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function Ee(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let l=r.read;if(!l&&r.type)switch(r.type){case"enum":l=Y(r.values,r.fallback);break;case"integer":l=J;break;case"float":l=Z;break;case"boolean":l=G;break;case"list":l=X;break;case"json":l=ee;break;case"string":default:l=q;break}l||(l=q),t[r.prop]=[l,n,r.fallback]}return t}function Te(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 Oe(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=ve,window.lnCore.attrSpec=Ee,window.lnCore.attrStr=q,window.lnCore.attrInt=J,window.lnCore.attrBool=G,window.lnCore.attrList=X,window.lnCore.attrEnum=Y,window.lnCore.attrFloat=Z,window.lnCore.attrJson=ee);function k(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function ne(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&k(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let i=0;i<c.length;i++)k(c[i],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function De(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 re(){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 Ie(e){const t=re(),n=e.observed||[];for(let r=0;r<n.length;r++){const l=n[r];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 r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const l=t.byDeclaredAttr.get(r);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Oe(e);if(r===null)t.reactiveWildcard.push(e);else for(const l of r)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function oe(e,t,n,r){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,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Re(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=re(),l=r.byAttr.get(t),s=W()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&R(o)){const c=r.byDeclaredAttr.get(t),i=o.getAttribute(t);for(let u=0;u<c.length;u++)te(c[u].spec,i,t,c[u].componentTag,o)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&oe(c,o,t,e.oldValue),r.reactiveWildcard.length&&oe(r.reactiveWildcard,o,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const i=l[c];if(i.handler){i.handler(o,t,e.oldValue);continue}i.onAttributeChange&&o[i.attribute]?i.onAttributeChange(o,t):(ne(o,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(o))}}}function Fe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,S(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Re(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function B(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function qe(e){const t=$();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange&&r.query){const l=r.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&r.onSubtreeChange(s,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1){const l=!!(r.firstElementChild||r.children&&r.children.length);for(let s=0;s<t.length;s++){const o=t[s];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)r.matches&&r.matches(o.query)&&k(r,o);else if(r.matches&&r.matches(o.query)&&k(r,o),r.querySelectorAll){const c=r.querySelectorAll(o.query);for(let i=0;i<c.length;i++)k(c[i],o)}}o.onInit&&o.onInit(r)}}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1){const l=!!(r.firstElementChild||r.children&&r.children.length);for(let s=0;s<t.length;s++){const o=t[s],c=o.query;if(c){if(!l)r.matches&&r.matches(c)&&B(r,o);else if(r.matches&&r.matches(c)&&B(r,o),r.querySelectorAll){const i=r.querySelectorAll(c);for(let u=0;u<i.length;u++)B(i[u],o)}}}}}}}function ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,S(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{qe(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Me(e){$().push(e),ie()}function N(e,t,n,r,l={}){const s=l.extraAttributes||[],o=l.onAttributeChange||null,c=l.onSubtreeChange||null,i=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,f=l.attributes||null,h=f?Te(f):d,_=f?new Set(Object.keys(f)):null,v=l.persist||null;function g(m){const b=m||document.body;if(ne(b,e,t,n),f&&W())for(const p in f){const T=f[p],C=Array.from(b.querySelectorAll("["+p+"]"));b.matches&&b.matches("["+p+"]")&&C.push(b);for(let A=0;A<C.length;A++){const O=C[A];R(O)&&te(T,O.getAttribute(p),p,r,O)}}i&&i(b)}const y=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let b;for(;(b=m.exec(e))!==null;)y.push(b[1])}else y.push(e);Ie({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:i,observed:y.concat(s),onAttributeChange:o,onAttrChange:u,effects:h,declared:_,persist:v}),Fe();const E=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,a=l.subtreeQuery||(E?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:c,query:a}),ie(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=N,window.lnCore.observeLifecycle=Me);function w(){Le()>0?De(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",w):w(),g}function le(e){return(e||"").replace(/^#/,"")}function U(e){const t=e===void 0?location.hash:e,n={},r=le(t);if(!r)return n;const l=r.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const c=o.indexOf(":"),i=c>-1?o.slice(0,c):o,u=c>-1?o.slice(c+1):"";if(i)try{n[i]=decodeURIComponent(u)}catch{n[i]=u}}return n}function $e(e){if(!e)return null;const t=U();return e in t?t[e]:null}function Be(e,t){if(!e)return;const n=U();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("&");le(location.hash)!==l&&(location.hash=l)}function Ne(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ue(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 Ke(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 We(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(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),l=r?r.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=U,window.lnCore.hashGet=$e,window.lnCore.hashSet=Be,window.lnCore.hashLinkClick=Ne,window.lnCore.resolveHashNamespace=Ue,window.lnCore.hashSortEncode=Ke,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=We,window.lnCore.hashFilterDecode=Ve);function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He);const x=["Ctrl","Alt","Shift","Meta"],Pe={alt:"Alt",control:"Ctrl",ctrl:"Ctrl",meta:"Meta",command:"Meta",cmd:"Meta",option:"Alt",shift:"Shift",esc:"Escape",escape:"Escape",space:"Space",spacebar:"Space",enter:"Enter",return:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",del:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",arrowup:"ArrowUp",up:"ArrowUp",arrowdown:"ArrowDown",down:"ArrowDown",arrowleft:"ArrowLeft",left:"ArrowLeft",arrowright:"ArrowRight",right:"ArrowRight"};function se(e){if(e===" ")return"Space";const t=String(e||"").trim();if(!t)return"";const n=Pe[t.toLowerCase()];return n||(t.length===1||/^f\d{1,2}$/i.test(t)?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1))}function ce(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return"";const n=t.split("+"),r=new Set;let l="";for(let o=0;o<n.length;o++){const c=se(n[o]);if(!c)return"";if(x.indexOf(c)!==-1){r.add(c);continue}if(l)return"";l=c}if(!l)return"";const s=[];for(let o=0;o<x.length;o++)r.has(x[o])&&s.push(x[o]);return s.push(l),s.join("+")}function ze(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return[];const n=t.split(/[\s,]+/),r=[];for(let l=0;l<n.length;l++){const s=ce(n[l]);s&&r.indexOf(s)===-1&&r.push(s)}return r}function Qe(e,t){const n=String(t||"").trim();if(!n||/[\s,]/.test(n))return"";const r=String(e||"").replace(/\s*\+\s*/g,"+").trim();return/[\s,]/.test(r)?"":ce(r?r+"+"+n:n)}function Je(e){if(!e)return"";const t=se(e.key);if(!t||x.indexOf(t)!==-1)return"";const n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&n.push("Meta"),n.push(t),n.join("+")}function Ge(e){if(!e||!e.tagName)return null;const t=String(e.tagName).toLowerCase();if(t==="button"||t==="a"&&e.hasAttribute&&e.hasAttribute("href"))return"click";if(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)return"focus";if(e.hasAttribute&&e.hasAttribute("contenteditable")){const n=e.getAttribute("contenteditable");if(n===""||String(n).toLowerCase()!=="false")return"focus"}return null}function Xe(e,t,n,r){if(!e||!t||n!=="click"||e.target!==t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)return!1;const l=String(t.tagName||"").toLowerCase();return l==="button"?r==="Enter"||r==="Space":l==="a"&&t.hasAttribute&&t.hasAttribute("href")&&r==="Enter"}(function(){const e="data-ln-key",t="lnKey",n="data-ln-key-target",r="data-ln-key-allow-input",l="data-ln-key-modifier",s="data-ln-key-for",o="lnKeyFor";if(window[t]!==void 0)return;function c(a){const w=a[t];if(w){if(!a.hasAttribute(e)){w.destroy();return}w.sync()}}function i(a){const w=a[o];w&&!a.hasAttribute(s)&&w.destroy()}const u={"data-ln-key":{type:"string",effect:c,description:"Keyboard shortcut combination (e.g. meta+k, ctrl+s)"},"data-ln-key-target":{type:"string",effect:c,description:"Target element selector or ID to receive synthetic click or focus"},"data-ln-key-allow-input":{type:"boolean",effect:c,description:"Permits shortcut execution even when focused inside an editable input"}},d={"data-ln-key-for":{type:"string",effect:i,description:"Target element ID that this shortcut badge is displayed for"},"data-ln-key-modifier":{type:"string",description:"Platform modifier text representation override"}},f=new Set;let h=null;function _(){h||(h=function(a){if(a.defaultPrevented||a.isComposing||a.repeat)return;const w=Je(a);if(!w)return;const m=fe(a.target),b=document.querySelectorAll("["+e+"], ["+s+"]");let p=null,T=!1,C=!1;for(let K=0;K<b.length;K++){const j=b[K],L=j[t]||j[o];if(!L||!L.matches(w)||m&&!L.allowsInput())continue;const D=L.resolveTarget(),I=Ge(D);if(!(!I||!we(D,I))){if(Xe(a,D,I,w)){C=!0;continue}p?T=!0:p={host:j,target:D,action:I}}}if(C||!p)return;T&&console.warn('[ln-key] Duplicate active shortcut "'+w+'"; first DOM match wins.');const A={source:p.host,target:p.target,action:p.action,key:w,event:a};ue(p.host,"ln-key:before-trigger",A).defaultPrevented||(a.preventDefault(),p.target[p.action](),V(p.host,"ln-key:trigger",A))},document.addEventListener("keydown",h))}function v(){f.size>0||!h||(document.removeEventListener("keydown",h),h=null)}function g(a){return this.dom=a,this.shortcuts=[],f.add(this),this.sync(),_(),this}g.prototype.sync=function(){this.shortcuts=ze(this.dom.getAttribute(e))},g.prototype.matches=function(a){return this.shortcuts.indexOf(a)!==-1},g.prototype.allowsInput=function(){return this.dom.hasAttribute(r)},g.prototype.resolveTarget=function(){const a=this.dom.getAttribute(n);return a?E(a,n):this.dom},g.prototype.destroy=function(){this.dom[t]&&(f.delete(this),delete this.dom[t],v())};function y(a){return this.dom=a,f.add(this),_(),this}y.prototype._modifierContext=function(){return this.dom.closest("["+l+"]")},y.prototype.shortcut=function(){const a=this._modifierContext(),w=a?a.getAttribute(l):"";return Qe(w,this.dom.textContent)},y.prototype.matches=function(a){return this.shortcut()===a},y.prototype.allowsInput=function(){if(this.dom.hasAttribute(r))return!0;const a=this._modifierContext();return!!(a&&a.hasAttribute(r))},y.prototype.resolveTarget=function(){return E(this.dom.getAttribute(s),s)},y.prototype.destroy=function(){this.dom[o]&&(f.delete(this),delete this.dom[o],v())};function E(a,w){if(!a)return null;try{const m=document.querySelector(a);return m||console.warn("[ln-key] Target not found for "+w+' selector "'+a+'".'),m}catch{return console.warn("[ln-key] Invalid "+w+' selector "'+a+'".'),null}}N(e,t,g,"ln-key",{attributes:u}),N(s,o,y,"ln-key-for",{attributes:d})})()})();
1
+ (function(){"use strict";function W(){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 R(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(!R(r))return}e.apply(console,t)}}function V(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 ue(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 S(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){S(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ae(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function fe(e){if(!e)return!1;if(typeof e.closest=="function")return!!e.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])');const t=String(e.tagName||"").toLowerCase();return t==="input"||t==="textarea"||t==="select"||!!e.isContentEditable}function de(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function we(e,t){return!e||!document.contains(e)||de(e)||t&&typeof e[t]!="function"?!1:ae(e)}function he(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function pe(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,o={},c=e.elements,i={};if(n)for(let s=0;s<c.length;s++){const l=c[s];l.name&&l.type==="checkbox"&&!l.disabled&&(i[l.name]=(i[l.name]||0)+1)}for(let s=0;s<c.length;s++){const l=c[s];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 u=0;u<l.options.length;u++)l.options[u].selected&&o[l.name].push(l.options[u].value)}else if(n&&l.type==="hidden")o[l.name]=l.value;else if(n&&(l.type==="number"||l.type==="range")){const u=Number(l.value);o[l.name]=l.value===""||isNaN(u)?null:u}else o[l.name]=l.value}return o}function be(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ge(e,t){const n=e.elements,r=[],o={};for(let c=0;c<n.length;c++){const i=n[c];i.name&&i.type==="checkbox"&&(o[i.name]=(o[i.name]||0)+1)}for(let c=0;c<n.length;c++){const i=n[c];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const s=i.getAttribute("data-ln-fill-as")||i.name;if(!s||!(s in t))continue;const l=t[s];if(i.type==="checkbox"){if(Array.isArray(l))i.checked=l.indexOf(i.value)!==-1;else if(o[i.name]>1){const u=String(l).split(",").map(function(d){return d.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=be(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 u=0;u<i.options.length;u++)i.options[u].selected=l.indexOf(i.options[u].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=ge,window.lnCore.serializeForm=pe,window.lnCore.resolveFormMethod=he);const H={};function ye(e,t){H[e]=t}function me(e){return H[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ye,window.lnCore.getDataMapper=me);function Ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,S(function(){new MutationObserver(function(){V(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const P={};function Ae(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];P[n]=t}function ke(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=Ae,window.lnCore.getLocaleFallback=ke,window.lnCore.ensureLocaleObserver=Ce);const F={};function xe(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const s=n[i],l=s.getAttribute("data-ln-field");t[l]!=null&&(s.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const s=r[i],l=s.getAttribute("data-ln-attr").split(",");for(let u=0;u<l.length;u++){const d=l[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();t[h]!=null&&s.setAttribute(f,t[h])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const s=o[i],l=s.getAttribute("data-ln-show");l in t&&s.classList.toggle("hidden",!t[l])}const c=e.querySelectorAll("[data-ln-class]");for(let i=0;i<c.length;i++){const s=c[i],l=s.getAttribute("data-ln-class").split(",");for(let u=0;u<l.length;u++){const d=l[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();h in t&&s.classList.toggle(f,!!t[h])}}return e}function Se(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)z(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Q(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const c=n.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,s){return t[s]!==void 0?t[s]:""}))}const r=function(c,i){return t[i]!==void 0?t[i]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let c=0;c<o.length;c++){const i=o[c],s=i.attributes;for(let l=0;l<s.length;l++){const u=s[l];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function _e(e,t,n,r,o,c){const i={};for(let l=0;l<e.children.length;l++){const u=e.children[l],d=u.getAttribute("data-ln-render-key");d&&(i[d]=u)}const s=document.createDocumentFragment();for(let l=0;l<t.length;l++){const u=t[l],d=String(r(u));let f=i[d];if(f)o(f,u,l);else{const h=xe(n,c);if(!h||(Q(h,u),f=h.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),o(f,u,l)}s.appendChild(f)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=z,window.lnCore.lnFill=Se,window.lnCore.renderList=_e);function q(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function J(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function G(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 X(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const M=new Map;function Y(e,t){const n=(e?e.join("|"):"")+"::"+t;if(M.has(n))return M.get(n);const r=new Set(e||[]),o=function(c,i){const s=c.getAttribute(i);return s!==null&&r.has(s)?s:t};return M.set(n,o),o}function Z(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ee(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function te(e,t,n,r,o){if(!e||t===null)return!0;const c=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const s=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"?(s(`[${c}] 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:(s(`[${c}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return s(`[${c}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(s(`[${c}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(s(`[${c}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(s(`[${c}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(l){return s(`[${c}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,n){for(const r in n){const[o,c,i]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,c,i)},enumerable:!0,configurable:!0})}return e}function Ee(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=Y(r.values,r.fallback);break;case"integer":o=J;break;case"float":o=Z;break;case"boolean":o=G;break;case"list":o=X;break;case"json":o=ee;break;case"string":default:o=q;break}o||(o=q),t[r.prop]=[o,n,r.fallback]}return t}function Te(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 Oe(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=ve,window.lnCore.attrSpec=Ee,window.lnCore.attrStr=q,window.lnCore.attrInt=J,window.lnCore.attrBool=G,window.lnCore.attrList=X,window.lnCore.attrEnum=Y,window.lnCore.attrFloat=Z,window.lnCore.attrJson=ee);function k(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function ne(e,t,n,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(c)&&k(e,i),e.querySelectorAll){const s=e.querySelectorAll(c);for(let l=0;l<s.length;l++)k(s[l],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function De(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 re(){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 Ie(e){const t=re(),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(c=>c.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Oe(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 oe(e,t,n,r){for(let o=0;o<e.length;o++){const c=e[o];if(!t[c.attribute])continue;const i=c.effects&&c.effects[n];i?i(t,n,r):c.onAttrChange&&(!c.declared||c.declared.has(n))&&c.onAttrChange(t,n,r)}}function Re(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=re(),o=r.byAttr.get(t),c=W()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!o&&!c)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(c&&R(i)){const s=r.byDeclaredAttr.get(t),l=i.getAttribute(t);for(let u=0;u<s.length;u++)te(s[u].spec,l,t,s[u].componentTag,i)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const s=r.byReactive.get(t);s&&oe(s,i,t,e.oldValue),r.reactiveWildcard.length&&oe(r.reactiveWildcard,i,t,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const l=o[s];if(l.handler){l.handler(i,t,e.oldValue);continue}l.onAttributeChange&&i[l.attribute]?l.onAttributeChange(i,t):(ne(i,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(i))}}}function Fe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,S(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Re(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function B(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function qe(e){const t=$();if(!t.length)return;const n=e.target;if(n){const r=n.nodeType===1?n:n.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let r=0;r<t.length;r++){const o=t[r];if(o.onSubtreeChange&&o.query){const c=o.query,i=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;i&&o.onSubtreeChange(i,e)}}for(let r=0;r<e.addedNodes.length;r++){const o=e.addedNodes[r];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let i=0;i<t.length;i++){const s=t[i];if(s.selector&&s.attribute&&s.ComponentFn){if(!c)o.matches&&o.matches(s.query)&&k(o,s);else if(o.matches&&o.matches(s.query)&&k(o,s),o.querySelectorAll){const l=o.querySelectorAll(s.query);for(let u=0;u<l.length;u++)k(l[u],s)}}s.onInit&&s.onInit(o)}}}for(let r=0;r<e.removedNodes.length;r++){const o=e.removedNodes[r];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let i=0;i<t.length;i++){const s=t[i],l=s.query;if(l){if(!c)o.matches&&o.matches(l)&&B(o,s);else if(o.matches&&o.matches(l)&&B(o,s),o.querySelectorAll){const u=o.querySelectorAll(l);for(let d=0;d<u.length;d++)B(u[d],s)}}}}}}function ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,S(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{qe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Me(e){$().push(e),ie()}function N(e,t,n,r,o={}){const c=o.extraAttributes||[],i=o.onAttributeChange||null,s=o.onSubtreeChange||null,l=o.onInit||null,u=o.onAttrChange||null,d=o.effects||null,f=o.attributes||null,h=f?Te(f):d,_=f?new Set(Object.keys(f)):null,v=o.persist||null;function g(m){const b=m||document.body;if(ne(b,e,t,n),f&&W())for(const p in f){const T=f[p],C=Array.from(b.querySelectorAll("["+p+"]"));b.matches&&b.matches("["+p+"]")&&C.push(b);for(let A=0;A<C.length;A++){const O=C[A];R(O)&&te(T,O.getAttribute(p),p,r,O)}}l&&l(b)}const y=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let b;for(;(b=m.exec(e))!==null;)y.push(b[1])}else y.push(e);Ie({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:l,observed:y.concat(c),onAttributeChange:i,onAttrChange:u,effects:h,declared:_,persist:v}),Fe();const E=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,a=o.subtreeQuery||(E?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:s,query:a}),ie(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=N,window.lnCore.observeLifecycle=Me);function w(){Le()>0?De(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",w):w(),g}function le(e){return(e||"").replace(/^#/,"")}function U(e){const t=e===void 0?location.hash:e,n={},r=le(t);if(!r)return n;const o=r.split("&");for(let c=0;c<o.length;c++){const i=o[c];if(!i)continue;const s=i.indexOf(":"),l=s>-1?i.slice(0,s):i,u=s>-1?i.slice(s+1):"";if(l)try{n[l]=decodeURIComponent(u)}catch{n[l]=u}}return n}function $e(e){if(!e)return null;const t=U();return e in t?t[e]:null}function Be(e,t){if(!e)return;const n=U();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(c){const i=n[c];return i===""?c:c+":"+encodeURIComponent(i)}).join("&");le(location.hash)!==o&&(location.hash=o)}function Ne(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ue(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 Ke(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 We(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(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(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=U,window.lnCore.hashGet=$e,window.lnCore.hashSet=Be,window.lnCore.hashLinkClick=Ne,window.lnCore.resolveHashNamespace=Ue,window.lnCore.hashSortEncode=Ke,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=We,window.lnCore.hashFilterDecode=Ve);function He(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=He);const x=["Ctrl","Alt","Shift","Meta"],Pe={alt:"Alt",control:"Ctrl",ctrl:"Ctrl",meta:"Meta",command:"Meta",cmd:"Meta",option:"Alt",shift:"Shift",esc:"Escape",escape:"Escape",space:"Space",spacebar:"Space",enter:"Enter",return:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",del:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",arrowup:"ArrowUp",up:"ArrowUp",arrowdown:"ArrowDown",down:"ArrowDown",arrowleft:"ArrowLeft",left:"ArrowLeft",arrowright:"ArrowRight",right:"ArrowRight"};function se(e){if(e===" ")return"Space";const t=String(e||"").trim();if(!t)return"";const n=Pe[t.toLowerCase()];return n||(t.length===1||/^f\d{1,2}$/i.test(t)?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1))}function ce(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return"";const n=t.split("+"),r=new Set;let o="";for(let i=0;i<n.length;i++){const s=se(n[i]);if(!s)return"";if(x.indexOf(s)!==-1){r.add(s);continue}if(o)return"";o=s}if(!o)return"";const c=[];for(let i=0;i<x.length;i++)r.has(x[i])&&c.push(x[i]);return c.push(o),c.join("+")}function ze(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return[];const n=t.split(/[\s,]+/),r=[];for(let o=0;o<n.length;o++){const c=ce(n[o]);c&&r.indexOf(c)===-1&&r.push(c)}return r}function Qe(e,t){const n=String(t||"").trim();if(!n||/[\s,]/.test(n))return"";const r=String(e||"").replace(/\s*\+\s*/g,"+").trim();return/[\s,]/.test(r)?"":ce(r?r+"+"+n:n)}function Je(e){if(!e)return"";const t=se(e.key);if(!t||x.indexOf(t)!==-1)return"";const n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&n.push("Meta"),n.push(t),n.join("+")}function Ge(e){if(!e||!e.tagName)return null;const t=String(e.tagName).toLowerCase();if(t==="button"||t==="a"&&e.hasAttribute&&e.hasAttribute("href"))return"click";if(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)return"focus";if(e.hasAttribute&&e.hasAttribute("contenteditable")){const n=e.getAttribute("contenteditable");if(n===""||String(n).toLowerCase()!=="false")return"focus"}return null}function Xe(e,t,n,r){if(!e||!t||n!=="click"||e.target!==t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)return!1;const o=String(t.tagName||"").toLowerCase();return o==="button"?r==="Enter"||r==="Space":o==="a"&&t.hasAttribute&&t.hasAttribute("href")&&r==="Enter"}(function(){const e="data-ln-key",t="lnKey",n="data-ln-key-target",r="data-ln-key-allow-input",o="data-ln-key-modifier",c="data-ln-key-for",i="lnKeyFor";if(window[t]!==void 0)return;function s(a){const w=a[t];if(w){if(!a.hasAttribute(e)){w.destroy();return}w.sync()}}function l(a){const w=a[i];w&&!a.hasAttribute(c)&&w.destroy()}const u={"data-ln-key":{type:"string",effect:s,description:"Keyboard shortcut combination (e.g. meta+k, ctrl+s)"},"data-ln-key-target":{type:"string",effect:s,description:"Target element selector or ID to receive synthetic click or focus"},"data-ln-key-allow-input":{type:"boolean",effect:s,description:"Permits shortcut execution even when focused inside an editable input"}},d={"data-ln-key-for":{type:"string",effect:l,description:"Target element ID that this shortcut badge is displayed for"},"data-ln-key-modifier":{type:"string",description:"Platform modifier text representation override"}},f=new Set;let h=null;function _(){h||(h=function(a){if(a.defaultPrevented||a.isComposing||a.repeat)return;const w=Je(a);if(!w)return;const m=fe(a.target),b=document.querySelectorAll("["+e+"], ["+c+"]");let p=null,T=!1,C=!1;for(let K=0;K<b.length;K++){const j=b[K],L=j[t]||j[i];if(!L||!L.matches(w)||m&&!L.allowsInput())continue;const D=L.resolveTarget(),I=Ge(D);if(!(!I||!we(D,I))){if(Xe(a,D,I,w)){C=!0;continue}p?T=!0:p={host:j,target:D,action:I}}}if(C||!p)return;T&&console.warn('[ln-key] Duplicate active shortcut "'+w+'"; first DOM match wins.');const A={source:p.host,target:p.target,action:p.action,key:w,event:a};ue(p.host,"ln-key:before-trigger",A).defaultPrevented||(a.preventDefault(),p.target[p.action](),V(p.host,"ln-key:trigger",A))},document.addEventListener("keydown",h))}function v(){f.size>0||!h||(document.removeEventListener("keydown",h),h=null)}function g(a){return this.dom=a,this.shortcuts=[],f.add(this),this.sync(),_(),this}g.prototype.sync=function(){this.shortcuts=ze(this.dom.getAttribute(e))},g.prototype.matches=function(a){return this.shortcuts.indexOf(a)!==-1},g.prototype.allowsInput=function(){return this.dom.hasAttribute(r)},g.prototype.resolveTarget=function(){const a=this.dom.getAttribute(n);return a?E(a,n):this.dom},g.prototype.destroy=function(){this.dom[t]&&(f.delete(this),delete this.dom[t],v())};function y(a){return this.dom=a,f.add(this),_(),this}y.prototype._modifierContext=function(){return this.dom.closest("["+o+"]")},y.prototype.shortcut=function(){const a=this._modifierContext(),w=a?a.getAttribute(o):"";return Qe(w,this.dom.textContent)},y.prototype.matches=function(a){return this.shortcut()===a},y.prototype.allowsInput=function(){if(this.dom.hasAttribute(r))return!0;const a=this._modifierContext();return!!(a&&a.hasAttribute(r))},y.prototype.resolveTarget=function(){return E(this.dom.getAttribute(c),c)},y.prototype.destroy=function(){this.dom[i]&&(f.delete(this),delete this.dom[i],v())};function E(a,w){if(!a)return null;try{const m=document.querySelector(a);return m||console.warn("[ln-key] Target not found for "+w+' selector "'+a+'".'),m}catch{return console.warn("[ln-key] Invalid "+w+' selector "'+a+'".'),null}}N(e,t,g,"ln-key",{attributes:u}),N(c,i,y,"ln-key-for",{attributes:d})})()})();