@livenetworks/ashlar 2.1.4 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/components/ln-accordion/ln-accordion.js +1 -1
  2. package/components/ln-ajax/ln-ajax.js +1 -1
  3. package/components/ln-api-connector/README.md +7 -1
  4. package/components/ln-api-connector/ln-api-connector.js +1 -1
  5. package/components/ln-api-connector/src/ln-api-connector.js +6 -2
  6. package/components/ln-api-queue/ln-api-queue.js +1 -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/helpers.js +1 -1
  12. package/components/ln-core/index.js +1 -1
  13. package/components/ln-core/lifecycle.js +41 -0
  14. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  15. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  16. package/components/ln-data-store/ln-data-store.js +1 -1
  17. package/components/ln-date/ln-date.js +1 -1
  18. package/components/ln-debug/ln-debug.js +1 -1
  19. package/components/ln-dropdown/ln-dropdown.js +1 -1
  20. package/components/ln-editor/ln-editor.js +1 -1
  21. package/components/ln-external-links/ln-external-links.js +1 -1
  22. package/components/ln-filter/ln-filter.js +1 -1
  23. package/components/ln-form/ln-form.js +1 -1
  24. package/components/ln-icon/ln-icon.js +1 -1
  25. package/components/ln-include/ln-include.js +1 -1
  26. package/components/ln-key/ln-key.js +1 -1
  27. package/components/ln-link/ln-link.js +1 -1
  28. package/components/ln-list/ln-list.js +1 -1
  29. package/components/ln-modal/ln-modal.js +1 -1
  30. package/components/ln-nav/ln-nav.js +1 -1
  31. package/components/ln-number/ln-number.js +1 -1
  32. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  33. package/components/ln-options/ln-options.js +1 -1
  34. package/components/ln-picklist/ln-picklist.js +1 -1
  35. package/components/ln-popover/ln-popover.js +1 -1
  36. package/components/ln-progress/ln-progress.js +1 -1
  37. package/components/ln-router/ln-router.js +1 -1
  38. package/components/ln-scroll/ln-scroll.js +1 -1
  39. package/components/ln-search/ln-search.js +1 -1
  40. package/components/ln-slug/ln-slug.js +1 -1
  41. package/components/ln-sort/ln-sort.js +1 -1
  42. package/components/ln-sort/src/ln-sort.js +13 -11
  43. package/components/ln-sortable/ln-sortable.js +1 -1
  44. package/components/ln-stat/ln-stat.js +1 -1
  45. package/components/ln-table/ln-table.js +1 -1
  46. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  47. package/components/ln-tabs/ln-tabs.js +1 -1
  48. package/components/ln-time/ln-time.js +1 -1
  49. package/components/ln-toast/ln-toast.js +1 -1
  50. package/components/ln-toggle/ln-toggle.js +1 -1
  51. package/components/ln-tooltip/ln-tooltip.js +1 -1
  52. package/components/ln-translations/ln-translations.js +1 -1
  53. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  54. package/components/ln-upload/ln-upload.js +1 -1
  55. package/components/ln-validate/ln-validate.js +1 -1
  56. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  57. package/package.json +1 -1
  58. package/web-types.json +2337 -2337
@@ -1 +1 @@
1
- (function(){"use strict";function I(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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
+ (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 i=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){i=t[r];break}if(!C(i))return}e.apply(console,t)}}function T(e,t,o){const i=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ee(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function te(e,t){const o=!!(t&&t.typed),i=t&&t.exclude,r={},s=e.elements,l={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")o&&l[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 ne(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function oe(e,t){const o=e.elements,i=[],r={};for(let s=0;s<o.length;s++){const l=o[s];l.name&&l.type==="checkbox"&&(r[l.name]=(r[l.name]||0)+1)}for(let s=0;s<o.length;s++){const l=o[s];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const c=l.getAttribute("data-ln-fill-as")||l.name;if(!c||!(c in t))continue;const n=t[c];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(r[l.name]>1){const a=String(n).split(",").map(function(u){return u.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=ne(n);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<l.options.length;a++)l.options[a].selected=n.indexOf(l.options[a].value)!==-1;i.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=oe,window.lnCore.serializeForm=te,window.lnCore.resolveFormMethod=ee);const q={};function re(e,t){q[e]=t}function ie(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=re,window.lnCore.getDataMapper=ie);function le(){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 se(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];F[o]=t}function ce(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=se,window.lnCore.getLocaleFallback=ce,window.lnCore.ensureLocaleObserver=le);const y={};function ae(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 l=0;l<o.length;l++){const c=o[l],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const c=i[l],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 l=0;l<r.length;l++){const c=r[l],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const c=s[l],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 ue(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<o.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[i],t??null),o[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)$(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 R(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(l,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const l=r[s],c=l.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function de(e,t,o,i,r,s){const l={};for(let n=0;n<e.children.length;n++){const a=e.children[n],u=a.getAttribute("data-ln-render-key");u&&(l[u]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],u=String(i(a));let d=l[u];if(d)r(d,a,n);else{const f=ae(o,s);if(!f||(R(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=R,window.lnCore.fill=$,window.lnCore.lnFill=ue,window.lnCore.renderList=de);function m(e,t,o){const i=e.getAttribute(t);return i===null?o:i}function N(e,t,o){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?o:i}function M(e,t,o=!1){const i=e.getAttribute(t);if(i===null)return!!o;const r=i.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 i=new Set(e||[]),r=function(s,l){const c=s.getAttribute(l);return c!==null&&i.has(c)?c:t};return A.set(o,r),r}function W(e,t,o){const i=parseFloat(e.getAttribute(t));return isNaN(i)?o:i}function U(e,t,o){const i=e.getAttribute(t);if(!i)return o;try{return JSON.parse(i)}catch{return o}}function V(e,t,o,i,r){if(!e||t===null)return!0;const s=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=n=>{r?console.warn(n,r):console.warn(n)};if(l==="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(l==="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(l==="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(l==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(l==="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 fe(e,t,o){for(const i in o){const[r,s,l]=o[i];Object.defineProperty(e,i,{get:function(){return r(t,s,l)},enumerable:!0,configurable:!0})}return e}function we(e){const t={};for(const o in e){const i=e[o];if(!i||!i.prop)continue;let r=i.read;if(!r&&i.type)switch(i.type){case"enum":r=j(i.values,i.fallback);break;case"integer":r=N;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[i.prop]=[r,o,i.fallback]}return t}function he(e){const t={};for(const o in e){const i=e[o];i&&i.effect&&(t[o]=i.effect)}return Object.keys(t).length?t:null}function be(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=fe,window.lnCore.attrSpec=we,window.lnCore.attrStr=m,window.lnCore.attrInt=N,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,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:o,ComponentFn:i};if(e.matches&&e.matches(s)&&h(e,l),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)h(c[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function pe(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ge(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 Ce(e){const t=Q(),o=e.observed||[];for(let i=0;i<o.length;i++){const r=o[i];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const r=t.byDeclaredAttr.get(i);r.some(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=be(e);if(i===null)t.reactiveWildcard.push(e);else for(const r of i)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function J(e,t,o,i){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const l=s.effects&&s.effects[o];l?l(t,o,i):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,i)}}function ye(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,i=Q(),r=i.byAttr.get(t),s=I()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!o&&!r&&!s)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(s&&C(l)){const c=i.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let a=0;a<c.length;a++)V(c[a].spec,n,t,c[a].componentTag,l)}if(window.lnCore._debugSink&&(o||r)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),o){const c=i.byReactive.get(t);c&&J(c,l,t,e.oldValue),i.reactiveWildcard.length&&J(i.reactiveWildcard,l,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const n=r[c];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(H(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function me(){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{ye(t[o])}catch(i){console.error("[ln-core] mutation handler failed",t[o].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function v(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function x(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function _(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function K(e){const t=v();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 i=x();if(e.target&&i.length)for(let r=0;r<i.length;r++){const s=i[r],l=s.query,c=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;c&&s.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const s=e.addedNodes[r];if(s.nodeType===1){const l=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!l)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){if(document.contains(s))continue;const l=!!(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(!l)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 z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){const e=new MutationObserver(function(t){for(let o=0;o<t.length;o++){const i=t[o];if(i.type==="childList")try{K(i)}catch(r){console.error("[ln-core] lifecycle handler failed",i.target,r)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const o=t.takeRecords();for(let i=0;i<o.length;i++){const r=o[i];if(r.type==="childList")try{K(r)}catch(s){console.error("[ln-core] lifecycle handler failed",r.target,s)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function ve(e){v().push(e),e.onSubtreeChange&&e.query&&x().push(e),z()}function G(e,t,o,i,r={}){const s=r.extraAttributes||[],l=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?he(d):u,Te=d?new Set(Object.keys(d)):null,qe=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 $e=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($e,D.getAttribute(b),b,i,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);Ce({selector:e,attribute:t,componentTag:i,attributes:d,ComponentFn:o,onInit:n,observed:S.concat(s),onAttributeChange:l,onAttrChange:a,effects:f,declared:Te,persist:qe}),me();const Fe=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,X=r.subtreeQuery||(Fe?e:"["+e+"]"),Y={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:X};v().push(Y),c&&X&&x().push(Y),z(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=ve,window.lnCore.withoutLifecycle=Ae);function Z(){pe()>0?ge(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Z):Z(),g}function P(e){return(e||"").replace(/^#/,"")}function k(e){const t=e===void 0?location.hash:e,o={},i=P(t);if(!i)return o;const r=i.split("&");for(let s=0;s<r.length;s++){const l=r[s];if(!l)continue;const c=l.indexOf(":"),n=c>-1?l.slice(0,c):l,a=c>-1?l.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 _e(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 l=o[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");P(location.hash)!==r&&(location.hash=r)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Se(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 i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ee(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Le(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function De(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),i=e.slice(t+1),r=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=k,window.lnCore.hashGet=xe,window.lnCore.hashSet=_e,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=Se,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Ee,window.lnCore.hashFilterEncode=Le,window.lnCore.hashFilterDecode=De);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-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 i(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 l=r.querySelectorAll("[data-ln-toggle]");for(const c of l)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}i.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-toggle:open",this._onToggleOpen),delete this.dom[t])},G(e,t,i,"ln-accordion",{attributes:o})})()})();
@@ -1 +1 @@
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
+ (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){if(document.contains(s))continue;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(){const e=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)}}});window.lnCore._lifecycleObserver=e,e.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 Oe(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 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=Oe,window.lnCore.resolveHashNamespace=je,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"]'),O=ee?ee.getAttribute("content"):null;d instanceof FormData&&O&&d.append("_token",O);const j={method:c,headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}};if(O&&(j.headers["X-CSRF-TOKEN"]=O),c==="GET"&&d){const b=new URLSearchParams(d);m=f+(f.includes("?")?"&":"?")+b.toString()}else c!=="GET"&&d&&(j.body=d);let k=null;if(c==="GET"){const b=new AbortController;j.signal=b.signal,k=function(){o=null,b.abort(),x(),y(h,"ln-ajax:aborted",{method:c,url:m})},o=k}fetch(m,j).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()})()})();
@@ -81,8 +81,14 @@ All attributes are dynamically observed. Any runtime changes to these attributes
81
81
  | `data-ln-api-connector` | Selector | Creates the component instance. Optional value serves as name. |
82
82
  | `data-ln-api-base-url` | Connection | The base URL of the API gateway (e.g. `https://api.example.com/v1` or `/api`). |
83
83
  | `data-ln-api-path` | Connection | Resource path endpoint (e.g. `/documents`). |
84
+ | `data-ln-api-endpoint` | Connection | Alias for `data-ln-api-path`. |
84
85
  | `data-ln-api-headers` | Credentials | JSON-formatted string of request headers (e.g. `{"Authorization": "Bearer tok_123"}`). |
85
- | `data-ln-api-connector-query-debounce="ms"` | Connection | Debounce delay in milliseconds for `request-query` events. Default `300`. Set to `0` to disable. Mutations (create/update/delete) are never debounced. |
86
+ | `data-ln-api-param-offset` | Parameters | Query parameter name for pagination offset (default: `'offset'`). |
87
+ | `data-ln-api-param-limit` | Parameters | Query parameter name for pagination page size (default: `'limit'`). |
88
+ | `data-ln-api-param-search` | Parameters | Query parameter name for text search filter (default: `'search'`). |
89
+ | `data-ln-api-param-sort-field` | Parameters | Query parameter name for sort field (default: `'sort_by'`). |
90
+ | `data-ln-api-param-sort-dir` | Parameters | Query parameter name for sort direction (default: `'sort_dir'`). |
91
+ | `data-ln-api-connector-query-debounce="ms"` | Connection | Debounce delay in milliseconds for `request-query` events. Default `200` ms. Set to `0` to disable. Mutations (create/update/delete) are never debounced. |
86
92
 
87
93
  ---
88
94
 
@@ -1 +1 @@
1
- (function(){"use strict";function U(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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})})()})();
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 o=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){o=t[l];break}if(!q(o))return}e.apply(console,t)}}function b(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 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 ae(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function se(e,t){const r=!!(t&&t.typed),o=t&&t.exclude,l={},c=e.elements,a={};if(r)for(let d=0;d<c.length;d++){const i=c[d];i.name&&i.type==="checkbox"&&!i.disabled&&(a[i.name]=(a[i.name]||0)+1)}for(let d=0;d<c.length;d++){const i=c[d];if(!(!i.name||i.disabled||i.type==="file"||i.type==="submit"||i.type==="button")&&!(o&&i.matches&&i.matches(o)))if(i.type==="checkbox")r&&a[i.name]===1?l[i.name]=i.checked:(l[i.name]||(l[i.name]=[]),i.checked&&l[i.name].push(i.value));else if(i.type==="radio")i.checked&&(l[i.name]=i.value);else if(i.type==="select-multiple"){l[i.name]=[];for(let n=0;n<i.options.length;n++)i.options[n].selected&&l[i.name].push(i.options[n].value)}else if(r&&i.type==="hidden")l[i.name]=i.value;else if(r&&(i.type==="number"||i.type==="range")){const n=Number(i.value);l[i.name]=i.value===""||isNaN(n)?null:n}else l[i.name]=i.value}return l}function ce(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function de(e,t){const r=e.elements,o=[],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 i=t[d];if(a.type==="checkbox"){if(Array.isArray(i))a.checked=i.indexOf(a.value)!==-1;else if(l[a.name]>1){const n=String(i).split(",").map(function(f){return f.trim()});a.checked=n.indexOf(a.value)!==-1}else a.checked=ce(i);o.push(a)}else if(a.type==="radio")a.checked=a.value===String(i),o.push(a);else if(a.type==="select-multiple"){if(Array.isArray(i))for(let n=0;n<a.options.length;n++)a.options[n].selected=i.indexOf(a.options[n].value)!==-1;o.push(a)}else a.value=i,a.tagName==="SELECT"&&i!=null&&a.setAttribute("data-ln-value",i),o.push(a)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=de,window.lnCore.serializeForm=se,window.lnCore.resolveFormMethod=ae);function ue(e,t="ln-core"){try{return e?JSON.parse(e):{}}catch(r){return console.error(`[${t}] Invalid headers JSON:`,r),{}}}const M={};function fe(e,t){M[e]=t}function he(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=fe,window.lnCore.getDataMapper=he);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 we(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];B[r]=t}function me(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=we,window.lnCore.getLocaleFallback=me,window.lnCore.ensureLocaleObserver=pe);const L={};function be(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],i=d.getAttribute("data-ln-field");t[i]!=null&&(d.textContent=t[i])}const o=e.querySelectorAll("[data-ln-attr]");for(let a=0;a<o.length;a++){const d=o[a],i=d.getAttribute("data-ln-attr").split(",");for(let n=0;n<i.length;n++){const f=i[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],i=d.getAttribute("data-ln-show");i in t&&d.classList.toggle("hidden",!t[i])}const c=e.querySelectorAll("[data-ln-class]");for(let a=0;a<c.length;a++){const d=c[a],i=d.getAttribute("data-ln-class").split(",");for(let n=0;n<i.length;n++){const f=i[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 ge(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)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 o=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 i=0;i<d.length;i++){const n=d[i];n.value.indexOf("{{")!==-1&&a.setAttribute(n.name,n.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function ye(e,t,r,o,l,c){const a={};for(let i=0;i<e.children.length;i++){const n=e.children[i],f=n.getAttribute("data-ln-render-key");f&&(a[f]=n)}const d=document.createDocumentFragment();for(let i=0;i<t.length;i++){const n=t[i],f=String(o(n));let s=a[f];if(s)l(s,n,i);else{const u=be(r,c);if(!u||(W(u,n),s=u.firstElementChild,!s))continue;s.setAttribute("data-ln-render-key",f),l(s,n,i)}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=ge,window.lnCore.renderList=ye);function C(e,t,r){const o=e.getAttribute(t);return o===null?r:o}function Q(e,t,r){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?r:o}function J(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 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 o=new Set(e||[]),l=function(c,a){const d=c.getAttribute(a);return d!==null&&o.has(d)?d:t};return O.set(r,l),l}function G(e,t,r){const o=parseFloat(e.getAttribute(t));return isNaN(o)?r:o}function z(e,t,r){const o=e.getAttribute(t);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function X(e,t,r,o,l){if(!e||t===null)return!0;const c=o||"ln-component",a=e.type;if(a==="trigger"||a==="marker"||a==="string"||a==="list"||!a||t===""&&e.fallback!==void 0)return!0;const d=i=>{l?console.warn(i,l):console.warn(i)};if(a==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(d(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(a==="enum"){const i=e.values||[];return i.includes(t)?!0:(d(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${i.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 i=parseInt(t,10);return e.min!==void 0&&i<e.min?(d(`[${c}] Value ${i} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(d(`[${c}] Value ${i} 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(i){return d(`[${c}] Invalid JSON for attribute "${r}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function Y(e,t,r){for(const o in r){const[l,c,a]=r[o];Object.defineProperty(e,o,{get:function(){return l(t,c,a)},enumerable:!0,configurable:!0})}return e}function Z(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=V(o.values,o.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[o.prop]=[l,r,o.fallback]}return t}function Ce(e){const t={};for(const r in e){const o=e[r];o&&o.effect&&(t[r]=o.effect)}return Object.keys(t).length?t:null}function _e(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,o){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",a={selector:t,attribute:r,ComponentFn:o};if(e.matches&&e.matches(c)&&v(e,a),e.querySelectorAll){const d=e.querySelectorAll(c);for(let i=0;i<d.length;i++)v(d[i],a)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ve(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 ke(e){const t=ee(),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(c=>c.componentTag===e.componentTag)||l.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=_e(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 te(e,t,r,o){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,o):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,o)}}function Ee(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,o=ee(),l=o.byAttr.get(t),c=U()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!r&&!l&&!c)return;const a=e.target;if(e.oldValue!==a.getAttribute(t)){if(c&&q(a)){const d=o.byDeclaredAttr.get(t),i=a.getAttribute(t);for(let n=0;n<d.length;n++)X(d[n].spec,i,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=o.byReactive.get(t);d&&te(d,a,t,e.oldValue),o.reactiveWildcard.length&&te(o.reactiveWildcard,a,t,e.oldValue)}if(l)for(let d=0;d<l.length;d++){const i=l[d];if(i.handler){i.handler(a,t,e.oldValue);continue}i.onAttributeChange&&a[i.attribute]?i.onAttributeChange(a,t):(P(a,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(a))}}}function xe(){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{Ee(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 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(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ne(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 o=D();if(e.target&&o.length)for(let l=0;l<o.length;l++){const c=o[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 i=t[d];if(i.selector&&i.attribute&&i.ComponentFn){if(!a)c.matches&&c.matches(i.query)&&v(c,i);else if(c.matches&&c.matches(i.query)&&v(c,i),c.querySelectorAll){const n=c.querySelectorAll(i.query);for(let f=0;f<n.length;f++)v(n[f],i)}}i.onInit&&i.onInit(c)}}}for(let l=0;l<e.removedNodes.length;l++){const c=e.removedNodes[l];if(c.nodeType===1){if(document.contains(c))continue;const a=!!(c.firstElementChild||c.children&&c.children.length);for(let d=0;d<t.length;d++){const i=t[d],n=i.query;if(n){if(!a)c.matches&&c.matches(n)&&I(c,i);else if(c.matches&&c.matches(n)&&I(c,i),c.querySelectorAll){const f=c.querySelectorAll(n);for(let s=0;s<f.length;s++)I(f[s],i)}}}}}}function re(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,x(function(){const e=new MutationObserver(function(t){for(let r=0;r<t.length;r++){const o=t[r];if(o.type==="childList")try{ne(o)}catch(l){console.error("[ln-core] lifecycle handler failed",o.target,l)}}});window.lnCore._lifecycleObserver=e,e.observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Se(e){if(typeof window>"u")return e();window.lnCore=window.lnCore||{};const t=window.lnCore._lifecycleObserver;if(!t)return e();const r=t.takeRecords();for(let o=0;o<r.length;o++){const l=r[o];if(l.type==="childList")try{ne(l)}catch(c){console.error("[ln-core] lifecycle handler failed",l.target,c)}}t.disconnect();try{return e()}finally{t.observe(document.body,{childList:!0,subtree:!0})}}function qe(e){T().push(e),e.onSubtreeChange&&e.query&&D().push(e),re()}function oe(e,t,r,o,l={}){const c=l.extraAttributes||[],a=l.onAttributeChange||null,d=l.onSubtreeChange||null,i=l.onInit||null,n=l.onAttrChange||null,f=l.effects||null,s=l.attributes||null,u=s?Ce(s):f,h=s?new Set(Object.keys(s)):null,p=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 Be=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(Be,N.getAttribute(E),E,o,N)}}i&&i(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);ke({selector:e,attribute:t,componentTag:o,attributes:s,ComponentFn:r,onInit:i,observed:y.concat(c),onAttributeChange:a,onAttrChange:n,effects:u,declared:h,persist:p}),xe();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:i,onSubtreeChange:d,query:k};T().push(A),d&&k&&D().push(A),re(),window[t]=w,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=oe,window.lnCore.observeLifecycle=qe,window.lnCore.withoutLifecycle=Se);function S(){Ae()>0?ve(function(){w(document.body)}):w(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",S):S(),w}function ie(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,r={},o=ie(t);if(!o)return r;const l=o.split("&");for(let c=0;c<l.length;c++){const a=l[c];if(!a)continue;const d=a.indexOf(":"),i=d>-1?a.slice(0,d):a,n=d>-1?a.slice(d+1):"";if(i)try{r[i]=decodeURIComponent(n)}catch{r[i]=n}}return r}function Le(e){if(!e)return null;const t=F();return e in t?t[e]:null}function Oe(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("&");ie(location.hash)!==l&&(location.hash=l)}function Te(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function De(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 Ie(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Fe(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function je(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Re(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),o=e.slice(t+1),l=o?o.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=Le,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Te,window.lnCore.resolveHashNamespace=De,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=je,window.lnCore.hashFilterDecode=Re);function $e(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=$e);const Ne={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 o=String(t);return r===0?o.replace(/\/+$/,""):o.replace(/^\/+/,"").replace(/\/+$/,"")}).filter(Boolean).join("/")}function Ue(e,t){if(!e||typeof e!="object")return"";const r=Object.assign({},Ne);if(t&&typeof t=="object")for(const l in t)t[l]!==void 0&&t[l]!==null&&t[l]!==""&&(r[l]=t[l]);const o=new URLSearchParams;return e.search&&o.append(r.search,e.search),e.offset!=null&&o.append(r.offset,e.offset),e.limit!=null&&o.append(r.limit,e.limit),e.sort&&e.sort.field&&e.sort.direction&&(o.append(r.sortField,e.sort.field),o.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&&o.append(l,c.join(","))}),o.toString()}function Me(e,t,r){let o=_(e,t);return r&&(o+=(o.indexOf("?")!==-1?"&":"?")+r),o}function le(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 o(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:o,description:"Base URL endpoint for API requests"},"data-ln-api-path":{prop:"path",read:function(n){return n.getAttribute("data-ln-api-path")||n.getAttribute("data-ln-api-endpoint")||""},type:"string",fallback:"",effect:o,description:"Resource path appended to base URL"},"data-ln-api-endpoint":{read:function(n){return n.getAttribute("data-ln-api-path")||n.getAttribute("data-ln-api-endpoint")||""},type:"string",fallback:"",effect:o,description:"Alias for data-ln-api-path"},"data-ln-api-headers":{prop:"rawHeaders",read:C,type:"json",fallback:null,effect:o,description:"Custom HTTP headers in JSON format or semicolon-separated pairs"},"data-ln-api-param-offset":{effect:o,type:"string",fallback:"offset",description:"Query parameter name for pagination offset"},"data-ln-api-param-limit":{effect:o,type:"string",fallback:"limit",description:"Query parameter name for pagination page size"},"data-ln-api-param-search":{effect:o,type:"string",fallback:"search",description:"Query parameter name for text search filter"},"data-ln-api-param-sort-field":{effect:o,type:"string",fallback:"sort_by",description:"Query parameter name for sort field"},"data-ln-api-param-sort-dir":{effect:o,type:"string",fallback:"sort_dir",description:"Query parameter name for sort direction"},"data-ln-api-connector-query-debounce":{effect:o,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,i(this),this}d.prototype.refreshConfig=function(){const n=this.dom;this.credentials="same-origin",this.headers=ue(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 h=n.getAttribute("data-ln-api-param-search");h&&(f.search=h);const p=n.getAttribute("data-ln-api-param-sort-field");p&&(f.sortField=p);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 h=f||"sync";s._inflight.has(h)&&s._inflight.get(h).abort();const p=new AbortController;return s._inflight.set(h,p),window.fetch(u,{method:"GET",headers:s._reqHeaders(),credentials:s.credentials,signal:p.signal}).then(a).finally(function(){s._inflight.get(h)===p&&s._inflight.delete(h)})},d.prototype.query=function(n,f){const s=this,u=Ue(n,s.paramKeys),h=Me(s.baseUrl,s.path,u),p=f||"query";s._inflight.has(p)&&s._inflight.get(p).abort();const w=new AbortController;return s._inflight.set(p,w),window.fetch(h,{method:"GET",headers:s._reqHeaders(),credentials:s.credentials,signal:w.signal}).then(a).finally(function(){s._inflight.get(p)===w&&s._inflight.delete(p)})},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,h){const p=this;s!=null&&(f=Object.assign({},f,{expected_version:s}));const w=u?_(p.baseUrl,u):_(p.baseUrl,p.path,n);return window.fetch(w,{method:"PUT",headers:p._reqHeaders(h),credentials:p.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 i(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(h){b(n.dom,"ln-api-connector:fetched",{data:h,since:s.since,meta:s.meta||null})}).catch(function(h){h&&h.name==="AbortError"||b(n.dom,"ln-api-connector:error",{action:"sync",error:h.message,status:h.status||0,data:h.data||null,since:s.since,meta:s.meta||null})})},query:function(f){const s=f.detail||{},u=s.query||s,h=s.meta&&s.meta.targetEl?s.meta.targetEl:null,p=h||"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,h);return}n._queryTimers.has(p)&&clearTimeout(n._queryTimers.get(p));const j=setTimeout(function(){n._queryTimers.delete(p),y(s,u,h)},w);n._queryTimers.set(p,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 h=le(u);b(n.dom,"ln-api-connector:created",{record:h.record,tempId:s.tempId,message:h.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 h=le(u);b(n.dom,"ln-api-connector:updated",{record:h.record,id:s.id,message:h.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 h=u&&u.message?u.message:null;b(n.dom,"ln-api-connector:deleted",{response:u,id:s.id,message:h,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 h=u&&u.message?u.message:null;b(n.dom,"ln-api-connector:bulk-deleted",{response:u,ids:s.ids,message:h,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]},oe(e,t,d,"ln-api-connector",{attributes:l})})()})();
@@ -14,11 +14,15 @@ import { buildQueryParams, buildQueryUrl, joinUrl, unwrapEnvelope } from './conn
14
14
  instance.refreshConfig();
15
15
  }
16
16
 
17
+ function _readPath(el) {
18
+ return el.getAttribute('data-ln-api-path') || el.getAttribute('data-ln-api-endpoint') || '';
19
+ }
20
+
17
21
  const ATTRIBUTES = {
18
22
  'data-ln-api-connector': { type: 'marker', description: 'Mounts API connector bridging REST backend and ln-ashlar data coordinators' },
19
23
  'data-ln-api-base-url': { prop: 'baseUrl', read: attrStr, type: 'string', fallback: '', effect: _syncAttribute, description: 'Base URL endpoint for API requests' },
20
- 'data-ln-api-path': { prop: 'path', read: attrStr, type: 'string', fallback: '', effect: _syncAttribute, description: 'Resource path appended to base URL' },
21
- 'data-ln-api-endpoint': { prop: 'path', read: attrStr, type: 'string', fallback: '', effect: _syncAttribute, description: 'Alias for data-ln-api-path' },
24
+ 'data-ln-api-path': { prop: 'path', read: _readPath, type: 'string', fallback: '', effect: _syncAttribute, description: 'Resource path appended to base URL' },
25
+ 'data-ln-api-endpoint': { read: _readPath, type: 'string', fallback: '', effect: _syncAttribute, description: 'Alias for data-ln-api-path' },
22
26
  'data-ln-api-headers': { prop: 'rawHeaders', read: attrStr, type: 'json', fallback: null, effect: _syncAttribute, description: 'Custom HTTP headers in JSON format or semicolon-separated pairs' },
23
27
  'data-ln-api-param-offset': { effect: _syncAttribute, type: 'string', fallback: 'offset', description: 'Query parameter name for pagination offset' },
24
28
  'data-ln-api-param-limit': { effect: _syncAttribute, type: 'string', fallback: 'limit', description: 'Query parameter name for pagination page size' },