@livenetworks/ashlar 2.0.10 → 2.1.1
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.
- package/components/ln-accordion/ln-accordion.js +1 -1
- package/components/ln-ajax/ln-ajax.js +1 -1
- package/components/ln-ajax/src/ln-ajax.js +15 -26
- package/components/ln-api-connector/ln-api-connector.js +1 -1
- package/components/ln-api-queue/ln-api-queue.js +1 -1
- package/components/ln-autoresize/ln-autoresize.js +1 -1
- package/components/ln-autosave/ln-autosave.js +1 -1
- package/components/ln-chart/ln-chart.js +1 -1
- package/components/ln-circular-progress/ln-circular-progress.js +1 -1
- package/components/ln-confirm/ln-confirm.js +1 -1
- package/components/ln-core/helpers.js +1 -1
- package/components/ln-core/index.js +1 -1
- package/components/ln-core/lifecycle.js +106 -40
- package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
- package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
- package/components/ln-data-store/ln-data-store.js +1 -1
- package/components/ln-date/ln-date.js +1 -1
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-dropdown/ln-dropdown.js +1 -1
- package/components/ln-editor/ln-editor.js +1 -1
- package/components/ln-editor/src/ln-editor.js +45 -12
- package/components/ln-external-links/ln-external-links.js +1 -1
- package/components/ln-external-links/src/ln-external-links.js +9 -21
- package/components/ln-filter/ln-filter.js +1 -1
- package/components/ln-form/ln-form.js +1 -1
- package/components/ln-icon/ln-icon.js +1 -1
- package/components/ln-icon/src/ln-icon.js +14 -16
- package/components/ln-include/ln-include.js +1 -1
- package/components/ln-key/ln-key.js +1 -1
- package/components/ln-link/ln-link.js +1 -1
- package/components/ln-link/src/ln-link.js +16 -26
- package/components/ln-list/ln-list.js +1 -1
- package/components/ln-modal/ln-modal.js +1 -1
- package/components/ln-nav/ln-nav.js +1 -1
- package/components/ln-nav/src/ln-nav.js +5 -4
- package/components/ln-number/ln-number.js +1 -1
- package/components/ln-obfuscator/ln-obfuscator.js +1 -1
- package/components/ln-options/ln-options.js +1 -1
- package/components/ln-persist/ln-persist.js +1 -1
- package/components/ln-picklist/ln-picklist.js +1 -1
- package/components/ln-popover/ln-popover.js +1 -1
- package/components/ln-progress/ln-progress.js +1 -1
- package/components/ln-progress/src/ln-progress.js +9 -21
- package/components/ln-router/ln-router.js +1 -1
- package/components/ln-scroll/ln-scroll.js +1 -1
- package/components/ln-search/ln-search.js +1 -1
- package/components/ln-slug/ln-slug.js +1 -1
- package/components/ln-sort/ln-sort.js +1 -1
- package/components/ln-sortable/ln-sortable.js +1 -1
- package/components/ln-stat/ln-stat.js +1 -1
- package/components/ln-table/ln-table.js +1 -1
- package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
- package/components/ln-tabs/ln-tabs.js +1 -1
- package/components/ln-time/ln-time.js +1 -1
- package/components/ln-toast/ln-toast.js +1 -1
- package/components/ln-toggle/ln-toggle.js +1 -1
- package/components/ln-tooltip/ln-tooltip.js +1 -1
- package/components/ln-translations/ln-translations.js +1 -1
- package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
- package/components/ln-upload/ln-upload.js +1 -1
- package/components/ln-validate/ln-validate.js +1 -1
- package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function fe(){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 re(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 a=1;a<t.length;a++)if(t[a]&&t[a].nodeType===1){i=t[a];break}if(!re(i))return}e.apply(console,t)}}function v(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 Q(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){Q(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Pe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Fe(e,t){const o=!!(t&&t.typed),i=t&&t.exclude,a={},s=e.elements,l={};if(o)for(let d=0;d<s.length;d++){const c=s[d];c.name&&c.type==="checkbox"&&!c.disabled&&(l[c.name]=(l[c.name]||0)+1)}for(let d=0;d<s.length;d++){const c=s[d];if(!(!c.name||c.disabled||c.type==="file"||c.type==="submit"||c.type==="button")&&!(i&&c.matches&&c.matches(i)))if(c.type==="checkbox")o&&l[c.name]===1?a[c.name]=c.checked:(a[c.name]||(a[c.name]=[]),c.checked&&a[c.name].push(c.value));else if(c.type==="radio")c.checked&&(a[c.name]=c.value);else if(c.type==="select-multiple"){a[c.name]=[];for(let w=0;w<c.options.length;w++)c.options[w].selected&&a[c.name].push(c.options[w].value)}else if(o&&c.type==="hidden")a[c.name]=c.value;else if(o&&(c.type==="number"||c.type==="range")){const w=Number(c.value);a[c.name]=c.value===""||isNaN(w)?null:w}else a[c.name]=c.value}return a}function je(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function $e(e,t){const o=e.elements,i=[],a={};for(let s=0;s<o.length;s++){const l=o[s];l.name&&l.type==="checkbox"&&(a[l.name]=(a[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 d=l.getAttribute("data-ln-fill-as")||l.name;if(!d||!(d in t))continue;const c=t[d];if(l.type==="checkbox"){if(Array.isArray(c))l.checked=c.indexOf(l.value)!==-1;else if(a[l.name]>1){const w=String(c).split(",").map(function(b){return b.trim()});l.checked=w.indexOf(l.value)!==-1}else l.checked=je(c);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(c),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(c))for(let w=0;w<l.options.length;w++)l.options[w].selected=c.indexOf(l.options[w].value)!==-1;i.push(l)}else l.value=c,l.tagName==="SELECT"&&c!=null&&l.setAttribute("data-ln-value",c),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=$e,window.lnCore.serializeForm=Fe,window.lnCore.resolveFormMethod=Pe);const he={};function Ke(e,t){he[e]=t}function Ue(e){return he[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ke,window.lnCore.getDataMapper=Ue);function Ve(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,Q(function(){new MutationObserver(function(){v(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const we={};function Ge(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];we[o]=t}function He(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return we[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Ge,window.lnCore.getLocaleFallback=He,window.lnCore.ensureLocaleObserver=Ve);const oe={};function We(e,t){oe[e]||(oe[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=oe[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function ye(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let l=0;l<o.length;l++){const d=o[l],c=d.getAttribute("data-ln-field");t[c]!=null&&(d.textContent=t[c])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const d=i[l],c=d.getAttribute("data-ln-attr").split(",");for(let w=0;w<c.length;w++){const b=c[w].trim().split(":");if(b.length!==2)continue;const _=b[0].trim(),x=b[1].trim();t[x]!=null&&d.setAttribute(_,t[x])}}const a=e.querySelectorAll("[data-ln-show]");for(let l=0;l<a.length;l++){const d=a[l],c=d.getAttribute("data-ln-show");c in t&&d.classList.toggle("hidden",!t[c])}const s=e.querySelectorAll("[data-ln-class]");for(let l=0;l<s.length;l++){const d=s[l],c=d.getAttribute("data-ln-class").split(",");for(let w=0;w<c.length;w++){const b=c[w].trim().split(":");if(b.length!==2)continue;const _=b[0].trim(),x=b[1].trim();x in t&&d.classList.toggle(_,!!t[x])}}return e}function Qe(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)ye(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 pe(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,d){return t[d]!==void 0?t[d]:""}))}const i=function(s,l){return t[l]!==void 0?t[l]:""},a=Array.from(e.querySelectorAll("*"));e.nodeType===1&&a.push(e);for(let s=0;s<a.length;s++){const l=a[s],d=l.attributes;for(let c=0;c<d.length;c++){const w=d[c];w.value.indexOf("{{")!==-1&&l.setAttribute(w.name,w.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function Je(e,t,o,i,a,s){const l={};for(let c=0;c<e.children.length;c++){const w=e.children[c],b=w.getAttribute("data-ln-render-key");b&&(l[b]=w)}const d=document.createDocumentFragment();for(let c=0;c<t.length;c++){const w=t[c],b=String(i(w));let _=l[b];if(_)a(_,w,c);else{const x=We(o,s);if(!x||(pe(x,w),_=x.firstElementChild,!_))continue;_.setAttribute("data-ln-render-key",b),a(_,w,c)}d.appendChild(_)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=pe,window.lnCore.fill=ye,window.lnCore.lnFill=Qe,window.lnCore.renderList=Je);function ie(e,t,o){const i=e.getAttribute(t);return i===null?o:i}function J(e,t,o){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?o:i}function ae(e,t,o=!1){const i=e.getAttribute(t);if(i===null)return!!o;const a=i.trim().toLowerCase();return!(a==="false"||a==="0")}function se(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const le=new Map;function me(e,t){const o=(e?e.join("|"):"")+"::"+t;if(le.has(o))return le.get(o);const i=new Set(e||[]),a=function(s,l){const d=s.getAttribute(l);return d!==null&&i.has(d)?d:t};return le.set(o,a),a}function ge(e,t,o){const i=parseFloat(e.getAttribute(t));return isNaN(i)?o:i}function be(e,t,o){const i=e.getAttribute(t);if(!i)return o;try{return JSON.parse(i)}catch{return o}}function _e(e,t,o,i,a){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 d=c=>{a?console.warn(c,a):console.warn(c)};if(l==="boolean"){const c=t.trim().toLowerCase();return c!==""&&c!=="true"&&c!=="false"&&c!=="1"&&c!=="0"?(d(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const c=e.values||[];return c.includes(t)?!0:(d(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${c.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return d(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const c=parseInt(t,10);return e.min!==void 0&&c<e.min?(d(`[${s}] Value ${c} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&c>e.max?(d(`[${s}] Value ${c} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(d(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(c){return d(`[${s}] Invalid JSON for attribute "${o}": ${c.message}. Fallback: ${e.fallback}.`),!1}return!0}function Ce(e,t,o){for(const i in o){const[a,s,l]=o[i];Object.defineProperty(e,i,{get:function(){return a(t,s,l)},enumerable:!0,configurable:!0})}return e}function Se(e){const t={};for(const o in e){const i=e[o];if(!i||!i.prop)continue;let a=i.read;if(!a&&i.type)switch(i.type){case"enum":a=me(i.values,i.fallback);break;case"integer":a=J;break;case"float":a=ge;break;case"boolean":a=ae;break;case"list":a=se;break;case"json":a=be;break;case"string":default:a=ie;break}a||(a=ie),t[i.prop]=[a,o,i.fallback]}return t}function Ze(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 Xe(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Ce,window.lnCore.attrSpec=Se,window.lnCore.attrStr=ie,window.lnCore.attrInt=J,window.lnCore.attrBool=ae,window.lnCore.attrList=se,window.lnCore.attrEnum=me,window.lnCore.attrFloat=ge,window.lnCore.attrJson=be);function ce(e,t,o,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(s));e.matches&&e.matches(s)&&l.push(e);for(const d of l)if(!d[o]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[o]=new i(d)}catch(c){console.error("["+o+"] init failed",d,c)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ye(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function et(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 ve(){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 tt(e){const t=ve(),o=e.observed||[];for(let i=0;i<o.length;i++){const a=o[i];t.byAttr.has(a)||t.byAttr.set(a,[]),t.byAttr.get(a).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const a=t.byDeclaredAttr.get(i);a.some(s=>s.componentTag===e.componentTag)||a.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=Xe(e);if(i===null)t.reactiveWildcard.push(e);else for(const a of i)t.byReactive.has(a)||t.byReactive.set(a,[]),t.byReactive.get(a).push(e)}e.persist&&t.persist.push(e)}function Ae(e,t,o,i){for(let a=0;a<e.length;a++){const s=e[a];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 nt(e){const t=e.target,o=e.attributeName;if(e.oldValue===t.getAttribute(o))return;const i=ve(),a=i.byAttr.get(o);if(fe()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(o)&&re(t)){const s=i.byDeclaredAttr.get(o),l=t.getAttribute(o);for(let d=0;d<s.length;d++)_e(s[d].spec,l,o,s[d].componentTag,t)}if(window.lnCore._debugSink&&(o.indexOf("data-ln-")===0||a)&&window.lnCore._debugSink("attr",o,t,{oldValue:e.oldValue,newValue:t.getAttribute(o)}),o.indexOf("data-ln-")===0){const s=i.byReactive.get(o);s&&Ae(s,t,o,e.oldValue),i.reactiveWildcard.length&&Ae(i.reactiveWildcard,t,o,e.oldValue)}if(a)for(let s=0;s<a.length;s++){const l=a[s];if(l.handler){l.handler(t,o,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,o):(ce(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function rt(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,Q(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{nt(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 xe(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ot(e){const t=xe();if(t.length){if(e.target)for(let o=0;o<t.length;o++){const i=t[o];if(i.onSubtreeChange){const a=i.query,s=e.target.nodeType===1?e.target.matches(a)?e.target:e.target.closest(a):e.target.parentElement?e.target.parentElement.closest(a):null;s&&i.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const i=e.addedNodes[o];if(i.nodeType===1)for(let a=0;a<t.length;a++){const s=t[a];ce(i,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(i)}}for(let o=0;o<e.removedNodes.length;o++){const i=e.removedNodes[o];if(i.nodeType===1)for(let a=0;a<t.length;a++){const s=t[a],l=s.query,d=Array.from(i.querySelectorAll(l));i.matches&&i.matches(l)&&d.push(i);for(let c=0;c<d.length;c++){const w=d[c];if(!document.contains(w)){const b=w[s.attribute];if(b&&typeof b.destroy=="function")try{b.destroy()}catch(_){console.error("["+s.attribute+"] destroy failed",w,_)}delete w[s.attribute]}}}}}}function it(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,Q(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const i=t[o];if(i.type==="childList")try{ot(i)}catch(a){console.error("[ln-core] lifecycle handler failed",i.target,a)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function ke(e,t,o,i,a={}){const s=a.extraAttributes||[],l=a.onAttributeChange||null,d=a.onSubtreeChange||null,c=a.onInit||null,w=a.onAttrChange||null,b=a.effects||null,_=a.attributes||null,x=_?Ze(_):b,P=_?new Set(Object.keys(_)):null,F=a.persist||null;function m(k){const I=k||document.body;if(ce(I,e,t,o),_&&fe())for(const j in _){const Z=_[j],G=Array.from(I.querySelectorAll("["+j+"]"));I.matches&&I.matches("["+j+"]")&&G.push(I);for(let K=0;K<G.length;K++){const B=G[K];re(B)&&_e(Z,B.getAttribute(j),j,i,B)}}c&&c(I)}const S=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let I;for(;(I=k.exec(e))!==null;)S.push(I[1])}else S.push(e);tt({selector:e,attribute:t,componentTag:i,attributes:_,ComponentFn:o,onInit:c,observed:S.concat(s),onAttributeChange:l,onAttrChange:w,effects:x,declared:P,persist:F}),rt();const q=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,N=a.subtreeQuery||(q?e:"["+e+"]");xe().push({selector:e,attribute:t,ComponentFn:o,onInit:c,onSubtreeChange:d,query:N}),it(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ke);function A(){Ye()>0?et(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",A):A(),m}function at(e){let t=!1;for(let o=0;o<e.length;o++){const i=e[o];if(!(i===""||i==null)&&(t=!0,!Number.isFinite(Number(i))))return"string"}return t?"number":"string"}function st(e,t,o,i){if(o==="number"){const l=parseFloat(e),d=parseFloat(t);return(isNaN(l)?0:l)-(isNaN(d)?0:d)}const a=e!=null?String(e):"",s=t!=null?String(t):"";return i?i.compare(a,s):a<s?-1:a>s?1:0}function Ie(e){return(e||"").replace(/^#/,"")}function ue(e){const t=e===void 0?location.hash:e,o={},i=Ie(t);if(!i)return o;const a=i.split("&");for(let s=0;s<a.length;s++){const l=a[s];if(!l)continue;const d=l.indexOf(":"),c=d>-1?l.slice(0,d):l,w=d>-1?l.slice(d+1):"";if(c)try{o[c]=decodeURIComponent(w)}catch{o[c]=w}}return o}function lt(e){if(!e)return null;const t=ue();return e in t?t[e]:null}function ct(e,t){if(!e)return;const o=ue();t==null?delete o[e]:o[e]=String(t);const a=Object.keys(o).map(function(s){const l=o[s];return l===""?s:s+":"+encodeURIComponent(l)}).join("&");Ie(location.hash)!==a&&(location.hash=a)}function ut(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function dt(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 ft(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ht(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 wt(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function yt(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),a=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=ue,window.lnCore.hashGet=lt,window.lnCore.hashSet=ct,window.lnCore.hashLinkClick=ut,window.lnCore.resolveHashNamespace=dt,window.lnCore.hashSortEncode=ft,window.lnCore.hashSortDecode=ht,window.lnCore.hashFilterEncode=wt,window.lnCore.hashFilterDecode=yt);let V=null;const pt="ln-ashlar:storage-salt:v1",Ee=32768;function qe(e){let t="";const o=e.byteLength;for(let i=0;i<o;i+=Ee)t+=String.fromCharCode.apply(null,e.subarray(i,Math.min(i+Ee,o)));return btoa(t)}function Ne(e){const t=atob(e),o=t.length,i=new Uint8Array(o);for(let a=0;a<o;a++)i[a]=t.charCodeAt(a);return i}function Le(e,t){let o=V,i={};return typeof CryptoKey<"u"&&e instanceof CryptoKey?o=e:e&&typeof e=="object"&&(i=e,typeof CryptoKey<"u"&&i.key instanceof CryptoKey&&(o=i.key)),{key:o,options:i}}async function mt(e,t={}){if(!e)throw new Error("[ln-crypto] Key derivation failed: Secret string is required");const o=t.method||"pbkdf2",i=new TextEncoder;if(o==="sha256"){const c=await crypto.subtle.digest("SHA-256",i.encode(e));return crypto.subtle.importKey("raw",c,{name:"AES-GCM"},!1,["encrypt","decrypt"])}const a=t.salt||pt,s=typeof a=="string"?i.encode(a):a,l=t.iterations||1e5,d=await crypto.subtle.importKey("raw",i.encode(e),"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:s,iterations:l,hash:"SHA-256"},d,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function Te(e,t={}){if(!e){V=null;return}try{const o=t.method||"sha256";V=await mt(e,{...t,method:o})}catch(o){throw console.error("[ln-core/crypto] Key derivation failed:",o),V=null,o}}function M(){return V}async function gt(e,t,o){const{key:i}=Le(t);if(e==null)return e;if(!i)throw new Error("[ln-crypto] Encryption failed: No active cryptographic key provided");try{const a=new TextEncoder,s=crypto.getRandomValues(new Uint8Array(12)),l=typeof e=="string"?e:JSON.stringify(e),d=await crypto.subtle.encrypt({name:"AES-GCM",iv:s},i,a.encode(l));return{v:1,alg:"AES-GCM",encrypted:!0,iv:qe(s),data:qe(new Uint8Array(d))}}catch(a){throw console.error("[ln-core/crypto] Encryption failed:",a),new Error("[ln-crypto] Encryption failed: "+(a&&a.message?a.message:String(a)))}}async function bt(e,t,o){const{key:i,options:a}=Le(t),s=a.silent===!0;if(!e||!e.encrypted)return e;if(!i){if(s)return{...e,decryptionError:!0};throw new Error("[ln-crypto] Decryption failed: No active cryptographic key provided")}if(!e.iv||!e.data){if(s)return{...e,decryptionError:!0};throw new Error("[ln-crypto] Decryption failed: Malformed envelope (missing iv or data)")}try{const l=new TextDecoder,d=Ne(e.iv),c=Ne(e.data),w=await crypto.subtle.decrypt({name:"AES-GCM",iv:d},i,c),b=l.decode(w);try{return JSON.parse(b)}catch{return b}}catch(l){if(s)return{...e,decryptionError:!0};throw console.error("[ln-core/crypto] Decryption failed. Key may be incorrect or payload tampered:",l),new Error("[ln-crypto] Decryption failed. Key may be incorrect or payload tampered: "+(l&&l.message?l.message:String(l)))}}function _t(){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=_t);function Ct(e){return String(e||"").trim().toLowerCase()}function St(e){const t=Ct(e);return t?t.split(/\s+/).filter(Boolean):[]}function vt(e,t){if(!t||t.length===0)return!0;if(!e)return!1;const o=String(e).toLowerCase();for(let i=0;i<t.length;i++)if(o.indexOf(t[i])===-1)return!1;return!0}function At(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const o=String(e).trim().toLowerCase();for(let i=0;i<t.length;i++)if(String(t[i]).trim().toLowerCase()===o)return!0;return!1}function xt(e={}){let t=e.windowSize>0?e.windowSize:1e3,o=e.pageSize>0?e.pageSize:200,i=e.fetchDebounce!=null?e.fetchDebounce:120;const a=typeof e.requestPage=="function"?e.requestPage:()=>{},s=new Map,l=new Set;let d=0,c=0,w=0,b=!1,_=null;function x(m,S){s.delete(m),s.set(m,S)}function P(){if(s.size<=t)return[];const m=[];for(;s.size>t;){const q=s.keys().next().value;m.push(s.get(q)),s.delete(q)}const S=new Set(s.values());return m.filter(q=>!S.has(q))}function F(m,S){l.add(m),clearTimeout(_),_=setTimeout(()=>a(m,o,S),i)}return{get logicalTotal(){return d},set logicalTotal(m){d=m},get grandTotal(){return c},set grandTotal(m){c=m},get queryGen(){return w},set queryGen(m){w=m},get size(){return s.size},get hasLoaded(){return b},getId:m=>{if(!s.has(m))return;const S=s.get(m);return x(m,S),S},ensure:(m,S,q)=>{if(!b&&!l.has(0))return F(0,q);if(d<=0)return;const N=Math.max(0,m),A=Math.min(d,S);for(let k=N;k<A;k++)if(!s.has(k)){const I=Math.floor(k/o)*o;if(!l.has(I))return F(I,q)}},ingest:(m,S,q,N,A)=>{if(A!=null&&A!==w)return[];b=!0,q!=null&&(c=q),N!=null&&(d=N);for(let k=0;k<S.length;k++)x(m+k,S[k]);return l.delete(m),P()},reset:function(){w++,this.clear()},clear:()=>{b=!1,s.clear(),l.clear(),clearTimeout(_)},configure:(m={})=>{let S=[];return m.windowSize>0&&m.windowSize!==t&&(t=m.windowSize,S=P()),m.pageSize>0&&(o=m.pageSize),m.fetchDebounce>=0&&(i=m.fetchDebounce),S}}}function kt(e,t,o){if(!Array.isArray(e)||!t||!t.field)return e;const{field:i,direction:a}=t,s=a==="desc",l=e.map(c=>c?c[i]:void 0),d=at(l);return[...e].sort((c,w)=>{const b=c?c[i]:void 0,_=w?w[i]:void 0,x=st(b,_,d,o);return s?-x:x})}function De(e,t){if(!Array.isArray(e)||!t||typeof t!="object")return e;const o=Object.keys(t).filter(i=>Array.isArray(t[i])&&t[i].length>0);return o.length?e.filter(i=>i?o.every(a=>At(i[a],t[a])):!1):e}function It(e,t,o){if(!Array.isArray(e)||!t||!o||!o.length)return e;const i=St(t);return i.length?e.filter(a=>a?i.every(s=>o.some(l=>{const d=a[l];return d!=null&&vt(String(d),[s])})):!1):e}function Et(e,t,o){if(!Array.isArray(e)||!e.length)return 0;if(o==="count")return e.length;const i=e.map(s=>s&&s[t]!=null?parseFloat(s[t]):NaN).filter(s=>Number.isFinite(s)),a=i.reduce((s,l)=>s+l,0);return o==="sum"?a:o==="avg"&&i.length?a/i.length:0}function qt(e,t={},o=[],i){if(!Array.isArray(e))return{records:[],total:0,filtered:0};const a=e.length;let s=e;t.filters&&(s=De(s,t.filters)),t.search&&(s=It(s,t.search,o));const l=s.length;if(t.sort&&(s=kt(s,t.sort,i)),t.offset||t.limit){const d=t.offset||0,c=t.limit||s.length;s=s.slice(d,d+c)}return{records:s,total:a,filtered:l}}function Nt(e,t){return!Array.isArray(e)||!t||typeof t!="object"?e:e.map(o=>{if(!o)return null;const i={...o};for(const[a,s]of Object.entries(t))if(typeof s=="function")try{i[a]=s(o)}catch{i[a]=void 0}return i})}function Lt(e,t,o,i="_meta"){if(!Array.isArray(e)||!e.includes(i))return!0;for(const a of Object.keys(t||{})){if(!e.includes(a))return!0;const s=t[a]&&t[a].indexes||[],l=o&&o[a]||[];if(s.some(d=>!l.includes(d)))return!0}return!1}function Tt(e){return{ok:!1,error:e&&e.message?e.message:String(e)}}(function(){const e="data-ln-data-store",t="lnDataStore";if(window[t]!==void 0)return;function o(n,r,u){const f=n.getAttribute(r);if(f==="never"||f==="-1")return-1;const h=parseInt(f,10);return isNaN(h)?u:h}const i={"data-ln-data-store":{type:"marker",effect:Be,description:"Identifies the element as a data-store definition container"},"data-ln-data-store-indexes":{type:"list",effect:Be,description:"Comma-separated index field names for the IndexedDB store"},"data-ln-data-store-stale":{prop:"_staleThreshold",type:"integer",read:o,fallback:300,description:"Cache staleness threshold in seconds, or -1/never"},"data-ln-data-store-search-fields":{prop:"_searchFields",type:"list",read:se,description:"Record fields to index for client-side search"},"data-ln-data-store-no-local-query":{prop:"noLocalQuery",type:"boolean",read:ae,description:"Bypasses local IndexedDB query resolution, forcing remote fetching"},"data-ln-data-store-window":{prop:"_windowSize",type:"integer",read:J,fallback:1e3,min:10,effect:Xt,description:"Virtual scrolling cache window size in records"},"data-ln-data-store-window-page":{prop:"_windowPageSize",type:"integer",read:J,fallback:200,min:5,effect:Yt,description:"Virtual scrolling slice page size"},"data-ln-data-store-frozen":{type:"marker",description:"Applied at runtime to indicate store schema is locked in IndexedDB"}},a=Se(i),s="ln_app_cache",l="_meta",d="1.0";let c=null,w=null;const b={};function _(n){n&&n.name==="QuotaExceededError"&&v(document,"ln-data-store:quota-exceeded",{error:n})}function x(){const n={};for(const r of document.querySelectorAll(`[${e}]`)){const u=r.id;if(u){const f=r.getAttribute("data-ln-data-store-indexes")||"";n[u]={indexes:f.split(",").map(h=>h.trim()).filter(Boolean)}}}return n}function P(){return w||(w=new Promise(n=>{if(typeof indexedDB>"u")return console.warn("[ln-data-store] IndexedDB is not available in this environment"),n(null);const r=x(),u=Object.keys(r),f=indexedDB.open(s);f.onerror=()=>{console.warn("[ln-data-store] IndexedDB open failed"),n(null)},f.onsuccess=h=>{const y=h.target.result,p=Array.from(y.objectStoreNames),g=u.filter(T=>p.includes(T));let C={};if(g.length>0){const T=y.transaction(g,"readonly");for(const D of g)C[D]=Array.from(T.objectStore(D).indexNames)}if(!Lt(p,r,C,l))return F(y),c=y,n(y);const $=y.version;y.close();const R=indexedDB.open(s,$+1);let z=!1,O=null;R.onblocked=()=>{console.warn("[ln-data-store] Database upgrade blocked — waiting for other tabs to close connection"),v(document,"ln-data-store:blocked",{db:s}),O||(O=setTimeout(()=>{z||(console.warn("[ln-data-store] Database upgrade timed out while blocked"),z=!0,w=null,n(null))},5e3))},R.onerror=()=>{z||(O&&clearTimeout(O),z=!0,w=null,console.warn("[ln-data-store] Database upgrade failed"),n(null))},R.onupgradeneeded=T=>{const D=T.target.result,en=T.target.transaction;D.objectStoreNames.contains(l)||D.createObjectStore(l,{keyPath:"key"});for(const W of u)if(D.objectStoreNames.contains(W)){const ne=en.objectStore(W);for(const U of r[W].indexes)ne.indexNames.contains(U)||ne.createIndex(U,U,{unique:!1})}else{const ne=D.createObjectStore(W,{keyPath:"id"});for(const U of r[W].indexes)ne.createIndex(U,U,{unique:!1})}},R.onsuccess=T=>{if(z){T.target.result&&T.target.result.close();return}O&&clearTimeout(O),z=!0;const D=T.target.result;F(D),c=D,n(D)}}}),w)}function F(n){n.onversionchange=()=>{n.close(),c=null,w=null}}function m(){return c?Promise.resolve(c):(w=null,P())}async function S(n){if(!M()||!n)return n;const r={...n},u=r.id,f=await gt(r);return!f||!f.encrypted?n:{...f,id:u}}async function q(n){return!n||!n.encrypted||!M()?n:bt(n,{silent:!0})}const N=(n,r)=>m().then(u=>u?u.transaction(n,r).objectStore(n):null);function A(n){return new Promise((r,u)=>{n.onsuccess=()=>r(n.result),n.onerror=()=>{_(n.error),u(n.error)}})}const k=n=>N(n,"readonly").then(r=>r?A(r.getAll()):[]).then(r=>M()?Promise.all(r.map(u=>q(u))):r),I=(n,r)=>N(n,"readonly").then(u=>u?A(u.get(r)).then(f=>f!==void 0?f:typeof r=="string"&&r.trim()!==""&&!isNaN(Number(r))?A(u.get(Number(r))):typeof r=="number"?A(u.get(String(r))):null):null).then(u=>u?q(u):null),j=(n,r)=>m().then(u=>{if(!u)return[];const h=u.transaction(n,"readonly").objectStore(n),y=r.map(p=>A(h.get(p)).then(g=>g!==void 0?g:typeof p=="string"&&p.trim()!==""&&!isNaN(Number(p))?A(h.get(Number(p))):typeof p=="number"?A(h.get(String(p))):null));return Promise.all(y).then(p=>M()?Promise.all(p.map(g=>g?q(g):null)):p)}),Z=(n,r)=>(M()?S(r):Promise.resolve(r)).then(f=>N(n,"readwrite").then(h=>h?A(h.put(f)):null)),G=(n,r)=>N(n,"readwrite").then(u=>u?A(u.delete(r)).then(()=>{if(typeof r=="string"&&r.trim()!==""&&!isNaN(Number(r)))return A(u.delete(Number(r)));if(typeof r=="number")return A(u.delete(String(r)))}):null),K=n=>N(n,"readwrite").then(r=>r?A(r.clear()):null),B=n=>N(n,"readonly").then(r=>r?A(r.count()):0),Dt=n=>N(l,"readonly").then(r=>r?A(r.get(n)):null),X=(n,r)=>N(l,"readwrite").then(u=>{if(u)return r.key=n,A(u.put(r))});function L(n){return this.dom=n,this._name=n.id,this._name||console.warn("[ln-data-store] missing id — the store cannot be addressed",n),Ce(this,n,a),this._handlers=null,this.isLoaded=!1,this.canServe=!1,this.isInitialized=!1,this.initializationError=null,this.hasCache=!1,this.isSyncing=!1,this.lastSyncedAt=null,this.query={filters:{},search:"",sort:null},n.hasAttribute("data-ln-data-store-window")?this._windowIndex=xt({windowSize:this._windowSize,pageSize:this._windowPageSize,requestPage:(r,u,f)=>{v(this.dom,"ln-data-store:request-page",{store:this._name,offset:r,limit:u,query:f,queryGen:this._windowIndex.queryGen})}}):this._windowIndex=null,this.windowed=this._windowIndex!==null,this.totalCount=0,this.presenters=null,this._mutationChain=Promise.resolve(),b[this._name]=this,zt(this),this.ready=Ft(this),this}function zt(n){n._handlers={create:r=>Y(n,"create",r.detail,()=>Ot(n,r.detail)),update:r=>Y(n,"update",r.detail,()=>Rt(n,r.detail)),delete:r=>Y(n,"delete",r.detail,()=>Mt(n,r.detail)),"bulk-delete":r=>Y(n,"bulk-delete",r.detail,()=>Bt(n,r.detail)),"sync-failed":r=>{n.isSyncing=!1,v(n.dom,"ln-data-store:sync-error",{store:n._name,error:r.detail&&r.detail.error,status:r.detail&&r.detail.status})}};for(const[r,u]of Object.entries(n._handlers))n.dom.addEventListener(`ln-data-store:request-${r}`,u);n._queryHandlers={"ln-search:change":r=>{r.preventDefault();const u=r.detail&&r.detail.term!=null?r.detail.term:"";u!==n.query.search&&(n.query.search=u,de(n))},"ln-filter:change":r=>{r.preventDefault();const u=r.detail&&r.detail.key;if(!u)return;const f=(r.detail.values||[]).slice(),h=n.query.filters[u];(h?h.length===f.length&&h.every((p,g)=>p===f[g]):!f.length)||(f.length?n.query.filters[u]=f:delete n.query.filters[u],de(n))},"ln-sort:change":r=>{r.preventDefault();const u=r.detail&&r.detail.field,f=r.detail&&r.detail.direction,h=f&&f!=="none"?{field:u,direction:f}:null,y=n.query.sort;!y&&!h||y&&h&&y.field===h.field&&y.direction===h.direction||(n.query.sort=h,de(n))}};for(const[r,u]of Object.entries(n._queryHandlers))n.dom.addEventListener(r,u)}function Y(n,r,u,f){const h=u&&u.requestId;return n._mutationChain=n._mutationChain.then(()=>n.ready).then(()=>{if(n.initializationError)throw n.initializationError;return f()}).catch(y=>Pt(n,r,h,y)),n._mutationChain}function ee(n,r=0){return B(n._name).then(u=>{if(n._windowIndex||n.windowed){const f=n.totalCount!=null?n.totalCount:u;n.totalCount=Math.max(0,f+r)}else n.totalCount=u;return n.hasCache=!0,n.isLoaded=!0,n.canServe=!0,X(n._name,{schema_version:d,last_synced_at:n.lastSyncedAt,has_cache:!0,record_count:n.totalCount})})}function Ot(n,{tempId:r,data:u={},requestId:f}={}){const h={...u,id:r};return Z(n._name,h).then(()=>ee(n,1)).then(()=>{v(n.dom,"ln-data-store:created",{store:n._name,record:h,tempId:r,requestId:f})})}function Rt(n,{id:r,data:u={},requestId:f}={}){return I(n._name,r).then(h=>{if(!h)throw new Error(`Record not found: ${r}`);const y=h.id,p={...h,...u,id:y},g=u.id,C=g!==void 0&&g!==y;return(C?jt(n._name,y,{...p,id:g}):Z(n._name,p)).then(()=>ee(n,0)).then(()=>{v(n.dom,"ln-data-store:updated",{store:n._name,record:C?{...p,id:g}:p,previous:h,requestId:f})})})}function Mt(n,{id:r,requestId:u}={}){return I(n._name,r).then(f=>{if(!f){v(n.dom,"ln-data-store:deleted",{store:n._name,id:r,requestId:u,missing:!0});return}const h=f.id;return G(n._name,h).then(()=>ee(n,-1)).then(()=>{v(n.dom,"ln-data-store:deleted",{store:n._name,id:h,requestId:u})})})}function Bt(n,{ids:r=[],requestId:u}={}){return r.length?Promise.all(r.map(f=>I(n._name,f))).then(f=>{const h=f.filter(Boolean).map(y=>y.id);return te(n._name,h).then(()=>ee(n,-h.length)).then(()=>{v(n.dom,"ln-data-store:deleted",{store:n._name,ids:h,requestId:u})})}):(v(n.dom,"ln-data-store:deleted",{store:n._name,ids:[],requestId:u}),Promise.resolve())}function Pt(n,r,u,f){console.error("[ln-data-store] "+r+" failed:",f),v(n.dom,"ln-data-store:mutation-error",{store:n._name,action:r,requestId:u,error:f})}function Ft(n){return P().then(r=>{if(!r)throw new Error("IndexedDB is unavailable");return Dt(n._name)}).then(r=>{if(n.initializationError=null,r&&r.schema_version===d)n.lastSyncedAt=r.last_synced_at||null,n.totalCount=r.record_count||0,n.hasCache=r.has_cache===!0||n.totalCount>0,n.hasCache&&(n.isLoaded=!0,n.canServe=!0,v(n.dom,"ln-data-store:ready",{store:n._name,count:n.totalCount,source:"cache"})),n.isInitialized=!0,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:n.hasCache,lastSyncedAt:n.lastSyncedAt,count:n.totalCount});else{if(r&&r.schema_version!==d)return K(n._name).then(()=>X(n._name,{schema_version:d,last_synced_at:null,has_cache:!1,record_count:0})).then(()=>{n.isInitialized=!0,n.hasCache=!1,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:!1,lastSyncedAt:null,count:0})});n.isInitialized=!0,n.hasCache=!1,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:!1,lastSyncedAt:null,count:0})}}).catch(r=>(n.isInitialized=!0,n.isLoaded=!1,n.canServe=!1,n.hasCache=!1,n.isSyncing=!1,n.initializationError=r,v(n.dom,"ln-data-store:initialization-error",{store:n._name,error:r}),{ok:!1,error:r}))}function ze(n){n.isSyncing=!0,v(n.dom,"ln-data-store:request-remote-sync",{since:n.lastSyncedAt})}function Oe(n,r){return m().then(u=>u?(M()?Promise.all(r.map(h=>S(h))):Promise.resolve(r)).then(h=>new Promise((y,p)=>{const g=u.transaction(n,"readwrite"),C=g.objectStore(n);h.forEach(E=>C.put(E)),g.oncomplete=()=>y(),g.onerror=()=>{_(g.error),p(g.error)}})):void 0)}function te(n,r){return m().then(u=>{if(u)return new Promise((f,h)=>{const y=u.transaction(n,"readwrite"),p=y.objectStore(n);r.forEach(g=>{p.delete(g),typeof g=="string"&&g.trim()!==""&&!isNaN(Number(g))?p.delete(Number(g)):typeof g=="number"&&p.delete(String(g))}),y.oncomplete=()=>f(),y.onerror=()=>h(y.error)})})}function jt(n,r,u){return(M()?S(u):Promise.resolve(u)).then(h=>m().then(y=>{if(y)return new Promise((p,g)=>{const C=y.transaction(n,"readwrite"),E=C.objectStore(n);E.put(h),E.delete(r),C.oncomplete=()=>p(),C.onerror=()=>{_(C.error),g(C.error)}})}))}const $t=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function Kt(n){return n?Object.keys(n).filter(r=>Array.isArray(n[r])&&n[r].length>0):[]}function Ut(n,r,u){return r.every(f=>u[f].map(String).includes(String(n[f])))}function Vt(n){return String(n||"").toLowerCase().split(/\s+/).filter(Boolean)}function Gt(n,r,u){return r.every(f=>u.some(h=>{const y=n[h];return y!=null&&String(y).toLowerCase().includes(f)}))}function Ht(n,r,u){return Et(n,r,u)}function H(n,r){return Nt(r,n.presenters&&n.presenters.computed)}function Wt(n){return!n.sort&&!M()}function Qt(n,r,u){const f=Kt(r.filters),h=r.search?Vt(r.search):[],y=n._searchFields,p=h.length>0&&y&&y.length>0;return N(n._name,"readonly").then(g=>g?new Promise((C,E)=>{const $=[],R=g.openCursor();R.onsuccess=()=>{const z=R.result;if(!z||$.length>=u){C($);return}const O=z.value;(!f.length||Ut(O,f,r.filters))&&(!p||Gt(O,h,y))&&$.push(O),z.continue()},R.onerror=()=>E(R.error)}):[])}function Re(n,r,u){return qt(r,u,n._searchFields,$t)}function Me(n,r,u){const f=[];for(let y=r;y<r+u;y++){const p=n._windowIndex.getId(y);f.push(p)}const h=Array.from(new Set(f.filter(y=>y!==void 0)));return j(n._name,h).then(y=>{const p=new Map;for(let C=0;C<y.length;C++){const E=y[C];E&&p.set(String(E.id),E)}const g=[];for(let C=0;C<f.length;C++){const E=f[C];if(E===void 0)g.push(null);else{const $=p.get(String(E));g.push($||null)}}return{data:H(n,g),total:n._windowIndex.grandTotal,filtered:n._windowIndex.logicalTotal,offset:r,queryGen:n._windowIndex.queryGen}})}L.prototype.getAll=function(n={}){const r=this;if(r._windowIndex){const u=n.offset||0,f=n.limit||200;if(r._windowIndex.ensure(u,u+f,n),!r._windowIndex.hasLoaded&&!r.noLocalQuery){const h=u+f,y=p=>p.length?{data:H(r,p),offset:u,queryGen:r._windowIndex.queryGen,provisional:!0}:Me(r,u,f);return Wt(n)?Qt(r,n,h).then(p=>y(p.slice(u,h))):k(r._name).then(p=>y(Re(r,p,n).records))}return Me(r,u,f)}return k(r._name).then(u=>{const f=Re(r,u,n);return{data:H(r,f.records),total:f.total,filtered:f.filtered}})},L.prototype.getById=function(n){return I(this._name,n).then(r=>r?H(this,[r])[0]:null)},L.prototype.count=function(n){return n&&Object.keys(n).length>0?k(this._name).then(u=>De(u,n).length):this.windowed&&this.totalCount!=null?Promise.resolve(this.totalCount):B(this._name)},L.prototype.aggregate=function(n,r){return k(this._name).then(u=>Ht(u,n,r))},L.prototype.setPresenters=function(n){this.presenters=n},L.prototype.applySync=function(n,r,u,f){f=f||{};const h=this;if(h._windowIndex&&f.queryGen!=null&&f.queryGen!==h._windowIndex.queryGen)return Promise.resolve({ok:!0,stale:!0});let y=m().then(p=>{if(!p)throw new Error("IndexedDB unavailable")});return n.length>0&&(y=y.then(()=>Oe(h._name,n))),r.length>0&&(y=y.then(()=>te(h._name,r))),y.then(()=>{if(h._windowIndex&&(f.offset!=null||f.total!=null)){const p=f.offset!=null?f.offset:0,g=n.map(E=>E.id),C=h._windowIndex.ingest(p,g,f.total,f.filtered,f.queryGen);if(C&&C.length)return te(h._name,C)}}).then(()=>B(h._name)).then(p=>(h.totalCount=f.total!==void 0?f.total:p,h.hasCache=!0,X(h._name,{schema_version:d,last_synced_at:u,has_cache:!0,record_count:h.totalCount}))).then(()=>{const p=!h.isLoaded;return h.isLoaded=!0,h.canServe=!0,h.isSyncing=!1,h.lastSyncedAt=u,p?(v(h.dom,"ln-data-store:loaded",{store:h._name,count:h.totalCount,meta:f}),v(h.dom,"ln-data-store:ready",{store:h._name,count:h.totalCount,source:"server",meta:f})):v(h.dom,"ln-data-store:synced",{store:h._name,added:n.length,deleted:r.length,changed:!0,meta:f}),{ok:!0}}).catch(p=>{h.isSyncing=!1;const g=p&&p.message?p.message:String(p);return console.error("[ln-data-store] applySync failed:",p),v(h.dom,"ln-data-store:sync-error",{store:h._name,error:g}),Tt(p)})},L.prototype.applyQuery=function(n,r){r=r||{};const u=this;let f=Promise.resolve();return n.length>0&&(f=f.then(()=>Oe(u._name,n))),f.then(()=>B(u._name)).then(h=>(u.totalCount=r.total!==void 0?r.total:h,n.length>0&&(u.canServe=!0),H(u,n))).catch(h=>(console.error("[ln-data-store] applyQuery failed:",h),[]))},L.prototype.forceSync=function(){this.isSyncing||ze(this)},L.prototype.fullReload=function(){const n=this;return K(n._name).then(()=>X(n._name,{schema_version:d,last_synced_at:null,has_cache:!1,record_count:0})).then(()=>{n.isLoaded=!1,n.hasCache=!1,n.lastSyncedAt=null,n.totalCount=0,ze(n)})},L.prototype.destroy=function(){if(this._windowIndex&&(this._windowIndex.clear(),this._windowIndex=null,this.windowed=!1),this._handlers){for(const[n,r]of Object.entries(this._handlers))this.dom.removeEventListener(`ln-data-store:request-${n}`,r);this._handlers=null}if(this._queryHandlers){for(const[n,r]of Object.entries(this._queryHandlers))this.dom.removeEventListener(n,r);this._queryHandlers=null}delete b[this._name],delete this.dom[t]};function Jt(){return m().then(n=>{if(!n)return;const r=Array.from(n.objectStoreNames);return new Promise((u,f)=>{const h=n.transaction(r,"readwrite");r.forEach(y=>h.objectStore(y).clear()),h.oncomplete=()=>u(),h.onerror=()=>f(h.error)})}).then(()=>{Object.values(b).forEach(n=>{n.isLoaded=!1,n.canServe=!1,n.isInitialized=!1,n.initializationError=null,n.hasCache=!1,n.isSyncing=!1,n.lastSyncedAt=null,n.totalCount=0})})}function de(n){n._windowIndex&&n._windowIndex.reset(),v(n.dom,"ln-data-store:query-changed",{store:n._name,query:{filters:Object.assign({},n.query.filters),search:n.query.search,sort:n.query.sort?Object.assign({},n.query.sort):null}})}const Zt="data-ln-data-store-frozen";function Be(n,r){n.setAttribute(Zt,r)}function Xt(n){const r=n[t];if(!r._windowIndex)return;const u=r._windowIndex.configure({windowSize:r._windowSize});u.length&&te(r._name,u).catch(f=>{console.error("[ln-data-store] window shrink eviction failed:",f)})}function Yt(n){const r=n[t];r._windowIndex&&r._windowIndex.configure({pageSize:r._windowPageSize})}ke(e,t,L,"ln-data-store",{attributes:i}),window[t].clearAll=Jt,window[t].init=window[t],window[t].setStorageKey=Te,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.setStorageKey=Te)})()})();
|
|
1
|
+
(function(){"use strict";function we(){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 oe(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 a=1;a<t.length;a++)if(t[a]&&t[a].nodeType===1){o=t[a];break}if(!oe(o))return}e.apply(console,t)}}function v(e,t,i){const o=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function J(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){J(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function $e(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Ke(e,t){const i=!!(t&&t.typed),o=t&&t.exclude,a={},c=e.elements,s={};if(i)for(let d=0;d<c.length;d++){const l=c[d];l.name&&l.type==="checkbox"&&!l.disabled&&(s[l.name]=(s[l.name]||0)+1)}for(let d=0;d<c.length;d++){const l=c[d];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(o&&l.matches&&l.matches(o)))if(l.type==="checkbox")i&&s[l.name]===1?a[l.name]=l.checked:(a[l.name]||(a[l.name]=[]),l.checked&&a[l.name].push(l.value));else if(l.type==="radio")l.checked&&(a[l.name]=l.value);else if(l.type==="select-multiple"){a[l.name]=[];for(let w=0;w<l.options.length;w++)l.options[w].selected&&a[l.name].push(l.options[w].value)}else if(i&&l.type==="hidden")a[l.name]=l.value;else if(i&&(l.type==="number"||l.type==="range")){const w=Number(l.value);a[l.name]=l.value===""||isNaN(w)?null:w}else a[l.name]=l.value}return a}function Ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function Ve(e,t){const i=e.elements,o=[],a={};for(let c=0;c<i.length;c++){const s=i[c];s.name&&s.type==="checkbox"&&(a[s.name]=(a[s.name]||0)+1)}for(let c=0;c<i.length;c++){const s=i[c];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const d=s.getAttribute("data-ln-fill-as")||s.name;if(!d||!(d in t))continue;const l=t[d];if(s.type==="checkbox"){if(Array.isArray(l))s.checked=l.indexOf(s.value)!==-1;else if(a[s.name]>1){const w=String(l).split(",").map(function(b){return b.trim()});s.checked=w.indexOf(s.value)!==-1}else s.checked=Ue(l);o.push(s)}else if(s.type==="radio")s.checked=s.value===String(l),o.push(s);else if(s.type==="select-multiple"){if(Array.isArray(l))for(let w=0;w<s.options.length;w++)s.options[w].selected=l.indexOf(s.options[w].value)!==-1;o.push(s)}else s.value=l,s.tagName==="SELECT"&&l!=null&&s.setAttribute("data-ln-value",l),o.push(s)}return o}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=Ve,window.lnCore.serializeForm=Ke,window.lnCore.resolveFormMethod=$e);const ye={};function Ge(e,t){ye[e]=t}function He(e){return ye[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=Ge,window.lnCore.getDataMapper=He);function We(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,J(function(){new MutationObserver(function(){v(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const pe={};function Qe(e,t){if(!e||typeof t!="object")return;const i=e.toLowerCase().split("-")[0];pe[i]=t}function Je(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return pe[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Qe,window.lnCore.getLocaleFallback=Je,window.lnCore.ensureLocaleObserver=We);const ie={};function Ze(e,t){ie[e]||(ie[e]=document.querySelector('[data-ln-template="'+e+'"]'));const i=ie[e];return i?i.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function me(e,t){if(!e||!t)return e;const i=e.querySelectorAll("[data-ln-field]");for(let s=0;s<i.length;s++){const d=i[s],l=d.getAttribute("data-ln-field");t[l]!=null&&(d.textContent=t[l])}const o=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<o.length;s++){const d=o[s],l=d.getAttribute("data-ln-attr").split(",");for(let w=0;w<l.length;w++){const b=l[w].trim().split(":");if(b.length!==2)continue;const _=b[0].trim(),x=b[1].trim();t[x]!=null&&d.setAttribute(_,t[x])}}const a=e.querySelectorAll("[data-ln-show]");for(let s=0;s<a.length;s++){const d=a[s],l=d.getAttribute("data-ln-show");l in t&&d.classList.toggle("hidden",!t[l])}const c=e.querySelectorAll("[data-ln-class]");for(let s=0;s<c.length;s++){const d=c[s],l=d.getAttribute("data-ln-class").split(",");for(let w=0;w<l.length;w++){const b=l[w].trim().split(":");if(b.length!==2)continue;const _=b[0].trim(),x=b[1].trim();x in t&&d.classList.toggle(_,!!t[x])}}return e}function Xe(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 i=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let o=0;o<i.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[o],t??null),i[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)me(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let i=0;i<t.length;i++)t[i].textContent=""}})));function ge(e,t){if(!e||!t)return e;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){const c=i.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,d){return t[d]!==void 0?t[d]:""}))}const o=function(c,s){return t[s]!==void 0?t[s]:""},a=Array.from(e.querySelectorAll("*"));e.nodeType===1&&a.push(e);for(let c=0;c<a.length;c++){const s=a[c],d=s.attributes;for(let l=0;l<d.length;l++){const w=d[l];w.value.indexOf("{{")!==-1&&s.setAttribute(w.name,w.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ye(e,t,i,o,a,c){const s={};for(let l=0;l<e.children.length;l++){const w=e.children[l],b=w.getAttribute("data-ln-render-key");b&&(s[b]=w)}const d=document.createDocumentFragment();for(let l=0;l<t.length;l++){const w=t[l],b=String(o(w));let _=s[b];if(_)a(_,w,l);else{const x=Ze(i,c);if(!x||(ge(x,w),_=x.firstElementChild,!_))continue;_.setAttribute("data-ln-render-key",b),a(_,w,l)}d.appendChild(_)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=ge,window.lnCore.fill=me,window.lnCore.lnFill=Xe,window.lnCore.renderList=Ye);function ae(e,t,i){const o=e.getAttribute(t);return o===null?i:o}function Z(e,t,i){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?i:o}function se(e,t,i=!1){const o=e.getAttribute(t);if(o===null)return!!i;const a=o.trim().toLowerCase();return!(a==="false"||a==="0")}function le(e,t){return(e.getAttribute(t)||"").split(",").map(i=>i.trim()).filter(Boolean)}const ce=new Map;function be(e,t){const i=(e?e.join("|"):"")+"::"+t;if(ce.has(i))return ce.get(i);const o=new Set(e||[]),a=function(c,s){const d=c.getAttribute(s);return d!==null&&o.has(d)?d:t};return ce.set(i,a),a}function _e(e,t,i){const o=parseFloat(e.getAttribute(t));return isNaN(o)?i:o}function Ce(e,t,i){const o=e.getAttribute(t);if(!o)return i;try{return JSON.parse(o)}catch{return i}}function Se(e,t,i,o,a){if(!e||t===null)return!0;const c=o||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const d=l=>{a?console.warn(l,a):console.warn(l)};if(s==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(d(`[${c}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const l=e.values||[];return l.includes(t)?!0:(d(`[${c}] Invalid value "${t}" for attribute "${i}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return d(`[${c}] Invalid integer "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(d(`[${c}] Value ${l} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(d(`[${c}] Value ${l} for attribute "${i}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(d(`[${c}] Invalid float "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(l){return d(`[${c}] Invalid JSON for attribute "${i}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,i){for(const o in i){const[a,c,s]=i[o];Object.defineProperty(e,o,{get:function(){return a(t,c,s)},enumerable:!0,configurable:!0})}return e}function Ae(e){const t={};for(const i in e){const o=e[i];if(!o||!o.prop)continue;let a=o.read;if(!a&&o.type)switch(o.type){case"enum":a=be(o.values,o.fallback);break;case"integer":a=Z;break;case"float":a=_e;break;case"boolean":a=se;break;case"list":a=le;break;case"json":a=Ce;break;case"string":default:a=ae;break}a||(a=ae),t[o.prop]=[a,i,o.fallback]}return t}function et(e){const t={};for(const i in e){const o=e[i];o&&o.effect&&(t[i]=o.effect)}return Object.keys(t).length?t:null}function tt(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const i in e.effects)t.add(i);if(e.onAttrChange&&e.declared)for(const i of e.declared)t.add(i);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ve,window.lnCore.attrSpec=Ae,window.lnCore.attrStr=ae,window.lnCore.attrInt=Z,window.lnCore.attrBool=se,window.lnCore.attrList=le,window.lnCore.attrEnum=be,window.lnCore.attrFloat=_e,window.lnCore.attrJson=Ce);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(i){console.error("["+t.attribute+"] init failed",e,i)}}}function xe(e,t,i,o){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:i,ComponentFn:o};if(e.matches&&e.matches(c)&&V(e,s),e.querySelectorAll){const d=e.querySelectorAll(c);for(let l=0;l<d.length;l++)V(d[l],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function nt(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function rt(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 ke(){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 ot(e){const t=ke(),i=e.observed||[];for(let o=0;o<i.length;o++){const a=i[o];t.byAttr.has(a)||t.byAttr.set(a,[]),t.byAttr.get(a).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const a=t.byDeclaredAttr.get(o);a.some(c=>c.componentTag===e.componentTag)||a.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=tt(e);if(o===null)t.reactiveWildcard.push(e);else for(const a of o)t.byReactive.has(a)||t.byReactive.set(a,[]),t.byReactive.get(a).push(e)}e.persist&&t.persist.push(e)}function Ee(e,t,i,o){for(let a=0;a<e.length;a++){const c=e[a];if(!t[c.attribute])continue;const s=c.effects&&c.effects[i];s?s(t,i,o):c.onAttrChange&&(!c.declared||c.declared.has(i))&&c.onAttrChange(t,i,o)}}function it(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,o=ke(),a=o.byAttr.get(t),c=we()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!i&&!a&&!c)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(c&&oe(s)){const d=o.byDeclaredAttr.get(t),l=s.getAttribute(t);for(let w=0;w<d.length;w++)Se(d[w].spec,l,t,d[w].componentTag,s)}if(window.lnCore._debugSink&&(i||a)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),i){const d=o.byReactive.get(t);d&&Ee(d,s,t,e.oldValue),o.reactiveWildcard.length&&Ee(o.reactiveWildcard,s,t,e.oldValue)}if(a)for(let d=0;d<a.length;d++){const l=a[d];if(l.handler){l.handler(s,t,e.oldValue);continue}l.onAttributeChange&&s[l.attribute]?l.onAttributeChange(s,t):(xe(s,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(s))}}}function at(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,J(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++)try{it(t[i])}catch(o){console.error("[ln-core] mutation handler failed",t[i].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ue(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function de(e,t){if(!document.contains(e))if(t.attribute){const i=e[t.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(o){console.error("["+t.attribute+"] destroy failed",e,o)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function st(e){const t=ue();if(!t.length)return;const i=e.target;if(i){const o=i.nodeType===1?i:i.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let o=0;o<t.length;o++){const a=t[o];if(a.onSubtreeChange&&a.query){const c=a.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(c)?e.target:e.target.closest?e.target.closest(c):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(c):null;s&&a.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const a=e.addedNodes[o];if(a.nodeType===1){const c=!!(a.firstElementChild||a.children&&a.children.length);for(let s=0;s<t.length;s++){const d=t[s];if(d.selector&&d.attribute&&d.ComponentFn){if(!c)a.matches&&a.matches(d.query)&&V(a,d);else if(a.matches&&a.matches(d.query)&&V(a,d),a.querySelectorAll){const l=a.querySelectorAll(d.query);for(let w=0;w<l.length;w++)V(l[w],d)}}d.onInit&&d.onInit(a)}}}for(let o=0;o<e.removedNodes.length;o++){const a=e.removedNodes[o];if(a.nodeType===1){const c=!!(a.firstElementChild||a.children&&a.children.length);for(let s=0;s<t.length;s++){const d=t[s],l=d.query;if(l){if(!c)a.matches&&a.matches(l)&&de(a,d);else if(a.matches&&a.matches(l)&&de(a,d),a.querySelectorAll){const w=a.querySelectorAll(l);for(let b=0;b<w.length;b++)de(w[b],d)}}}}}}function Ie(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,J(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++){const o=t[i];if(o.type==="childList")try{st(o)}catch(a){console.error("[ln-core] lifecycle handler failed",o.target,a)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function lt(e){ue().push(e),Ie()}function qe(e,t,i,o,a={}){const c=a.extraAttributes||[],s=a.onAttributeChange||null,d=a.onSubtreeChange||null,l=a.onInit||null,w=a.onAttrChange||null,b=a.effects||null,_=a.attributes||null,x=_?et(_):b,F=_?new Set(Object.keys(_)):null,P=a.persist||null;function m(k){const E=k||document.body;if(xe(E,e,t,i),_&&we())for(const j in _){const X=_[j],H=Array.from(E.querySelectorAll("["+j+"]"));E.matches&&E.matches("["+j+"]")&&H.push(E);for(let K=0;K<H.length;K++){const B=H[K];oe(B)&&Se(X,B.getAttribute(j),j,o,B)}}l&&l(E)}const S=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let E;for(;(E=k.exec(e))!==null;)S.push(E[1])}else S.push(e);ot({selector:e,attribute:t,componentTag:o,attributes:_,ComponentFn:i,onInit:l,observed:S.concat(c),onAttributeChange:s,onAttrChange:w,effects:x,declared:F,persist:P}),at();const q=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,D=a.subtreeQuery||(q?e:"["+e+"]");ue().push({selector:e,attribute:t,ComponentFn:i,onInit:l,onSubtreeChange:d,query:D}),Ie(),window[t]=m,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=qe,window.lnCore.observeLifecycle=lt);function A(){nt()>0?rt(function(){m(document.body)}):m(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",A):A(),m}function ct(e){let t=!1;for(let i=0;i<e.length;i++){const o=e[i];if(!(o===""||o==null)&&(t=!0,!Number.isFinite(Number(o))))return"string"}return t?"number":"string"}function ut(e,t,i,o){if(i==="number"){const s=parseFloat(e),d=parseFloat(t);return(isNaN(s)?0:s)-(isNaN(d)?0:d)}const a=e!=null?String(e):"",c=t!=null?String(t):"";return o?o.compare(a,c):a<c?-1:a>c?1:0}function De(e){return(e||"").replace(/^#/,"")}function fe(e){const t=e===void 0?location.hash:e,i={},o=De(t);if(!o)return i;const a=o.split("&");for(let c=0;c<a.length;c++){const s=a[c];if(!s)continue;const d=s.indexOf(":"),l=d>-1?s.slice(0,d):s,w=d>-1?s.slice(d+1):"";if(l)try{i[l]=decodeURIComponent(w)}catch{i[l]=w}}return i}function dt(e){if(!e)return null;const t=fe();return e in t?t[e]:null}function ft(e,t){if(!e)return;const i=fe();t==null?delete i[e]:i[e]=String(t);const a=Object.keys(i).map(function(c){const s=i[c];return s===""?c:c+":"+encodeURIComponent(s)}).join("&");De(location.hash)!==a&&(location.hash=a)}function ht(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function wt(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const i=e.getAttribute("data-ln-hash");if(i&&i.trim()!=="")return i.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 yt(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function pt(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 mt(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function gt(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const i=e.slice(0,t),o=e.slice(t+1),a=o?o.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:i,values:a}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=fe,window.lnCore.hashGet=dt,window.lnCore.hashSet=ft,window.lnCore.hashLinkClick=ht,window.lnCore.resolveHashNamespace=wt,window.lnCore.hashSortEncode=yt,window.lnCore.hashSortDecode=pt,window.lnCore.hashFilterEncode=mt,window.lnCore.hashFilterDecode=gt);let G=null;const bt="ln-ashlar:storage-salt:v1",Le=32768;function Ne(e){let t="";const i=e.byteLength;for(let o=0;o<i;o+=Le)t+=String.fromCharCode.apply(null,e.subarray(o,Math.min(o+Le,i)));return btoa(t)}function Te(e){const t=atob(e),i=t.length,o=new Uint8Array(i);for(let a=0;a<i;a++)o[a]=t.charCodeAt(a);return o}function ze(e,t){let i=G,o={};return typeof CryptoKey<"u"&&e instanceof CryptoKey?i=e:e&&typeof e=="object"&&(o=e,typeof CryptoKey<"u"&&o.key instanceof CryptoKey&&(i=o.key)),{key:i,options:o}}async function _t(e,t={}){if(!e)throw new Error("[ln-crypto] Key derivation failed: Secret string is required");const i=t.method||"pbkdf2",o=new TextEncoder;if(i==="sha256"){const l=await crypto.subtle.digest("SHA-256",o.encode(e));return crypto.subtle.importKey("raw",l,{name:"AES-GCM"},!1,["encrypt","decrypt"])}const a=t.salt||bt,c=typeof a=="string"?o.encode(a):a,s=t.iterations||1e5,d=await crypto.subtle.importKey("raw",o.encode(e),"PBKDF2",!1,["deriveKey"]);return crypto.subtle.deriveKey({name:"PBKDF2",salt:c,iterations:s,hash:"SHA-256"},d,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function Oe(e,t={}){if(!e){G=null;return}try{const i=t.method||"sha256";G=await _t(e,{...t,method:i})}catch(i){throw console.error("[ln-core/crypto] Key derivation failed:",i),G=null,i}}function M(){return G}async function Ct(e,t,i){const{key:o}=ze(t);if(e==null)return e;if(!o)throw new Error("[ln-crypto] Encryption failed: No active cryptographic key provided");try{const a=new TextEncoder,c=crypto.getRandomValues(new Uint8Array(12)),s=typeof e=="string"?e:JSON.stringify(e),d=await crypto.subtle.encrypt({name:"AES-GCM",iv:c},o,a.encode(s));return{v:1,alg:"AES-GCM",encrypted:!0,iv:Ne(c),data:Ne(new Uint8Array(d))}}catch(a){throw console.error("[ln-core/crypto] Encryption failed:",a),new Error("[ln-crypto] Encryption failed: "+(a&&a.message?a.message:String(a)))}}async function St(e,t,i){const{key:o,options:a}=ze(t),c=a.silent===!0;if(!e||!e.encrypted)return e;if(!o){if(c)return{...e,decryptionError:!0};throw new Error("[ln-crypto] Decryption failed: No active cryptographic key provided")}if(!e.iv||!e.data){if(c)return{...e,decryptionError:!0};throw new Error("[ln-crypto] Decryption failed: Malformed envelope (missing iv or data)")}try{const s=new TextDecoder,d=Te(e.iv),l=Te(e.data),w=await crypto.subtle.decrypt({name:"AES-GCM",iv:d},o,l),b=s.decode(w);try{return JSON.parse(b)}catch{return b}}catch(s){if(c)return{...e,decryptionError:!0};throw console.error("[ln-core/crypto] Decryption failed. Key may be incorrect or payload tampered:",s),new Error("[ln-crypto] Decryption failed. Key may be incorrect or payload tampered: "+(s&&s.message?s.message:String(s)))}}function vt(){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=vt);function At(e){return String(e||"").trim().toLowerCase()}function xt(e){const t=At(e);return t?t.split(/\s+/).filter(Boolean):[]}function kt(e,t){if(!t||t.length===0)return!0;if(!e)return!1;const i=String(e).toLowerCase();for(let o=0;o<t.length;o++)if(i.indexOf(t[o])===-1)return!1;return!0}function Et(e,t){if(!t||t.length===0)return!0;if(e==null)return!1;const i=String(e).trim().toLowerCase();for(let o=0;o<t.length;o++)if(String(t[o]).trim().toLowerCase()===i)return!0;return!1}function It(e={}){let t=e.windowSize>0?e.windowSize:1e3,i=e.pageSize>0?e.pageSize:200,o=e.fetchDebounce!=null?e.fetchDebounce:120;const a=typeof e.requestPage=="function"?e.requestPage:()=>{},c=new Map,s=new Set;let d=0,l=0,w=0,b=!1,_=null;function x(m,S){c.delete(m),c.set(m,S)}function F(){if(c.size<=t)return[];const m=[];for(;c.size>t;){const q=c.keys().next().value;m.push(c.get(q)),c.delete(q)}const S=new Set(c.values());return m.filter(q=>!S.has(q))}function P(m,S){s.add(m),clearTimeout(_),_=setTimeout(()=>a(m,i,S),o)}return{get logicalTotal(){return d},set logicalTotal(m){d=m},get grandTotal(){return l},set grandTotal(m){l=m},get queryGen(){return w},set queryGen(m){w=m},get size(){return c.size},get hasLoaded(){return b},getId:m=>{if(!c.has(m))return;const S=c.get(m);return x(m,S),S},ensure:(m,S,q)=>{if(!b&&!s.has(0))return P(0,q);if(d<=0)return;const D=Math.max(0,m),A=Math.min(d,S);for(let k=D;k<A;k++)if(!c.has(k)){const E=Math.floor(k/i)*i;if(!s.has(E))return P(E,q)}},ingest:(m,S,q,D,A)=>{if(A!=null&&A!==w)return[];b=!0,q!=null&&(l=q),D!=null&&(d=D);for(let k=0;k<S.length;k++)x(m+k,S[k]);return s.delete(m),F()},reset:function(){w++,this.clear()},clear:()=>{b=!1,c.clear(),s.clear(),clearTimeout(_)},configure:(m={})=>{let S=[];return m.windowSize>0&&m.windowSize!==t&&(t=m.windowSize,S=F()),m.pageSize>0&&(i=m.pageSize),m.fetchDebounce>=0&&(o=m.fetchDebounce),S}}}function qt(e,t,i){if(!Array.isArray(e)||!t||!t.field)return e;const{field:o,direction:a}=t,c=a==="desc",s=e.map(l=>l?l[o]:void 0),d=ct(s);return[...e].sort((l,w)=>{const b=l?l[o]:void 0,_=w?w[o]:void 0,x=ut(b,_,d,i);return c?-x:x})}function Re(e,t){if(!Array.isArray(e)||!t||typeof t!="object")return e;const i=Object.keys(t).filter(o=>Array.isArray(t[o])&&t[o].length>0);return i.length?e.filter(o=>o?i.every(a=>Et(o[a],t[a])):!1):e}function Dt(e,t,i){if(!Array.isArray(e)||!t||!i||!i.length)return e;const o=xt(t);return o.length?e.filter(a=>a?o.every(c=>i.some(s=>{const d=a[s];return d!=null&&kt(String(d),[c])})):!1):e}function Lt(e,t,i){if(!Array.isArray(e)||!e.length)return 0;if(i==="count")return e.length;const o=e.map(c=>c&&c[t]!=null?parseFloat(c[t]):NaN).filter(c=>Number.isFinite(c)),a=o.reduce((c,s)=>c+s,0);return i==="sum"?a:i==="avg"&&o.length?a/o.length:0}function Nt(e,t={},i=[],o){if(!Array.isArray(e))return{records:[],total:0,filtered:0};const a=e.length;let c=e;t.filters&&(c=Re(c,t.filters)),t.search&&(c=Dt(c,t.search,i));const s=c.length;if(t.sort&&(c=qt(c,t.sort,o)),t.offset||t.limit){const d=t.offset||0,l=t.limit||c.length;c=c.slice(d,d+l)}return{records:c,total:a,filtered:s}}function Tt(e,t){return!Array.isArray(e)||!t||typeof t!="object"?e:e.map(i=>{if(!i)return null;const o={...i};for(const[a,c]of Object.entries(t))if(typeof c=="function")try{o[a]=c(i)}catch{o[a]=void 0}return o})}function zt(e,t,i,o="_meta"){if(!Array.isArray(e)||!e.includes(o))return!0;for(const a of Object.keys(t||{})){if(!e.includes(a))return!0;const c=t[a]&&t[a].indexes||[],s=i&&i[a]||[];if(c.some(d=>!s.includes(d)))return!0}return!1}function Ot(e){return{ok:!1,error:e&&e.message?e.message:String(e)}}(function(){const e="data-ln-data-store",t="lnDataStore";if(window[t]!==void 0)return;function i(n,r,u){const f=n.getAttribute(r);if(f==="never"||f==="-1")return-1;const h=parseInt(f,10);return isNaN(h)?u:h}const o={"data-ln-data-store":{type:"marker",effect:je,description:"Identifies the element as a data-store definition container"},"data-ln-data-store-indexes":{type:"list",effect:je,description:"Comma-separated index field names for the IndexedDB store"},"data-ln-data-store-stale":{prop:"_staleThreshold",type:"integer",read:i,fallback:300,description:"Cache staleness threshold in seconds, or -1/never"},"data-ln-data-store-search-fields":{prop:"_searchFields",type:"list",read:le,description:"Record fields to index for client-side search"},"data-ln-data-store-no-local-query":{prop:"noLocalQuery",type:"boolean",read:se,description:"Bypasses local IndexedDB query resolution, forcing remote fetching"},"data-ln-data-store-window":{prop:"_windowSize",type:"integer",read:Z,fallback:1e3,min:10,effect:tn,description:"Virtual scrolling cache window size in records"},"data-ln-data-store-window-page":{prop:"_windowPageSize",type:"integer",read:Z,fallback:200,min:5,effect:nn,description:"Virtual scrolling slice page size"},"data-ln-data-store-frozen":{type:"marker",description:"Applied at runtime to indicate store schema is locked in IndexedDB"}},a=Ae(o),c="ln_app_cache",s="_meta",d="1.0";let l=null,w=null;const b={};function _(n){n&&n.name==="QuotaExceededError"&&v(document,"ln-data-store:quota-exceeded",{error:n})}function x(){const n={};for(const r of document.querySelectorAll(`[${e}]`)){const u=r.id;if(u){const f=r.getAttribute("data-ln-data-store-indexes")||"";n[u]={indexes:f.split(",").map(h=>h.trim()).filter(Boolean)}}}return n}function F(){return w||(w=new Promise(n=>{if(typeof indexedDB>"u")return console.warn("[ln-data-store] IndexedDB is not available in this environment"),n(null);const r=x(),u=Object.keys(r),f=indexedDB.open(c);f.onerror=()=>{console.warn("[ln-data-store] IndexedDB open failed"),n(null)},f.onsuccess=h=>{const y=h.target.result,p=Array.from(y.objectStoreNames),g=u.filter(N=>p.includes(N));let C={};if(g.length>0){const N=y.transaction(g,"readonly");for(const T of g)C[T]=Array.from(N.objectStore(T).indexNames)}if(!zt(p,r,C,s))return P(y),l=y,n(y);const $=y.version;y.close();const R=indexedDB.open(c,$+1);let z=!1,O=null;R.onblocked=()=>{console.warn("[ln-data-store] Database upgrade blocked — waiting for other tabs to close connection"),v(document,"ln-data-store:blocked",{db:c}),O||(O=setTimeout(()=>{z||(console.warn("[ln-data-store] Database upgrade timed out while blocked"),z=!0,w=null,n(null))},5e3))},R.onerror=()=>{z||(O&&clearTimeout(O),z=!0,w=null,console.warn("[ln-data-store] Database upgrade failed"),n(null))},R.onupgradeneeded=N=>{const T=N.target.result,rn=N.target.transaction;T.objectStoreNames.contains(s)||T.createObjectStore(s,{keyPath:"key"});for(const Q of u)if(T.objectStoreNames.contains(Q)){const re=rn.objectStore(Q);for(const U of r[Q].indexes)re.indexNames.contains(U)||re.createIndex(U,U,{unique:!1})}else{const re=T.createObjectStore(Q,{keyPath:"id"});for(const U of r[Q].indexes)re.createIndex(U,U,{unique:!1})}},R.onsuccess=N=>{if(z){N.target.result&&N.target.result.close();return}O&&clearTimeout(O),z=!0;const T=N.target.result;P(T),l=T,n(T)}}}),w)}function P(n){n.onversionchange=()=>{n.close(),l=null,w=null}}function m(){return l?Promise.resolve(l):(w=null,F())}async function S(n){if(!M()||!n)return n;const r={...n},u=r.id,f=await Ct(r);return!f||!f.encrypted?n:{...f,id:u}}async function q(n){return!n||!n.encrypted||!M()?n:St(n,{silent:!0})}const D=(n,r)=>m().then(u=>u?u.transaction(n,r).objectStore(n):null);function A(n){return new Promise((r,u)=>{n.onsuccess=()=>r(n.result),n.onerror=()=>{_(n.error),u(n.error)}})}const k=n=>D(n,"readonly").then(r=>r?A(r.getAll()):[]).then(r=>M()?Promise.all(r.map(u=>q(u))):r),E=(n,r)=>D(n,"readonly").then(u=>u?A(u.get(r)).then(f=>f!==void 0?f:typeof r=="string"&&r.trim()!==""&&!isNaN(Number(r))?A(u.get(Number(r))):typeof r=="number"?A(u.get(String(r))):null):null).then(u=>u?q(u):null),j=(n,r)=>m().then(u=>{if(!u)return[];const h=u.transaction(n,"readonly").objectStore(n),y=r.map(p=>A(h.get(p)).then(g=>g!==void 0?g:typeof p=="string"&&p.trim()!==""&&!isNaN(Number(p))?A(h.get(Number(p))):typeof p=="number"?A(h.get(String(p))):null));return Promise.all(y).then(p=>M()?Promise.all(p.map(g=>g?q(g):null)):p)}),X=(n,r)=>(M()?S(r):Promise.resolve(r)).then(f=>D(n,"readwrite").then(h=>h?A(h.put(f)):null)),H=(n,r)=>D(n,"readwrite").then(u=>u?A(u.delete(r)).then(()=>{if(typeof r=="string"&&r.trim()!==""&&!isNaN(Number(r)))return A(u.delete(Number(r)));if(typeof r=="number")return A(u.delete(String(r)))}):null),K=n=>D(n,"readwrite").then(r=>r?A(r.clear()):null),B=n=>D(n,"readonly").then(r=>r?A(r.count()):0),Rt=n=>D(s,"readonly").then(r=>r?A(r.get(n)):null),Y=(n,r)=>D(s,"readwrite").then(u=>{if(u)return r.key=n,A(u.put(r))});function L(n){return this.dom=n,this._name=n.id,this._name||console.warn("[ln-data-store] missing id — the store cannot be addressed",n),ve(this,n,a),this._handlers=null,this.isLoaded=!1,this.canServe=!1,this.isInitialized=!1,this.initializationError=null,this.hasCache=!1,this.isSyncing=!1,this.lastSyncedAt=null,this.query={filters:{},search:"",sort:null},n.hasAttribute("data-ln-data-store-window")?this._windowIndex=It({windowSize:this._windowSize,pageSize:this._windowPageSize,requestPage:(r,u,f)=>{v(this.dom,"ln-data-store:request-page",{store:this._name,offset:r,limit:u,query:f,queryGen:this._windowIndex.queryGen})}}):this._windowIndex=null,this.windowed=this._windowIndex!==null,this.totalCount=0,this.presenters=null,this._mutationChain=Promise.resolve(),b[this._name]=this,Mt(this),this.ready=Kt(this),this}function Mt(n){n._handlers={create:r=>ee(n,"create",r.detail,()=>Bt(n,r.detail)),update:r=>ee(n,"update",r.detail,()=>Ft(n,r.detail)),delete:r=>ee(n,"delete",r.detail,()=>Pt(n,r.detail)),"bulk-delete":r=>ee(n,"bulk-delete",r.detail,()=>jt(n,r.detail)),"sync-failed":r=>{n.isSyncing=!1,v(n.dom,"ln-data-store:sync-error",{store:n._name,error:r.detail&&r.detail.error,status:r.detail&&r.detail.status})}};for(const[r,u]of Object.entries(n._handlers))n.dom.addEventListener(`ln-data-store:request-${r}`,u);n._queryHandlers={"ln-search:change":r=>{r.preventDefault();const u=r.detail&&r.detail.term!=null?r.detail.term:"";u!==n.query.search&&(n.query.search=u,he(n))},"ln-filter:change":r=>{r.preventDefault();const u=r.detail&&r.detail.key;if(!u)return;const f=(r.detail.values||[]).slice(),h=n.query.filters[u];(h?h.length===f.length&&h.every((p,g)=>p===f[g]):!f.length)||(f.length?n.query.filters[u]=f:delete n.query.filters[u],he(n))},"ln-sort:change":r=>{r.preventDefault();const u=r.detail&&r.detail.field,f=r.detail&&r.detail.direction,h=f&&f!=="none"?{field:u,direction:f}:null,y=n.query.sort;!y&&!h||y&&h&&y.field===h.field&&y.direction===h.direction||(n.query.sort=h,he(n))}};for(const[r,u]of Object.entries(n._queryHandlers))n.dom.addEventListener(r,u)}function ee(n,r,u,f){const h=u&&u.requestId;return n._mutationChain=n._mutationChain.then(()=>n.ready).then(()=>{if(n.initializationError)throw n.initializationError;return f()}).catch(y=>$t(n,r,h,y)),n._mutationChain}function te(n,r=0){return B(n._name).then(u=>{if(n._windowIndex||n.windowed){const f=n.totalCount!=null?n.totalCount:u;n.totalCount=Math.max(0,f+r)}else n.totalCount=u;return n.hasCache=!0,n.isLoaded=!0,n.canServe=!0,Y(n._name,{schema_version:d,last_synced_at:n.lastSyncedAt,has_cache:!0,record_count:n.totalCount})})}function Bt(n,{tempId:r,data:u={},requestId:f}={}){const h={...u,id:r};return X(n._name,h).then(()=>te(n,1)).then(()=>{v(n.dom,"ln-data-store:created",{store:n._name,record:h,tempId:r,requestId:f})})}function Ft(n,{id:r,data:u={},requestId:f}={}){return E(n._name,r).then(h=>{if(!h)throw new Error(`Record not found: ${r}`);const y=h.id,p={...h,...u,id:y},g=u.id,C=g!==void 0&&g!==y;return(C?Ut(n._name,y,{...p,id:g}):X(n._name,p)).then(()=>te(n,0)).then(()=>{v(n.dom,"ln-data-store:updated",{store:n._name,record:C?{...p,id:g}:p,previous:h,requestId:f})})})}function Pt(n,{id:r,requestId:u}={}){return E(n._name,r).then(f=>{if(!f){v(n.dom,"ln-data-store:deleted",{store:n._name,id:r,requestId:u,missing:!0});return}const h=f.id;return H(n._name,h).then(()=>te(n,-1)).then(()=>{v(n.dom,"ln-data-store:deleted",{store:n._name,id:h,requestId:u})})})}function jt(n,{ids:r=[],requestId:u}={}){return r.length?Promise.all(r.map(f=>E(n._name,f))).then(f=>{const h=f.filter(Boolean).map(y=>y.id);return ne(n._name,h).then(()=>te(n,-h.length)).then(()=>{v(n.dom,"ln-data-store:deleted",{store:n._name,ids:h,requestId:u})})}):(v(n.dom,"ln-data-store:deleted",{store:n._name,ids:[],requestId:u}),Promise.resolve())}function $t(n,r,u,f){console.error("[ln-data-store] "+r+" failed:",f),v(n.dom,"ln-data-store:mutation-error",{store:n._name,action:r,requestId:u,error:f})}function Kt(n){return F().then(r=>{if(!r)throw new Error("IndexedDB is unavailable");return Rt(n._name)}).then(r=>{if(n.initializationError=null,r&&r.schema_version===d)n.lastSyncedAt=r.last_synced_at||null,n.totalCount=r.record_count||0,n.hasCache=r.has_cache===!0||n.totalCount>0,n.hasCache&&(n.isLoaded=!0,n.canServe=!0,v(n.dom,"ln-data-store:ready",{store:n._name,count:n.totalCount,source:"cache"})),n.isInitialized=!0,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:n.hasCache,lastSyncedAt:n.lastSyncedAt,count:n.totalCount});else{if(r&&r.schema_version!==d)return K(n._name).then(()=>Y(n._name,{schema_version:d,last_synced_at:null,has_cache:!1,record_count:0})).then(()=>{n.isInitialized=!0,n.hasCache=!1,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:!1,lastSyncedAt:null,count:0})});n.isInitialized=!0,n.hasCache=!1,v(n.dom,"ln-data-store:initialized",{store:n._name,hasCache:!1,lastSyncedAt:null,count:0})}}).catch(r=>(n.isInitialized=!0,n.isLoaded=!1,n.canServe=!1,n.hasCache=!1,n.isSyncing=!1,n.initializationError=r,v(n.dom,"ln-data-store:initialization-error",{store:n._name,error:r}),{ok:!1,error:r}))}function Me(n){n.isSyncing=!0,v(n.dom,"ln-data-store:request-remote-sync",{since:n.lastSyncedAt})}function Be(n,r){return m().then(u=>u?(M()?Promise.all(r.map(h=>S(h))):Promise.resolve(r)).then(h=>new Promise((y,p)=>{const g=u.transaction(n,"readwrite"),C=g.objectStore(n);h.forEach(I=>C.put(I)),g.oncomplete=()=>y(),g.onerror=()=>{_(g.error),p(g.error)}})):void 0)}function ne(n,r){return m().then(u=>{if(u)return new Promise((f,h)=>{const y=u.transaction(n,"readwrite"),p=y.objectStore(n);r.forEach(g=>{p.delete(g),typeof g=="string"&&g.trim()!==""&&!isNaN(Number(g))?p.delete(Number(g)):typeof g=="number"&&p.delete(String(g))}),y.oncomplete=()=>f(),y.onerror=()=>h(y.error)})})}function Ut(n,r,u){return(M()?S(u):Promise.resolve(u)).then(h=>m().then(y=>{if(y)return new Promise((p,g)=>{const C=y.transaction(n,"readwrite"),I=C.objectStore(n);I.put(h),I.delete(r),C.oncomplete=()=>p(),C.onerror=()=>{_(C.error),g(C.error)}})}))}const Vt=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});function Gt(n){return n?Object.keys(n).filter(r=>Array.isArray(n[r])&&n[r].length>0):[]}function Ht(n,r,u){return r.every(f=>u[f].map(String).includes(String(n[f])))}function Wt(n){return String(n||"").toLowerCase().split(/\s+/).filter(Boolean)}function Qt(n,r,u){return r.every(f=>u.some(h=>{const y=n[h];return y!=null&&String(y).toLowerCase().includes(f)}))}function Jt(n,r,u){return Lt(n,r,u)}function W(n,r){return Tt(r,n.presenters&&n.presenters.computed)}function Zt(n){return!n.sort&&!M()}function Xt(n,r,u){const f=Gt(r.filters),h=r.search?Wt(r.search):[],y=n._searchFields,p=h.length>0&&y&&y.length>0;return D(n._name,"readonly").then(g=>g?new Promise((C,I)=>{const $=[],R=g.openCursor();R.onsuccess=()=>{const z=R.result;if(!z||$.length>=u){C($);return}const O=z.value;(!f.length||Ht(O,f,r.filters))&&(!p||Qt(O,h,y))&&$.push(O),z.continue()},R.onerror=()=>I(R.error)}):[])}function Fe(n,r,u){return Nt(r,u,n._searchFields,Vt)}function Pe(n,r,u){const f=[];for(let y=r;y<r+u;y++){const p=n._windowIndex.getId(y);f.push(p)}const h=Array.from(new Set(f.filter(y=>y!==void 0)));return j(n._name,h).then(y=>{const p=new Map;for(let C=0;C<y.length;C++){const I=y[C];I&&p.set(String(I.id),I)}const g=[];for(let C=0;C<f.length;C++){const I=f[C];if(I===void 0)g.push(null);else{const $=p.get(String(I));g.push($||null)}}return{data:W(n,g),total:n._windowIndex.grandTotal,filtered:n._windowIndex.logicalTotal,offset:r,queryGen:n._windowIndex.queryGen}})}L.prototype.getAll=function(n={}){const r=this;if(r._windowIndex){const u=n.offset||0,f=n.limit||200;if(r._windowIndex.ensure(u,u+f,n),!r._windowIndex.hasLoaded&&!r.noLocalQuery){const h=u+f,y=p=>p.length?{data:W(r,p),offset:u,queryGen:r._windowIndex.queryGen,provisional:!0}:Pe(r,u,f);return Zt(n)?Xt(r,n,h).then(p=>y(p.slice(u,h))):k(r._name).then(p=>y(Fe(r,p,n).records))}return Pe(r,u,f)}return k(r._name).then(u=>{const f=Fe(r,u,n);return{data:W(r,f.records),total:f.total,filtered:f.filtered}})},L.prototype.getById=function(n){return E(this._name,n).then(r=>r?W(this,[r])[0]:null)},L.prototype.count=function(n){return n&&Object.keys(n).length>0?k(this._name).then(u=>Re(u,n).length):this.windowed&&this.totalCount!=null?Promise.resolve(this.totalCount):B(this._name)},L.prototype.aggregate=function(n,r){return k(this._name).then(u=>Jt(u,n,r))},L.prototype.setPresenters=function(n){this.presenters=n},L.prototype.applySync=function(n,r,u,f){f=f||{};const h=this;if(h._windowIndex&&f.queryGen!=null&&f.queryGen!==h._windowIndex.queryGen)return Promise.resolve({ok:!0,stale:!0});let y=m().then(p=>{if(!p)throw new Error("IndexedDB unavailable")});return n.length>0&&(y=y.then(()=>Be(h._name,n))),r.length>0&&(y=y.then(()=>ne(h._name,r))),y.then(()=>{if(h._windowIndex&&(f.offset!=null||f.total!=null)){const p=f.offset!=null?f.offset:0,g=n.map(I=>I.id),C=h._windowIndex.ingest(p,g,f.total,f.filtered,f.queryGen);if(C&&C.length)return ne(h._name,C)}}).then(()=>B(h._name)).then(p=>(h.totalCount=f.total!==void 0?f.total:p,h.hasCache=!0,Y(h._name,{schema_version:d,last_synced_at:u,has_cache:!0,record_count:h.totalCount}))).then(()=>{const p=!h.isLoaded;return h.isLoaded=!0,h.canServe=!0,h.isSyncing=!1,h.lastSyncedAt=u,p?(v(h.dom,"ln-data-store:loaded",{store:h._name,count:h.totalCount,meta:f}),v(h.dom,"ln-data-store:ready",{store:h._name,count:h.totalCount,source:"server",meta:f})):v(h.dom,"ln-data-store:synced",{store:h._name,added:n.length,deleted:r.length,changed:!0,meta:f}),{ok:!0}}).catch(p=>{h.isSyncing=!1;const g=p&&p.message?p.message:String(p);return console.error("[ln-data-store] applySync failed:",p),v(h.dom,"ln-data-store:sync-error",{store:h._name,error:g}),Ot(p)})},L.prototype.applyQuery=function(n,r){r=r||{};const u=this;let f=Promise.resolve();return n.length>0&&(f=f.then(()=>Be(u._name,n))),f.then(()=>B(u._name)).then(h=>(u.totalCount=r.total!==void 0?r.total:h,n.length>0&&(u.canServe=!0),W(u,n))).catch(h=>(console.error("[ln-data-store] applyQuery failed:",h),[]))},L.prototype.forceSync=function(){this.isSyncing||Me(this)},L.prototype.fullReload=function(){const n=this;return K(n._name).then(()=>Y(n._name,{schema_version:d,last_synced_at:null,has_cache:!1,record_count:0})).then(()=>{n.isLoaded=!1,n.hasCache=!1,n.lastSyncedAt=null,n.totalCount=0,Me(n)})},L.prototype.destroy=function(){if(this._windowIndex&&(this._windowIndex.clear(),this._windowIndex=null,this.windowed=!1),this._handlers){for(const[n,r]of Object.entries(this._handlers))this.dom.removeEventListener(`ln-data-store:request-${n}`,r);this._handlers=null}if(this._queryHandlers){for(const[n,r]of Object.entries(this._queryHandlers))this.dom.removeEventListener(n,r);this._queryHandlers=null}delete b[this._name],delete this.dom[t]};function Yt(){return m().then(n=>{if(!n)return;const r=Array.from(n.objectStoreNames);return new Promise((u,f)=>{const h=n.transaction(r,"readwrite");r.forEach(y=>h.objectStore(y).clear()),h.oncomplete=()=>u(),h.onerror=()=>f(h.error)})}).then(()=>{Object.values(b).forEach(n=>{n.isLoaded=!1,n.canServe=!1,n.isInitialized=!1,n.initializationError=null,n.hasCache=!1,n.isSyncing=!1,n.lastSyncedAt=null,n.totalCount=0})})}function he(n){n._windowIndex&&n._windowIndex.reset(),v(n.dom,"ln-data-store:query-changed",{store:n._name,query:{filters:Object.assign({},n.query.filters),search:n.query.search,sort:n.query.sort?Object.assign({},n.query.sort):null}})}const en="data-ln-data-store-frozen";function je(n,r){n.setAttribute(en,r)}function tn(n){const r=n[t];if(!r._windowIndex)return;const u=r._windowIndex.configure({windowSize:r._windowSize});u.length&&ne(r._name,u).catch(f=>{console.error("[ln-data-store] window shrink eviction failed:",f)})}function nn(n){const r=n[t];r._windowIndex&&r._windowIndex.configure({pageSize:r._windowPageSize})}qe(e,t,L,"ln-data-store",{attributes:o}),window[t].clearAll=Yt,window[t].init=window[t],window[t].setStorageKey=Oe,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.setStorageKey=Oe)})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function P(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function I(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!I(r))return}e.apply(console,t)}}function H(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function M(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){M(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ae(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const n=!!(t&&t.typed),r=t&&t.exclude,o={},a=e.elements,s={};if(n)for(let c=0;c<a.length;c++){const l=a[c];l.name&&l.type==="checkbox"&&!l.disabled&&(s[l.name]=(s[l.name]||0)+1)}for(let c=0;c<a.length;c++){const l=a[c];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(r&&l.matches&&l.matches(r)))if(l.type==="checkbox")n&&s[l.name]===1?o[l.name]=l.checked:(o[l.name]||(o[l.name]=[]),l.checked&&o[l.name].push(l.value));else if(l.type==="radio")l.checked&&(o[l.name]=l.value);else if(l.type==="select-multiple"){o[l.name]=[];for(let i=0;i<l.options.length;i++)l.options[i].selected&&o[l.name].push(l.options[i].value)}else if(n&&l.type==="hidden")o[l.name]=l.value;else if(n&&(l.type==="number"||l.type==="range")){const i=Number(l.value);o[l.name]=l.value===""||isNaN(i)?null:i}else o[l.name]=l.value}return o}function ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function de(e,t){const n=e.elements,r=[],o={};for(let a=0;a<n.length;a++){const s=n[a];s.name&&s.type==="checkbox"&&(o[s.name]=(o[s.name]||0)+1)}for(let a=0;a<n.length;a++){const s=n[a];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const c=s.getAttribute("data-ln-fill-as")||s.name;if(!c||!(c in t))continue;const l=t[c];if(s.type==="checkbox"){if(Array.isArray(l))s.checked=l.indexOf(s.value)!==-1;else if(o[s.name]>1){const i=String(l).split(",").map(function(u){return u.trim()});s.checked=i.indexOf(s.value)!==-1}else s.checked=ue(l);r.push(s)}else if(s.type==="radio")s.checked=s.value===String(l),r.push(s);else if(s.type==="select-multiple"){if(Array.isArray(l))for(let i=0;i<s.options.length;i++)s.options[i].selected=l.indexOf(s.options[i].value)!==-1;r.push(s)}else s.value=l,s.tagName==="SELECT"&&l!=null&&s.setAttribute("data-ln-value",l),r.push(s)}return r}function fe(e,t,{get:n,set:r}){Object.defineProperty(e,"value",{get:function(){return n?n.call(this):t.get.call(this)},set:function(o){r?r.call(this,o,a=>t.set.call(this,a)):t.set.call(this,o)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=de,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=ae);const W={};function he(e,t){W[e]=t}function me(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=he,window.lnCore.getDataMapper=me);function L(e){const t=e?e.closest("[lang]"):null,n=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return n?n.trim():"en-US"}function U(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,M(function(){new MutationObserver(function(){H(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const K={};function Q(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];K[n]=t}function E(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return K[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=Q,window.lnCore.getLocaleFallback=E,window.lnCore.ensureLocaleObserver=U);const F={};function pe(e,t){F[e]||(F[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=F[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function Y(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const c=n[s],l=c.getAttribute("data-ln-field");t[l]!=null&&(c.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const c=r[s],l=c.getAttribute("data-ln-attr").split(",");for(let i=0;i<l.length;i++){const u=l[i].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();t[h]!=null&&c.setAttribute(d,t[h])}}const o=e.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const c=o[s],l=c.getAttribute("data-ln-show");l in t&&c.classList.toggle("hidden",!t[l])}const a=e.querySelectorAll("[data-ln-class]");for(let s=0;s<a.length;s++){const c=a[s],l=c.getAttribute("data-ln-class").split(",");for(let i=0;i<l.length;i++){const u=l[i].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();h in t&&c.classList.toggle(d,!!t[h])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)Y(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function J(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const a=n.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,c){return t[c]!==void 0?t[c]:""}))}const r=function(a,s){return t[s]!==void 0?t[s]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let a=0;a<o.length;a++){const s=o[a],c=s.attributes;for(let l=0;l<c.length;l++){const i=c[l];i.value.indexOf("{{")!==-1&&s.setAttribute(i.name,i.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ge(e,t,n,r,o,a){const s={};for(let l=0;l<e.children.length;l++){const i=e.children[l],u=i.getAttribute("data-ln-render-key");u&&(s[u]=i)}const c=document.createDocumentFragment();for(let l=0;l<t.length;l++){const i=t[l],u=String(r(i));let d=s[u];if(d)o(d,i,l);else{const h=pe(n,a);if(!h||(J(h,i),d=h.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,i,l)}c.appendChild(d)}e.textContent="",e.appendChild(c)}function be(e,t){const n={},r=e.querySelectorAll("["+t+"]");for(let o=0;o<r.length;o++)n[r[o].getAttribute(t)]=r[o].textContent,r[o].remove();return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=J,window.lnCore.fill=Y,window.lnCore.lnFill=we,window.lnCore.renderList=ge);function R(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function z(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function G(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function X(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const B=new Map;function Z(e,t){const n=(e?e.join("|"):"")+"::"+t;if(B.has(n))return B.get(n);const r=new Set(e||[]),o=function(a,s){const c=a.getAttribute(s);return c!==null&&r.has(c)?c:t};return B.set(n,o),o}function ee(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function te(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function ne(e,t,n,r,o){if(!e||t===null)return!0;const a=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const c=l=>{o?console.warn(l,o):console.warn(l)};if(s==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(c(`[${a}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const l=e.values||[];return l.includes(t)?!0:(c(`[${a}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return c(`[${a}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(c(`[${a}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(c(`[${a}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(c(`[${a}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(l){return c(`[${a}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function ye(e,t,n){for(const r in n){const[o,a,s]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,a,s)},enumerable:!0,configurable:!0})}return e}function Ce(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Z(r.values,r.fallback);break;case"integer":o=z;break;case"float":o=ee;break;case"boolean":o=G;break;case"list":o=X;break;case"json":o=te;break;case"string":default:o=R;break}o||(o=R),t[r.prop]=[o,n,r.fallback]}return t}function _e(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function ve(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ye,window.lnCore.attrSpec=Ce,window.lnCore.attrStr=R,window.lnCore.attrInt=z,window.lnCore.attrBool=G,window.lnCore.attrList=X,window.lnCore.attrEnum=Z,window.lnCore.attrFloat=ee,window.lnCore.attrJson=te);function $(e,t,n,r){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s=Array.from(e.querySelectorAll(a));e.matches&&e.matches(a)&&s.push(e);for(const c of s)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new r(c)}catch(l){console.error("["+n+"] init failed",c,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ae(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function xe(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function re(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Se(e){const t=re(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(a=>a.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ve(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function oe(e,t,n,r){for(let o=0;o<e.length;o++){const a=e[o];if(!t[a.attribute])continue;const s=a.effects&&a.effects[n];s?s(t,n,r):a.onAttrChange&&(!a.declared||a.declared.has(n))&&a.onAttrChange(t,n,r)}}function ke(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=re(),o=r.byAttr.get(n);if(P()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&I(t)){const a=r.byDeclaredAttr.get(n),s=t.getAttribute(n);for(let c=0;c<a.length;c++)ne(a[c].spec,s,n,a[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const a=r.byReactive.get(n);a&&oe(a,t,n,e.oldValue),r.reactiveWildcard.length&&oe(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let a=0;a<o.length;a++){const s=o[a];if(s.handler){s.handler(t,n,e.oldValue);continue}s.onAttributeChange&&t[s.attribute]?s.onAttributeChange(t,n):($(t,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(t))}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,M(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ke(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ie(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function Oe(e){const t=ie();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,a=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;a&&r.onSubtreeChange(a,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const a=t[o];$(r,a.selector,a.attribute,a.ComponentFn),a.onInit&&a.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const a=t[o],s=a.query,c=Array.from(r.querySelectorAll(s));r.matches&&r.matches(s)&&c.push(r);for(let l=0;l<c.length;l++){const i=c[l];if(!document.contains(i)){const u=i[a.attribute];if(u&&typeof u.destroy=="function")try{u.destroy()}catch(d){console.error("["+a.attribute+"] destroy failed",i,d)}delete i[a.attribute]}}}}}}function Te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,M(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{Oe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function le(e,t,n,r,o={}){const a=o.extraAttributes||[],s=o.onAttributeChange||null,c=o.onSubtreeChange||null,l=o.onInit||null,i=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,h=d?_e(d):u,b=d?new Set(Object.keys(d)):null,w=o.persist||null;function g(m){const p=m||document.body;if($(p,e,t,n),d&&P())for(const y in d){const v=d[y],x=Array.from(p.querySelectorAll("["+y+"]"));p.matches&&p.matches("["+y+"]")&&x.push(p);for(let D=0;D<x.length;D++){const k=x[D];I(k)&&ne(v,k.getAttribute(y),y,r,k)}}l&&l(p)}const C=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let p;for(;(p=m.exec(e))!==null;)C.push(p[1])}else C.push(e);Se({selector:e,attribute:t,componentTag:r,attributes:d,ComponentFn:n,onInit:l,observed:C.concat(a),onAttributeChange:s,onAttrChange:i,effects:h,declared:b,persist:w}),Ee();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,T=o.subtreeQuery||(A?e:"["+e+"]");ie().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:c,query:T}),Te(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=le);function f(){Ae()>0?xe(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function se(e){return(e||"").replace(/^#/,"")}function V(e){const t=e===void 0?location.hash:e,n={},r=se(t);if(!r)return n;const o=r.split("&");for(let a=0;a<o.length;a++){const s=o[a];if(!s)continue;const c=s.indexOf(":"),l=c>-1?s.slice(0,c):s,i=c>-1?s.slice(c+1):"";if(l)try{n[l]=decodeURIComponent(i)}catch{n[l]=i}}return n}function De(e){if(!e)return null;const t=V();return e in t?t[e]:null}function Me(e,t){if(!e)return;const n=V();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(a){const s=n[a];return s===""?a:a+":"+encodeURIComponent(s)}).join("&");se(location.hash)!==o&&(location.hash=o)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Ne(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function 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 Re(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Be(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=V,window.lnCore.hashGet=De,window.lnCore.hashSet=Me,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Ne,window.lnCore.hashSortEncode=Ie,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=Re,window.lnCore.hashFilterDecode=Be);function $e(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=$e);function _(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const n=t<1e11?t*1e3:t,r=new Date(n);return isNaN(r.getTime())?null:r}if(typeof e=="string"){const n=e.trim();if(!n)return null;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(n);if(r){const a=+r[1],s=+r[2],c=+r[3],l=new Date(a,s-1,c);return l.getFullYear()!==a||l.getMonth()!==s-1||l.getDate()!==c?null:l}const o=new Date(n);return isNaN(o.getTime())?null:o}return null}function S(e){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return t+"-"+n+"-"+r}const j=/^(short|medium|long)(\s+datetime)?$/,Ve={short:{dateStyle:"short"},medium:{dateStyle:"medium"},long:{dateStyle:"long"},"short datetime":{dateStyle:"short",timeStyle:"short"},"medium datetime":{dateStyle:"medium",timeStyle:"short"},"long datetime":{dateStyle:"long",timeStyle:"short"}};function je(e){return!e||e===""?{dateStyle:"medium"}:String(e).trim().match(j)?Ve[e.trim()]:null}function O(e){if(!e||typeof e!="string")return null;const t=e.trim();if(t.length<6)return null;let n,r;if(t.indexOf(".")!==-1)n=".",r=t.split(".");else if(t.indexOf("/")!==-1)n="/",r=t.split("/");else if(t.indexOf("-")!==-1)n="-",r=t.split("-");else return null;if(r.length!==3)return null;const o=[];for(let i=0;i<3;i++){const u=parseInt(r[i],10);if(isNaN(u))return null;o.push(u)}let a,s,c;n==="."?(a=o[0],s=o[1],c=o[2]):n==="/"?(s=o[0],a=o[1],c=o[2]):r[0].length===4?(c=o[0],s=o[1],a=o[2]):(a=o[0],s=o[1],c=o[2]),c<100&&(c+=c<50?2e3:1900);const l=new Date(c,s-1,a);return l.getFullYear()!==c||l.getMonth()!==s-1||l.getDate()!==a?null:l}function q(e,t,n,r){if(!e||!(e instanceof Date)||isNaN(e.getTime())||!t||typeof t!="string")return"";const o=e.getDate(),a=e.getMonth(),s=e.getFullYear(),c=e.getHours(),l=e.getMinutes();let i,u;const d=(n||"").toLowerCase().split("-")[0];let h=!1;try{const g=new Intl.DateTimeFormat(n,{month:"long"}).resolvedOptions().locale.toLowerCase().split("-")[0];h=!!(r&&g!==d)}catch{h=!!r}if(h&&r&&r.monthsLong)i=r.monthsLong[a];else try{i=new Intl.DateTimeFormat(n,{month:"long"}).format(e)}catch{i=String(a+1)}if(h&&r&&r.monthsShort)u=r.monthsShort[a];else try{u=new Intl.DateTimeFormat(n,{month:"short"}).format(e)}catch{u=String(a+1)}const b={yyyy:String(s),yy:String(s).slice(-2),MMMM:i,MMM:u,MM:String(a+1).padStart(2,"0"),M:String(a+1),dd:String(o).padStart(2,"0"),d:String(o),HH:String(c).padStart(2,"0"),mm:String(l).padStart(2,"0")};return t.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|mm/g,function(w){return b[w]!==void 0?b[w]:w})}function N(e,t,n,r){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const o=je(t);if(o)try{const a=new Intl.DateTimeFormat(n,o),s=(n||"").toLowerCase().split("-")[0],c=a.resolvedOptions().locale.toLowerCase().split("-")[0];return r&&c!==s?q(e,"dd.MM.yyyy",n,r):a.format(e)}catch{return q(e,"dd.MM.yyyy",n,r)}return q(e,t||"dd.MM.yyyy",n,r)}(function(){const e="data-ln-date",t="lnDate";if(window[t]!==void 0)return;function n(i){const u=i[t];if(u){if(u.isTextElement)u._initTextElement();else if(u.value){const d=_(u.value);d&&u._displayFormatted(d)}}}const r={"data-ln-date":{type:"enum",values:["short","medium","long","full","iso"],fallback:"medium",effect:n,description:"Date display style preset or activator"},"data-ln-date-format":{type:"string",effect:n,description:"Custom Intl.DateTimeFormat pattern or options"},"data-ln-date-locale":{type:"string",effect:n,description:"BCP 47 language tag override for date formatting"},"data-ln-value":{type:"string",effect:n,description:"Raw ISO date string or timestamp for non-time elements (td, span)"},"data-ln-date-dict":{type:"marker",description:"Container for date translation dictionary"},"data-ln-date-dict-key":{type:"string",description:"Dictionary key for relative time or custom date formatting"},"data-ln-date-field":{type:"string",description:"Field name mapping for date record binding"},"data-ln-date-label":{type:"string",description:"Accessible label text for the date input"}},o=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function a(i,u,d){H(i.dom,"ln-date:change",{value:u,formatted:i.dom.value,date:d}),i.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function s(i,u,d,h){i._setHiddenRaw(u),o.set.call(i._picker,u),i._lastISO=u,h!==void 0?(i._isFormatting=!0,i.dom.value=h,i._isFormatting=!1):d&&i._displayFormatted(d),a(i,u,d)}function c(i){i._setHiddenRaw(""),o.set.call(i._picker,""),i._isFormatting=!0,i.dom.value="",i._isFormatting=!1,i._lastISO="",a(i,"",null)}function l(i){if(i[t])return i[t];i[t]=this,this.dom=i;const u=this;if(this._onLocaleChange=function(){if(u.isTextElement)u._formatTextContent();else if(u.value){const f=_(u.value);f&&u._displayFormatted(f)}},U(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),i.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const d=i.value,h=i.name,b=i.closest(".form-element, form")||i.parentNode;if(b){const f=b.querySelectorAll("[data-ln-date-dict]");for(let m=0;m<f.length;m++){const p=f[m].getAttribute("data-ln-date-dict");if(p){const y=be(f[m],"data-ln-date-dict-key");y["months-long"]&&(y.monthsLong=y["months-long"].split(",").map(v=>v.trim())),y["months-short"]&&(y.monthsShort=y["months-short"].split(",").map(v=>v.trim())),Q(p,y)}}}const w=document.createElement("span");w.setAttribute("data-ln-date-field",""),i.parentNode.insertBefore(w,i),w.appendChild(i),this._wrapper=w;const g=document.createElement("input");g.type="hidden",g.name=h,i.removeAttribute("name"),i.hasAttribute("data-ln-fill-as")&&g.setAttribute("data-ln-fill-as",i.getAttribute("data-ln-fill-as")),i.insertAdjacentElement("afterend",g),this._hidden=g;const C=document.createElement("input");C.type="date",C.tabIndex=-1,C.setAttribute("tabindex","-1"),C.setAttribute("aria-hidden","true"),C.setAttribute("aria-label",i.getAttribute("data-ln-date-label")||"Date picker"),C.style.cssText="position:absolute;opacity:0;width:0;height:0;overflow:hidden;pointer-events:none",g.insertAdjacentElement("afterend",C),this._picker=C,i.type="text";const A=document.createElement("button");A.type="button",A.setAttribute("aria-label",i.getAttribute("data-ln-date-label")||"Open date picker"),A.innerHTML='<svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-calendar"></use></svg>',C.insertAdjacentElement("afterend",A),this._btn=A,this._lastISO="",Object.defineProperty(g,"value",{get:function(){return o.get.call(g)},set:function(f){if(o.set.call(g,f),f&&f!==""){const m=_(f);m&&s(u,f,m)}else f===""&&c(u)}}),fe(i,o,{get:function(){return o.get.call(i)},set:function(f,m){if(u._isFormatting){m(f);return}if(!f||f===""){m(""),c(u);return}const p=_(f)||O(f);if(p){const y=S(p),v=i.getAttribute(e)||"",x=L(i),D=E(x),k=N(p,v,x,D);m(k),s(u,y,p,k)}else m(String(f)),c(u)}}),this._onPickerChange=function(){const f=C.value;if(f){const m=_(f);m&&s(u,f,m)}else c(u)},C.addEventListener("change",this._onPickerChange),this._onBlur=function(){const f=u.dom.value.trim();if(f===""){u._lastISO!==""&&c(u);return}if(u._lastISO){const p=_(u._lastISO);if(p){const y=u.dom.getAttribute(e)||"",v=L(u.dom),x=E(v);if(f===N(p,y,v,x))return}}const m=O(f);if(m){const p=S(m);s(u,p,m)}else if(u._lastISO){const p=_(u._lastISO);p&&u._displayFormatted(p)}else u.dom.value=""},i.addEventListener("blur",this._onBlur),this._onBtnClick=function(){u._openPicker()},A.addEventListener("click",this._onBtnClick);const T=i.form;if(T&&(this._form=T,this._onFormReset=function(){setTimeout(function(){const f=u.dom.value;if(f){const m=_(f)||O(f);if(m){const p=S(m);s(u,p,m);return}}c(u)},0)},T.addEventListener("reset",this._onFormReset)),d&&d!==""){const f=_(d);f&&s(u,d,f)}return this}l.prototype._initTextElement=function(){const i=this.dom,u=i.getAttribute("data-ln-value"),d=i.getAttribute("data-ln-date"),h=i.getAttribute("datetime");let b=null;i.tagName==="TIME"&&h!==null&&h!==""?b=h:u!==null&&u!==""?b=u:h!==null&&h!==""?b=h:d!==null&&d!==""&&d!=="true"&&!j.test(d)?b=d:b=i.textContent.trim();const w=_(b)||O(b);if(w&&!isNaN(w.getTime())){const g=S(w);this._rawValue=g,i.tagName!=="TIME"&&!i.hasAttribute("data-ln-value")&&i.setAttribute("data-ln-value",g),this._formatTextContent()}else this._rawValue=null},l.prototype._formatTextContent=function(){if(this._rawValue){const i=_(this._rawValue);if(i){let d=this.dom.getAttribute("data-ln-date-format");if(!d){const w=this.dom.getAttribute("data-ln-date");w&&j.test(w)&&(d=w)}const h=L(this.dom),b=E(h);this.dom.textContent=N(i,d||"medium",h,b)}}},l.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},l.prototype._setHiddenRaw=function(i){o.set.call(this._hidden,i)},l.prototype._displayFormatted=function(i){const u=this.dom.getAttribute(e)||"",d=L(this.dom),h=E(d);this._isFormatting=!0,this.dom.value=N(i,u,d,h),this._isFormatting=!1},Object.defineProperty(l.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":o.get.call(this._hidden)},set:function(i){if(this.isTextElement){if(!i||i===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const d=_(i)||O(i);if(!d)return;const h=S(d);this._rawValue=h,this.dom.tagName==="TIME"?this.dom.setAttribute("datetime",h):this.dom.setAttribute("data-ln-value",h),this._formatTextContent();return}if(!i||i===""){c(this);return}const u=_(i);u&&s(this,i,u)}}),Object.defineProperty(l.prototype,"date",{get:function(){const i=this.value;return i?_(i):null},set:function(i){if(!i||!(i instanceof Date)||isNaN(i.getTime())){this.value="";return}this.value=S(i)}}),Object.defineProperty(l.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),l.prototype.destroy=function(){if(!this.dom[t])return;if(this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement){delete this.dom[t];return}this._form&&this._onFormReset&&this._form.removeEventListener("reset",this._onFormReset),this._picker.removeEventListener("change",this._onPickerChange),this.dom.removeEventListener("blur",this._onBlur),this._btn.removeEventListener("click",this._onBtnClick);const i=this.value;this._hidden.remove(),this._picker.remove(),this._btn.remove(),this._wrapper&&this._wrapper.parentNode&&(this._wrapper.parentNode.insertBefore(this.dom,this._wrapper),this._wrapper.remove()),delete this.dom.value,this.dom.name=this._hidden.name,this.dom.type="date",i&&(this.dom.value=i),delete this.dom[t]},le(e,t,l,"ln-date",{attributes:r,extraAttributes:["datetime","lang"],onAttributeChange:n})})()})();
|
|
1
|
+
(function(){"use strict";function W(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function I(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let n=1;n<t.length;n++)if(t[n]&&t[n].nodeType===1){o=t[n];break}if(!I(o))return}e.apply(console,t)}}function U(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 M(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){M(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function de(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function fe(e,t){const r=!!(t&&t.typed),o=t&&t.exclude,n={},c=e.elements,s={};if(r)for(let a=0;a<c.length;a++){const i=c[a];i.name&&i.type==="checkbox"&&!i.disabled&&(s[i.name]=(s[i.name]||0)+1)}for(let a=0;a<c.length;a++){const i=c[a];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&&s[i.name]===1?n[i.name]=i.checked:(n[i.name]||(n[i.name]=[]),i.checked&&n[i.name].push(i.value));else if(i.type==="radio")i.checked&&(n[i.name]=i.value);else if(i.type==="select-multiple"){n[i.name]=[];for(let l=0;l<i.options.length;l++)i.options[l].selected&&n[i.name].push(i.options[l].value)}else if(r&&i.type==="hidden")n[i.name]=i.value;else if(r&&(i.type==="number"||i.type==="range")){const l=Number(i.value);n[i.name]=i.value===""||isNaN(l)?null:l}else n[i.name]=i.value}return n}function he(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function me(e,t){const r=e.elements,o=[],n={};for(let c=0;c<r.length;c++){const s=r[c];s.name&&s.type==="checkbox"&&(n[s.name]=(n[s.name]||0)+1)}for(let c=0;c<r.length;c++){const s=r[c];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const a=s.getAttribute("data-ln-fill-as")||s.name;if(!a||!(a in t))continue;const i=t[a];if(s.type==="checkbox"){if(Array.isArray(i))s.checked=i.indexOf(s.value)!==-1;else if(n[s.name]>1){const l=String(i).split(",").map(function(u){return u.trim()});s.checked=l.indexOf(s.value)!==-1}else s.checked=he(i);o.push(s)}else if(s.type==="radio")s.checked=s.value===String(i),o.push(s);else if(s.type==="select-multiple"){if(Array.isArray(i))for(let l=0;l<s.options.length;l++)s.options[l].selected=i.indexOf(s.options[l].value)!==-1;o.push(s)}else s.value=i,s.tagName==="SELECT"&&i!=null&&s.setAttribute("data-ln-value",i),o.push(s)}return o}function pe(e,t,{get:r,set:o}){Object.defineProperty(e,"value",{get:function(){return r?r.call(this):t.get.call(this)},set:function(n){o?o.call(this,n,c=>t.set.call(this,c)):t.set.call(this,n)},configurable:!0})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=me,window.lnCore.serializeForm=fe,window.lnCore.resolveFormMethod=de);const K={};function we(e,t){K[e]=t}function ge(e){return K[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=ge);function N(e){const t=e?e.closest("[lang]"):null,r=(t?t.getAttribute("lang")||t.lang:null)||(typeof document<"u"&&document.documentElement?document.documentElement.getAttribute("lang")||document.documentElement.lang:null)||(typeof navigator<"u"?navigator.language:null);return r?r.trim():"en-US"}function Q(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,M(function(){new MutationObserver(function(){U(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const Y={};function J(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];Y[r]=t}function E(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return Y[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=J,window.lnCore.getLocaleFallback=E,window.lnCore.ensureLocaleObserver=Q);const R={};function be(e,t){R[e]||(R[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=R[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function z(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let s=0;s<r.length;s++){const a=r[s],i=a.getAttribute("data-ln-field");t[i]!=null&&(a.textContent=t[i])}const o=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<o.length;s++){const a=o[s],i=a.getAttribute("data-ln-attr").split(",");for(let l=0;l<i.length;l++){const u=i[l].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();t[h]!=null&&a.setAttribute(d,t[h])}}const n=e.querySelectorAll("[data-ln-show]");for(let s=0;s<n.length;s++){const a=n[s],i=a.getAttribute("data-ln-show");i in t&&a.classList.toggle("hidden",!t[i])}const c=e.querySelectorAll("[data-ln-class]");for(let s=0;s<c.length;s++){const a=c[s],i=a.getAttribute("data-ln-class").split(",");for(let l=0;l<i.length;l++){const u=i[l].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),h=u[1].trim();h in t&&a.classList.toggle(d,!!t[h])}}return e}function ye(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)z(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 G(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(s,a){return t[a]!==void 0?t[a]:""}))}const o=function(c,s){return t[s]!==void 0?t[s]:""},n=Array.from(e.querySelectorAll("*"));e.nodeType===1&&n.push(e);for(let c=0;c<n.length;c++){const s=n[c],a=s.attributes;for(let i=0;i<a.length;i++){const l=a[i];l.value.indexOf("{{")!==-1&&s.setAttribute(l.name,l.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function Ce(e,t,r,o,n,c){const s={};for(let i=0;i<e.children.length;i++){const l=e.children[i],u=l.getAttribute("data-ln-render-key");u&&(s[u]=l)}const a=document.createDocumentFragment();for(let i=0;i<t.length;i++){const l=t[i],u=String(o(l));let d=s[u];if(d)n(d,l,i);else{const h=be(r,c);if(!h||(G(h,l),d=h.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),n(d,l,i)}a.appendChild(d)}e.textContent="",e.appendChild(a)}function _e(e,t){const r={},o=e.querySelectorAll("["+t+"]");for(let n=0;n<o.length;n++)r[o[n].getAttribute(t)]=o[n].textContent,o[n].remove();return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=G,window.lnCore.fill=z,window.lnCore.lnFill=ye,window.lnCore.renderList=Ce);function q(e,t,r){const o=e.getAttribute(t);return o===null?r:o}function X(e,t,r){const o=parseInt(e.getAttribute(t),10);return isNaN(o)?r:o}function Z(e,t,r=!1){const o=e.getAttribute(t);if(o===null)return!!r;const n=o.trim().toLowerCase();return!(n==="false"||n==="0")}function ee(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const B=new Map;function te(e,t){const r=(e?e.join("|"):"")+"::"+t;if(B.has(r))return B.get(r);const o=new Set(e||[]),n=function(c,s){const a=c.getAttribute(s);return a!==null&&o.has(a)?a:t};return B.set(r,n),n}function ne(e,t,r){const o=parseFloat(e.getAttribute(t));return isNaN(o)?r:o}function re(e,t,r){const o=e.getAttribute(t);if(!o)return r;try{return JSON.parse(o)}catch{return r}}function oe(e,t,r,o,n){if(!e||t===null)return!0;const c=o||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const a=i=>{n?console.warn(i,n):console.warn(i)};if(s==="boolean"){const i=t.trim().toLowerCase();return i!==""&&i!=="true"&&i!=="false"&&i!=="1"&&i!=="0"?(a(`[${c}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const i=e.values||[];return i.includes(t)?!0:(a(`[${c}] Invalid value "${t}" for attribute "${r}". Allowed: ${i.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return a(`[${c}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const i=parseInt(t,10);return e.min!==void 0&&i<e.min?(a(`[${c}] Value ${i} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&i>e.max?(a(`[${c}] Value ${i} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(a(`[${c}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(i){return a(`[${c}] Invalid JSON for attribute "${r}": ${i.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,r){for(const o in r){const[n,c,s]=r[o];Object.defineProperty(e,o,{get:function(){return n(t,c,s)},enumerable:!0,configurable:!0})}return e}function Ae(e){const t={};for(const r in e){const o=e[r];if(!o||!o.prop)continue;let n=o.read;if(!n&&o.type)switch(o.type){case"enum":n=te(o.values,o.fallback);break;case"integer":n=X;break;case"float":n=ne;break;case"boolean":n=Z;break;case"list":n=ee;break;case"json":n=re;break;case"string":default:n=q;break}n||(n=q),t[o.prop]=[n,r,o.fallback]}return t}function xe(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 Se(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=ve,window.lnCore.attrSpec=Ae,window.lnCore.attrStr=q,window.lnCore.attrInt=X,window.lnCore.attrBool=Z,window.lnCore.attrList=ee,window.lnCore.attrEnum=te,window.lnCore.attrFloat=ne,window.lnCore.attrJson=re);function D(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 ie(e,t,r,o){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:r,ComponentFn:o};if(e.matches&&e.matches(c)&&D(e,s),e.querySelectorAll){const a=e.querySelectorAll(c);for(let i=0;i<a.length;i++)D(a[i],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ke(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ee(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function le(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function De(e){const t=le(),r=e.observed||[];for(let o=0;o<r.length;o++){const n=r[o];t.byAttr.has(n)||t.byAttr.set(n,[]),t.byAttr.get(n).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 n=t.byDeclaredAttr.get(o);n.some(c=>c.componentTag===e.componentTag)||n.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=Se(e);if(o===null)t.reactiveWildcard.push(e);else for(const n of o)t.byReactive.has(n)||t.byReactive.set(n,[]),t.byReactive.get(n).push(e)}e.persist&&t.persist.push(e)}function se(e,t,r,o){for(let n=0;n<e.length;n++){const c=e[n];if(!t[c.attribute])continue;const s=c.effects&&c.effects[r];s?s(t,r,o):c.onAttrChange&&(!c.declared||c.declared.has(r))&&c.onAttrChange(t,r,o)}}function Oe(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,o=le(),n=o.byAttr.get(t),c=W()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(t);if(!r&&!n&&!c)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(c&&I(s)){const a=o.byDeclaredAttr.get(t),i=s.getAttribute(t);for(let l=0;l<a.length;l++)oe(a[l].spec,i,t,a[l].componentTag,s)}if(window.lnCore._debugSink&&(r||n)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),r){const a=o.byReactive.get(t);a&&se(a,s,t,e.oldValue),o.reactiveWildcard.length&&se(o.reactiveWildcard,s,t,e.oldValue)}if(n)for(let a=0;a<n.length;a++){const i=n[a];if(i.handler){i.handler(s,t,e.oldValue);continue}i.onAttributeChange&&s[i.attribute]?i.onAttributeChange(s,t):(ie(s,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(s))}}}function Te(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,M(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Oe(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 $(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function V(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 Le(e){const t=$();if(!t.length)return;const r=e.target;if(r){const o=r.nodeType===1?r:r.parentElement;if(o&&(o.isContentEditable||o.closest&&o.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let o=0;o<t.length;o++){const n=t[o];if(n.onSubtreeChange&&n.query){const c=n.query,s=e.target.nodeType===1?e.target.matches&&e.target.matches(c)?e.target:e.target.closest?e.target.closest(c):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(c):null;s&&n.onSubtreeChange(s,e)}}for(let o=0;o<e.addedNodes.length;o++){const n=e.addedNodes[o];if(n.nodeType===1){const c=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const a=t[s];if(a.selector&&a.attribute&&a.ComponentFn){if(!c)n.matches&&n.matches(a.query)&&D(n,a);else if(n.matches&&n.matches(a.query)&&D(n,a),n.querySelectorAll){const i=n.querySelectorAll(a.query);for(let l=0;l<i.length;l++)D(i[l],a)}}a.onInit&&a.onInit(n)}}}for(let o=0;o<e.removedNodes.length;o++){const n=e.removedNodes[o];if(n.nodeType===1){const c=!!(n.firstElementChild||n.children&&n.children.length);for(let s=0;s<t.length;s++){const a=t[s],i=a.query;if(i){if(!c)n.matches&&n.matches(i)&&V(n,a);else if(n.matches&&n.matches(i)&&V(n,a),n.querySelectorAll){const l=n.querySelectorAll(i);for(let u=0;u<l.length;u++)V(l[u],a)}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,M(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const o=t[r];if(o.type==="childList")try{Le(o)}catch(n){console.error("[ln-core] lifecycle handler failed",o.target,n)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Me(e){$().push(e),ae()}function ce(e,t,r,o,n={}){const c=n.extraAttributes||[],s=n.onAttributeChange||null,a=n.onSubtreeChange||null,i=n.onInit||null,l=n.onAttrChange||null,u=n.effects||null,d=n.attributes||null,h=d?xe(d):u,b=d?new Set(Object.keys(d)):null,w=n.persist||null;function g(m){const p=m||document.body;if(ie(p,e,t,r),d&&W())for(const y in d){const v=d[y],x=Array.from(p.querySelectorAll("["+y+"]"));p.matches&&p.matches("["+y+"]")&&x.push(p);for(let L=0;L<x.length;L++){const k=x[L];I(k)&&oe(v,k.getAttribute(y),y,o,k)}}i&&i(p)}const C=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let p;for(;(p=m.exec(e))!==null;)C.push(p[1])}else C.push(e);De({selector:e,attribute:t,componentTag:o,attributes:d,ComponentFn:r,onInit:i,observed:C.concat(c),onAttributeChange:s,onAttrChange:l,effects:h,declared:b,persist:w}),Te();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,T=n.subtreeQuery||(A?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:r,onInit:i,onSubtreeChange:a,query:T}),ae(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ce,window.lnCore.observeLifecycle=Me);function f(){ke()>0?Ee(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",f):f(),g}function ue(e){return(e||"").replace(/^#/,"")}function j(e){const t=e===void 0?location.hash:e,r={},o=ue(t);if(!o)return r;const n=o.split("&");for(let c=0;c<n.length;c++){const s=n[c];if(!s)continue;const a=s.indexOf(":"),i=a>-1?s.slice(0,a):s,l=a>-1?s.slice(a+1):"";if(i)try{r[i]=decodeURIComponent(l)}catch{r[i]=l}}return r}function Ne(e){if(!e)return null;const t=j();return e in t?t[e]:null}function Fe(e,t){if(!e)return;const r=j();t==null?delete r[e]:r[e]=String(t);const n=Object.keys(r).map(function(c){const s=r[c];return s===""?c:c+":"+encodeURIComponent(s)}).join("&");ue(location.hash)!==n&&(location.hash=n)}function Ie(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Be(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function $e(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ve(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),n=o?o.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:r,values:n}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=j,window.lnCore.hashGet=Ne,window.lnCore.hashSet=Fe,window.lnCore.hashLinkClick=Ie,window.lnCore.resolveHashNamespace=Re,window.lnCore.hashSortEncode=qe,window.lnCore.hashSortDecode=Be,window.lnCore.hashFilterEncode=$e,window.lnCore.hashFilterDecode=Ve);function je(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=je);function _(e){if(e==null||e==="")return null;if(e instanceof Date)return isNaN(e.getTime())?null:e;const t=Number(e);if(!isNaN(t)&&t>0){const r=t<1e11?t*1e3:t,o=new Date(r);return isNaN(o.getTime())?null:o}if(typeof e=="string"){const r=e.trim();if(!r)return null;const o=/^(\d{4})-(\d{2})-(\d{2})$/.exec(r);if(o){const c=+o[1],s=+o[2],a=+o[3],i=new Date(c,s-1,a);return i.getFullYear()!==c||i.getMonth()!==s-1||i.getDate()!==a?null:i}const n=new Date(r);return isNaN(n.getTime())?null:n}return null}function S(e){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return t+"-"+r+"-"+o}const P=/^(short|medium|long)(\s+datetime)?$/,Pe={short:{dateStyle:"short"},medium:{dateStyle:"medium"},long:{dateStyle:"long"},"short datetime":{dateStyle:"short",timeStyle:"short"},"medium datetime":{dateStyle:"medium",timeStyle:"short"},"long datetime":{dateStyle:"long",timeStyle:"short"}};function He(e){return!e||e===""?{dateStyle:"medium"}:String(e).trim().match(P)?Pe[e.trim()]:null}function O(e){if(!e||typeof e!="string")return null;const t=e.trim();if(t.length<6)return null;let r,o;if(t.indexOf(".")!==-1)r=".",o=t.split(".");else if(t.indexOf("/")!==-1)r="/",o=t.split("/");else if(t.indexOf("-")!==-1)r="-",o=t.split("-");else return null;if(o.length!==3)return null;const n=[];for(let l=0;l<3;l++){const u=parseInt(o[l],10);if(isNaN(u))return null;n.push(u)}let c,s,a;r==="."?(c=n[0],s=n[1],a=n[2]):r==="/"?(s=n[0],c=n[1],a=n[2]):o[0].length===4?(a=n[0],s=n[1],c=n[2]):(c=n[0],s=n[1],a=n[2]),a<100&&(a+=a<50?2e3:1900);const i=new Date(a,s-1,c);return i.getFullYear()!==a||i.getMonth()!==s-1||i.getDate()!==c?null:i}function H(e,t,r,o){if(!e||!(e instanceof Date)||isNaN(e.getTime())||!t||typeof t!="string")return"";const n=e.getDate(),c=e.getMonth(),s=e.getFullYear(),a=e.getHours(),i=e.getMinutes();let l,u;const d=(r||"").toLowerCase().split("-")[0];let h=!1;try{const g=new Intl.DateTimeFormat(r,{month:"long"}).resolvedOptions().locale.toLowerCase().split("-")[0];h=!!(o&&g!==d)}catch{h=!!o}if(h&&o&&o.monthsLong)l=o.monthsLong[c];else try{l=new Intl.DateTimeFormat(r,{month:"long"}).format(e)}catch{l=String(c+1)}if(h&&o&&o.monthsShort)u=o.monthsShort[c];else try{u=new Intl.DateTimeFormat(r,{month:"short"}).format(e)}catch{u=String(c+1)}const b={yyyy:String(s),yy:String(s).slice(-2),MMMM:l,MMM:u,MM:String(c+1).padStart(2,"0"),M:String(c+1),dd:String(n).padStart(2,"0"),d:String(n),HH:String(a).padStart(2,"0"),mm:String(i).padStart(2,"0")};return t.replace(/yyyy|yy|MMMM|MMM|MM|M|dd|d|HH|mm/g,function(w){return b[w]!==void 0?b[w]:w})}function F(e,t,r,o){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const n=He(t);if(n)try{const c=new Intl.DateTimeFormat(r,n),s=(r||"").toLowerCase().split("-")[0],a=c.resolvedOptions().locale.toLowerCase().split("-")[0];return o&&a!==s?H(e,"dd.MM.yyyy",r,o):c.format(e)}catch{return H(e,"dd.MM.yyyy",r,o)}return H(e,t||"dd.MM.yyyy",r,o)}(function(){const e="data-ln-date",t="lnDate";if(window[t]!==void 0)return;function r(l){const u=l[t];if(u){if(u.isTextElement)u._initTextElement();else if(u.value){const d=_(u.value);d&&u._displayFormatted(d)}}}const o={"data-ln-date":{type:"enum",values:["short","medium","long","full","iso"],fallback:"medium",effect:r,description:"Date display style preset or activator"},"data-ln-date-format":{type:"string",effect:r,description:"Custom Intl.DateTimeFormat pattern or options"},"data-ln-date-locale":{type:"string",effect:r,description:"BCP 47 language tag override for date formatting"},"data-ln-value":{type:"string",effect:r,description:"Raw ISO date string or timestamp for non-time elements (td, span)"},"data-ln-date-dict":{type:"marker",description:"Container for date translation dictionary"},"data-ln-date-dict-key":{type:"string",description:"Dictionary key for relative time or custom date formatting"},"data-ln-date-field":{type:"string",description:"Field name mapping for date record binding"},"data-ln-date-label":{type:"string",description:"Accessible label text for the date input"}},n=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function c(l,u,d){U(l.dom,"ln-date:change",{value:u,formatted:l.dom.value,date:d}),l.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function s(l,u,d,h){l._setHiddenRaw(u),n.set.call(l._picker,u),l._lastISO=u,h!==void 0?(l._isFormatting=!0,l.dom.value=h,l._isFormatting=!1):d&&l._displayFormatted(d),c(l,u,d)}function a(l){l._setHiddenRaw(""),n.set.call(l._picker,""),l._isFormatting=!0,l.dom.value="",l._isFormatting=!1,l._lastISO="",c(l,"",null)}function i(l){if(l[t])return l[t];l[t]=this,this.dom=l;const u=this;if(this._onLocaleChange=function(){if(u.isTextElement)u._formatTextContent();else if(u.value){const f=_(u.value);f&&u._displayFormatted(f)}},Q(),document.addEventListener("ln-core:locale-change",this._onLocaleChange),l.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const d=l.value,h=l.name,b=l.closest(".form-element, form")||l.parentNode;if(b){const f=b.querySelectorAll("[data-ln-date-dict]");for(let m=0;m<f.length;m++){const p=f[m].getAttribute("data-ln-date-dict");if(p){const y=_e(f[m],"data-ln-date-dict-key");y["months-long"]&&(y.monthsLong=y["months-long"].split(",").map(v=>v.trim())),y["months-short"]&&(y.monthsShort=y["months-short"].split(",").map(v=>v.trim())),J(p,y)}}}const w=document.createElement("span");w.setAttribute("data-ln-date-field",""),l.parentNode.insertBefore(w,l),w.appendChild(l),this._wrapper=w;const g=document.createElement("input");g.type="hidden",g.name=h,l.removeAttribute("name"),l.hasAttribute("data-ln-fill-as")&&g.setAttribute("data-ln-fill-as",l.getAttribute("data-ln-fill-as")),l.insertAdjacentElement("afterend",g),this._hidden=g;const C=document.createElement("input");C.type="date",C.tabIndex=-1,C.setAttribute("tabindex","-1"),C.setAttribute("aria-hidden","true"),C.setAttribute("aria-label",l.getAttribute("data-ln-date-label")||"Date picker"),C.style.cssText="position:absolute;opacity:0;width:0;height:0;overflow:hidden;pointer-events:none",g.insertAdjacentElement("afterend",C),this._picker=C,l.type="text";const A=document.createElement("button");A.type="button",A.setAttribute("aria-label",l.getAttribute("data-ln-date-label")||"Open date picker"),A.innerHTML='<svg class="ln-icon" aria-hidden="true"><use href="#ln-icon-calendar"></use></svg>',C.insertAdjacentElement("afterend",A),this._btn=A,this._lastISO="",Object.defineProperty(g,"value",{get:function(){return n.get.call(g)},set:function(f){if(n.set.call(g,f),f&&f!==""){const m=_(f);m&&s(u,f,m)}else f===""&&a(u)}}),pe(l,n,{get:function(){return n.get.call(l)},set:function(f,m){if(u._isFormatting){m(f);return}if(!f||f===""){m(""),a(u);return}const p=_(f)||O(f);if(p){const y=S(p),v=l.getAttribute(e)||"",x=N(l),L=E(x),k=F(p,v,x,L);m(k),s(u,y,p,k)}else m(String(f)),a(u)}}),this._onPickerChange=function(){const f=C.value;if(f){const m=_(f);m&&s(u,f,m)}else a(u)},C.addEventListener("change",this._onPickerChange),this._onBlur=function(){const f=u.dom.value.trim();if(f===""){u._lastISO!==""&&a(u);return}if(u._lastISO){const p=_(u._lastISO);if(p){const y=u.dom.getAttribute(e)||"",v=N(u.dom),x=E(v);if(f===F(p,y,v,x))return}}const m=O(f);if(m){const p=S(m);s(u,p,m)}else if(u._lastISO){const p=_(u._lastISO);p&&u._displayFormatted(p)}else u.dom.value=""},l.addEventListener("blur",this._onBlur),this._onBtnClick=function(){u._openPicker()},A.addEventListener("click",this._onBtnClick);const T=l.form;if(T&&(this._form=T,this._onFormReset=function(){setTimeout(function(){const f=u.dom.value;if(f){const m=_(f)||O(f);if(m){const p=S(m);s(u,p,m);return}}a(u)},0)},T.addEventListener("reset",this._onFormReset)),d&&d!==""){const f=_(d);f&&s(u,d,f)}return this}i.prototype._initTextElement=function(){const l=this.dom,u=l.getAttribute("data-ln-value"),d=l.getAttribute("data-ln-date"),h=l.getAttribute("datetime");let b=null;l.tagName==="TIME"&&h!==null&&h!==""?b=h:u!==null&&u!==""?b=u:h!==null&&h!==""?b=h:d!==null&&d!==""&&d!=="true"&&!P.test(d)?b=d:b=l.textContent.trim();const w=_(b)||O(b);if(w&&!isNaN(w.getTime())){const g=S(w);this._rawValue=g,l.tagName!=="TIME"&&!l.hasAttribute("data-ln-value")&&l.setAttribute("data-ln-value",g),this._formatTextContent()}else this._rawValue=null},i.prototype._formatTextContent=function(){if(this._rawValue){const l=_(this._rawValue);if(l){let d=this.dom.getAttribute("data-ln-date-format");if(!d){const w=this.dom.getAttribute("data-ln-date");w&&P.test(w)&&(d=w)}const h=N(this.dom),b=E(h);this.dom.textContent=F(l,d||"medium",h,b)}}},i.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},i.prototype._setHiddenRaw=function(l){n.set.call(this._hidden,l)},i.prototype._displayFormatted=function(l){const u=this.dom.getAttribute(e)||"",d=N(this.dom),h=E(d);this._isFormatting=!0,this.dom.value=F(l,u,d,h),this._isFormatting=!1},Object.defineProperty(i.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":n.get.call(this._hidden)},set:function(l){if(this.isTextElement){if(!l||l===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const d=_(l)||O(l);if(!d)return;const h=S(d);this._rawValue=h,this.dom.tagName==="TIME"?this.dom.setAttribute("datetime",h):this.dom.setAttribute("data-ln-value",h),this._formatTextContent();return}if(!l||l===""){a(this);return}const u=_(l);u&&s(this,l,u)}}),Object.defineProperty(i.prototype,"date",{get:function(){const l=this.value;return l?_(l):null},set:function(l){if(!l||!(l instanceof Date)||isNaN(l.getTime())){this.value="";return}this.value=S(l)}}),Object.defineProperty(i.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),i.prototype.destroy=function(){if(!this.dom[t])return;if(this._onLocaleChange&&document.removeEventListener("ln-core:locale-change",this._onLocaleChange),this.isTextElement){delete this.dom[t];return}this._form&&this._onFormReset&&this._form.removeEventListener("reset",this._onFormReset),this._picker.removeEventListener("change",this._onPickerChange),this.dom.removeEventListener("blur",this._onBlur),this._btn.removeEventListener("click",this._onBtnClick);const l=this.value;this._hidden.remove(),this._picker.remove(),this._btn.remove(),this._wrapper&&this._wrapper.parentNode&&(this._wrapper.parentNode.insertBefore(this.dom,this._wrapper),this._wrapper.remove()),delete this.dom.value,this.dom.name=this._hidden.name,this.dom.type="date",l&&(this.dom.value=l),delete this.dom[t]},ce(e,t,i,"ln-date",{attributes:o,extraAttributes:["datetime","lang"],onAttributeChange:r})})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var LnAshlarComponent=(function(y){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function A(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let a=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){a=t[l];break}if(!A(a))return}e.apply(console,t)}}function ie(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function de(e,t,n){const a=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,a),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:a}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ce(e,t){const n=!!(t&&t.typed),a=t&&t.exclude,l={},i=e.elements,o={};if(n)for(let d=0;d<i.length;d++){const r=i[d];r.name&&r.type==="checkbox"&&!r.disabled&&(o[r.name]=(o[r.name]||0)+1)}for(let d=0;d<i.length;d++){const r=i[d];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(a&&r.matches&&r.matches(a)))if(r.type==="checkbox")n&&o[r.name]===1?l[r.name]=r.checked:(l[r.name]||(l[r.name]=[]),r.checked&&l[r.name].push(r.value));else if(r.type==="radio")r.checked&&(l[r.name]=r.value);else if(r.type==="select-multiple"){l[r.name]=[];for(let s=0;s<r.options.length;s++)r.options[s].selected&&l[r.name].push(r.options[s].value)}else if(n&&r.type==="hidden")l[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const s=Number(r.value);l[r.name]=r.value===""||isNaN(s)?null:s}else l[r.name]=r.value}return l}function ue(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function fe(e,t){const n=e.elements,a=[],l={};for(let i=0;i<n.length;i++){const o=n[i];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let i=0;i<n.length;i++){const o=n[i];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const d=o.getAttribute("data-ln-fill-as")||o.name;if(!d||!(d in t))continue;const r=t[d];if(o.type==="checkbox"){if(Array.isArray(r))o.checked=r.indexOf(o.value)!==-1;else if(l[o.name]>1){const s=String(r).split(",").map(function(c){return c.trim()});o.checked=s.indexOf(o.value)!==-1}else o.checked=ue(r);a.push(o)}else if(o.type==="radio")o.checked=o.value===String(r),a.push(o);else if(o.type==="select-multiple"){if(Array.isArray(r))for(let s=0;s<o.options.length;s++)o.options[s].selected=r.indexOf(o.options[s].value)!==-1;a.push(o)}else o.value=r,o.tagName==="SELECT"&&r!=null&&o.setAttribute("data-ln-value",r),a.push(o)}return a}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=fe,window.lnCore.serializeForm=ce,window.lnCore.resolveFormMethod=se);const F={};function we(e,t){F[e]=t}function pe(e){return F[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=we,window.lnCore.getDataMapper=pe);function be(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){de(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function he(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];j[n]=t}function me(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=he,window.lnCore.getLocaleFallback=me,window.lnCore.ensureLocaleObserver=be);const x={};function ge(e,t){x[e]||(x[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=x[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function R(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let o=0;o<n.length;o++){const d=n[o],r=d.getAttribute("data-ln-field");t[r]!=null&&(d.textContent=t[r])}const a=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<a.length;o++){const d=a[o],r=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<r.length;s++){const c=r[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const d=l[o],r=d.getAttribute("data-ln-show");r in t&&d.classList.toggle("hidden",!t[r])}const i=e.querySelectorAll("[data-ln-class]");for(let o=0;o<i.length;o++){const d=i[o],r=d.getAttribute("data-ln-class").split(",");for(let s=0;s<r.length;s++){const c=r[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!t[f])}}return e}function ye(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let a=0;a<n.length;a++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[a],t??null),n[a].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)R(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function B(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,d){return t[d]!==void 0?t[d]:""}))}const a=function(i,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let i=0;i<l.length;i++){const o=l[i],d=o.attributes;for(let r=0;r<d.length;r++){const s=d[r];s.value.indexOf("{{")!==-1&&o.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,a))}}return e}function Ce(e,t,n,a,l,i){const o={};for(let r=0;r<e.children.length;r++){const s=e.children[r],c=s.getAttribute("data-ln-render-key");c&&(o[c]=s)}const d=document.createDocumentFragment();for(let r=0;r<t.length;r++){const s=t[r],c=String(a(s));let u=o[c];if(u)l(u,s,r);else{const f=ge(n,i);if(!f||(B(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),l(u,s,r)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=B,window.lnCore.fill=R,window.lnCore.lnFill=ye,window.lnCore.renderList=Ce);function S(e,t,n){const a=e.getAttribute(t);return a===null?n:a}function W(e,t,n){const a=parseInt(e.getAttribute(t),10);return isNaN(a)?n:a}function U(e,t,n=!1){const a=e.getAttribute(t);if(a===null)return!!n;const l=a.trim().toLowerCase();return!(l==="false"||l==="0")}function V(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const k=new Map;function H(e,t){const n=(e?e.join("|"):"")+"::"+t;if(k.has(n))return k.get(n);const a=new Set(e||[]),l=function(i,o){const d=i.getAttribute(o);return d!==null&&a.has(d)?d:t};return k.set(n,l),l}function z(e,t,n){const a=parseFloat(e.getAttribute(t));return isNaN(a)?n:a}function G(e,t,n){const a=e.getAttribute(t);if(!a)return n;try{return JSON.parse(a)}catch{return n}}function Q(e,t,n,a,l){if(!e||t===null)return!0;const i=a||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const d=r=>{l?console.warn(r,l):console.warn(r)};if(o==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const r=e.values||[];return r.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(d(`[${i}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(d(`[${i}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(r){return d(`[${i}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,n){for(const a in n){const[l,i,o]=n[a];Object.defineProperty(e,a,{get:function(){return l(t,i,o)},enumerable:!0,configurable:!0})}return e}function Ae(e){const t={};for(const n in e){const a=e[n];if(!a||!a.prop)continue;let l=a.read;if(!l&&a.type)switch(a.type){case"enum":l=H(a.values,a.fallback);break;case"integer":l=W;break;case"float":l=z;break;case"boolean":l=U;break;case"list":l=V;break;case"json":l=G;break;case"string":default:l=S;break}l||(l=S),t[a.prop]=[l,n,a.fallback]}return t}function xe(e){const t={};for(const n in e){const a=e[n];a&&a.effect&&(t[n]=a.effect)}return Object.keys(t).length?t:null}function Se(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ve,window.lnCore.attrSpec=Ae,window.lnCore.attrStr=S,window.lnCore.attrInt=W,window.lnCore.attrBool=U,window.lnCore.attrList=V,window.lnCore.attrEnum=H,window.lnCore.attrFloat=z,window.lnCore.attrJson=G);function _(e,t,n,a){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&o.push(e);for(const d of o)if(!d[n]){window.lnCore._persistSink&&d.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(d,t);try{d[n]=new a(d)}catch(r){console.error("["+n+"] init failed",d,r)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function J(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function K(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function P(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function X(e){const t=P(),n=e.observed||[];for(let a=0;a<n.length;a++){const l=n[a];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 a in e.attributes){t.byDeclaredAttr.has(a)||t.byDeclaredAttr.set(a,[]);const l=t.byDeclaredAttr.get(a);l.some(i=>i.componentTag===e.componentTag)||l.push({spec:e.attributes[a],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const a=Se(e);if(a===null)t.reactiveWildcard.push(e);else for(const l of a)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,n,a){for(let l=0;l<e.length;l++){const i=e[l];if(!t[i.attribute])continue;const o=i.effects&&i.effects[n];o?o(t,n,a):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,a)}}function ke(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const a=P(),l=a.byAttr.get(n);if(N()&&a.byDeclaredAttr&&a.byDeclaredAttr.has(n)&&A(t)){const i=a.byDeclaredAttr.get(n),o=t.getAttribute(n);for(let d=0;d<i.length;d++)Q(i[d].spec,o,n,i[d].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||l)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=a.byReactive.get(n);i&&Y(i,t,n,e.oldValue),a.reactiveWildcard.length&&Y(a.reactiveWildcard,t,n,e.oldValue)}if(l)for(let i=0;i<l.length;i++){const o=l[i];if(o.handler){o.handler(t,n,e.oldValue);continue}o.onAttributeChange&&t[o.attribute]?o.onAttributeChange(t,n):(_(t,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(t))}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ke(t[n])}catch(a){console.error("[ln-core] mutation handler failed",t[n].target,a)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function ee(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function _e(e){const t=ee();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const a=t[n];if(a.onSubtreeChange){const l=a.query,i=e.target.nodeType===1?e.target.matches(l)?e.target:e.target.closest(l):e.target.parentElement?e.target.parentElement.closest(l):null;i&&a.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const a=e.addedNodes[n];if(a.nodeType===1)for(let l=0;l<t.length;l++){const i=t[l];_(a,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(a)}}for(let n=0;n<e.removedNodes.length;n++){const a=e.removedNodes[n];if(a.nodeType===1)for(let l=0;l<t.length;l++){const i=t[l],o=i.query,d=Array.from(a.querySelectorAll(o));a.matches&&a.matches(o)&&d.push(a);for(let r=0;r<d.length;r++){const s=d[r];if(!document.contains(s)){const c=s[i.attribute];if(c&&typeof c.destroy=="function")try{c.destroy()}catch(u){console.error("["+i.attribute+"] destroy failed",s,u)}delete s[i.attribute]}}}}}}function De(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const a=t[n];if(a.type==="childList")try{_e(a)}catch(l){console.error("[ln-core] lifecycle handler failed",a.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function $e(e,t){X({observed:e,handler:t}),Z()}function te(e,t,n,a,l={}){const i=l.extraAttributes||[],o=l.onAttributeChange||null,d=l.onSubtreeChange||null,r=l.onInit||null,s=l.onAttrChange||null,c=l.effects||null,u=l.attributes||null,f=u?xe(u):c,O=u?new Set(Object.keys(u)):null,Je=l.persist||null;function v(L){const w=L||document.body;if(_(w,e,t,n),u&&N())for(const g in u){const Xe=u[g],T=Array.from(w.querySelectorAll("["+g+"]"));w.matches&&w.matches("["+g+"]")&&T.push(w);for(let q=0;q<T.length;q++){const M=T[q];A(M)&&Q(Xe,M.getAttribute(g),g,a,M)}}r&&r(w)}const E=[];if(e.indexOf("[")!==-1){const L=/\[([\w-]+)/g;let w;for(;(w=L.exec(e))!==null;)E.push(w[1])}else E.push(e);X({selector:e,attribute:t,componentTag:a,attributes:u,ComponentFn:n,onInit:r,observed:E.concat(i),onAttributeChange:o,onAttrChange:s,effects:f,declared:O,persist:Je}),Z();const Ke=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Pe=l.subtreeQuery||(Ke?e:"["+e+"]");ee().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:d,query:Pe}),De(),window[t]=v,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=te);function re(){J()>0?K(function(){v(document.body)}):v(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",re):re(),v}function ne(e){return(e||"").replace(/^#/,"")}function D(e){const t=e===void 0?location.hash:e,n={},a=ne(t);if(!a)return n;const l=a.split("&");for(let i=0;i<l.length;i++){const o=l[i];if(!o)continue;const d=o.indexOf(":"),r=d>-1?o.slice(0,d):o,s=d>-1?o.slice(d+1):"";if(r)try{n[r]=decodeURIComponent(s)}catch{n[r]=s}}return n}function Ie(e){if(!e)return null;const t=D();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const n=D();t==null?delete n[e]:n[e]=String(t);const l=Object.keys(n).map(function(i){const o=n[i];return o===""?i:i+":"+encodeURIComponent(o)}).join("&");ne(location.hash)!==l&&(location.hash=l)}function Ee(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const a=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return a?t?a+"-"+t:a:t||null}function Te(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 Me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ne(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),a=e.slice(t+1),l=a?a.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=D,window.lnCore.hashGet=Ie,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Te,window.lnCore.hashSortDecode=qe,window.lnCore.hashFilterEncode=Me,window.lnCore.hashFilterDecode=Ne);function Fe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Fe);const $=new Set(["data-ln-accordion","data-ln-ajax","data-ln-api-base-url","data-ln-api-connector","data-ln-api-connector-query-debounce","data-ln-api-endpoint","data-ln-api-headers","data-ln-api-param-limit","data-ln-api-param-offset","data-ln-api-param-search","data-ln-api-param-sort-dir","data-ln-api-param-sort-field","data-ln-api-path","data-ln-api-queue","data-ln-api-queue-online","data-ln-attr","data-ln-autoresize","data-ln-autosave","data-ln-autosave-clear","data-ln-autosave-debounce-input","data-ln-autosave-exclude","data-ln-chart","data-ln-chart-area","data-ln-chart-count","data-ln-chart-empty","data-ln-chart-labels","data-ln-chart-line","data-ln-chart-max","data-ln-chart-min","data-ln-chart-padding","data-ln-chart-plot","data-ln-chart-sort","data-ln-chart-source","data-ln-chart-type","data-ln-chart-x","data-ln-chart-y","data-ln-chart-zero","data-ln-circular-progress","data-ln-circular-progress-label","data-ln-circular-progress-max","data-ln-class","data-ln-col","data-ln-confirm","data-ln-confirm-active","data-ln-confirm-announcer","data-ln-confirm-idle","data-ln-confirm-state","data-ln-confirm-timeout","data-ln-connector","data-ln-couchdb-auth","data-ln-couchdb-connector","data-ln-couchdb-db","data-ln-couchdb-headers","data-ln-couchdb-url","data-ln-data-coordinator","data-ln-data-coordinator-connector","data-ln-data-coordinator-filters","data-ln-data-coordinator-mapper","data-ln-data-coordinator-no-autosync","data-ln-data-coordinator-scope","data-ln-data-coordinator-search","data-ln-data-coordinator-sort-direction","data-ln-data-coordinator-sort-field","data-ln-data-coordinator-stale","data-ln-data-store","data-ln-data-store-frozen","data-ln-data-store-indexes","data-ln-data-store-no-autosync","data-ln-data-store-no-local-query","data-ln-data-store-search-fields","data-ln-data-store-stale","data-ln-data-store-window","data-ln-data-store-window-page","data-ln-date","data-ln-date-dict","data-ln-date-dict-key","data-ln-date-field","data-ln-date-format","data-ln-date-label","data-ln-date-locale","data-ln-debug","data-ln-dropdown","data-ln-dropdown-menu","data-ln-dropdown-placement","data-ln-dropdown-position","data-ln-editor","data-ln-editor-action","data-ln-editor-source","data-ln-empty","data-ln-empty-state","data-ln-empty-when","data-ln-error","data-ln-external-link","data-ln-field","data-ln-fill-as","data-ln-fill-form","data-ln-fill-id","data-ln-fillable","data-ln-filter","data-ln-filter-col","data-ln-filter-hide","data-ln-filter-key","data-ln-filter-options","data-ln-filter-reset","data-ln-filter-search","data-ln-filter-target","data-ln-filter-value","data-ln-filter-values","data-ln-form","data-ln-form-action-edit","data-ln-form-action-method","data-ln-hash","data-ln-include","data-ln-initial-value","data-ln-item","data-ln-item-action","data-ln-item-id","data-ln-item-select","data-ln-key","data-ln-key-allow-input","data-ln-key-for","data-ln-key-modifier","data-ln-key-target","data-ln-link","data-ln-list","data-ln-list-body","data-ln-list-count","data-ln-list-empty","data-ln-list-field","data-ln-list-filtered","data-ln-list-select-all","data-ln-list-selectable","data-ln-list-selected","data-ln-list-source","data-ln-list-total","data-ln-list-window","data-ln-list-window-page","data-ln-list-window-threshold","data-ln-modal","data-ln-modal-close","data-ln-modal-for","data-ln-modal-mode","data-ln-modal-when","data-ln-nav","data-ln-nav-exact","data-ln-number","data-ln-number-decimals","data-ln-number-max","data-ln-number-min","data-ln-obfuscator","data-ln-obfuscator-codec","data-ln-obfuscator-key","data-ln-options","data-ln-options-label","data-ln-options-value","data-ln-outlet","data-ln-panel","data-ln-persist","data-ln-persist-scope","data-ln-picklist","data-ln-picklist-list","data-ln-picklist-max","data-ln-popover","data-ln-popover-for","data-ln-popover-placement","data-ln-popover-position","data-ln-progress","data-ln-progress-max","data-ln-render-key","data-ln-route","data-ln-route-keep","data-ln-route-target","data-ln-route-title","data-ln-router-base","data-ln-router-hydrate","data-ln-scroll","data-ln-scroll-behavior","data-ln-scroll-block","data-ln-scroll-delay","data-ln-scroll-focus","data-ln-scroll-set","data-ln-scroll-update-hash","data-ln-search","data-ln-search-clear","data-ln-search-clear-for","data-ln-search-exclude","data-ln-search-fields","data-ln-search-for","data-ln-search-hide","data-ln-search-items","data-ln-show","data-ln-slug-from","data-ln-sort","data-ln-sort-dir","data-ln-sort-exclude","data-ln-sort-field","data-ln-sort-icon","data-ln-sort-items","data-ln-sort-state","data-ln-sortable","data-ln-sortable-handle","data-ln-stat","data-ln-stat-card","data-ln-stat-filter","data-ln-stat-label","data-ln-stat-trend","data-ln-stat-value","data-ln-step","data-ln-step-label","data-ln-stepper","data-ln-store","data-ln-tab","data-ln-table","data-ln-table-body","data-ln-table-cell-attr","data-ln-table-clear","data-ln-table-clear-all","data-ln-table-col","data-ln-table-col-filter","data-ln-table-col-select","data-ln-table-col-sort","data-ln-table-coordinator","data-ln-table-count","data-ln-table-dict","data-ln-table-empty","data-ln-table-empty-when","data-ln-table-filter-col","data-ln-table-filtered","data-ln-table-row","data-ln-table-row-action","data-ln-table-row-id","data-ln-table-row-select","data-ln-table-select-all-label","data-ln-table-selectable","data-ln-table-selected","data-ln-table-sort","data-ln-table-source","data-ln-table-total","data-ln-table-window","data-ln-table-window-page","data-ln-table-window-threshold","data-ln-tabs","data-ln-tabs-active","data-ln-tabs-default","data-ln-tabs-focus","data-ln-tabs-key","data-ln-template","data-ln-time","data-ln-time-locale","data-ln-toast","data-ln-toast-close","data-ln-toast-item","data-ln-toast-max","data-ln-toast-timeout","data-ln-toast-when","data-ln-toggle","data-ln-toggle-action","data-ln-toggle-for","data-ln-tooltip","data-ln-tooltip-enhance","data-ln-tooltip-enhanced","data-ln-tooltip-placement","data-ln-tooltip-position","data-ln-translatable","data-ln-translatable-lang","data-ln-translations","data-ln-translations-active","data-ln-translations-add","data-ln-translations-default","data-ln-translations-lang","data-ln-translations-locales","data-ln-translations-placeholder","data-ln-translations-prefix","data-ln-translations-remove-label","data-ln-ui-coordinator","data-ln-upload","data-ln-upload-accept","data-ln-upload-action","data-ln-upload-delete","data-ln-upload-dict","data-ln-upload-ext","data-ln-upload-file-field","data-ln-upload-id","data-ln-upload-ids-field","data-ln-upload-item","data-ln-upload-list","data-ln-upload-local-id","data-ln-upload-max-files","data-ln-upload-max-size","data-ln-upload-progress","data-ln-upload-size","data-ln-upload-state","data-ln-upload-zone","data-ln-validate","data-ln-validate-error","data-ln-validate-errors","data-ln-value","data-ln-websocket-connector","data-ln-websocket-connector-url"]);function je(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const n=[];for(let a=0;a<=t.length;a++)n[a]=[a];for(let a=0;a<=e.length;a++)n[0][a]=a;for(let a=1;a<=t.length;a++)for(let l=1;l<=e.length;l++)t.charAt(a-1)===e.charAt(l-1)?n[a][l]=n[a-1][l-1]:n[a][l]=Math.min(n[a-1][l-1]+1,n[a][l-1]+1,n[a-1][l]+1);return n[t.length][e.length]}function Re(e,t=$){if(t.has(e))return null;let n=null,a=1/0;for(const i of t){const o=je(e,i);o<a&&(a=o,n=i)}const l=Math.max(3,Math.floor(e.length*.4));return a<=l?n:null}function ae(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Be(e=document){const t=e.ownerDocument||e,n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&r.name.endsWith("-for")){const s=(r.value||"").trim();if(!s){a.push({type:"id-empty",element:o,attribute:r.name,targetId:"",message:`[ln-debug] Empty ID reference in <${o.tagName.toLowerCase()} ${r.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+ae(s))||a.push({type:"id-unresolved",element:o,attribute:r.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${o.tagName.toLowerCase()} ${r.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return a}function We(e=document){const t=e.ownerDocument||e,n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&(r.name.endsWith("-source")||r.name.endsWith("-store"))&&r.name!=="data-ln-data-store"){const c=(r.value||"").trim();if(!c){a.push({type:"store-empty",element:o,attribute:r.name,storeName:"",message:`[ln-debug] Empty store reference in <${o.tagName.toLowerCase()} ${r.name}="">.`});continue}const u=ae(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),O=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!O&&a.push({type:"store-unresolved",element:o,attribute:r.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${o.tagName.toLowerCase()} ${r.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return a}function Ue(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const n=[],a=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&a.unshift(t);const l=new Map;for(let i=0;i<a.length;i++){const o=a[i],d=(o.getAttribute("data-ln-data-store")||"").trim();d&&(l.has(d)||l.set(d,[]),l.get(d).push(o))}for(const[i,o]of l.entries())o.length>1&&n.push({type:"store-duplicate",storeName:i,elements:o,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return n}function Ve(e=document,t=$){const n=e.nodeType===9?e.body||e.documentElement:e;if(!n)return[];const a=[],l=[n,...n.querySelectorAll("*")];for(let i=0;i<l.length;i++){const o=l[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const r=o.attributes[d];if(r.name.startsWith("data-ln-")&&!t.has(r.name)){const s=Re(r.name,t),c=s?` Did you mean "${s}"?`:"";a.push({type:"attribute-unknown",element:o,attribute:r.name,suggestion:s,message:`[ln-debug] Unknown attribute "${r.name}" on <${o.tagName.toLowerCase()}>.${c}`})}}}return a}function C(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const n=t.validAttributes||$,a=Be(e),l=We(e),i=Ue(e),o=Ve(e,n),d=[...a,...l,...i,...o];if(!t.silent)for(let r=0;r<d.length;r++)console.warn(d[r].message);return{idIssues:a,storeIssues:l,uniquenessIssues:i,spellingIssues:o,total:d.length}}let h=null;function m(e=typeof document<"u"?document:null,t=50,n=null){if(!e)return;h&&(clearTimeout(h),h=null);function a(){h=setTimeout(()=>{h=null;const l=C(e);n&&n(l)},t)}J()>0?K(a):a()}function He(e,t,n,a){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",n),console.log("detail",a),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",n),console.log("old → new",a.oldValue,"→",a.newValue),console.groupEnd())}let p=[];function ze(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function oe(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function Ge(e,t,n,a){oe(n)&&He(e,t,n,a)}function I(){ze(),ie(p.length>0?Ge:null,p.length>0?oe:null)}function le(){I()}function Qe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,b(function(){I(),$e(["data-ln-debug"],I)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const n={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};Qe();function a(i){return this.dom=i,m(i.ownerDocument||document),le(),this}a.prototype.verify=function(i,o){return C(i||(this.dom?this.dom.ownerDocument||this.dom:document),o)},a.prototype.destroy=function(){delete this.dom[t],le()};const l=te(e,t,a,"ln-debug",{attributes:n,onInit:function(i){typeof document<"u"&&m(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&m(i&&i.ownerDocument?i.ownerDocument:document)}});l.verify=function(i,o){return C(i||document,o)},l.schedule=function(i,o,d){return m(i||document,o,d)}})(),y.scheduleVerification=m,y.verifyDOM=C,Object.defineProperty(y,Symbol.toStringTag,{value:"Module"}),y})({});
|
|
1
|
+
var LnAshlarComponent=(function(C){"use strict";function j(){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 x(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let n=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){n=t[o];break}if(!x(n))return}e.apply(console,t)}}function ce(e,t){window.lnCore=window.lnCore||{},window.lnCore._debugSink=e,window.lnCore._debugIsContained=t||null}function ue(e,t,a){const n=a||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function fe(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function we(e,t){const a=!!(t&&t.typed),n=t&&t.exclude,o={},i=e.elements,r={};if(a)for(let d=0;d<i.length;d++){const l=i[d];l.name&&l.type==="checkbox"&&!l.disabled&&(r[l.name]=(r[l.name]||0)+1)}for(let d=0;d<i.length;d++){const l=i[d];if(!(!l.name||l.disabled||l.type==="file"||l.type==="submit"||l.type==="button")&&!(n&&l.matches&&l.matches(n)))if(l.type==="checkbox")a&&r[l.name]===1?o[l.name]=l.checked:(o[l.name]||(o[l.name]=[]),l.checked&&o[l.name].push(l.value));else if(l.type==="radio")l.checked&&(o[l.name]=l.value);else if(l.type==="select-multiple"){o[l.name]=[];for(let s=0;s<l.options.length;s++)l.options[s].selected&&o[l.name].push(l.options[s].value)}else if(a&&l.type==="hidden")o[l.name]=l.value;else if(a&&(l.type==="number"||l.type==="range")){const s=Number(l.value);o[l.name]=l.value===""||isNaN(s)?null:s}else o[l.name]=l.value}return o}function pe(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function be(e,t){const a=e.elements,n=[],o={};for(let i=0;i<a.length;i++){const r=a[i];r.name&&r.type==="checkbox"&&(o[r.name]=(o[r.name]||0)+1)}for(let i=0;i<a.length;i++){const r=a[i];if(r.type==="file"||r.type==="submit"||r.type==="button")continue;const d=r.getAttribute("data-ln-fill-as")||r.name;if(!d||!(d in t))continue;const l=t[d];if(r.type==="checkbox"){if(Array.isArray(l))r.checked=l.indexOf(r.value)!==-1;else if(o[r.name]>1){const s=String(l).split(",").map(function(c){return c.trim()});r.checked=s.indexOf(r.value)!==-1}else r.checked=pe(l);n.push(r)}else if(r.type==="radio")r.checked=r.value===String(l),n.push(r);else if(r.type==="select-multiple"){if(Array.isArray(l))for(let s=0;s<r.options.length;s++)r.options[s].selected=l.indexOf(r.options[s].value)!==-1;n.push(r)}else r.value=l,r.tagName==="SELECT"&&l!=null&&r.setAttribute("data-ln-value",l),n.push(r)}return n}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=be,window.lnCore.serializeForm=we,window.lnCore.resolveFormMethod=fe);const R={};function he(e,t){R[e]=t}function me(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=he,window.lnCore.getDataMapper=me);function ge(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){ue(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const B={};function ye(e,t){if(!e||typeof t!="object")return;const a=e.toLowerCase().split("-")[0];B[a]=t}function Ce(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=ye,window.lnCore.getLocaleFallback=Ce,window.lnCore.ensureLocaleObserver=ge);const S={};function ve(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const a=S[e];return a?a.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const a=e.querySelectorAll("[data-ln-field]");for(let r=0;r<a.length;r++){const d=a[r],l=d.getAttribute("data-ln-field");t[l]!=null&&(d.textContent=t[l])}const n=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<n.length;r++){const d=n[r],l=d.getAttribute("data-ln-attr").split(",");for(let s=0;s<l.length;s++){const c=l[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();t[f]!=null&&d.setAttribute(u,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let r=0;r<o.length;r++){const d=o[r],l=d.getAttribute("data-ln-show");l in t&&d.classList.toggle("hidden",!t[l])}const i=e.querySelectorAll("[data-ln-class]");for(let r=0;r<i.length;r++){const d=i[r],l=d.getAttribute("data-ln-class").split(",");for(let s=0;s<l.length;s++){const c=l[s].trim().split(":");if(c.length!==2)continue;const u=c[0].trim(),f=c[1].trim();f in t&&d.classList.toggle(u,!!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 a=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let n=0;n<a.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",a[n],t??null),a[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)W(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let a=0;a<t.length;a++)t[a].textContent=""}})));function U(e,t){if(!e||!t)return e;const a=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;a.nextNode();){const i=a.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,d){return t[d]!==void 0?t[d]:""}))}const n=function(i,r){return t[r]!==void 0?t[r]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let i=0;i<o.length;i++){const r=o[i],d=r.attributes;for(let l=0;l<d.length;l++){const s=d[l];s.value.indexOf("{{")!==-1&&r.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function xe(e,t,a,n,o,i){const r={};for(let l=0;l<e.children.length;l++){const s=e.children[l],c=s.getAttribute("data-ln-render-key");c&&(r[c]=s)}const d=document.createDocumentFragment();for(let l=0;l<t.length;l++){const s=t[l],c=String(n(s));let u=r[c];if(u)o(u,s,l);else{const f=ve(a,i);if(!f||(U(f,s),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",c),o(u,s,l)}d.appendChild(u)}e.textContent="",e.appendChild(d)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=U,window.lnCore.fill=W,window.lnCore.lnFill=Ae,window.lnCore.renderList=xe);function k(e,t,a){const n=e.getAttribute(t);return n===null?a:n}function V(e,t,a){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?a:n}function H(e,t,a=!1){const n=e.getAttribute(t);if(n===null)return!!a;const o=n.trim().toLowerCase();return!(o==="false"||o==="0")}function z(e,t){return(e.getAttribute(t)||"").split(",").map(a=>a.trim()).filter(Boolean)}const _=new Map;function G(e,t){const a=(e?e.join("|"):"")+"::"+t;if(_.has(a))return _.get(a);const n=new Set(e||[]),o=function(i,r){const d=i.getAttribute(r);return d!==null&&n.has(d)?d:t};return _.set(a,o),o}function Q(e,t,a){const n=parseFloat(e.getAttribute(t));return isNaN(n)?a:n}function J(e,t,a){const n=e.getAttribute(t);if(!n)return a;try{return JSON.parse(n)}catch{return a}}function K(e,t,a,n,o){if(!e||t===null)return!0;const i=n||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const d=l=>{o?console.warn(l,o):console.warn(l)};if(r==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(d(`[${i}] Invalid value "${t}" for boolean attribute "${a}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const l=e.values||[];return l.includes(t)?!0:(d(`[${i}] Invalid value "${t}" for attribute "${a}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return d(`[${i}] Invalid integer "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(d(`[${i}] Value ${l} for attribute "${a}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(d(`[${i}] Value ${l} for attribute "${a}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(l){return d(`[${i}] Invalid JSON for attribute "${a}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function Se(e,t,a){for(const n in a){const[o,i,r]=a[n];Object.defineProperty(e,n,{get:function(){return o(t,i,r)},enumerable:!0,configurable:!0})}return e}function ke(e){const t={};for(const a in e){const n=e[a];if(!n||!n.prop)continue;let o=n.read;if(!o&&n.type)switch(n.type){case"enum":o=G(n.values,n.fallback);break;case"integer":o=V;break;case"float":o=Q;break;case"boolean":o=H;break;case"list":o=z;break;case"json":o=J;break;case"string":default:o=k;break}o||(o=k),t[n.prop]=[o,a,n.fallback]}return t}function _e(e){const t={};for(const a in e){const n=e[a];n&&n.effect&&(t[a]=n.effect)}return Object.keys(t).length?t:null}function De(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const a in e.effects)t.add(a);if(e.onAttrChange&&e.declared)for(const a of e.declared)t.add(a);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Se,window.lnCore.attrSpec=ke,window.lnCore.attrStr=k,window.lnCore.attrInt=V,window.lnCore.attrBool=H,window.lnCore.attrList=z,window.lnCore.attrEnum=G,window.lnCore.attrFloat=Q,window.lnCore.attrJson=J);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(a){console.error("["+t.attribute+"] init failed",e,a)}}}function P(e,t,a,n){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r={selector:t,attribute:a,ComponentFn:n};if(e.matches&&e.matches(i)&&h(e,r),e.querySelectorAll){const d=e.querySelectorAll(i);for(let l=0;l<d.length;l++)h(d[l],r)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function X(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Y(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function Z(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ee(e){const t=Z(),a=e.observed||[];for(let n=0;n<a.length;n++){const o=a[n];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const o=t.byDeclaredAttr.get(n);o.some(i=>i.componentTag===e.componentTag)||o.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=De(e);if(n===null)t.reactiveWildcard.push(e);else for(const o of n)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function te(e,t,a,n){for(let o=0;o<e.length;o++){const i=e[o];if(!t[i.attribute])continue;const r=i.effects&&i.effects[a];r?r(t,a,n):i.onAttrChange&&(!i.declared||i.declared.has(a))&&i.onAttrChange(t,a,n)}}function Ee(e){const t=e.attributeName,a=t.indexOf("data-ln-")===0,n=Z(),o=n.byAttr.get(t),i=j()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!a&&!o&&!i)return;const r=e.target;if(e.oldValue!==r.getAttribute(t)){if(i&&x(r)){const d=n.byDeclaredAttr.get(t),l=r.getAttribute(t);for(let s=0;s<d.length;s++)K(d[s].spec,l,t,d[s].componentTag,r)}if(window.lnCore._debugSink&&(a||o)&&window.lnCore._debugSink("attr",t,r,{oldValue:e.oldValue,newValue:r.getAttribute(t)}),a){const d=n.byReactive.get(t);d&&te(d,r,t,e.oldValue),n.reactiveWildcard.length&&te(n.reactiveWildcard,r,t,e.oldValue)}if(o)for(let d=0;d<o.length;d++){const l=o[d];if(l.handler){l.handler(r,t,e.oldValue);continue}l.onAttributeChange&&r[l.attribute]?l.onAttributeChange(r,t):(P(r,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(r))}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++)try{Ee(t[a])}catch(n){console.error("[ln-core] mutation handler failed",t[a].target,n)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function E(e,t){if(!document.contains(e))if(t.attribute){const a=e[t.attribute];if(a&&typeof a.destroy=="function")try{a.destroy()}catch(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function $e(e){const t=D();if(!t.length)return;const a=e.target;if(a){const n=a.nodeType===1?a:a.parentElement;if(n&&(n.isContentEditable||n.closest&&n.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let n=0;n<t.length;n++){const o=t[n];if(o.onSubtreeChange&&o.query){const i=o.query,r=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;r&&o.onSubtreeChange(r,e)}}for(let n=0;n<e.addedNodes.length;n++){const o=e.addedNodes[n];if(o.nodeType===1){const i=!!(o.firstElementChild||o.children&&o.children.length);for(let r=0;r<t.length;r++){const d=t[r];if(d.selector&&d.attribute&&d.ComponentFn){if(!i)o.matches&&o.matches(d.query)&&h(o,d);else if(o.matches&&o.matches(d.query)&&h(o,d),o.querySelectorAll){const l=o.querySelectorAll(d.query);for(let s=0;s<l.length;s++)h(l[s],d)}}d.onInit&&d.onInit(o)}}}for(let n=0;n<e.removedNodes.length;n++){const o=e.removedNodes[n];if(o.nodeType===1){const i=!!(o.firstElementChild||o.children&&o.children.length);for(let r=0;r<t.length;r++){const d=t[r],l=d.query;if(l){if(!i)o.matches&&o.matches(l)&&E(o,d);else if(o.matches&&o.matches(l)&&E(o,d),o.querySelectorAll){const s=o.querySelectorAll(l);for(let c=0;c<s.length;c++)E(s[c],d)}}}}}}function ae(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++){const n=t[a];if(n.type==="childList")try{$e(n)}catch(o){console.error("[ln-core] lifecycle handler failed",n.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ie(e,t){ee({observed:e,handler:t}),ne()}function Oe(e){D().push(e),ae()}function oe(e,t,a,n,o={}){const i=o.extraAttributes||[],r=o.onAttributeChange||null,d=o.onSubtreeChange||null,l=o.onInit||null,s=o.onAttrChange||null,c=o.effects||null,u=o.attributes||null,f=u?_e(u):c,q=u?new Set(Object.keys(u)):null,Xe=o.persist||null;function A(T){const w=T||document.body;if(P(w,e,t,a),u&&j())for(const y in u){const et=u[y],M=Array.from(w.querySelectorAll("["+y+"]"));w.matches&&w.matches("["+y+"]")&&M.push(w);for(let N=0;N<M.length;N++){const F=M[N];x(F)&&K(et,F.getAttribute(y),y,n,F)}}l&&l(w)}const L=[];if(e.indexOf("[")!==-1){const T=/\[([\w-]+)/g;let w;for(;(w=T.exec(e))!==null;)L.push(w[1])}else L.push(e);ee({selector:e,attribute:t,componentTag:n,attributes:u,ComponentFn:a,onInit:l,observed:L.concat(i),onAttributeChange:r,onAttrChange:s,effects:f,declared:q,persist:Xe}),ne();const Ye=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ze=o.subtreeQuery||(Ye?e:"["+e+"]");D().push({selector:e,attribute:t,ComponentFn:a,onInit:l,onSubtreeChange:d,query:Ze}),ae(),window[t]=A,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=oe,window.lnCore.observeLifecycle=Oe);function se(){X()>0?Y(function(){A(document.body)}):A(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",se):se(),A}function le(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,a={},n=le(t);if(!n)return a;const o=n.split("&");for(let i=0;i<o.length;i++){const r=o[i];if(!r)continue;const d=r.indexOf(":"),l=d>-1?r.slice(0,d):r,s=d>-1?r.slice(d+1):"";if(l)try{a[l]=decodeURIComponent(s)}catch{a[l]=s}}return a}function qe(e){if(!e)return null;const t=$();return e in t?t[e]:null}function Le(e,t){if(!e)return;const a=$();t==null?delete a[e]:a[e]=String(t);const o=Object.keys(a).map(function(i){const r=a[i];return r===""?i:i+":"+encodeURIComponent(r)}).join("&");le(location.hash)!==o&&(location.hash=o)}function Te(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Me(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const a=e.getAttribute("data-ln-hash");if(a&&a.trim()!=="")return a.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function Ne(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 a=e.slice(0,t),n=e.slice(t+1),o=n?n.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:a,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=qe,window.lnCore.hashSet=Le,window.lnCore.hashLinkClick=Te,window.lnCore.resolveHashNamespace=Me,window.lnCore.hashSortEncode=Ne,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=je,window.lnCore.hashFilterDecode=Re);function Be(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Be);const I=new Set(["data-ln-accordion","data-ln-ajax","data-ln-api-base-url","data-ln-api-connector","data-ln-api-connector-query-debounce","data-ln-api-endpoint","data-ln-api-headers","data-ln-api-param-limit","data-ln-api-param-offset","data-ln-api-param-search","data-ln-api-param-sort-dir","data-ln-api-param-sort-field","data-ln-api-path","data-ln-api-queue","data-ln-api-queue-online","data-ln-attr","data-ln-autoresize","data-ln-autosave","data-ln-autosave-clear","data-ln-autosave-debounce-input","data-ln-autosave-exclude","data-ln-chart","data-ln-chart-area","data-ln-chart-count","data-ln-chart-empty","data-ln-chart-labels","data-ln-chart-line","data-ln-chart-max","data-ln-chart-min","data-ln-chart-padding","data-ln-chart-plot","data-ln-chart-sort","data-ln-chart-source","data-ln-chart-type","data-ln-chart-x","data-ln-chart-y","data-ln-chart-zero","data-ln-circular-progress","data-ln-circular-progress-label","data-ln-circular-progress-max","data-ln-class","data-ln-col","data-ln-confirm","data-ln-confirm-active","data-ln-confirm-announcer","data-ln-confirm-idle","data-ln-confirm-state","data-ln-confirm-timeout","data-ln-connector","data-ln-couchdb-auth","data-ln-couchdb-connector","data-ln-couchdb-db","data-ln-couchdb-headers","data-ln-couchdb-url","data-ln-data-coordinator","data-ln-data-coordinator-connector","data-ln-data-coordinator-filters","data-ln-data-coordinator-mapper","data-ln-data-coordinator-no-autosync","data-ln-data-coordinator-scope","data-ln-data-coordinator-search","data-ln-data-coordinator-sort-direction","data-ln-data-coordinator-sort-field","data-ln-data-coordinator-stale","data-ln-data-store","data-ln-data-store-frozen","data-ln-data-store-indexes","data-ln-data-store-no-autosync","data-ln-data-store-no-local-query","data-ln-data-store-search-fields","data-ln-data-store-stale","data-ln-data-store-window","data-ln-data-store-window-page","data-ln-date","data-ln-date-dict","data-ln-date-dict-key","data-ln-date-field","data-ln-date-format","data-ln-date-label","data-ln-date-locale","data-ln-debug","data-ln-dropdown","data-ln-dropdown-menu","data-ln-dropdown-placement","data-ln-dropdown-position","data-ln-editor","data-ln-editor-action","data-ln-editor-source","data-ln-empty","data-ln-empty-state","data-ln-empty-when","data-ln-error","data-ln-external-link","data-ln-field","data-ln-fill-as","data-ln-fill-form","data-ln-fill-id","data-ln-fillable","data-ln-filter","data-ln-filter-col","data-ln-filter-hide","data-ln-filter-key","data-ln-filter-options","data-ln-filter-reset","data-ln-filter-search","data-ln-filter-target","data-ln-filter-value","data-ln-filter-values","data-ln-form","data-ln-form-action-edit","data-ln-form-action-method","data-ln-hash","data-ln-include","data-ln-initial-value","data-ln-item","data-ln-item-action","data-ln-item-id","data-ln-item-select","data-ln-key","data-ln-key-allow-input","data-ln-key-for","data-ln-key-modifier","data-ln-key-target","data-ln-link","data-ln-list","data-ln-list-body","data-ln-list-count","data-ln-list-empty","data-ln-list-field","data-ln-list-filtered","data-ln-list-select-all","data-ln-list-selectable","data-ln-list-selected","data-ln-list-source","data-ln-list-total","data-ln-list-window","data-ln-list-window-page","data-ln-list-window-threshold","data-ln-modal","data-ln-modal-close","data-ln-modal-for","data-ln-modal-mode","data-ln-modal-when","data-ln-nav","data-ln-nav-exact","data-ln-number","data-ln-number-decimals","data-ln-number-max","data-ln-number-min","data-ln-obfuscator","data-ln-obfuscator-codec","data-ln-obfuscator-key","data-ln-options","data-ln-options-label","data-ln-options-value","data-ln-outlet","data-ln-panel","data-ln-persist","data-ln-persist-scope","data-ln-picklist","data-ln-picklist-list","data-ln-picklist-max","data-ln-popover","data-ln-popover-for","data-ln-popover-placement","data-ln-popover-position","data-ln-progress","data-ln-progress-max","data-ln-render-key","data-ln-route","data-ln-route-keep","data-ln-route-target","data-ln-route-title","data-ln-router-base","data-ln-router-hydrate","data-ln-scroll","data-ln-scroll-behavior","data-ln-scroll-block","data-ln-scroll-delay","data-ln-scroll-focus","data-ln-scroll-set","data-ln-scroll-update-hash","data-ln-search","data-ln-search-clear","data-ln-search-clear-for","data-ln-search-exclude","data-ln-search-fields","data-ln-search-for","data-ln-search-hide","data-ln-search-items","data-ln-show","data-ln-slug-from","data-ln-sort","data-ln-sort-dir","data-ln-sort-exclude","data-ln-sort-field","data-ln-sort-icon","data-ln-sort-items","data-ln-sort-state","data-ln-sortable","data-ln-sortable-handle","data-ln-stat","data-ln-stat-card","data-ln-stat-filter","data-ln-stat-label","data-ln-stat-trend","data-ln-stat-value","data-ln-step","data-ln-step-label","data-ln-stepper","data-ln-store","data-ln-tab","data-ln-table","data-ln-table-body","data-ln-table-cell-attr","data-ln-table-clear","data-ln-table-clear-all","data-ln-table-col","data-ln-table-col-filter","data-ln-table-col-select","data-ln-table-col-sort","data-ln-table-coordinator","data-ln-table-count","data-ln-table-dict","data-ln-table-empty","data-ln-table-empty-when","data-ln-table-filter-col","data-ln-table-filtered","data-ln-table-row","data-ln-table-row-action","data-ln-table-row-id","data-ln-table-row-select","data-ln-table-select-all-label","data-ln-table-selectable","data-ln-table-selected","data-ln-table-sort","data-ln-table-source","data-ln-table-total","data-ln-table-window","data-ln-table-window-page","data-ln-table-window-threshold","data-ln-tabs","data-ln-tabs-active","data-ln-tabs-default","data-ln-tabs-focus","data-ln-tabs-key","data-ln-template","data-ln-time","data-ln-time-locale","data-ln-toast","data-ln-toast-close","data-ln-toast-item","data-ln-toast-max","data-ln-toast-timeout","data-ln-toast-when","data-ln-toggle","data-ln-toggle-action","data-ln-toggle-for","data-ln-tooltip","data-ln-tooltip-enhance","data-ln-tooltip-enhanced","data-ln-tooltip-placement","data-ln-tooltip-position","data-ln-translatable","data-ln-translatable-lang","data-ln-translations","data-ln-translations-active","data-ln-translations-add","data-ln-translations-default","data-ln-translations-lang","data-ln-translations-locales","data-ln-translations-placeholder","data-ln-translations-prefix","data-ln-translations-remove-label","data-ln-ui-coordinator","data-ln-upload","data-ln-upload-accept","data-ln-upload-action","data-ln-upload-delete","data-ln-upload-dict","data-ln-upload-ext","data-ln-upload-file-field","data-ln-upload-id","data-ln-upload-ids-field","data-ln-upload-item","data-ln-upload-list","data-ln-upload-local-id","data-ln-upload-max-files","data-ln-upload-max-size","data-ln-upload-progress","data-ln-upload-size","data-ln-upload-state","data-ln-upload-zone","data-ln-validate","data-ln-validate-error","data-ln-validate-errors","data-ln-value","data-ln-websocket-connector","data-ln-websocket-connector-url"]);function We(e,t){if(e===t)return 0;if(!e.length)return t.length;if(!t.length)return e.length;const a=[];for(let n=0;n<=t.length;n++)a[n]=[n];for(let n=0;n<=e.length;n++)a[0][n]=n;for(let n=1;n<=t.length;n++)for(let o=1;o<=e.length;o++)t.charAt(n-1)===e.charAt(o-1)?a[n][o]=a[n-1][o-1]:a[n][o]=Math.min(a[n-1][o-1]+1,a[n][o-1]+1,a[n-1][o]+1);return a[t.length][e.length]}function Ue(e,t=I){if(t.has(e))return null;let a=null,n=1/0;for(const i of t){const r=We(e,i);r<n&&(n=r,a=i)}const o=Math.max(3,Math.floor(e.length*.4));return n<=o?a:null}function re(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/([!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~])/g,"\\$1")}function Ve(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],o=[a,...a.querySelectorAll("*")];for(let i=0;i<o.length;i++){const r=o[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const l=r.attributes[d];if(l.name.startsWith("data-ln-")&&l.name.endsWith("-for")){const s=(l.value||"").trim();if(!s){n.push({type:"id-empty",element:r,attribute:l.name,targetId:"",message:`[ln-debug] Empty ID reference in <${r.tagName.toLowerCase()} ${l.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+re(s))||n.push({type:"id-unresolved",element:r,attribute:l.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${r.tagName.toLowerCase()} ${l.name}="${s}"> targets "#${s}", but no element with id="${s}" exists in the document.`})}}}return n}function He(e=document){const t=e.ownerDocument||e,a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],o=[a,...a.querySelectorAll("*")];for(let i=0;i<o.length;i++){const r=o[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const l=r.attributes[d];if(l.name.startsWith("data-ln-")&&(l.name.endsWith("-source")||l.name.endsWith("-store"))&&l.name!=="data-ln-data-store"){const c=(l.value||"").trim();if(!c){n.push({type:"store-empty",element:r,attribute:l.name,storeName:"",message:`[ln-debug] Empty store reference in <${r.tagName.toLowerCase()} ${l.name}="">.`});continue}const u=re(c),f=t.querySelector(`[data-ln-data-store="${u}"], [data-ln-store="${u}"]`),q=typeof window<"u"&&window.lnDataStore&&typeof window.lnDataStore.getStore=="function"&&window.lnDataStore.getStore(c);!f&&!q&&n.push({type:"store-unresolved",element:r,attribute:l.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${r.tagName.toLowerCase()} ${l.name}="${c}"> targets store "${c}", but no [data-ln-data-store="${c}"] exists in the document.`})}}}return n}function ze(e=document){e.ownerDocument;const t=e.nodeType===9?e.body||e.documentElement:e;if(!t)return[];const a=[],n=Array.from(t.querySelectorAll("[data-ln-data-store]"));t.hasAttribute&&t.hasAttribute("data-ln-data-store")&&n.unshift(t);const o=new Map;for(let i=0;i<n.length;i++){const r=n[i],d=(r.getAttribute("data-ln-data-store")||"").trim();d&&(o.has(d)||o.set(d,[]),o.get(d).push(r))}for(const[i,r]of o.entries())r.length>1&&a.push({type:"store-duplicate",storeName:i,elements:r,message:`[ln-debug] Duplicate store name: Multiple elements declare data-ln-data-store="${i}". Store names must be unique across the document.`});return a}function Ge(e=document,t=I){const a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],o=[a,...a.querySelectorAll("*")];for(let i=0;i<o.length;i++){const r=o[i];if(r.attributes)for(let d=0;d<r.attributes.length;d++){const l=r.attributes[d];if(l.name.startsWith("data-ln-")&&!t.has(l.name)){const s=Ue(l.name,t),c=s?` Did you mean "${s}"?`:"";n.push({type:"attribute-unknown",element:r,attribute:l.name,suggestion:s,message:`[ln-debug] Unknown attribute "${l.name}" on <${r.tagName.toLowerCase()}>.${c}`})}}}return n}function v(e=typeof document<"u"?document:null,t={}){if(!e)return{idIssues:[],storeIssues:[],uniquenessIssues:[],spellingIssues:[],total:0};const a=t.validAttributes||I,n=Ve(e),o=He(e),i=ze(e),r=Ge(e,a),d=[...n,...o,...i,...r];if(!t.silent)for(let l=0;l<d.length;l++)console.warn(d[l].message);return{idIssues:n,storeIssues:o,uniquenessIssues:i,spellingIssues:r,total:d.length}}let m=null;function g(e=typeof document<"u"?document:null,t=50,a=null){if(!e)return;m&&(clearTimeout(m),m=null);function n(){m=setTimeout(()=>{m=null;const o=v(e);a&&a(o)},t)}X()>0?Y(n):n()}function Qe(e,t,a,n){e==="event"?(console.groupCollapsed("[ln-debug] event",t),console.log("target",a),console.log("detail",n),console.groupEnd()):e==="attr"&&(console.groupCollapsed("[ln-debug] attr",t),console.log("target",a),console.log("old → new",n.oldValue,"→",n.newValue),console.groupEnd())}let p=[];function Je(){p=Array.from(document.body.querySelectorAll("[data-ln-debug]")),document.body.hasAttribute("data-ln-debug")&&p.push(document.body)}function ie(e){if(e===window||e===document)return p.indexOf(document.body)!==-1;for(let t=0;t<p.length;t++)if(p[t].contains(e))return!0;return!1}function Ke(e,t,a,n){ie(a)&&Qe(e,t,a,n)}function O(){Je(),ce(p.length>0?Ke:null,p.length>0?ie:null)}function de(){O()}function Pe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._debugGateBound&&(window.lnCore._debugGateBound=!0,b(function(){O(),Ie(["data-ln-debug"],O)},"ln-debug")))}return(function(){const e="data-ln-debug",t="lnDebug";if(typeof window<"u"&&window[t]!==void 0)return;const a={"data-ln-debug":{type:"marker",description:"Enables developer diagnostics overlay, live validation badges, and inspection logging"}};Pe();function n(i){return this.dom=i,g(i.ownerDocument||document),de(),this}n.prototype.verify=function(i,r){return v(i||(this.dom?this.dom.ownerDocument||this.dom:document),r)},n.prototype.destroy=function(){delete this.dom[t],de()};const o=oe(e,t,n,"ln-debug",{attributes:a,onInit:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)},onSubtreeChange:function(i){typeof document<"u"&&g(i&&i.ownerDocument?i.ownerDocument:document)}});o.verify=function(i,r){return v(i||document,r)},o.schedule=function(i,r,d){return g(i||document,r,d)}})(),C.scheduleVerification=g,C.verifyDOM=v,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
|