@livenetworks/ashlar 2.1.4 → 2.1.5

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 (56) 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-autosave/ln-autosave.js +1 -1
  6. package/components/ln-chart/ln-chart.js +1 -1
  7. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  8. package/components/ln-confirm/ln-confirm.js +1 -1
  9. package/components/ln-core/helpers.js +1 -1
  10. package/components/ln-core/index.js +1 -1
  11. package/components/ln-core/lifecycle.js +41 -0
  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-debug/ln-debug.js +1 -1
  17. package/components/ln-dropdown/ln-dropdown.js +1 -1
  18. package/components/ln-editor/ln-editor.js +1 -1
  19. package/components/ln-external-links/ln-external-links.js +1 -1
  20. package/components/ln-filter/ln-filter.js +1 -1
  21. package/components/ln-form/ln-form.js +1 -1
  22. package/components/ln-icon/ln-icon.js +1 -1
  23. package/components/ln-include/ln-include.js +1 -1
  24. package/components/ln-key/ln-key.js +1 -1
  25. package/components/ln-link/ln-link.js +1 -1
  26. package/components/ln-list/ln-list.js +1 -1
  27. package/components/ln-modal/ln-modal.js +1 -1
  28. package/components/ln-nav/ln-nav.js +1 -1
  29. package/components/ln-number/ln-number.js +1 -1
  30. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  31. package/components/ln-options/ln-options.js +1 -1
  32. package/components/ln-picklist/ln-picklist.js +1 -1
  33. package/components/ln-popover/ln-popover.js +1 -1
  34. package/components/ln-progress/ln-progress.js +1 -1
  35. package/components/ln-router/ln-router.js +1 -1
  36. package/components/ln-scroll/ln-scroll.js +1 -1
  37. package/components/ln-search/ln-search.js +1 -1
  38. package/components/ln-slug/ln-slug.js +1 -1
  39. package/components/ln-sort/ln-sort.js +1 -1
  40. package/components/ln-sort/src/ln-sort.js +13 -11
  41. package/components/ln-sortable/ln-sortable.js +1 -1
  42. package/components/ln-stat/ln-stat.js +1 -1
  43. package/components/ln-table/ln-table.js +1 -1
  44. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  45. package/components/ln-tabs/ln-tabs.js +1 -1
  46. package/components/ln-time/ln-time.js +1 -1
  47. package/components/ln-toast/ln-toast.js +1 -1
  48. package/components/ln-toggle/ln-toggle.js +1 -1
  49. package/components/ln-tooltip/ln-tooltip.js +1 -1
  50. package/components/ln-translations/ln-translations.js +1 -1
  51. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  52. package/components/ln-upload/ln-upload.js +1 -1
  53. package/components/ln-validate/ln-validate.js +1 -1
  54. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  55. package/package.json +1 -1
  56. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function M(){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 s=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){s=t[r];break}if(!E(s))return}e.apply(console,t)}}function S(e,t,o){const s=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:s}))}function j(e,t,o){const s=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});return e.dispatchEvent(r),r}function x(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){x(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function re(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const o=!!(t&&t.typed),s=t&&t.exclude,r={},l=e.elements,i={};if(o)for(let c=0;c<l.length;c++){const n=l[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let c=0;c<l.length;c++){const n=l[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(s&&n.matches&&n.matches(s)))if(n.type==="checkbox")o&&i[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&r[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")r[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);r[n.name]=n.value===""||isNaN(u)?null:u}else r[n.name]=n.value}return r}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,s=[],r={};for(let l=0;l<o.length;l++){const i=o[l];i.name&&i.type==="checkbox"&&(r[i.name]=(r[i.name]||0)+1)}for(let l=0;l<o.length;l++){const i=o[l];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 n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(r[i.name]>1){const u=String(n).split(",").map(function(p){return p.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=ce(n);s.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),s.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<i.options.length;u++)i.options[u].selected=n.indexOf(i.options[u].value)!==-1;s.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),s.push(i)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ue,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=se);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,x(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const P={};function pe(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];P[o]=t}function he(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=pe,window.lnCore.getLocaleFallback=he,window.lnCore.ensureLocaleObserver=fe);const O={};function ge(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 H(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],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const s=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const p=n[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),a=p[1].trim();t[a]!=null&&c.setAttribute(f,t[a])}}const r=e.querySelectorAll("[data-ln-show]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const l=e.querySelectorAll("[data-ln-class]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const p=n[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),a=p[1].trim();a in t&&c.classList.toggle(f,!!t[a])}}return e}function we(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 s=0;s<o.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[s],t??null),o[s].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)H(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 V(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const l=o.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const s=function(l,i){return t[i]!==void 0?t[i]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let l=0;l<r.length;l++){const i=r[l],c=i.attributes;for(let n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return e}function be(e,t,o,s,r,l){const i={};for(let n=0;n<e.children.length;n++){const u=e.children[n],p=u.getAttribute("data-ln-render-key");p&&(i[p]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],p=String(s(u));let f=i[p];if(f)r(f,u,n);else{const a=ge(o,l);if(!a||(V(a,u),f=a.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",p),r(f,u,n)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=H,window.lnCore.lnFill=we,window.lnCore.renderList=be);function L(e,t,o){const s=e.getAttribute(t);return s===null?o:s}function U(e,t,o){const s=parseInt(e.getAttribute(t),10);return isNaN(s)?o:s}function K(e,t,o=!1){const s=e.getAttribute(t);if(s===null)return!!o;const r=s.trim().toLowerCase();return!(r==="false"||r==="0")}function Q(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const T=new Map;function z(e,t){const o=(e?e.join("|"):"")+"::"+t;if(T.has(o))return T.get(o);const s=new Set(e||[]),r=function(l,i){const c=l.getAttribute(i);return c!==null&&s.has(c)?c:t};return T.set(o,r),r}function J(e,t,o){const s=parseFloat(e.getAttribute(t));return isNaN(s)?o:s}function G(e,t,o){const s=e.getAttribute(t);if(!s)return o;try{return JSON.parse(s)}catch{return o}}function X(e,t,o,s,r){if(!e||t===null)return!0;const l=s||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{r?console.warn(n,r):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${l}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${l}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${l}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${l}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${l}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${l}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${l}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function me(e,t,o){for(const s in o){const[r,l,i]=o[s];Object.defineProperty(e,s,{get:function(){return r(t,l,i)},enumerable:!0,configurable:!0})}return e}function ye(e){const t={};for(const o in e){const s=e[o];if(!s||!s.prop)continue;let r=s.read;if(!r&&s.type)switch(s.type){case"enum":r=z(s.values,s.fallback);break;case"integer":r=U;break;case"float":r=J;break;case"boolean":r=K;break;case"list":r=Q;break;case"json":r=G;break;case"string":default:r=L;break}r||(r=L),t[s.prop]=[r,o,s.fallback]}return t}function Ce(e){const t={};for(const o in e){const s=e[o];s&&s.effect&&(t[o]=s.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 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=me,window.lnCore.attrSpec=ye,window.lnCore.attrStr=L,window.lnCore.attrInt=U,window.lnCore.attrBool=K,window.lnCore.attrList=Q,window.lnCore.attrEnum=z,window.lnCore.attrFloat=J,window.lnCore.attrJson=G);function A(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,s){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:s};if(e.matches&&e.matches(l)&&A(e,i),e.querySelectorAll){const c=e.querySelectorAll(l);for(let n=0;n<c.length;n++)A(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function _e(){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 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 s=0;s<o.length;s++){const r=o[s];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const s in e.attributes){t.byDeclaredAttr.has(s)||t.byDeclaredAttr.set(s,[]);const r=t.byDeclaredAttr.get(s);r.some(l=>l.componentTag===e.componentTag)||r.push({spec:e.attributes[s],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const s=ve(e);if(s===null)t.reactiveWildcard.push(e);else for(const r of s)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function ee(e,t,o,s){for(let r=0;r<e.length;r++){const l=e[r];if(!t[l.attribute])continue;const i=l.effects&&l.effects[o];i?i(t,o,s):l.onAttrChange&&(!l.declared||l.declared.has(o))&&l.onAttrChange(t,o,s)}}function xe(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,s=Z(),r=s.byAttr.get(t),l=M()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(t);if(!o&&!r&&!l)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(l&&E(i)){const c=s.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let u=0;u<c.length;u++)X(c[u].spec,n,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(o||r)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=s.byReactive.get(t);c&&ee(c,i,t,e.oldValue),s.reactiveWildcard.length&&ee(s.reactiveWildcard,i,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const n=r[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Y(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,x(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{xe(t[o])}catch(s){console.error("[ln-core] mutation handler failed",t[o].target,s)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function R(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function q(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function D(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(s){console.error("["+t.attribute+"] destroy failed",e,s)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Se(e){const t=R();if(!t.length)return;const o=e.target;if(o){const r=o.nodeType===1?o:o.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const s=q();if(e.target&&s.length)for(let r=0;r<s.length;r++){const l=s[r],i=l.query,c=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;c&&l.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const l=e.addedNodes[r];if(l.nodeType===1){const i=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)l.matches&&l.matches(n.query)&&A(l,n);else if(l.matches&&l.matches(n.query)&&A(l,n),l.querySelectorAll){const u=l.querySelectorAll(n.query);for(let p=0;p<u.length;p++)A(u[p],n)}}n.onInit&&n.onInit(l)}}}for(let r=0;r<e.removedNodes.length;r++){const l=e.removedNodes[r];if(l.nodeType===1){const i=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!i)l.matches&&l.matches(u)&&D(l,n);else if(l.matches&&l.matches(u)&&D(l,n),l.querySelectorAll){const p=l.querySelectorAll(u);for(let f=0;f<p.length;f++)D(p[f],n)}}}}}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,x(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const s=t[o];if(s.type==="childList")try{Se(s)}catch(r){console.error("[ln-core] lifecycle handler failed",s.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){R().push(e),e.onSubtreeChange&&e.query&&q().push(e),te()}function I(e,t,o,s,r={}){const l=r.extraAttributes||[],i=r.onAttributeChange||null,c=r.onSubtreeChange||null,n=r.onInit||null,u=r.onAttrChange||null,p=r.effects||null,f=r.attributes||null,a=f?Ce(f):p,h=f?new Set(Object.keys(f)):null,g=r.persist||null;function b(v){const y=v||document.body;if(Y(y,e,t,o),f&&M())for(const k in f){const Be=f[k],$=Array.from(y.querySelectorAll("["+k+"]"));y.matches&&y.matches("["+k+"]")&&$.push(y);for(let N=0;N<$.length;N++){const B=$[N];E(B)&&X(Be,B.getAttribute(k),k,s,B)}}n&&n(y)}const d=[];if(e.indexOf("[")!==-1){const v=/\[([\w-]+)/g;let y;for(;(y=v.exec(e))!==null;)d.push(y[1])}else d.push(e);ke({selector:e,attribute:t,componentTag:s,attributes:f,ComponentFn:o,onInit:n,observed:d.concat(l),onAttributeChange:i,onAttrChange:u,effects:a,declared:h,persist:g}),Ee();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,_=r.subtreeQuery||(C?e:"["+e+"]"),w={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:_};R().push(w),c&&_&&q().push(w),te(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=I,window.lnCore.observeLifecycle=Oe);function m(){_e()>0?Ae(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):m(),b}function ne(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,o={},s=ne(t);if(!s)return o;const r=s.split("&");for(let l=0;l<r.length;l++){const i=r[l];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function Le(e){if(!e)return null;const t=F();return e in t?t[e]:null}function Te(e,t){if(!e)return;const o=F();t==null?delete o[e]:o[e]=String(t);const r=Object.keys(o).map(function(l){const i=o[l];return i===""?l:l+":"+encodeURIComponent(i)}).join("&");ne(location.hash)!==r&&(location.hash=r)}function Re(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 s=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return s?t?s+"-"+t:s:t||null}function De(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 Fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function $e(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),s=e.slice(t+1),r=s?s.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:o,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=F,window.lnCore.hashGet=Le,window.lnCore.hashSet=Te,window.lnCore.hashLinkClick=Re,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=Ie,window.lnCore.hashFilterEncode=Fe,window.lnCore.hashFilterDecode=$e);function oe(e,t,o,s){const r=s,l=window.innerWidth,i=window.innerHeight,c=t.width,n=t.height,u=(o||"bottom").split("-"),p=u[0],f=u[1]==="start"||u[1]==="end"?u[1]:"center",a={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},h=a[p]||a.bottom;function g(w){return w==="top"||w==="bottom"?f==="start"?e.left:f==="end"?e.right-c:e.left+(e.width-c)/2:f==="start"?e.top:f==="end"?e.bottom-n:e.top+(e.height-n)/2}function b(w){let m,v,y=!0;return w==="top"?(m=e.top-r-n,v=g(w),m<0&&(y=!1)):w==="bottom"?(m=e.bottom+r,v=g(w),m+n>i&&(y=!1)):w==="left"?(m=g(w),v=e.left-r-c,v<0&&(y=!1)):(m=g(w),v=e.right+r,v+c>l&&(y=!1)),{top:m,left:v,side:w,fits:y}}let d=null;for(let w=0;w<h.length;w++){const m=b(h[w]);if(m.fits){d=m;break}}d||(d=b(h[0]));let C=d.top,_=d.left;return c>=l?_=0:(_<0&&(_=0),_+c>l&&(_=l-c)),n>=i?C=0:(C<0&&(C=0),C+n>i&&(C=i-n)),{top:C,left:_,placement:d.side}}function ie(e){if(!e)return{width:0,height:0};const t=e.style,o=t.visibility,s=t.display,r=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const l=e.offsetWidth,i=e.offsetHeight;return t.visibility=o,t.display=s,t.position=r,{width:l,height:i}}function Ne(){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=Ne),(function(){const e="data-ln-popover",t="lnPopover",o="data-ln-popover-for",s="data-ln-popover-position";if(window[t]!==void 0)return;const r={"data-ln-popover":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the popover"},"data-ln-popover-for":{type:"string",description:"Target element ID that this trigger controls"},"data-ln-popover-position":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:"bottom",description:"Preferred positioning anchor"},"data-ln-popover-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"}},l=[];let i=null;function c(){i||(i=function(a){if(a.key!=="Escape"||l.length===0)return;l[l.length-1].close()},document.addEventListener("keydown",i))}function n(){l.length>0||i&&(document.removeEventListener("keydown",i),i=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open",this.trigger=null,this._previousFocus=null,this._boundDocClick=null,this._docClickTimeout=null,this._boundReposition=null;const h=this;return this._onRequestOpen=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.open(b)},this._onRequestClose=function(){h.close()},this._onRequestToggle=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.toggle(b)},this._onNativeToggle=function(g){g.newState==="closed"&&h.isOpen&&(h._applyClose(),h.dom.setAttribute(e,"closed"))},a.addEventListener("ln-popover:request-open",this._onRequestOpen),a.addEventListener("ln-popover:request-close",this._onRequestClose),a.addEventListener("ln-popover:request-toggle",this._onRequestToggle),a.addEventListener("toggle",this._onNativeToggle),a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.hasAttribute("role")||a.setAttribute("role","dialog"),a.hasAttribute("popover")||a.setAttribute("popover","manual"),this.isOpen&&this._applyOpen(null),this}u.prototype.open=function(a){this.isOpen||(this.trigger=a||null,this.dom.setAttribute(e,"open"))},u.prototype.close=function(){this.isOpen&&this.dom.setAttribute(e,"closed")},u.prototype.toggle=function(a){this.isOpen?this.close():this.open(a)},u.prototype._applyOpen=function(a){this.isOpen=!0,a&&(this.trigger=a),this._previousFocus=document.activeElement,typeof this.dom.showPopover=="function"&&this.dom.showPopover();const h=ie(this.dom);if(this.trigger){const C=this.trigger.getBoundingClientRect(),_=this.dom.getAttribute(s)||"bottom",w=oe(C,h,_,8);this.dom.style.top=w.top+"px",this.dom.style.left=w.left+"px",this.dom.setAttribute("data-ln-popover-placement",w.placement),this.trigger.setAttribute("aria-expanded","true")}const g=this.dom.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.prototype.find.call(g,re);b?b.focus():this.dom.focus();const d=this;this._boundDocClick=function(C){d.dom.contains(C.target)||d.trigger&&d.trigger.contains(C.target)||d.close()},d._docClickTimeout=setTimeout(function(){d._docClickTimeout=null,document.addEventListener("click",d._boundDocClick)},0),this._repositionRaf=null,this._performReposition=function(){if(!d.trigger||!document.contains(d.dom))return;const C=d.trigger.getBoundingClientRect(),_=ie(d.dom),w=d.dom.getAttribute(s)||"bottom",m=oe(C,_,w,8),v=m.top+"px",y=m.left+"px";d.dom.style.top!==v&&(d.dom.style.top=v),d.dom.style.left!==y&&(d.dom.style.left=y),d.dom.getAttribute("data-ln-popover-placement")!==m.placement&&d.dom.setAttribute("data-ln-popover-placement",m.placement)},this._boundReposition=function(){d._repositionRaf||(d._repositionRaf=requestAnimationFrame(function(){d._repositionRaf=null,d._performReposition()}))},window.addEventListener("scroll",this._boundReposition,{passive:!0,capture:!0}),window.addEventListener("resize",this._boundReposition),l.push(this),c(),S(this.dom,"ln-popover:open",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger})},u.prototype._applyClose=function(){this.isOpen=!1,this._repositionRaf&&(cancelAnimationFrame(this._repositionRaf),this._repositionRaf=null),this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null),this._boundReposition&&(window.removeEventListener("scroll",this._boundReposition,{capture:!0}),window.removeEventListener("resize",this._boundReposition),this._boundReposition=null),this.dom.style.top="",this.dom.style.left="",this.dom.removeAttribute("data-ln-popover-placement"),this.trigger&&this.trigger.setAttribute("aria-expanded","false"),typeof this.dom.hidePopover=="function"&&this.dom.matches(":popover-open")&&this.dom.hidePopover();const a=l.indexOf(this);a!==-1&&l.splice(a,1),n(),this._previousFocus&&this.trigger&&this._previousFocus===this.trigger?this.trigger.focus():this.trigger&&document.activeElement===document.body&&this.trigger.focus(),this._previousFocus=null,S(this.dom,"ln-popover:close",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger}),this.trigger=null},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-popover:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-popover:request-close",this._onRequestClose),this.dom.removeEventListener("ln-popover:request-toggle",this._onRequestToggle),this.dom.removeEventListener("toggle",this._onNativeToggle),this.isOpen&&this._applyClose(),delete this.dom[t])};function p(a){this.dom=a;const h=a.getAttribute(o);return a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",h),this._onClick=function(g){if(g.ctrlKey||g.metaKey||g.button===1)return;g.preventDefault();const b=document.getElementById(h);if(!b)return;b[t]&&(b[t].trigger=a);const d=b.getAttribute(e);b.setAttribute(e,d==="open"?"closed":"open")},a.addEventListener("click",this._onClick),this}p.prototype.destroy=function(){this.dom.removeEventListener("click",this._onClick),delete this.dom[t+"Trigger"]};function f(a){const h=a[t];if(!h)return;const b=a.getAttribute(e)==="open";if(b!==h.isOpen)if(b){if(j(a,"ln-popover:before-open",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"closed");return}h._applyOpen(h.trigger)}else{if(j(a,"ln-popover:before-close",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"open");return}h._applyClose()}}I(e,t,u,"ln-popover",{attributes:r}),I(o,t+"Trigger",p,"ln-popover-trigger")})()})();
1
+ (function(){"use strict";function M(){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 s=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){s=t[i];break}if(!E(s))return}e.apply(console,t)}}function S(e,t,o){const s=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:s}))}function j(e,t,o){const s=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s);const i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});return e.dispatchEvent(i),i}function x(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){x(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function se(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function le(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const o=!!(t&&t.typed),s=t&&t.exclude,i={},l=e.elements,r={};if(o)for(let c=0;c<l.length;c++){const n=l[c];n.name&&n.type==="checkbox"&&!n.disabled&&(r[n.name]=(r[n.name]||0)+1)}for(let c=0;c<l.length;c++){const n=l[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(s&&n.matches&&n.matches(s)))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 u=0;u<n.options.length;u++)n.options[u].selected&&i[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")i[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);i[n.name]=n.value===""||isNaN(u)?null:u}else i[n.name]=n.value}return i}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 ae(e,t){const o=e.elements,s=[],i={};for(let l=0;l<o.length;l++){const r=o[l];r.name&&r.type==="checkbox"&&(i[r.name]=(i[r.name]||0)+1)}for(let l=0;l<o.length;l++){const r=o[l];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 u=String(n).split(",").map(function(p){return p.trim()});r.checked=u.indexOf(r.value)!==-1}else r.checked=ue(n);s.push(r)}else if(r.type==="radio")r.checked=r.value===String(n),s.push(r);else if(r.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<r.options.length;u++)r.options[u].selected=n.indexOf(r.options[u].value)!==-1;s.push(r)}else r.value=n,r.tagName==="SELECT"&&n!=null&&r.setAttribute("data-ln-value",n),s.push(r)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ae,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=le);const W={};function de(e,t){W[e]=t}function fe(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=de,window.lnCore.getDataMapper=fe);function pe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,x(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const P={};function he(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];P[o]=t}function we(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=he,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=pe);const O={};function ge(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 H(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 s=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<s.length;r++){const c=s[r],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const p=n[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),a=p[1].trim();t[a]!=null&&c.setAttribute(f,t[a])}}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 l=e.querySelectorAll("[data-ln-class]");for(let r=0;r<l.length;r++){const c=l[r],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const p=n[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),a=p[1].trim();a in t&&c.classList.toggle(f,!!t[a])}}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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let s=0;s<o.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[s],t??null),o[s].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)H(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 V(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const l=o.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const s=function(l,r){return t[r]!==void 0?t[r]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let l=0;l<i.length;l++){const r=i[l],c=r.attributes;for(let n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&r.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return e}function me(e,t,o,s,i,l){const r={};for(let n=0;n<e.children.length;n++){const u=e.children[n],p=u.getAttribute("data-ln-render-key");p&&(r[p]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],p=String(s(u));let f=r[p];if(f)i(f,u,n);else{const a=ge(o,l);if(!a||(V(a,u),f=a.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",p),i(f,u,n)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=H,window.lnCore.lnFill=be,window.lnCore.renderList=me);function L(e,t,o){const s=e.getAttribute(t);return s===null?o:s}function U(e,t,o){const s=parseInt(e.getAttribute(t),10);return isNaN(s)?o:s}function K(e,t,o=!1){const s=e.getAttribute(t);if(s===null)return!!o;const i=s.trim().toLowerCase();return!(i==="false"||i==="0")}function Q(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const T=new Map;function z(e,t){const o=(e?e.join("|"):"")+"::"+t;if(T.has(o))return T.get(o);const s=new Set(e||[]),i=function(l,r){const c=l.getAttribute(r);return c!==null&&s.has(c)?c:t};return T.set(o,i),i}function J(e,t,o){const s=parseFloat(e.getAttribute(t));return isNaN(s)?o:s}function G(e,t,o){const s=e.getAttribute(t);if(!s)return o;try{return JSON.parse(s)}catch{return o}}function X(e,t,o,s,i){if(!e||t===null)return!0;const l=s||"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(`[${l}] 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(`[${l}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${l}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${l}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${l}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${l}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${l}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function ye(e,t,o){for(const s in o){const[i,l,r]=o[s];Object.defineProperty(e,s,{get:function(){return i(t,l,r)},enumerable:!0,configurable:!0})}return e}function Ce(e){const t={};for(const o in e){const s=e[o];if(!s||!s.prop)continue;let i=s.read;if(!i&&s.type)switch(s.type){case"enum":i=z(s.values,s.fallback);break;case"integer":i=U;break;case"float":i=J;break;case"boolean":i=K;break;case"list":i=Q;break;case"json":i=G;break;case"string":default:i=L;break}i||(i=L),t[s.prop]=[i,o,s.fallback]}return t}function ve(e){const t={};for(const o in e){const s=e[o];s&&s.effect&&(t[o]=s.effect)}return Object.keys(t).length?t:null}function _e(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const 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=ye,window.lnCore.attrSpec=Ce,window.lnCore.attrStr=L,window.lnCore.attrInt=U,window.lnCore.attrBool=K,window.lnCore.attrList=Q,window.lnCore.attrEnum=z,window.lnCore.attrFloat=J,window.lnCore.attrJson=G);function A(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,s){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:o,ComponentFn:s};if(e.matches&&e.matches(l)&&A(e,r),e.querySelectorAll){const c=e.querySelectorAll(l);for(let n=0;n<c.length;n++)A(c[n],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ke(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 xe(e){const t=Z(),o=e.observed||[];for(let s=0;s<o.length;s++){const i=o[s];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 s in e.attributes){t.byDeclaredAttr.has(s)||t.byDeclaredAttr.set(s,[]);const i=t.byDeclaredAttr.get(s);i.some(l=>l.componentTag===e.componentTag)||i.push({spec:e.attributes[s],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const s=_e(e);if(s===null)t.reactiveWildcard.push(e);else for(const i of s)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,s){for(let i=0;i<e.length;i++){const l=e[i];if(!t[l.attribute])continue;const r=l.effects&&l.effects[o];r?r(t,o,s):l.onAttrChange&&(!l.declared||l.declared.has(o))&&l.onAttrChange(t,o,s)}}function Ee(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,s=Z(),i=s.byAttr.get(t),l=M()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(t);if(!o&&!i&&!l)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(l&&E(r)){const c=s.byDeclaredAttr.get(t),n=r.getAttribute(t);for(let u=0;u<c.length;u++)X(c[u].spec,n,t,c[u].componentTag,r)}if(window.lnCore._debugSink&&(o||i)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),o){const c=s.byReactive.get(t);c&&ee(c,r,t,e.oldValue),s.reactiveWildcard.length&&ee(s.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,x(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{Ee(t[o])}catch(s){console.error("[ln-core] mutation handler failed",t[o].target,s)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function R(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function q(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function D(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(s){console.error("["+t.attribute+"] destroy failed",e,s)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function te(e){const t=R();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 s=q();if(e.target&&s.length)for(let i=0;i<s.length;i++){const l=s[i],r=l.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&&l.onSubtreeChange(c,e)}for(let i=0;i<e.addedNodes.length;i++){const l=e.addedNodes[i];if(l.nodeType===1){const r=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!r)l.matches&&l.matches(n.query)&&A(l,n);else if(l.matches&&l.matches(n.query)&&A(l,n),l.querySelectorAll){const u=l.querySelectorAll(n.query);for(let p=0;p<u.length;p++)A(u[p],n)}}n.onInit&&n.onInit(l)}}}for(let i=0;i<e.removedNodes.length;i++){const l=e.removedNodes[i];if(l.nodeType===1){if(document.contains(l))continue;const r=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!r)l.matches&&l.matches(u)&&D(l,n);else if(l.matches&&l.matches(u)&&D(l,n),l.querySelectorAll){const p=l.querySelectorAll(u);for(let f=0;f<p.length;f++)D(p[f],n)}}}}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,x(function(){const e=new MutationObserver(function(t){for(let o=0;o<t.length;o++){const s=t[o];if(s.type==="childList")try{te(s)}catch(i){console.error("[ln-core] lifecycle handler failed",s.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const o=t.takeRecords();for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="childList")try{te(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Le(e){R().push(e),e.onSubtreeChange&&e.query&&q().push(e),ne()}function I(e,t,o,s,i={}){const l=i.extraAttributes||[],r=i.onAttributeChange||null,c=i.onSubtreeChange||null,n=i.onInit||null,u=i.onAttrChange||null,p=i.effects||null,f=i.attributes||null,a=f?ve(f):p,h=f?new Set(Object.keys(f)):null,w=i.persist||null;function b(v){const y=v||document.body;if(Y(y,e,t,o),f&&M())for(const k in f){const Me=f[k],$=Array.from(y.querySelectorAll("["+k+"]"));y.matches&&y.matches("["+k+"]")&&$.push(y);for(let N=0;N<$.length;N++){const B=$[N];E(B)&&X(Me,B.getAttribute(k),k,s,B)}}n&&n(y)}const d=[];if(e.indexOf("[")!==-1){const v=/\[([\w-]+)/g;let y;for(;(y=v.exec(e))!==null;)d.push(y[1])}else d.push(e);xe({selector:e,attribute:t,componentTag:s,attributes:f,ComponentFn:o,onInit:n,observed:d.concat(l),onAttributeChange:r,onAttrChange:u,effects:a,declared:h,persist:w}),Se();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,_=i.subtreeQuery||(C?e:"["+e+"]"),g={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:_};R().push(g),c&&_&&q().push(g),ne(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=I,window.lnCore.observeLifecycle=Le,window.lnCore.withoutLifecycle=Oe);function m(){Ae()>0?ke(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):m(),b}function oe(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,o={},s=oe(t);if(!s)return o;const i=s.split("&");for(let l=0;l<i.length;l++){const r=i[l];if(!r)continue;const c=r.indexOf(":"),n=c>-1?r.slice(0,c):r,u=c>-1?r.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function Te(e){if(!e)return null;const t=F();return e in t?t[e]:null}function Re(e,t){if(!e)return;const o=F();t==null?delete o[e]:o[e]=String(t);const i=Object.keys(o).map(function(l){const r=o[l];return r===""?l:l+":"+encodeURIComponent(r)}).join("&");oe(location.hash)!==i&&(location.hash=i)}function qe(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 s=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return s?t?s+"-"+t:s:t||null}function Ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Fe(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 Ne(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),s=e.slice(t+1),i=s?s.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:o,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=F,window.lnCore.hashGet=Te,window.lnCore.hashSet=Re,window.lnCore.hashLinkClick=qe,window.lnCore.resolveHashNamespace=De,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=$e,window.lnCore.hashFilterDecode=Ne);function ie(e,t,o,s){const i=s,l=window.innerWidth,r=window.innerHeight,c=t.width,n=t.height,u=(o||"bottom").split("-"),p=u[0],f=u[1]==="start"||u[1]==="end"?u[1]:"center",a={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},h=a[p]||a.bottom;function w(g){return g==="top"||g==="bottom"?f==="start"?e.left:f==="end"?e.right-c:e.left+(e.width-c)/2:f==="start"?e.top:f==="end"?e.bottom-n:e.top+(e.height-n)/2}function b(g){let m,v,y=!0;return g==="top"?(m=e.top-i-n,v=w(g),m<0&&(y=!1)):g==="bottom"?(m=e.bottom+i,v=w(g),m+n>r&&(y=!1)):g==="left"?(m=w(g),v=e.left-i-c,v<0&&(y=!1)):(m=w(g),v=e.right+i,v+c>l&&(y=!1)),{top:m,left:v,side:g,fits:y}}let d=null;for(let g=0;g<h.length;g++){const m=b(h[g]);if(m.fits){d=m;break}}d||(d=b(h[0]));let C=d.top,_=d.left;return c>=l?_=0:(_<0&&(_=0),_+c>l&&(_=l-c)),n>=r?C=0:(C<0&&(C=0),C+n>r&&(C=r-n)),{top:C,left:_,placement:d.side}}function re(e){if(!e)return{width:0,height:0};const t=e.style,o=t.visibility,s=t.display,i=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const l=e.offsetWidth,r=e.offsetHeight;return t.visibility=o,t.display=s,t.position=i,{width:l,height:r}}function Be(){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=Be),(function(){const e="data-ln-popover",t="lnPopover",o="data-ln-popover-for",s="data-ln-popover-position";if(window[t]!==void 0)return;const i={"data-ln-popover":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the popover"},"data-ln-popover-for":{type:"string",description:"Target element ID that this trigger controls"},"data-ln-popover-position":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:"bottom",description:"Preferred positioning anchor"},"data-ln-popover-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"}},l=[];let r=null;function c(){r||(r=function(a){if(a.key!=="Escape"||l.length===0)return;l[l.length-1].close()},document.addEventListener("keydown",r))}function n(){l.length>0||r&&(document.removeEventListener("keydown",r),r=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open",this.trigger=null,this._previousFocus=null,this._boundDocClick=null,this._docClickTimeout=null,this._boundReposition=null;const h=this;return this._onRequestOpen=function(w){const b=w.detail&&w.detail.trigger?w.detail.trigger:null;h.open(b)},this._onRequestClose=function(){h.close()},this._onRequestToggle=function(w){const b=w.detail&&w.detail.trigger?w.detail.trigger:null;h.toggle(b)},this._onNativeToggle=function(w){w.newState==="closed"&&h.isOpen&&(h._applyClose(),h.dom.setAttribute(e,"closed"))},a.addEventListener("ln-popover:request-open",this._onRequestOpen),a.addEventListener("ln-popover:request-close",this._onRequestClose),a.addEventListener("ln-popover:request-toggle",this._onRequestToggle),a.addEventListener("toggle",this._onNativeToggle),a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.hasAttribute("role")||a.setAttribute("role","dialog"),a.hasAttribute("popover")||a.setAttribute("popover","manual"),this.isOpen&&this._applyOpen(null),this}u.prototype.open=function(a){this.isOpen||(this.trigger=a||null,this.dom.setAttribute(e,"open"))},u.prototype.close=function(){this.isOpen&&this.dom.setAttribute(e,"closed")},u.prototype.toggle=function(a){this.isOpen?this.close():this.open(a)},u.prototype._applyOpen=function(a){this.isOpen=!0,a&&(this.trigger=a),this._previousFocus=document.activeElement,typeof this.dom.showPopover=="function"&&this.dom.showPopover();const h=re(this.dom);if(this.trigger){const C=this.trigger.getBoundingClientRect(),_=this.dom.getAttribute(s)||"bottom",g=ie(C,h,_,8);this.dom.style.top=g.top+"px",this.dom.style.left=g.left+"px",this.dom.setAttribute("data-ln-popover-placement",g.placement),this.trigger.setAttribute("aria-expanded","true")}const w=this.dom.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.prototype.find.call(w,se);b?b.focus():this.dom.focus();const d=this;this._boundDocClick=function(C){d.dom.contains(C.target)||d.trigger&&d.trigger.contains(C.target)||d.close()},d._docClickTimeout=setTimeout(function(){d._docClickTimeout=null,document.addEventListener("click",d._boundDocClick)},0),this._repositionRaf=null,this._performReposition=function(){if(!d.trigger||!document.contains(d.dom))return;const C=d.trigger.getBoundingClientRect(),_=re(d.dom),g=d.dom.getAttribute(s)||"bottom",m=ie(C,_,g,8),v=m.top+"px",y=m.left+"px";d.dom.style.top!==v&&(d.dom.style.top=v),d.dom.style.left!==y&&(d.dom.style.left=y),d.dom.getAttribute("data-ln-popover-placement")!==m.placement&&d.dom.setAttribute("data-ln-popover-placement",m.placement)},this._boundReposition=function(){d._repositionRaf||(d._repositionRaf=requestAnimationFrame(function(){d._repositionRaf=null,d._performReposition()}))},window.addEventListener("scroll",this._boundReposition,{passive:!0,capture:!0}),window.addEventListener("resize",this._boundReposition),l.push(this),c(),S(this.dom,"ln-popover:open",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger})},u.prototype._applyClose=function(){this.isOpen=!1,this._repositionRaf&&(cancelAnimationFrame(this._repositionRaf),this._repositionRaf=null),this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null),this._boundReposition&&(window.removeEventListener("scroll",this._boundReposition,{capture:!0}),window.removeEventListener("resize",this._boundReposition),this._boundReposition=null),this.dom.style.top="",this.dom.style.left="",this.dom.removeAttribute("data-ln-popover-placement"),this.trigger&&this.trigger.setAttribute("aria-expanded","false"),typeof this.dom.hidePopover=="function"&&this.dom.matches(":popover-open")&&this.dom.hidePopover();const a=l.indexOf(this);a!==-1&&l.splice(a,1),n(),this._previousFocus&&this.trigger&&this._previousFocus===this.trigger?this.trigger.focus():this.trigger&&document.activeElement===document.body&&this.trigger.focus(),this._previousFocus=null,S(this.dom,"ln-popover:close",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger}),this.trigger=null},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-popover:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-popover:request-close",this._onRequestClose),this.dom.removeEventListener("ln-popover:request-toggle",this._onRequestToggle),this.dom.removeEventListener("toggle",this._onNativeToggle),this.isOpen&&this._applyClose(),delete this.dom[t])};function p(a){this.dom=a;const h=a.getAttribute(o);return a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",h),this._onClick=function(w){if(w.ctrlKey||w.metaKey||w.button===1)return;w.preventDefault();const b=document.getElementById(h);if(!b)return;b[t]&&(b[t].trigger=a);const d=b.getAttribute(e);b.setAttribute(e,d==="open"?"closed":"open")},a.addEventListener("click",this._onClick),this}p.prototype.destroy=function(){this.dom.removeEventListener("click",this._onClick),delete this.dom[t+"Trigger"]};function f(a){const h=a[t];if(!h)return;const b=a.getAttribute(e)==="open";if(b!==h.isOpen)if(b){if(j(a,"ln-popover:before-open",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"closed");return}h._applyOpen(h.trigger)}else{if(j(a,"ln-popover:before-close",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"open");return}h._applyClose()}}I(e,t,u,"ln-popover",{attributes:i}),I(o,t+"Trigger",p,"ln-popover-trigger")})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function F(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function m(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){i=t[l];break}if(!m(i))return}e.apply(console,t)}}function q(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function 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),i=t&&t.exclude,l={},s=e.elements,o={};if(r)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&o[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&l[n.name].push(n.options[a].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const a=Number(n.value);l[n.name]=n.value===""||isNaN(a)?null:a}else l[n.name]=n.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,i=[],l={};for(let s=0;s<r.length;s++){const o=r[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<r.length;s++){const o=r[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const n=t[c];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(l[o.name]>1){const a=String(n).split(",").map(function(d){return d.trim()});o.checked=a.indexOf(o.value)!==-1}else o.checked=re(n);i.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),i.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<o.options.length;a++)o.options[a].selected=n.indexOf(o.options[a].value)!==-1;i.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),i.push(o)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=oe,window.lnCore.serializeForm=ne,window.lnCore.resolveFormMethod=te);const I={};function ie(e,t){I[e]=t}function le(e){return I[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,p(function(){new MutationObserver(function(){q(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ce(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];$[r]=t}function ae(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ce,window.lnCore.getLocaleFallback=ae,window.lnCore.ensureLocaleObserver=se);const C={};function ue(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=C[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const c=r[o],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const c=i[o],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const c=l[o],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(u,!!t[f])}}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 i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)N(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function T(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(o,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],c=o.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&o.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function fe(e,t,r,i,l,s){const o={};for(let n=0;n<e.children.length;n++){const a=e.children[n],d=a.getAttribute("data-ln-render-key");d&&(o[d]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],d=String(i(a));let u=o[d];if(u)l(u,a,n);else{const f=ue(r,s);if(!f||(T(f,a),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),l(u,a,n)}c.appendChild(u)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=T,window.lnCore.fill=N,window.lnCore.lnFill=de,window.lnCore.renderList=fe);function y(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function M(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function R(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function B(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const A=new Map;function j(e,t){const r=(e?e.join("|"):"")+"::"+t;if(A.has(r))return A.get(r);const i=new Set(e||[]),l=function(s,o){const c=s.getAttribute(o);return c!==null&&i.has(c)?c:t};return A.set(r,l),l}function V(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function W(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function U(e,t,r,i,l){if(!e||t===null)return!0;const s=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=n=>{l?console.warn(n,l):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function we(e,t,r){for(const i in r){const[l,s,o]=r[i];Object.defineProperty(e,i,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function he(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=j(i.values,i.fallback);break;case"integer":l=M;break;case"float":l=V;break;case"boolean":l=R;break;case"list":l=B;break;case"json":l=W;break;case"string":default:l=y;break}l||(l=y),t[i.prop]=[l,r,i.fallback]}return t}function be(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 pe(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=we,window.lnCore.attrSpec=he,window.lnCore.attrStr=y,window.lnCore.attrInt=M,window.lnCore.attrBool=R,window.lnCore.attrList=B,window.lnCore.attrEnum=j,window.lnCore.attrFloat=V,window.lnCore.attrJson=W);function h(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function H(e,t,r,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(s)&&h(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)h(c[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ge(){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 P(){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 Q(e){const t=P(),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(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=pe(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 J(e,t,r,i){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[r];o?o(t,r,i):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,i)}}function Ce(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=P(),l=i.byAttr.get(t),s=F()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&m(o)){const c=i.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let a=0;a<c.length;a++)U(c[a].spec,n,t,c[a].componentTag,o)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const c=i.byReactive.get(t);c&&J(c,o,t,e.oldValue),i.reactiveWildcard.length&&J(i.reactiveWildcard,o,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const n=l[c];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(H(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function K(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ce(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function v(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function x(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function _(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ye(e){const t=v();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=x();if(e.target&&i.length)for(let l=0;l<i.length;l++){const s=i[l],o=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(o)?e.target:e.target.closest?e.target.closest(o):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(o):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const o=!!(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(!o)s.matches&&s.matches(n.query)&&h(s,n);else if(s.matches&&s.matches(n.query)&&h(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let d=0;d<a.length;d++)h(a[d],n)}}n.onInit&&n.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){const o=!!(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(!o)s.matches&&s.matches(a)&&_(s,n);else if(s.matches&&s.matches(a)&&_(s,n),s.querySelectorAll){const d=s.querySelectorAll(a);for(let u=0;u<d.length;u++)_(d[u],n)}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{ye(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e,t){Q({observed:e,handler:t}),K()}function ve(e){v().push(e),e.onSubtreeChange&&e.query&&x().push(e),z()}function G(e,t,r,i,l={}){const s=l.extraAttributes||[],o=l.onAttributeChange||null,c=l.onSubtreeChange||null,n=l.onInit||null,a=l.onAttrChange||null,d=l.effects||null,u=l.attributes||null,f=u?be(u):d,$e=u?new Set(Object.keys(u)):null,Ne=l.persist||null;function g(O){const w=O||document.body;if(H(w,e,t,r),u&&F())for(const b in u){const Me=u[b],E=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&E.push(w);for(let L=0;L<E.length;L++){const D=E[L];m(D)&&U(Me,D.getAttribute(b),b,i,D)}}n&&n(w)}const k=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)k.push(w[1])}else k.push(e);Q({selector:e,attribute:t,componentTag:i,attributes:u,ComponentFn:r,onInit:n,observed:k.concat(s),onAttributeChange:o,onAttrChange:a,effects:f,declared:$e,persist:Ne}),K();const Te=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Y=l.subtreeQuery||(Te?e:"["+e+"]"),Z={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:c,query:Y};v().push(Z),c&&Y&&x().push(Z),z(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=ve);function ee(){ge()>0?me(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee(),g}function X(e){return(e||"").replace(/^#/,"")}function S(e){const t=e===void 0?location.hash:e,r={},i=X(t);if(!i)return r;const l=i.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const c=o.indexOf(":"),n=c>-1?o.slice(0,c):o,a=c>-1?o.slice(c+1):"";if(n)try{r[n]=decodeURIComponent(a)}catch{r[n]=a}}return r}function xe(e){if(!e)return null;const t=S();return e in t?t[e]:null}function _e(e,t){if(!e)return;const r=S();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const o=r[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");X(location.hash)!==l&&(location.hash=l)}function Se(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ke(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 Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ee(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 Le(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function De(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(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=S,window.lnCore.hashGet=xe,window.lnCore.hashSet=_e,window.lnCore.hashLinkClick=Se,window.lnCore.resolveHashNamespace=ke,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Ee,window.lnCore.hashFilterEncode=Le,window.lnCore.hashFilterDecode=De);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 qe(e,t=100,r=0){const i=parseFloat(String(e))||0,l=parseFloat(String(t))||100,s=parseFloat(String(r))||0,o=Math.max(s,Math.min(i,l)),c=l-s;let n=0;return c>0&&(n=(o-s)/c*100),n=Math.max(0,Math.min(100,n)),{value:i,min:s,max:l,clampedValue:o,percentage:n}}function Ie(e,t,r=100){if(t!=null&&t!==""){const i=parseFloat(String(t));if(!isNaN(i)&&i>0)return i}if(e!=null&&e!==""){const i=parseFloat(String(e));if(!isNaN(i)&&i>0)return i}return r}(function(){const e="[data-ln-progress]",t="lnProgress";if(window[t]!==void 0)return;function r(o){const c=o[t];c&&s.call(c)}const i={"data-ln-progress":{type:"float",fallback:0,min:0,effect:r,description:"Current progress value"},"data-ln-progress-max":{type:"float",fallback:100,min:0,effect:r,description:"Maximum progress scale value"}};function l(o){return this.dom=o,this._parentObserver=null,s.call(this),this}l.prototype.destroy=function(){this.dom[t]&&(this._parentObserver&&this._parentObserver.disconnect(),delete this.dom[t])};function s(){const o=this.dom.getAttribute("data-ln-progress"),c=this.dom.parentElement,n=c?c.getAttribute("data-ln-progress-max"):null,a=this.dom.getAttribute("data-ln-progress-max"),d=Ie(a,n,100),u=qe(o,d);this.dom.style.width=u.percentage+"%",this.dom.setAttribute("role","progressbar"),this.dom.setAttribute("aria-valuemin",String(u.min)),this.dom.setAttribute("aria-valuemax",String(u.max)),this.dom.setAttribute("aria-valuenow",String(u.clampedValue)),q(this.dom,"ln-progress:change",{target:this.dom,value:u.value,max:u.max,percentage:u.percentage})}G(e,t,l,"ln-progress",{attributes:i}),Ae(["data-ln-progress-max"],function(o){const c=o.querySelectorAll?o.querySelectorAll(e):[];for(let n=0;n<c.length;n++){const a=c[n][t];a&&s.call(a)}})})()})();
1
+ (function(){"use strict";function F(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function m(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!m(o))return}e.apply(console,t)}}function q(e,t,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const r=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(r)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[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")&&!(o&&n.matches&&n.matches(o)))if(n.type==="checkbox")r&&i[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&l[n.name].push(n.options[a].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const a=Number(n.value);l[n.name]=n.value===""||isNaN(a)?null:a}else l[n.name]=n.value}return l}function oe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ie(e,t){const r=e.elements,o=[],l={};for(let s=0;s<r.length;s++){const i=r[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<r.length;s++){const i=r[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(n).split(",").map(function(d){return d.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=oe(n);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<i.options.length;a++)i.options[a].selected=n.indexOf(i.options[a].value)!==-1;o.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),o.push(i)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ie,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=ne);const I={};function le(e,t){I[e]=t}function se(e){return I[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){q(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ae(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];$[r]=t}function ue(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ae,window.lnCore.getLocaleFallback=ue,window.lnCore.ensureLocaleObserver=ce);const C={};function de(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=C[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(u,!!t[f])}}return e}function fe(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 o=0;o<r.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[o],t??null),r[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)N(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function T(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function we(e,t,r,o,l,s){const i={};for(let n=0;n<e.children.length;n++){const a=e.children[n],d=a.getAttribute("data-ln-render-key");d&&(i[d]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],d=String(o(a));let u=i[d];if(u)l(u,a,n);else{const f=de(r,s);if(!f||(T(f,a),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),l(u,a,n)}c.appendChild(u)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=T,window.lnCore.fill=N,window.lnCore.lnFill=fe,window.lnCore.renderList=we);function y(e,t,r){const o=e.getAttribute(t);return o===null?r:o}function R(e,t,r){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?r:o}function M(e,t,r=!1){const o=e.getAttribute(t);if(o===null)return!!r;const l=o.trim().toLowerCase();return!(l==="false"||l==="0")}function B(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const A=new Map;function j(e,t){const r=(e?e.join("|"):"")+"::"+t;if(A.has(r))return A.get(r);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return A.set(r,l),l}function V(e,t,r){const o=parseFloat(e.getAttribute(t));return isNaN(o)?r:o}function W(e,t,r){const o=e.getAttribute(t);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function U(e,t,r,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{l?console.warn(n,l):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function he(e,t,r){for(const o in r){const[l,s,i]=r[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const r in e){const o=e[r];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=j(o.values,o.fallback);break;case"integer":l=R;break;case"float":l=V;break;case"boolean":l=M;break;case"list":l=B;break;case"json":l=W;break;case"string":default:l=y;break}l||(l=y),t[o.prop]=[l,r,o.fallback]}return t}function pe(e){const t={};for(const r in e){const o=e[r];o&&o.effect&&(t[r]=o.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=he,window.lnCore.attrSpec=be,window.lnCore.attrStr=y,window.lnCore.attrInt=R,window.lnCore.attrBool=M,window.lnCore.attrList=B,window.lnCore.attrEnum=j,window.lnCore.attrFloat=V,window.lnCore.attrJson=W);function h(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function H(e,t,r,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:o};if(e.matches&&e.matches(s)&&h(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)h(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function me(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(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 P(){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 Q(e){const t=P(),r=e.observed||[];for(let o=0;o<r.length;o++){const l=r[o];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const l=t.byDeclaredAttr.get(o);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ge(e);if(o===null)t.reactiveWildcard.push(e);else for(const l of o)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function J(e,t,r,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[r];i?i(t,r,o):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,o)}}function ye(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,o=P(),l=o.byAttr.get(t),s=F()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&m(i)){const c=o.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let a=0;a<c.length;a++)U(c[a].spec,n,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const c=o.byReactive.get(t);c&&J(c,i,t,e.oldValue),o.reactiveWildcard.length&&J(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const n=l[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(H(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function K(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{ye(t[r])}catch(o){console.error("[ln-core] mutation handler failed",t[r].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function v(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function x(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function _(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function z(e){const t=v();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=x();if(e.target&&o.length)for(let l=0;l<o.length;l++){const s=o[l],i=s.query,c=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;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const i=!!(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(!i)s.matches&&s.matches(n.query)&&h(s,n);else if(s.matches&&s.matches(n.query)&&h(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let d=0;d<a.length;d++)h(a[d],n)}}n.onInit&&n.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){if(document.contains(s))continue;const i=!!(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(!i)s.matches&&s.matches(a)&&_(s,n);else if(s.matches&&s.matches(a)&&_(s,n),s.querySelectorAll){const d=s.querySelectorAll(a);for(let u=0;u<d.length;u++)_(d[u],n)}}}}}}function G(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const o=t[r];if(o.type==="childList")try{z(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let o=0;o<r.length;o++){const l=r[o];if(l.type==="childList")try{z(l)}catch(s){console.error("[ln-core] lifecycle handler failed",l.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function ve(e,t){Q({observed:e,handler:t}),K()}function xe(e){v().push(e),e.onSubtreeChange&&e.query&&x().push(e),G()}function X(e,t,r,o,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,n=l.onInit||null,a=l.onAttrChange||null,d=l.effects||null,u=l.attributes||null,f=u?pe(u):d,Ne=u?new Set(Object.keys(u)):null,Te=l.persist||null;function g(O){const w=O||document.body;if(H(w,e,t,r),u&&F())for(const b in u){const Me=u[b],E=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&E.push(w);for(let L=0;L<E.length;L++){const D=E[L];m(D)&&U(Me,D.getAttribute(b),b,o,D)}}n&&n(w)}const k=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)k.push(w[1])}else k.push(e);Q({selector:e,attribute:t,componentTag:o,attributes:u,ComponentFn:r,onInit:n,observed:k.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:Ne,persist:Te}),K();const Re=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Z=l.subtreeQuery||(Re?e:"["+e+"]"),ee={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:c,query:Z};v().push(ee),c&&Z&&x().push(ee),G(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X,window.lnCore.observeLifecycle=xe,window.lnCore.withoutLifecycle=Ae);function te(){me()>0?Ce(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",te):te(),g}function Y(e){return(e||"").replace(/^#/,"")}function S(e){const t=e===void 0?location.hash:e,r={},o=Y(t);if(!o)return r;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(n)try{r[n]=decodeURIComponent(a)}catch{r[n]=a}}return r}function _e(e){if(!e)return null;const t=S();return e in t?t[e]:null}function Se(e,t){if(!e)return;const r=S();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const i=r[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");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 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 o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Ee(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 De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),o=e.slice(t+1),l=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=S,window.lnCore.hashGet=_e,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Oe,window.lnCore.hashSortEncode=Ee,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Fe);function qe(){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=qe);function Ie(e,t=100,r=0){const o=parseFloat(String(e))||0,l=parseFloat(String(t))||100,s=parseFloat(String(r))||0,i=Math.max(s,Math.min(o,l)),c=l-s;let n=0;return c>0&&(n=(i-s)/c*100),n=Math.max(0,Math.min(100,n)),{value:o,min:s,max:l,clampedValue:i,percentage:n}}function $e(e,t,r=100){if(t!=null&&t!==""){const o=parseFloat(String(t));if(!isNaN(o)&&o>0)return o}if(e!=null&&e!==""){const o=parseFloat(String(e));if(!isNaN(o)&&o>0)return o}return r}(function(){const e="[data-ln-progress]",t="lnProgress";if(window[t]!==void 0)return;function r(i){const c=i[t];c&&s.call(c)}const o={"data-ln-progress":{type:"float",fallback:0,min:0,effect:r,description:"Current progress value"},"data-ln-progress-max":{type:"float",fallback:100,min:0,effect:r,description:"Maximum progress scale value"}};function l(i){return this.dom=i,this._parentObserver=null,s.call(this),this}l.prototype.destroy=function(){this.dom[t]&&(this._parentObserver&&this._parentObserver.disconnect(),delete this.dom[t])};function s(){const i=this.dom.getAttribute("data-ln-progress"),c=this.dom.parentElement,n=c?c.getAttribute("data-ln-progress-max"):null,a=this.dom.getAttribute("data-ln-progress-max"),d=$e(a,n,100),u=Ie(i,d);this.dom.style.width=u.percentage+"%",this.dom.setAttribute("role","progressbar"),this.dom.setAttribute("aria-valuemin",String(u.min)),this.dom.setAttribute("aria-valuemax",String(u.max)),this.dom.setAttribute("aria-valuenow",String(u.clampedValue)),q(this.dom,"ln-progress:change",{target:this.dom,value:u.value,max:u.max,percentage:u.percentage})}X(e,t,l,"ln-progress",{attributes:o}),ve(["data-ln-progress-max"],function(i){const c=i.querySelectorAll?i.querySelectorAll(e):[];for(let n=0;n<c.length;n++){const a=c[n][t];a&&s.call(a)}})})()})();
@@ -1 +1 @@
1
- var LnAshlarComponent=(function(x){"use strict";function z(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){i=t[r];break}if(!E(i))return}e.apply(console,t)}}function O(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function Le(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(r),r}function 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 Ie(e,t){if(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||e.button!==0||!t)return!1;const n=t.getAttribute("href");return!(!n||t.getAttribute("target")==="_blank"||t.hasAttribute("download")||n.startsWith("mailto:")||n.startsWith("tel:")||n==="#"||n.startsWith("#")||t.hostname&&t.hostname!==window.location.hostname)}function Me(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function $e(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,r={},s=e.elements,l={};if(n)for(let a=0;a<s.length;a++){const o=s[a];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let a=0;a<s.length;a++){const o=s[a];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(i&&o.matches&&o.matches(i)))if(o.type==="checkbox")n&&l[o.name]===1?r[o.name]=o.checked:(r[o.name]||(r[o.name]=[]),o.checked&&r[o.name].push(o.value));else if(o.type==="radio")o.checked&&(r[o.name]=o.value);else if(o.type==="select-multiple"){r[o.name]=[];for(let c=0;c<o.options.length;c++)o.options[c].selected&&r[o.name].push(o.options[c].value)}else if(n&&o.type==="hidden")r[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const c=Number(o.value);r[o.name]=o.value===""||isNaN(c)?null:c}else r[o.name]=o.value}return r}function Te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Fe(e,t){const n=e.elements,i=[],r={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const o=t[a];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(r[l.name]>1){const c=String(o).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=Te(o);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let c=0;c<l.options.length;c++)l.options[c].selected=o.indexOf(l.options[c].value)!==-1;i.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Fe,window.lnCore.serializeForm=$e,window.lnCore.resolveFormMethod=Me);const J={};function Ne(e,t){J[e]=t}function Be(e){return J[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ne,window.lnCore.getDataMapper=Be);function We(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){O(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const G={};function je(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];G[n]=t}function Ke(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return G[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=je,window.lnCore.getLocaleFallback=Ke,window.lnCore.ensureLocaleObserver=We);const q={};function Pe(e,t){q[e]||(q[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=q[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function X(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const a=n[l],o=a.getAttribute("data-ln-field");t[o]!=null&&(a.textContent=t[o])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const a=i[l],o=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<o.length;c++){const d=o[c].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();t[p]!=null&&a.setAttribute(f,t[p])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const a=r[l],o=a.getAttribute("data-ln-show");o in t&&a.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],o=a.getAttribute("data-ln-class").split(",");for(let c=0;c<o.length;c++){const d=o[c].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();p in t&&a.classList.toggle(f,!!t[p])}}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 n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<n.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[i],t??null),n[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)X(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 Y(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const l=r[s],a=l.attributes;for(let o=0;o<a.length;o++){const c=a[o];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function Ue(e,t,n,i,r,s){const l={};for(let o=0;o<e.children.length;o++){const c=e.children[o],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const a=document.createDocumentFragment();for(let o=0;o<t.length;o++){const c=t[o],d=String(i(c));let f=l[d];if(f)r(f,c,o);else{const p=Pe(n,s);if(!p||(Y(p,c),f=p.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),r(f,c,o)}a.appendChild(f)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Y,window.lnCore.fill=X,window.lnCore.lnFill=He,window.lnCore.renderList=Ue);function R(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function Z(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function ee(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const r=i.trim().toLowerCase();return!(r==="false"||r==="0")}function te(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const D=new Map;function ne(e,t){const n=(e?e.join("|"):"")+"::"+t;if(D.has(n))return D.get(n);const i=new Set(e||[]),r=function(s,l){const a=s.getAttribute(l);return a!==null&&i.has(a)?a:t};return D.set(n,r),r}function re(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function oe(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function ie(e,t,n,i,r){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=o=>{r?console.warn(o,r):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(a(`[${s}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(a(`[${s}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return a(`[${s}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ve(e,t,n){for(const i in n){const[r,s,l]=n[i];Object.defineProperty(e,i,{get:function(){return r(t,s,l)},enumerable:!0,configurable:!0})}return e}function Qe(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let r=i.read;if(!r&&i.type)switch(i.type){case"enum":r=ne(i.values,i.fallback);break;case"integer":r=Z;break;case"float":r=re;break;case"boolean":r=ee;break;case"list":r=te;break;case"json":r=oe;break;case"string":default:r=R;break}r||(r=R),t[i.prop]=[r,n,i.fallback]}return t}function ze(e){const t={};for(const n in e){const i=e[n];i&&i.effect&&(t[n]=i.effect)}return Object.keys(t).length?t:null}function Je(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ve,window.lnCore.attrSpec=Qe,window.lnCore.attrStr=R,window.lnCore.attrInt=Z,window.lnCore.attrBool=ee,window.lnCore.attrList=te,window.lnCore.attrEnum=ne,window.lnCore.attrFloat=re,window.lnCore.attrJson=oe);function C(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function le(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(s)&&C(e,l),e.querySelectorAll){const a=e.querySelectorAll(s);for(let o=0;o<a.length;o++)C(a[o],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ge(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Xe(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function se(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ye(e){const t=se(),n=e.observed||[];for(let i=0;i<n.length;i++){const r=n[i];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const r=t.byDeclaredAttr.get(i);r.some(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=Je(e);if(i===null)t.reactiveWildcard.push(e);else for(const r of i)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function ae(e,t,n,i){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,i):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,i)}}function Ze(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=se(),r=i.byAttr.get(t),s=z()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!r&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&E(l)){const a=i.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let c=0;c<a.length;c++)ie(a[c].spec,o,t,a[c].componentTag,l)}if(window.lnCore._debugSink&&(n||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const a=i.byReactive.get(t);a&&ae(a,l,t,e.oldValue),i.reactiveWildcard.length&&ae(i.reactiveWildcard,l,t,e.oldValue)}if(r)for(let a=0;a<r.length;a++){const o=r[a];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(le(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function et(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ze(t[n])}catch(i){console.error("[ln-core] mutation handler failed",t[n].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function L(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function I(){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(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function tt(e){const t=L();if(!t.length)return;const n=e.target;if(n){const r=n.nodeType===1?n:n.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=I();if(e.target&&i.length)for(let r=0;r<i.length;r++){const s=i[r],l=s.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&&s.onSubtreeChange(a,e)}for(let r=0;r<e.addedNodes.length;r++){const s=e.addedNodes[r];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const o=t[a];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)s.matches&&s.matches(o.query)&&C(s,o);else if(s.matches&&s.matches(o.query)&&C(s,o),s.querySelectorAll){const c=s.querySelectorAll(o.query);for(let d=0;d<c.length;d++)C(c[d],o)}}o.onInit&&o.onInit(s)}}}for(let r=0;r<e.removedNodes.length;r++){const s=e.removedNodes[r];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const o=t[a],c=o.query;if(c){if(!l)s.matches&&s.matches(c)&&M(s,o);else if(s.matches&&s.matches(c)&&M(s,o),s.querySelectorAll){const d=s.querySelectorAll(c);for(let f=0;f<d.length;f++)M(d[f],o)}}}}}}function ce(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{tt(i)}catch(r){console.error("[ln-core] lifecycle handler failed",i.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function nt(e){L().push(e),e.onSubtreeChange&&e.query&&I().push(e),ce()}function ue(e,t,n,i,r={}){const s=r.extraAttributes||[],l=r.onAttributeChange||null,a=r.onSubtreeChange||null,o=r.onInit||null,c=r.onAttrChange||null,d=r.effects||null,f=r.attributes||null,p=f?ze(f):d,k=f?new Set(Object.keys(f)):null,u=r.persist||null;function h(H){const b=H||document.body;if(le(b,e,t,n),f&&z())for(const v in f){const mt=f[v],U=Array.from(b.querySelectorAll("["+v+"]"));b.matches&&b.matches("["+v+"]")&&U.push(b);for(let V=0;V<U.length;V++){const Q=U[V];E(Q)&&ie(mt,Q.getAttribute(v),v,i,Q)}}o&&o(b)}const w=[];if(e.indexOf("[")!==-1){const H=/\[([\w-]+)/g;let b;for(;(b=H.exec(e))!==null;)w.push(b[1])}else w.push(e);Ye({selector:e,attribute:t,componentTag:i,attributes:f,ComponentFn:n,onInit:o,observed:w.concat(s),onAttributeChange:l,onAttrChange:c,effects:p,declared:k,persist:u}),et();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,qe=r.subtreeQuery||(m?e:"["+e+"]"),Re={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:a,query:qe};L().push(Re),a&&qe&&I().push(Re),ce(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ue,window.lnCore.observeLifecycle=nt);function De(){Ge()>0?Xe(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",De):De(),h}function de(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,n={},i=de(t);if(!i)return n;const r=i.split("&");for(let s=0;s<r.length;s++){const l=r[s];if(!l)continue;const a=l.indexOf(":"),o=a>-1?l.slice(0,a):l,c=a>-1?l.slice(a+1):"";if(o)try{n[o]=decodeURIComponent(c)}catch{n[o]=c}}return n}function rt(e){if(!e)return null;const t=$();return e in t?t[e]:null}function ot(e,t){if(!e)return;const n=$();t==null?delete n[e]:n[e]=String(t);const r=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");de(location.hash)!==r&&(location.hash=r)}function it(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function lt(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function st(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function at(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 ct(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function ut(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),i=e.slice(t+1),r=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=rt,window.lnCore.hashSet=ot,window.lnCore.hashLinkClick=it,window.lnCore.resolveHashNamespace=lt,window.lnCore.hashSortEncode=st,window.lnCore.hashSortDecode=at,window.lnCore.hashFilterEncode=ct,window.lnCore.hashFilterDecode=ut);function dt(){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=dt);function ft(e,{isHydration:t=!1,hasPrimaryRegion:n=!1,primaryMatch:i=null}={}){const r=n?!i:!e.some(c=>c.match),s=[],l=[];for(const c of e)if(!(!c.targetEl&&!c.isPending)){if(!c.match){const d=t&&c.hasHydrate&&c.hasChildren;!c.hasKeep&&c.hasChildren&&!d&&c.targetEl&&s.push(c);continue}c.hasKeep&&c.mountedTemplate===c.match.route.templateNode||l.push(Object.assign({},c,{skipMount:t&&c.hasHydrate&&c.hasChildren}))}l.sort((c,d)=>c.regionKey==="__primary__"?-1:d.regionKey==="__primary__"?1:0);const o=l.find(c=>c.regionKey==="__primary__")||l[0]||null;return{notFound:r,clears:s,swaps:l,owner:o}}function _(e){if(!e||typeof e!="string")return"";let t=e.trim().replace(/\/+$/,"");return!t||t==="/"?"":t.startsWith("/")?t:"/"+t}function ht(e,t){const n=_(t);if(!n)return e&&e.replace(/\/+$/,"")||"/";const i=(e||"/").replace(/\/+$/,"")||"/";return i===n?"/":i.startsWith(n+"/")?i.slice(n.length).replace(/\/+$/,"")||"/":i}function fe(e,t){const n=_(t);if(!n)return e||"/";const i=e||"/",r=i.indexOf("#"),s=r!==-1?i.slice(0,r):i,l=r!==-1?i.slice(r):"",a=s.indexOf("?"),o=a!==-1?s.slice(0,a):s,c=a!==-1?s.slice(a):"";let d;if(o===n)d=n+"/";else if(o.startsWith(n+"/"))d=o;else{const f=o.startsWith("/")?o:"/"+o;d=f==="/"?n+"/":n+f}return d+c+l}function T(){if(typeof document>"u")return"";const e=document.querySelector("[data-ln-outlet]")||document.querySelector("[data-ln-router-base]");if(e&&e.hasAttribute("data-ln-router-base"))return _(e.getAttribute("data-ln-router-base"));const t=document.querySelector("base[href]");if(t)try{const n=new URL(t.getAttribute("href"),window.location.origin);return _(n.pathname)}catch{return _(t.getAttribute("href"))}return""}const F={navigate:function(e){A(e,{historyAction:"push"})},replace:function(e){A(e,{historyAction:"replace"})},base:function(){return T()},toUrl:function(e){return fe(e,T())},current:function(){return S===null?null:{path:S,fullPath:ge,base:be,params:me,query:ye,route:Ce,regions:we}}},N="data-ln-route",he="lnRoute";typeof window<"u"&&(window.lnRouter=F);function B(e){Ee(e),xe(e),g.size>0&&ke()}const wt={"data-ln-route":{effect:B,type:"string",description:"URL path pattern matched by this route template"},"data-ln-route-target":{effect:B,type:"string",description:"Target outlet element selector where route content is rendered"},"data-ln-route-title":{effect:B,type:"string",description:"Document title template set when route is activated"},"data-ln-route-keep":{type:"boolean",fallback:!1,description:"Preserve mounted DOM nodes in memory instead of rebuilding"},"data-ln-router-base":{type:"string",description:'Base URL prefix for subdirectory routing (e.g. "/spa")'},"data-ln-router-hydrate":{type:"boolean",fallback:!1,description:"Hydrate existing DOM content on initial router boot"}},g=new Map,W=new WeakMap;let we=new Map,pe=!1,S=null,ge=null,be="",me={},ye={},Ce=null,j=!1;function _e(e,t,n){j?queueMicrotask(function(){O(e,t,n)}):O(e,t,n)}function K(e){try{const a=new URL(e,window.location.origin);e=a.pathname+a.search+a.hash}catch{}let[t]=e.split("#"),[n,i]=t.split("?");const r={};if(i){const a=new URLSearchParams(i);for(const[o,c]of a.entries())r[o]=c}const s=T();return{path:ht(n,s),query:r,base:s}}function Ae(e,t){if(e.pattern==="*")return 1;if(t.pattern==="*")return-1;const n=e.segments,i=t.segments,r=Math.max(n.length,i.length);for(let s=0;s<r;s++){const l=n[s],a=i[s];if(l===void 0)return 1;if(a===void 0)return-1;if(l==="*")return 1;if(a==="*")return-1;const o=l.startsWith(":"),c=a.startsWith(":");if(o&&!c)return 1;if(!o&&c)return-1}return 0}function ve(e,t){const n=e.split("/").filter(Boolean);for(const i of t){if(i.pattern==="*")return{route:i,params:{wildcard:e}};const r=i.segments,s={};let l=!0;if(!(n.length>r.length&&r[r.length-1]!=="*")){for(let a=0;a<r.length;a++){const o=r[a],c=n[a];if(o==="*"){s.wildcard=n.slice(a).join("/");break}if(c===void 0){l=!1;break}if(o.startsWith(":"))s[o.slice(1)]=decodeURIComponent(c);else if(o!==c){l=!1;break}}if(l&&(r.indexOf("*")!==-1||n.length<=r.length))return{route:i,params:s}}}return null}function P(e,t={}){const n=t.warn!==!1;if(e!=="__primary__"){const r=document.getElementById(e);return!r&&n&&console.warn(`[ln-router] Explicit target element #${e} not found in DOM`),r}const i=document.querySelector("[data-ln-outlet]")||document.querySelector("main");return!i&&n&&console.warn("[ln-router] Default outlet (element with [data-ln-outlet] or <main>) not found in DOM"),i}function Se(e){if(!e)return;const t=Array.from(e.querySelectorAll("*")),n=[e].concat(t);for(const r of n)for(const s of Object.keys(r))if(s.startsWith("ln")&&r[s]&&typeof r[s].destroy=="function")try{r[s].destroy()}catch(l){console.error(`[ln-router] Error destroying component ${s} on element:`,r,l)}const i=document.querySelectorAll('[data-ln-popover="open"]');for(const r of i){const s=r.lnPopover;if(s&&s.trigger&&e.contains(s.trigger))try{s.destroy()}catch(l){console.error("[ln-router] Error destroying open popover:",l)}}}function A(e,t={}){const{path:n,query:i,base:r}=K(e),s=fe(e,r),l=new Map;for(const[u,h]of g)l.set(u,ve(n,h.sorted));const a=l.get("__primary__")||null,o=P("__primary__",{warn:!!a}),c=g.has("__primary__"),d=[];for(const[u,h]of l){const w=u==="__primary__"?o:P(u,{warn:!1}),m=!w&&!!(a&&a.route&&a.route.templateNode&&a.route.templateNode.content&&a.route.templateNode.content.querySelector("#"+CSS.escape(u)));!w&&!m&&h&&console.warn(`[ln-router] Explicit target element #${u} not found in DOM`),d.push({regionKey:u,match:h,targetEl:w,isPending:m,hasKeep:!!w&&w.hasAttribute("data-ln-route-keep"),hasHydrate:!!w&&w.hasAttribute("data-ln-router-hydrate"),hasChildren:!!w&&w.children.length>0,mountedTemplate:w&&W.get(w)||null})}const f=ft(d,{isHydration:!!t.isHydration,hasPrimaryRegion:c,primaryMatch:a});if(f.notFound){_e(document.body,"ln-router:not-found",{path:n});return}if(Le(o||document.body,"ln-router:before-navigate",{from:S,to:s,path:n,params:a?a.params:{},query:i}).defaultPrevented)return;t.historyAction==="push"?window.history.pushState(null,"",s):t.historyAction==="replace"&&window.history.replaceState(null,"",s);const k=function(){for(const u of f.clears)Se(u.targetEl),u.targetEl.replaceChildren(),W.delete(u.targetEl);for(const u of f.swaps){if((u.isPending||!u.targetEl||!document.contains(u.targetEl))&&(u.targetEl=u.regionKey==="__primary__"?o:document.getElementById(u.regionKey)),!u.targetEl){console.warn(`[ln-router] Target element #${u.regionKey} could not be resolved`);continue}if(u.skipMount||(Se(u.targetEl),u.targetEl.replaceChildren(u.match.route.templateNode.content.cloneNode(!0))),W.set(u.targetEl,u.match.route.templateNode),f.owner&&u.regionKey===f.owner.regionKey){if(u.match.route.title){let h=u.match.route.title;if(u.match.params)for(const[w,m]of Object.entries(u.match.params))h=h.replace(new RegExp("\\{\\{\\s*"+w+"\\s*\\}\\}","g"),m);document.title=h}if(!t.isHydration){u.targetEl.hasAttribute("tabindex")||u.targetEl.setAttribute("tabindex","-1");const h=u.targetEl.querySelector("h1, h2, h3, h4, h5, h6");h?(h.setAttribute("tabindex","-1"),h.focus()):u.targetEl.focus(),u.regionKey==="__primary__"&&u.targetEl.scrollIntoView({block:"start",behavior:"instant"})}}_e(u.targetEl,"ln-router:navigated",{path:n,fullPath:s,base:r,params:u.match.params,query:i,route:u.match.route,target:u.targetEl,region:u.regionKey})}S=n,ge=s,be=r,ye=i,Ce=a?a.route:null,me=a?a.params:{},we=new Map(Array.from(l.entries()).map(([u,h])=>[u,h?{route:h.route,params:h.params}:null]))};document.startViewTransition&&!t.isHydration?document.startViewTransition(k):k()}function pt(e){const t=e.target.closest("a");if(!t||!Ie(e,t))return;const n=t.getAttribute("href"),{path:i}=K(n);for(const r of g.values())if(ve(i,r.sorted)){e.preventDefault(),A(n,{historyAction:"push"});return}}function gt(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let r=0;r<n.length;r++){const s=n[r];if(e[s]!==t[s])return!1}return!0}function bt(){const e=window.location.pathname+window.location.search,t=F.current();if(t&&t.path!=null){const n=K(e);if(t.path===n.path&&gt(t.query,n.query))return}A(e,{historyAction:"skip"})}function ke(){pe||(pe=!0,y(function(){document.addEventListener("click",pt),window.addEventListener("popstate",bt),j=!0;const e=window.location.pathname+window.location.search+window.location.hash;A(e,{historyAction:"replace",isHydration:!0}),j=!1},"ln-router"))}function xe(e){const t=e.getAttribute(N);if(!t)return;const n=e.getAttribute("data-ln-route-target")||null;if(n==="__primary__"){console.warn(`[ln-router] "__primary__" is a reserved region key and cannot be used as data-ln-route-target. Route "${t}" rejected.`);return}const i=n||"__primary__";g.has(i)||g.set(i,{routes:new Map,sorted:[]});const r=g.get(i);if(r.routes.has(t)){console.warn(`[ln-router] Duplicate route pattern registered: "${t}" in region "${i}"`);return}const s=e.getAttribute("data-ln-route-title"),l=t.split("/").filter(Boolean),a={pattern:t,segments:l,target:n,title:s,templateNode:e},o=P(i);o&&o.contains(e)&&console.warn(`[ln-router] Route template with pattern "${t}" is declared inside its own outlet element:`,e),r.routes.set(t,a),r.sorted=Array.from(r.routes.values()).sort(Ae)}function Ee(e){const t=e.getAttribute(N);if(!t)return;const i=e.getAttribute("data-ln-route-target")||null||"__primary__",r=g.get(i);r&&(r.routes.delete(t),r.sorted=Array.from(r.routes.values()).sort(Ae),r.routes.size===0&&g.delete(i))}function Oe(e){return this.dom=e,xe(e),this}return Oe.prototype.destroy=function(){Ee(this.dom),delete this.dom[he]},ue(N,he,Oe,"ln-router",{attributes:wt,onInit:function(){g.size>0&&ke()}}),x.router=F,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x})({});
1
+ var LnAshlarComponent=(function(x){"use strict";function z(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function E(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){i=t[r];break}if(!E(i))return}e.apply(console,t)}}function O(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function Ie(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(r),r}function m(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){m(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Me(e,t){if(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||e.button!==0||!t)return!1;const n=t.getAttribute("href");return!(!n||t.getAttribute("target")==="_blank"||t.hasAttribute("download")||n.startsWith("mailto:")||n.startsWith("tel:")||n==="#"||n.startsWith("#")||t.hostname&&t.hostname!==window.location.hostname)}function $e(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Te(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,r={},s=e.elements,l={};if(n)for(let a=0;a<s.length;a++){const o=s[a];o.name&&o.type==="checkbox"&&!o.disabled&&(l[o.name]=(l[o.name]||0)+1)}for(let a=0;a<s.length;a++){const o=s[a];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(i&&o.matches&&o.matches(i)))if(o.type==="checkbox")n&&l[o.name]===1?r[o.name]=o.checked:(r[o.name]||(r[o.name]=[]),o.checked&&r[o.name].push(o.value));else if(o.type==="radio")o.checked&&(r[o.name]=o.value);else if(o.type==="select-multiple"){r[o.name]=[];for(let c=0;c<o.options.length;c++)o.options[c].selected&&r[o.name].push(o.options[c].value)}else if(n&&o.type==="hidden")r[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const c=Number(o.value);r[o.name]=o.value===""||isNaN(c)?null:c}else r[o.name]=o.value}return r}function Fe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Ne(e,t){const n=e.elements,i=[],r={};for(let s=0;s<n.length;s++){const l=n[s];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let s=0;s<n.length;s++){const l=n[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const a=l.getAttribute("data-ln-fill-as")||l.name;if(!a||!(a in t))continue;const o=t[a];if(l.type==="checkbox"){if(Array.isArray(o))l.checked=o.indexOf(l.value)!==-1;else if(r[l.name]>1){const c=String(o).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=Fe(o);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(o),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(o))for(let c=0;c<l.options.length;c++)l.options[c].selected=o.indexOf(l.options[c].value)!==-1;i.push(l)}else l.value=o,l.tagName==="SELECT"&&o!=null&&l.setAttribute("data-ln-value",o),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Ne,window.lnCore.serializeForm=Te,window.lnCore.resolveFormMethod=$e);const J={};function Be(e,t){J[e]=t}function We(e){return J[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Be,window.lnCore.getDataMapper=We);function je(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,m(function(){new MutationObserver(function(){O(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const G={};function Ke(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];G[n]=t}function Pe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return G[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ke,window.lnCore.getLocaleFallback=Pe,window.lnCore.ensureLocaleObserver=je);const q={};function He(e,t){q[e]||(q[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=q[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function X(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const a=n[l],o=a.getAttribute("data-ln-field");t[o]!=null&&(a.textContent=t[o])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const a=i[l],o=a.getAttribute("data-ln-attr").split(",");for(let c=0;c<o.length;c++){const d=o[c].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();t[p]!=null&&a.setAttribute(f,t[p])}}const r=e.querySelectorAll("[data-ln-show]");for(let l=0;l<r.length;l++){const a=r[l],o=a.getAttribute("data-ln-show");o in t&&a.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const a=s[l],o=a.getAttribute("data-ln-class").split(",");for(let c=0;c<o.length;c++){const d=o[c].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),p=d[1].trim();p in t&&a.classList.toggle(f,!!t[p])}}return e}function Ue(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<n.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[i],t??null),n[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)X(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 Y(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,a){return t[a]!==void 0?t[a]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const l=r[s],a=l.attributes;for(let o=0;o<a.length;o++){const c=a[o];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function Ve(e,t,n,i,r,s){const l={};for(let o=0;o<e.children.length;o++){const c=e.children[o],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const a=document.createDocumentFragment();for(let o=0;o<t.length;o++){const c=t[o],d=String(i(c));let f=l[d];if(f)r(f,c,o);else{const p=He(n,s);if(!p||(Y(p,c),f=p.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),r(f,c,o)}a.appendChild(f)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Y,window.lnCore.fill=X,window.lnCore.lnFill=Ue,window.lnCore.renderList=Ve);function L(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function Z(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function ee(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const r=i.trim().toLowerCase();return!(r==="false"||r==="0")}function te(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const R=new Map;function ne(e,t){const n=(e?e.join("|"):"")+"::"+t;if(R.has(n))return R.get(n);const i=new Set(e||[]),r=function(s,l){const a=s.getAttribute(l);return a!==null&&i.has(a)?a:t};return R.set(n,r),r}function re(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function oe(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function ie(e,t,n,i,r){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const a=o=>{r?console.warn(o,r):console.warn(o)};if(l==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const o=e.values||[];return o.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(a(`[${s}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(a(`[${s}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(o){return a(`[${s}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Qe(e,t,n){for(const i in n){const[r,s,l]=n[i];Object.defineProperty(e,i,{get:function(){return r(t,s,l)},enumerable:!0,configurable:!0})}return e}function ze(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let r=i.read;if(!r&&i.type)switch(i.type){case"enum":r=ne(i.values,i.fallback);break;case"integer":r=Z;break;case"float":r=re;break;case"boolean":r=ee;break;case"list":r=te;break;case"json":r=oe;break;case"string":default:r=L;break}r||(r=L),t[i.prop]=[r,n,i.fallback]}return t}function Je(e){const t={};for(const n in e){const i=e[n];i&&i.effect&&(t[n]=i.effect)}return Object.keys(t).length?t:null}function Ge(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=Qe,window.lnCore.attrSpec=ze,window.lnCore.attrStr=L,window.lnCore.attrInt=Z,window.lnCore.attrBool=ee,window.lnCore.attrList=te,window.lnCore.attrEnum=ne,window.lnCore.attrFloat=re,window.lnCore.attrJson=oe);function C(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function le(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(s)&&C(e,l),e.querySelectorAll){const a=e.querySelectorAll(s);for(let o=0;o<a.length;o++)C(a[o],l)}}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 Ye(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function se(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ze(e){const t=se(),n=e.observed||[];for(let i=0;i<n.length;i++){const r=n[i];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const r=t.byDeclaredAttr.get(i);r.some(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=Ge(e);if(i===null)t.reactiveWildcard.push(e);else for(const r of i)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function ae(e,t,n,i){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const l=s.effects&&s.effects[n];l?l(t,n,i):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,i)}}function et(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=se(),r=i.byAttr.get(t),s=z()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!r&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&E(l)){const a=i.byDeclaredAttr.get(t),o=l.getAttribute(t);for(let c=0;c<a.length;c++)ie(a[c].spec,o,t,a[c].componentTag,l)}if(window.lnCore._debugSink&&(n||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const a=i.byReactive.get(t);a&&ae(a,l,t,e.oldValue),i.reactiveWildcard.length&&ae(i.reactiveWildcard,l,t,e.oldValue)}if(r)for(let a=0;a<r.length;a++){const o=r[a];if(o.handler){o.handler(l,t,e.oldValue);continue}o.onAttributeChange&&l[o.attribute]?o.onAttributeChange(l,t):(le(l,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(l))}}}function tt(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,m(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{et(t[n])}catch(i){console.error("[ln-core] mutation handler failed",t[n].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function I(){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(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ce(e){const t=D();if(!t.length)return;const n=e.target;if(n){const r=n.nodeType===1?n:n.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=I();if(e.target&&i.length)for(let r=0;r<i.length;r++){const s=i[r],l=s.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&&s.onSubtreeChange(a,e)}for(let r=0;r<e.addedNodes.length;r++){const s=e.addedNodes[r];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const o=t[a];if(o.selector&&o.attribute&&o.ComponentFn){if(!l)s.matches&&s.matches(o.query)&&C(s,o);else if(s.matches&&s.matches(o.query)&&C(s,o),s.querySelectorAll){const c=s.querySelectorAll(o.query);for(let d=0;d<c.length;d++)C(c[d],o)}}o.onInit&&o.onInit(s)}}}for(let r=0;r<e.removedNodes.length;r++){const s=e.removedNodes[r];if(s.nodeType===1){if(document.contains(s))continue;const l=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const o=t[a],c=o.query;if(c){if(!l)s.matches&&s.matches(c)&&M(s,o);else if(s.matches&&s.matches(c)&&M(s,o),s.querySelectorAll){const d=s.querySelectorAll(c);for(let f=0;f<d.length;f++)M(d[f],o)}}}}}}function ue(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,m(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{ce(i)}catch(r){console.error("[ln-core] lifecycle handler failed",i.target,r)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function nt(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let i=0;i<n.length;i++){const r=n[i];if(r.type==="childList")try{ce(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function rt(e){D().push(e),e.onSubtreeChange&&e.query&&I().push(e),ue()}function de(e,t,n,i,r={}){const s=r.extraAttributes||[],l=r.onAttributeChange||null,a=r.onSubtreeChange||null,o=r.onInit||null,c=r.onAttrChange||null,d=r.effects||null,f=r.attributes||null,p=f?Je(f):d,S=f?new Set(Object.keys(f)):null,u=r.persist||null;function h(H){const b=H||document.body;if(le(b,e,t,n),f&&z())for(const v in f){const mt=f[v],U=Array.from(b.querySelectorAll("["+v+"]"));b.matches&&b.matches("["+v+"]")&&U.push(b);for(let V=0;V<U.length;V++){const Q=U[V];E(Q)&&ie(mt,Q.getAttribute(v),v,i,Q)}}o&&o(b)}const w=[];if(e.indexOf("[")!==-1){const H=/\[([\w-]+)/g;let b;for(;(b=H.exec(e))!==null;)w.push(b[1])}else w.push(e);Ze({selector:e,attribute:t,componentTag:i,attributes:f,ComponentFn:n,onInit:o,observed:w.concat(s),onAttributeChange:l,onAttrChange:c,effects:p,declared:S,persist:u}),tt();const y=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Le=r.subtreeQuery||(y?e:"["+e+"]"),Re={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:a,query:Le};D().push(Re),a&&Le&&I().push(Re),ue(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=de,window.lnCore.observeLifecycle=rt,window.lnCore.withoutLifecycle=nt);function De(){Xe()>0?Ye(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",De):De(),h}function fe(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,n={},i=fe(t);if(!i)return n;const r=i.split("&");for(let s=0;s<r.length;s++){const l=r[s];if(!l)continue;const a=l.indexOf(":"),o=a>-1?l.slice(0,a):l,c=a>-1?l.slice(a+1):"";if(o)try{n[o]=decodeURIComponent(c)}catch{n[o]=c}}return n}function ot(e){if(!e)return null;const t=$();return e in t?t[e]:null}function it(e,t){if(!e)return;const n=$();t==null?delete n[e]:n[e]=String(t);const r=Object.keys(n).map(function(s){const l=n[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");fe(location.hash)!==r&&(location.hash=r)}function lt(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function st(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function at(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ct(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 ut(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function dt(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),i=e.slice(t+1),r=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=ot,window.lnCore.hashSet=it,window.lnCore.hashLinkClick=lt,window.lnCore.resolveHashNamespace=st,window.lnCore.hashSortEncode=at,window.lnCore.hashSortDecode=ct,window.lnCore.hashFilterEncode=ut,window.lnCore.hashFilterDecode=dt);function ft(){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=ft);function ht(e,{isHydration:t=!1,hasPrimaryRegion:n=!1,primaryMatch:i=null}={}){const r=n?!i:!e.some(c=>c.match),s=[],l=[];for(const c of e)if(!(!c.targetEl&&!c.isPending)){if(!c.match){const d=t&&c.hasHydrate&&c.hasChildren;!c.hasKeep&&c.hasChildren&&!d&&c.targetEl&&s.push(c);continue}c.hasKeep&&c.mountedTemplate===c.match.route.templateNode||l.push(Object.assign({},c,{skipMount:t&&c.hasHydrate&&c.hasChildren}))}l.sort((c,d)=>c.regionKey==="__primary__"?-1:d.regionKey==="__primary__"?1:0);const o=l.find(c=>c.regionKey==="__primary__")||l[0]||null;return{notFound:r,clears:s,swaps:l,owner:o}}function _(e){if(!e||typeof e!="string")return"";let t=e.trim().replace(/\/+$/,"");return!t||t==="/"?"":t.startsWith("/")?t:"/"+t}function wt(e,t){const n=_(t);if(!n)return e&&e.replace(/\/+$/,"")||"/";const i=(e||"/").replace(/\/+$/,"")||"/";return i===n?"/":i.startsWith(n+"/")?i.slice(n.length).replace(/\/+$/,"")||"/":i}function he(e,t){const n=_(t);if(!n)return e||"/";const i=e||"/",r=i.indexOf("#"),s=r!==-1?i.slice(0,r):i,l=r!==-1?i.slice(r):"",a=s.indexOf("?"),o=a!==-1?s.slice(0,a):s,c=a!==-1?s.slice(a):"";let d;if(o===n)d=n+"/";else if(o.startsWith(n+"/"))d=o;else{const f=o.startsWith("/")?o:"/"+o;d=f==="/"?n+"/":n+f}return d+c+l}function T(){if(typeof document>"u")return"";const e=document.querySelector("[data-ln-outlet]")||document.querySelector("[data-ln-router-base]");if(e&&e.hasAttribute("data-ln-router-base"))return _(e.getAttribute("data-ln-router-base"));const t=document.querySelector("base[href]");if(t)try{const n=new URL(t.getAttribute("href"),window.location.origin);return _(n.pathname)}catch{return _(t.getAttribute("href"))}return""}const F={navigate:function(e){A(e,{historyAction:"push"})},replace:function(e){A(e,{historyAction:"replace"})},base:function(){return T()},toUrl:function(e){return he(e,T())},current:function(){return k===null?null:{path:k,fullPath:be,base:ye,params:me,query:Ce,route:_e,regions:pe}}},N="data-ln-route",we="lnRoute";typeof window<"u"&&(window.lnRouter=F);function B(e){Oe(e),Ee(e),g.size>0&&xe()}const pt={"data-ln-route":{effect:B,type:"string",description:"URL path pattern matched by this route template"},"data-ln-route-target":{effect:B,type:"string",description:"Target outlet element selector where route content is rendered"},"data-ln-route-title":{effect:B,type:"string",description:"Document title template set when route is activated"},"data-ln-route-keep":{type:"boolean",fallback:!1,description:"Preserve mounted DOM nodes in memory instead of rebuilding"},"data-ln-router-base":{type:"string",description:'Base URL prefix for subdirectory routing (e.g. "/spa")'},"data-ln-router-hydrate":{type:"boolean",fallback:!1,description:"Hydrate existing DOM content on initial router boot"}},g=new Map,W=new WeakMap;let pe=new Map,ge=!1,k=null,be=null,ye="",me={},Ce={},_e=null,j=!1;function Ae(e,t,n){j?queueMicrotask(function(){O(e,t,n)}):O(e,t,n)}function K(e){try{const a=new URL(e,window.location.origin);e=a.pathname+a.search+a.hash}catch{}let[t]=e.split("#"),[n,i]=t.split("?");const r={};if(i){const a=new URLSearchParams(i);for(const[o,c]of a.entries())r[o]=c}const s=T();return{path:wt(n,s),query:r,base:s}}function ve(e,t){if(e.pattern==="*")return 1;if(t.pattern==="*")return-1;const n=e.segments,i=t.segments,r=Math.max(n.length,i.length);for(let s=0;s<r;s++){const l=n[s],a=i[s];if(l===void 0)return 1;if(a===void 0)return-1;if(l==="*")return 1;if(a==="*")return-1;const o=l.startsWith(":"),c=a.startsWith(":");if(o&&!c)return 1;if(!o&&c)return-1}return 0}function ke(e,t){const n=e.split("/").filter(Boolean);for(const i of t){if(i.pattern==="*")return{route:i,params:{wildcard:e}};const r=i.segments,s={};let l=!0;if(!(n.length>r.length&&r[r.length-1]!=="*")){for(let a=0;a<r.length;a++){const o=r[a],c=n[a];if(o==="*"){s.wildcard=n.slice(a).join("/");break}if(c===void 0){l=!1;break}if(o.startsWith(":"))s[o.slice(1)]=decodeURIComponent(c);else if(o!==c){l=!1;break}}if(l&&(r.indexOf("*")!==-1||n.length<=r.length))return{route:i,params:s}}}return null}function P(e,t={}){const n=t.warn!==!1;if(e!=="__primary__"){const r=document.getElementById(e);return!r&&n&&console.warn(`[ln-router] Explicit target element #${e} not found in DOM`),r}const i=document.querySelector("[data-ln-outlet]")||document.querySelector("main");return!i&&n&&console.warn("[ln-router] Default outlet (element with [data-ln-outlet] or <main>) not found in DOM"),i}function Se(e){if(!e)return;const t=Array.from(e.querySelectorAll("*")),n=[e].concat(t);for(const r of n)for(const s of Object.keys(r))if(s.startsWith("ln")&&r[s]&&typeof r[s].destroy=="function")try{r[s].destroy()}catch(l){console.error(`[ln-router] Error destroying component ${s} on element:`,r,l)}const i=document.querySelectorAll('[data-ln-popover="open"]');for(const r of i){const s=r.lnPopover;if(s&&s.trigger&&e.contains(s.trigger))try{s.destroy()}catch(l){console.error("[ln-router] Error destroying open popover:",l)}}}function A(e,t={}){const{path:n,query:i,base:r}=K(e),s=he(e,r),l=new Map;for(const[u,h]of g)l.set(u,ke(n,h.sorted));const a=l.get("__primary__")||null,o=P("__primary__",{warn:!!a}),c=g.has("__primary__"),d=[];for(const[u,h]of l){const w=u==="__primary__"?o:P(u,{warn:!1}),y=!w&&!!(a&&a.route&&a.route.templateNode&&a.route.templateNode.content&&a.route.templateNode.content.querySelector("#"+CSS.escape(u)));!w&&!y&&h&&console.warn(`[ln-router] Explicit target element #${u} not found in DOM`),d.push({regionKey:u,match:h,targetEl:w,isPending:y,hasKeep:!!w&&w.hasAttribute("data-ln-route-keep"),hasHydrate:!!w&&w.hasAttribute("data-ln-router-hydrate"),hasChildren:!!w&&w.children.length>0,mountedTemplate:w&&W.get(w)||null})}const f=ht(d,{isHydration:!!t.isHydration,hasPrimaryRegion:c,primaryMatch:a});if(f.notFound){Ae(document.body,"ln-router:not-found",{path:n});return}if(Ie(o||document.body,"ln-router:before-navigate",{from:k,to:s,path:n,params:a?a.params:{},query:i}).defaultPrevented)return;t.historyAction==="push"?window.history.pushState(null,"",s):t.historyAction==="replace"&&window.history.replaceState(null,"",s);const S=function(){for(const u of f.clears)Se(u.targetEl),u.targetEl.replaceChildren(),W.delete(u.targetEl);for(const u of f.swaps){if((u.isPending||!u.targetEl||!document.contains(u.targetEl))&&(u.targetEl=u.regionKey==="__primary__"?o:document.getElementById(u.regionKey)),!u.targetEl){console.warn(`[ln-router] Target element #${u.regionKey} could not be resolved`);continue}if(u.skipMount||(Se(u.targetEl),u.targetEl.replaceChildren(u.match.route.templateNode.content.cloneNode(!0))),W.set(u.targetEl,u.match.route.templateNode),f.owner&&u.regionKey===f.owner.regionKey){if(u.match.route.title){let h=u.match.route.title;if(u.match.params)for(const[w,y]of Object.entries(u.match.params))h=h.replace(new RegExp("\\{\\{\\s*"+w+"\\s*\\}\\}","g"),y);document.title=h}if(!t.isHydration){u.targetEl.hasAttribute("tabindex")||u.targetEl.setAttribute("tabindex","-1");const h=u.targetEl.querySelector("h1, h2, h3, h4, h5, h6");h?(h.setAttribute("tabindex","-1"),h.focus()):u.targetEl.focus(),u.regionKey==="__primary__"&&u.targetEl.scrollIntoView({block:"start",behavior:"instant"})}}Ae(u.targetEl,"ln-router:navigated",{path:n,fullPath:s,base:r,params:u.match.params,query:i,route:u.match.route,target:u.targetEl,region:u.regionKey})}k=n,be=s,ye=r,Ce=i,_e=a?a.route:null,me=a?a.params:{},pe=new Map(Array.from(l.entries()).map(([u,h])=>[u,h?{route:h.route,params:h.params}:null]))};document.startViewTransition&&!t.isHydration?document.startViewTransition(S):S()}function gt(e){const t=e.target.closest("a");if(!t||!Me(e,t))return;const n=t.getAttribute("href"),{path:i}=K(n);for(const r of g.values())if(ke(i,r.sorted)){e.preventDefault(),A(n,{historyAction:"push"});return}}function bt(e,t){const n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let r=0;r<n.length;r++){const s=n[r];if(e[s]!==t[s])return!1}return!0}function yt(){const e=window.location.pathname+window.location.search,t=F.current();if(t&&t.path!=null){const n=K(e);if(t.path===n.path&&bt(t.query,n.query))return}A(e,{historyAction:"skip"})}function xe(){ge||(ge=!0,m(function(){document.addEventListener("click",gt),window.addEventListener("popstate",yt),j=!0;const e=window.location.pathname+window.location.search+window.location.hash;A(e,{historyAction:"replace",isHydration:!0}),j=!1},"ln-router"))}function Ee(e){const t=e.getAttribute(N);if(!t)return;const n=e.getAttribute("data-ln-route-target")||null;if(n==="__primary__"){console.warn(`[ln-router] "__primary__" is a reserved region key and cannot be used as data-ln-route-target. Route "${t}" rejected.`);return}const i=n||"__primary__";g.has(i)||g.set(i,{routes:new Map,sorted:[]});const r=g.get(i);if(r.routes.has(t)){console.warn(`[ln-router] Duplicate route pattern registered: "${t}" in region "${i}"`);return}const s=e.getAttribute("data-ln-route-title"),l=t.split("/").filter(Boolean),a={pattern:t,segments:l,target:n,title:s,templateNode:e},o=P(i);o&&o.contains(e)&&console.warn(`[ln-router] Route template with pattern "${t}" is declared inside its own outlet element:`,e),r.routes.set(t,a),r.sorted=Array.from(r.routes.values()).sort(ve)}function Oe(e){const t=e.getAttribute(N);if(!t)return;const i=e.getAttribute("data-ln-route-target")||null||"__primary__",r=g.get(i);r&&(r.routes.delete(t),r.sorted=Array.from(r.routes.values()).sort(ve),r.routes.size===0&&g.delete(i))}function qe(e){return this.dom=e,Ee(e),this}return qe.prototype.destroy=function(){Oe(this.dom),delete this.dom[we]},de(N,we,qe,"ln-router",{attributes:pt,onInit:function(){g.size>0&&xe()}}),x.router=F,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"}),x})({});
@@ -1 +1 @@
1
- (function(){"use strict";function F(){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 A(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(!A(l))return}e.apply(console,t)}}function N(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 te(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 C(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){C(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const r=!!(t&&t.typed),l=t&&t.exclude,o={},s=e.elements,i={};if(r)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[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")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 a=0;a<n.options.length;a++)n.options[a].selected&&o[n.name].push(n.options[a].value)}else if(r&&n.type==="hidden")o[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const a=Number(n.value);o[n.name]=n.value===""||isNaN(a)?null:a}else o[n.name]=n.value}return o}function re(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ie(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 c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(o[i.name]>1){const a=String(n).split(",").map(function(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=re(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 a=0;a<i.options.length;a++)i.options[a].selected=n.indexOf(i.options[a].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=ie,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=ne);const $={};function le(e,t){$[e]=t}function se(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,C(function(){new MutationObserver(function(){N(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function ae(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];R[r]=t}function ue(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=ae,window.lnCore.getLocaleFallback=ue,window.lnCore.ensureLocaleObserver=ce);const v={};function de(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=v[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function B(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function fe(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)B(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 s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const 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],c=i.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function we(e,t,r,l,o,s){const i={};for(let n=0;n<e.children.length;n++){const a=e.children[n],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],u=String(l(a));let d=i[u];if(d)o(d,a,n);else{const f=de(r,s);if(!f||(M(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,a,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=B,window.lnCore.lnFill=fe,window.lnCore.renderList=we);function k(e,t,r){const l=e.getAttribute(t);return l===null?r:l}function W(e,t,r){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?r:l}function x(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 j(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const _=new Map;function U(e,t){const r=(e?e.join("|"):"")+"::"+t;if(_.has(r))return _.get(r);const l=new Set(e||[]),o=function(s,i){const c=s.getAttribute(i);return c!==null&&l.has(c)?c:t};return _.set(r,o),o}function V(e,t,r){const l=parseFloat(e.getAttribute(t));return isNaN(l)?r:l}function H(e,t,r){const l=e.getAttribute(t);if(!l)return r;try{return JSON.parse(l)}catch{return r}}function K(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 c=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"?(c(`[${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:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function he(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 be(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=U(l.values,l.fallback);break;case"integer":o=W;break;case"float":o=V;break;case"boolean":o=x;break;case"list":o=j;break;case"json":o=H;break;case"string":default:o=k;break}o||(o=k),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=he,window.lnCore.attrSpec=be,window.lnCore.attrStr=k,window.lnCore.attrInt=W,window.lnCore.attrBool=x,window.lnCore.attrList=j,window.lnCore.attrEnum=U,window.lnCore.attrFloat=V,window.lnCore.attrJson=H);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(r){console.error("["+t.attribute+"] init failed",e,r)}}}function Q(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)&&m(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)m(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function me(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ye(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 Ce(e){const t=J(),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 P(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 Ae(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,l=J(),o=l.byAttr.get(t),s=F()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!r&&!o&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&A(i)){const c=l.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let a=0;a<c.length;a++)K(c[a].spec,n,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(r||o)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const c=l.byReactive.get(t);c&&P(c,i,t,e.oldValue),l.reactiveWildcard.length&&P(l.reactiveWildcard,i,t,e.oldValue)}if(o)for(let c=0;c<o.length;c++){const n=o[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Q(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,C(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ae(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 E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function O(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 ke(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=E();if(e.target&&l.length)for(let o=0;o<l.length;o++){const s=l[o],i=s.query,c=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;c&&s.onSubtreeChange(c,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 c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&m(s,n);else if(s.matches&&s.matches(n.query)&&m(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let u=0;u<a.length;u++)m(a[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 c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!i)s.matches&&s.matches(a)&&O(s,n);else if(s.matches&&s.matches(a)&&O(s,n),s.querySelectorAll){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)O(u[d],n)}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,C(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const l=t[r];if(l.type==="childList")try{ke(l)}catch(o){console.error("[ln-core] lifecycle handler failed",l.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function xe(e){S().push(e),e.onSubtreeChange&&e.query&&E().push(e),z()}function G(e,t,r,l,o={}){const s=o.extraAttributes||[],i=o.onAttributeChange||null,c=o.onSubtreeChange||null,n=o.onInit||null,a=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,f=d?pe(d):u,h=d?new Set(Object.keys(d)):null,g=o.persist||null;function w(L){const p=L||document.body;if(Q(p,e,t,r),d&&F())for(const y in d){const Ne=d[y],I=Array.from(p.querySelectorAll("["+y+"]"));p.matches&&p.matches("["+y+"]")&&I.push(p);for(let q=0;q<I.length;q++){const T=I[q];A(T)&&K(Ne,T.getAttribute(y),y,l,T)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let p;for(;(p=L.exec(e))!==null;)b.push(p[1])}else b.push(e);Ce({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:r,onInit:n,observed:b.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:h,persist:g}),ve();const Fe=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Y=o.subtreeQuery||(Fe?e:"["+e+"]"),Z={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:c,query:Y};S().push(Z),c&&Y&&E().push(Z),z(),window[t]=w,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=xe);function ee(){me()>0?ye(function(){w(document.body)}):w(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee(),w}function X(e){return(e||"").replace(/^#/,"")}function D(e){const t=e===void 0?location.hash:e,r={},l=X(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 c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(n)try{r[n]=decodeURIComponent(a)}catch{r[n]=a}}return r}function _e(e){if(!e)return null;const t=D();return e in t?t[e]:null}function Se(e,t){if(!e)return;const r=D();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("&");X(location.hash)!==o&&(location.hash=o)}function Ee(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 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 De(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 Ie(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=D,window.lnCore.hashGet=_e,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Oe,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=qe);function Te(){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=Te),(function(){const e="data-ln-scroll",t="lnScroll";if(window[t]!==void 0)return;const r={"data-ln-scroll":{effect:null,type:"string",description:"Target element ID or CSS selector to scroll into view"},"data-ln-scroll-behavior":{effect:null,type:"enum",values:["smooth","auto"],fallback:"smooth",description:"Scroll animation behavior transition"},"data-ln-scroll-block":{effect:null,type:"enum",values:["start","center","end","nearest"],fallback:"start",description:"Vertical alignment positioning of scrolled target"},"data-ln-scroll-set":{effect:null,type:"string",description:"Optional state attribute assignment on target after scroll (e.g. data-ln-toggle=open)"},"data-ln-scroll-focus":{effect:null,type:"string",description:'CSS selector of element to focus after scroll, or "false" to disable'},"data-ln-scroll-delay":{effect:null,type:"integer",fallback:450,min:0,description:"Delay in milliseconds before shifting keyboard focus"},"data-ln-scroll-update-hash":{effect:null,type:"boolean",fallback:!1,description:"Whether to update URL hash with target ID"}};function l(o){if(o[t])return o[t];if(!(!o||o.tagName!=="A"&&o.tagName!=="BUTTON"))return o[t]=this,this.dom=o,this._handleClick=this._handleClick.bind(this),this.dom.addEventListener("click",this._handleClick),this}l.prototype._handleClick=function(o){if(this.dom.tagName==="A"&&(o.ctrlKey||o.metaKey||o.shiftKey||o.altKey||o.button!==0))return;let s=(this.dom.getAttribute("data-ln-scroll")||"").trim();if(s||(s=(this.dom.getAttribute("href")||"").trim()),!s||s==="#")return;!s.startsWith("#")&&!s.startsWith(".")&&!s.startsWith("[")&&(s="#"+s);let i=null;try{i=document.querySelector(s)}catch{const g=s.replace(/^#/,"");i=document.getElementById(g)}if(!i)return;o.preventDefault();const c=this.dom.getAttribute("data-ln-scroll-set");if(c){const h=c.indexOf(":");if(h!==-1){const g=c.slice(0,h).trim(),w=c.slice(h+1).trim();try{const b=document.querySelector(g);b&&(b.value=w,b.dispatchEvent(new Event("input",{bubbles:!0})),b.dispatchEvent(new Event("change",{bubbles:!0})))}catch{}}}if(te(this.dom,"ln-scroll:before-scroll",{target:i,link:this.dom,href:s}).defaultPrevented)return;const a=this.dom.getAttribute("data-ln-scroll-behavior")||"smooth",u=this.dom.getAttribute("data-ln-scroll-block")||"start";if(i.scrollIntoView({behavior:a,block:u}),x(this.dom,"data-ln-scroll-update-hash",!1))try{window.history&&window.history.pushState&&window.history.pushState(null,"",s)}catch{}const f=this.dom.getAttribute("data-ln-scroll-focus");if(f!=="false"&&f!=="0"){const h=parseInt(this.dom.getAttribute("data-ln-scroll-delay"),10),g=isNaN(h)?450:h;window.setTimeout(function(){let w=null;if(f&&f!=="true"&&f!=="1")try{w=document.querySelector(f)}catch{}w||(w=i.querySelector('input:not([type="hidden"]):not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])')),!w&&i.getAttribute("tabindex")!==null&&(w=i),w&&typeof w.focus=="function"&&w.focus({preventScroll:!0})},g)}N(this.dom,"ln-scroll:scrolled",{target:i,link:this.dom,href:s})},l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("click",this._handleClick),delete this.dom[t])},G(e,t,l,"ln-scroll",{attributes:r})})()})();
1
+ (function(){"use strict";function F(){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 A(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(!A(l))return}e.apply(console,t)}}function N(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 ne(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 C(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){C(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 re(e,t){const r=!!(t&&t.typed),l=t&&t.exclude,o={},s=e.elements,i={};if(r)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[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")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 a=0;a<n.options.length;a++)n.options[a].selected&&o[n.name].push(n.options[a].value)}else if(r&&n.type==="hidden")o[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const a=Number(n.value);o[n.name]=n.value===""||isNaN(a)?null:a}else o[n.name]=n.value}return o}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(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 c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(o[i.name]>1){const a=String(n).split(",").map(function(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=ie(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 a=0;a<i.options.length;a++)i.options[a].selected=n.indexOf(i.options[a].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=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=oe);const $={};function se(e,t){$[e]=t}function ce(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ce);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,C(function(){new MutationObserver(function(){N(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function ue(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];R[r]=t}function de(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=ue,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ae);const v={};function fe(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=v[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function B(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function we(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)B(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 s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const 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],c=i.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function he(e,t,r,l,o,s){const i={};for(let n=0;n<e.children.length;n++){const a=e.children[n],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],u=String(l(a));let d=i[u];if(d)o(d,a,n);else{const f=fe(r,s);if(!f||(M(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,a,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=B,window.lnCore.lnFill=we,window.lnCore.renderList=he);function k(e,t,r){const l=e.getAttribute(t);return l===null?r:l}function W(e,t,r){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?r:l}function x(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 j(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const _=new Map;function U(e,t){const r=(e?e.join("|"):"")+"::"+t;if(_.has(r))return _.get(r);const l=new Set(e||[]),o=function(s,i){const c=s.getAttribute(i);return c!==null&&l.has(c)?c:t};return _.set(r,o),o}function V(e,t,r){const l=parseFloat(e.getAttribute(t));return isNaN(l)?r:l}function H(e,t,r){const l=e.getAttribute(t);if(!l)return r;try{return JSON.parse(l)}catch{return r}}function K(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 c=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"?(c(`[${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:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function be(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 pe(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=U(l.values,l.fallback);break;case"integer":o=W;break;case"float":o=V;break;case"boolean":o=x;break;case"list":o=j;break;case"json":o=H;break;case"string":default:o=k;break}o||(o=k),t[l.prop]=[o,r,l.fallback]}return t}function ge(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 ye(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=be,window.lnCore.attrSpec=pe,window.lnCore.attrStr=k,window.lnCore.attrInt=W,window.lnCore.attrBool=x,window.lnCore.attrList=j,window.lnCore.attrEnum=U,window.lnCore.attrFloat=V,window.lnCore.attrJson=H);function y(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 Q(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)&&y(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)y(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function me(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(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 Ae(e){const t=J(),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=ye(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 P(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=J(),o=l.byAttr.get(t),s=F()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!r&&!o&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&A(i)){const c=l.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let a=0;a<c.length;a++)K(c[a].spec,n,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(r||o)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const c=l.byReactive.get(t);c&&P(c,i,t,e.oldValue),l.reactiveWildcard.length&&P(l.reactiveWildcard,i,t,e.oldValue)}if(o)for(let c=0;c<o.length;c++){const n=o[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Q(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,C(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 E(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function O(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 z(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=E();if(e.target&&l.length)for(let o=0;o<l.length;o++){const s=l[o],i=s.query,c=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;c&&s.onSubtreeChange(c,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 c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&y(s,n);else if(s.matches&&s.matches(n.query)&&y(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let u=0;u<a.length;u++)y(a[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){if(document.contains(s))continue;const i=!!(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(!i)s.matches&&s.matches(a)&&O(s,n);else if(s.matches&&s.matches(a)&&O(s,n),s.querySelectorAll){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)O(u[d],n)}}}}}}function G(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,C(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const l=t[r];if(l.type==="childList")try{z(l)}catch(o){console.error("[ln-core] lifecycle handler failed",l.target,o)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function xe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let l=0;l<r.length;l++){const o=r[l];if(o.type==="childList")try{z(o)}catch(s){console.error("[ln-core] lifecycle handler failed",o.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function _e(e){S().push(e),e.onSubtreeChange&&e.query&&E().push(e),G()}function X(e,t,r,l,o={}){const s=o.extraAttributes||[],i=o.onAttributeChange||null,c=o.onSubtreeChange||null,n=o.onInit||null,a=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,f=d?ge(d):u,h=d?new Set(Object.keys(d)):null,g=o.persist||null;function w(D){const p=D||document.body;if(Q(p,e,t,r),d&&F())for(const m in d){const $e=d[m],I=Array.from(p.querySelectorAll("["+m+"]"));p.matches&&p.matches("["+m+"]")&&I.push(p);for(let q=0;q<I.length;q++){const T=I[q];A(T)&&K($e,T.getAttribute(m),m,l,T)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let p;for(;(p=D.exec(e))!==null;)b.push(p[1])}else b.push(e);Ae({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:r,onInit:n,observed:b.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:h,persist:g}),ke();const Ne=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Z=o.subtreeQuery||(Ne?e:"["+e+"]"),ee={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:c,query:Z};S().push(ee),c&&Z&&E().push(ee),G(),window[t]=w,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=X,window.lnCore.observeLifecycle=_e,window.lnCore.withoutLifecycle=xe);function te(){me()>0?Ce(function(){w(document.body)}):w(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",te):te(),w}function Y(e){return(e||"").replace(/^#/,"")}function L(e){const t=e===void 0?location.hash:e,r={},l=Y(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 c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(n)try{r[n]=decodeURIComponent(a)}catch{r[n]=a}}return r}function Se(e){if(!e)return null;const t=L();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const r=L();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("&");Y(location.hash)!==o&&(location.hash=o)}function Oe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(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 De(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 qe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Te(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=L,window.lnCore.hashGet=Se,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=Oe,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=Ie,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=Te);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-scroll",t="lnScroll";if(window[t]!==void 0)return;const r={"data-ln-scroll":{effect:null,type:"string",description:"Target element ID or CSS selector to scroll into view"},"data-ln-scroll-behavior":{effect:null,type:"enum",values:["smooth","auto"],fallback:"smooth",description:"Scroll animation behavior transition"},"data-ln-scroll-block":{effect:null,type:"enum",values:["start","center","end","nearest"],fallback:"start",description:"Vertical alignment positioning of scrolled target"},"data-ln-scroll-set":{effect:null,type:"string",description:"Optional state attribute assignment on target after scroll (e.g. data-ln-toggle=open)"},"data-ln-scroll-focus":{effect:null,type:"string",description:'CSS selector of element to focus after scroll, or "false" to disable'},"data-ln-scroll-delay":{effect:null,type:"integer",fallback:450,min:0,description:"Delay in milliseconds before shifting keyboard focus"},"data-ln-scroll-update-hash":{effect:null,type:"boolean",fallback:!1,description:"Whether to update URL hash with target ID"}};function l(o){if(o[t])return o[t];if(!(!o||o.tagName!=="A"&&o.tagName!=="BUTTON"))return o[t]=this,this.dom=o,this._handleClick=this._handleClick.bind(this),this.dom.addEventListener("click",this._handleClick),this}l.prototype._handleClick=function(o){if(this.dom.tagName==="A"&&(o.ctrlKey||o.metaKey||o.shiftKey||o.altKey||o.button!==0))return;let s=(this.dom.getAttribute("data-ln-scroll")||"").trim();if(s||(s=(this.dom.getAttribute("href")||"").trim()),!s||s==="#")return;!s.startsWith("#")&&!s.startsWith(".")&&!s.startsWith("[")&&(s="#"+s);let i=null;try{i=document.querySelector(s)}catch{const g=s.replace(/^#/,"");i=document.getElementById(g)}if(!i)return;o.preventDefault();const c=this.dom.getAttribute("data-ln-scroll-set");if(c){const h=c.indexOf(":");if(h!==-1){const g=c.slice(0,h).trim(),w=c.slice(h+1).trim();try{const b=document.querySelector(g);b&&(b.value=w,b.dispatchEvent(new Event("input",{bubbles:!0})),b.dispatchEvent(new Event("change",{bubbles:!0})))}catch{}}}if(ne(this.dom,"ln-scroll:before-scroll",{target:i,link:this.dom,href:s}).defaultPrevented)return;const a=this.dom.getAttribute("data-ln-scroll-behavior")||"smooth",u=this.dom.getAttribute("data-ln-scroll-block")||"start";if(i.scrollIntoView({behavior:a,block:u}),x(this.dom,"data-ln-scroll-update-hash",!1))try{window.history&&window.history.pushState&&window.history.pushState(null,"",s)}catch{}const f=this.dom.getAttribute("data-ln-scroll-focus");if(f!=="false"&&f!=="0"){const h=parseInt(this.dom.getAttribute("data-ln-scroll-delay"),10),g=isNaN(h)?450:h;window.setTimeout(function(){let w=null;if(f&&f!=="true"&&f!=="1")try{w=document.querySelector(f)}catch{}w||(w=i.querySelector('input:not([type="hidden"]):not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])')),!w&&i.getAttribute("tabindex")!==null&&(w=i),w&&typeof w.focus=="function"&&w.focus({preventScroll:!0})},g)}N(this.dom,"ln-scroll:scrolled",{target:i,link:this.dom,href:s})},l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("click",this._handleClick),delete this.dom[t])},X(e,t,l,"ln-scroll",{attributes:r})})()})();