@livenetworks/ashlar 2.1.11 → 2.1.12

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 (58) 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/events.js +5 -2
  10. package/components/ln-core/lifecycle.js +25 -44
  11. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  12. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  13. package/components/ln-data-store/ln-data-store.js +1 -1
  14. package/components/ln-date/ln-date.js +1 -1
  15. package/components/ln-debug/ln-debug.js +1 -1
  16. package/components/ln-debug/ln-debug.schema.json +28 -28
  17. package/components/ln-debug/src/debug-verifier.js +24 -30
  18. package/components/ln-debug/src/ln-debug.js +3 -11
  19. package/components/ln-dropdown/ln-dropdown.js +1 -1
  20. package/components/ln-editor/ln-editor.js +1 -1
  21. package/components/ln-external-links/ln-external-links.js +1 -1
  22. package/components/ln-filter/ln-filter.js +1 -1
  23. package/components/ln-form/ln-form.js +1 -1
  24. package/components/ln-icon/ln-icon.js +1 -1
  25. package/components/ln-include/ln-include.js +1 -1
  26. package/components/ln-key/ln-key.js +1 -1
  27. package/components/ln-link/ln-link.js +1 -1
  28. package/components/ln-list/ln-list.js +1 -1
  29. package/components/ln-modal/ln-modal.js +1 -1
  30. package/components/ln-nav/ln-nav.js +1 -1
  31. package/components/ln-number/ln-number.js +1 -1
  32. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  33. package/components/ln-options/ln-options.js +1 -1
  34. package/components/ln-persist/ln-persist.js +1 -1
  35. package/components/ln-picklist/ln-picklist.js +1 -1
  36. package/components/ln-popover/ln-popover.js +1 -1
  37. package/components/ln-progress/ln-progress.js +1 -1
  38. package/components/ln-router/ln-router.js +1 -1
  39. package/components/ln-scroll/ln-scroll.js +1 -1
  40. package/components/ln-search/ln-search.js +1 -1
  41. package/components/ln-slug/ln-slug.js +1 -1
  42. package/components/ln-sort/ln-sort.js +1 -1
  43. package/components/ln-sortable/ln-sortable.js +1 -1
  44. package/components/ln-stat/ln-stat.js +1 -1
  45. package/components/ln-table/ln-table.js +1 -1
  46. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  47. package/components/ln-tabs/ln-tabs.js +1 -1
  48. package/components/ln-time/ln-time.js +1 -1
  49. package/components/ln-toast/ln-toast.js +1 -1
  50. package/components/ln-toggle/ln-toggle.js +1 -1
  51. package/components/ln-tooltip/ln-tooltip.js +1 -1
  52. package/components/ln-translations/ln-translations.js +1 -1
  53. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  54. package/components/ln-upload/ln-upload.js +1 -1
  55. package/components/ln-validate/ln-validate.js +1 -1
  56. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  57. package/package.json +1 -1
  58. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function W(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function T(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!T(r))return}e.apply(console,t)}}function S(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function L(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){L(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ce(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function de(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,o={},a=e.elements,s={};if(n)for(let u=0;u<a.length;u++){const i=a[u];i.name&&i.type==="checkbox"&&!i.disabled&&(s[i.name]=(s[i.name]||0)+1)}for(let u=0;u<a.length;u++){const i=a[u];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(r&&i.matches&&i.matches(r)))if(i.type==="checkbox")n&&s[i.name]===1?o[i.name]=i.checked:(o[i.name]||(o[i.name]=[]),i.checked&&o[i.name].push(i.value));else if(i.type==="radio")i.checked&&(o[i.name]=i.value);else if(i.type==="select-multiple"){o[i.name]=[];for(let l=0;l<i.options.length;l++)i.options[l].selected&&o[i.name].push(i.options[l].value)}else if(n&&i.type==="hidden")o[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const l=Number(i.value);o[i.name]=i.value===""||isNaN(l)?null:l}else o[i.name]=i.value}return o}function fe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function we(e,t){const n=e.elements,r=[],o={};for(let a=0;a<n.length;a++){const s=n[a];s.name&&s.type==="checkbox"&&(o[s.name]=(o[s.name]||0)+1)}for(let a=0;a<n.length;a++){const s=n[a];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const u=s.getAttribute("data-ln-fill-as")||s.name;if(!u||!(u in t))continue;const i=t[u];if(s.type==="checkbox"){if(Array.isArray(i))s.checked=i.indexOf(s.value)!==-1;else if(o[s.name]>1){const l=String(i).split(",").map(function(c){return c.trim()});s.checked=l.indexOf(s.value)!==-1}else s.checked=fe(i);r.push(s)}else if(s.type==="radio")s.checked=s.value===String(i),r.push(s);else if(s.type==="select-multiple"){if(Array.isArray(i))for(let l=0;l<s.options.length;l++)s.options[l].selected=i.indexOf(s.options[l].value)!==-1;r.push(s)}else s.value=i,s.tagName==="SELECT"&&i!=null&&s.setAttribute("data-ln-value",i),r.push(s)}return r}function he(e,t,{get:n,set:r}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(o){r?r.call(this,o,a=>t.set.call(this,a)):t.set.call(this,o)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=we,window.lnCore.serializeForm=de,window.lnCore.resolveFormMethod=ce);const P={};function pe(e,t){P[e]=t}function me(e){return P[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=pe,window.lnCore.getDataMapper=me);function A(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function U(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,L(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const K={};function be(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];K[n]=t}function ge(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return K[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=be,window.lnCore.getLocaleFallback=ge,window.lnCore.ensureLocaleObserver=U);const I={};function ye(e,t){I[e]||(I[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=I[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Q(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const u=n[s],i=u.getAttribute("data-ln-field");t[i]!=null&&(u.textContent=t[i])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const u=r[s],i=u.getAttribute("data-ln-attr").split(",");for(let l=0;l<i.length;l++){const c=i[l].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),p=c[1].trim();t[p]!=null&&u.setAttribute(d,t[p])}}const o=e.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const u=o[s],i=u.getAttribute("data-ln-show");i in t&&u.classList.toggle("hidden",!t[i])}const a=e.querySelectorAll("[data-ln-class]");for(let s=0;s<a.length;s++){const u=a[s],i=u.getAttribute("data-ln-class").split(",");for(let l=0;l<i.length;l++){const c=i[l].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),p=c[1].trim();p in t&&u.classList.toggle(d,!!t[p])}}return e}function Ce(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Q(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function G(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,u){return t[u]!==void 0?t[u]:""}))}const r=function(a,s){return t[s]!==void 0?t[s]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let a=0;a<o.length;a++){const s=o[a],u=s.attributes;for(let i=0;i<u.length;i++){const l=u[i];l.value.indexOf("{{")!==-1&&s.setAttribute(l.name,l.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function _e(e,t,n,r,o,a){const s={};for(let i=0;i<e.children.length;i++){const l=e.children[i],c=l.getAttribute("data-ln-render-key");c&&(s[c]=l)}const u=document.createDocumentFragment();for(let i=0;i<t.length;i++){const l=t[i],c=String(r(l));let d=s[c];if(d)o(d,l,i);else{const p=ye(n,a);if(!p||(G(p,l),d=p.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",c),o(d,l,i)}u.appendChild(d)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=G,window.lnCore.fill=Q,window.lnCore.lnFill=Ce,window.lnCore.renderList=_e);function q(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function J(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function z(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function X(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function Y(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),o=function(a,s){const u=a.getAttribute(s);return u!==null&&r.has(u)?u:t};return $.set(n,o),o}function Z(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ee(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function te(e,t,n,r,o){if(!e||t===null)return!0;const a=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const u=i=>{o?console.warn(i,o):console.warn(i)};if(s==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(u(`[${a}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const i=e.values||[];return i.includes(t)?!0:(u(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return u(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(u(`[${a}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(u(`[${a}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(u(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(i){return u(`[${a}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ae(e,t,n){for(const r in n){const[o,a,s]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,a,s)},enumerable:!0,configurable:!0})}return e}function xe(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Y(r.values,r.fallback);break;case"integer":o=J;break;case"float":o=Z;break;case"boolean":o=z;break;case"list":o=X;break;case"json":o=ee;break;case"string":default:o=q;break}o||(o=q),t[r.prop]=[o,n,r.fallback]}return t}function ve(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function Ee(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=Ae,window.lnCore.attrSpec=xe,window.lnCore.attrStr=q,window.lnCore.attrInt=J,window.lnCore.attrBool=z,window.lnCore.attrList=X,window.lnCore.attrEnum=Y,window.lnCore.attrFloat=Z,window.lnCore.attrJson=ee);function F(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function ne(e,t,n,r){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(a)&&F(e,s),e.querySelectorAll){const u=e.querySelectorAll(a);for(let i=0;i<u.length;i++)F(u[i],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Se(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function De(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function re(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ne(e){const t=re(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(a=>a.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Ee(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function ie(e,t,n,r){for(let o=0;o<e.length;o++){const a=e[o];if(!t[a.attribute])continue;const s=a.effects&&a.effects[n];s?s(t,n,r):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,r)}}function ke(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=re(),o=r.byAttr.get(t),a=W()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!o&&!a)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(a&&T(s)){const u=r.byDeclaredAttr.get(t),i=s.getAttribute(t);for(let l=0;l<u.length;l++)te(u[l].spec,i,t,u[l].componentTag,s)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),n){const u=r.byReactive.get(t);u&&ie(u,s,t,e.oldValue),r.reactiveWildcard.length&&ie(r.reactiveWildcard,s,t,e.oldValue)}if(o)for(let u=0;u<o.length;u++){const i=o[u];if(i.handler){i.handler(s,t,e.oldValue);continue}i.onAttributeChange&&s[i.attribute]?i.onAttributeChange(s,t):(ne(s,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(s))}}}function Re(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,L(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ke(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function j(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function H(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function M(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=j();if(!t.length)return;const n=e.target;if(n){const o=n.nodeType===1?n:n.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=H();if(e.target&&r.length)for(let o=0;o<r.length;o++){const a=r[o],s=a.query,u=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;u&&a.onSubtreeChange(u,e)}for(let o=0;o<e.addedNodes.length;o++){const a=e.addedNodes[o];if(a.nodeType===1){const s=!!(a.firstElementChild||a.children&&a.children.length);for(let u=0;u<t.length;u++){const i=t[u];if(i.selector&&i.attribute&&i.ComponentFn){if(!s)a.matches&&a.matches(i.query)&&F(a,i);else if(a.matches&&a.matches(i.query)&&F(a,i),a.querySelectorAll){const l=a.querySelectorAll(i.query);for(let c=0;c<l.length;c++)F(l[c],i)}}i.onInit&&i.onInit(a)}}}for(let o=0;o<e.removedNodes.length;o++){const a=e.removedNodes[o];if(a.nodeType===1){if(document.contains(a))continue;const s=!!(a.firstElementChild||a.children&&a.children.length);for(let u=0;u<t.length;u++){const i=t[u],l=i.query;if(l){if(!s)a.matches&&a.matches(l)&&M(a,i);else if(a.matches&&a.matches(l)&&M(a,i),a.querySelectorAll){const c=a.querySelectorAll(l);for(let d=0;d<c.length;d++)M(c[d],i)}}}}}}function le(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,L(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{oe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Fe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const o=n[r];if(o.type==="childList")try{oe(o)}catch(a){console.error("[ln-core] lifecycle handler failed",o.target,a)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Le(e){j().push(e),e.onSubtreeChange&&e.query&&H().push(e),le()}function se(e,t,n,r,o={}){const a=o.extraAttributes||[],s=o.onAttributeChange||null,u=o.onSubtreeChange||null,i=o.onInit||null,l=o.onAttrChange||null,c=o.effects||null,d=o.attributes||null,p=d?ve(d):c,f=d?new Set(Object.keys(d)):null,w=o.persist||null;function h(N){const y=N||document.body;if(ne(y,e,t,n),d&&W())for(const k in d){const g=d[k],v=Array.from(y.querySelectorAll("["+k+"]"));y.matches&&y.matches("["+k+"]")&&v.push(y);for(let R=0;R<v.length;R++){const V=v[R];T(V)&&te(g,V.getAttribute(k),k,r,V)}}i&&i(y)}const m=[];if(e.indexOf("[")!==-1){const N=/\[([\w-]+)/g;let y;for(;(y=N.exec(e))!==null;)m.push(y[1])}else m.push(e);Ne({selector:e,attribute:t,componentTag:r,attributes:d,ComponentFn:n,onInit:i,observed:m.concat(a),onAttributeChange:s,onAttrChange:l,effects:p,declared:f,persist:w}),Re();const b=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=o.subtreeQuery||(b?e:"["+e+"]"),_={selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:u,query:C};j().push(_),u&&C&&H().push(_),le(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=se,window.lnCore.observeLifecycle=Le,window.lnCore.withoutLifecycle=Fe);function D(){Se()>0?De(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",D):D(),h}function ae(e){return(e||"").replace(/^#/,"")}function B(e){const t=e===void 0?location.hash:e,n={},r=ae(t);if(!r)return n;const o=r.split("&");for(let a=0;a<o.length;a++){const s=o[a];if(!s)continue;const u=s.indexOf(":"),i=u>-1?s.slice(0,u):s,l=u>-1?s.slice(u+1):"";if(i)try{n[i]=decodeURIComponent(l)}catch{n[i]=l}}return n}function Oe(e){if(!e)return null;const t=B();return e in t?t[e]:null}function Te(e,t){if(!e)return;const n=B();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(a){const s=n[a];return s===""?a:a+":"+encodeURIComponent(s)}).join("&");ae(location.hash)!==o&&(location.hash=o)}function Ie(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 n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function He(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Me(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=B,window.lnCore.hashGet=Oe,window.lnCore.hashSet=Te,window.lnCore.hashLinkClick=Ie,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=He,window.lnCore.hashFilterDecode=Me);function Be(e){return(e||"").replace(/^\?/,"")}function Ve(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=Be(t);if(!r)return n;const o=new URLSearchParams(r);for(const[a,s]of o.entries())n[a]=s;return n}function We(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Pe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function Ue(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"_"+t:r:t||null}function Ke(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Qe(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function Ge(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Je(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Ve,window.lnCore.queryGet=We,window.lnCore.querySet=Pe,window.lnCore.resolveQueryParam=Ue,window.lnCore.querySortEncode=Ke,window.lnCore.querySortDecode=Qe,window.lnCore.queryFilterEncode=Ge,window.lnCore.queryFilterDecode=Je);function ze(){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=ze);const E={};function O(e){const t=e||"default";if(!E[t]){const n=new Intl.NumberFormat(e,{useGrouping:!0}),r=n.formatToParts(1234.5);let o="",a=".";for(let s=0;s<r.length;s++)r[s].type==="group"&&(o=r[s].value),r[s].type==="decimal"&&(a=r[s].value);E[t]={groupSep:o,decimalSep:a,fmt:n}}return E[t]}function ue(e,t,n){if(e==null||typeof e!="string")return"";let r=e.trim();return r===""?"":(r=r.replace(/[$€£¥]/g,""),t&&(r=r.split(t).join("")),r=r.replace(/\s/g,""),n&&n!=="."&&(r=r.replace(n,".")),r=r.replace(/[^\d.-]/g,""),r)}function Xe(e,t){if(typeof e=="number")return isNaN(e)?NaN:e;if(e==null||typeof e!="string")return NaN;const n=e.trim();if(n===""||n==="-")return NaN;const r=O(t),o=ue(n,r.groupSep,r.decimalSep);if(o===""||o==="-")return NaN;const a=parseFloat(o);return isNaN(a)?NaN:a}function x(e,t,n={}){if(typeof e!="number"||isNaN(e)||!Number.isFinite(e))return"";const r=t||"default",o=n.maxDecimals!=null?parseInt(n.maxDecimals,10):null,a=n.userDecimals!=null?n.userDecimals:null;if(o!==null){const s=r+"|max:"+o;return E[s]||(E[s]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:o})),E[s].format(e)}if(a!==null&&a>0){const s=r+"|exact:"+a;return E[s]||(E[s]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:a,maximumFractionDigits:a})),E[s].format(e)}return O(t).fmt.format(e)}function Ye(e,t){if(!e)return 0;if(t<=0)return e.startsWith("-")?1:0;let n=t,r=0;for(let o=0;o<e.length&&n>0;o++)r=o+1,/[0-9]/.test(e[o])&&n--;return n>0&&(r=e.length),r}(function(){const e="data-ln-number",t="lnNumber";if(window[t]!==void 0)return;function n(l){const c=l[t];c&&(c.isTextElement?c._initTextElement():isNaN(c.value)||c._displayFormatted(c.value))}const r={"data-ln-number":{type:"marker",effect:n,description:"Activates localized number formatting on input or text element"},"data-ln-value":{type:"float",effect:n,description:"Raw unformatted numeric value"},"data-ln-number-decimals":{type:"integer",fallback:0,min:0,max:20,effect:n,description:"Number of decimal fraction digits"},"data-ln-number-min":{type:"float",effect:n,description:"Minimum allowed numeric value"},"data-ln-number-max":{type:"float",effect:n,description:"Maximum allowed numeric value"}},o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),a=new Set;let s=!1;function u(){U(),!s&&(s=!0,document.addEventListener("ln-core:locale-change",function(){a.forEach(function(l){l.isTextElement?l._formatTextContent():isNaN(l.value)||l._displayFormatted(l.value)})}))}function i(l){if(l[t])return l[t];l[t]=this,this.dom=l;const c=this;if(a.add(this),u(),l.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;const d=document.createElement("input");d.type="hidden",d.name=l.name,l.removeAttribute("name"),l.hasAttribute("data-ln-fill-as")&&d.setAttribute("data-ln-fill-as",l.getAttribute("data-ln-fill-as")),l.type="text",l.setAttribute("inputmode","decimal"),l.insertAdjacentElement("afterend",d),this._hidden=d,Object.defineProperty(d,"value",{get:function(){return o.get.call(d)},set:function(f){if(o.set.call(d,f),f!==""&&!isNaN(parseFloat(f))){const w=c.dom.getAttribute("data-ln-number-decimals");c._setDisplayRaw(x(parseFloat(f),A(c.dom),{maxDecimals:w}))}else c._setDisplayRaw("");c.dom.dispatchEvent(new Event("input",{bubbles:!0}))}}),he(l,o,{get:function(){return o.get.call(l)},set:function(f){if(f===""){c._setDisplayRaw(""),c._setHiddenRaw(""),l.dispatchEvent(new Event("input",{bubbles:!0}));return}const w=typeof f=="number"?f:parseFloat(String(f));if(isNaN(w))c._setDisplayRaw(String(f)),c._setHiddenRaw("");else{c._setHiddenRaw(w);const h=l.getAttribute("data-ln-number-decimals");c._setDisplayRaw(x(w,A(l),{maxDecimals:h}))}l.dispatchEvent(new Event("input",{bubbles:!0}))}}),this._onInput=function(){c._handleInput()},l.addEventListener("input",this._onInput),this._onKeyDown=function(f){if(f.key!=="Backspace")return;const w=l.selectionStart,h=l.selectionEnd;if(w!==h||w===0)return;const m=O(A(l)),b=o.get.call(l),C=b[w-1];if(C===m.groupSep||/\s/.test(C)){f.preventDefault();const _=w-2>=0?w-2:0,D=b.slice(0,_)+b.slice(w);o.set.call(l,D),l.setSelectionRange(_,_),l.dispatchEvent(new Event("input",{bubbles:!0}))}},l.addEventListener("keydown",this._onKeyDown),this._onPaste=function(f){f.preventDefault();const w=(f.clipboardData||window.clipboardData).getData("text"),h=Xe(w,A(l));c.value=isNaN(h)?NaN:h},l.addEventListener("paste",this._onPaste);const p=l.value;if(p!==""){const f=parseFloat(p);if(!isNaN(f)){const w=l.getAttribute("data-ln-number-decimals");this._setHiddenRaw(f),this._setDisplayRaw(x(f,A(l),{maxDecimals:w})),l.dispatchEvent(new Event("input",{bubbles:!0}))}}return l.form&&(this._onFormReset=function(){setTimeout(function(){const f=l.defaultValue;if(f!==""){const w=parseFloat(f);if(!isNaN(w)){const h=l.getAttribute("data-ln-number-decimals");c._setHiddenRaw(w),c._setDisplayRaw(x(w,A(l),{maxDecimals:h})),l.dispatchEvent(new Event("input",{bubbles:!0}));return}}c._setHiddenRaw(""),c._setDisplayRaw(""),l.dispatchEvent(new Event("input",{bubbles:!0}))},0)},l.form.addEventListener("reset",this._onFormReset)),this}i.prototype._initTextElement=function(){const l=this.dom;let c=l.getAttribute("data-ln-value"),d=l.getAttribute("data-ln-number"),p=null;c!==null&&c!==""?p=c:d!==null&&d!==""&&d!=="true"?p=d:p=l.textContent.trim();const f=parseFloat(p);isNaN(f)?this._rawValue=null:(this._rawValue=f,l.hasAttribute("data-ln-value")||l.setAttribute("data-ln-value",String(f)),this._formatTextContent())},i.prototype._formatTextContent=function(){if(this._rawValue!==null&&!isNaN(this._rawValue)){const l=this.dom.getAttribute("data-ln-number-decimals");this.dom.textContent=x(this._rawValue,A(this.dom),{maxDecimals:l})}},i.prototype._handleInput=function(){const l=this.dom,c=o.get.call(l);if(c===""){this._setHiddenRaw(""),S(l,"ln-number:input",{value:NaN,formatted:""});return}if(c==="-"){this._setHiddenRaw(""),S(l,"ln-number:input",{value:NaN,formatted:"-"});return}const d=l.selectionStart;let p=0;for(let g=0;g<d;g++)/[0-9]/.test(c[g])&&p++;const f=A(l),w=O(f);let h=c,m=ue(c,w.groupSep,w.decimalSep),b=parseFloat(m);if(isNaN(b)){this._setHiddenRaw(""),S(l,"ln-number:input",{value:NaN,formatted:c});return}const C=l.getAttribute("data-ln-number-decimals"),_=m.indexOf(".");if(C!==null&&_!==-1){const g=parseInt(C,10),v=m.slice(_+1);if(g===0)m=m.slice(0,_),h=h.split(w.decimalSep)[0],b=parseFloat(m),this._setDisplayRaw(h);else if(v.length>g){m=m.slice(0,_+1+g);const R=h.split(w.decimalSep);h=R[0]+w.decimalSep+R[1].slice(0,g),b=parseFloat(m),this._setDisplayRaw(h)}}const D=l.getAttribute("data-ln-number-max");if(D!==null&&b>parseFloat(D)){const g=parseFloat(D),v=x(g,f,{maxDecimals:C});this._setDisplayRaw(v),this._setHiddenRaw(g),l.setSelectionRange(v.length,v.length),S(l,"ln-number:input",{value:g,formatted:v});return}if(h.endsWith(w.decimalSep)||w.decimalSep!=="."&&h.endsWith(".")){this._setHiddenRaw(b),S(l,"ln-number:input",{value:b,formatted:h});return}const N=m.indexOf(".");if(N!==-1&&m.slice(N+1).endsWith("0")){this._setHiddenRaw(b),S(l,"ln-number:input",{value:b,formatted:h});return}let y;if(C!==null)y=x(b,f,{maxDecimals:C});else{const g=N!==-1?m.slice(N+1).length:0;y=x(b,f,{userDecimals:g})}this._setDisplayRaw(y);const k=Ye(y,p);l.setSelectionRange(k,k),this._setHiddenRaw(b),S(l,"ln-number:input",{value:b,formatted:y})},i.prototype._setHiddenRaw=function(l){this._hidden&&o.set.call(this._hidden,String(l))},i.prototype._setDisplayRaw=function(l){this.isTextElement?this.dom.textContent=String(l):o.set.call(this.dom,String(l))},i.prototype._displayFormatted=function(l){if(this.isTextElement)this._formatTextContent();else{const c=this.dom.getAttribute("data-ln-number-decimals");this._setDisplayRaw(x(l,A(this.dom),{maxDecimals:c}))}},Object.defineProperty(i.prototype,"value",{get:function(){if(this.isTextElement)return this._rawValue;const l=o.get.call(this._hidden);return l===""?NaN:parseFloat(l)},set:function(l){const c=typeof l=="number"?l:parseFloat(l);if(this.isTextElement){isNaN(c)?(this._rawValue=null,this.dom.textContent=""):(this._rawValue=c,this.dom.setAttribute("data-ln-value",String(c)),this._formatTextContent());return}if(isNaN(c)){this._setDisplayRaw(""),this._setHiddenRaw(""),this.dom.dispatchEvent(new Event("input",{bubbles:!0}));return}this._setHiddenRaw(c);const d=this.dom.getAttribute("data-ln-number-decimals");this._setDisplayRaw(x(c,A(this.dom),{maxDecimals:d})),this.dom.dispatchEvent(new Event("input",{bubbles:!0}))}}),Object.defineProperty(i.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:o.get.call(this.dom)}}),i.prototype.destroy=function(){this.dom[t]&&(a.delete(this),this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement||(this._onFormReset&&this.dom.form&&this.dom.form.removeEventListener("reset",this._onFormReset),this.dom.removeEventListener("input",this._onInput),this.dom.removeEventListener("keydown",this._onKeyDown),this.dom.removeEventListener("paste",this._onPaste),this._hidden&&(this.dom.name=this._hidden.name,this._hidden.remove()),this.dom.type="number",this.dom.removeAttribute("inputmode")),delete this.dom[t])},se(e,t,i,"ln-number",{attributes:r,extraAttributes:["lang"],onAttributeChange:n})})()})();
1
+ (function(){"use strict";function V(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function I(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!I(r))return}e.apply(console,t)}}function S(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function F(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){F(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ce(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function de(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},a=e.elements,s={};if(n)for(let u=0;u<a.length;u++){const o=a[u];o.name&&o.type==="checkbox"&&!o.disabled&&(s[o.name]=(s[o.name]||0)+1)}for(let u=0;u<a.length;u++){const o=a[u];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&s[o.name]===1?i[o.name]=o.checked:(i[o.name]||(i[o.name]=[]),o.checked&&i[o.name].push(o.value));else if(o.type==="radio")o.checked&&(i[o.name]=o.value);else if(o.type==="select-multiple"){i[o.name]=[];for(let l=0;l<o.options.length;l++)o.options[l].selected&&i[o.name].push(o.options[l].value)}else if(n&&o.type==="hidden")i[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const l=Number(o.value);i[o.name]=o.value===""||isNaN(l)?null:l}else i[o.name]=o.value}return i}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 we(e,t){const n=e.elements,r=[],i={};for(let a=0;a<n.length;a++){const s=n[a];s.name&&s.type==="checkbox"&&(i[s.name]=(i[s.name]||0)+1)}for(let a=0;a<n.length;a++){const s=n[a];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const u=s.getAttribute("data-ln-fill-as")||s.name;if(!u||!(u in t))continue;const o=t[u];if(s.type==="checkbox"){if(Array.isArray(o))s.checked=o.indexOf(s.value)!==-1;else if(i[s.name]>1){const l=String(o).split(",").map(function(c){return c.trim()});s.checked=l.indexOf(s.value)!==-1}else s.checked=fe(o);r.push(s)}else if(s.type==="radio")s.checked=s.value===String(o),r.push(s);else if(s.type==="select-multiple"){if(Array.isArray(o))for(let l=0;l<s.options.length;l++)s.options[l].selected=o.indexOf(s.options[l].value)!==-1;r.push(s)}else s.value=o,s.tagName==="SELECT"&&o!=null&&s.setAttribute("data-ln-value",o),r.push(s)}return r}function he(e,t,{get:n,set:r}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(i){r?r.call(this,i,a=>t.set.call(this,a)):t.set.call(this,i)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=we,window.lnCore.serializeForm=de,window.lnCore.resolveFormMethod=ce);const W={};function pe(e,t){W[e]=t}function me(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=pe,window.lnCore.getDataMapper=me);function A(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function P(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,F(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const U={};function be(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];U[n]=t}function ge(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return U[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=be,window.lnCore.getLocaleFallback=ge,window.lnCore.ensureLocaleObserver=P);const T={};function ye(e,t){T[e]||(T[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=T[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function K(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const u=n[s],o=u.getAttribute("data-ln-field");t[o]!=null&&(u.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const u=r[s],o=u.getAttribute("data-ln-attr").split(",");for(let l=0;l<o.length;l++){const c=o[l].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),p=c[1].trim();t[p]!=null&&u.setAttribute(d,t[p])}}const i=e.querySelectorAll("[data-ln-show]");for(let s=0;s<i.length;s++){const u=i[s],o=u.getAttribute("data-ln-show");o in t&&u.classList.toggle("hidden",!t[o])}const a=e.querySelectorAll("[data-ln-class]");for(let s=0;s<a.length;s++){const u=a[s],o=u.getAttribute("data-ln-class").split(",");for(let l=0;l<o.length;l++){const c=o[l].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),p=c[1].trim();p in t&&u.classList.toggle(d,!!t[p])}}return e}function Ce(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)K(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function Q(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,u){return t[u]!==void 0?t[u]:""}))}const r=function(a,s){return t[s]!==void 0?t[s]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let a=0;a<i.length;a++){const s=i[a],u=s.attributes;for(let o=0;o<u.length;o++){const l=u[o];l.value.indexOf("{{")!==-1&&s.setAttribute(l.name,l.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function _e(e,t,n,r,i,a){const s={};for(let o=0;o<e.children.length;o++){const l=e.children[o],c=l.getAttribute("data-ln-render-key");c&&(s[c]=l)}const u=document.createDocumentFragment();for(let o=0;o<t.length;o++){const l=t[o],c=String(r(l));let d=s[c];if(d)i(d,l,o);else{const p=ye(n,a);if(!p||(Q(p,l),d=p.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",c),i(d,l,o)}u.appendChild(d)}e.textContent="",e.appendChild(u)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=Q,window.lnCore.fill=K,window.lnCore.lnFill=Ce,window.lnCore.renderList=_e);function q(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function G(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function J(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function z(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const $=new Map;function X(e,t){const n=(e?e.join("|"):"")+"::"+t;if($.has(n))return $.get(n);const r=new Set(e||[]),i=function(a,s){const u=a.getAttribute(s);return u!==null&&r.has(u)?u:t};return $.set(n,i),i}function Y(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function Z(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function ee(e,t,n,r,i){if(!e||t===null)return!0;const a=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const u=o=>{i?console.warn(o,i):console.warn(o)};if(s==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(u(`[${a}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const o=e.values||[];return o.includes(t)?!0:(u(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return u(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(u(`[${a}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(u(`[${a}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(u(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(o){return u(`[${a}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ae(e,t,n){for(const r in n){const[i,a,s]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,a,s)},enumerable:!0,configurable:!0})}return e}function xe(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=X(r.values,r.fallback);break;case"integer":i=G;break;case"float":i=Y;break;case"boolean":i=J;break;case"list":i=z;break;case"json":i=Z;break;case"string":default:i=q;break}i||(i=q),t[r.prop]=[i,n,r.fallback]}return t}function ve(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function Ee(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=Ae,window.lnCore.attrSpec=xe,window.lnCore.attrStr=q,window.lnCore.attrInt=G,window.lnCore.attrBool=J,window.lnCore.attrList=z,window.lnCore.attrEnum=X,window.lnCore.attrFloat=Y,window.lnCore.attrJson=Z);function L(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 te(e,t,n,r){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(a)&&L(e,s),e.querySelectorAll){const u=e.querySelectorAll(a);for(let o=0;o<u.length;o++)L(u[o],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Se(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function De(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function ne(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ne(e){const t=ne(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(a=>a.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=Ee(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function re(e,t,n,r){for(let i=0;i<e.length;i++){const a=e[i];if(!t[a.attribute])continue;const s=a.effects&&a.effects[n];s?s(t,n,r):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,r)}}function ke(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=ne(),i=r.byAttr.get(t),a=V()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!a)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(a&&I(s)){const u=r.byDeclaredAttr.get(t),o=s.getAttribute(t);for(let l=0;l<u.length;l++)ee(u[l].spec,o,t,u[l].componentTag,s)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),n){const u=r.byReactive.get(t);u&&re(u,s,t,e.oldValue),r.reactiveWildcard.length&&re(r.reactiveWildcard,s,t,e.oldValue)}if(i)for(let u=0;u<i.length;u++){const o=i[u];if(o.handler){o.handler(s,t,e.oldValue);continue}o.onAttributeChange&&s[o.attribute]?o.onAttributeChange(s,t):(te(s,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(s))}}}function Re(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,F(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ke(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function j(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function H(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function ie(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function oe(e){const t=j();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=H();if(e.target&&r.length)for(let i=0;i<r.length;i++){const a=r[i],s=a.query,u=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;u&&a.onSubtreeChange(u,e)}for(let i=0;i<e.addedNodes.length;i++){const a=e.addedNodes[i];if(a.nodeType!==1)continue;const s=!!(a.firstElementChild||a.children&&a.children.length);for(let u=0;u<t.length;u++){const o=t[u],l=o.query;if(l&&(a.matches&&a.matches(l)&&(o.ComponentFn&&L(a,o),o.onInit&&o.onInit(a)),s&&a.querySelectorAll)){const c=a.querySelectorAll(l);for(let d=0;d<c.length;d++)o.ComponentFn&&L(c[d],o),o.onInit&&o.onInit(c[d])}}}for(let i=0;i<e.removedNodes.length;i++){const a=e.removedNodes[i];if(a.nodeType!==1||document.contains(a))continue;const s=!!(a.firstElementChild||a.children&&a.children.length);for(let u=0;u<t.length;u++){const o=t[u],l=o.query;if(l&&(a.matches&&a.matches(l)&&ie(a,o),s&&a.querySelectorAll)){const c=a.querySelectorAll(l);for(let d=0;d<c.length;d++)ie(c[d],o)}}}}function le(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,F(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{oe(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Fe(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const i=n[r];if(i.type==="childList")try{oe(i)}catch(a){console.error("[ln-core] lifecycle handler failed",i.target,a)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function Le(e){j().push(e),e.onSubtreeChange&&e.query&&H().push(e),le()}function se(e,t,n,r,i={}){const a=i.extraAttributes||[],s=i.onAttributeChange||null,u=i.onSubtreeChange||null,o=i.onInit||null,l=i.onAttrChange||null,c=i.effects||null,d=i.attributes||null,p=d?ve(d):c,f=d?new Set(Object.keys(d)):null,w=i.persist||null;function h(N){const y=N||document.body;if(te(y,e,t,n),d&&V())for(const k in d){const g=d[k],v=Array.from(y.querySelectorAll("["+k+"]"));y.matches&&y.matches("["+k+"]")&&v.push(y);for(let R=0;R<v.length;R++){const B=v[R];I(B)&&ee(g,B.getAttribute(k),k,r,B)}}o&&o(y)}const m=[];if(e.indexOf("[")!==-1){const N=/\[([\w-]+)/g;let y;for(;(y=N.exec(e))!==null;)m.push(y[1])}else m.push(e);Ne({selector:e,attribute:t,componentTag:r,attributes:d,ComponentFn:n,onInit:o,observed:m.concat(a),onAttributeChange:s,onAttrChange:l,effects:p,declared:f,persist:w}),Re();const b=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=i.subtreeQuery||(b?e:"["+e+"]"),_={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:u,query:C};j().push(_),u&&C&&H().push(_),le(),window[t]=h,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=se,window.lnCore.observeLifecycle=Le,window.lnCore.withoutLifecycle=Fe);function D(){Se()>0?De(function(){h(document.body)}):h(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",D):D(),h}function ae(e){return(e||"").replace(/^#/,"")}function M(e){const t=e===void 0?location.hash:e,n={},r=ae(t);if(!r)return n;const i=r.split("&");for(let a=0;a<i.length;a++){const s=i[a];if(!s)continue;const u=s.indexOf(":"),o=u>-1?s.slice(0,u):s,l=u>-1?s.slice(u+1):"";if(o)try{n[o]=decodeURIComponent(l)}catch{n[o]=l}}return n}function Oe(e){if(!e)return null;const t=M();return e in t?t[e]:null}function Ie(e,t){if(!e)return;const n=M();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(a){const s=n[a];return s===""?a:a+":"+encodeURIComponent(s)}).join("&");ae(location.hash)!==i&&(location.hash=i)}function Te(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 n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function He(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Me(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),i=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=M,window.lnCore.hashGet=Oe,window.lnCore.hashSet=Ie,window.lnCore.hashLinkClick=Te,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=He,window.lnCore.hashFilterDecode=Me);function Be(e){return(e||"").replace(/^\?/,"")}function Ve(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=Be(t);if(!r)return n;const i=new URLSearchParams(r);for(const[a,s]of i.entries())n[a]=s;return n}function We(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Pe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function Ue(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"_"+t:r:t||null}function Ke(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Qe(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function Ge(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Je(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Ve,window.lnCore.queryGet=We,window.lnCore.querySet=Pe,window.lnCore.resolveQueryParam=Ue,window.lnCore.querySortEncode=Ke,window.lnCore.querySortDecode=Qe,window.lnCore.queryFilterEncode=Ge,window.lnCore.queryFilterDecode=Je);function ze(){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=ze);const E={};function O(e){const t=e||"default";if(!E[t]){const n=new Intl.NumberFormat(e,{useGrouping:!0}),r=n.formatToParts(1234.5);let i="",a=".";for(let s=0;s<r.length;s++)r[s].type==="group"&&(i=r[s].value),r[s].type==="decimal"&&(a=r[s].value);E[t]={groupSep:i,decimalSep:a,fmt:n}}return E[t]}function ue(e,t,n){if(e==null||typeof e!="string")return"";let r=e.trim();return r===""?"":(r=r.replace(/[$€£¥]/g,""),t&&(r=r.split(t).join("")),r=r.replace(/\s/g,""),n&&n!=="."&&(r=r.replace(n,".")),r=r.replace(/[^\d.-]/g,""),r)}function Xe(e,t){if(typeof e=="number")return isNaN(e)?NaN:e;if(e==null||typeof e!="string")return NaN;const n=e.trim();if(n===""||n==="-")return NaN;const r=O(t),i=ue(n,r.groupSep,r.decimalSep);if(i===""||i==="-")return NaN;const a=parseFloat(i);return isNaN(a)?NaN:a}function x(e,t,n={}){if(typeof e!="number"||isNaN(e)||!Number.isFinite(e))return"";const r=t||"default",i=n.maxDecimals!=null?parseInt(n.maxDecimals,10):null,a=n.userDecimals!=null?n.userDecimals:null;if(i!==null){const s=r+"|max:"+i;return E[s]||(E[s]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:0,maximumFractionDigits:i})),E[s].format(e)}if(a!==null&&a>0){const s=r+"|exact:"+a;return E[s]||(E[s]=new Intl.NumberFormat(t,{useGrouping:!0,minimumFractionDigits:a,maximumFractionDigits:a})),E[s].format(e)}return O(t).fmt.format(e)}function Ye(e,t){if(!e)return 0;if(t<=0)return e.startsWith("-")?1:0;let n=t,r=0;for(let i=0;i<e.length&&n>0;i++)r=i+1,/[0-9]/.test(e[i])&&n--;return n>0&&(r=e.length),r}(function(){const e="data-ln-number",t="lnNumber";if(window[t]!==void 0)return;function n(l){const c=l[t];c&&(c.isTextElement?c._initTextElement():isNaN(c.value)||c._displayFormatted(c.value))}const r={"data-ln-number":{type:"marker",effect:n,description:"Activates localized number formatting on input or text element"},"data-ln-value":{type:"float",effect:n,description:"Raw unformatted numeric value"},"data-ln-number-decimals":{type:"integer",fallback:0,min:0,max:20,effect:n,description:"Number of decimal fraction digits"},"data-ln-number-min":{type:"float",effect:n,description:"Minimum allowed numeric value"},"data-ln-number-max":{type:"float",effect:n,description:"Maximum allowed numeric value"}},i=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),a=new Set;let s=!1;function u(){P(),!s&&(s=!0,document.addEventListener("ln-core:locale-change",function(){a.forEach(function(l){l.isTextElement?l._formatTextContent():isNaN(l.value)||l._displayFormatted(l.value)})}))}function o(l){if(l[t])return l[t];l[t]=this,this.dom=l;const c=this;if(a.add(this),u(),l.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;const d=document.createElement("input");d.type="hidden",d.name=l.name,l.removeAttribute("name"),l.hasAttribute("data-ln-fill-as")&&d.setAttribute("data-ln-fill-as",l.getAttribute("data-ln-fill-as")),l.type="text",l.setAttribute("inputmode","decimal"),l.insertAdjacentElement("afterend",d),this._hidden=d,Object.defineProperty(d,"value",{get:function(){return i.get.call(d)},set:function(f){if(i.set.call(d,f),f!==""&&!isNaN(parseFloat(f))){const w=c.dom.getAttribute("data-ln-number-decimals");c._setDisplayRaw(x(parseFloat(f),A(c.dom),{maxDecimals:w}))}else c._setDisplayRaw("");c.dom.dispatchEvent(new Event("input",{bubbles:!0}))}}),he(l,i,{get:function(){return i.get.call(l)},set:function(f){if(f===""){c._setDisplayRaw(""),c._setHiddenRaw(""),l.dispatchEvent(new Event("input",{bubbles:!0}));return}const w=typeof f=="number"?f:parseFloat(String(f));if(isNaN(w))c._setDisplayRaw(String(f)),c._setHiddenRaw("");else{c._setHiddenRaw(w);const h=l.getAttribute("data-ln-number-decimals");c._setDisplayRaw(x(w,A(l),{maxDecimals:h}))}l.dispatchEvent(new Event("input",{bubbles:!0}))}}),this._onInput=function(){c._handleInput()},l.addEventListener("input",this._onInput),this._onKeyDown=function(f){if(f.key!=="Backspace")return;const w=l.selectionStart,h=l.selectionEnd;if(w!==h||w===0)return;const m=O(A(l)),b=i.get.call(l),C=b[w-1];if(C===m.groupSep||/\s/.test(C)){f.preventDefault();const _=w-2>=0?w-2:0,D=b.slice(0,_)+b.slice(w);i.set.call(l,D),l.setSelectionRange(_,_),l.dispatchEvent(new Event("input",{bubbles:!0}))}},l.addEventListener("keydown",this._onKeyDown),this._onPaste=function(f){f.preventDefault();const w=(f.clipboardData||window.clipboardData).getData("text"),h=Xe(w,A(l));c.value=isNaN(h)?NaN:h},l.addEventListener("paste",this._onPaste);const p=l.value;if(p!==""){const f=parseFloat(p);if(!isNaN(f)){const w=l.getAttribute("data-ln-number-decimals");this._setHiddenRaw(f),this._setDisplayRaw(x(f,A(l),{maxDecimals:w})),l.dispatchEvent(new Event("input",{bubbles:!0}))}}return l.form&&(this._onFormReset=function(){setTimeout(function(){const f=l.defaultValue;if(f!==""){const w=parseFloat(f);if(!isNaN(w)){const h=l.getAttribute("data-ln-number-decimals");c._setHiddenRaw(w),c._setDisplayRaw(x(w,A(l),{maxDecimals:h})),l.dispatchEvent(new Event("input",{bubbles:!0}));return}}c._setHiddenRaw(""),c._setDisplayRaw(""),l.dispatchEvent(new Event("input",{bubbles:!0}))},0)},l.form.addEventListener("reset",this._onFormReset)),this}o.prototype._initTextElement=function(){const l=this.dom;let c=l.getAttribute("data-ln-value"),d=l.getAttribute("data-ln-number"),p=null;c!==null&&c!==""?p=c:d!==null&&d!==""&&d!=="true"?p=d:p=l.textContent.trim();const f=parseFloat(p);isNaN(f)?this._rawValue=null:(this._rawValue=f,l.hasAttribute("data-ln-value")||l.setAttribute("data-ln-value",String(f)),this._formatTextContent())},o.prototype._formatTextContent=function(){if(this._rawValue!==null&&!isNaN(this._rawValue)){const l=this.dom.getAttribute("data-ln-number-decimals");this.dom.textContent=x(this._rawValue,A(this.dom),{maxDecimals:l})}},o.prototype._handleInput=function(){const l=this.dom,c=i.get.call(l);if(c===""){this._setHiddenRaw(""),S(l,"ln-number:input",{value:NaN,formatted:""});return}if(c==="-"){this._setHiddenRaw(""),S(l,"ln-number:input",{value:NaN,formatted:"-"});return}const d=l.selectionStart;let p=0;for(let g=0;g<d;g++)/[0-9]/.test(c[g])&&p++;const f=A(l),w=O(f);let h=c,m=ue(c,w.groupSep,w.decimalSep),b=parseFloat(m);if(isNaN(b)){this._setHiddenRaw(""),S(l,"ln-number:input",{value:NaN,formatted:c});return}const C=l.getAttribute("data-ln-number-decimals"),_=m.indexOf(".");if(C!==null&&_!==-1){const g=parseInt(C,10),v=m.slice(_+1);if(g===0)m=m.slice(0,_),h=h.split(w.decimalSep)[0],b=parseFloat(m),this._setDisplayRaw(h);else if(v.length>g){m=m.slice(0,_+1+g);const R=h.split(w.decimalSep);h=R[0]+w.decimalSep+R[1].slice(0,g),b=parseFloat(m),this._setDisplayRaw(h)}}const D=l.getAttribute("data-ln-number-max");if(D!==null&&b>parseFloat(D)){const g=parseFloat(D),v=x(g,f,{maxDecimals:C});this._setDisplayRaw(v),this._setHiddenRaw(g),l.setSelectionRange(v.length,v.length),S(l,"ln-number:input",{value:g,formatted:v});return}if(h.endsWith(w.decimalSep)||w.decimalSep!=="."&&h.endsWith(".")){this._setHiddenRaw(b),S(l,"ln-number:input",{value:b,formatted:h});return}const N=m.indexOf(".");if(N!==-1&&m.slice(N+1).endsWith("0")){this._setHiddenRaw(b),S(l,"ln-number:input",{value:b,formatted:h});return}let y;if(C!==null)y=x(b,f,{maxDecimals:C});else{const g=N!==-1?m.slice(N+1).length:0;y=x(b,f,{userDecimals:g})}this._setDisplayRaw(y);const k=Ye(y,p);l.setSelectionRange(k,k),this._setHiddenRaw(b),S(l,"ln-number:input",{value:b,formatted:y})},o.prototype._setHiddenRaw=function(l){this._hidden&&i.set.call(this._hidden,String(l))},o.prototype._setDisplayRaw=function(l){this.isTextElement?this.dom.textContent=String(l):i.set.call(this.dom,String(l))},o.prototype._displayFormatted=function(l){if(this.isTextElement)this._formatTextContent();else{const c=this.dom.getAttribute("data-ln-number-decimals");this._setDisplayRaw(x(l,A(this.dom),{maxDecimals:c}))}},Object.defineProperty(o.prototype,"value",{get:function(){if(this.isTextElement)return this._rawValue;const l=i.get.call(this._hidden);return l===""?NaN:parseFloat(l)},set:function(l){const c=typeof l=="number"?l:parseFloat(l);if(this.isTextElement){isNaN(c)?(this._rawValue=null,this.dom.textContent=""):(this._rawValue=c,this.dom.setAttribute("data-ln-value",String(c)),this._formatTextContent());return}if(isNaN(c)){this._setDisplayRaw(""),this._setHiddenRaw(""),this.dom.dispatchEvent(new Event("input",{bubbles:!0}));return}this._setHiddenRaw(c);const d=this.dom.getAttribute("data-ln-number-decimals");this._setDisplayRaw(x(c,A(this.dom),{maxDecimals:d})),this.dom.dispatchEvent(new Event("input",{bubbles:!0}))}}),Object.defineProperty(o.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:i.get.call(this.dom)}}),o.prototype.destroy=function(){this.dom[t]&&(a.delete(this),this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement||(this._onFormReset&&this.dom.form&&this.dom.form.removeEventListener("reset",this._onFormReset),this.dom.removeEventListener("input",this._onInput),this.dom.removeEventListener("keydown",this._onKeyDown),this.dom.removeEventListener("paste",this._onPaste),this._hidden&&(this.dom.name=this._hidden.name,this._hidden.remove()),this.dom.type="number",this.dom.removeAttribute("inputmode")),delete this.dom[t])},se(e,t,o,"ln-number",{attributes:r,extraAttributes:["lang"],onAttributeChange:n})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function _(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){r=t[l];break}if(!_(r))return}e.apply(console,t)}}function R(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function A(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){A(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ae(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function de(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,l={},s=e.elements,o={};if(n)for(let c=0;c<s.length;c++){const i=s[c];i.name&&i.type==="checkbox"&&!i.disabled&&(o[i.name]=(o[i.name]||0)+1)}for(let c=0;c<s.length;c++){const i=s[c];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(r&&i.matches&&i.matches(r)))if(i.type==="checkbox")n&&o[i.name]===1?l[i.name]=i.checked:(l[i.name]||(l[i.name]=[]),i.checked&&l[i.name].push(i.value));else if(i.type==="radio")i.checked&&(l[i.name]=i.value);else if(i.type==="select-multiple"){l[i.name]=[];for(let u=0;u<i.options.length;u++)i.options[u].selected&&l[i.name].push(i.options[u].value)}else if(n&&i.type==="hidden")l[i.name]=i.value;else if(n&&(i.type==="number"||i.type==="range")){const u=Number(i.value);l[i.name]=i.value===""||isNaN(u)?null:u}else l[i.name]=i.value}return l}function we(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function he(e,t){const n=e.elements,r=[],l={};for(let s=0;s<n.length;s++){const o=n[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const i=t[c];if(o.type==="checkbox"){if(Array.isArray(i))o.checked=i.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(i).split(",").map(function(f){return f.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=we(i);r.push(o)}else if(o.type==="radio")o.checked=o.value===String(i),r.push(o);else if(o.type==="select-multiple"){if(Array.isArray(i))for(let u=0;u<o.options.length;u++)o.options[u].selected=i.indexOf(o.options[u].value)!==-1;r.push(o)}else o.value=i,o.tagName==="SELECT"&&i!=null&&o.setAttribute("data-ln-value",i),r.push(o)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=he,window.lnCore.serializeForm=de,window.lnCore.resolveFormMethod=ae);const $={};function be(e,t){$[e]=t}function ge(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=be,window.lnCore.getDataMapper=ge);function pe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,A(function(){new MutationObserver(function(){R(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function ye(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];j[n]=t}function me(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ye,window.lnCore.getLocaleFallback=me,window.lnCore.ensureLocaleObserver=pe);const S={};function Ce(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=S[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const c=n[o],i=c.getAttribute("data-ln-field");t[i]!=null&&(c.textContent=t[i])}const r=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<r.length;o++){const c=r[o],i=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<i.length;u++){const f=i[u].trim().split(":");if(f.length!==2)continue;const a=f[0].trim(),w=f[1].trim();t[w]!=null&&c.setAttribute(a,t[w])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const c=l[o],i=c.getAttribute("data-ln-show");i in t&&c.classList.toggle("hidden",!t[i])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],i=c.getAttribute("data-ln-class").split(",");for(let u=0;u<i.length;u++){const f=i[u].trim().split(":");if(f.length!==2)continue;const a=f[0].trim(),w=f[1].trim();w in t&&c.classList.toggle(a,!!t[w])}}return e}function Ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)M(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 U(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],c=o.attributes;for(let i=0;i<c.length;i++){const u=c[i];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function xe(e,t,n,r,l,s){const o={};for(let i=0;i<e.children.length;i++){const u=e.children[i],f=u.getAttribute("data-ln-render-key");f&&(o[f]=u)}const c=document.createDocumentFragment();for(let i=0;i<t.length;i++){const u=t[i],f=String(r(u));let a=o[f];if(a)l(a,u,i);else{const w=Ce(n,s);if(!w||(U(w,u),a=w.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",f),l(a,u,i)}c.appendChild(a)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=M,window.lnCore.lnFill=Ae,window.lnCore.renderList=xe);function k(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function W(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function H(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const l=r.trim().toLowerCase();return!(l==="false"||l==="0")}function V(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const v=new Map;function Q(e,t){const n=(e?e.join("|"):"")+"::"+t;if(v.has(n))return v.get(n);const r=new Set(e||[]),l=function(s,o){const c=s.getAttribute(o);return c!==null&&r.has(c)?c:t};return v.set(n,l),l}function P(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function J(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function K(e,t,n,r,l){if(!e||t===null)return!0;const s=r||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=i=>{l?console.warn(i,l):console.warn(i)};if(o==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const i=e.values||[];return i.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(c(`[${s}] Value ${i} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(c(`[${s}] Value ${i} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(i){return c(`[${s}] Invalid JSON for attribute "${n}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function _e(e,t,n){for(const r in n){const[l,s,o]=n[r];Object.defineProperty(e,r,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function Se(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let l=r.read;if(!l&&r.type)switch(r.type){case"enum":l=Q(r.values,r.fallback);break;case"integer":l=W;break;case"float":l=P;break;case"boolean":l=H;break;case"list":l=V;break;case"json":l=J;break;case"string":default:l=k;break}l||(l=k),t[r.prop]=[l,n,r.fallback]}return t}function ke(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function ve(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=_e,window.lnCore.attrSpec=Se,window.lnCore.attrStr=k,window.lnCore.attrInt=W,window.lnCore.attrBool=H,window.lnCore.attrList=V,window.lnCore.attrEnum=Q,window.lnCore.attrFloat=P,window.lnCore.attrJson=J);function m(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function z(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&m(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let i=0;i<c.length;i++)m(c[i],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Te(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ee(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 G(){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 Le(e){const t=G(),n=e.observed||[];for(let r=0;r<n.length;r++){const l=n[r];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const l=t.byDeclaredAttr.get(r);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ve(e);if(r===null)t.reactiveWildcard.push(e);else for(const l of r)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function X(e,t,n,r){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Oe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=G(),l=r.byAttr.get(t),s=I()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&_(o)){const c=r.byDeclaredAttr.get(t),i=o.getAttribute(t);for(let u=0;u<c.length;u++)K(c[u].spec,i,t,c[u].componentTag,o)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&X(c,o,t,e.oldValue),r.reactiveWildcard.length&&X(r.reactiveWildcard,o,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const i=l[c];if(i.handler){i.handler(o,t,e.oldValue);continue}i.onAttributeChange&&o[i.attribute]?i.onAttributeChange(o,t):(z(o,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(o))}}}function Ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,A(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Oe(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function T(){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 L(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Z(e){const t=T();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=E();if(e.target&&r.length)for(let l=0;l<r.length;l++){const s=r[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 i=t[c];if(i.selector&&i.attribute&&i.ComponentFn){if(!o)s.matches&&s.matches(i.query)&&m(s,i);else if(s.matches&&s.matches(i.query)&&m(s,i),s.querySelectorAll){const u=s.querySelectorAll(i.query);for(let f=0;f<u.length;f++)m(u[f],i)}}i.onInit&&i.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 o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const i=t[c],u=i.query;if(u){if(!o)s.matches&&s.matches(u)&&L(s,i);else if(s.matches&&s.matches(u)&&L(s,i),s.querySelectorAll){const f=s.querySelectorAll(u);for(let a=0;a<f.length;a++)L(f[a],i)}}}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,A(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Z(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function De(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const l=n[r];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 qe(e){T().push(e),e.onSubtreeChange&&e.query&&E().push(e),Y()}function ee(e,t,n,r,l={}){const s=l.extraAttributes||[],o=l.onAttributeChange||null,c=l.onSubtreeChange||null,i=l.onInit||null,u=l.onAttrChange||null,f=l.effects||null,a=l.attributes||null,w=a?ke(a):f,p=a?new Set(Object.keys(a)):null,x=l.persist||null;function y(D){const g=D||document.body;if(z(g,e,t,n),a&&I())for(const C in a){const Ye=a[C],q=Array.from(g.querySelectorAll("["+C+"]"));g.matches&&g.matches("["+C+"]")&&q.push(g);for(let B=0;B<q.length;B++){const F=q[B];_(F)&&K(Ye,F.getAttribute(C),C,r,F)}}i&&i(g)}const d=[];if(e.indexOf("[")!==-1){const D=/\[([\w-]+)/g;let g;for(;(g=D.exec(e))!==null;)d.push(g[1])}else d.push(e);Le({selector:e,attribute:t,componentTag:r,attributes:a,ComponentFn:n,onInit:i,observed:d.concat(s),onAttributeChange:o,onAttrChange:u,effects:w,declared:p,persist:x}),Ne();const h=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,b=l.subtreeQuery||(h?e:"["+e+"]"),ue={selector:e,attribute:t,ComponentFn:n,onInit:i,onSubtreeChange:c,query:b};T().push(ue),c&&b&&E().push(ue),Y(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=qe,window.lnCore.withoutLifecycle=De);function fe(){Te()>0?Ee(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",fe):fe(),y}function te(e){return(e||"").replace(/^#/,"")}function O(e){const t=e===void 0?location.hash:e,n={},r=te(t);if(!r)return n;const l=r.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const c=o.indexOf(":"),i=c>-1?o.slice(0,c):o,u=c>-1?o.slice(c+1):"";if(i)try{n[i]=decodeURIComponent(u)}catch{n[i]=u}}return n}function Be(e){if(!e)return null;const t=O();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const n=O();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");te(location.hash)!==l&&(location.hash=l)}function Ie(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ue(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),l=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=O,window.lnCore.hashGet=Be,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Ie,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=Ue);function We(e){return(e||"").replace(/^\?/,"")}function He(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=We(t);if(!r)return n;const l=new URLSearchParams(r);for(const[s,o]of l.entries())n[s]=o;return n}function Ve(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Qe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function Pe(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"_"+t:r:t||null}function Je(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ke(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function ze(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ge(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=He,window.lnCore.queryGet=Ve,window.lnCore.querySet=Qe,window.lnCore.resolveQueryParam=Pe,window.lnCore.querySortEncode=Je,window.lnCore.querySortDecode=Ke,window.lnCore.queryFilterEncode=ze,window.lnCore.queryFilterDecode=Ge);function Xe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Xe);function ne(e,t){if(e.length!==1)return e;const n=e.charCodeAt(0);if(n>=65&&n<=90){const r=((n-65+t)%26+26)%26;return String.fromCharCode(65+r)}if(n>=97&&n<=122){const r=((n-97+t)%26+26)%26;return String.fromCharCode(97+r)}if(n>=48&&n<=57){const r=((n-48+t)%10+10)%10;return String.fromCharCode(48+r)}return e}function re(e){if(e==null||e==="")return"";const t=String(e);if(typeof TextEncoder<"u"&&typeof btoa<"u"){const n=new TextEncoder().encode(t);let r="";const l=n.length;for(let s=0;s<l;s++)r+=String.fromCharCode(n[s]);return btoa(r)}return typeof Buffer<"u"?Buffer.from(t,"utf-8").toString("base64"):""}function oe(e){if(e==null||e==="")return"";try{const t=String(e).trim();if(typeof atob<"u"&&typeof TextDecoder<"u"){const n=atob(t),r=new Uint8Array(n.length);for(let l=0;l<n.length;l++)r[l]=n.charCodeAt(l);return new TextDecoder().decode(r)}if(typeof Buffer<"u")return Buffer.from(t,"base64").toString("utf-8")}catch{return e}return e}function ie(e,t){const n=String(t||"ln-ashlar");let r;typeof TextEncoder<"u"?r=new TextEncoder().encode(n):typeof Buffer<"u"?r=Buffer.from(n,"utf-8"):r=[108,110];const l=r.length||1,s=new Uint8Array(e.length);for(let o=0;o<e.length;o++)s[o]=e[o]^r[o%l];return s}function le(e,t="ln-ashlar"){if(e==null||e==="")return"";const n=String(e);let r;if(typeof TextEncoder<"u")r=new TextEncoder().encode(n);else if(typeof Buffer<"u")r=Buffer.from(n,"utf-8");else return"";const l=ie(r,t);let s="";for(let o=0;o<l.length;o++)s+=String.fromCharCode(l[o]);return typeof btoa<"u"?btoa(s):typeof Buffer<"u"?Buffer.from(l).toString("base64"):""}function se(e,t="ln-ashlar"){if(e==null||e==="")return"";try{const n=String(e).trim();let r="";if(typeof atob<"u")r=atob(n);else if(typeof Buffer<"u")r=Buffer.from(n,"base64").toString("binary");else return e;const l=new Uint8Array(r.length);for(let o=0;o<r.length;o++)l[o]=r.charCodeAt(o);const s=ie(l,t);if(typeof TextDecoder<"u")return new TextDecoder().decode(s);if(typeof Buffer<"u")return Buffer.from(s).toString("utf-8")}catch{return e}return e}function ce(e){if(typeof e=="number"||typeof e=="string"&&/^-?\d+$/.test(String(e).trim()))return{codec:"rot",shift:Number(e)||13,key:"ln-ashlar"};if(e&&typeof e=="object"){const t=(e.codec||(e.key?"xor":"rot")).toLowerCase().trim(),n=t==="xor"||t==="base64"?t:"rot",r=Number(e.shift)||13,l=e.key||"ln-ashlar";return{codec:n,shift:r,key:l}}return{codec:"rot",shift:13,key:"ln-ashlar"}}function Ze(e,t=13){if(e==null||(typeof e!="string"&&(e=String(e)),e.length===0))return"";const n=ce(t);return n.codec==="base64"?re(e):n.codec==="xor"?le(e,n.key):e.replace(/[a-zA-Z0-9]/g,r=>ne(r,n.shift))}function N(e,t=13){if(e==null||(typeof e!="string"&&(e=String(e)),e.length===0))return"";const n=ce(t);return n.codec==="base64"?oe(e):n.codec==="xor"?se(e,n.key):e.replace(/[a-zA-Z0-9]/g,r=>ne(r,-n.shift))}(function(){const e="data-ln-obfuscator",t="lnObfuscator";if(window[t]!==void 0)return;function n(o){const c=o[t];c&&c.deobfuscate()}const r={"data-ln-obfuscator":{type:"enum",values:["rot13","base64","xor"],fallback:"rot13",effect:n,description:"Codec used to deobfuscate text or links"},"data-ln-obfuscator-codec":{type:"enum",values:["rot13","base64","xor"],fallback:"rot13",effect:n,description:"Explicit codec override attribute"},"data-ln-obfuscator-key":{type:"string",effect:n,description:"Encryption or masking key for XOR codec"}};function l(o){return o[t]?o[t]:(o[t]=this,this.dom=o,this._originalTextNodes=null,this._originalHref=null,this.deobfuscate(),this)}l.prototype.deobfuscate=function(){const o=!!(this.dom.matches&&(this.dom.matches("a")||this.dom.matches("area")));if(this._originalHref===null&&o&&this.dom.hasAttribute("href")&&(this._originalHref=this.dom.getAttribute("href")),(!this._originalTextNodes||this._originalTextNodes.length===0||this._originalTextNodes.some(d=>!this.dom.contains(d.node)))&&(this._originalTextNodes=[],typeof document<"u"&&document.createTreeWalker)){const d=document.createTreeWalker(this.dom,NodeFilter.SHOW_TEXT,{acceptNode:function(h){return h.parentElement&&h.parentElement.classList&&h.parentElement.classList.contains("sr-only")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;d.nextNode();)this._originalTextNodes.push({node:d.currentNode,raw:d.currentNode.nodeValue})}const i=this.dom.getAttribute(e),u=parseInt(i,10),f=isNaN(u)?13:u,a=(this.dom.getAttribute("data-ln-obfuscator-codec")||"").toLowerCase().trim(),w=this.dom.getAttribute("data-ln-obfuscator-key");let p="rot";a==="xor"||a==="base64"?p=a:w&&(p="xor");const x=w||"ln-ashlar",y={codec:p,shift:f,key:x};if(o&&this.dom.getAttribute("data-ln-external-link")==="processed"){const d=this.dom.querySelectorAll(".sr-only");for(let b=0;b<d.length;b++)d[b].remove();this.dom.removeAttribute("data-ln-external-link"),this.dom.removeAttribute("target");const h=(this.dom.rel||"").split(/\s+/).filter(function(b){return b&&b!=="noopener"&&b!=="noreferrer"});h.length>0?this.dom.rel=h.join(" "):this.dom.removeAttribute("rel")}if(this._originalTextNodes)for(let d=0;d<this._originalTextNodes.length;d++){const h=this._originalTextNodes[d];h.node&&h.raw&&h.raw.length>0&&(h.node.nodeValue=N(h.raw,y))}if(o&&this._originalHref){const d=N(this._originalHref,y);this.dom.setAttribute("href",d)}R(this.dom,"ln-obfuscator:deobfuscated",{target:this.dom,codec:p,shift:f,key:p==="xor"?x:null})},l.prototype.destroy=function(){if(this.dom[t]){if(this._originalTextNodes)for(let o=0;o<this._originalTextNodes.length;o++){const c=this._originalTextNodes[o];c.node&&c.raw&&(c.node.nodeValue=c.raw)}this._originalHref!==null&&this.dom.setAttribute("href",this._originalHref),delete this.dom[t]}};const s=ee(e,t,l,"ln-obfuscator",{attributes:r});s.obfuscate=Ze,s.deobfuscate=N,s.utf8ToBase64=re,s.base64ToUtf8=oe,s.xorObfuscate=le,s.xorDeobfuscate=se})()})();
1
+ (function(){"use strict";function F(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function _(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let i=1;i<t.length;i++)if(t[i]&&t[i].nodeType===1){r=t[i];break}if(!_(r))return}e.apply(console,t)}}function I(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function 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 de(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ae(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,i={},s=e.elements,o={};if(n)for(let c=0;c<s.length;c++){const l=s[c];l.name&&l.type==="checkbox"&&!l.disabled&&(o[l.name]=(o[l.name]||0)+1)}for(let c=0;c<s.length;c++){const l=s[c];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(r&&l.matches&&l.matches(r)))if(l.type==="checkbox")n&&o[l.name]===1?i[l.name]=l.checked:(i[l.name]||(i[l.name]=[]),l.checked&&i[l.name].push(l.value));else if(l.type==="radio")l.checked&&(i[l.name]=l.value);else if(l.type==="select-multiple"){i[l.name]=[];for(let u=0;u<l.options.length;u++)l.options[u].selected&&i[l.name].push(l.options[u].value)}else if(n&&l.type==="hidden")i[l.name]=l.value;else if(n&&(l.type==="number"||l.type==="range")){const u=Number(l.value);i[l.name]=l.value===""||isNaN(u)?null:u}else i[l.name]=l.value}return i}function we(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function he(e,t){const n=e.elements,r=[],i={};for(let s=0;s<n.length;s++){const o=n[s];o.name&&o.type==="checkbox"&&(i[o.name]=(i[o.name]||0)+1)}for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const l=t[c];if(o.type==="checkbox"){if(Array.isArray(l))o.checked=l.indexOf(o.value)!==-1;else if(i[o.name]>1){const u=String(l).split(",").map(function(d){return d.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=we(l);r.push(o)}else if(o.type==="radio")o.checked=o.value===String(l),r.push(o);else if(o.type==="select-multiple"){if(Array.isArray(l))for(let u=0;u<o.options.length;u++)o.options[u].selected=l.indexOf(o.options[u].value)!==-1;r.push(o)}else o.value=l,o.tagName==="SELECT"&&l!=null&&o.setAttribute("data-ln-value",l),r.push(o)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=he,window.lnCore.serializeForm=ae,window.lnCore.resolveFormMethod=de);const R={};function be(e,t){R[e]=t}function ge(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=be,window.lnCore.getDataMapper=ge);function pe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,C(function(){new MutationObserver(function(){I(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ye(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];$[n]=t}function me(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ye,window.lnCore.getLocaleFallback=me,window.lnCore.ensureLocaleObserver=pe);const S={};function Ce(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=S[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function j(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const c=n[o],l=c.getAttribute("data-ln-field");t[l]!=null&&(c.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<r.length;o++){const c=r[o],l=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<l.length;u++){const d=l[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),w=d[1].trim();t[w]!=null&&c.setAttribute(f,t[w])}}const i=e.querySelectorAll("[data-ln-show]");for(let o=0;o<i.length;o++){const c=i[o],l=c.getAttribute("data-ln-show");l in t&&c.classList.toggle("hidden",!t[l])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],l=c.getAttribute("data-ln-class").split(",");for(let u=0;u<l.length;u++){const d=l[u].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),w=d[1].trim();w in t&&c.classList.toggle(f,!!t[w])}}return e}function Ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)j(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function M(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,o){return t[o]!==void 0?t[o]:""},i=Array.from(e.querySelectorAll("*"));e.nodeType===1&&i.push(e);for(let s=0;s<i.length;s++){const o=i[s],c=o.attributes;for(let l=0;l<c.length;l++){const u=c[l];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function xe(e,t,n,r,i,s){const o={};for(let l=0;l<e.children.length;l++){const u=e.children[l],d=u.getAttribute("data-ln-render-key");d&&(o[d]=u)}const c=document.createDocumentFragment();for(let l=0;l<t.length;l++){const u=t[l],d=String(r(u));let f=o[d];if(f)i(f,u,l);else{const w=Ce(n,s);if(!w||(M(w,u),f=w.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),i(f,u,l)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=j,window.lnCore.lnFill=Ae,window.lnCore.renderList=xe);function k(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function U(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function W(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const i=r.trim().toLowerCase();return!(i==="false"||i==="0")}function H(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const v=new Map;function V(e,t){const n=(e?e.join("|"):"")+"::"+t;if(v.has(n))return v.get(n);const r=new Set(e||[]),i=function(s,o){const c=s.getAttribute(o);return c!==null&&r.has(c)?c:t};return v.set(n,i),i}function Q(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function P(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function J(e,t,n,r,i){if(!e||t===null)return!0;const s=r||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=l=>{i?console.warn(l,i):console.warn(l)};if(o==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const l=e.values||[];return l.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(c(`[${s}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(c(`[${s}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(l){return c(`[${s}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function _e(e,t,n){for(const r in n){const[i,s,o]=n[r];Object.defineProperty(e,r,{get:function(){return i(t,s,o)},enumerable:!0,configurable:!0})}return e}function Se(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let i=r.read;if(!i&&r.type)switch(r.type){case"enum":i=V(r.values,r.fallback);break;case"integer":i=U;break;case"float":i=Q;break;case"boolean":i=W;break;case"list":i=H;break;case"json":i=P;break;case"string":default:i=k;break}i||(i=k),t[r.prop]=[i,n,r.fallback]}return t}function ke(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function ve(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=_e,window.lnCore.attrSpec=Se,window.lnCore.attrStr=k,window.lnCore.attrInt=U,window.lnCore.attrBool=W,window.lnCore.attrList=H,window.lnCore.attrEnum=V,window.lnCore.attrFloat=Q,window.lnCore.attrJson=P);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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function K(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&A(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let l=0;l<c.length;l++)A(c[l],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ee(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Te(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 Le(e){const t=z(),n=e.observed||[];for(let r=0;r<n.length;r++){const i=n[r];t.byAttr.has(i)||t.byAttr.set(i,[]),t.byAttr.get(i).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const i=t.byDeclaredAttr.get(r);i.some(s=>s.componentTag===e.componentTag)||i.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ve(e);if(r===null)t.reactiveWildcard.push(e);else for(const i of r)t.byReactive.has(i)||t.byReactive.set(i,[]),t.byReactive.get(i).push(e)}e.persist&&t.persist.push(e)}function G(e,t,n,r){for(let i=0;i<e.length;i++){const s=e[i];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Oe(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=z(),i=r.byAttr.get(t),s=F()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!i&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&_(o)){const c=r.byDeclaredAttr.get(t),l=o.getAttribute(t);for(let u=0;u<c.length;u++)J(c[u].spec,l,t,c[u].componentTag,o)}if(window.lnCore._debugSink&&(n||i)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&G(c,o,t,e.oldValue),r.reactiveWildcard.length&&G(r.reactiveWildcard,o,t,e.oldValue)}if(i)for(let c=0;c<i.length;c++){const l=i[c];if(l.handler){l.handler(o,t,e.oldValue);continue}l.onAttributeChange&&o[l.attribute]?l.onAttributeChange(o,t):(K(o,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(o))}}}function Ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,C(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Oe(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function E(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function X(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Z(e){const t=E();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=T();if(e.target&&r.length)for(let i=0;i<r.length;i++){const s=r[i],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 i=0;i<e.addedNodes.length;i++){const s=e.addedNodes[i];if(s.nodeType!==1)continue;const o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const l=t[c],u=l.query;if(u&&(s.matches&&s.matches(u)&&(l.ComponentFn&&A(s,l),l.onInit&&l.onInit(s)),o&&s.querySelectorAll)){const d=s.querySelectorAll(u);for(let f=0;f<d.length;f++)l.ComponentFn&&A(d[f],l),l.onInit&&l.onInit(d[f])}}}for(let i=0;i<e.removedNodes.length;i++){const s=e.removedNodes[i];if(s.nodeType!==1||document.contains(s))continue;const o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const l=t[c],u=l.query;if(u&&(s.matches&&s.matches(u)&&X(s,l),o&&s.querySelectorAll)){const d=s.querySelectorAll(u);for(let f=0;f<d.length;f++)X(d[f],l)}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,C(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Z(r)}catch(i){console.error("[ln-core] lifecycle handler failed",r.target,i)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function De(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const i=n[r];if(i.type==="childList")try{Z(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function qe(e){E().push(e),e.onSubtreeChange&&e.query&&T().push(e),Y()}function ee(e,t,n,r,i={}){const s=i.extraAttributes||[],o=i.onAttributeChange||null,c=i.onSubtreeChange||null,l=i.onInit||null,u=i.onAttrChange||null,d=i.effects||null,f=i.attributes||null,w=f?ke(f):d,p=f?new Set(Object.keys(f)):null,x=i.persist||null;function y(N){const g=N||document.body;if(K(g,e,t,n),f&&F())for(const m in f){const Ye=f[m],D=Array.from(g.querySelectorAll("["+m+"]"));g.matches&&g.matches("["+m+"]")&&D.push(g);for(let q=0;q<D.length;q++){const B=D[q];_(B)&&J(Ye,B.getAttribute(m),m,r,B)}}l&&l(g)}const a=[];if(e.indexOf("[")!==-1){const N=/\[([\w-]+)/g;let g;for(;(g=N.exec(e))!==null;)a.push(g[1])}else a.push(e);Le({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:l,observed:a.concat(s),onAttributeChange:o,onAttrChange:u,effects:w,declared:p,persist:x}),Ne();const h=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,b=i.subtreeQuery||(h?e:"["+e+"]"),ue={selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:c,query:b};E().push(ue),c&&b&&T().push(ue),Y(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=qe,window.lnCore.withoutLifecycle=De);function fe(){Ee()>0?Te(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",fe):fe(),y}function te(e){return(e||"").replace(/^#/,"")}function L(e){const t=e===void 0?location.hash:e,n={},r=te(t);if(!r)return n;const i=r.split("&");for(let s=0;s<i.length;s++){const o=i[s];if(!o)continue;const c=o.indexOf(":"),l=c>-1?o.slice(0,c):o,u=c>-1?o.slice(c+1):"";if(l)try{n[l]=decodeURIComponent(u)}catch{n[l]=u}}return n}function Be(e){if(!e)return null;const t=L();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const n=L();t==null?delete n[e]:n[e]=String(t);const i=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");te(location.hash)!==i&&(location.hash=i)}function Ie(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function $e(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function je(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ue(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),i=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:i}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=L,window.lnCore.hashGet=Be,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Ie,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=$e,window.lnCore.hashSortDecode=je,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=Ue);function We(e){return(e||"").replace(/^\?/,"")}function He(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=We(t);if(!r)return n;const i=new URLSearchParams(r);for(const[s,o]of i.entries())n[s]=o;return n}function Ve(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Qe(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function Pe(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"_"+t:r:t||null}function Je(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ke(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function ze(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ge(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=He,window.lnCore.queryGet=Ve,window.lnCore.querySet=Qe,window.lnCore.resolveQueryParam=Pe,window.lnCore.querySortEncode=Je,window.lnCore.querySortDecode=Ke,window.lnCore.queryFilterEncode=ze,window.lnCore.queryFilterDecode=Ge);function Xe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Xe);function ne(e,t){if(e.length!==1)return e;const n=e.charCodeAt(0);if(n>=65&&n<=90){const r=((n-65+t)%26+26)%26;return String.fromCharCode(65+r)}if(n>=97&&n<=122){const r=((n-97+t)%26+26)%26;return String.fromCharCode(97+r)}if(n>=48&&n<=57){const r=((n-48+t)%10+10)%10;return String.fromCharCode(48+r)}return e}function re(e){if(e==null||e==="")return"";const t=String(e);if(typeof TextEncoder<"u"&&typeof btoa<"u"){const n=new TextEncoder().encode(t);let r="";const i=n.length;for(let s=0;s<i;s++)r+=String.fromCharCode(n[s]);return btoa(r)}return typeof Buffer<"u"?Buffer.from(t,"utf-8").toString("base64"):""}function oe(e){if(e==null||e==="")return"";try{const t=String(e).trim();if(typeof atob<"u"&&typeof TextDecoder<"u"){const n=atob(t),r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return new TextDecoder().decode(r)}if(typeof Buffer<"u")return Buffer.from(t,"base64").toString("utf-8")}catch{return e}return e}function ie(e,t){const n=String(t||"ln-ashlar");let r;typeof TextEncoder<"u"?r=new TextEncoder().encode(n):typeof Buffer<"u"?r=Buffer.from(n,"utf-8"):r=[108,110];const i=r.length||1,s=new Uint8Array(e.length);for(let o=0;o<e.length;o++)s[o]=e[o]^r[o%i];return s}function le(e,t="ln-ashlar"){if(e==null||e==="")return"";const n=String(e);let r;if(typeof TextEncoder<"u")r=new TextEncoder().encode(n);else if(typeof Buffer<"u")r=Buffer.from(n,"utf-8");else return"";const i=ie(r,t);let s="";for(let o=0;o<i.length;o++)s+=String.fromCharCode(i[o]);return typeof btoa<"u"?btoa(s):typeof Buffer<"u"?Buffer.from(i).toString("base64"):""}function se(e,t="ln-ashlar"){if(e==null||e==="")return"";try{const n=String(e).trim();let r="";if(typeof atob<"u")r=atob(n);else if(typeof Buffer<"u")r=Buffer.from(n,"base64").toString("binary");else return e;const i=new Uint8Array(r.length);for(let o=0;o<r.length;o++)i[o]=r.charCodeAt(o);const s=ie(i,t);if(typeof TextDecoder<"u")return new TextDecoder().decode(s);if(typeof Buffer<"u")return Buffer.from(s).toString("utf-8")}catch{return e}return e}function ce(e){if(typeof e=="number"||typeof e=="string"&&/^-?\d+$/.test(String(e).trim()))return{codec:"rot",shift:Number(e)||13,key:"ln-ashlar"};if(e&&typeof e=="object"){const t=(e.codec||(e.key?"xor":"rot")).toLowerCase().trim(),n=t==="xor"||t==="base64"?t:"rot",r=Number(e.shift)||13,i=e.key||"ln-ashlar";return{codec:n,shift:r,key:i}}return{codec:"rot",shift:13,key:"ln-ashlar"}}function Ze(e,t=13){if(e==null||(typeof e!="string"&&(e=String(e)),e.length===0))return"";const n=ce(t);return n.codec==="base64"?re(e):n.codec==="xor"?le(e,n.key):e.replace(/[a-zA-Z0-9]/g,r=>ne(r,n.shift))}function O(e,t=13){if(e==null||(typeof e!="string"&&(e=String(e)),e.length===0))return"";const n=ce(t);return n.codec==="base64"?oe(e):n.codec==="xor"?se(e,n.key):e.replace(/[a-zA-Z0-9]/g,r=>ne(r,-n.shift))}(function(){const e="data-ln-obfuscator",t="lnObfuscator";if(window[t]!==void 0)return;function n(o){const c=o[t];c&&c.deobfuscate()}const r={"data-ln-obfuscator":{type:"enum",values:["rot13","base64","xor"],fallback:"rot13",effect:n,description:"Codec used to deobfuscate text or links"},"data-ln-obfuscator-codec":{type:"enum",values:["rot13","base64","xor"],fallback:"rot13",effect:n,description:"Explicit codec override attribute"},"data-ln-obfuscator-key":{type:"string",effect:n,description:"Encryption or masking key for XOR codec"}};function i(o){return o[t]?o[t]:(o[t]=this,this.dom=o,this._originalTextNodes=null,this._originalHref=null,this.deobfuscate(),this)}i.prototype.deobfuscate=function(){const o=!!(this.dom.matches&&(this.dom.matches("a")||this.dom.matches("area")));if(this._originalHref===null&&o&&this.dom.hasAttribute("href")&&(this._originalHref=this.dom.getAttribute("href")),(!this._originalTextNodes||this._originalTextNodes.length===0||this._originalTextNodes.some(a=>!this.dom.contains(a.node)))&&(this._originalTextNodes=[],typeof document<"u"&&document.createTreeWalker)){const a=document.createTreeWalker(this.dom,NodeFilter.SHOW_TEXT,{acceptNode:function(h){return h.parentElement&&h.parentElement.classList&&h.parentElement.classList.contains("sr-only")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;a.nextNode();)this._originalTextNodes.push({node:a.currentNode,raw:a.currentNode.nodeValue})}const l=this.dom.getAttribute(e),u=parseInt(l,10),d=isNaN(u)?13:u,f=(this.dom.getAttribute("data-ln-obfuscator-codec")||"").toLowerCase().trim(),w=this.dom.getAttribute("data-ln-obfuscator-key");let p="rot";f==="xor"||f==="base64"?p=f:w&&(p="xor");const x=w||"ln-ashlar",y={codec:p,shift:d,key:x};if(o&&this.dom.getAttribute("data-ln-external-link")==="processed"){const a=this.dom.querySelectorAll(".sr-only");for(let b=0;b<a.length;b++)a[b].remove();this.dom.removeAttribute("data-ln-external-link"),this.dom.removeAttribute("target");const h=(this.dom.rel||"").split(/\s+/).filter(function(b){return b&&b!=="noopener"&&b!=="noreferrer"});h.length>0?this.dom.rel=h.join(" "):this.dom.removeAttribute("rel")}if(this._originalTextNodes)for(let a=0;a<this._originalTextNodes.length;a++){const h=this._originalTextNodes[a];h.node&&h.raw&&h.raw.length>0&&(h.node.nodeValue=O(h.raw,y))}if(o&&this._originalHref){const a=O(this._originalHref,y);this.dom.setAttribute("href",a)}I(this.dom,"ln-obfuscator:deobfuscated",{target:this.dom,codec:p,shift:d,key:p==="xor"?x:null})},i.prototype.destroy=function(){if(this.dom[t]){if(this._originalTextNodes)for(let o=0;o<this._originalTextNodes.length;o++){const c=this._originalTextNodes[o];c.node&&c.raw&&(c.node.nodeValue=c.raw)}this._originalHref!==null&&this.dom.setAttribute("href",this._originalHref),delete this.dom[t]}};const s=ee(e,t,i,"ln-obfuscator",{attributes:r});s.obfuscate=Ze,s.deobfuscate=O,s.utf8ToBase64=re,s.base64ToUtf8=oe,s.xorObfuscate=le,s.xorDeobfuscate=se})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!A(o))return}e.apply(console,t)}}function R(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ie(e,t){const n=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(o&&r.matches&&r.matches(o)))if(r.type==="checkbox")n&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&l[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);l[r.name]=r.value===""||isNaN(u)?null:u}else l[r.name]=r.value}return l}function le(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function se(e,t){const n=e.elements,o=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(r).split(",").map(function(a){return a.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=le(r);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<i.options.length;u++)i.options[u].selected=r.indexOf(i.options[u].value)!==-1;o.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),o.push(i)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=se,window.lnCore.serializeForm=ie,window.lnCore.resolveFormMethod=oe);const T={};function ce(e,t){T[e]=t}function ue(e){return T[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ue);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){R(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function de(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];$[n]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ae);const _={};function we(e,t){_[e]||(_[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=_[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const a=r[u].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),f=a[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],r=c.getAttribute("data-ln-show");r in t&&c.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],r=c.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const a=r[u].trim().split(":");if(a.length!==2)continue;const d=a[0].trim(),f=a[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function he(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)N(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 M(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const o=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let r=0;r<c.length;r++){const u=c[r];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function pe(e,t,n,o,l,s){const i={};for(let r=0;r<e.children.length;r++){const u=e.children[r],a=u.getAttribute("data-ln-render-key");a&&(i[a]=u)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],a=String(o(u));let d=i[a];if(d)l(d,u,r);else{const f=we(n,s);if(!f||(M(f,u),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",a),l(d,u,r)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=N,window.lnCore.lnFill=he,window.lnCore.renderList=pe);function h(e,t,n){const o=e.getAttribute(t);return o===null?n:o}function B(e,t,n){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?n:o}function j(e,t,n=!1){const o=e.getAttribute(t);if(o===null)return!!n;const l=o.trim().toLowerCase();return!(l==="false"||l==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const v=new Map;function W(e,t){const n=(e?e.join("|"):"")+"::"+t;if(v.has(n))return v.get(n);const o=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&o.has(c)?c:t};return v.set(n,l),l}function V(e,t,n){const o=parseFloat(e.getAttribute(t));return isNaN(o)?n:o}function H(e,t,n){const o=e.getAttribute(t);if(!o)return n;try{return JSON.parse(o)}catch{return n}}function Q(e,t,n,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function P(e,t,n){for(const o in n){const[l,s,i]=n[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function J(e){const t={};for(const n in e){const o=e[n];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=W(o.values,o.fallback);break;case"integer":l=B;break;case"float":l=V;break;case"boolean":l=j;break;case"list":l=U;break;case"json":l=H;break;case"string":default:l=h;break}l||(l=h),t[o.prop]=[l,n,o.fallback]}return t}function be(e){const t={};for(const n in e){const o=e[n];o&&o.effect&&(t[n]=o.effect)}return Object.keys(t).length?t:null}function 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=P,window.lnCore.attrSpec=J,window.lnCore.attrStr=h,window.lnCore.attrInt=B,window.lnCore.attrBool=j,window.lnCore.attrList=U,window.lnCore.attrEnum=W,window.lnCore.attrFloat=V,window.lnCore.attrJson=H);function p(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(n){console.error("["+t.attribute+"] init failed",e,n)}}}function K(e,t,n,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:o};if(e.matches&&e.matches(s)&&p(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)p(c[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function 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 G(){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 me(e){const t=G(),n=e.observed||[];for(let o=0;o<n.length;o++){const l=n[o];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const l=t.byDeclaredAttr.get(o);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=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 z(e,t,n,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,o):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,o)}}function Ae(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,o=G(),l=o.byAttr.get(t),s=I()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&A(i)){const c=o.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let u=0;u<c.length;u++)Q(c[u].spec,r,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const c=o.byReactive.get(t);c&&z(c,i,t,e.oldValue),o.reactiveWildcard.length&&z(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(K(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function _e(){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{Ae(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function S(){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 k(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function X(e){const t=S();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.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 r=t[c];if(r.selector&&r.attribute&&r.ComponentFn){if(!i)s.matches&&s.matches(r.query)&&p(s,r);else if(s.matches&&s.matches(r.query)&&p(s,r),s.querySelectorAll){const u=s.querySelectorAll(r.query);for(let a=0;a<u.length;a++)p(u[a],r)}}r.onInit&&r.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 r=t[c],u=r.query;if(u){if(!i)s.matches&&s.matches(u)&&k(s,r);else if(s.matches&&s.matches(u)&&k(s,r),s.querySelectorAll){const a=s.querySelectorAll(u);for(let d=0;d<a.length;d++)k(a[d],r)}}}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const o=t[n];if(o.type==="childList")try{X(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 ve(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 o=0;o<n.length;o++){const l=n[o];if(l.type==="childList")try{X(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 Se(e){S().push(e),e.onSubtreeChange&&e.query&&x().push(e),Y()}function Z(e,t,n,o,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,u=l.onAttrChange||null,a=l.effects||null,d=l.attributes||null,f=d?be(d):a,b=d?new Set(Object.keys(d)):null,g=l.persist||null;function m(O){const w=O||document.body;if(K(w,e,t,n),d&&I())for(const C in d){const He=d[C],q=Array.from(w.querySelectorAll("["+C+"]"));w.matches&&w.matches("["+C+"]")&&q.push(w);for(let D=0;D<q.length;D++){const F=q[D];A(F)&&Q(He,F.getAttribute(C),C,o,F)}}r&&r(w)}const L=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)L.push(w[1])}else L.push(e);me({selector:e,attribute:t,componentTag:o,attributes:d,ComponentFn:n,onInit:r,observed:L.concat(s),onAttributeChange:i,onAttrChange:u,effects:f,declared:b,persist:g}),_e();const Ve=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,te=l.subtreeQuery||(Ve?e:"["+e+"]"),ne={selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:c,query:te};S().push(ne),c&&te&&x().push(ne),Y(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Se,window.lnCore.withoutLifecycle=ve);function re(){Ce()>0?ye(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",re):re(),m}function ee(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,n={},o=ee(t);if(!o)return n;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function xe(e){if(!e)return null;const t=E();return e in t?t[e]:null}function ke(e,t){if(!e)return;const n=E();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");ee(location.hash)!==l&&(location.hash=l)}function Ee(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 n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function 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 n=e.slice(0,t),o=e.slice(t+1),l=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=xe,window.lnCore.hashSet=ke,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Fe);function Ie(e){return(e||"").replace(/^\?/,"")}function Re(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},o=Ie(t);if(!o)return n;const l=new URLSearchParams(o);for(const[s,i]of l.entries())n[s]=i;return n}function Te(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function $e(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const o=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",o)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 Me(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Be(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const o=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:o}}}return null}function je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ue(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Re,window.lnCore.queryGet=Te,window.lnCore.querySet=$e,window.lnCore.resolveQueryParam=Ne,window.lnCore.querySortEncode=Me,window.lnCore.querySortDecode=Be,window.lnCore.queryFilterEncode=je,window.lnCore.queryFilterDecode=Ue);function We(){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=We),(function(){const e="data-ln-options",t="lnOptions";if(window[t]!==void 0)return;const n={"data-ln-options":{prop:"_storeName",type:"string",read:h,fallback:"",description:"Store or coordinator addressing to populate options from"},"data-ln-options-value":{prop:"_valueField",type:"string",read:h,fallback:"id",description:"Field name used for option value attribute"},"data-ln-options-label":{prop:"_labelField",type:"string",read:h,fallback:"name",description:"Field name used for option visible label text"}},o=J(n);function l(s){this.dom=s,P(this,s,o);const i=this;return this._onSetData=function(c){c.detail&&i._rebuild(c.detail.data||[])},s.addEventListener("ln-options:set-data",this._onSetData),R(s,"ln-options:request-data",{options:this._storeName}),this}l.prototype._rebuild=function(s){const i=this.dom,c=this._valueField,r=this._labelField,u=i.getAttribute("data-ln-value")||i.value,a=i.querySelectorAll("option");for(let f=a.length-1;f>=0;f--)a[f].value!==""&&i.removeChild(a[f]);for(let f=0;f<s.length;f++){const b=s[f],g=document.createElement("option");g.value=String(b[c]),g.textContent=b[r]!=null?b[r]:"",i.appendChild(g)}const d=i.options;for(let f=0;f<d.length;f++)if(d[f].value===String(u)){i.value=String(u);break}},l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-options:set-data",this._onSetData),delete this.dom[t])},Z(e,t,l,"ln-options",{attributes:n})})()})();
1
+ (function(){"use strict";function D(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!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 r=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){r=t[l];break}if(!A(r))return}e.apply(console,t)}}function I(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function 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 re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ie(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,l={},s=e.elements,i={};if(n)for(let c=0;c<s.length;c++){const o=s[c];o.name&&o.type==="checkbox"&&!o.disabled&&(i[o.name]=(i[o.name]||0)+1)}for(let c=0;c<s.length;c++){const o=s[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(r&&o.matches&&o.matches(r)))if(o.type==="checkbox")n&&i[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let u=0;u<o.options.length;u++)o.options[u].selected&&l[o.name].push(o.options[u].value)}else if(n&&o.type==="hidden")l[o.name]=o.value;else if(n&&(o.type==="number"||o.type==="range")){const u=Number(o.value);l[o.name]=o.value===""||isNaN(u)?null:u}else l[o.name]=o.value}return l}function le(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function se(e,t){const n=e.elements,r=[],l={};for(let s=0;s<n.length;s++){const i=n[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<n.length;s++){const i=n[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const o=t[c];if(i.type==="checkbox"){if(Array.isArray(o))i.checked=o.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(o).split(",").map(function(d){return d.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=le(o);r.push(i)}else if(i.type==="radio")i.checked=i.value===String(o),r.push(i);else if(i.type==="select-multiple"){if(Array.isArray(o))for(let u=0;u<i.options.length;u++)i.options[u].selected=o.indexOf(i.options[u].value)!==-1;r.push(i)}else i.value=o,i.tagName==="SELECT"&&o!=null&&i.setAttribute("data-ln-value",o),r.push(i)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=se,window.lnCore.serializeForm=ie,window.lnCore.resolveFormMethod=re);const R={};function ce(e,t){R[e]=t}function ue(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ue);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,C(function(){new MutationObserver(function(){I(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const T={};function de(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];T[n]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return T[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ae);const _={};function we(e,t){_[e]||(_[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=_[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let i=0;i<n.length;i++){const c=n[i],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const r=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<r.length;i++){const c=r[i],o=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const d=o[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(a,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],o=c.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const d=o[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(a,!!t[f])}}return e}function 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 r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(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 N(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const r=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let o=0;o<c.length;o++){const u=c[o];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function pe(e,t,n,r,l,s){const i={};for(let o=0;o<e.children.length;o++){const u=e.children[o],d=u.getAttribute("data-ln-render-key");d&&(i[d]=u)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],d=String(r(u));let a=i[d];if(a)l(a,u,o);else{const f=we(n,s);if(!f||(N(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),l(a,u,o)}c.appendChild(a)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=$,window.lnCore.lnFill=he,window.lnCore.renderList=pe);function h(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function M(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function B(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const l=r.trim().toLowerCase();return!(l==="false"||l==="0")}function j(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const v=new Map;function U(e,t){const n=(e?e.join("|"):"")+"::"+t;if(v.has(n))return v.get(n);const r=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&r.has(c)?c:t};return v.set(n,l),l}function W(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function V(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function H(e,t,n,r,l){if(!e||t===null)return!0;const s=r||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=o=>{l?console.warn(o,l):console.warn(o)};if(i==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${s}] Value ${o} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${s}] Value ${o} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${s}] Invalid JSON for attribute "${n}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,n){for(const r in n){const[l,s,i]=n[r];Object.defineProperty(e,r,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function P(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let l=r.read;if(!l&&r.type)switch(r.type){case"enum":l=U(r.values,r.fallback);break;case"integer":l=M;break;case"float":l=W;break;case"boolean":l=B;break;case"list":l=j;break;case"json":l=V;break;case"string":default:l=h;break}l||(l=h),t[r.prop]=[l,n,r.fallback]}return t}function be(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function 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=Q,window.lnCore.attrSpec=P,window.lnCore.attrStr=h,window.lnCore.attrInt=M,window.lnCore.attrBool=B,window.lnCore.attrList=j,window.lnCore.attrEnum=U,window.lnCore.attrFloat=W,window.lnCore.attrJson=V);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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function J(e,t,n,r){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:n,ComponentFn:r};if(e.matches&&e.matches(s)&&y(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let o=0;o<c.length;o++)y(c[o],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function 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 K(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function me(e){const t=K(),n=e.observed||[];for(let r=0;r<n.length;r++){const l=n[r];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const l=t.byDeclaredAttr.get(r);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ge(e);if(r===null)t.reactiveWildcard.push(e);else for(const l of r)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function G(e,t,n,r){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[n];i?i(t,n,r):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,r)}}function Ae(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,r=K(),l=r.byAttr.get(t),s=D()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&A(i)){const c=r.byDeclaredAttr.get(t),o=i.getAttribute(t);for(let u=0;u<c.length;u++)H(c[u].spec,o,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),n){const c=r.byReactive.get(t);c&&G(c,i,t,e.oldValue),r.reactiveWildcard.length&&G(r.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const o=l[c];if(o.handler){o.handler(i,t,e.oldValue);continue}o.onAttributeChange&&i[o.attribute]?o.onAttributeChange(i,t):(J(i,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(i))}}}function _e(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,C(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{Ae(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function S(){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 z(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function X(e){const t=S();if(!t.length)return;const n=e.target;if(n){const l=n.nodeType===1?n:n.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const r=x();if(e.target&&r.length)for(let l=0;l<r.length;l++){const s=r[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)continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],u=o.query;if(u&&(s.matches&&s.matches(u)&&(o.ComponentFn&&y(s,o),o.onInit&&o.onInit(s)),i&&s.querySelectorAll)){const d=s.querySelectorAll(u);for(let a=0;a<d.length;a++)o.ComponentFn&&y(d[a],o),o.onInit&&o.onInit(d[a])}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType!==1||document.contains(s))continue;const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const o=t[c],u=o.query;if(u&&(s.matches&&s.matches(u)&&z(s,o),i&&s.querySelectorAll)){const d=s.querySelectorAll(u);for(let a=0;a<d.length;a++)z(d[a],o)}}}}function Y(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,C(function(){const e=new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{X(r)}catch(l){console.error("[ln-core] lifecycle handler failed",r.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ve(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const n=t.takeRecords();for(let r=0;r<n.length;r++){const l=n[r];if(l.type==="childList")try{X(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 Se(e){S().push(e),e.onSubtreeChange&&e.query&&x().push(e),Y()}function Z(e,t,n,r,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,o=l.onInit||null,u=l.onAttrChange||null,d=l.effects||null,a=l.attributes||null,f=a?be(a):d,p=a?new Set(Object.keys(a)):null,b=l.persist||null;function m(O){const w=O||document.body;if(J(w,e,t,n),a&&D())for(const g in a){const He=a[g],L=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&L.push(w);for(let F=0;F<L.length;F++){const q=L[F];A(q)&&H(He,q.getAttribute(g),g,r,q)}}o&&o(w)}const E=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)E.push(w[1])}else E.push(e);me({selector:e,attribute:t,componentTag:r,attributes:a,ComponentFn:n,onInit:o,observed:E.concat(s),onAttributeChange:i,onAttrChange:u,effects:f,declared:p,persist:b}),_e();const Ve=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,te=l.subtreeQuery||(Ve?e:"["+e+"]"),ne={selector:e,attribute:t,ComponentFn:n,onInit:o,onSubtreeChange:c,query:te};S().push(ne),c&&te&&x().push(ne),Y(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=Z,window.lnCore.observeLifecycle=Se,window.lnCore.withoutLifecycle=ve);function oe(){Ce()>0?ye(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",oe):oe(),m}function ee(e){return(e||"").replace(/^#/,"")}function k(e){const t=e===void 0?location.hash:e,n={},r=ee(t);if(!r)return n;const l=r.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),o=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(o)try{n[o]=decodeURIComponent(u)}catch{n[o]=u}}return n}function xe(e){if(!e)return null;const t=k();return e in t?t[e]:null}function ke(e,t){if(!e)return;const n=k();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const i=n[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");ee(location.hash)!==l&&(location.hash=l)}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 n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Le(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 qe(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 n=e.slice(0,t),r=e.slice(t+1),l=r?r.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=k,window.lnCore.hashGet=xe,window.lnCore.hashSet=ke,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Oe,window.lnCore.hashSortEncode=Le,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=De);function Ie(e){return(e||"").replace(/^\?/,"")}function Re(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},r=Ie(t);if(!r)return n;const l=new URLSearchParams(r);for(const[s,i]of l.entries())n[s]=i;return n}function Te(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function $e(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const r=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",r)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"_"+t:r:t||null}function Me(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Be(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const r=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:r}}}return null}function je(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function Ue(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=Re,window.lnCore.queryGet=Te,window.lnCore.querySet=$e,window.lnCore.resolveQueryParam=Ne,window.lnCore.querySortEncode=Me,window.lnCore.querySortDecode=Be,window.lnCore.queryFilterEncode=je,window.lnCore.queryFilterDecode=Ue);function We(){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=We),(function(){const e="data-ln-options",t="lnOptions";if(window[t]!==void 0)return;const n={"data-ln-options":{prop:"_storeName",type:"string",read:h,fallback:"",description:"Store or coordinator addressing to populate options from"},"data-ln-options-value":{prop:"_valueField",type:"string",read:h,fallback:"id",description:"Field name used for option value attribute"},"data-ln-options-label":{prop:"_labelField",type:"string",read:h,fallback:"name",description:"Field name used for option visible label text"}},r=P(n);function l(s){this.dom=s,Q(this,s,r);const i=this;return this._onSetData=function(c){c.detail&&i._rebuild(c.detail.data||[])},s.addEventListener("ln-options:set-data",this._onSetData),I(s,"ln-options:request-data",{options:this._storeName}),this}l.prototype._rebuild=function(s){const i=this.dom,c=this._valueField,o=this._labelField,u=i.getAttribute("data-ln-value")||i.value,d=i.querySelectorAll("option");for(let f=d.length-1;f>=0;f--)d[f].value!==""&&i.removeChild(d[f]);for(let f=0;f<s.length;f++){const p=s[f],b=document.createElement("option");b.value=String(p[c]),b.textContent=p[o]!=null?p[o]:"",i.appendChild(b)}const a=i.options;for(let f=0;f<a.length;f++)if(a[f].value===String(u)){i.value=String(u);break}},l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-options:set-data",this._onSetData),delete this.dom[t])},Z(e,t,l,"ln-options",{attributes:n})})()})();
@@ -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 y(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(!y(i))return}e.apply(console,t)}}function W(e){window.lnCore=window.lnCore||{},window.lnCore._persistSink=e}function j(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function T(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function U(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,l={},s=e.elements,o={};if(n)for(let a=0;a<s.length;a++){const r=s[a];r.name&&r.type==="checkbox"&&!r.disabled&&(o[r.name]=(o[r.name]||0)+1)}for(let a=0;a<s.length;a++){const r=s[a];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(i&&r.matches&&r.matches(i)))if(r.type==="checkbox")n&&o[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&l[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);l[r.name]=r.value===""||isNaN(u)?null:u}else l[r.name]=r.value}return l}function V(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function K(e,t){const n=e.elements,i=[],l={};for(let s=0;s<n.length;s++){const o=n[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const a=o.getAttribute("data-ln-fill-as")||o.name;if(!a||!(a in t))continue;const r=t[a];if(o.type==="checkbox"){if(Array.isArray(r))o.checked=r.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(r).split(",").map(function(c){return c.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=V(r);i.push(o)}else if(o.type==="radio")o.checked=o.value===String(r),i.push(o);else if(o.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<o.options.length;u++)o.options[u].selected=r.indexOf(o.options[u].value)!==-1;i.push(o)}else o.value=r,o.tagName==="SELECT"&&r!=null&&o.setAttribute("data-ln-value",r),i.push(o)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=K,window.lnCore.serializeForm=U,window.lnCore.resolveFormMethod=T);const A={};function P(e,t){A[e]=t}function H(e){return A[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=P,window.lnCore.getDataMapper=H);function J(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){j(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const x={};function G(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];x[n]=t}function Q(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return x[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=G,window.lnCore.getLocaleFallback=Q,window.lnCore.ensureLocaleObserver=J);const h={};function z(e,t){h[e]||(h[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=h[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function S(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const a=n[o],r=a.getAttribute("data-ln-field");t[r]!=null&&(a.textContent=t[r])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const a=i[o],r=a.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const c=r[u].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),f=c[1].trim();t[f]!=null&&a.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const a=l[o],r=a.getAttribute("data-ln-show");r in t&&a.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const a=s[o],r=a.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const c=r[u].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),f=c[1].trim();f in t&&a.classList.toggle(d,!!t[f])}}return e}function X(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)S(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function _(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,a){return t[a]!==void 0?t[a]:""}))}const i=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],a=o.attributes;for(let r=0;r<a.length;r++){const u=a[r];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function Y(e,t,n,i,l,s){const o={};for(let r=0;r<e.children.length;r++){const u=e.children[r],c=u.getAttribute("data-ln-render-key");c&&(o[c]=u)}const a=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],c=String(i(u));let d=o[c];if(d)l(d,u,r);else{const f=z(n,s);if(!f||(_(f,u),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",c),l(d,u,r)}a.appendChild(d)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=_,window.lnCore.fill=S,window.lnCore.lnFill=X,window.lnCore.renderList=Y);function b(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function k(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function v(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function F(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const g=new Map;function D(e,t){const n=(e?e.join("|"):"")+"::"+t;if(g.has(n))return g.get(n);const i=new Set(e||[]),l=function(s,o){const a=s.getAttribute(o);return a!==null&&i.has(a)?a:t};return g.set(n,l),l}function L(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function O(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function Z(e,t,n,i,l){if(!e||t===null)return!0;const s=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const a=r=>{l?console.warn(r,l):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(a(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(a(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return a(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ee(e,t,n){for(const i in n){const[l,s,o]=n[i];Object.defineProperty(e,i,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function te(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=D(i.values,i.fallback);break;case"integer":l=k;break;case"float":l=L;break;case"boolean":l=v;break;case"list":l=F;break;case"json":l=O;break;case"string":default:l=b;break}l||(l=b),t[i.prop]=[l,n,i.fallback]}return t}function ne(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=ee,window.lnCore.attrSpec=te,window.lnCore.attrStr=b,window.lnCore.attrInt=k,window.lnCore.attrBool=v,window.lnCore.attrList=F,window.lnCore.attrEnum=D,window.lnCore.attrFloat=L,window.lnCore.attrJson=O);function $(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 re(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(s)&&$(e,o),e.querySelectorAll){const a=e.querySelectorAll(s);for(let r=0;r<a.length;r++)$(a[r],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function I(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function oe(e){const t=I(),n=e.observed||[];for(let i=0;i<n.length;i++){const l=n[i];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const l=t.byDeclaredAttr.get(i);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=ne(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 q(e,t,n,i){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,i):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,i)}}function ie(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=I(),l=i.byAttr.get(t),s=M()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&y(o)){const a=i.byDeclaredAttr.get(t),r=o.getAttribute(t);for(let u=0;u<a.length;u++)Z(a[u].spec,r,t,a[u].componentTag,o)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),n){const a=i.byReactive.get(t);a&&q(a,o,t,e.oldValue),i.reactiveWildcard.length&&q(i.reactiveWildcard,o,t,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const r=l[a];if(r.handler){r.handler(o,t,e.oldValue);continue}r.onAttributeChange&&o[r.attribute]?r.onAttributeChange(o,t):(re(o,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(o))}}}function le(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ie(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 se(e,t){oe({observed:e,handler:t}),le()}function E(e){return(e||"").replace(/^#/,"")}function m(e){const t=e===void 0?location.hash:e,n={},i=E(t);if(!i)return n;const l=i.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const a=o.indexOf(":"),r=a>-1?o.slice(0,a):o,u=a>-1?o.slice(a+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function ae(e){if(!e)return null;const t=m();return e in t?t[e]:null}function ue(e,t){if(!e)return;const n=m();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");E(location.hash)!==l&&(location.hash=l)}function ce(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 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 fe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function we(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function pe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function he(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),i=e.slice(t+1),l=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=m,window.lnCore.hashGet=ae,window.lnCore.hashSet=ue,window.lnCore.hashLinkClick=ce,window.lnCore.resolveHashNamespace=de,window.lnCore.hashSortEncode=fe,window.lnCore.hashSortDecode=we,window.lnCore.hashFilterEncode=pe,window.lnCore.hashFilterDecode=he);function be(e){return(e||"").replace(/^\?/,"")}function ge(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},i=be(t);if(!i)return n;const l=new URLSearchParams(i);for(const[s,o]of l.entries())n[s]=o;return n}function me(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ce(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const i=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",i)}function ye(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function xe(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const i=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:i}}}return null}function Se(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function _e(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=ge,window.lnCore.queryGet=me,window.lnCore.querySet=Ce,window.lnCore.resolveQueryParam=ye,window.lnCore.querySortEncode=Ae,window.lnCore.querySortDecode=xe,window.lnCore.queryFilterEncode=Se,window.lnCore.queryFilterDecode=_e);function ke(){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=ke),(function(){if(window.lnCore&&window.lnCore._persistBound)return;window.lnCore=window.lnCore||{},window.lnCore._persistBound=!0;function e(){return location.pathname.replace(/\/+$/,"").toLowerCase()||"/"}function t(o,a){const r=o.getAttribute("data-ln-persist"),u=r!==null&&r!==""?r:o.id;return u?o.getAttribute("data-ln-persist-scope")==="page"?"ln:"+u+":"+e()+":"+a:"ln:"+u+":"+a:(console.warn('[ln-persist] Element requires id or data-ln-persist="key"',o),null)}let n=null;function i(){if(n!==null)return n;try{if(typeof localStorage>"u")return n=!1;const o="__ln_persist_test__";return localStorage.setItem(o,o),localStorage.removeItem(o),n=!0}catch{return n=!1}}const l=new Set;function s(o,a){const r=window.lnCore&&window.lnCore._attrRegistry,u=r&&r.persist||[];let c=null;for(let w=0;w<u.length;w++)if(u[w].selector===a){c=u[w];break}if(!c)return;const d=c.persist;if(l.has(d.attr)||(l.add(d.attr),se([d.attr],function(w,N){if(!w.hasAttribute("data-ln-persist")||d.hashActive&&d.hashActive(w))return;const C=t(w,N);if(!C||!i())return;const B=w.getAttribute(N);try{B===null?localStorage.removeItem(C):localStorage.setItem(C,B)}catch{}})),d.hashActive&&d.hashActive(o))return;const f=t(o,d.attr);if(!f||!i())return;const R=localStorage.getItem(f);R!==null&&o.setAttribute(d.attr,R)}W(s)})()})();
1
+ (function(){"use strict";function M(){if(typeof window>"u")return!1;if(window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink)return!0;if(typeof document<"u"){if(document.documentElement&&document.documentElement.hasAttribute("data-ln-debug"))return!0;if(document.body)return document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null}return!1}function y(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(!y(i))return}e.apply(console,t)}}function W(e){window.lnCore=window.lnCore||{},window.lnCore._persistSink=e}function j(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function T(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function U(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,l={},s=e.elements,o={};if(n)for(let a=0;a<s.length;a++){const r=s[a];r.name&&r.type==="checkbox"&&!r.disabled&&(o[r.name]=(o[r.name]||0)+1)}for(let a=0;a<s.length;a++){const r=s[a];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(i&&r.matches&&r.matches(i)))if(r.type==="checkbox")n&&o[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let u=0;u<r.options.length;u++)r.options[u].selected&&l[r.name].push(r.options[u].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const u=Number(r.value);l[r.name]=r.value===""||isNaN(u)?null:u}else l[r.name]=r.value}return l}function V(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function K(e,t){const n=e.elements,i=[],l={};for(let s=0;s<n.length;s++){const o=n[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<n.length;s++){const o=n[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const a=o.getAttribute("data-ln-fill-as")||o.name;if(!a||!(a in t))continue;const r=t[a];if(o.type==="checkbox"){if(Array.isArray(r))o.checked=r.indexOf(o.value)!==-1;else if(l[o.name]>1){const u=String(r).split(",").map(function(c){return c.trim()});o.checked=u.indexOf(o.value)!==-1}else o.checked=V(r);i.push(o)}else if(o.type==="radio")o.checked=o.value===String(r),i.push(o);else if(o.type==="select-multiple"){if(Array.isArray(r))for(let u=0;u<o.options.length;u++)o.options[u].selected=r.indexOf(o.options[u].value)!==-1;i.push(o)}else o.value=r,o.tagName==="SELECT"&&r!=null&&o.setAttribute("data-ln-value",r),i.push(o)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=K,window.lnCore.serializeForm=U,window.lnCore.resolveFormMethod=T);const A={};function P(e,t){A[e]=t}function H(e){return A[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=P,window.lnCore.getDataMapper=H);function J(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){j(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const x={};function G(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];x[n]=t}function Q(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return x[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=G,window.lnCore.getLocaleFallback=Q,window.lnCore.ensureLocaleObserver=J);const h={};function z(e,t){h[e]||(h[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=h[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function S(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const a=n[o],r=a.getAttribute("data-ln-field");t[r]!=null&&(a.textContent=t[r])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const a=i[o],r=a.getAttribute("data-ln-attr").split(",");for(let u=0;u<r.length;u++){const c=r[u].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),f=c[1].trim();t[f]!=null&&a.setAttribute(d,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const a=l[o],r=a.getAttribute("data-ln-show");r in t&&a.classList.toggle("hidden",!t[r])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const a=s[o],r=a.getAttribute("data-ln-class").split(",");for(let u=0;u<r.length;u++){const c=r[u].trim().split(":");if(c.length!==2)continue;const d=c[0].trim(),f=c[1].trim();f in t&&a.classList.toggle(d,!!t[f])}}return e}function X(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)S(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function _(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const s=n.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,a){return t[a]!==void 0?t[a]:""}))}const i=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],a=o.attributes;for(let r=0;r<a.length;r++){const u=a[r];u.value.indexOf("{{")!==-1&&o.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function Y(e,t,n,i,l,s){const o={};for(let r=0;r<e.children.length;r++){const u=e.children[r],c=u.getAttribute("data-ln-render-key");c&&(o[c]=u)}const a=document.createDocumentFragment();for(let r=0;r<t.length;r++){const u=t[r],c=String(i(u));let d=o[c];if(d)l(d,u,r);else{const f=z(n,s);if(!f||(_(f,u),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",c),l(d,u,r)}a.appendChild(d)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=_,window.lnCore.fill=S,window.lnCore.lnFill=X,window.lnCore.renderList=Y);function b(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function k(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function v(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function F(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const g=new Map;function D(e,t){const n=(e?e.join("|"):"")+"::"+t;if(g.has(n))return g.get(n);const i=new Set(e||[]),l=function(s,o){const a=s.getAttribute(o);return a!==null&&i.has(a)?a:t};return g.set(n,l),l}function L(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function O(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function Z(e,t,n,i,l){if(!e||t===null)return!0;const s=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const a=r=>{l?console.warn(r,l):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(a(`[${s}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(a(`[${s}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return a(`[${s}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ee(e,t,n){for(const i in n){const[l,s,o]=n[i];Object.defineProperty(e,i,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function te(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=D(i.values,i.fallback);break;case"integer":l=k;break;case"float":l=L;break;case"boolean":l=v;break;case"list":l=F;break;case"json":l=O;break;case"string":default:l=b;break}l||(l=b),t[i.prop]=[l,n,i.fallback]}return t}function ne(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=ee,window.lnCore.attrSpec=te,window.lnCore.attrStr=b,window.lnCore.attrInt=k,window.lnCore.attrBool=v,window.lnCore.attrList=F,window.lnCore.attrEnum=D,window.lnCore.attrFloat=L,window.lnCore.attrJson=O);function $(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 re(e,t,n,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(s)&&$(e,o),e.querySelectorAll){const a=e.querySelectorAll(s);for(let r=0;r<a.length;r++)$(a[r],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function I(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function oe(e){const t=I(),n=e.observed||[];for(let i=0;i<n.length;i++){const l=n[i];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const l=t.byDeclaredAttr.get(i);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=ne(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 E(e,t,n,i){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[n];o?o(t,n,i):s.onAttrChange&&(!s.declared||s.declared.has(n))&&s.onAttrChange(t,n,i)}}function ie(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=I(),l=i.byAttr.get(t),s=M()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&y(o)){const a=i.byDeclaredAttr.get(t),r=o.getAttribute(t);for(let u=0;u<a.length;u++)Z(a[u].spec,r,t,a[u].componentTag,o)}if(window.lnCore._debugSink&&(n||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),n){const a=i.byReactive.get(t);a&&E(a,o,t,e.oldValue),i.reactiveWildcard.length&&E(i.reactiveWildcard,o,t,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const r=l[a];if(r.handler){r.handler(o,t,e.oldValue);continue}r.onAttributeChange&&o[r.attribute]?r.onAttributeChange(o,t):(re(o,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(o))}}}function le(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ie(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 se(e,t){oe({observed:e,handler:t}),le()}function q(e){return(e||"").replace(/^#/,"")}function m(e){const t=e===void 0?location.hash:e,n={},i=q(t);if(!i)return n;const l=i.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const a=o.indexOf(":"),r=a>-1?o.slice(0,a):o,u=a>-1?o.slice(a+1):"";if(r)try{n[r]=decodeURIComponent(u)}catch{n[r]=u}}return n}function ae(e){if(!e)return null;const t=m();return e in t?t[e]:null}function ue(e,t){if(!e)return;const n=m();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(s){const o=n[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");q(location.hash)!==l&&(location.hash=l)}function ce(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 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 fe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function we(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function pe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function he(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),i=e.slice(t+1),l=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=m,window.lnCore.hashGet=ae,window.lnCore.hashSet=ue,window.lnCore.hashLinkClick=ce,window.lnCore.resolveHashNamespace=de,window.lnCore.hashSortEncode=fe,window.lnCore.hashSortDecode=we,window.lnCore.hashFilterEncode=pe,window.lnCore.hashFilterDecode=he);function be(e){return(e||"").replace(/^\?/,"")}function ge(e){const t=e===void 0?typeof window<"u"?window.location.search:"":e,n={},i=be(t);if(!i)return n;const l=new URLSearchParams(i);for(const[s,o]of l.entries())n[s]=o;return n}function me(e){if(!e||typeof window>"u")return null;const t=new URLSearchParams(window.location.search);return t.has(e)?t.get(e):null}function Ce(e,t){if(!e||typeof window>"u")return;const n=new URL(window.location.href);if(t==null||t===""?n.searchParams.delete(e):n.searchParams.set(e,String(t)),n.search===window.location.search)return;const i=n.pathname+n.search+n.hash;window.history.replaceState(window.history.state,"",i)}function ye(e,t){if(!e||!e.hasAttribute("data-ln-query"))return null;const n=e.getAttribute("data-ln-query");if(n&&n.trim()!=="")return n.trim();const 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 Ae(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function xe(e,t){if(e&&typeof e=="string"){if(e.endsWith(".asc"))return{fieldOrColumn:e.slice(0,-4),direction:"asc"};if(e.endsWith(".desc"))return{fieldOrColumn:e.slice(0,-5),direction:"desc"}}if(t&&typeof t=="object"){const n=t.sort_field||t.sort_by;if(n){const i=t.sort_dir&&String(t.sort_dir).toLowerCase()==="desc"?"desc":"asc";return{fieldOrColumn:n,direction:i}}}return null}function Se(e){return!Array.isArray(e)||e.length===0?null:e.map(encodeURIComponent).join(",")}function _e(e){return!e||typeof e!="string"?[]:e.split(",").map(function(t){try{return decodeURIComponent(t.trim())}catch{return t.trim()}}).filter(Boolean)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.queryParse=ge,window.lnCore.queryGet=me,window.lnCore.querySet=Ce,window.lnCore.resolveQueryParam=ye,window.lnCore.querySortEncode=Ae,window.lnCore.querySortDecode=xe,window.lnCore.queryFilterEncode=Se,window.lnCore.queryFilterDecode=_e);function ke(){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=ke),(function(){if(window.lnCore&&window.lnCore._persistBound)return;window.lnCore=window.lnCore||{},window.lnCore._persistBound=!0;function e(){return location.pathname.replace(/\/+$/,"").toLowerCase()||"/"}function t(o,a){const r=o.getAttribute("data-ln-persist"),u=r!==null&&r!==""?r:o.id;return u?o.getAttribute("data-ln-persist-scope")==="page"?"ln:"+u+":"+e()+":"+a:"ln:"+u+":"+a:(console.warn('[ln-persist] Element requires id or data-ln-persist="key"',o),null)}let n=null;function i(){if(n!==null)return n;try{if(typeof localStorage>"u")return n=!1;const o="__ln_persist_test__";return localStorage.setItem(o,o),localStorage.removeItem(o),n=!0}catch{return n=!1}}const l=new Set;function s(o,a){const r=window.lnCore&&window.lnCore._attrRegistry,u=r&&r.persist||[];let c=null;for(let w=0;w<u.length;w++)if(u[w].selector===a){c=u[w];break}if(!c)return;const d=c.persist;if(l.has(d.attr)||(l.add(d.attr),se([d.attr],function(w,N){if(!w.hasAttribute("data-ln-persist")||d.hashActive&&d.hashActive(w))return;const C=t(w,N);if(!C||!i())return;const B=w.getAttribute(N);try{B===null?localStorage.removeItem(C):localStorage.setItem(C,B)}catch{}})),d.hashActive&&d.hashActive(o))return;const f=t(o,d.attr);if(!f||!i())return;const R=localStorage.getItem(f);R!==null&&o.setAttribute(d.attr,R)}W(s)})()})();