@livenetworks/ashlar 2.0.8 → 2.0.10

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