@livenetworks/ashlar 2.1.0 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/ln-api-connector.js +1 -1
  4. package/components/ln-api-queue/ln-api-queue.js +1 -1
  5. package/components/ln-autoresize/ln-autoresize.js +1 -1
  6. package/components/ln-autoresize/src/ln-autoresize.js +3 -1
  7. package/components/ln-autosave/ln-autosave.js +1 -1
  8. package/components/ln-chart/ln-chart.js +1 -1
  9. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  10. package/components/ln-confirm/ln-confirm.js +1 -1
  11. package/components/ln-core/lifecycle.js +33 -12
  12. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  13. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  14. package/components/ln-data-store/ln-data-store.js +1 -1
  15. package/components/ln-date/ln-date.js +1 -1
  16. package/components/ln-date/src/ln-date.js +22 -13
  17. package/components/ln-debug/ln-debug.js +1 -1
  18. package/components/ln-dropdown/ln-dropdown.js +1 -1
  19. package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
  20. package/components/ln-dropdown/src/ln-dropdown.js +18 -5
  21. package/components/ln-editor/ln-editor.js +1 -1
  22. package/components/ln-editor/src/ln-editor.js +45 -12
  23. package/components/ln-external-links/ln-external-links.js +1 -1
  24. package/components/ln-filter/ln-filter.js +1 -1
  25. package/components/ln-filter/ln-filter.schema.json +1 -1
  26. package/components/ln-filter/src/ln-filter.js +11 -10
  27. package/components/ln-form/ln-form.js +1 -1
  28. package/components/ln-form/src/ln-form.js +11 -0
  29. package/components/ln-icon/ln-icon.js +1 -1
  30. package/components/ln-include/ln-include.js +1 -1
  31. package/components/ln-key/ln-key.js +1 -1
  32. package/components/ln-link/ln-link.js +1 -1
  33. package/components/ln-list/ln-list.js +1 -1
  34. package/components/ln-list/src/ln-list.js +14 -5
  35. package/components/ln-modal/ln-modal.js +1 -1
  36. package/components/ln-nav/ln-nav.js +1 -1
  37. package/components/ln-number/ln-number.js +1 -1
  38. package/components/ln-number/src/ln-number.js +22 -12
  39. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  40. package/components/ln-options/ln-options.js +1 -1
  41. package/components/ln-picklist/ln-picklist.js +1 -1
  42. package/components/ln-popover/ln-popover.js +1 -1
  43. package/components/ln-popover/ln-popover.schema.json +82 -82
  44. package/components/ln-popover/src/ln-popover.js +22 -5
  45. package/components/ln-progress/ln-progress.js +1 -1
  46. package/components/ln-router/ln-router.js +1 -1
  47. package/components/ln-scroll/ln-scroll.js +1 -1
  48. package/components/ln-search/ln-search.js +1 -1
  49. package/components/ln-search/ln-search.schema.json +103 -103
  50. package/components/ln-search/src/ln-search.js +9 -5
  51. package/components/ln-slug/ln-slug.js +1 -1
  52. package/components/ln-sort/ln-sort.js +1 -1
  53. package/components/ln-sortable/ln-sortable.js +1 -1
  54. package/components/ln-sortable/src/ln-sortable.js +52 -7
  55. package/components/ln-stat/ln-stat.js +1 -1
  56. package/components/ln-table/ln-table.js +1 -1
  57. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  58. package/components/ln-tabs/ln-tabs.js +1 -1
  59. package/components/ln-tabs/src/ln-tabs.js +12 -8
  60. package/components/ln-time/ln-time.js +1 -1
  61. package/components/ln-time/src/ln-time.js +17 -7
  62. package/components/ln-toast/ln-toast.js +1 -1
  63. package/components/ln-toggle/ln-toggle.js +1 -1
  64. package/components/ln-tooltip/ln-tooltip.js +1 -1
  65. package/components/ln-translations/ln-translations.js +1 -1
  66. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  67. package/components/ln-upload/ln-upload.js +1 -1
  68. package/components/ln-validate/ln-validate.js +1 -1
  69. package/components/ln-validate/src/ln-validate.js +21 -7
  70. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  71. package/package.json +1 -1
  72. package/web-types.json +1 -1
@@ -1 +1 @@
1
- (function(){"use strict";function D(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function C(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!C(n))return}e.apply(console,t)}}function I(e,t,o){const n=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function P(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function X(e,t){const o=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const r=s[c];r.name&&r.type==="checkbox"&&!r.disabled&&(i[r.name]=(i[r.name]||0)+1)}for(let c=0;c<s.length;c++){const r=s[c];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(n&&r.matches&&r.matches(n)))if(r.type==="checkbox")o&&i[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&l[r.name].push(r.options[a].value)}else if(o&&r.type==="hidden")l[r.name]=r.value;else if(o&&(r.type==="number"||r.type==="range")){const a=Number(r.value);l[r.name]=r.value===""||isNaN(a)?null:a}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 o=e.elements,n=[],l={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const r=t[c];if(i.type==="checkbox"){if(Array.isArray(r))i.checked=r.indexOf(i.value)!==-1;else if(l[i.name]>1){const a=String(r).split(",").map(function(d){return d.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=Y(r);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(r),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<i.options.length;a++)i.options[a].selected=r.indexOf(i.options[a].value)!==-1;n.push(i)}else i.value=r,i.tagName==="SELECT"&&r!=null&&i.setAttribute("data-ln-value",r),n.push(i)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Z,window.lnCore.serializeForm=X,window.lnCore.resolveFormMethod=P);const q={};function ee(e,t){q[e]=t}function te(e){return q[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,p(function(){new MutationObserver(function(){I(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const T={};function oe(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];T[o]=t}function re(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=oe,window.lnCore.getLocaleFallback=re,window.lnCore.ensureLocaleObserver=ne);const m={};function ie(e,t){m[e]||(m[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=m[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function F(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],r=c.getAttribute("data-ln-field");t[r]!=null&&(c.textContent=t[r])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const c=n[i],r=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const d=r[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],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 a=0;a<r.length;a++){const d=r[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(u,!!t[f])}}return e}function 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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<o.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[n],t??null),o[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)F(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function $(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const n=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],c=i.attributes;for(let r=0;r<c.length;r++){const a=c[r];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function se(e,t,o,n,l,s){const i={};for(let r=0;r<e.children.length;r++){const a=e.children[r],d=a.getAttribute("data-ln-render-key");d&&(i[d]=a)}const c=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],d=String(n(a));let u=i[d];if(u)l(u,a,r);else{const f=ie(o,s);if(!f||($(f,a),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),l(u,a,r)}c.appendChild(u)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=$,window.lnCore.fill=F,window.lnCore.lnFill=le,window.lnCore.renderList=se);function y(e,t,o){const n=e.getAttribute(t);return n===null?o:n}function N(e,t,o){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?o:n}function M(e,t,o=!1){const n=e.getAttribute(t);if(n===null)return!!o;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function R(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const A=new Map;function B(e,t){const o=(e?e.join("|"):"")+"::"+t;if(A.has(o))return A.get(o);const n=new Set(e||[]),l=function(s,i){const c=s.getAttribute(i);return c!==null&&n.has(c)?c:t};return A.set(o,l),l}function j(e,t,o){const n=parseFloat(e.getAttribute(t));return isNaN(n)?o:n}function W(e,t,o){const n=e.getAttribute(t);if(!n)return o;try{return JSON.parse(n)}catch{return o}}function U(e,t,o,n,l){if(!e||t===null)return!0;const s=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=r=>{l?console.warn(r,l):console.warn(r)};if(i==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const r=e.values||[];return r.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(c(`[${s}] Value ${r} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(c(`[${s}] Value ${r} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(r){return c(`[${s}] Invalid JSON for attribute "${o}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ce(e,t,o){for(const n in o){const[l,s,i]=o[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function ae(e){const t={};for(const o in e){const n=e[o];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=B(n.values,n.fallback);break;case"integer":l=N;break;case"float":l=j;break;case"boolean":l=M;break;case"list":l=R;break;case"json":l=W;break;case"string":default:l=y;break}l||(l=y),t[n.prop]=[l,o,n.fallback]}return t}function ue(e){const t={};for(const o in e){const n=e[o];n&&n.effect&&(t[o]=n.effect)}return Object.keys(t).length?t:null}function de(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ce,window.lnCore.attrSpec=ae,window.lnCore.attrStr=y,window.lnCore.attrInt=N,window.lnCore.attrBool=M,window.lnCore.attrList=R,window.lnCore.attrEnum=B,window.lnCore.attrFloat=j,window.lnCore.attrJson=W);function h(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function V(e,t,o,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:n};if(e.matches&&e.matches(s)&&h(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let r=0;r<c.length;r++)h(c[r],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function fe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function we(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function 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 he(e){const t=H(),o=e.observed||[];for(let n=0;n<o.length;n++){const l=o[n];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=de(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function Q(e,t,o,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,n):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,n)}}function be(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,n=H(),l=n.byAttr.get(t),s=D()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!o&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&C(i)){const c=n.byDeclaredAttr.get(t),r=i.getAttribute(t);for(let a=0;a<c.length;a++)U(c[a].spec,r,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(o||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=n.byReactive.get(t);c&&Q(c,i,t,e.oldValue),n.reactiveWildcard.length&&Q(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const r=l[c];if(r.handler){r.handler(i,t,e.oldValue);continue}r.onAttributeChange&&i[r.attribute]?r.onAttributeChange(i,t):(V(i,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(i))}}}function pe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{be(t[o])}catch(n){console.error("[ln-core] mutation handler failed",t[o].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function x(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function v(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ge(e){const t=x();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&h(n,i);else if(n.matches&&n.matches(i.query)&&h(n,i),n.querySelectorAll){const c=n.querySelectorAll(i.query);for(let r=0;r<c.length;r++)h(c[r],i)}}i.onInit&&i.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],c=i.query;if(c){if(!l)n.matches&&n.matches(c)&&v(n,i);else if(n.matches&&n.matches(c)&&v(n,i),n.querySelectorAll){const r=n.querySelectorAll(c);for(let a=0;a<r.length;a++)v(r[a],i)}}}}}}}function J(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const n=t[o];if(n.type==="childList")try{ge(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ce(e){x().push(e),J()}function K(e,t,o,n,l={}){const s=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,r=l.onInit||null,a=l.onAttrChange||null,d=l.effects||null,u=l.attributes||null,f=u?ue(u):d,Le=u?new Set(Object.keys(u)):null,Ee=l.persist||null;function g(S){const w=S||document.body;if(V(w,e,t,o),u&&D())for(const b in u){const qe=u[b],O=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&O.push(w);for(let L=0;L<O.length;L++){const E=O[L];C(E)&&U(qe,E.getAttribute(b),b,n,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);he({selector:e,attribute:t,componentTag:n,attributes:u,ComponentFn:o,onInit:r,observed:k.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:Le,persist:Ee}),pe();const De=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ie=l.subtreeQuery||(De?e:"["+e+"]");x().push({selector:e,attribute:t,ComponentFn:o,onInit:r,onSubtreeChange:c,query:Ie}),J(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=K,window.lnCore.observeLifecycle=Ce);function G(){fe()>0?we(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",G):G(),g}function z(e){return(e||"").replace(/^#/,"")}function _(e){const t=e===void 0?location.hash:e,o={},n=z(t);if(!n)return o;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const c=i.indexOf(":"),r=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(r)try{o[r]=decodeURIComponent(a)}catch{o[r]=a}}return o}function me(e){if(!e)return null;const t=_();return e in t?t[e]:null}function ye(e,t){if(!e)return;const o=_();t==null?delete o[e]:o[e]=String(t);const l=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");z(location.hash)!==l&&(location.hash=l)}function Ae(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function xe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function ve(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function _e(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Se(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=_,window.lnCore.hashGet=me,window.lnCore.hashSet=ye,window.lnCore.hashLinkClick=Ae,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=ve,window.lnCore.hashSortDecode=_e,window.lnCore.hashFilterEncode=ke,window.lnCore.hashFilterDecode=Se);function Oe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Oe),(function(){const e="data-ln-accordion",t="lnAccordion";if(window[t]!==void 0)return;const o={"data-ln-accordion":{type:"marker",description:"Identifies container as an accordion that coordinates single-panel expansion"}};function n(l){return this.dom=l,this._onToggleOpen=function(s){if(!s.detail||!s.detail.target||s.detail.target.closest("[data-ln-accordion]")!==l)return;const i=l.querySelectorAll("[data-ln-toggle]");for(const c of i)c!==s.detail.target&&c.closest("[data-ln-accordion]")===l&&c.getAttribute("data-ln-toggle")==="open"&&c.setAttribute("data-ln-toggle","close");I(l,"ln-accordion:change",{target:s.detail.target})},l.addEventListener("ln-toggle:open",this._onToggleOpen),this}n.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-toggle:open",this._onToggleOpen),delete this.dom[t])},K(e,t,n,"ln-accordion",{attributes:o})})()})();
1
+ (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function C(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let l=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){l=t[r];break}if(!C(l))return}e.apply(console,t)}}function T(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,r={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&i[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&r[n.name].push(n.options[a].value)}else if(o&&n.type==="hidden")r[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const a=Number(n.value);r[n.name]=n.value===""||isNaN(a)?null:a}else r[n.name]=n.value}return r}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const o=e.elements,l=[],r={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(r[i.name]=(r[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(r[i.name]>1){const a=String(n).split(",").map(function(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=te(n);l.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),l.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<i.options.length;a++)i.options[a].selected=n.indexOf(i.options[a].value)!==-1;l.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),l.push(i)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const q={};function oe(e,t){q[e]=t}function re(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=re);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){T(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const F={};function le(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];F[o]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return F[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=ie);const y={};function ce(e,t){y[e]||(y[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=y[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const r=e.querySelectorAll("[data-ln-show]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function 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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<o.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[l],t??null),o[l].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function N(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const l=function(s,i){return t[i]!==void 0?t[i]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const i=r[s],c=i.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function ue(e,t,o,l,r,s){const i={};for(let n=0;n<e.children.length;n++){const a=e.children[n],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],u=String(l(a));let d=i[u];if(d)r(d,a,n);else{const f=ce(o,s);if(!f||(N(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),r(d,a,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=$,window.lnCore.lnFill=ae,window.lnCore.renderList=ue);function m(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function R(e,t,o){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?o:l}function M(e,t,o=!1){const l=e.getAttribute(t);if(l===null)return!!o;const r=l.trim().toLowerCase();return!(r==="false"||r==="0")}function B(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const A=new Map;function j(e,t){const o=(e?e.join("|"):"")+"::"+t;if(A.has(o))return A.get(o);const l=new Set(e||[]),r=function(s,i){const c=s.getAttribute(i);return c!==null&&l.has(c)?c:t};return A.set(o,r),r}function W(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function U(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function V(e,t,o,l,r){if(!e||t===null)return!0;const s=l||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{r?console.warn(n,r):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function de(e,t,o){for(const l in o){const[r,s,i]=o[l];Object.defineProperty(e,l,{get:function(){return r(t,s,i)},enumerable:!0,configurable:!0})}return e}function fe(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let r=l.read;if(!r&&l.type)switch(l.type){case"enum":r=j(l.values,l.fallback);break;case"integer":r=R;break;case"float":r=W;break;case"boolean":r=M;break;case"list":r=B;break;case"json":r=U;break;case"string":default:r=m;break}r||(r=m),t[l.prop]=[r,o,l.fallback]}return t}function we(e){const t={};for(const o in e){const l=e[o];l&&l.effect&&(t[o]=l.effect)}return Object.keys(t).length?t:null}function he(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=de,window.lnCore.attrSpec=fe,window.lnCore.attrStr=m,window.lnCore.attrInt=R,window.lnCore.attrBool=M,window.lnCore.attrList=B,window.lnCore.attrEnum=j,window.lnCore.attrFloat=W,window.lnCore.attrJson=U);function h(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function H(e,t,o,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:l};if(e.matches&&e.matches(s)&&h(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)h(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function pe(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function 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 ge(e){const t=Q(),o=e.observed||[];for(let l=0;l<o.length;l++){const r=o[l];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const r=t.byDeclaredAttr.get(l);r.some(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=he(e);if(l===null)t.reactiveWildcard.push(e);else for(const r of l)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function J(e,t,o,l){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,l):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,l)}}function Ce(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,l=Q(),r=l.byAttr.get(t),s=I()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!o&&!r&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&C(i)){const c=l.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let a=0;a<c.length;a++)V(c[a].spec,n,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(o||r)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=l.byReactive.get(t);c&&J(c,i,t,e.oldValue),l.reactiveWildcard.length&&J(l.reactiveWildcard,i,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const n=r[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(H(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function ye(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{Ce(t[o])}catch(l){console.error("[ln-core] mutation handler failed",t[o].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function x(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function v(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function _(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function me(e){const t=x();if(!t.length)return;const o=e.target;if(o){const r=o.nodeType===1?o:o.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=v();if(e.target&&l.length)for(let r=0;r<l.length;r++){const s=l[r],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const s=e.addedNodes[r];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&h(s,n);else if(s.matches&&s.matches(n.query)&&h(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let u=0;u<a.length;u++)h(a[u],n)}}n.onInit&&n.onInit(s)}}}for(let r=0;r<e.removedNodes.length;r++){const s=e.removedNodes[r];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!i)s.matches&&s.matches(a)&&_(s,n);else if(s.matches&&s.matches(a)&&_(s,n),s.querySelectorAll){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)_(u[d],n)}}}}}}function K(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{me(l)}catch(r){console.error("[ln-core] lifecycle handler failed",l.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){x().push(e),e.onSubtreeChange&&e.query&&v().push(e),K()}function z(e,t,o,l,r={}){const s=r.extraAttributes||[],i=r.onAttributeChange||null,c=r.onSubtreeChange||null,n=r.onInit||null,a=r.onAttrChange||null,u=r.effects||null,d=r.attributes||null,f=d?we(d):u,Ie=d?new Set(Object.keys(d)):null,Te=r.persist||null;function g(O){const w=O||document.body;if(H(w,e,t,o),d&&I())for(const b in d){const Fe=d[b],E=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&E.push(w);for(let L=0;L<E.length;L++){const D=E[L];C(D)&&V(Fe,D.getAttribute(b),b,l,D)}}n&&n(w)}const S=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)S.push(w[1])}else S.push(e);ge({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:o,onInit:n,observed:S.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:Ie,persist:Te}),ye();const qe=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,P=r.subtreeQuery||(qe?e:"["+e+"]"),X={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:P};x().push(X),c&&P&&v().push(X),K(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=Ae);function Y(){be()>0?pe(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Y):Y(),g}function G(e){return(e||"").replace(/^#/,"")}function k(e){const t=e===void 0?location.hash:e,o={},l=G(t);if(!l)return o;const r=l.split("&");for(let s=0;s<r.length;s++){const i=r[s];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(a)}catch{o[n]=a}}return o}function xe(e){if(!e)return null;const t=k();return e in t?t[e]:null}function ve(e,t){if(!e)return;const o=k();t==null?delete o[e]:o[e]=String(t);const r=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");G(location.hash)!==r&&(location.hash=r)}function _e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ke(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Oe(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 Ee(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Le(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),r=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=k,window.lnCore.hashGet=xe,window.lnCore.hashSet=ve,window.lnCore.hashLinkClick=_e,window.lnCore.resolveHashNamespace=ke,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Oe,window.lnCore.hashFilterEncode=Ee,window.lnCore.hashFilterDecode=Le);function De(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=De),(function(){const e="data-ln-accordion",t="lnAccordion";if(window[t]!==void 0)return;const o={"data-ln-accordion":{type:"marker",description:"Identifies container as an accordion that coordinates single-panel expansion"}};function l(r){return this.dom=r,this._onToggleOpen=function(s){if(!s.detail||!s.detail.target||s.detail.target.closest("[data-ln-accordion]")!==r)return;const i=r.querySelectorAll("[data-ln-toggle]");for(const c of i)c!==s.detail.target&&c.closest("[data-ln-accordion]")===r&&c.getAttribute("data-ln-toggle")==="open"&&c.setAttribute("data-ln-toggle","close");T(r,"ln-accordion:change",{target:s.detail.target})},r.addEventListener("ln-toggle:open",this._onToggleOpen),this}l.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-toggle:open",this._onToggleOpen),delete this.dom[t])},z(e,t,l,"ln-accordion",{attributes:o})})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function ee(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function M(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!M(n))return}e.apply(console,t)}}function y(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function te(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});return e.dispatchEvent(l),l}function S(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){S(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e,t){if(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||e.button!==0||!t)return!1;const r=t.getAttribute("href");return!(!r||t.getAttribute("target")==="_blank"||t.hasAttribute("download")||r.startsWith("mailto:")||r.startsWith("tel:")||r==="#"||r.startsWith("#")||t.hostname&&t.hostname!==window.location.hostname)}function re(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const r=!!(t&&t.typed),n=t&&t.exclude,l={},s=e.elements,i={};if(r)for(let a=0;a<s.length;a++){const o=s[a];o.name&&o.type==="checkbox"&&!o.disabled&&(i[o.name]=(i[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")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")r&&i[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let u=0;u<o.options.length;u++)o.options[u].selected&&l[o.name].push(o.options[u].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const u=Number(o.value);l[o.name]=o.value===""||isNaN(u)?null:u}else l[o.name]=o.value}return l}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const r=e.elements,n=[],l={};for(let s=0;s<r.length;s++){const i=r[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<r.length;s++){const i=r[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const o=t[a];if(i.type==="checkbox"){if(Array.isArray(o))i.checked=o.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(o).split(",").map(function(p){return p.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=ie(o);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(o),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(o))for(let u=0;u<i.options.length;u++)i.options[u].selected=o.indexOf(i.options[u].value)!==-1;n.push(i)}else i.value=o,i.tagName==="SELECT"&&o!=null&&i.setAttribute("data-ln-value",o),n.push(i)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=re);const W={};function se(e,t){W[e]=t}function ae(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=se,window.lnCore.getDataMapper=ae);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,S(function(){new MutationObserver(function(){y(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const B={};function ue(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];B[r]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return B[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ue,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ce);const D={};function de(e,t){D[e]||(D[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=D[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const a=r[i],o=a.getAttribute("data-ln-field");t[o]!=null&&(a.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const a=n[i],o=a.getAttribute("data-ln-attr").split(",");for(let u=0;u<o.length;u++){const p=o[u].trim().split(":");if(p.length!==2)continue;const b=p[0].trim(),c=p[1].trim();t[c]!=null&&a.setAttribute(b,t[c])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const a=l[i],o=a.getAttribute("data-ln-show");o in t&&a.classList.toggle("hidden",!t[o])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const a=s[i],o=a.getAttribute("data-ln-class").split(",");for(let u=0;u<o.length;u++){const p=o[u].trim().split(":");if(p.length!==2)continue;const b=p[0].trim(),c=p[1].trim();c in t&&a.classList.toggle(b,!!t[c])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<r.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[n],t??null),r[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function U(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const n=function(s,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const i=l[s],a=i.attributes;for(let o=0;o<a.length;o++){const u=a[o];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function he(e,t,r,n,l,s){const i={};for(let o=0;o<e.children.length;o++){const u=e.children[o],p=u.getAttribute("data-ln-render-key");p&&(i[p]=u)}const a=document.createDocumentFragment();for(let o=0;o<t.length;o++){const u=t[o],p=String(n(u));let b=i[p];if(b)l(b,u,o);else{const c=de(r,s);if(!c||(U(c,u),b=c.firstElementChild,!b))continue;b.setAttribute("data-ln-render-key",p),l(b,u,o)}a.appendChild(b)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=R,window.lnCore.lnFill=we,window.lnCore.renderList=he);function q(e,t,r){const n=e.getAttribute(t);return n===null?r:n}function V(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function K(e,t,r=!1){const n=e.getAttribute(t);if(n===null)return!!r;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const F=new Map;function H(e,t){const r=(e?e.join("|"):"")+"::"+t;if(F.has(r))return F.get(r);const n=new Set(e||[]),l=function(s,i){const a=s.getAttribute(i);return a!==null&&n.has(a)?a:t};return F.set(r,l),l}function J(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function P(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function pe(e,t,r,n,l){if(!e||t===null)return!0;const s=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=o=>{l?console.warn(o,l):console.warn(o)};if(i==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const o=e.values||[];return o.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(a(`[${s}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(a(`[${s}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(o){return a(`[${s}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function be(e,t,r){for(const n in r){const[l,s,i]=r[n];Object.defineProperty(e,n,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function ge(e){const t={};for(const r in e){const n=e[r];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=H(n.values,n.fallback);break;case"integer":l=V;break;case"float":l=J;break;case"boolean":l=K;break;case"list":l=G;break;case"json":l=P;break;case"string":default:l=q;break}l||(l=q),t[n.prop]=[l,r,n.fallback]}return t}function me(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=be,window.lnCore.attrSpec=ge,window.lnCore.attrStr=q,window.lnCore.attrInt=V,window.lnCore.attrBool=K,window.lnCore.attrList=G,window.lnCore.attrEnum=H,window.lnCore.attrFloat=J,window.lnCore.attrJson=P);function _(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function ye(e,t,r,n){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(s)&&_(e,i),e.querySelectorAll){const a=e.querySelectorAll(s);for(let o=0;o<a.length;o++)_(a[o],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ce(e){const t=X(),r=e.observed||[];for(let n=0;n<r.length;n++){const l=r[n];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=me(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function z(e,t,r,n){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[r];i?i(t,r,n):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,n)}}function Ae(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=X(),l=n.byAttr.get(t),s=ee()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&M(i)){const a=n.byDeclaredAttr.get(t),o=i.getAttribute(t);for(let u=0;u<a.length;u++)pe(a[u].spec,o,t,a[u].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const a=n.byReactive.get(t);a&&z(a,i,t,e.oldValue),n.reactiveWildcard.length&&z(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const o=l[a];if(o.handler){o.handler(i,t,e.oldValue);continue}o.onAttributeChange&&i[o.attribute]?o.onAttributeChange(i,t):(ye(i,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(i))}}}function xe(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,S(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ae(t[r])}catch(n){console.error("[ln-core] mutation handler failed",t[r].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function Q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function I(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ke(e){const t=Q();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const n=t[r];if(n.onSubtreeChange&&n.query){const l=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;s&&n.onSubtreeChange(s,e)}}for(let r=0;r<e.addedNodes.length;r++){const n=e.addedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&_(n,i);else if(n.matches&&n.matches(i.query)&&_(n,i),n.querySelectorAll){const a=n.querySelectorAll(i.query);for(let o=0;o<a.length;o++)_(a[o],i)}}i.onInit&&i.onInit(n)}}}for(let r=0;r<e.removedNodes.length;r++){const n=e.removedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const i=t[s],a=i.query;if(a){if(!l)n.matches&&n.matches(a)&&I(n,i);else if(n.matches&&n.matches(a)&&I(n,i),n.querySelectorAll){const o=n.querySelectorAll(a);for(let u=0;u<o.length;u++)I(o[u],i)}}}}}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,S(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.type==="childList")try{ke(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Se(e,t){Ce({observed:e,handler:t}),xe()}function _e(e){Q().push(e),ve()}function Y(e){return(e||"").replace(/^#/,"")}function N(e){const t=e===void 0?location.hash:e,r={},n=Y(t);if(!n)return r;const l=n.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const a=i.indexOf(":"),o=a>-1?i.slice(0,a):i,u=a>-1?i.slice(a+1):"";if(o)try{r[o]=decodeURIComponent(u)}catch{r[o]=u}}return r}function Ee(e){if(!e)return null;const t=N();return e in t?t[e]:null}function Le(e,t){if(!e)return;const r=N();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const i=r[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");Y(location.hash)!==l&&(location.hash=l)}function Te(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function je(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function qe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),n=e.slice(t+1),l=n?n.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=N,window.lnCore.hashGet=Ee,window.lnCore.hashSet=Le,window.lnCore.hashLinkClick=Te,window.lnCore.resolveHashNamespace=je,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=qe,window.lnCore.hashFilterDecode=Fe);function Ie(){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=Ie),(function(){const e="data-ln-ajax",t="lnAjax",r="data-ln-data-coordinator-scope";if(window[t]!==void 0)return;let n=null;function l(c){if(!c.hasAttribute(e)||c[t])return;c[t]=!0;const f=u(c);s(f.links),i(f.forms)}function s(c){for(const f of c){if(f[t+"Trigger"]||f.hostname&&f.hostname!==window.location.hostname)continue;const d=f.getAttribute("href");if(d&&d.includes("#"))continue;const w=function(A){if(!ne(A,f))return;A.preventDefault();const E=f.getAttribute("href");E&&o("GET",E,null,f)};f.addEventListener("click",w),f[t+"Trigger"]=w}}function i(c){for(const f of c){if(f[t+"Trigger"])continue;if(f.hasAttribute(r)){f[t+"ScopeWarned"]||(f[t+"ScopeWarned"]=!0,console.warn("[ln-ajax] Form has data-ln-data-coordinator-scope — the ln-data-coordinator write pipeline takes precedence; skipping ajax interception for this form."));continue}const d=function(w){if(w.defaultPrevented)return;w.preventDefault();const A=f.method.toUpperCase(),E=f.action,T=new FormData(f);for(const x of f.querySelectorAll('button, input[type="submit"]'))x.disabled=!0;o(A,E,T,f,function(){for(const x of f.querySelectorAll('button, input[type="submit"]'))x.disabled=!1})};f.addEventListener("submit",d),f[t+"Trigger"]=d}}function a(c){if(!c[t])return;const f=u(c);for(const d of f.links)d[t+"Trigger"]&&(d.removeEventListener("click",d[t+"Trigger"]),delete d[t+"Trigger"]);for(const d of f.forms)d[t+"Trigger"]&&(d.removeEventListener("submit",d[t+"Trigger"]),delete d[t+"Trigger"]);delete c[t]}function o(c,f,d,w,A){if(te(w,"ln-ajax:before-start",{method:c,url:f}).defaultPrevented)return;c==="GET"&&n&&n(),y(w,"ln-ajax:start",{method:c,url:f}),w.classList.add("ln-ajax--loading");const T=document.createElement("span");T.className="ln-ajax-spinner",w.appendChild(T);function x(){w.classList.remove("ln-ajax--loading");const h=w.querySelector(".ln-ajax-spinner");h&&h.remove(),A&&A()}let m=f;const Z=document.querySelector('meta[name="csrf-token"]'),j=Z?Z.getAttribute("content"):null;d instanceof FormData&&j&&d.append("_token",j);const O={method:c,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}};if(j&&(O.headers["X-CSRF-TOKEN"]=j),c==="GET"&&d){const h=new URLSearchParams(d);m=f+(f.includes("?")?"&":"?")+h.toString()}else c!=="GET"&&d&&(O.body=d);let k=null;if(c==="GET"){const h=new AbortController;O.signal=h.signal,k=function(){n=null,h.abort(),x(),y(w,"ln-ajax:aborted",{method:c,url:m})},n=k}fetch(m,O).then(function(h){const $=h.ok,g=h.status;return h.text().then(function(v){let C=null,L=null;if(v&&v.trim())try{C=JSON.parse(v)}catch(Ne){L=Ne}return{ok:$,status:g,data:C,parseError:L}})}).then(function(h){k&&n===k&&(n=null);const $=h.status,g=h.data,v=h.parseError;if(h.ok&&!v){if(g&&g.title&&(document.title=g.title),g&&g.content)for(const C in g.content){const L=document.getElementById(C);L&&(L.innerHTML=g.content[C])}if(w.tagName==="A"){const C=w.getAttribute("href");C&&window.history.pushState({ajax:!0},"",C)}else w.tagName==="FORM"&&w.method.toUpperCase()==="GET"&&window.history.pushState({ajax:!0},"",m);y(w,"ln-ajax:success",{method:c,url:m,data:g})}else y(w,"ln-ajax:error",{method:c,url:m,status:$,data:g,error:v||null});x(),y(w,"ln-ajax:complete",{method:c,url:m})}).catch(function(h){h&&h.name==="AbortError"||(k&&n===k&&(n=null),y(w,"ln-ajax:error",{method:c,url:m,status:0,data:null,error:h}),x(),y(w,"ln-ajax:complete",{method:c,url:m}))})}function u(c){const f={links:[],forms:[]};return c.tagName==="A"&&c.getAttribute(e)!=="false"?f.links.push(c):c.tagName==="FORM"&&c.getAttribute(e)!=="false"?f.forms.push(c):(f.links=Array.from(c.querySelectorAll('a:not([data-ln-ajax="false"])')),f.forms=Array.from(c.querySelectorAll('form:not([data-ln-ajax="false"])'))),f}function p(){S(function(){_e({onInit:function(c){if(l(c),!c.hasAttribute(e)){for(const d of c.querySelectorAll("["+e+"]"))l(d);const f=c.closest&&c.closest("["+e+"]");if(f&&f.getAttribute(e)!=="false"){const d=u(c);s(d.links),i(d.forms)}}}}),Se([e],function(c){l(c)})},"ln-ajax")}function b(){for(const c of document.querySelectorAll("["+e+"]"))l(c)}window[t]=l,window[t].destroy=a,p(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",b):b()})()})();
1
+ (function(){"use strict";function te(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function M(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!M(o))return}e.apply(console,t)}}function y(e,t,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function ne(e,t,r){const o=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const l=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(l),l}function S(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){S(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function re(e,t){if(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||e.button!==0||!t)return!1;const r=t.getAttribute("href");return!(!r||t.getAttribute("target")==="_blank"||t.hasAttribute("download")||r.startsWith("mailto:")||r.startsWith("tel:")||r==="#"||r.startsWith("#")||t.hostname&&t.hostname!==window.location.hostname)}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ie(e,t){const r=!!(t&&t.typed),o=t&&t.exclude,l={},s=e.elements,i={};if(r)for(let a=0;a<s.length;a++){const n=s[a];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let a=0;a<s.length;a++){const n=s[a];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(o&&n.matches&&n.matches(o)))if(n.type==="checkbox")r&&i[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&l[n.name].push(n.options[u].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const u=Number(n.value);l[n.name]=n.value===""||isNaN(u)?null:u}else l[n.name]=n.value}return l}function le(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function se(e,t){const r=e.elements,o=[],l={};for(let s=0;s<r.length;s++){const i=r[s];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let s=0;s<r.length;s++){const i=r[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const a=i.getAttribute("data-ln-fill-as")||i.name;if(!a||!(a in t))continue;const n=t[a];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(l[i.name]>1){const u=String(n).split(",").map(function(w){return w.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=le(n);o.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),o.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<i.options.length;u++)i.options[u].selected=n.indexOf(i.options[u].value)!==-1;o.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),o.push(i)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=se,window.lnCore.serializeForm=ie,window.lnCore.resolveFormMethod=oe);const W={};function ae(e,t){W[e]=t}function ce(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=ce);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,S(function(){new MutationObserver(function(){y(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function fe(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];R[r]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=fe,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ue);const D={};function we(e,t){D[e]||(D[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=D[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function B(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let i=0;i<r.length;i++){const a=r[i],n=a.getAttribute("data-ln-field");t[n]!=null&&(a.textContent=t[n])}const o=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<o.length;i++){const a=o[i],n=a.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const w=n[u].trim().split(":");if(w.length!==2)continue;const p=w[0].trim(),c=w[1].trim();t[c]!=null&&a.setAttribute(p,t[c])}}const l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const a=l[i],n=a.getAttribute("data-ln-show");n in t&&a.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const a=s[i],n=a.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const w=n[u].trim().split(":");if(w.length!==2)continue;const p=w[0].trim(),c=w[1].trim();c in t&&a.classList.toggle(p,!!t[c])}}return e}function he(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<r.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[o],t??null),r[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)B(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function U(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,a){return t[a]!==void 0?t[a]:""}))}const 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],a=i.attributes;for(let n=0;n<a.length;n++){const u=a[n];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function be(e,t,r,o,l,s){const i={};for(let n=0;n<e.children.length;n++){const u=e.children[n],w=u.getAttribute("data-ln-render-key");w&&(i[w]=u)}const a=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],w=String(o(u));let p=i[w];if(p)l(p,u,n);else{const c=we(r,s);if(!c||(U(c,u),p=c.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",w),l(p,u,n)}a.appendChild(p)}e.textContent="",e.appendChild(a)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=B,window.lnCore.lnFill=he,window.lnCore.renderList=be);function q(e,t,r){const o=e.getAttribute(t);return o===null?r:o}function V(e,t,r){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?r:o}function K(e,t,r=!1){const o=e.getAttribute(t);if(o===null)return!!r;const l=o.trim().toLowerCase();return!(l==="false"||l==="0")}function G(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const F=new Map;function H(e,t){const r=(e?e.join("|"):"")+"::"+t;if(F.has(r))return F.get(r);const o=new Set(e||[]),l=function(s,i){const a=s.getAttribute(i);return a!==null&&o.has(a)?a:t};return F.set(r,l),l}function J(e,t,r){const o=parseFloat(e.getAttribute(t));return isNaN(o)?r:o}function P(e,t,r){const o=e.getAttribute(t);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function pe(e,t,r,o,l){if(!e||t===null)return!0;const s=o||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const a=n=>{l?console.warn(n,l):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(a(`[${s}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(a(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return a(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(a(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(a(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(a(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return a(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function ge(e,t,r){for(const o in r){const[l,s,i]=r[o];Object.defineProperty(e,o,{get:function(){return l(t,s,i)},enumerable:!0,configurable:!0})}return e}function me(e){const t={};for(const r in e){const o=e[r];if(!o||!o.prop)continue;let l=o.read;if(!l&&o.type)switch(o.type){case"enum":l=H(o.values,o.fallback);break;case"integer":l=V;break;case"float":l=J;break;case"boolean":l=K;break;case"list":l=G;break;case"json":l=P;break;case"string":default:l=q;break}l||(l=q),t[o.prop]=[l,r,o.fallback]}return t}function ye(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ge,window.lnCore.attrSpec=me,window.lnCore.attrStr=q,window.lnCore.attrInt=V,window.lnCore.attrBool=K,window.lnCore.attrList=G,window.lnCore.attrEnum=H,window.lnCore.attrFloat=J,window.lnCore.attrJson=P);function _(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function Ce(e,t,r,o){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:o};if(e.matches&&e.matches(s)&&_(e,i),e.querySelectorAll){const a=e.querySelectorAll(s);for(let n=0;n<a.length;n++)_(a[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ae(e){const t=X(),r=e.observed||[];for(let o=0;o<r.length;o++){const l=r[o];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const l=t.byDeclaredAttr.get(o);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=ye(e);if(o===null)t.reactiveWildcard.push(e);else for(const l of o)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function z(e,t,r,o){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const i=s.effects&&s.effects[r];i?i(t,r,o):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,o)}}function xe(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,o=X(),l=o.byAttr.get(t),s=te()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&M(i)){const a=o.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let u=0;u<a.length;u++)pe(a[u].spec,n,t,a[u].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const a=o.byReactive.get(t);a&&z(a,i,t,e.oldValue),o.reactiveWildcard.length&&z(o.reactiveWildcard,i,t,e.oldValue)}if(l)for(let a=0;a<l.length;a++){const n=l[a];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Ce(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,S(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{xe(t[r])}catch(o){console.error("[ln-core] mutation handler failed",t[r].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function Q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Y(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function I(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ve(e){const t=Q();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const o=Y();if(e.target&&o.length)for(let l=0;l<o.length;l++){const s=o[l],i=s.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;a&&s.onSubtreeChange(a,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&_(s,n);else if(s.matches&&s.matches(n.query)&&_(s,n),s.querySelectorAll){const u=s.querySelectorAll(n.query);for(let w=0;w<u.length;w++)_(u[w],n)}}n.onInit&&n.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let a=0;a<t.length;a++){const n=t[a],u=n.query;if(u){if(!i)s.matches&&s.matches(u)&&I(s,n);else if(s.matches&&s.matches(u)&&I(s,n),s.querySelectorAll){const w=s.querySelectorAll(u);for(let p=0;p<w.length;p++)I(w[p],n)}}}}}}function Se(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,S(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const o=t[r];if(o.type==="childList")try{ve(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e,t){Ae({observed:e,handler:t}),ke()}function Ee(e){Q().push(e),e.onSubtreeChange&&e.query&&Y().push(e),Se()}function Z(e){return(e||"").replace(/^#/,"")}function N(e){const t=e===void 0?location.hash:e,r={},o=Z(t);if(!o)return r;const l=o.split("&");for(let s=0;s<l.length;s++){const i=l[s];if(!i)continue;const a=i.indexOf(":"),n=a>-1?i.slice(0,a):i,u=a>-1?i.slice(a+1):"";if(n)try{r[n]=decodeURIComponent(u)}catch{r[n]=u}}return r}function Le(e){if(!e)return null;const t=N();return e in t?t[e]:null}function Te(e,t){if(!e)return;const r=N();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const i=r[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");Z(location.hash)!==l&&(location.hash=l)}function je(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Oe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function De(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function qe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ie(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),o=e.slice(t+1),l=o?o.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=N,window.lnCore.hashGet=Le,window.lnCore.hashSet=Te,window.lnCore.hashLinkClick=je,window.lnCore.resolveHashNamespace=Oe,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=Fe,window.lnCore.hashFilterDecode=Ie);function Ne(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ne),(function(){const e="data-ln-ajax",t="lnAjax",r="data-ln-data-coordinator-scope";if(window[t]!==void 0)return;let o=null;function l(c){if(!c.hasAttribute(e)||c[t])return;c[t]=!0;const f=u(c);s(f.links),i(f.forms)}function s(c){for(const f of c){if(f[t+"Trigger"]||f.hostname&&f.hostname!==window.location.hostname)continue;const d=f.getAttribute("href");if(d&&d.includes("#"))continue;const h=function(A){if(!re(A,f))return;A.preventDefault();const E=f.getAttribute("href");E&&n("GET",E,null,f)};f.addEventListener("click",h),f[t+"Trigger"]=h}}function i(c){for(const f of c){if(f[t+"Trigger"])continue;if(f.hasAttribute(r)){f[t+"ScopeWarned"]||(f[t+"ScopeWarned"]=!0,console.warn("[ln-ajax] Form has data-ln-data-coordinator-scope — the ln-data-coordinator write pipeline takes precedence; skipping ajax interception for this form."));continue}const d=function(h){if(h.defaultPrevented)return;h.preventDefault();const A=f.method.toUpperCase(),E=f.action,T=new FormData(f);for(const x of f.querySelectorAll('button, input[type="submit"]'))x.disabled=!0;n(A,E,T,f,function(){for(const x of f.querySelectorAll('button, input[type="submit"]'))x.disabled=!1})};f.addEventListener("submit",d),f[t+"Trigger"]=d}}function a(c){if(!c[t])return;const f=u(c);for(const d of f.links)d[t+"Trigger"]&&(d.removeEventListener("click",d[t+"Trigger"]),delete d[t+"Trigger"]);for(const d of f.forms)d[t+"Trigger"]&&(d.removeEventListener("submit",d[t+"Trigger"]),delete d[t+"Trigger"]);delete c[t]}function n(c,f,d,h,A){if(ne(h,"ln-ajax:before-start",{method:c,url:f}).defaultPrevented)return;c==="GET"&&o&&o(),y(h,"ln-ajax:start",{method:c,url:f}),h.classList.add("ln-ajax--loading");const T=document.createElement("span");T.className="ln-ajax-spinner",h.appendChild(T);function x(){h.classList.remove("ln-ajax--loading");const b=h.querySelector(".ln-ajax-spinner");b&&b.remove(),A&&A()}let m=f;const ee=document.querySelector('meta[name="csrf-token"]'),j=ee?ee.getAttribute("content"):null;d instanceof FormData&&j&&d.append("_token",j);const O={method:c,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}};if(j&&(O.headers["X-CSRF-TOKEN"]=j),c==="GET"&&d){const b=new URLSearchParams(d);m=f+(f.includes("?")?"&":"?")+b.toString()}else c!=="GET"&&d&&(O.body=d);let k=null;if(c==="GET"){const b=new AbortController;O.signal=b.signal,k=function(){o=null,b.abort(),x(),y(h,"ln-ajax:aborted",{method:c,url:m})},o=k}fetch(m,O).then(function(b){const $=b.ok,g=b.status;return b.text().then(function(v){let C=null,L=null;if(v&&v.trim())try{C=JSON.parse(v)}catch($e){L=$e}return{ok:$,status:g,data:C,parseError:L}})}).then(function(b){k&&o===k&&(o=null);const $=b.status,g=b.data,v=b.parseError;if(b.ok&&!v){if(g&&g.title&&(document.title=g.title),g&&g.content)for(const C in g.content){const L=document.getElementById(C);L&&(L.innerHTML=g.content[C])}if(h.tagName==="A"){const C=h.getAttribute("href");C&&window.history.pushState({ajax:!0},"",C)}else h.tagName==="FORM"&&h.method.toUpperCase()==="GET"&&window.history.pushState({ajax:!0},"",m);y(h,"ln-ajax:success",{method:c,url:m,data:g})}else y(h,"ln-ajax:error",{method:c,url:m,status:$,data:g,error:v||null});x(),y(h,"ln-ajax:complete",{method:c,url:m})}).catch(function(b){b&&b.name==="AbortError"||(k&&o===k&&(o=null),y(h,"ln-ajax:error",{method:c,url:m,status:0,data:null,error:b}),x(),y(h,"ln-ajax:complete",{method:c,url:m}))})}function u(c){const f={links:[],forms:[]};return c.tagName==="A"&&c.getAttribute(e)!=="false"?f.links.push(c):c.tagName==="FORM"&&c.getAttribute(e)!=="false"?f.forms.push(c):(f.links=Array.from(c.querySelectorAll('a:not([data-ln-ajax="false"])')),f.forms=Array.from(c.querySelectorAll('form:not([data-ln-ajax="false"])'))),f}function w(){S(function(){Ee({onInit:function(c){if(l(c),!c.hasAttribute(e)){for(const d of c.querySelectorAll("["+e+"]"))l(d);const f=c.closest&&c.closest("["+e+"]");if(f&&f.getAttribute(e)!=="false"){const d=u(c);s(d.links),i(d.forms)}}}}),_e([e],function(c){l(c)})},"ln-ajax")}function p(){for(const c of document.querySelectorAll("["+e+"]"))l(c)}window[t]=l,window[t].destroy=a,w(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",p):p()})()})();
@@ -1 +1 @@
1
- (function(){"use strict";function N(){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 S(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let a=1;a<t.length;a++)if(t[a]&&t[a].nodeType===1){n=t[a];break}if(!S(n))return}e.apply(console,t)}}function b(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function E(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){E(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ie(e,t){const r=!!(t&&t.typed),n=t&&t.exclude,a={},u=e.elements,l={};if(r)for(let d=0;d<u.length;d++){const i=u[d];i.name&&i.type==="checkbox"&&!i.disabled&&(l[i.name]=(l[i.name]||0)+1)}for(let d=0;d<u.length;d++){const i=u[d];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(n&&i.matches&&i.matches(n)))if(i.type==="checkbox")r&&l[i.name]===1?a[i.name]=i.checked:(a[i.name]||(a[i.name]=[]),i.checked&&a[i.name].push(i.value));else if(i.type==="radio")i.checked&&(a[i.name]=i.value);else if(i.type==="select-multiple"){a[i.name]=[];for(let o=0;o<i.options.length;o++)i.options[o].selected&&a[i.name].push(i.options[o].value)}else if(r&&i.type==="hidden")a[i.name]=i.value;else if(r&&(i.type==="number"||i.type==="range")){const o=Number(i.value);a[i.name]=i.value===""||isNaN(o)?null:o}else a[i.name]=i.value}return a}function le(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ae(e,t){const r=e.elements,n=[],a={};for(let u=0;u<r.length;u++){const l=r[u];l.name&&l.type==="checkbox"&&(a[l.name]=(a[l.name]||0)+1)}for(let u=0;u<r.length;u++){const l=r[u];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const d=l.getAttribute("data-ln-fill-as")||l.name;if(!d||!(d in t))continue;const i=t[d];if(l.type==="checkbox"){if(Array.isArray(i))l.checked=i.indexOf(l.value)!==-1;else if(a[l.name]>1){const o=String(i).split(",").map(function(f){return f.trim()});l.checked=o.indexOf(l.value)!==-1}else l.checked=le(i);n.push(l)}else if(l.type==="radio")l.checked=l.value===String(i),n.push(l);else if(l.type==="select-multiple"){if(Array.isArray(i))for(let o=0;o<l.options.length;o++)l.options[o].selected=i.indexOf(l.options[o].value)!==-1;n.push(l)}else l.value=i,l.tagName==="SELECT"&&i!=null&&l.setAttribute("data-ln-value",i),n.push(l)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ae,window.lnCore.serializeForm=ie,window.lnCore.resolveFormMethod=oe);function se(e,t="ln-core"){try{return e?JSON.parse(e):{}}catch(r){return console.error(`[${t}] Invalid headers JSON:`,r),{}}}const R={};function ce(e,t){R[e]=t}function de(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=de);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,E(function(){new MutationObserver(function(){b(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const U={};function fe(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];U[r]=t}function pe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return U[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=fe,window.lnCore.getLocaleFallback=pe,window.lnCore.ensureLocaleObserver=ue);const q={};function he(e,t){q[e]||(q[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=q[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let l=0;l<r.length;l++){const d=r[l],i=d.getAttribute("data-ln-field");t[i]!=null&&(d.textContent=t[i])}const n=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<n.length;l++){const d=n[l],i=d.getAttribute("data-ln-attr").split(",");for(let o=0;o<i.length;o++){const f=i[o].trim().split(":");if(f.length!==2)continue;const s=f[0].trim(),c=f[1].trim();t[c]!=null&&d.setAttribute(s,t[c])}}const a=e.querySelectorAll("[data-ln-show]");for(let l=0;l<a.length;l++){const d=a[l],i=d.getAttribute("data-ln-show");i in t&&d.classList.toggle("hidden",!t[i])}const u=e.querySelectorAll("[data-ln-class]");for(let l=0;l<u.length;l++){const d=u[l],i=d.getAttribute("data-ln-class").split(",");for(let o=0;o<i.length;o++){const f=i[o].trim().split(":");if(f.length!==2)continue;const s=f[0].trim(),c=f[1].trim();c in t&&d.classList.toggle(s,!!t[c])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<r.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[n],t??null),r[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)M(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let r=0;r<t.length;r++)t[r].textContent=""}})));function B(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const u=r.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,d){return t[d]!==void 0?t[d]:""}))}const n=function(u,l){return t[l]!==void 0?t[l]:""},a=Array.from(e.querySelectorAll("*"));e.nodeType===1&&a.push(e);for(let u=0;u<a.length;u++){const l=a[u],d=l.attributes;for(let i=0;i<d.length;i++){const o=d[i];o.value.indexOf("{{")!==-1&&l.setAttribute(o.name,o.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function me(e,t,r,n,a,u){const l={};for(let i=0;i<e.children.length;i++){const o=e.children[i],f=o.getAttribute("data-ln-render-key");f&&(l[f]=o)}const d=document.createDocumentFragment();for(let i=0;i<t.length;i++){const o=t[i],f=String(n(o));let s=l[f];if(s)a(s,o,i);else{const c=he(r,u);if(!c||(B(c,o),s=c.firstElementChild,!s))continue;s.setAttribute("data-ln-render-key",f),a(s,o,i)}d.appendChild(s)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=B,window.lnCore.fill=M,window.lnCore.lnFill=we,window.lnCore.renderList=me);function C(e,t,r){const n=e.getAttribute(t);return n===null?r:n}function H(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function W(e,t,r=!1){const n=e.getAttribute(t);if(n===null)return!!r;const a=n.trim().toLowerCase();return!(a==="false"||a==="0")}function Q(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const L=new Map;function J(e,t){const r=(e?e.join("|"):"")+"::"+t;if(L.has(r))return L.get(r);const n=new Set(e||[]),a=function(u,l){const d=u.getAttribute(l);return d!==null&&n.has(d)?d:t};return L.set(r,a),a}function K(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function V(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function G(e,t,r,n,a){if(!e||t===null)return!0;const u=n||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const d=i=>{a?console.warn(i,a):console.warn(i)};if(l==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(d(`[${u}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const i=e.values||[];return i.includes(t)?!0:(d(`[${u}] Invalid value "${t}" for attribute "${r}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return d(`[${u}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(d(`[${u}] Value ${i} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(d(`[${u}] Value ${i} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(d(`[${u}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(i){return d(`[${u}] Invalid JSON for attribute "${r}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function z(e,t,r){for(const n in r){const[a,u,l]=r[n];Object.defineProperty(e,n,{get:function(){return a(t,u,l)},enumerable:!0,configurable:!0})}return e}function X(e){const t={};for(const r in e){const n=e[r];if(!n||!n.prop)continue;let a=n.read;if(!a&&n.type)switch(n.type){case"enum":a=J(n.values,n.fallback);break;case"integer":a=H;break;case"float":a=K;break;case"boolean":a=W;break;case"list":a=Q;break;case"json":a=V;break;case"string":default:a=C;break}a||(a=C),t[n.prop]=[a,r,n.fallback]}return t}function be(e){const t={};for(const r in e){const n=e[r];n&&n.effect&&(t[r]=n.effect)}return Object.keys(t).length?t:null}function ge(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=z,window.lnCore.attrSpec=X,window.lnCore.attrStr=C,window.lnCore.attrInt=H,window.lnCore.attrBool=W,window.lnCore.attrList=Q,window.lnCore.attrEnum=J,window.lnCore.attrFloat=K,window.lnCore.attrJson=V);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function Y(e,t,r,n){if(e.nodeType!==1)return;const u=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(u)&&v(e,l),e.querySelectorAll){const d=e.querySelectorAll(u);for(let i=0;i<d.length;i++)v(d[i],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function _e(e){const t=Z(),r=e.observed||[];for(let n=0;n<r.length;n++){const a=r[n];t.byAttr.has(a)||t.byAttr.set(a,[]),t.byAttr.get(a).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const a=t.byDeclaredAttr.get(n);a.some(u=>u.componentTag===e.componentTag)||a.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=ge(e);if(n===null)t.reactiveWildcard.push(e);else for(const a of n)t.byReactive.has(a)||t.byReactive.set(a,[]),t.byReactive.get(a).push(e)}e.persist&&t.persist.push(e)}function P(e,t,r,n){for(let a=0;a<e.length;a++){const u=e[a];if(!t[u.attribute])continue;const l=u.effects&&u.effects[r];l?l(t,r,n):u.onAttrChange&&(!u.declared||u.declared.has(r))&&u.onAttrChange(t,r,n)}}function Ae(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=Z(),a=n.byAttr.get(t),u=N()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!a&&!u)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(u&&S(l)){const d=n.byDeclaredAttr.get(t),i=l.getAttribute(t);for(let o=0;o<d.length;o++)G(d[o].spec,i,t,d[o].componentTag,l)}if(window.lnCore._debugSink&&(r||a)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),r){const d=n.byReactive.get(t);d&&P(d,l,t,e.oldValue),n.reactiveWildcard.length&&P(n.reactiveWildcard,l,t,e.oldValue)}if(a)for(let d=0;d<a.length;d++){const i=a[d];if(i.handler){i.handler(l,t,e.oldValue);continue}i.onAttributeChange&&l[i.attribute]?i.onAttributeChange(l,t):(Y(l,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(l))}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,E(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ae(t[r])}catch(n){console.error("[ln-core] mutation handler failed",t[r].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function O(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ke(e){const t=O();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const n=t[r];if(n.onSubtreeChange&&n.query){const a=n.query,u=e.target.nodeType===1?e.target.matches&&e.target.matches(a)?e.target:e.target.closest?e.target.closest(a):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(a):null;u&&n.onSubtreeChange(u,e)}}for(let r=0;r<e.addedNodes.length;r++){const n=e.addedNodes[r];if(n.nodeType===1){const a=!!(n.firstElementChild||n.children&&n.children.length);for(let u=0;u<t.length;u++){const l=t[u];if(l.selector&&l.attribute&&l.ComponentFn){if(!a)n.matches&&n.matches(l.query)&&v(n,l);else if(n.matches&&n.matches(l.query)&&v(n,l),n.querySelectorAll){const d=n.querySelectorAll(l.query);for(let i=0;i<d.length;i++)v(d[i],l)}}l.onInit&&l.onInit(n)}}}for(let r=0;r<e.removedNodes.length;r++){const n=e.removedNodes[r];if(n.nodeType===1){const a=!!(n.firstElementChild||n.children&&n.children.length);for(let u=0;u<t.length;u++){const l=t[u],d=l.query;if(d){if(!a)n.matches&&n.matches(d)&&T(n,l);else if(n.matches&&n.matches(d)&&T(n,l),n.querySelectorAll){const i=n.querySelectorAll(d);for(let o=0;o<i.length;o++)T(i[o],l)}}}}}}}function ee(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,E(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const n=t[r];if(n.type==="childList")try{ke(n)}catch(a){console.error("[ln-core] lifecycle handler failed",n.target,a)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e){O().push(e),ee()}function te(e,t,r,n,a={}){const u=a.extraAttributes||[],l=a.onAttributeChange||null,d=a.onSubtreeChange||null,i=a.onInit||null,o=a.onAttrChange||null,f=a.effects||null,s=a.attributes||null,c=s?be(s):f,p=s?new Set(Object.keys(s)):null,h=a.persist||null;function m(k){const w=k||document.body;if(Y(w,e,t,r),s&&N())for(const g in s){const Re=s[g],F=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&F.push(w);for(let j=0;j<F.length;j++){const $=F[j];S($)&&G(Re,$.getAttribute(g),g,n,$)}}i&&i(w)}const y=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let w;for(;(w=k.exec(e))!==null;)y.push(w[1])}else y.push(e);_e({selector:e,attribute:t,componentTag:n,attributes:s,ComponentFn:r,onInit:i,observed:y.concat(u),onAttributeChange:l,onAttrChange:o,effects:c,declared:p,persist:h}),ve();const I=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,x=a.subtreeQuery||(I?e:"["+e+"]");O().push({selector:e,attribute:t,ComponentFn:r,onInit:i,onSubtreeChange:d,query:x}),ee(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=te,window.lnCore.observeLifecycle=Ee);function A(){ye()>0?Ce(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",A):A(),m}function ne(e){return(e||"").replace(/^#/,"")}function D(e){const t=e===void 0?location.hash:e,r={},n=ne(t);if(!n)return r;const a=n.split("&");for(let u=0;u<a.length;u++){const l=a[u];if(!l)continue;const d=l.indexOf(":"),i=d>-1?l.slice(0,d):l,o=d>-1?l.slice(d+1):"";if(i)try{r[i]=decodeURIComponent(o)}catch{r[i]=o}}return r}function xe(e){if(!e)return null;const t=D();return e in t?t[e]:null}function Se(e,t){if(!e)return;const r=D();t==null?delete r[e]:r[e]=String(t);const a=Object.keys(r).map(function(u){const l=r[u];return l===""?u:u+":"+encodeURIComponent(l)}).join("&");ne(location.hash)!==a&&(location.hash=a)}function qe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Te(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ie(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),n=e.slice(t+1),a=n?n.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:r,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=D,window.lnCore.hashGet=xe,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=qe,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Te,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Ie);function Fe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Fe);const je={offset:"offset",limit:"limit",search:"search",sortField:"sort_field",sortDir:"sort_dir"};function _(...e){return e.filter(t=>t!=null&&t!=="").map((t,r)=>{const n=String(t);return r===0?n.replace(/\/+$/,""):n.replace(/^\/+/,"").replace(/\/+$/,"")}).filter(Boolean).join("/")}function $e(e,t){if(!e||typeof e!="object")return"";const r=Object.assign({},je);if(t&&typeof t=="object")for(const a in t)t[a]!==void 0&&t[a]!==null&&t[a]!==""&&(r[a]=t[a]);const n=new URLSearchParams;return e.search&&n.append(r.search,e.search),e.offset!=null&&n.append(r.offset,e.offset),e.limit!=null&&n.append(r.limit,e.limit),e.sort&&e.sort.field&&e.sort.direction&&(n.append(r.sortField,e.sort.field),n.append(r.sortDir,e.sort.direction)),e.filters&&typeof e.filters=="object"&&Object.keys(e.filters).forEach(a=>{const u=e.filters[a];Array.isArray(u)&&u.length>0&&n.append(a,u.join(","))}),n.toString()}function Ne(e,t,r){let n=_(e,t);return r&&(n+=(n.indexOf("?")!==-1?"&":"?")+r),n}function re(e){const t=e&&e.content!==void 0?e.content:e,r=e&&e.message?e.message:null;return{record:t,message:r}}(function(){const e="data-ln-api-connector",t="lnApiConnector",r="lnConnector";if(window[t]!==void 0)return;function n(o){const f=o[t];f&&f.refreshConfig()}const a={"data-ln-api-connector":{type:"marker",description:"Mounts API connector bridging REST backend and ln-ashlar data coordinators"},"data-ln-api-base-url":{prop:"baseUrl",read:C,type:"string",fallback:"",effect:n,description:"Base URL endpoint for API requests"},"data-ln-api-path":{prop:"path",read:C,type:"string",fallback:"",effect:n,description:"Resource path appended to base URL"},"data-ln-api-endpoint":{prop:"path",read:C,type:"string",fallback:"",effect:n,description:"Alias for data-ln-api-path"},"data-ln-api-headers":{prop:"rawHeaders",read:C,type:"json",fallback:null,effect:n,description:"Custom HTTP headers in JSON format or semicolon-separated pairs"},"data-ln-api-param-offset":{effect:n,type:"string",fallback:"offset",description:"Query parameter name for pagination offset"},"data-ln-api-param-limit":{effect:n,type:"string",fallback:"limit",description:"Query parameter name for pagination page size"},"data-ln-api-param-search":{effect:n,type:"string",fallback:"search",description:"Query parameter name for text search filter"},"data-ln-api-param-sort-field":{effect:n,type:"string",fallback:"sort_by",description:"Query parameter name for sort field"},"data-ln-api-param-sort-dir":{effect:n,type:"string",fallback:"sort_dir",description:"Query parameter name for sort direction"},"data-ln-api-connector-query-debounce":{effect:n,type:"integer",fallback:200,min:0,description:"Debounce delay in milliseconds before dispatching query requests"}},u=X(a);function l(o){return o.ok?o.status===204?null:o.json():o.json().catch(()=>null).then(f=>{const s=new Error("HTTP "+o.status+": "+o.statusText);throw s.status=o.status,s.data=f,s})}function d(o){return this.dom=o,z(this,o,u),o[t]=this,o[r]=this,this.namespace="ln-api-connector",this._inflight=new Map,this._queryTimers=new Map,this.refreshConfig(),this._handlers=null,i(this),this}d.prototype.refreshConfig=function(){const o=this.dom;this.credentials="same-origin",this.headers=se(this.rawHeaders);const f={},s=o.getAttribute("data-ln-api-param-offset");s&&(f.offset=s);const c=o.getAttribute("data-ln-api-param-limit");c&&(f.limit=c);const p=o.getAttribute("data-ln-api-param-search");p&&(f.search=p);const h=o.getAttribute("data-ln-api-param-sort-field");h&&(f.sortField=h);const m=o.getAttribute("data-ln-api-param-sort-dir");m&&(f.sortDir=m),this.paramKeys=f;const y=o.getAttribute("data-ln-api-connector-query-debounce");this.queryDebounce=y!==null?+y:300,b(this.dom,"ln-api-connector:config-changed",{baseUrl:this.baseUrl,path:this.path,headers:this.headers,paramKeys:this.paramKeys})},d.prototype._reqHeaders=function(o){const f=Object.assign({},this.headers);return!f.Accept&&!f.accept&&(f.Accept="application/json"),!f["Content-Type"]&&!f["content-type"]&&(f["Content-Type"]="application/json"),o&&(f["X-Idempotency-Key"]=o),f},d.prototype.cancel=function(o){return o&&this._inflight.has(o)?(this._inflight.get(o).abort(),this._inflight.delete(o),!0):!1},d.prototype.fetchDelta=function(o,f){const s=this;let c=_(s.baseUrl,s.path);o!=null&&o!==""&&(c+=(c.indexOf("?")!==-1?"&":"?")+"since="+encodeURIComponent(o));const p=f||"sync";s._inflight.has(p)&&s._inflight.get(p).abort();const h=new AbortController;return s._inflight.set(p,h),window.fetch(c,{method:"GET",headers:s._reqHeaders(),credentials:s.credentials,signal:h.signal}).then(l).finally(function(){s._inflight.get(p)===h&&s._inflight.delete(p)})},d.prototype.query=function(o,f){const s=this,c=$e(o,s.paramKeys),p=Ne(s.baseUrl,s.path,c),h=f||"query";s._inflight.has(h)&&s._inflight.get(h).abort();const m=new AbortController;return s._inflight.set(h,m),window.fetch(p,{method:"GET",headers:s._reqHeaders(),credentials:s.credentials,signal:m.signal}).then(l).finally(function(){s._inflight.get(h)===m&&s._inflight.delete(h)})},d.prototype.create=function(o,f,s){const c=this;return window.fetch(_(c.baseUrl,f||c.path),{method:"POST",headers:c._reqHeaders(s),credentials:c.credentials,body:JSON.stringify(o)}).then(l)},d.prototype.update=function(o,f,s,c,p){const h=this;s!=null&&(f=Object.assign({},f,{expected_version:s}));const m=c?_(h.baseUrl,c):_(h.baseUrl,h.path,o);return window.fetch(m,{method:"PUT",headers:h._reqHeaders(p),credentials:h.credentials,body:JSON.stringify(f)}).then(l)},d.prototype.delete=function(o,f,s){const c=this;return window.fetch(_(c.baseUrl,f||c.path,o),{method:"DELETE",headers:c._reqHeaders(s),credentials:c.credentials}).then(l)},d.prototype.bulkDelete=function(o,f,s){const c=this;return window.fetch(_(c.baseUrl,f||c.path,"bulk-delete"),{method:"DELETE",headers:c._reqHeaders(s),credentials:c.credentials,body:JSON.stringify({ids:o})}).then(l)};function i(o){o._handlers={sync:function(f){const s=f.detail||{},c=s.meta&&s.meta.targetEl?s.meta.targetEl:null;o.fetchDelta(s.since,c).then(function(p){b(o.dom,"ln-api-connector:fetched",{data:p,since:s.since,meta:s.meta||null})}).catch(function(p){p&&p.name==="AbortError"||b(o.dom,"ln-api-connector:error",{action:"sync",error:p.message,status:p.status||0,data:p.data||null,since:s.since,meta:s.meta||null})})},query:function(f){const s=f.detail||{},c=s.query||s,p=s.meta&&s.meta.targetEl?s.meta.targetEl:null,h=p||"query",m=o.queryDebounce;function y(x,A,k){o.query(A,k).then(function(w){const g=w||{};b(o.dom,"ln-api-connector:fetched",{data:g.data||(Array.isArray(g)?g:[]),total:g.total,filtered:g.filtered,offset:A.offset,queryGen:A.queryGen,meta:x.meta||null})}).catch(function(w){w&&w.name==="AbortError"||b(o.dom,"ln-api-connector:error",{action:"query",error:w.message,status:w.status||0,data:w.data||null,meta:x.meta||null})})}if(m===0){y(s,c,p);return}o._queryTimers.has(h)&&clearTimeout(o._queryTimers.get(h));const I=setTimeout(function(){o._queryTimers.delete(h),y(s,c,p)},m);o._queryTimers.set(h,I)},cancel:function(f){const s=f.detail||{},c=s.meta&&s.meta.targetEl?s.meta.targetEl:s.targetEl||s.key;c&&o.cancel(c)},create:function(f){const s=f.detail||{};o.create(s.data,s.url,s.idempotencyKey).then(function(c){const p=re(c);b(o.dom,"ln-api-connector:created",{record:p.record,tempId:s.tempId,message:p.message,meta:s.meta||null})}).catch(function(c){c&&c.name==="AbortError"||b(o.dom,"ln-api-connector:error",{action:"create",error:c.message,status:c.status||0,data:c.data||null,tempId:s.tempId,meta:s.meta||null})})},update:function(f){const s=f.detail||{};o.update(s.id,s.data,s.expected_version,s.url,s.idempotencyKey).then(function(c){const p=re(c);b(o.dom,"ln-api-connector:updated",{record:p.record,id:s.id,message:p.message,meta:s.meta||null})}).catch(function(c){c&&c.name==="AbortError"||b(o.dom,"ln-api-connector:error",{action:"update",error:c.message,status:c.status||0,data:c.data||null,id:s.id,conflictData:c.status===409?c.data:null,meta:s.meta||null})})},delete:function(f){const s=f.detail||{};o.delete(s.id,s.url,s.idempotencyKey).then(function(c){const p=c&&c.message?c.message:null;b(o.dom,"ln-api-connector:deleted",{response:c,id:s.id,message:p,meta:s.meta||null})}).catch(function(c){c&&c.name==="AbortError"||b(o.dom,"ln-api-connector:error",{action:"delete",error:c.message,status:c.status||0,data:c.data||null,id:s.id,meta:s.meta||null})})},bulkDelete:function(f){const s=f.detail||{};o.bulkDelete(s.ids,s.url,s.idempotencyKey).then(function(c){const p=c&&c.message?c.message:null;b(o.dom,"ln-api-connector:bulk-deleted",{response:c,ids:s.ids,message:p,meta:s.meta||null})}).catch(function(c){c&&c.name==="AbortError"||b(o.dom,"ln-api-connector:error",{action:"bulk-delete",error:c.message,status:c.status||0,data:c.data||null,ids:s.ids,meta:s.meta||null})})}},o.dom.addEventListener("ln-api-connector:request-sync",o._handlers.sync),o.dom.addEventListener("ln-api-connector:request-query",o._handlers.query),o.dom.addEventListener("ln-api-connector:request-cancel",o._handlers.cancel),o.dom.addEventListener("ln-api-connector:request-create",o._handlers.create),o.dom.addEventListener("ln-api-connector:request-update",o._handlers.update),o.dom.addEventListener("ln-api-connector:request-delete",o._handlers.delete),o.dom.addEventListener("ln-api-connector:request-bulk-delete",o._handlers.bulkDelete)}d.prototype.destroy=function(){if(!this.dom[t])return;const o=this;o._inflight&&(o._inflight.forEach(function(f){f.abort()}),o._inflight.clear()),this._queryTimers&&(this._queryTimers.forEach(function(f){f&&clearTimeout(f)}),this._queryTimers.clear()),this._handlers&&(o.dom.removeEventListener("ln-api-connector:request-sync",o._handlers.sync),o.dom.removeEventListener("ln-api-connector:request-query",o._handlers.query),o.dom.removeEventListener("ln-api-connector:request-cancel",o._handlers.cancel),o.dom.removeEventListener("ln-api-connector:request-create",o._handlers.create),o.dom.removeEventListener("ln-api-connector:request-update",o._handlers.update),o.dom.removeEventListener("ln-api-connector:request-delete",o._handlers.delete),o.dom.removeEventListener("ln-api-connector:request-bulk-delete",o._handlers.bulkDelete),o._handlers=null),delete this.dom[t],delete this.dom[r]},te(e,t,d,"ln-api-connector",{attributes:a})})()})();
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 q(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(!q(i))return}e.apply(console,t)}}function b(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 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 le(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ae(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,l={},c=e.elements,a={};if(r)for(let d=0;d<c.length;d++){const o=c[d];o.name&&o.type==="checkbox"&&!o.disabled&&(a[o.name]=(a[o.name]||0)+1)}for(let d=0;d<c.length;d++){const o=c[d];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&&a[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 n=0;n<o.options.length;n++)o.options[n].selected&&l[o.name].push(o.options[n].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const n=Number(o.value);l[o.name]=o.value===""||isNaN(n)?null:n}else l[o.name]=o.value}return l}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ce(e,t){const r=e.elements,i=[],l={};for(let c=0;c<r.length;c++){const a=r[c];a.name&&a.type==="checkbox"&&(l[a.name]=(l[a.name]||0)+1)}for(let c=0;c<r.length;c++){const a=r[c];if(a.type==="file"||a.type==="submit"||a.type==="button")continue;const d=a.getAttribute("data-ln-fill-as")||a.name;if(!d||!(d in t))continue;const o=t[d];if(a.type==="checkbox"){if(Array.isArray(o))a.checked=o.indexOf(a.value)!==-1;else if(l[a.name]>1){const n=String(o).split(",").map(function(f){return f.trim()});a.checked=n.indexOf(a.value)!==-1}else a.checked=se(o);i.push(a)}else if(a.type==="radio")a.checked=a.value===String(o),i.push(a);else if(a.type==="select-multiple"){if(Array.isArray(o))for(let n=0;n<a.options.length;n++)a.options[n].selected=o.indexOf(a.options[n].value)!==-1;i.push(a)}else a.value=o,a.tagName==="SELECT"&&o!=null&&a.setAttribute("data-ln-value",o),i.push(a)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ce,window.lnCore.serializeForm=ae,window.lnCore.resolveFormMethod=le);function de(e,t="ln-core"){try{return e?JSON.parse(e):{}}catch(r){return console.error(`[${t}] Invalid headers JSON:`,r),{}}}const M={};function ue(e,t){M[e]=t}function fe(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ue,window.lnCore.getDataMapper=fe);function pe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,x(function(){new MutationObserver(function(){b(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const B={};function he(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];B[r]=t}function we(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return B[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=he,window.lnCore.getLocaleFallback=we,window.lnCore.ensureLocaleObserver=pe);const L={};function me(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=L[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function H(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let a=0;a<r.length;a++){const d=r[a],o=d.getAttribute("data-ln-field");t[o]!=null&&(d.textContent=t[o])}const i=e.querySelectorAll("[data-ln-attr]");for(let a=0;a<i.length;a++){const d=i[a],o=d.getAttribute("data-ln-attr").split(",");for(let n=0;n<o.length;n++){const f=o[n].trim().split(":");if(f.length!==2)continue;const s=f[0].trim(),u=f[1].trim();t[u]!=null&&d.setAttribute(s,t[u])}}const l=e.querySelectorAll("[data-ln-show]");for(let a=0;a<l.length;a++){const d=l[a],o=d.getAttribute("data-ln-show");o in t&&d.classList.toggle("hidden",!t[o])}const c=e.querySelectorAll("[data-ln-class]");for(let a=0;a<c.length;a++){const d=c[a],o=d.getAttribute("data-ln-class").split(",");for(let n=0;n<o.length;n++){const f=o[n].trim().split(":");if(f.length!==2)continue;const s=f[0].trim(),u=f[1].trim();u in t&&d.classList.toggle(s,!!t[u])}}return e}function be(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)H(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 W(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const c=r.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(a,d){return t[d]!==void 0?t[d]:""}))}const i=function(c,a){return t[a]!==void 0?t[a]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let c=0;c<l.length;c++){const a=l[c],d=a.attributes;for(let o=0;o<d.length;o++){const n=d[o];n.value.indexOf("{{")!==-1&&a.setAttribute(n.name,n.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function ge(e,t,r,i,l,c){const a={};for(let o=0;o<e.children.length;o++){const n=e.children[o],f=n.getAttribute("data-ln-render-key");f&&(a[f]=n)}const d=document.createDocumentFragment();for(let o=0;o<t.length;o++){const n=t[o],f=String(i(n));let s=a[f];if(s)l(s,n,o);else{const u=me(r,c);if(!u||(W(u,n),s=u.firstElementChild,!s))continue;s.setAttribute("data-ln-render-key",f),l(s,n,o)}d.appendChild(s)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=W,window.lnCore.fill=H,window.lnCore.lnFill=be,window.lnCore.renderList=ge);function C(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function Q(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function J(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 K(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const O=new Map;function V(e,t){const r=(e?e.join("|"):"")+"::"+t;if(O.has(r))return O.get(r);const i=new Set(e||[]),l=function(c,a){const d=c.getAttribute(a);return d!==null&&i.has(d)?d:t};return O.set(r,l),l}function G(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function z(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function X(e,t,r,i,l){if(!e||t===null)return!0;const c=i||"ln-component",a=e.type;if(a==="trigger"||a==="marker"||a==="string"||a==="list"||!a||t===""&&e.fallback!==void 0)return!0;const d=o=>{l?console.warn(o,l):console.warn(o)};if(a==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(d(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(a==="enum"){const o=e.values||[];return o.includes(t)?!0:(d(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(a==="integer"){if(!/^-?\d+$/.test(t))return d(`[${c}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(d(`[${c}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(d(`[${c}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(a==="float")return isNaN(Number(t))?(d(`[${c}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(a==="json")try{return JSON.parse(t),!0}catch(o){return d(`[${c}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function Y(e,t,r){for(const i in r){const[l,c,a]=r[i];Object.defineProperty(e,i,{get:function(){return l(t,c,a)},enumerable:!0,configurable:!0})}return e}function Z(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=V(i.values,i.fallback);break;case"integer":l=Q;break;case"float":l=G;break;case"boolean":l=J;break;case"list":l=K;break;case"json":l=z;break;case"string":default:l=C;break}l||(l=C),t[i.prop]=[l,r,i.fallback]}return t}function ye(e){const t={};for(const r in e){const i=e[r];i&&i.effect&&(t[r]=i.effect)}return Object.keys(t).length?t:null}function Ce(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const r in e.effects)t.add(r);if(e.onAttrChange&&e.declared)for(const r of e.declared)t.add(r);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Y,window.lnCore.attrSpec=Z,window.lnCore.attrStr=C,window.lnCore.attrInt=Q,window.lnCore.attrBool=J,window.lnCore.attrList=K,window.lnCore.attrEnum=V,window.lnCore.attrFloat=G,window.lnCore.attrJson=z);function v(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function P(e,t,r,i){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",a={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(c)&&v(e,a),e.querySelectorAll){const d=e.querySelectorAll(c);for(let o=0;o<d.length;o++)v(d[o],a)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function _e(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ae(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function 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 ve(e){const t=ee(),r=e.observed||[];for(let i=0;i<r.length;i++){const l=r[i];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const l=t.byDeclaredAttr.get(i);l.some(c=>c.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=Ce(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 te(e,t,r,i){for(let l=0;l<e.length;l++){const c=e[l];if(!t[c.attribute])continue;const a=c.effects&&c.effects[r];a?a(t,r,i):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,i)}}function ke(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=ee(),l=i.byAttr.get(t),c=U()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!l&&!c)return;const a=e.target;if(e.oldValue!==a.getAttribute(t)){if(c&&q(a)){const d=i.byDeclaredAttr.get(t),o=a.getAttribute(t);for(let n=0;n<d.length;n++)X(d[n].spec,o,t,d[n].componentTag,a)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,a,{oldValue:e.oldValue,newValue:a.getAttribute(t)}),r){const d=i.byReactive.get(t);d&&te(d,a,t,e.oldValue),i.reactiveWildcard.length&&te(i.reactiveWildcard,a,t,e.oldValue)}if(l)for(let d=0;d<l.length;d++){const o=l[d];if(o.handler){o.handler(a,t,e.oldValue);continue}o.onAttributeChange&&a[o.attribute]?o.onAttributeChange(a,t):(P(a,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(a))}}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,x(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{ke(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function T(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function D(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function I(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=T();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=D();if(e.target&&i.length)for(let l=0;l<i.length;l++){const c=i[l],a=c.query,d=e.target.nodeType===1?e.target.matches&&e.target.matches(a)?e.target:e.target.closest?e.target.closest(a):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(a):null;d&&c.onSubtreeChange(d,e)}for(let l=0;l<e.addedNodes.length;l++){const c=e.addedNodes[l];if(c.nodeType===1){const a=!!(c.firstElementChild||c.children&&c.children.length);for(let d=0;d<t.length;d++){const o=t[d];if(o.selector&&o.attribute&&o.ComponentFn){if(!a)c.matches&&c.matches(o.query)&&v(c,o);else if(c.matches&&c.matches(o.query)&&v(c,o),c.querySelectorAll){const n=c.querySelectorAll(o.query);for(let f=0;f<n.length;f++)v(n[f],o)}}o.onInit&&o.onInit(c)}}}for(let l=0;l<e.removedNodes.length;l++){const c=e.removedNodes[l];if(c.nodeType===1){const a=!!(c.firstElementChild||c.children&&c.children.length);for(let d=0;d<t.length;d++){const o=t[d],n=o.query;if(n){if(!a)c.matches&&c.matches(n)&&I(c,o);else if(c.matches&&c.matches(n)&&I(c,o),c.querySelectorAll){const f=c.querySelectorAll(n);for(let s=0;s<f.length;s++)I(f[s],o)}}}}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,x(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{xe(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Se(e){T().push(e),e.onSubtreeChange&&e.query&&D().push(e),ne()}function re(e,t,r,i,l={}){const c=l.extraAttributes||[],a=l.onAttributeChange||null,d=l.onSubtreeChange||null,o=l.onInit||null,n=l.onAttrChange||null,f=l.effects||null,s=l.attributes||null,u=s?ye(s):f,p=s?new Set(Object.keys(s)):null,h=l.persist||null;function w(g){const m=g||document.body;if(P(m,e,t,r),s&&U())for(const E in s){const Me=s[E],R=Array.from(m.querySelectorAll("["+E+"]"));m.matches&&m.matches("["+E+"]")&&R.push(m);for(let $=0;$<R.length;$++){const N=R[$];q(N)&&X(Me,N.getAttribute(E),E,i,N)}}o&&o(m)}const y=[];if(e.indexOf("[")!==-1){const g=/\[([\w-]+)/g;let m;for(;(m=g.exec(e))!==null;)y.push(m[1])}else y.push(e);ve({selector:e,attribute:t,componentTag:i,attributes:s,ComponentFn:r,onInit:o,observed:y.concat(c),onAttributeChange:a,onAttrChange:n,effects:u,declared:p,persist:h}),Ee();const j=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,k=l.subtreeQuery||(j?e:"["+e+"]"),A={selector:e,attribute:t,ComponentFn:r,onInit:o,onSubtreeChange:d,query:k};T().push(A),d&&k&&D().push(A),ne(),window[t]=w,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=re,window.lnCore.observeLifecycle=Se);function S(){_e()>0?Ae(function(){w(document.body)}):w(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",S):S(),w}function oe(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,r={},i=oe(t);if(!i)return r;const l=i.split("&");for(let c=0;c<l.length;c++){const a=l[c];if(!a)continue;const d=a.indexOf(":"),o=d>-1?a.slice(0,d):a,n=d>-1?a.slice(d+1):"";if(o)try{r[o]=decodeURIComponent(n)}catch{r[o]=n}}return r}function qe(e){if(!e)return null;const t=F();return e in t?t[e]:null}function Le(e,t){if(!e)return;const r=F();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(c){const a=r[c];return a===""?c:c+":"+encodeURIComponent(a)}).join("&");oe(location.hash)!==l&&(location.hash=l)}function Oe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Te(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 De(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ie(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function je(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(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=F,window.lnCore.hashGet=qe,window.lnCore.hashSet=Le,window.lnCore.hashLinkClick=Oe,window.lnCore.resolveHashNamespace=Te,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=Ie,window.lnCore.hashFilterEncode=Fe,window.lnCore.hashFilterDecode=je);function Re(){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=Re);const $e={offset:"offset",limit:"limit",search:"search",sortField:"sort_field",sortDir:"sort_dir"};function _(...e){return e.filter(t=>t!=null&&t!=="").map((t,r)=>{const i=String(t);return r===0?i.replace(/\/+$/,""):i.replace(/^\/+/,"").replace(/\/+$/,"")}).filter(Boolean).join("/")}function Ne(e,t){if(!e||typeof e!="object")return"";const r=Object.assign({},$e);if(t&&typeof t=="object")for(const l in t)t[l]!==void 0&&t[l]!==null&&t[l]!==""&&(r[l]=t[l]);const i=new URLSearchParams;return e.search&&i.append(r.search,e.search),e.offset!=null&&i.append(r.offset,e.offset),e.limit!=null&&i.append(r.limit,e.limit),e.sort&&e.sort.field&&e.sort.direction&&(i.append(r.sortField,e.sort.field),i.append(r.sortDir,e.sort.direction)),e.filters&&typeof e.filters=="object"&&Object.keys(e.filters).forEach(l=>{const c=e.filters[l];Array.isArray(c)&&c.length>0&&i.append(l,c.join(","))}),i.toString()}function Ue(e,t,r){let i=_(e,t);return r&&(i+=(i.indexOf("?")!==-1?"&":"?")+r),i}function ie(e){const t=e&&e.content!==void 0?e.content:e,r=e&&e.message?e.message:null;return{record:t,message:r}}(function(){const e="data-ln-api-connector",t="lnApiConnector",r="lnConnector";if(window[t]!==void 0)return;function i(n){const f=n[t];f&&f.refreshConfig()}const l={"data-ln-api-connector":{type:"marker",description:"Mounts API connector bridging REST backend and ln-ashlar data coordinators"},"data-ln-api-base-url":{prop:"baseUrl",read:C,type:"string",fallback:"",effect:i,description:"Base URL endpoint for API requests"},"data-ln-api-path":{prop:"path",read:C,type:"string",fallback:"",effect:i,description:"Resource path appended to base URL"},"data-ln-api-endpoint":{prop:"path",read:C,type:"string",fallback:"",effect:i,description:"Alias for data-ln-api-path"},"data-ln-api-headers":{prop:"rawHeaders",read:C,type:"json",fallback:null,effect:i,description:"Custom HTTP headers in JSON format or semicolon-separated pairs"},"data-ln-api-param-offset":{effect:i,type:"string",fallback:"offset",description:"Query parameter name for pagination offset"},"data-ln-api-param-limit":{effect:i,type:"string",fallback:"limit",description:"Query parameter name for pagination page size"},"data-ln-api-param-search":{effect:i,type:"string",fallback:"search",description:"Query parameter name for text search filter"},"data-ln-api-param-sort-field":{effect:i,type:"string",fallback:"sort_by",description:"Query parameter name for sort field"},"data-ln-api-param-sort-dir":{effect:i,type:"string",fallback:"sort_dir",description:"Query parameter name for sort direction"},"data-ln-api-connector-query-debounce":{effect:i,type:"integer",fallback:200,min:0,description:"Debounce delay in milliseconds before dispatching query requests"}},c=Z(l);function a(n){return n.ok?n.status===204?null:n.json():n.json().catch(()=>null).then(f=>{const s=new Error("HTTP "+n.status+": "+n.statusText);throw s.status=n.status,s.data=f,s})}function d(n){return this.dom=n,Y(this,n,c),n[t]=this,n[r]=this,this.namespace="ln-api-connector",this._inflight=new Map,this._queryTimers=new Map,this.refreshConfig(),this._handlers=null,o(this),this}d.prototype.refreshConfig=function(){const n=this.dom;this.credentials="same-origin",this.headers=de(this.rawHeaders);const f={},s=n.getAttribute("data-ln-api-param-offset");s&&(f.offset=s);const u=n.getAttribute("data-ln-api-param-limit");u&&(f.limit=u);const p=n.getAttribute("data-ln-api-param-search");p&&(f.search=p);const h=n.getAttribute("data-ln-api-param-sort-field");h&&(f.sortField=h);const w=n.getAttribute("data-ln-api-param-sort-dir");w&&(f.sortDir=w),this.paramKeys=f;const y=n.getAttribute("data-ln-api-connector-query-debounce");this.queryDebounce=y!==null?+y:300,b(this.dom,"ln-api-connector:config-changed",{baseUrl:this.baseUrl,path:this.path,headers:this.headers,paramKeys:this.paramKeys})},d.prototype._reqHeaders=function(n){const f=Object.assign({},this.headers);return!f.Accept&&!f.accept&&(f.Accept="application/json"),!f["Content-Type"]&&!f["content-type"]&&(f["Content-Type"]="application/json"),n&&(f["X-Idempotency-Key"]=n),f},d.prototype.cancel=function(n){return n&&this._inflight.has(n)?(this._inflight.get(n).abort(),this._inflight.delete(n),!0):!1},d.prototype.fetchDelta=function(n,f){const s=this;let u=_(s.baseUrl,s.path);n!=null&&n!==""&&(u+=(u.indexOf("?")!==-1?"&":"?")+"since="+encodeURIComponent(n));const p=f||"sync";s._inflight.has(p)&&s._inflight.get(p).abort();const h=new AbortController;return s._inflight.set(p,h),window.fetch(u,{method:"GET",headers:s._reqHeaders(),credentials:s.credentials,signal:h.signal}).then(a).finally(function(){s._inflight.get(p)===h&&s._inflight.delete(p)})},d.prototype.query=function(n,f){const s=this,u=Ne(n,s.paramKeys),p=Ue(s.baseUrl,s.path,u),h=f||"query";s._inflight.has(h)&&s._inflight.get(h).abort();const w=new AbortController;return s._inflight.set(h,w),window.fetch(p,{method:"GET",headers:s._reqHeaders(),credentials:s.credentials,signal:w.signal}).then(a).finally(function(){s._inflight.get(h)===w&&s._inflight.delete(h)})},d.prototype.create=function(n,f,s){const u=this;return window.fetch(_(u.baseUrl,f||u.path),{method:"POST",headers:u._reqHeaders(s),credentials:u.credentials,body:JSON.stringify(n)}).then(a)},d.prototype.update=function(n,f,s,u,p){const h=this;s!=null&&(f=Object.assign({},f,{expected_version:s}));const w=u?_(h.baseUrl,u):_(h.baseUrl,h.path,n);return window.fetch(w,{method:"PUT",headers:h._reqHeaders(p),credentials:h.credentials,body:JSON.stringify(f)}).then(a)},d.prototype.delete=function(n,f,s){const u=this;return window.fetch(_(u.baseUrl,f||u.path,n),{method:"DELETE",headers:u._reqHeaders(s),credentials:u.credentials}).then(a)},d.prototype.bulkDelete=function(n,f,s){const u=this;return window.fetch(_(u.baseUrl,f||u.path,"bulk-delete"),{method:"DELETE",headers:u._reqHeaders(s),credentials:u.credentials,body:JSON.stringify({ids:n})}).then(a)};function o(n){n._handlers={sync:function(f){const s=f.detail||{},u=s.meta&&s.meta.targetEl?s.meta.targetEl:null;n.fetchDelta(s.since,u).then(function(p){b(n.dom,"ln-api-connector:fetched",{data:p,since:s.since,meta:s.meta||null})}).catch(function(p){p&&p.name==="AbortError"||b(n.dom,"ln-api-connector:error",{action:"sync",error:p.message,status:p.status||0,data:p.data||null,since:s.since,meta:s.meta||null})})},query:function(f){const s=f.detail||{},u=s.query||s,p=s.meta&&s.meta.targetEl?s.meta.targetEl:null,h=p||"query",w=n.queryDebounce;function y(k,A,S){n.query(A,S).then(function(g){const m=g||{};b(n.dom,"ln-api-connector:fetched",{data:m.data||(Array.isArray(m)?m:[]),total:m.total,filtered:m.filtered,offset:A.offset,queryGen:A.queryGen,meta:k.meta||null})}).catch(function(g){g&&g.name==="AbortError"||b(n.dom,"ln-api-connector:error",{action:"query",error:g.message,status:g.status||0,data:g.data||null,meta:k.meta||null})})}if(w===0){y(s,u,p);return}n._queryTimers.has(h)&&clearTimeout(n._queryTimers.get(h));const j=setTimeout(function(){n._queryTimers.delete(h),y(s,u,p)},w);n._queryTimers.set(h,j)},cancel:function(f){const s=f.detail||{},u=s.meta&&s.meta.targetEl?s.meta.targetEl:s.targetEl||s.key;u&&n.cancel(u)},create:function(f){const s=f.detail||{};n.create(s.data,s.url,s.idempotencyKey).then(function(u){const p=ie(u);b(n.dom,"ln-api-connector:created",{record:p.record,tempId:s.tempId,message:p.message,meta:s.meta||null})}).catch(function(u){u&&u.name==="AbortError"||b(n.dom,"ln-api-connector:error",{action:"create",error:u.message,status:u.status||0,data:u.data||null,tempId:s.tempId,meta:s.meta||null})})},update:function(f){const s=f.detail||{};n.update(s.id,s.data,s.expected_version,s.url,s.idempotencyKey).then(function(u){const p=ie(u);b(n.dom,"ln-api-connector:updated",{record:p.record,id:s.id,message:p.message,meta:s.meta||null})}).catch(function(u){u&&u.name==="AbortError"||b(n.dom,"ln-api-connector:error",{action:"update",error:u.message,status:u.status||0,data:u.data||null,id:s.id,conflictData:u.status===409?u.data:null,meta:s.meta||null})})},delete:function(f){const s=f.detail||{};n.delete(s.id,s.url,s.idempotencyKey).then(function(u){const p=u&&u.message?u.message:null;b(n.dom,"ln-api-connector:deleted",{response:u,id:s.id,message:p,meta:s.meta||null})}).catch(function(u){u&&u.name==="AbortError"||b(n.dom,"ln-api-connector:error",{action:"delete",error:u.message,status:u.status||0,data:u.data||null,id:s.id,meta:s.meta||null})})},bulkDelete:function(f){const s=f.detail||{};n.bulkDelete(s.ids,s.url,s.idempotencyKey).then(function(u){const p=u&&u.message?u.message:null;b(n.dom,"ln-api-connector:bulk-deleted",{response:u,ids:s.ids,message:p,meta:s.meta||null})}).catch(function(u){u&&u.name==="AbortError"||b(n.dom,"ln-api-connector:error",{action:"bulk-delete",error:u.message,status:u.status||0,data:u.data||null,ids:s.ids,meta:s.meta||null})})}},n.dom.addEventListener("ln-api-connector:request-sync",n._handlers.sync),n.dom.addEventListener("ln-api-connector:request-query",n._handlers.query),n.dom.addEventListener("ln-api-connector:request-cancel",n._handlers.cancel),n.dom.addEventListener("ln-api-connector:request-create",n._handlers.create),n.dom.addEventListener("ln-api-connector:request-update",n._handlers.update),n.dom.addEventListener("ln-api-connector:request-delete",n._handlers.delete),n.dom.addEventListener("ln-api-connector:request-bulk-delete",n._handlers.bulkDelete)}d.prototype.destroy=function(){if(!this.dom[t])return;const n=this;n._inflight&&(n._inflight.forEach(function(f){f.abort()}),n._inflight.clear()),this._queryTimers&&(this._queryTimers.forEach(function(f){f&&clearTimeout(f)}),this._queryTimers.clear()),this._handlers&&(n.dom.removeEventListener("ln-api-connector:request-sync",n._handlers.sync),n.dom.removeEventListener("ln-api-connector:request-query",n._handlers.query),n.dom.removeEventListener("ln-api-connector:request-cancel",n._handlers.cancel),n.dom.removeEventListener("ln-api-connector:request-create",n._handlers.create),n.dom.removeEventListener("ln-api-connector:request-update",n._handlers.update),n.dom.removeEventListener("ln-api-connector:request-delete",n._handlers.delete),n.dom.removeEventListener("ln-api-connector:request-bulk-delete",n._handlers.bulkDelete),n._handlers=null),delete this.dom[t],delete this.dom[r]},re(e,t,d,"ln-api-connector",{attributes:l})})()})();