@livenetworks/ashlar 2.1.0 → 2.1.2

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 (72) 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-autoresize/src/ln-autoresize.js +3 -1
  7. package/components/ln-autosave/ln-autosave.js +1 -1
  8. package/components/ln-chart/ln-chart.js +1 -1
  9. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  10. package/components/ln-confirm/ln-confirm.js +1 -1
  11. package/components/ln-core/lifecycle.js +33 -12
  12. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  13. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  14. package/components/ln-data-store/ln-data-store.js +1 -1
  15. package/components/ln-date/ln-date.js +1 -1
  16. package/components/ln-date/src/ln-date.js +22 -13
  17. package/components/ln-debug/ln-debug.js +1 -1
  18. package/components/ln-dropdown/ln-dropdown.js +1 -1
  19. package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
  20. package/components/ln-dropdown/src/ln-dropdown.js +18 -5
  21. package/components/ln-editor/ln-editor.js +1 -1
  22. package/components/ln-editor/src/ln-editor.js +45 -12
  23. package/components/ln-external-links/ln-external-links.js +1 -1
  24. package/components/ln-filter/ln-filter.js +1 -1
  25. package/components/ln-filter/ln-filter.schema.json +1 -1
  26. package/components/ln-filter/src/ln-filter.js +11 -10
  27. package/components/ln-form/ln-form.js +1 -1
  28. package/components/ln-form/src/ln-form.js +11 -0
  29. package/components/ln-icon/ln-icon.js +1 -1
  30. package/components/ln-include/ln-include.js +1 -1
  31. package/components/ln-key/ln-key.js +1 -1
  32. package/components/ln-link/ln-link.js +1 -1
  33. package/components/ln-list/ln-list.js +1 -1
  34. package/components/ln-list/src/ln-list.js +14 -5
  35. package/components/ln-modal/ln-modal.js +1 -1
  36. package/components/ln-nav/ln-nav.js +1 -1
  37. package/components/ln-number/ln-number.js +1 -1
  38. package/components/ln-number/src/ln-number.js +22 -12
  39. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  40. package/components/ln-options/ln-options.js +1 -1
  41. package/components/ln-picklist/ln-picklist.js +1 -1
  42. package/components/ln-popover/ln-popover.js +1 -1
  43. package/components/ln-popover/ln-popover.schema.json +82 -82
  44. package/components/ln-popover/src/ln-popover.js +22 -5
  45. package/components/ln-progress/ln-progress.js +1 -1
  46. package/components/ln-router/ln-router.js +1 -1
  47. package/components/ln-scroll/ln-scroll.js +1 -1
  48. package/components/ln-search/ln-search.js +1 -1
  49. package/components/ln-search/ln-search.schema.json +103 -103
  50. package/components/ln-search/src/ln-search.js +9 -5
  51. package/components/ln-slug/ln-slug.js +1 -1
  52. package/components/ln-sort/ln-sort.js +1 -1
  53. package/components/ln-sortable/ln-sortable.js +1 -1
  54. package/components/ln-sortable/src/ln-sortable.js +52 -7
  55. package/components/ln-stat/ln-stat.js +1 -1
  56. package/components/ln-table/ln-table.js +1 -1
  57. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  58. package/components/ln-tabs/ln-tabs.js +1 -1
  59. package/components/ln-tabs/src/ln-tabs.js +12 -8
  60. package/components/ln-time/ln-time.js +1 -1
  61. package/components/ln-time/src/ln-time.js +17 -7
  62. package/components/ln-toast/ln-toast.js +1 -1
  63. package/components/ln-toggle/ln-toggle.js +1 -1
  64. package/components/ln-tooltip/ln-tooltip.js +1 -1
  65. package/components/ln-translations/ln-translations.js +1 -1
  66. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  67. package/components/ln-upload/ln-upload.js +1 -1
  68. package/components/ln-validate/ln-validate.js +1 -1
  69. package/components/ln-validate/src/ln-validate.js +21 -7
  70. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  71. package/package.json +1 -1
  72. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function $(){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 x(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(!x(n))return}e.apply(console,t)}}function _(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 N(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(l),l}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function S(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ne(e){return!!(!e||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||typeof e.button=="number"&&e.button!==0)}function oe(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ie(e,t){const o=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(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 le(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function se(e,t){const o=e.elements,n=[],l={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(r).split(",").map(function(f){return f.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=le(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=se,window.lnCore.serializeForm=ie,window.lnCore.resolveFormMethod=re);const B={};function ce(e,t){B[e]=t}function ae(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ae);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){_(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function de(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];j[o]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ue);const O={};function we(e,t){O[e]||(O[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=O[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const f=r[u].trim().split(":");if(f.length!==2)continue;const a=f[0].trim(),d=f[1].trim();t[d]!=null&&c.setAttribute(a,t[d])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],r=c.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const f=r[u].trim().split(":");if(f.length!==2)continue;const a=f[0].trim(),d=f[1].trim();d in t&&c.classList.toggle(a,!!t[d])}}return e}function he(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)W(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 U(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.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 r=0;r<c.length;r++){const u=c[r];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function be(e,t,o,n,l,s){const i={};for(let r=0;r<e.children.length;r++){const u=e.children[r],f=u.getAttribute("data-ln-render-key");f&&(i[f]=u)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],f=String(n(u));let a=i[f];if(a)l(a,u,r);else{const d=we(o,s);if(!d||(U(d,u),a=d.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",f),l(a,u,r)}c.appendChild(a)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=W,window.lnCore.lnFill=he,window.lnCore.renderList=be);function E(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function V(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function H(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 K(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const L=new Map;function G(e,t){const o=(e?e.join("|"):"")+"::"+t;if(L.has(o))return L.get(o);const n=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&n.has(c)?c:t};return L.set(o,l),l}function Q(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function J(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function P(e,t,o,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=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${o}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function pe(e,t,o){for(const n in o){const[l,s,i]=o[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function me(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=G(n.values,n.fallback);break;case"integer":l=V;break;case"float":l=Q;break;case"boolean":l=H;break;case"list":l=K;break;case"json":l=J;break;case"string":default:l=E;break}l||(l=E),t[n.prop]=[l,o,n.fallback]}return t}function ge(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 Ce(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=pe,window.lnCore.attrSpec=me,window.lnCore.attrStr=E,window.lnCore.attrInt=V,window.lnCore.attrBool=H,window.lnCore.attrList=K,window.lnCore.attrEnum=G,window.lnCore.attrFloat=Q,window.lnCore.attrJson=J);function m(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 z(e,t,o,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(s)&&m(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)m(c[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ae(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 X(){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 ve(e){const t=X(),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(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=Ce(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 Y(e,t,o,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,n):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,n)}}function _e(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=X(),l=n.byAttr.get(t),s=$()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&x(i)){const c=n.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let u=0;u<c.length;u++)P(c[u].spec,r,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=n.byReactive.get(t);c&&Y(c,i,t,e.oldValue),n.reactiveWildcard.length&&Y(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(z(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{_e(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 q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function I(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 xe(e){const t=q();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,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 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 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)&&m(n,i);else if(n.matches&&n.matches(i.query)&&m(n,i),n.querySelectorAll){const c=n.querySelectorAll(i.query);for(let r=0;r<c.length;r++)m(c[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 s=0;s<t.length;s++){const i=t[s],c=i.query;if(c){if(!l)n.matches&&n.matches(c)&&I(n,i);else if(n.matches&&n.matches(c)&&I(n,i),n.querySelectorAll){const r=n.querySelectorAll(c);for(let u=0;u<r.length;u++)I(r[u],i)}}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{xe(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Se(e){q().push(e),Z()}function ee(e,t,o,n,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,u=l.onAttrChange||null,f=l.effects||null,a=l.attributes||null,d=a?ge(a):f,w=a?new Set(Object.keys(a)):null,h=l.persist||null;function p(A){const b=A||document.body;if(z(b,e,t,o),a&&$())for(const v in a){const Me=a[v],R=Array.from(b.querySelectorAll("["+v+"]"));b.matches&&b.matches("["+v+"]")&&R.push(b);for(let F=0;F<R.length;F++){const M=R[F];x(M)&&P(Me,M.getAttribute(v),v,n,M)}}r&&r(b)}const g=[];if(e.indexOf("[")!==-1){const A=/\[([\w-]+)/g;let b;for(;(b=A.exec(e))!==null;)g.push(b[1])}else g.push(e);ve({selector:e,attribute:t,componentTag:n,attributes:a,ComponentFn:o,onInit:r,observed:g.concat(s),onAttributeChange:i,onAttrChange:u,effects:d,declared:w,persist:h}),ke();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,T=l.subtreeQuery||(C?e:"["+e+"]");q().push({selector:e,attribute:t,ComponentFn:o,onInit:r,onSubtreeChange:c,query:T}),Z(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=Se);function y(){ye()>0?Ae(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",y):y(),p}function te(e){return(e||"").replace(/^#/,"")}function D(e){const t=e===void 0?location.hash:e,o={},n=te(t);if(!n)return o;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(r)try{o[r]=decodeURIComponent(u)}catch{o[r]=u}}return o}function Oe(e){if(!e)return null;const t=D();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const o=D();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");te(location.hash)!==l&&(location.hash=l)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function qe(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 Ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(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 Te(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Re(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(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=D,window.lnCore.hashGet=Oe,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Te,window.lnCore.hashFilterDecode=Re);function Fe(){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=Fe),(function(){const e="data-ln-modal",t="lnModal",o="data-ln-modal-for",n="data-ln-modal-close";if(window[t]!==void 0)return;const l={"data-ln-modal":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the modal dialog"},"data-ln-modal-for":{type:"string",description:"Target modal ID to open on trigger click"},"data-ln-modal-mode":{type:"enum",values:["new","edit"],fallback:"new",description:"Operational mode of the modal (new vs edit)"},"data-ln-modal-close":{type:"trigger",description:"Click dismiss trigger inside the modal"}},s=new Set;let i=null;function c(){i||(i=function(a){if(ne(a))return;const d=a.target.closest("["+o+"]");if(!d||oe(d))return;const w=d.getAttribute(o);if(!w)return;const h=document.getElementById(w);!h||!h[t]||(a.preventDefault(),d.hasAttribute("data-ln-modal-mode")?h.setAttribute("data-ln-modal-mode",d.getAttribute("data-ln-modal-mode")):h.hasAttribute("data-ln-modal-mode")&&h.setAttribute("data-ln-modal-mode","new"),h.setAttribute(e,"open"))},document.addEventListener("click",i))}function r(){s.size>0||!i||(document.removeEventListener("click",i),i=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open";const d=this;return this._onRequestOpen=function(){d.dom.setAttribute(e,"open")},this._onRequestClose=function(){d.dom.setAttribute(e,"close")},this._onCancel=function(w){w.preventDefault(),d.dom.setAttribute(e,"close")},this._onClose=function(){!d.isOpen||d.dom.getAttribute(e)!=="open"||d.dom.open||(d._isNativeClosing=!0,d.dom.setAttribute(e,"close"))},this._onClickClose=function(w){const h=w.target.closest("["+n+"]");h&&d.dom.contains(h)&&(w.preventDefault(),d.dom.setAttribute(e,"close"))},this.dom.addEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.addEventListener("ln-modal:request-close",this._onRequestClose),this.dom.addEventListener("cancel",this._onCancel),this.dom.addEventListener("close",this._onClose),this.dom.addEventListener("click",this._onClickClose),s.add(this),c(),this.isOpen&&(typeof this.dom.showModal=="function"&&this.dom.showModal(),document.body.classList.add("ln-modal-open"),_(this.dom,"ln-modal:open",{modalId:this.dom.id,target:this.dom})),this}u.prototype.open=function(){this.dom.setAttribute(e,"open")},u.prototype.close=function(){this.dom.setAttribute(e,"close")},u.prototype.toggle=function(){const a=this.dom.getAttribute(e);this.dom.setAttribute(e,a==="open"?"close":"open")},u.prototype.destroy=function(){if(this.dom[t]){if(this.dom.removeEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-modal:request-close",this._onRequestClose),this.dom.removeEventListener("cancel",this._onCancel),this.dom.removeEventListener("close",this._onClose),this.dom.removeEventListener("click",this._onClickClose),s.delete(this),r(),this.isOpen){const a=this.dom;Array.prototype.some.call(document.querySelectorAll("["+e+'="open"]'),function(w){return w!==a})||document.body.classList.remove("ln-modal-open")}delete this.dom[t]}};function f(a){const d=a[t];if(!d)return;const w=!!d._isNativeClosing;d._isNativeClosing=!1;const p=a.getAttribute(e)==="open";if(p===d.isOpen){p&&a.isConnected&&!a.open&&typeof a.showModal=="function"&&a.showModal();return}if(p){if(N(a,"ln-modal:before-open",{modalId:a.id,target:a}).defaultPrevented){a.setAttribute(e,"close");return}d.isOpen=!0,document.body.classList.add("ln-modal-open"),typeof a.showModal=="function"&&a.showModal();const C=a.querySelector("[autofocus]");if(C&&S(C))C.focus();else{const T=a.querySelectorAll('input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled])'),y=Array.prototype.find.call(T,S);if(y)y.focus();else{const A=a.querySelectorAll("a[href], button:not([disabled])"),b=Array.prototype.find.call(A,S);b&&b.focus()}}_(a,"ln-modal:open",{modalId:a.id,target:a})}else{if(!w&&N(a,"ln-modal:before-close",{modalId:a.id,target:a}).defaultPrevented){a.setAttribute(e,"open");return}d.isOpen=!1,a.hasAttribute("data-ln-modal-mode")&&a.setAttribute("data-ln-modal-mode","new"),typeof a.close=="function"&&a.open&&a.close(),document.querySelector("["+e+'="open"]')||document.body.classList.remove("ln-modal-open"),_(a,"ln-modal:close",{modalId:a.id,target:a})}}ee(e,t,u,"ln-modal",{attributes:l})})()})();
1
+ (function(){"use strict";function B(){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 l=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){l=t[i];break}if(!E(l))return}e.apply(console,t)}}function _(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function j(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});return e.dispatchEvent(i),i}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function O(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function re(e){return!!(!e||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||typeof e.button=="number"&&e.button!==0)}function ie(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function le(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function se(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,i={},s=e.elements,r={};if(o)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")o&&r[n.name]===1?i[n.name]=n.checked:(i[n.name]||(i[n.name]=[]),n.checked&&i[n.name].push(n.value));else if(n.type==="radio")n.checked&&(i[n.name]=n.value);else if(n.type==="select-multiple"){i[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&i[n.name].push(n.options[a].value)}else if(o&&n.type==="hidden")i[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const a=Number(n.value);i[n.name]=n.value===""||isNaN(a)?null:a}else i[n.name]=n.value}return i}function ce(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ue(e,t){const o=e.elements,l=[],i={};for(let s=0;s<o.length;s++){const r=o[s];r.name&&r.type==="checkbox"&&(i[r.name]=(i[r.name]||0)+1)}for(let s=0;s<o.length;s++){const r=o[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(i[r.name]>1){const a=String(n).split(",").map(function(f){return f.trim()});r.checked=a.indexOf(r.value)!==-1}else r.checked=ce(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=ue,window.lnCore.serializeForm=se,window.lnCore.resolveFormMethod=le);const W={};function ae(e,t){W[e]=t}function de(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=de);function fe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){_(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const U={};function we(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];U[o]=t}function he(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return U[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=we,window.lnCore.getLocaleFallback=he,window.lnCore.ensureLocaleObserver=fe);const L={};function be(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=L[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function V(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let r=0;r<o.length;r++){const c=o[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 f=n[a].trim().split(":");if(f.length!==2)continue;const u=f[0].trim(),d=f[1].trim();t[d]!=null&&c.setAttribute(u,t[d])}}const i=e.querySelectorAll("[data-ln-show]");for(let r=0;r<i.length;r++){const c=i[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 f=n[a].trim().split(":");if(f.length!==2)continue;const u=f[0].trim(),d=f[1].trim();d in t&&c.classList.toggle(u,!!t[d])}}return e}function pe(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 l=0;l<o.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[l],t??null),o[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)V(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 H(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.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]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const r=i[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 me(e,t,o,l,i,s){const r={};for(let n=0;n<e.children.length;n++){const a=e.children[n],f=a.getAttribute("data-ln-render-key");f&&(r[f]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],f=String(l(a));let u=r[f];if(u)i(u,a,n);else{const d=be(o,s);if(!d||(H(d,a),u=d.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",f),i(u,a,n)}c.appendChild(u)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=H,window.lnCore.fill=V,window.lnCore.lnFill=pe,window.lnCore.renderList=me);function q(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function K(e,t,o){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?o:l}function G(e,t,o=!1){const l=e.getAttribute(t);if(l===null)return!!o;const i=l.trim().toLowerCase();return!(i==="false"||i==="0")}function Q(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const I=new Map;function J(e,t){const o=(e?e.join("|"):"")+"::"+t;if(I.has(o))return I.get(o);const l=new Set(e||[]),i=function(s,r){const c=s.getAttribute(r);return c!==null&&l.has(c)?c:t};return I.set(o,i),i}function P(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function z(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function X(e,t,o,l,i){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=>{i?console.warn(n,i):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 "${o}". 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 "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function ge(e,t,o){for(const l in o){const[i,s,r]=o[l];Object.defineProperty(e,l,{get:function(){return i(t,s,r)},enumerable:!0,configurable:!0})}return e}function Ce(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let i=l.read;if(!i&&l.type)switch(l.type){case"enum":i=J(l.values,l.fallback);break;case"integer":i=K;break;case"float":i=P;break;case"boolean":i=G;break;case"list":i=Q;break;case"json":i=z;break;case"string":default:i=q;break}i||(i=q),t[l.prop]=[i,o,l.fallback]}return t}function ye(e){const t={};for(const o in e){const l=e[o];l&&l.effect&&(t[o]=l.effect)}return Object.keys(t).length?t:null}function Ae(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const 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=ge,window.lnCore.attrSpec=Ce,window.lnCore.attrStr=q,window.lnCore.attrInt=K,window.lnCore.attrBool=G,window.lnCore.attrList=Q,window.lnCore.attrEnum=J,window.lnCore.attrFloat=P,window.lnCore.attrJson=z);function g(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 Y(e,t,o,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:l};if(e.matches&&e.matches(s)&&g(e,r),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)g(c[n],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ve(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function _e(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){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 ke(e){const t=Z(),o=e.observed||[];for(let l=0;l<o.length;l++){const i=o[l];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const i=t.byDeclaredAttr.get(l);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=Ae(e);if(l===null)t.reactiveWildcard.push(e);else for(const i of l)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,o,l){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const r=s.effects&&s.effects[o];r?r(t,o,l):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,l)}}function xe(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,l=Z(),i=l.byAttr.get(t),s=B()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!o&&!i&&!s)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(s&&E(r)){const c=l.byDeclaredAttr.get(t),n=r.getAttribute(t);for(let a=0;a<c.length;a++)X(c[a].spec,n,t,c[a].componentTag,r)}if(window.lnCore._debugSink&&(o||i)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=l.byReactive.get(t);c&&ee(c,r,t,e.oldValue),l.reactiveWildcard.length&&ee(l.reactiveWildcard,r,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const n=i[c];if(n.handler){n.handler(r,t,e.oldValue);continue}n.onAttributeChange&&r[n.attribute]?n.onAttributeChange(r,t):(Y(r,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(r))}}}function Se(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{xe(t[o])}catch(l){console.error("[ln-core] mutation handler failed",t[o].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function R(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Ee(e){const t=D();if(!t.length)return;const o=e.target;if(o){const i=o.nodeType===1?o:o.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=R();if(e.target&&l.length)for(let i=0;i<l.length;i++){const s=l[i],r=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;c&&s.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType===1){const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!r)s.matches&&s.matches(n.query)&&g(s,n);else if(s.matches&&s.matches(n.query)&&g(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let f=0;f<a.length;f++)g(a[f],n)}}n.onInit&&n.onInit(s)}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType===1){const r=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!r)s.matches&&s.matches(a)&&T(s,n);else if(s.matches&&s.matches(a)&&T(s,n),s.querySelectorAll){const f=s.querySelectorAll(a);for(let u=0;u<f.length;u++)T(f[u],n)}}}}}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{Ee(l)}catch(i){console.error("[ln-core] lifecycle handler failed",l.target,i)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){D().push(e),e.onSubtreeChange&&e.query&&R().push(e),te()}function ne(e,t,o,l,i={}){const s=i.extraAttributes||[],r=i.onAttributeChange||null,c=i.onSubtreeChange||null,n=i.onInit||null,a=i.onAttrChange||null,f=i.effects||null,u=i.attributes||null,d=u?ye(u):f,w=u?new Set(Object.keys(u)):null,h=i.persist||null;function p(m){const b=m||document.body;if(Y(b,e,t,o),u&&B())for(const v in u){const Ne=u[v],M=Array.from(b.querySelectorAll("["+v+"]"));b.matches&&b.matches("["+v+"]")&&M.push(b);for(let $=0;$<M.length;$++){const N=M[$];E(N)&&X(Ne,N.getAttribute(v),v,l,N)}}n&&n(b)}const C=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let b;for(;(b=m.exec(e))!==null;)C.push(b[1])}else C.push(e);ke({selector:e,attribute:t,componentTag:l,attributes:u,ComponentFn:o,onInit:n,observed:C.concat(s),onAttributeChange:r,onAttrChange:a,effects:d,declared:w,persist:h}),Se();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,x=i.subtreeQuery||(y?e:"["+e+"]"),A={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:x};D().push(A),c&&x&&R().push(A),te(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ne,window.lnCore.observeLifecycle=Oe);function S(){ve()>0?_e(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",S):S(),p}function oe(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,o={},l=oe(t);if(!l)return o;const i=l.split("&");for(let s=0;s<i.length;s++){const r=i[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{o[n]=decodeURIComponent(a)}catch{o[n]=a}}return o}function Le(e){if(!e)return null;const t=F();return e in t?t[e]:null}function qe(e,t){if(!e)return;const o=F();t==null?delete o[e]:o[e]=String(t);const i=Object.keys(o).map(function(s){const r=o[s];return r===""?s:s+":"+encodeURIComponent(r)}).join("&");oe(location.hash)!==i&&(location.hash=i)}function Ie(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function De(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 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 Re(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Te(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Me(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),i=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=F,window.lnCore.hashGet=Le,window.lnCore.hashSet=qe,window.lnCore.hashLinkClick=Ie,window.lnCore.resolveHashNamespace=De,window.lnCore.hashSortEncode=Re,window.lnCore.hashSortDecode=Te,window.lnCore.hashFilterEncode=Fe,window.lnCore.hashFilterDecode=Me);function $e(){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=$e),(function(){const e="data-ln-modal",t="lnModal",o="data-ln-modal-for",l="data-ln-modal-close";if(window[t]!==void 0)return;const i={"data-ln-modal":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the modal dialog"},"data-ln-modal-for":{type:"string",description:"Target modal ID to open on trigger click"},"data-ln-modal-mode":{type:"enum",values:["new","edit"],fallback:"new",description:"Operational mode of the modal (new vs edit)"},"data-ln-modal-close":{type:"trigger",description:"Click dismiss trigger inside the modal"}},s=new Set;let r=null;function c(){r||(r=function(u){if(re(u))return;const d=u.target.closest("["+o+"]");if(!d||ie(d))return;const w=d.getAttribute(o);if(!w)return;const h=document.getElementById(w);!h||!h[t]||(u.preventDefault(),d.hasAttribute("data-ln-modal-mode")?h.setAttribute("data-ln-modal-mode",d.getAttribute("data-ln-modal-mode")):h.hasAttribute("data-ln-modal-mode")&&h.setAttribute("data-ln-modal-mode","new"),h.setAttribute(e,"open"))},document.addEventListener("click",r))}function n(){s.size>0||!r||(document.removeEventListener("click",r),r=null)}function a(u){this.dom=u,this.isOpen=u.getAttribute(e)==="open";const d=this;return this._onRequestOpen=function(){d.dom.setAttribute(e,"open")},this._onRequestClose=function(){d.dom.setAttribute(e,"close")},this._onCancel=function(w){w.preventDefault(),d.dom.setAttribute(e,"close")},this._onClose=function(){!d.isOpen||d.dom.getAttribute(e)!=="open"||d.dom.open||(d._isNativeClosing=!0,d.dom.setAttribute(e,"close"))},this._onClickClose=function(w){const h=w.target.closest("["+l+"]");h&&d.dom.contains(h)&&(w.preventDefault(),d.dom.setAttribute(e,"close"))},this.dom.addEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.addEventListener("ln-modal:request-close",this._onRequestClose),this.dom.addEventListener("cancel",this._onCancel),this.dom.addEventListener("close",this._onClose),this.dom.addEventListener("click",this._onClickClose),s.add(this),c(),this.isOpen&&(typeof this.dom.showModal=="function"&&this.dom.showModal(),document.body.classList.add("ln-modal-open"),_(this.dom,"ln-modal:open",{modalId:this.dom.id,target:this.dom})),this}a.prototype.open=function(){this.dom.setAttribute(e,"open")},a.prototype.close=function(){this.dom.setAttribute(e,"close")},a.prototype.toggle=function(){const u=this.dom.getAttribute(e);this.dom.setAttribute(e,u==="open"?"close":"open")},a.prototype.destroy=function(){if(this.dom[t]){if(this.dom.removeEventListener("ln-modal:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-modal:request-close",this._onRequestClose),this.dom.removeEventListener("cancel",this._onCancel),this.dom.removeEventListener("close",this._onClose),this.dom.removeEventListener("click",this._onClickClose),s.delete(this),n(),this.isOpen){const u=this.dom;Array.prototype.some.call(document.querySelectorAll("["+e+'="open"]'),function(w){return w!==u})||document.body.classList.remove("ln-modal-open")}delete this.dom[t]}};function f(u){const d=u[t];if(!d)return;const w=!!d._isNativeClosing;d._isNativeClosing=!1;const p=u.getAttribute(e)==="open";if(p===d.isOpen){p&&u.isConnected&&!u.open&&typeof u.showModal=="function"&&u.showModal();return}if(p){if(j(u,"ln-modal:before-open",{modalId:u.id,target:u}).defaultPrevented){u.setAttribute(e,"close");return}d.isOpen=!0,document.body.classList.add("ln-modal-open"),typeof u.showModal=="function"&&u.showModal();const y=u.querySelector("[autofocus]");if(y&&O(y))y.focus();else{const x=u.querySelectorAll('input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled])'),A=Array.prototype.find.call(x,O);if(A)A.focus();else{const S=u.querySelectorAll("a[href], button:not([disabled])"),m=Array.prototype.find.call(S,O);m&&m.focus()}}_(u,"ln-modal:open",{modalId:u.id,target:u})}else{if(!w&&j(u,"ln-modal:before-close",{modalId:u.id,target:u}).defaultPrevented){u.setAttribute(e,"open");return}d.isOpen=!1,u.hasAttribute("data-ln-modal-mode")&&u.setAttribute("data-ln-modal-mode","new"),typeof u.close=="function"&&u.open&&u.close(),document.querySelector("["+e+'="open"]')||document.body.classList.remove("ln-modal-open"),_(u,"ln-modal:close",{modalId:u.id,target:u})}}ne(e,t,a,"ln-modal",{attributes:i})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function $(){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 v(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(!v(n))return}e.apply(console,t)}}function I(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 ee(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(l),l}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function te(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ne(e,t){const r=!!(t&&t.typed),n=t&&t.exclude,l={},a=e.elements,i={};if(r)for(let s=0;s<a.length;s++){const o=a[s];o.name&&o.type==="checkbox"&&!o.disabled&&(i[o.name]=(i[o.name]||0)+1)}for(let s=0;s<a.length;s++){const o=a[s];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(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 c=0;c<o.options.length;c++)o.options[c].selected&&l[o.name].push(o.options[c].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const c=Number(o.value);l[o.name]=o.value===""||isNaN(c)?null:c}else l[o.name]=o.value}return l}function re(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function oe(e,t){const r=e.elements,n=[],l={};for(let a=0;a<r.length;a++){const i=r[a];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let a=0;a<r.length;a++){const i=r[a];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 o=t[s];if(i.type==="checkbox"){if(Array.isArray(o))i.checked=o.indexOf(i.value)!==-1;else if(l[i.name]>1){const c=String(o).split(",").map(function(f){return f.trim()});i.checked=c.indexOf(i.value)!==-1}else i.checked=re(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 c=0;c<i.options.length;c++)i.options[c].selected=o.indexOf(i.options[c].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=oe,window.lnCore.serializeForm=ne,window.lnCore.resolveFormMethod=te);const F={};function ie(e,t){F[e]=t}function le(e){return F[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ie,window.lnCore.getDataMapper=le);function se(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){I(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const T={};function ae(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];T[r]=t}function ce(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return T[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ae,window.lnCore.getLocaleFallback=ce,window.lnCore.ensureLocaleObserver=se);const A={};function ue(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 R(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const s=r[i],o=s.getAttribute("data-ln-field");t[o]!=null&&(s.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const s=n[i],o=s.getAttribute("data-ln-attr").split(",");for(let c=0;c<o.length;c++){const f=o[c].trim().split(":");if(f.length!==2)continue;const u=f[0].trim(),d=f[1].trim();t[d]!=null&&s.setAttribute(u,t[d])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const s=l[i],o=s.getAttribute("data-ln-show");o in t&&s.classList.toggle("hidden",!t[o])}const a=e.querySelectorAll("[data-ln-class]");for(let i=0;i<a.length;i++){const s=a[i],o=s.getAttribute("data-ln-class").split(",");for(let c=0;c<o.length;c++){const f=o[c].trim().split(":");if(f.length!==2)continue;const u=f[0].trim(),d=f[1].trim();d in t&&s.classList.toggle(u,!!t[d])}}return e}function de(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)R(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 a=r.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,s){return t[s]!==void 0?t[s]:""}))}const n=function(a,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let a=0;a<l.length;a++){const i=l[a],s=i.attributes;for(let o=0;o<s.length;o++){const c=s[o];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function fe(e,t,r,n,l,a){const i={};for(let o=0;o<e.children.length;o++){const c=e.children[o],f=c.getAttribute("data-ln-render-key");f&&(i[f]=c)}const s=document.createDocumentFragment();for(let o=0;o<t.length;o++){const c=t[o],f=String(n(c));let u=i[f];if(u)l(u,c,o);else{const d=ue(r,a);if(!d||(M(d,c),u=d.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",f),l(u,c,o)}s.appendChild(u)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=R,window.lnCore.lnFill=de,window.lnCore.renderList=fe);function x(e,t,r){const n=e.getAttribute(t);return n===null?r:n}function j(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function k(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 B(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const _=new Map;function W(e,t){const r=(e?e.join("|"):"")+"::"+t;if(_.has(r))return _.get(r);const n=new Set(e||[]),l=function(a,i){const s=a.getAttribute(i);return s!==null&&n.has(s)?s:t};return _.set(r,l),l}function H(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function U(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function V(e,t,r,n,l){if(!e||t===null)return!0;const a=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=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"?(s(`[${a}] 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:(s(`[${a}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return s(`[${a}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(s(`[${a}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(s(`[${a}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(s(`[${a}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(o){return s(`[${a}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function P(e,t,r){for(const n in r){const[l,a,i]=r[n];Object.defineProperty(e,n,{get:function(){return l(t,a,i)},enumerable:!0,configurable:!0})}return e}function Q(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=W(n.values,n.fallback);break;case"integer":l=j;break;case"float":l=H;break;case"boolean":l=k;break;case"list":l=B;break;case"json":l=U;break;case"string":default:l=x;break}l||(l=x),t[n.prop]=[l,r,n.fallback]}return t}function we(e){const t={};for(const r in e){const n=e[r];n&&n.effect&&(t[r]=n.effect)}return Object.keys(t).length?t:null}function he(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=P,window.lnCore.attrSpec=Q,window.lnCore.attrStr=x,window.lnCore.attrInt=j,window.lnCore.attrBool=k,window.lnCore.attrList=B,window.lnCore.attrEnum=W,window.lnCore.attrFloat=H,window.lnCore.attrJson=U);function p(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 z(e,t,r,n){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(a)&&p(e,i),e.querySelectorAll){const s=e.querySelectorAll(a);for(let o=0;o<s.length;o++)p(s[o],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function pe(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 J(){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 ge(e){const t=J(),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(a=>a.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=he(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 K(e,t,r,n){for(let l=0;l<e.length;l++){const a=e[l];if(!t[a.attribute])continue;const i=a.effects&&a.effects[r];i?i(t,r,n):a.onAttrChange&&(!a.declared||a.declared.has(r))&&a.onAttrChange(t,r,n)}}function Ce(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=J(),l=n.byAttr.get(t),a=$()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!l&&!a)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(a&&v(i)){const s=n.byDeclaredAttr.get(t),o=i.getAttribute(t);for(let c=0;c<s.length;c++)V(s[c].spec,o,t,s[c].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const s=n.byReactive.get(t);s&&K(s,i,t,e.oldValue),n.reactiveWildcard.length&&K(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let s=0;s<l.length;s++){const o=l[s];if(o.handler){o.handler(i,t,e.oldValue);continue}o.onAttributeChange&&i[o.attribute]?o.onAttributeChange(i,t):(z(i,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(i))}}}function me(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ce(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 S(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function L(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 ye(e){const t=S();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,a=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;a&&n.onSubtreeChange(a,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 a=0;a<t.length;a++){const i=t[a];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&p(n,i);else if(n.matches&&n.matches(i.query)&&p(n,i),n.querySelectorAll){const s=n.querySelectorAll(i.query);for(let o=0;o<s.length;o++)p(s[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 a=0;a<t.length;a++){const i=t[a],s=i.query;if(s){if(!l)n.matches&&n.matches(s)&&L(n,i);else if(n.matches&&n.matches(s)&&L(n,i),n.querySelectorAll){const o=n.querySelectorAll(s);for(let c=0;c<o.length;c++)L(o[c],i)}}}}}}}function G(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.type==="childList")try{ye(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ve(e){S().push(e),G()}function X(e,t,r,n,l={}){const a=l.extraAttributes||[],i=l.onAttributeChange||null,s=l.onSubtreeChange||null,o=l.onInit||null,c=l.onAttrChange||null,f=l.effects||null,u=l.attributes||null,d=u?we(u):f,w=u?new Set(Object.keys(u)):null,g=l.persist||null;function b(E){const h=E||document.body;if(z(h,e,t,r),u&&$())for(const m in u){const $e=u[m],D=Array.from(h.querySelectorAll("["+m+"]"));h.matches&&h.matches("["+m+"]")&&D.push(h);for(let N=0;N<D.length;N++){const q=D[N];v(q)&&V($e,q.getAttribute(m),m,n,q)}}o&&o(h)}const C=[];if(e.indexOf("[")!==-1){const E=/\[([\w-]+)/g;let h;for(;(h=E.exec(e))!==null;)C.push(h[1])}else C.push(e);ge({selector:e,attribute:t,componentTag:n,attributes:u,ComponentFn:r,onInit:o,observed:C.concat(a),onAttributeChange:i,onAttrChange:c,effects:d,declared:w,persist:g}),me();const Ne=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,qe=l.subtreeQuery||(Ne?e:"["+e+"]");S().push({selector:e,attribute:t,ComponentFn:r,onInit:o,onSubtreeChange:s,query:qe}),G(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X,window.lnCore.observeLifecycle=ve);function Z(){be()>0?pe(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Z):Z(),b}function Y(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,r={},n=Y(t);if(!n)return r;const l=n.split("&");for(let a=0;a<l.length;a++){const i=l[a];if(!i)continue;const s=i.indexOf(":"),o=s>-1?i.slice(0,s):i,c=s>-1?i.slice(s+1):"";if(o)try{r[o]=decodeURIComponent(c)}catch{r[o]=c}}return r}function Ae(e){if(!e)return null;const t=O();return e in t?t[e]:null}function xe(e,t){if(!e)return;const r=O();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(a){const i=r[a];return i===""?a:a+":"+encodeURIComponent(i)}).join("&");Y(location.hash)!==l&&(location.hash=l)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function _e(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 Le(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),n=e.slice(t+1),l=n?n.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=Ae,window.lnCore.hashSet=xe,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=_e,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=Oe,window.lnCore.hashFilterDecode=Ee);function De(){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=De),(function(){const e="data-ln-nav",t="lnNav";if(window[t]!==void 0)return;const r={"data-ln-nav":{effect:i,type:"string",fallback:"active",description:"CSS class name applied to active navigation links"},"data-ln-nav-exact":{prop:"exact",read:k,effect:i,type:"boolean",fallback:!1,description:"Match exact URL pathname instead of prefix matching"}},n=Q(r);if(history._lnNavCallbacks=history._lnNavCallbacks||[],!history._lnNavPatched){const s=history.pushState;history.pushState=function(){s.apply(history,arguments);for(const c of history._lnNavCallbacks)c()};const o=history.replaceState;history.replaceState=function(){o.apply(history,arguments);for(const c of history._lnNavCallbacks)c()},history._lnNavPatched=!0}function l(s){return this.dom=s,P(this,s,n),this.activeClass=s.getAttribute(e)||"active",this.updateHandler=()=>this.update(),window.addEventListener("popstate",this.updateHandler),history._lnNavCallbacks.push(this.updateHandler),this.observer=null,this.update(),this}l.prototype.update=function(){if(!this.activeClass||ee(this.dom,"ln-nav:before-update",{target:this.dom}).defaultPrevented)return;const o=Array.from(this.dom.querySelectorAll("a")),c=window.location.pathname,f=a(c),u=[];for(const d of o){const w=d.getAttribute("href");if(!w||w==="#"||w.startsWith("#")||w.startsWith("javascript:")||w.startsWith("mailto:")||w.startsWith("tel:")){d.classList.remove(this.activeClass),d.removeAttribute("aria-current");continue}if(d.hostname&&d.hostname!==window.location.hostname){d.classList.remove(this.activeClass),d.removeAttribute("aria-current");continue}const g=a(w),b=g===f,C=!this.exact&&g!=="/"&&f.startsWith(g+"/");b||C?(d.classList.add(this.activeClass),d.setAttribute("aria-current","page"),u.push(d)):(d.classList.remove(this.activeClass),d.removeAttribute("aria-current"))}I(this.dom,"ln-nav:update",{target:this.dom,activeLinks:u})},l.prototype.destroy=function(){if(!this.dom[t])return;this.observer&&this.observer.disconnect(),window.removeEventListener("popstate",this.updateHandler);const s=history._lnNavCallbacks.indexOf(this.updateHandler);s!==-1&&history._lnNavCallbacks.splice(s,1),delete this.dom[t]};function a(s){try{return new URL(s,window.location.href).pathname.replace(/\/$/,"")||"/"}catch{return s.replace(/\/$/,"")||"/"}}function i(s,o){const c=s[t];if(c){if(o===e){if(!s.hasAttribute(e)){c.destroy();return}const f=c.activeClass,u=s.getAttribute(e)||"active";if(f!==u){const d=s.querySelectorAll("a");for(const w of d)f&&w.classList.remove(f);c.activeClass=u}}c.update()}}X(e,t,l,"ln-nav",{attributes:r,onSubtreeChange:function(s){s[t]&&s[t].update()}})})()})();
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 v(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(!v(l))return}e.apply(console,t)}}function T(e,t,r){const l=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function re(e,t,r){const l=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});return e.dispatchEvent(o),o}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ie(e,t){const r=!!(t&&t.typed),l=t&&t.exclude,o={},s=e.elements,i={};if(r)for(let a=0;a<s.length;a++){const n=s[a];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let a=0;a<s.length;a++){const n=s[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")r&&i[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 c=0;c<n.options.length;c++)n.options[c].selected&&o[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")o[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);o[n.name]=n.value===""||isNaN(c)?null:c}else o[n.name]=n.value}return o}function le(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function se(e,t){const r=e.elements,l=[],o={};for(let s=0;s<r.length;s++){const i=r[s];i.name&&i.type==="checkbox"&&(o[i.name]=(o[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 a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const n=t[a];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(o[i.name]>1){const c=String(n).split(",").map(function(u){return u.trim()});i.checked=c.indexOf(i.value)!==-1}else i.checked=le(n);l.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),l.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<i.options.length;c++)i.options[c].selected=n.indexOf(i.options[c].value)!==-1;l.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),l.push(i)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=se,window.lnCore.serializeForm=ie,window.lnCore.resolveFormMethod=oe);const F={};function ae(e,t){F[e]=t}function ce(e){return F[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=ce);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){T(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function de(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];R[r]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ue);const A={};function we(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 M(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const a=r[i],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const a=l[i],n=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const u=n[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&a.setAttribute(d,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const a=o[i],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const a=s[i],n=a.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const u=n[c].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&a.classList.toggle(d,!!t[f])}}return e}function he(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 l=0;l<r.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[l],t??null),r[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)M(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 j(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,a){return t[a]!==void 0?t[a]:""}))}const l=function(s,i){return t[i]!==void 0?t[i]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let s=0;s<o.length;s++){const i=o[s],a=i.attributes;for(let n=0;n<a.length;n++){const c=a[n];c.value.indexOf("{{")!==-1&&i.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function be(e,t,r,l,o,s){const i={};for(let n=0;n<e.children.length;n++){const c=e.children[n],u=c.getAttribute("data-ln-render-key");u&&(i[u]=c)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],u=String(l(c));let d=i[u];if(d)o(d,c,n);else{const f=we(r,s);if(!f||(j(f,c),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,c,n)}a.appendChild(d)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=M,window.lnCore.lnFill=he,window.lnCore.renderList=be);function x(e,t,r){const l=e.getAttribute(t);return l===null?r:l}function B(e,t,r){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?r:l}function _(e,t,r=!1){const l=e.getAttribute(t);if(l===null)return!!r;const o=l.trim().toLowerCase();return!(o==="false"||o==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const k=new Map;function H(e,t){const r=(e?e.join("|"):"")+"::"+t;if(k.has(r))return k.get(r);const l=new Set(e||[]),o=function(s,i){const a=s.getAttribute(i);return a!==null&&l.has(a)?a:t};return k.set(r,o),o}function U(e,t,r){const l=parseFloat(e.getAttribute(t));return isNaN(l)?r:l}function V(e,t,r){const l=e.getAttribute(t);if(!l)return r;try{return JSON.parse(l)}catch{return r}}function P(e,t,r,l,o){if(!e||t===null)return!0;const s=l||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=n=>{o?console.warn(n,o):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,r){for(const l in r){const[o,s,i]=r[l];Object.defineProperty(e,l,{get:function(){return o(t,s,i)},enumerable:!0,configurable:!0})}return e}function z(e){const t={};for(const r in e){const l=e[r];if(!l||!l.prop)continue;let o=l.read;if(!o&&l.type)switch(l.type){case"enum":o=H(l.values,l.fallback);break;case"integer":o=B;break;case"float":o=U;break;case"boolean":o=_;break;case"list":o=W;break;case"json":o=V;break;case"string":default:o=x;break}o||(o=x),t[l.prop]=[o,r,l.fallback]}return t}function pe(e){const t={};for(const r in e){const l=e[r];l&&l.effect&&(t[r]=l.effect)}return Object.keys(t).length?t:null}function ge(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=Q,window.lnCore.attrSpec=z,window.lnCore.attrStr=x,window.lnCore.attrInt=B,window.lnCore.attrBool=_,window.lnCore.attrList=W,window.lnCore.attrEnum=H,window.lnCore.attrFloat=U,window.lnCore.attrJson=V);function p(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,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:l};if(e.matches&&e.matches(s)&&p(e,i),e.querySelectorAll){const a=e.querySelectorAll(s);for(let n=0;n<a.length;n++)p(a[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function me(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 ye(e){const t=K(),r=e.observed||[];for(let l=0;l<r.length;l++){const o=r[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=ge(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 G(e,t,r,l){for(let o=0;o<e.length;o++){const s=e[o];if(!t[s.attribute])continue;const i=s.effects&&s.effects[r];i?i(t,r,l):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,l)}}function ve(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,l=K(),o=l.byAttr.get(t),s=I()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!r&&!o&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&v(i)){const a=l.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let c=0;c<a.length;c++)P(a[c].spec,n,t,a[c].componentTag,i)}if(window.lnCore._debugSink&&(r||o)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const a=l.byReactive.get(t);a&&G(a,i,t,e.oldValue),l.reactiveWildcard.length&&G(l.reactiveWildcard,i,t,e.oldValue)}if(o)for(let a=0;a<o.length;a++){const n=o[a];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(J(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function Ae(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{ve(t[r])}catch(l){console.error("[ln-core] mutation handler failed",t[r].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function S(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function L(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function E(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=S();if(!t.length)return;const r=e.target;if(r){const o=r.nodeType===1?r:r.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=L();if(e.target&&l.length)for(let o=0;o<l.length;o++){const s=l[o],i=s.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;a&&s.onSubtreeChange(a,e)}for(let o=0;o<e.addedNodes.length;o++){const s=e.addedNodes[o];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&p(s,n);else if(s.matches&&s.matches(n.query)&&p(s,n),s.querySelectorAll){const c=s.querySelectorAll(n.query);for(let u=0;u<c.length;u++)p(c[u],n)}}n.onInit&&n.onInit(s)}}}for(let o=0;o<e.removedNodes.length;o++){const s=e.removedNodes[o];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a],c=n.query;if(c){if(!i)s.matches&&s.matches(c)&&E(s,n);else if(s.matches&&s.matches(c)&&E(s,n),s.querySelectorAll){const u=s.querySelectorAll(c);for(let d=0;d<u.length;d++)E(u[d],n)}}}}}}function X(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const l=t[r];if(l.type==="childList")try{xe(l)}catch(o){console.error("[ln-core] lifecycle handler failed",l.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){S().push(e),e.onSubtreeChange&&e.query&&L().push(e),X()}function Y(e,t,r,l,o={}){const s=o.extraAttributes||[],i=o.onAttributeChange||null,a=o.onSubtreeChange||null,n=o.onInit||null,c=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,f=d?pe(d):u,w=d?new Set(Object.keys(d)):null,g=o.persist||null;function b(D){const h=D||document.body;if(J(h,e,t,r),d&&I())for(const m in d){const Te=d[m],N=Array.from(h.querySelectorAll("["+m+"]"));h.matches&&h.matches("["+m+"]")&&N.push(h);for(let q=0;q<N.length;q++){const $=N[q];v($)&&P(Te,$.getAttribute(m),m,l,$)}}n&&n(h)}const C=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let h;for(;(h=D.exec(e))!==null;)C.push(h[1])}else C.push(e);ye({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:r,onInit:n,observed:C.concat(s),onAttributeChange:i,onAttrChange:c,effects:f,declared:w,persist:g}),Ae();const Ie=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,ee=o.subtreeQuery||(Ie?e:"["+e+"]"),te={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:a,query:ee};S().push(te),a&&ee&&L().push(te),X(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Y,window.lnCore.observeLifecycle=_e);function ne(){Ce()>0?me(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ne):ne(),b}function Z(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,r={},l=Z(t);if(!l)return r;const o=l.split("&");for(let s=0;s<o.length;s++){const i=o[s];if(!i)continue;const a=i.indexOf(":"),n=a>-1?i.slice(0,a):i,c=a>-1?i.slice(a+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function ke(e){if(!e)return null;const t=O();return e in t?t[e]:null}function Se(e,t){if(!e)return;const r=O();t==null?delete r[e]:r[e]=String(t);const o=Object.keys(r).map(function(s){const i=r[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");Z(location.hash)!==o&&(location.hash=o)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ee(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 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 Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(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 Ne(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=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:r,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=ke,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Ee,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Ne,window.lnCore.hashFilterDecode=qe);function $e(){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=$e),(function(){const e="data-ln-nav",t="lnNav";if(window[t]!==void 0)return;const r={"data-ln-nav":{effect:i,type:"string",fallback:"active",description:"CSS class name applied to active navigation links"},"data-ln-nav-exact":{prop:"exact",read:_,effect:i,type:"boolean",fallback:!1,description:"Match exact URL pathname instead of prefix matching"}},l=z(r);if(history._lnNavCallbacks=history._lnNavCallbacks||[],!history._lnNavPatched){const a=history.pushState;history.pushState=function(){a.apply(history,arguments);for(const c of history._lnNavCallbacks)c()};const n=history.replaceState;history.replaceState=function(){n.apply(history,arguments);for(const c of history._lnNavCallbacks)c()},history._lnNavPatched=!0}function o(a){return this.dom=a,Q(this,a,l),this.activeClass=a.getAttribute(e)||"active",this.updateHandler=()=>this.update(),window.addEventListener("popstate",this.updateHandler),history._lnNavCallbacks.push(this.updateHandler),this.observer=null,this.update(),this}o.prototype.update=function(){if(!this.activeClass||re(this.dom,"ln-nav:before-update",{target:this.dom}).defaultPrevented)return;const n=Array.from(this.dom.querySelectorAll("a")),c=window.location.pathname,u=s(c),d=[];for(const f of n){const w=f.getAttribute("href");if(!w||w==="#"||w.startsWith("#")||w.startsWith("javascript:")||w.startsWith("mailto:")||w.startsWith("tel:")){f.classList.remove(this.activeClass),f.removeAttribute("aria-current");continue}if(f.hostname&&f.hostname!==window.location.hostname){f.classList.remove(this.activeClass),f.removeAttribute("aria-current");continue}const g=s(w),b=g===u,C=!this.exact&&g!=="/"&&u.startsWith(g+"/");b||C?(f.classList.add(this.activeClass),f.setAttribute("aria-current","page"),d.push(f)):(f.classList.remove(this.activeClass),f.removeAttribute("aria-current"))}T(this.dom,"ln-nav:update",{target:this.dom,activeLinks:d})},o.prototype.destroy=function(){if(!this.dom[t])return;this.observer&&this.observer.disconnect(),window.removeEventListener("popstate",this.updateHandler);const a=history._lnNavCallbacks.indexOf(this.updateHandler);a!==-1&&history._lnNavCallbacks.splice(a,1),delete this.dom[t]};function s(a){try{return new URL(a,window.location.href).pathname.replace(/\/$/,"")||"/"}catch{return a.replace(/\/$/,"")||"/"}}function i(a,n){const c=a[t];if(c){if(n===e){if(!a.hasAttribute(e)){c.destroy();return}const u=c.activeClass,d=a.getAttribute(e)||"active";if(u!==d){const f=a.querySelectorAll("a");for(const w of f)u&&w.classList.remove(u);c.activeClass=d}}c.update()}}Y(e,t,o,"ln-nav",{attributes:r,onSubtreeChange:function(a){a[t]&&a[t].update()}})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function V(){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 F(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){i=t[l];break}if(!F(i))return}e.apply(console,t)}}function v(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 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 se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ae(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,l={},a=e.elements,n={};if(r)for(let s=0;s<a.length;s++){const o=a[s];o.name&&o.type==="checkbox"&&!o.disabled&&(n[o.name]=(n[o.name]||0)+1)}for(let s=0;s<a.length;s++){const o=a[s];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(i&&o.matches&&o.matches(i)))if(o.type==="checkbox")r&&n[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 u=0;u<o.options.length;u++)o.options[u].selected&&l[o.name].push(o.options[u].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const u=Number(o.value);l[o.name]=o.value===""||isNaN(u)?null:u}else l[o.name]=o.value}return l}function ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ce(e,t){const r=e.elements,i=[],l={};for(let a=0;a<r.length;a++){const n=r[a];n.name&&n.type==="checkbox"&&(l[n.name]=(l[n.name]||0)+1)}for(let a=0;a<r.length;a++){const n=r[a];if(n.type==="file"||n.type==="submit"||n.type==="button")continue;const s=n.getAttribute("data-ln-fill-as")||n.name;if(!s||!(s in t))continue;const o=t[s];if(n.type==="checkbox"){if(Array.isArray(o))n.checked=o.indexOf(n.value)!==-1;else if(l[n.name]>1){const u=String(o).split(",").map(function(c){return c.trim()});n.checked=u.indexOf(n.value)!==-1}else n.checked=ue(o);i.push(n)}else if(n.type==="radio")n.checked=n.value===String(o),i.push(n);else if(n.type==="select-multiple"){if(Array.isArray(o))for(let u=0;u<n.options.length;u++)n.options[u].selected=o.indexOf(n.options[u].value)!==-1;i.push(n)}else n.value=o,n.tagName==="SELECT"&&o!=null&&n.setAttribute("data-ln-value",o),i.push(n)}return i}function de(e,t,{get:r,set:i}){Object.defineProperty(e,"value",{get:function(){return r?r.call(this):t.get.call(this)},set:function(l){i?i.call(this,l,a=>t.set.call(this,a)):t.set.call(this,l)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=ae,window.lnCore.resolveFormMethod=se);const B={};function fe(e,t){B[e]=t}function he(e){return B[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=fe,window.lnCore.getDataMapper=he);function y(e){const t=e?e.closest("[lang]"):null,r=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return r?r.trim():"en-US"}function W(){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 we(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];P[r]=t}function pe(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=we,window.lnCore.getLocaleFallback=pe,window.lnCore.ensureLocaleObserver=W);const L={};function me(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=L[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function U(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let n=0;n<r.length;n++){const s=r[n],o=s.getAttribute("data-ln-field");t[o]!=null&&(s.textContent=t[o])}const i=e.querySelectorAll("[data-ln-attr]");for(let n=0;n<i.length;n++){const s=i[n],o=s.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const c=o[u].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),f=c[1].trim();t[f]!=null&&s.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let n=0;n<l.length;n++){const s=l[n],o=s.getAttribute("data-ln-show");o in t&&s.classList.toggle("hidden",!t[o])}const a=e.querySelectorAll("[data-ln-class]");for(let n=0;n<a.length;n++){const s=a[n],o=s.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const c=o[u].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),f=c[1].trim();f in t&&s.classList.toggle(d,!!t[f])}}return e}function be(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)U(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 K(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const a=r.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(n,s){return t[s]!==void 0?t[s]:""}))}const i=function(a,n){return t[n]!==void 0?t[n]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let a=0;a<l.length;a++){const n=l[a],s=n.attributes;for(let o=0;o<s.length;o++){const u=s[o];u.value.indexOf("{{")!==-1&&n.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function ge(e,t,r,i,l,a){const n={};for(let o=0;o<e.children.length;o++){const u=e.children[o],c=u.getAttribute("data-ln-render-key");c&&(n[c]=u)}const s=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],c=String(i(u));let d=n[c];if(d)l(d,u,o);else{const f=me(r,a);if(!f||(K(f,u),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",c),l(d,u,o)}s.appendChild(d)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=K,window.lnCore.fill=U,window.lnCore.lnFill=be,window.lnCore.renderList=ge);function O(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function Q(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function G(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function J(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const T=new Map;function z(e,t){const r=(e?e.join("|"):"")+"::"+t;if(T.has(r))return T.get(r);const i=new Set(e||[]),l=function(a,n){const s=a.getAttribute(n);return s!==null&&i.has(s)?s:t};return T.set(r,l),l}function X(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function Y(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function Z(e,t,r,i,l){if(!e||t===null)return!0;const a=i||"ln-component",n=e.type;if(n==="trigger"||n==="marker"||n==="string"||n==="list"||!n||t===""&&e.fallback!==void 0)return!0;const s=o=>{l?console.warn(o,l):console.warn(o)};if(n==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(s(`[${a}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(n==="enum"){const o=e.values||[];return o.includes(t)?!0:(s(`[${a}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(n==="integer"){if(!/^-?\d+$/.test(t))return s(`[${a}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(s(`[${a}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(s(`[${a}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(n==="float")return isNaN(Number(t))?(s(`[${a}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(n==="json")try{return JSON.parse(t),!0}catch(o){return s(`[${a}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function ye(e,t,r){for(const i in r){const[l,a,n]=r[i];Object.defineProperty(e,i,{get:function(){return l(t,a,n)},enumerable:!0,configurable:!0})}return e}function Ce(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=z(i.values,i.fallback);break;case"integer":l=Q;break;case"float":l=X;break;case"boolean":l=G;break;case"list":l=J;break;case"json":l=Y;break;case"string":default:l=O;break}l||(l=O),t[i.prop]=[l,r,i.fallback]}return t}function _e(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 ve(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=ye,window.lnCore.attrSpec=Ce,window.lnCore.attrStr=O,window.lnCore.attrInt=Q,window.lnCore.attrBool=G,window.lnCore.attrList=J,window.lnCore.attrEnum=z,window.lnCore.attrFloat=X,window.lnCore.attrJson=Y);function E(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function ee(e,t,r,i){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",n={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(a)&&E(e,n),e.querySelectorAll){const s=e.querySelectorAll(a);for(let o=0;o<s.length;o++)E(s[o],n)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function xe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ae(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 te(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function De(e){const t=te(),r=e.observed||[];for(let i=0;i<r.length;i++){const l=r[i];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const l=t.byDeclaredAttr.get(i);l.some(a=>a.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=ve(e);if(i===null)t.reactiveWildcard.push(e);else for(const l of i)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function ne(e,t,r,i){for(let l=0;l<e.length;l++){const a=e[l];if(!t[a.attribute])continue;const n=a.effects&&a.effects[r];n?n(t,r,i):a.onAttrChange&&(!a.declared||a.declared.has(r))&&a.onAttrChange(t,r,i)}}function Ne(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=te(),l=i.byAttr.get(t),a=V()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!l&&!a)return;const n=e.target;if(e.oldValue!==n.getAttribute(t)){if(a&&F(n)){const s=i.byDeclaredAttr.get(t),o=n.getAttribute(t);for(let u=0;u<s.length;u++)Z(s[u].spec,o,t,s[u].componentTag,n)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,n,{oldValue:e.oldValue,newValue:n.getAttribute(t)}),r){const s=i.byReactive.get(t);s&&ne(s,n,t,e.oldValue),i.reactiveWildcard.length&&ne(i.reactiveWildcard,n,t,e.oldValue)}if(l)for(let s=0;s<l.length;s++){const o=l[s];if(o.handler){o.handler(n,t,e.oldValue);continue}o.onAttributeChange&&n[o.attribute]?o.onAttributeChange(n,t):(ee(n,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(n))}}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,S(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ne(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 I(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function $(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Se(e){const t=I();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const i=t[r];if(i.onSubtreeChange&&i.query){const l=i.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;a&&i.onSubtreeChange(a,e)}}for(let r=0;r<e.addedNodes.length;r++){const i=e.addedNodes[r];if(i.nodeType===1){const l=!!(i.firstElementChild||i.children&&i.children.length);for(let a=0;a<t.length;a++){const n=t[a];if(n.selector&&n.attribute&&n.ComponentFn){if(!l)i.matches&&i.matches(n.query)&&E(i,n);else if(i.matches&&i.matches(n.query)&&E(i,n),i.querySelectorAll){const s=i.querySelectorAll(n.query);for(let o=0;o<s.length;o++)E(s[o],n)}}n.onInit&&n.onInit(i)}}}for(let r=0;r<e.removedNodes.length;r++){const i=e.removedNodes[r];if(i.nodeType===1){const l=!!(i.firstElementChild||i.children&&i.children.length);for(let a=0;a<t.length;a++){const n=t[a],s=n.query;if(s){if(!l)i.matches&&i.matches(s)&&$(i,n);else if(i.matches&&i.matches(s)&&$(i,n),i.querySelectorAll){const o=i.querySelectorAll(s);for(let u=0;u<o.length;u++)$(o[u],n)}}}}}}}function ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,S(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{Se(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ke(e){I().push(e),ie()}function re(e,t,r,i,l={}){const a=l.extraAttributes||[],n=l.onAttributeChange||null,s=l.onSubtreeChange||null,o=l.onInit||null,u=l.onAttrChange||null,c=l.effects||null,d=l.attributes||null,f=d?_e(d):c,p=d?new Set(Object.keys(d)):null,w=l.persist||null;function m(N){const h=N||document.body;if(ee(h,e,t,r),d&&V())for(const g in d){const R=d[g],H=Array.from(h.querySelectorAll("["+g+"]"));h.matches&&h.matches("["+g+"]")&&H.push(h);for(let j=0;j<H.length;j++){const M=H[j];F(M)&&Z(R,M.getAttribute(g),g,i,M)}}o&&o(h)}const b=[];if(e.indexOf("[")!==-1){const N=/\[([\w-]+)/g;let h;for(;(h=N.exec(e))!==null;)b.push(h[1])}else b.push(e);De({selector:e,attribute:t,componentTag:i,attributes:d,ComponentFn:r,onInit:o,observed:b.concat(a),onAttributeChange:n,onAttrChange:u,effects:f,declared:p,persist:w}),Ee();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,D=l.subtreeQuery||(A?e:"["+e+"]");I().push({selector:e,attribute:t,ComponentFn:r,onInit:o,onSubtreeChange:s,query:D}),ie(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=re,window.lnCore.observeLifecycle=ke);function x(){xe()>0?Ae(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",x):x(),m}function oe(e){return(e||"").replace(/^#/,"")}function q(e){const t=e===void 0?location.hash:e,r={},i=oe(t);if(!i)return r;const l=i.split("&");for(let a=0;a<l.length;a++){const n=l[a];if(!n)continue;const s=n.indexOf(":"),o=s>-1?n.slice(0,s):n,u=s>-1?n.slice(s+1):"";if(o)try{r[o]=decodeURIComponent(u)}catch{r[o]=u}}return r}function Re(e){if(!e)return null;const t=q();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const r=q();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(a){const n=r[a];return n===""?a:a+":"+encodeURIComponent(n)}).join("&");oe(location.hash)!==l&&(location.hash=l)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Oe(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 Te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ie(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 $e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function qe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),i=e.slice(t+1),l=i?i.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=q,window.lnCore.hashGet=Re,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Oe,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=Ie,window.lnCore.hashFilterEncode=$e,window.lnCore.hashFilterDecode=qe);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 _={};function k(e){const t=e||"default";if(!_[t]){const r=new Intl.NumberFormat(e,{useGrouping:!0}),i=r.formatToParts(1234.5);let l="",a=".";for(let n=0;n<i.length;n++)i[n].type==="group"&&(l=i[n].value),i[n].type==="decimal"&&(a=i[n].value);_[t]={groupSep:l,decimalSep:a,fmt:r}}return _[t]}function le(e,t,r){if(e==null||typeof e!="string")return"";let i=e.trim();return i===""?"":(i=i.replace(/[$€£¥]/g,""),t&&(i=i.split(t).join("")),i=i.replace(/\s/g,""),r&&r!=="."&&(i=i.replace(r,".")),i=i.replace(/[^\d.-]/g,""),i)}function je(e,t){if(typeof e=="number")return isNaN(e)?NaN:e;if(e==null||typeof e!="string")return NaN;const r=e.trim();if(r===""||r==="-")return NaN;const i=k(t),l=le(r,i.groupSep,i.decimalSep);if(l===""||l==="-")return NaN;const a=parseFloat(l);return isNaN(a)?NaN:a}function C(e,t,r={}){if(typeof e!="number"||isNaN(e)||!Number.isFinite(e))return"";const i=t||"default",l=r.maxDecimals!=null?parseInt(r.maxDecimals,10):null,a=r.userDecimals!=null?r.userDecimals:null;if(l!==null){const n=i+"|max:"+l;return _[n]||(_[n]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:l})),_[n].format(e)}if(a!==null&&a>0){const n=i+"|exact:"+a;return _[n]||(_[n]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:a,maximumFractionDigits:a})),_[n].format(e)}return k(t).fmt.format(e)}function Me(e,t){if(!e)return 0;if(t<=0)return e.startsWith("-")?1:0;let r=t,i=0;for(let l=0;l<e.length&&r>0;l++)i=l+1,/[0-9]/.test(e[l])&&r--;return r>0&&(i=e.length),i}(function(){const e="data-ln-number",t="lnNumber";if(window[t]!==void 0)return;function r(n){const s=n[t];s&&(s.isTextElement?s._initTextElement():isNaN(s.value)||s._displayFormatted(s.value))}const i={"data-ln-number":{type:"marker",effect:r,description:"Activates localized number formatting on input or text element"},"data-ln-value":{type:"float",effect:r,description:"Raw unformatted numeric value"},"data-ln-number-decimals":{type:"integer",fallback:0,min:0,max:20,effect:r,description:"Number of decimal fraction digits"},"data-ln-number-min":{type:"float",effect:r,description:"Minimum allowed numeric value"},"data-ln-number-max":{type:"float",effect:r,description:"Maximum allowed numeric value"}},l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function a(n){if(n[t])return n[t];n[t]=this,this.dom=n;const s=this;if(this._onLocaleChange=function(){s.isTextElement?s._formatTextContent():isNaN(s.value)||s._displayFormatted(s.value)},W(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),n.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;const o=document.createElement("input");o.type="hidden",o.name=n.name,n.removeAttribute("name"),n.hasAttribute("data-ln-fill-as")&&o.setAttribute("data-ln-fill-as",n.getAttribute("data-ln-fill-as")),n.type="text",n.setAttribute("inputmode","decimal"),n.insertAdjacentElement("afterend",o),this._hidden=o,Object.defineProperty(o,"value",{get:function(){return l.get.call(o)},set:function(c){if(l.set.call(o,c),c!==""&&!isNaN(parseFloat(c))){const d=s.dom.getAttribute("data-ln-number-decimals");s._setDisplayRaw(C(parseFloat(c),y(s.dom),{maxDecimals:d}))}else s._setDisplayRaw("");s.dom.dispatchEvent(new Event("input",{bubbles:!0}))}}),de(n,l,{get:function(){return l.get.call(n)},set:function(c){if(c===""){s._setDisplayRaw(""),s._setHiddenRaw(""),n.dispatchEvent(new Event("input",{bubbles:!0}));return}const d=typeof c=="number"?c:parseFloat(String(c));if(isNaN(d))s._setDisplayRaw(String(c)),s._setHiddenRaw("");else{s._setHiddenRaw(d);const f=n.getAttribute("data-ln-number-decimals");s._setDisplayRaw(C(d,y(n),{maxDecimals:f}))}n.dispatchEvent(new Event("input",{bubbles:!0}))}}),this._onInput=function(){s._handleInput()},n.addEventListener("input",this._onInput),this._onKeyDown=function(c){if(c.key!=="Backspace")return;const d=n.selectionStart,f=n.selectionEnd;if(d!==f||d===0)return;const p=k(y(n)),w=l.get.call(n),m=w[d-1];if(m===p.groupSep||/\s/.test(m)){c.preventDefault();const b=d-2>=0?d-2:0,A=w.slice(0,b)+w.slice(d);l.set.call(n,A),n.setSelectionRange(b,b),n.dispatchEvent(new Event("input",{bubbles:!0}))}},n.addEventListener("keydown",this._onKeyDown),this._onPaste=function(c){c.preventDefault();const d=(c.clipboardData||window.clipboardData).getData("text"),f=je(d,y(n));s.value=isNaN(f)?NaN:f},n.addEventListener("paste",this._onPaste);const u=n.value;if(u!==""){const c=parseFloat(u);if(!isNaN(c)){const d=n.getAttribute("data-ln-number-decimals");this._setHiddenRaw(c),this._setDisplayRaw(C(c,y(n),{maxDecimals:d})),n.dispatchEvent(new Event("input",{bubbles:!0}))}}return n.form&&(this._onFormReset=function(){setTimeout(function(){const c=n.defaultValue;if(c!==""){const d=parseFloat(c);if(!isNaN(d)){const f=n.getAttribute("data-ln-number-decimals");s._setHiddenRaw(d),s._setDisplayRaw(C(d,y(n),{maxDecimals:f})),n.dispatchEvent(new Event("input",{bubbles:!0}));return}}s._setHiddenRaw(""),s._setDisplayRaw(""),n.dispatchEvent(new Event("input",{bubbles:!0}))},0)},n.form.addEventListener("reset",this._onFormReset)),this}a.prototype._initTextElement=function(){const n=this.dom;let s=n.getAttribute("data-ln-value"),o=n.getAttribute("data-ln-number"),u=null;s!==null&&s!==""?u=s:o!==null&&o!==""&&o!=="true"?u=o:u=n.textContent.trim();const c=parseFloat(u);isNaN(c)?this._rawValue=null:(this._rawValue=c,n.hasAttribute("data-ln-value")||n.setAttribute("data-ln-value",String(c)),this._formatTextContent())},a.prototype._formatTextContent=function(){if(this._rawValue!==null&&!isNaN(this._rawValue)){const n=this.dom.getAttribute("data-ln-number-decimals");this.dom.textContent=C(this._rawValue,y(this.dom),{maxDecimals:n})}},a.prototype._handleInput=function(){const n=this.dom,s=l.get.call(n);if(s===""){this._setHiddenRaw(""),v(n,"ln-number:input",{value:NaN,formatted:""});return}if(s==="-"){this._setHiddenRaw(""),v(n,"ln-number:input",{value:NaN,formatted:"-"});return}const o=n.selectionStart;let u=0;for(let h=0;h<o;h++)/[0-9]/.test(s[h])&&u++;const c=y(n),d=k(c);let f=s,p=le(s,d.groupSep,d.decimalSep),w=parseFloat(p);if(isNaN(w)){this._setHiddenRaw(""),v(n,"ln-number:input",{value:NaN,formatted:s});return}const m=n.getAttribute("data-ln-number-decimals"),b=p.indexOf(".");if(m!==null&&b!==-1){const h=parseInt(m,10),g=p.slice(b+1);if(h===0)p=p.slice(0,b),f=f.split(d.decimalSep)[0],w=parseFloat(p),this._setDisplayRaw(f);else if(g.length>h){p=p.slice(0,b+1+h);const R=f.split(d.decimalSep);f=R[0]+d.decimalSep+R[1].slice(0,h),w=parseFloat(p),this._setDisplayRaw(f)}}const A=n.getAttribute("data-ln-number-max");if(A!==null&&w>parseFloat(A)){const h=parseFloat(A),g=C(h,c,{maxDecimals:m});this._setDisplayRaw(g),this._setHiddenRaw(h),n.setSelectionRange(g.length,g.length),v(n,"ln-number:input",{value:h,formatted:g});return}if(f.endsWith(d.decimalSep)||d.decimalSep!=="."&&f.endsWith(".")){this._setHiddenRaw(w),v(n,"ln-number:input",{value:w,formatted:f});return}const D=p.indexOf(".");if(D!==-1&&p.slice(D+1).endsWith("0")){this._setHiddenRaw(w),v(n,"ln-number:input",{value:w,formatted:f});return}let x;if(m!==null)x=C(w,c,{maxDecimals:m});else{const h=D!==-1?p.slice(D+1).length:0;x=C(w,c,{userDecimals:h})}this._setDisplayRaw(x);const N=Me(x,u);n.setSelectionRange(N,N),this._setHiddenRaw(w),v(n,"ln-number:input",{value:w,formatted:x})},a.prototype._setHiddenRaw=function(n){this._hidden&&l.set.call(this._hidden,String(n))},a.prototype._setDisplayRaw=function(n){this.isTextElement?this.dom.textContent=String(n):l.set.call(this.dom,String(n))},a.prototype._displayFormatted=function(n){if(this.isTextElement)this._formatTextContent();else{const s=this.dom.getAttribute("data-ln-number-decimals");this._setDisplayRaw(C(n,y(this.dom),{maxDecimals:s}))}},Object.defineProperty(a.prototype,"value",{get:function(){if(this.isTextElement)return this._rawValue;const n=l.get.call(this._hidden);return n===""?NaN:parseFloat(n)},set:function(n){const s=typeof n=="number"?n:parseFloat(n);if(this.isTextElement){isNaN(s)?(this._rawValue=null,this.dom.textContent=""):(this._rawValue=s,this.dom.setAttribute("data-ln-value",String(s)),this._formatTextContent());return}if(isNaN(s)){this._setDisplayRaw(""),this._setHiddenRaw(""),this.dom.dispatchEvent(new Event("input",{bubbles:!0}));return}this._setHiddenRaw(s);const o=this.dom.getAttribute("data-ln-number-decimals");this._setDisplayRaw(C(s,y(this.dom),{maxDecimals:o})),this.dom.dispatchEvent(new Event("input",{bubbles:!0}))}}),Object.defineProperty(a.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:l.get.call(this.dom)}}),a.prototype.destroy=function(){this.dom[t]&&(this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement||(this._onFormReset&&this.dom.form&&this.dom.form.removeEventListener("reset",this._onFormReset),this.dom.removeEventListener("input",this._onInput),this.dom.removeEventListener("keydown",this._onKeyDown),this.dom.removeEventListener("paste",this._onPaste),this._hidden&&(this.dom.name=this._hidden.name,this._hidden.remove()),this.dom.type="number",this.dom.removeAttribute("inputmode")),delete this.dom[t])},re(e,t,a,"ln-number",{attributes:i,extraAttributes:["lang"],onAttributeChange:r})})()})();
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 T(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!T(r))return}e.apply(console,t)}}function D(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 L(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){L(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ue(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,o={},a=e.elements,s={};if(n)for(let u=0;u<a.length;u++){const i=a[u];i.name&&i.type==="checkbox"&&!i.disabled&&(s[i.name]=(s[i.name]||0)+1)}for(let u=0;u<a.length;u++){const i=a[u];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&&s[i.name]===1?o[i.name]=i.checked:(o[i.name]||(o[i.name]=[]),i.checked&&o[i.name].push(i.value));else if(i.type==="radio")i.checked&&(o[i.name]=i.value);else if(i.type==="select-multiple"){o[i.name]=[];for(let l=0;l<i.options.length;l++)i.options[l].selected&&o[i.name].push(i.options[l].value)}else if(n&&i.type==="hidden")o[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const l=Number(i.value);o[i.name]=i.value===""||isNaN(l)?null:l}else o[i.name]=i.value}return o}function de(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function fe(e,t){const n=e.elements,r=[],o={};for(let a=0;a<n.length;a++){const s=n[a];s.name&&s.type==="checkbox"&&(o[s.name]=(o[s.name]||0)+1)}for(let a=0;a<n.length;a++){const s=n[a];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const u=s.getAttribute("data-ln-fill-as")||s.name;if(!u||!(u in t))continue;const i=t[u];if(s.type==="checkbox"){if(Array.isArray(i))s.checked=i.indexOf(s.value)!==-1;else if(o[s.name]>1){const l=String(i).split(",").map(function(c){return c.trim()});s.checked=l.indexOf(s.value)!==-1}else s.checked=de(i);r.push(s)}else if(s.type==="radio")s.checked=s.value===String(i),r.push(s);else if(s.type==="select-multiple"){if(Array.isArray(i))for(let l=0;l<s.options.length;l++)s.options[l].selected=i.indexOf(s.options[l].value)!==-1;r.push(s)}else s.value=i,s.tagName==="SELECT"&&i!=null&&s.setAttribute("data-ln-value",i),r.push(s)}return r}function he(e,t,{get:n,set:r}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(o){r?r.call(this,o,a=>t.set.call(this,a)):t.set.call(this,o)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=fe,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=ue);const P={};function we(e,t){P[e]=t}function pe(e){return P[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=pe);function _(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function U(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,L(function(){new MutationObserver(function(){D(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const K={};function me(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];K[n]=t}function be(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return K[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=me,window.lnCore.getLocaleFallback=be,window.lnCore.ensureLocaleObserver=U);const I={};function ge(e,t){I[e]||(I[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=I[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Q(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const u=n[s],i=u.getAttribute("data-ln-field");t[i]!=null&&(u.textContent=t[i])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const u=r[s],i=u.getAttribute("data-ln-attr").split(",");for(let l=0;l<i.length;l++){const c=i[l].trim().split(":");if(c.length!==2)continue;const f=c[0].trim(),d=c[1].trim();t[d]!=null&&u.setAttribute(f,t[d])}}const o=e.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const u=o[s],i=u.getAttribute("data-ln-show");i in t&&u.classList.toggle("hidden",!t[i])}const a=e.querySelectorAll("[data-ln-class]");for(let s=0;s<a.length;s++){const u=a[s],i=u.getAttribute("data-ln-class").split(",");for(let l=0;l<i.length;l++){const c=i[l].trim().split(":");if(c.length!==2)continue;const f=c[0].trim(),d=c[1].trim();d in t&&u.classList.toggle(f,!!t[d])}}return e}function ye(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)Q(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function G(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,u){return t[u]!==void 0?t[u]:""}))}const r=function(a,s){return t[s]!==void 0?t[s]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let a=0;a<o.length;a++){const s=o[a],u=s.attributes;for(let i=0;i<u.length;i++){const l=u[i];l.value.indexOf("{{")!==-1&&s.setAttribute(l.name,l.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function Ce(e,t,n,r,o,a){const s={};for(let i=0;i<e.children.length;i++){const l=e.children[i],c=l.getAttribute("data-ln-render-key");c&&(s[c]=l)}const u=document.createDocumentFragment();for(let i=0;i<t.length;i++){const l=t[i],c=String(r(l));let f=s[c];if(f)o(f,l,i);else{const d=ge(n,a);if(!d||(G(d,l),f=d.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",c),o(f,l,i)}u.appendChild(f)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=G,window.lnCore.fill=Q,window.lnCore.lnFill=ye,window.lnCore.renderList=Ce);function $(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 z(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 q=new Map;function Y(e,t){const n=(e?e.join("|"):"")+"::"+t;if(q.has(n))return q.get(n);const r=new Set(e||[]),o=function(a,s){const u=a.getAttribute(s);return u!==null&&r.has(u)?u:t};return q.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 a=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const u=i=>{o?console.warn(i,o):console.warn(i)};if(s==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(u(`[${a}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const i=e.values||[];return i.includes(t)?!0:(u(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return u(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(u(`[${a}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(u(`[${a}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(u(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(i){return u(`[${a}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function _e(e,t,n){for(const r in n){const[o,a,s]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,a,s)},enumerable:!0,configurable:!0})}return e}function ve(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=z;break;case"list":o=X;break;case"json":o=ee;break;case"string":default:o=$;break}o||(o=$),t[r.prop]=[o,n,r.fallback]}return t}function xe(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 Ae(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=_e,window.lnCore.attrSpec=ve,window.lnCore.attrStr=$,window.lnCore.attrInt=J,window.lnCore.attrBool=z,window.lnCore.attrList=X,window.lnCore.attrEnum=Y,window.lnCore.attrFloat=Z,window.lnCore.attrJson=ee);function F(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 a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(a)&&F(e,s),e.querySelectorAll){const u=e.querySelectorAll(a);for(let i=0;i<u.length;i++)F(u[i],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ee(){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 ie(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ne(e){const t=ie(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(a=>a.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Ae(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 re(e,t,n,r){for(let o=0;o<e.length;o++){const a=e[o];if(!t[a.attribute])continue;const s=a.effects&&a.effects[n];s?s(t,n,r):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,r)}}function Se(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=ie(),o=r.byAttr.get(t),a=W()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!o&&!a)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(a&&T(s)){const u=r.byDeclaredAttr.get(t),i=s.getAttribute(t);for(let l=0;l<u.length;l++)te(u[l].spec,i,t,u[l].componentTag,s)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),n){const u=r.byReactive.get(t);u&&re(u,s,t,e.oldValue),r.reactiveWildcard.length&&re(r.reactiveWildcard,s,t,e.oldValue)}if(o)for(let u=0;u<o.length;u++){const i=o[u];if(i.handler){i.handler(s,t,e.oldValue);continue}i.onAttributeChange&&s[i.attribute]?i.onAttributeChange(s,t):(ne(s,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(s))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,L(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Se(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 H(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function j(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function M(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Re(e){const t=H();if(!t.length)return;const n=e.target;if(n){const o=n.nodeType===1?n:n.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=j();if(e.target&&r.length)for(let o=0;o<r.length;o++){const a=r[o],s=a.query,u=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;u&&a.onSubtreeChange(u,e)}for(let o=0;o<e.addedNodes.length;o++){const a=e.addedNodes[o];if(a.nodeType===1){const s=!!(a.firstElementChild||a.children&&a.children.length);for(let u=0;u<t.length;u++){const i=t[u];if(i.selector&&i.attribute&&i.ComponentFn){if(!s)a.matches&&a.matches(i.query)&&F(a,i);else if(a.matches&&a.matches(i.query)&&F(a,i),a.querySelectorAll){const l=a.querySelectorAll(i.query);for(let c=0;c<l.length;c++)F(l[c],i)}}i.onInit&&i.onInit(a)}}}for(let o=0;o<e.removedNodes.length;o++){const a=e.removedNodes[o];if(a.nodeType===1){const s=!!(a.firstElementChild||a.children&&a.children.length);for(let u=0;u<t.length;u++){const i=t[u],l=i.query;if(l){if(!s)a.matches&&a.matches(l)&&M(a,i);else if(a.matches&&a.matches(l)&&M(a,i),a.querySelectorAll){const c=a.querySelectorAll(l);for(let f=0;f<c.length;f++)M(c[f],i)}}}}}}function oe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,L(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Re(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Fe(e){H().push(e),e.onSubtreeChange&&e.query&&j().push(e),oe()}function le(e,t,n,r,o={}){const a=o.extraAttributes||[],s=o.onAttributeChange||null,u=o.onSubtreeChange||null,i=o.onInit||null,l=o.onAttrChange||null,c=o.effects||null,f=o.attributes||null,d=f?xe(f):c,h=f?new Set(Object.keys(f)):null,p=o.persist||null;function m(N){const y=N||document.body;if(ne(y,e,t,n),f&&W())for(const S in f){const g=f[S],x=Array.from(y.querySelectorAll("["+S+"]"));y.matches&&y.matches("["+S+"]")&&x.push(y);for(let R=0;R<x.length;R++){const B=x[R];T(B)&&te(g,B.getAttribute(S),S,r,B)}}i&&i(y)}const w=[];if(e.indexOf("[")!==-1){const N=/\[([\w-]+)/g;let y;for(;(y=N.exec(e))!==null;)w.push(y[1])}else w.push(e);Ne({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:i,observed:w.concat(a),onAttributeChange:s,onAttrChange:l,effects:d,declared:h,persist:p}),ke();const b=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=o.subtreeQuery||(b?e:"["+e+"]"),E={selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:u,query:C};H().push(E),u&&C&&j().push(E),oe(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le,window.lnCore.observeLifecycle=Fe);function k(){Ee()>0?De(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",k):k(),m}function se(e){return(e||"").replace(/^#/,"")}function V(e){const t=e===void 0?location.hash:e,n={},r=se(t);if(!r)return n;const o=r.split("&");for(let a=0;a<o.length;a++){const s=o[a];if(!s)continue;const u=s.indexOf(":"),i=u>-1?s.slice(0,u):s,l=u>-1?s.slice(u+1):"";if(i)try{n[i]=decodeURIComponent(l)}catch{n[i]=l}}return n}function Le(e){if(!e)return null;const t=V();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const n=V();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(a){const s=n[a];return s===""?a:a+":"+encodeURIComponent(s)}).join("&");se(location.hash)!==o&&(location.hash=o)}function Te(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ie(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(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 He(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function je(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=V,window.lnCore.hashGet=Le,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Te,window.lnCore.resolveHashNamespace=Ie,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=He,window.lnCore.hashFilterDecode=je);function Me(){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=Me);const A={};function O(e){const t=e||"default";if(!A[t]){const n=new Intl.NumberFormat(e,{useGrouping:!0}),r=n.formatToParts(1234.5);let o="",a=".";for(let s=0;s<r.length;s++)r[s].type==="group"&&(o=r[s].value),r[s].type==="decimal"&&(a=r[s].value);A[t]={groupSep:o,decimalSep:a,fmt:n}}return A[t]}function ae(e,t,n){if(e==null||typeof e!="string")return"";let r=e.trim();return r===""?"":(r=r.replace(/[$€£¥]/g,""),t&&(r=r.split(t).join("")),r=r.replace(/\s/g,""),n&&n!=="."&&(r=r.replace(n,".")),r=r.replace(/[^\d.-]/g,""),r)}function Ve(e,t){if(typeof e=="number")return isNaN(e)?NaN:e;if(e==null||typeof e!="string")return NaN;const n=e.trim();if(n===""||n==="-")return NaN;const r=O(t),o=ae(n,r.groupSep,r.decimalSep);if(o===""||o==="-")return NaN;const a=parseFloat(o);return isNaN(a)?NaN:a}function v(e,t,n={}){if(typeof e!="number"||isNaN(e)||!Number.isFinite(e))return"";const r=t||"default",o=n.maxDecimals!=null?parseInt(n.maxDecimals,10):null,a=n.userDecimals!=null?n.userDecimals:null;if(o!==null){const s=r+"|max:"+o;return A[s]||(A[s]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:o})),A[s].format(e)}if(a!==null&&a>0){const s=r+"|exact:"+a;return A[s]||(A[s]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:a,maximumFractionDigits:a})),A[s].format(e)}return O(t).fmt.format(e)}function Be(e,t){if(!e)return 0;if(t<=0)return e.startsWith("-")?1:0;let n=t,r=0;for(let o=0;o<e.length&&n>0;o++)r=o+1,/[0-9]/.test(e[o])&&n--;return n>0&&(r=e.length),r}(function(){const e="data-ln-number",t="lnNumber";if(window[t]!==void 0)return;function n(l){const c=l[t];c&&(c.isTextElement?c._initTextElement():isNaN(c.value)||c._displayFormatted(c.value))}const r={"data-ln-number":{type:"marker",effect:n,description:"Activates localized number formatting on input or text element"},"data-ln-value":{type:"float",effect:n,description:"Raw unformatted numeric value"},"data-ln-number-decimals":{type:"integer",fallback:0,min:0,max:20,effect:n,description:"Number of decimal fraction digits"},"data-ln-number-min":{type:"float",effect:n,description:"Minimum allowed numeric value"},"data-ln-number-max":{type:"float",effect:n,description:"Maximum allowed numeric value"}},o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),a=new Set;let s=!1;function u(){U(),!s&&(s=!0,document.addEventListener("ln-core:locale-change",function(){a.forEach(function(l){l.isTextElement?l._formatTextContent():isNaN(l.value)||l._displayFormatted(l.value)})}))}function i(l){if(l[t])return l[t];if(l[t]=this,this.dom=l,a.add(this),u(),l.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;const c=document.createElement("input");c.type="hidden",c.name=l.name,l.removeAttribute("name"),l.hasAttribute("data-ln-fill-as")&&c.setAttribute("data-ln-fill-as",l.getAttribute("data-ln-fill-as")),l.type="text",l.setAttribute("inputmode","decimal"),l.insertAdjacentElement("afterend",c),this._hidden=c,Object.defineProperty(c,"value",{get:function(){return o.get.call(c)},set:function(d){if(o.set.call(c,d),d!==""&&!isNaN(parseFloat(d))){const h=self.dom.getAttribute("data-ln-number-decimals");self._setDisplayRaw(v(parseFloat(d),_(self.dom),{maxDecimals:h}))}else self._setDisplayRaw("");self.dom.dispatchEvent(new Event("input",{bubbles:!0}))}}),he(l,o,{get:function(){return o.get.call(l)},set:function(d){if(d===""){self._setDisplayRaw(""),self._setHiddenRaw(""),l.dispatchEvent(new Event("input",{bubbles:!0}));return}const h=typeof d=="number"?d:parseFloat(String(d));if(isNaN(h))self._setDisplayRaw(String(d)),self._setHiddenRaw("");else{self._setHiddenRaw(h);const p=l.getAttribute("data-ln-number-decimals");self._setDisplayRaw(v(h,_(l),{maxDecimals:p}))}l.dispatchEvent(new Event("input",{bubbles:!0}))}}),this._onInput=function(){self._handleInput()},l.addEventListener("input",this._onInput),this._onKeyDown=function(d){if(d.key!=="Backspace")return;const h=l.selectionStart,p=l.selectionEnd;if(h!==p||h===0)return;const m=O(_(l)),w=o.get.call(l),b=w[h-1];if(b===m.groupSep||/\s/.test(b)){d.preventDefault();const C=h-2>=0?h-2:0,E=w.slice(0,C)+w.slice(h);o.set.call(l,E),l.setSelectionRange(C,C),l.dispatchEvent(new Event("input",{bubbles:!0}))}},l.addEventListener("keydown",this._onKeyDown),this._onPaste=function(d){d.preventDefault();const h=(d.clipboardData||window.clipboardData).getData("text"),p=Ve(h,_(l));self.value=isNaN(p)?NaN:p},l.addEventListener("paste",this._onPaste);const f=l.value;if(f!==""){const d=parseFloat(f);if(!isNaN(d)){const h=l.getAttribute("data-ln-number-decimals");this._setHiddenRaw(d),this._setDisplayRaw(v(d,_(l),{maxDecimals:h})),l.dispatchEvent(new Event("input",{bubbles:!0}))}}return l.form&&(this._onFormReset=function(){setTimeout(function(){const d=l.defaultValue;if(d!==""){const h=parseFloat(d);if(!isNaN(h)){const p=l.getAttribute("data-ln-number-decimals");self._setHiddenRaw(h),self._setDisplayRaw(v(h,_(l),{maxDecimals:p})),l.dispatchEvent(new Event("input",{bubbles:!0}));return}}self._setHiddenRaw(""),self._setDisplayRaw(""),l.dispatchEvent(new Event("input",{bubbles:!0}))},0)},l.form.addEventListener("reset",this._onFormReset)),this}i.prototype._initTextElement=function(){const l=this.dom;let c=l.getAttribute("data-ln-value"),f=l.getAttribute("data-ln-number"),d=null;c!==null&&c!==""?d=c:f!==null&&f!==""&&f!=="true"?d=f:d=l.textContent.trim();const h=parseFloat(d);isNaN(h)?this._rawValue=null:(this._rawValue=h,l.hasAttribute("data-ln-value")||l.setAttribute("data-ln-value",String(h)),this._formatTextContent())},i.prototype._formatTextContent=function(){if(this._rawValue!==null&&!isNaN(this._rawValue)){const l=this.dom.getAttribute("data-ln-number-decimals");this.dom.textContent=v(this._rawValue,_(this.dom),{maxDecimals:l})}},i.prototype._handleInput=function(){const l=this.dom,c=o.get.call(l);if(c===""){this._setHiddenRaw(""),D(l,"ln-number:input",{value:NaN,formatted:""});return}if(c==="-"){this._setHiddenRaw(""),D(l,"ln-number:input",{value:NaN,formatted:"-"});return}const f=l.selectionStart;let d=0;for(let g=0;g<f;g++)/[0-9]/.test(c[g])&&d++;const h=_(l),p=O(h);let m=c,w=ae(c,p.groupSep,p.decimalSep),b=parseFloat(w);if(isNaN(b)){this._setHiddenRaw(""),D(l,"ln-number:input",{value:NaN,formatted:c});return}const C=l.getAttribute("data-ln-number-decimals"),E=w.indexOf(".");if(C!==null&&E!==-1){const g=parseInt(C,10),x=w.slice(E+1);if(g===0)w=w.slice(0,E),m=m.split(p.decimalSep)[0],b=parseFloat(w),this._setDisplayRaw(m);else if(x.length>g){w=w.slice(0,E+1+g);const R=m.split(p.decimalSep);m=R[0]+p.decimalSep+R[1].slice(0,g),b=parseFloat(w),this._setDisplayRaw(m)}}const k=l.getAttribute("data-ln-number-max");if(k!==null&&b>parseFloat(k)){const g=parseFloat(k),x=v(g,h,{maxDecimals:C});this._setDisplayRaw(x),this._setHiddenRaw(g),l.setSelectionRange(x.length,x.length),D(l,"ln-number:input",{value:g,formatted:x});return}if(m.endsWith(p.decimalSep)||p.decimalSep!=="."&&m.endsWith(".")){this._setHiddenRaw(b),D(l,"ln-number:input",{value:b,formatted:m});return}const N=w.indexOf(".");if(N!==-1&&w.slice(N+1).endsWith("0")){this._setHiddenRaw(b),D(l,"ln-number:input",{value:b,formatted:m});return}let y;if(C!==null)y=v(b,h,{maxDecimals:C});else{const g=N!==-1?w.slice(N+1).length:0;y=v(b,h,{userDecimals:g})}this._setDisplayRaw(y);const S=Be(y,d);l.setSelectionRange(S,S),this._setHiddenRaw(b),D(l,"ln-number:input",{value:b,formatted:y})},i.prototype._setHiddenRaw=function(l){this._hidden&&o.set.call(this._hidden,String(l))},i.prototype._setDisplayRaw=function(l){this.isTextElement?this.dom.textContent=String(l):o.set.call(this.dom,String(l))},i.prototype._displayFormatted=function(l){if(this.isTextElement)this._formatTextContent();else{const c=this.dom.getAttribute("data-ln-number-decimals");this._setDisplayRaw(v(l,_(this.dom),{maxDecimals:c}))}},Object.defineProperty(i.prototype,"value",{get:function(){if(this.isTextElement)return this._rawValue;const l=o.get.call(this._hidden);return l===""?NaN:parseFloat(l)},set:function(l){const c=typeof l=="number"?l:parseFloat(l);if(this.isTextElement){isNaN(c)?(this._rawValue=null,this.dom.textContent=""):(this._rawValue=c,this.dom.setAttribute("data-ln-value",String(c)),this._formatTextContent());return}if(isNaN(c)){this._setDisplayRaw(""),this._setHiddenRaw(""),this.dom.dispatchEvent(new Event("input",{bubbles:!0}));return}this._setHiddenRaw(c);const f=this.dom.getAttribute("data-ln-number-decimals");this._setDisplayRaw(v(c,_(this.dom),{maxDecimals:f})),this.dom.dispatchEvent(new Event("input",{bubbles:!0}))}}),Object.defineProperty(i.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:o.get.call(this.dom)}}),i.prototype.destroy=function(){this.dom[t]&&(a.delete(this),this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement||(this._onFormReset&&this.dom.form&&this.dom.form.removeEventListener("reset",this._onFormReset),this.dom.removeEventListener("input",this._onInput),this.dom.removeEventListener("keydown",this._onKeyDown),this.dom.removeEventListener("paste",this._onPaste),this._hidden&&(this.dom.name=this._hidden.name,this._hidden.remove()),this.dom.type="number",this.dom.removeAttribute("inputmode")),delete this.dom[t])},le(e,t,i,"ln-number",{attributes:r,extraAttributes:["lang"],onAttributeChange:n})})()})();
@@ -30,22 +30,31 @@ import { calculateCursorPosition } from './number-model.js';
30
30
 
31
31
  // ─── Component ─────────────────────────────────────────────
32
32
 
33
+ const _instances = new Set();
34
+ let _localeListenerBound = false;
35
+
36
+ function _ensureLocaleListener() {
37
+ ensureLocaleObserver();
38
+ if (_localeListenerBound) return;
39
+ _localeListenerBound = true;
40
+ document.addEventListener('ln-core:locale-change', function () {
41
+ _instances.forEach(function (inst) {
42
+ if (inst.isTextElement) {
43
+ inst._formatTextContent();
44
+ } else if (!isNaN(inst.value)) {
45
+ inst._displayFormatted(inst.value);
46
+ }
47
+ });
48
+ });
49
+ }
50
+
33
51
  function _component(dom) {
34
52
  if (dom[DOM_ATTRIBUTE]) return dom[DOM_ATTRIBUTE];
35
53
  dom[DOM_ATTRIBUTE] = this;
36
54
  this.dom = dom;
37
- const self = this;
38
-
39
- // ── Subscribe to global locale changes ──────────────
40
- this._onLocaleChange = function () {
41
- if (self.isTextElement) {
42
- self._formatTextContent();
43
- } else if (!isNaN(self.value)) {
44
- self._displayFormatted(self.value);
45
- }
46
- };
47
- ensureLocaleObserver();
48
- document.addEventListener('ln-core:locale-change', this._onLocaleChange);
55
+
56
+ _instances.add(this);
57
+ _ensureLocaleListener();
49
58
 
50
59
  if (dom.tagName !== 'INPUT') {
51
60
  this.isTextElement = true;
@@ -396,6 +405,7 @@ import { calculateCursorPosition } from './number-model.js';
396
405
 
397
406
  _component.prototype.destroy = function () {
398
407
  if (!this.dom[DOM_ATTRIBUTE]) return;
408
+ _instances.delete(this);
399
409
  if (this._onLocaleChange) {
400
410
  document.removeEventListener('ln-core:locale-change', this._onLocaleChange);
401
411
  }