@livenetworks/ashlar 2.1.0 → 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-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/lifecycle.js +9 -0
- 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-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-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-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-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-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-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 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 n=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){n=t[l];break}if(!I(n))return}e.apply(console,t)}}function U(e,t,r){const n=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,n),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:n}))}function 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),n=t&&t.exclude,l={},a=e.elements,i={};if(r)for(let c=0;c<a.length;c++){const o=a[c];o.name&&o.type==="checkbox"&&!o.disabled&&(i[o.name]=(i[o.name]||0)+1)}for(let c=0;c<a.length;c++){const o=a[c];if(!(!o.name||o.disabled||o.type==="file"||o.type==="submit"||o.type==="button")&&!(n&&o.matches&&o.matches(n)))if(o.type==="checkbox")r&&i[o.name]===1?l[o.name]=o.checked:(l[o.name]||(l[o.name]=[]),o.checked&&l[o.name].push(o.value));else if(o.type==="radio")o.checked&&(l[o.name]=o.value);else if(o.type==="select-multiple"){l[o.name]=[];for(let s=0;s<o.options.length;s++)o.options[s].selected&&l[o.name].push(o.options[s].value)}else if(r&&o.type==="hidden")l[o.name]=o.value;else if(r&&(o.type==="number"||o.type==="range")){const s=Number(o.value);l[o.name]=o.value===""||isNaN(s)?null:s}else l[o.name]=o.value}return l}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,n=[],l={};for(let a=0;a<r.length;a++){const i=r[a];i.name&&i.type==="checkbox"&&(l[i.name]=(l[i.name]||0)+1)}for(let a=0;a<r.length;a++){const i=r[a];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const o=t[c];if(i.type==="checkbox"){if(Array.isArray(o))i.checked=o.indexOf(i.value)!==-1;else if(l[i.name]>1){const s=String(o).split(",").map(function(u){return u.trim()});i.checked=s.indexOf(i.value)!==-1}else i.checked=he(o);n.push(i)}else if(i.type==="radio")i.checked=i.value===String(o),n.push(i);else if(i.type==="select-multiple"){if(Array.isArray(o))for(let s=0;s<i.options.length;s++)i.options[s].selected=o.indexOf(i.options[s].value)!==-1;n.push(i)}else i.value=o,i.tagName==="SELECT"&&o!=null&&i.setAttribute("data-ln-value",o),n.push(i)}return n}function pe(e,t,{get:r,set:n}){Object.defineProperty(e,"value",{get:function(){return r?r.call(this):t.get.call(this)},set:function(l){n?n.call(this,l,a=>t.set.call(this,a)):t.set.call(this,l)},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 i=0;i<r.length;i++){const c=r[i],o=c.getAttribute("data-ln-field");t[o]!=null&&(c.textContent=t[o])}const n=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<n.length;i++){const c=n[i],o=c.getAttribute("data-ln-attr").split(",");for(let s=0;s<o.length;s++){const u=o[s].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 l=e.querySelectorAll("[data-ln-show]");for(let i=0;i<l.length;i++){const c=l[i],o=c.getAttribute("data-ln-show");o in t&&c.classList.toggle("hidden",!t[o])}const a=e.querySelectorAll("[data-ln-class]");for(let i=0;i<a.length;i++){const c=a[i],o=c.getAttribute("data-ln-class").split(",");for(let s=0;s<o.length;s++){const u=o[s].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 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 n=0;n<r.length;n++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[n],t??null),r[n].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)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 a=r.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const n=function(a,i){return t[i]!==void 0?t[i]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let a=0;a<l.length;a++){const i=l[a],c=i.attributes;for(let o=0;o<c.length;o++){const s=c[o];s.value.indexOf("{{")!==-1&&i.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function Ce(e,t,r,n,l,a){const i={};for(let o=0;o<e.children.length;o++){const s=e.children[o],u=s.getAttribute("data-ln-render-key");u&&(i[u]=s)}const c=document.createDocumentFragment();for(let o=0;o<t.length;o++){const s=t[o],u=String(n(s));let d=i[u];if(d)l(d,s,o);else{const h=be(r,a);if(!h||(G(h,s),d=h.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),l(d,s,o)}c.appendChild(d)}e.textContent="",e.appendChild(c)}function _e(e,t){const r={},n=e.querySelectorAll("["+t+"]");for(let l=0;l<n.length;l++)r[n[l].getAttribute(t)]=n[l].textContent,n[l].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 n=e.getAttribute(t);return n===null?r:n}function X(e,t,r){const n=parseInt(e.getAttribute(t),10);return isNaN(n)?r:n}function Z(e,t,r=!1){const n=e.getAttribute(t);if(n===null)return!!r;const l=n.trim().toLowerCase();return!(l==="false"||l==="0")}function 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 n=new Set(e||[]),l=function(a,i){const c=a.getAttribute(i);return c!==null&&n.has(c)?c:t};return B.set(r,l),l}function ne(e,t,r){const n=parseFloat(e.getAttribute(t));return isNaN(n)?r:n}function re(e,t,r){const n=e.getAttribute(t);if(!n)return r;try{return JSON.parse(n)}catch{return r}}function oe(e,t,r,n,l){if(!e||t===null)return!0;const a=n||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=o=>{l?console.warn(o,l):console.warn(o)};if(i==="boolean"){const o=t.trim().toLowerCase();return o!==""&&o!=="true"&&o!=="false"&&o!=="1"&&o!=="0"?(c(`[${a}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const o=e.values||[];return o.includes(t)?!0:(c(`[${a}] Invalid value "${t}" for attribute "${r}". Allowed: ${o.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${a}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const o=parseInt(t,10);return e.min!==void 0&&o<e.min?(c(`[${a}] Value ${o} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&o>e.max?(c(`[${a}] Value ${o} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${a}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(o){return c(`[${a}] Invalid JSON for attribute "${r}": ${o.message}. Fallback: ${e.fallback}.`),!1}return!0}function ve(e,t,r){for(const n in r){const[l,a,i]=r[n];Object.defineProperty(e,n,{get:function(){return l(t,a,i)},enumerable:!0,configurable:!0})}return e}function Ae(e){const t={};for(const r in e){const n=e[r];if(!n||!n.prop)continue;let l=n.read;if(!l&&n.type)switch(n.type){case"enum":l=te(n.values,n.fallback);break;case"integer":l=X;break;case"float":l=ne;break;case"boolean":l=Z;break;case"list":l=ee;break;case"json":l=re;break;case"string":default:l=q;break}l||(l=q),t[n.prop]=[l,r,n.fallback]}return t}function xe(e){const t={};for(const r in e){const n=e[r];n&&n.effect&&(t[r]=n.effect)}return Object.keys(t).length?t:null}function 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,n){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:r,ComponentFn:n};if(e.matches&&e.matches(a)&&D(e,i),e.querySelectorAll){const c=e.querySelectorAll(a);for(let o=0;o<c.length;o++)D(c[o],i)}}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 n=0;n<r.length;n++){const l=r[n];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const l=t.byDeclaredAttr.get(n);l.some(a=>a.componentTag===e.componentTag)||l.push({spec:e.attributes[n],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const n=Se(e);if(n===null)t.reactiveWildcard.push(e);else for(const l of n)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function se(e,t,r,n){for(let l=0;l<e.length;l++){const a=e[l];if(!t[a.attribute])continue;const i=a.effects&&a.effects[r];i?i(t,r,n):a.onAttrChange&&(!a.declared||a.declared.has(r))&&a.onAttrChange(t,r,n)}}function Oe(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,n=le(),l=n.byAttr.get(t),a=W()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!r&&!l&&!a)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(a&&I(i)){const c=n.byDeclaredAttr.get(t),o=i.getAttribute(t);for(let s=0;s<c.length;s++)oe(c[s].spec,o,t,c[s].componentTag,i)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),r){const c=n.byReactive.get(t);c&&se(c,i,t,e.oldValue),n.reactiveWildcard.length&&se(n.reactiveWildcard,i,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const o=l[c];if(o.handler){o.handler(i,t,e.oldValue);continue}o.onAttributeChange&&i[o.attribute]?o.onAttributeChange(i,t):(ie(i,o.selector,o.attribute,o.ComponentFn),o.onInit&&o.onInit(i))}}}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(n){console.error("[ln-core] mutation handler failed",t[r].target,n)}}).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(n){console.error("["+t.attribute+"] destroy failed",e,n)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Le(e){const t=$();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const n=t[r];if(n.onSubtreeChange&&n.query){const l=n.query,a=e.target.nodeType===1?e.target.matches&&e.target.matches(l)?e.target:e.target.closest?e.target.closest(l):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(l):null;a&&n.onSubtreeChange(a,e)}}for(let r=0;r<e.addedNodes.length;r++){const n=e.addedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let a=0;a<t.length;a++){const i=t[a];if(i.selector&&i.attribute&&i.ComponentFn){if(!l)n.matches&&n.matches(i.query)&&D(n,i);else if(n.matches&&n.matches(i.query)&&D(n,i),n.querySelectorAll){const c=n.querySelectorAll(i.query);for(let o=0;o<c.length;o++)D(c[o],i)}}i.onInit&&i.onInit(n)}}}for(let r=0;r<e.removedNodes.length;r++){const n=e.removedNodes[r];if(n.nodeType===1){const l=!!(n.firstElementChild||n.children&&n.children.length);for(let a=0;a<t.length;a++){const i=t[a],c=i.query;if(c){if(!l)n.matches&&n.matches(c)&&V(n,i);else if(n.matches&&n.matches(c)&&V(n,i),n.querySelectorAll){const o=n.querySelectorAll(c);for(let s=0;s<o.length;s++)V(o[s],i)}}}}}}}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 n=t[r];if(n.type==="childList")try{Le(n)}catch(l){console.error("[ln-core] lifecycle handler failed",n.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Me(e){$().push(e),ae()}function ce(e,t,r,n,l={}){const a=l.extraAttributes||[],i=l.onAttributeChange||null,c=l.onSubtreeChange||null,o=l.onInit||null,s=l.onAttrChange||null,u=l.effects||null,d=l.attributes||null,h=d?xe(d):u,b=d?new Set(Object.keys(d)):null,w=l.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,n,k)}}o&&o(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:n,attributes:d,ComponentFn:r,onInit:o,observed:C.concat(a),onAttributeChange:i,onAttrChange:s,effects:h,declared:b,persist:w}),Te();const A=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,T=l.subtreeQuery||(A?e:"["+e+"]");$().push({selector:e,attribute:t,ComponentFn:r,onInit:o,onSubtreeChange:c,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={},n=ue(t);if(!n)return r;const l=n.split("&");for(let a=0;a<l.length;a++){const i=l[a];if(!i)continue;const c=i.indexOf(":"),o=c>-1?i.slice(0,c):i,s=c>-1?i.slice(c+1):"";if(o)try{r[o]=decodeURIComponent(s)}catch{r[o]=s}}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 l=Object.keys(r).map(function(a){const i=r[a];return i===""?a:a+":"+encodeURIComponent(i)}).join("&");ue(location.hash)!==l&&(location.hash=l)}function Ie(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Re(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const n=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return n?t?n+"-"+t:n:t||null}function 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),n=e.slice(t+1),l=n?n.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:r,values:l}}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,n=new Date(r);return isNaN(n.getTime())?null:n}if(typeof e=="string"){const r=e.trim();if(!r)return null;const n=/^(\d{4})-(\d{2})-(\d{2})$/.exec(r);if(n){const a=+n[1],i=+n[2],c=+n[3],o=new Date(a,i-1,c);return o.getFullYear()!==a||o.getMonth()!==i-1||o.getDate()!==c?null:o}const l=new Date(r);return isNaN(l.getTime())?null:l}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"),n=String(e.getDate()).padStart(2,"0");return t+"-"+r+"-"+n}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,n;if(t.indexOf(".")!==-1)r=".",n=t.split(".");else if(t.indexOf("/")!==-1)r="/",n=t.split("/");else if(t.indexOf("-")!==-1)r="-",n=t.split("-");else return null;if(n.length!==3)return null;const l=[];for(let s=0;s<3;s++){const u=parseInt(n[s],10);if(isNaN(u))return null;l.push(u)}let a,i,c;r==="."?(a=l[0],i=l[1],c=l[2]):r==="/"?(i=l[0],a=l[1],c=l[2]):n[0].length===4?(c=l[0],i=l[1],a=l[2]):(a=l[0],i=l[1],c=l[2]),c<100&&(c+=c<50?2e3:1900);const o=new Date(c,i-1,a);return o.getFullYear()!==c||o.getMonth()!==i-1||o.getDate()!==a?null:o}function H(e,t,r,n){if(!e||!(e instanceof Date)||isNaN(e.getTime())||!t||typeof t!="string")return"";const l=e.getDate(),a=e.getMonth(),i=e.getFullYear(),c=e.getHours(),o=e.getMinutes();let s,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=!!(n&&g!==d)}catch{h=!!n}if(h&&n&&n.monthsLong)s=n.monthsLong[a];else try{s=new Intl.DateTimeFormat(r,{month:"long"}).format(e)}catch{s=String(a+1)}if(h&&n&&n.monthsShort)u=n.monthsShort[a];else try{u=new Intl.DateTimeFormat(r,{month:"short"}).format(e)}catch{u=String(a+1)}const b={yyyy:String(i),yy:String(i).slice(-2),MMMM:s,MMM:u,MM:String(a+1).padStart(2,"0"),M:String(a+1),dd:String(l).padStart(2,"0"),d:String(l),HH:String(c).padStart(2,"0"),mm:String(o).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,n){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"";const l=He(t);if(l)try{const a=new Intl.DateTimeFormat(r,l),i=(r||"").toLowerCase().split("-")[0],c=a.resolvedOptions().locale.toLowerCase().split("-")[0];return n&&c!==i?H(e,"dd.MM.yyyy",r,n):a.format(e)}catch{return H(e,"dd.MM.yyyy",r,n)}return H(e,t||"dd.MM.yyyy",r,n)}(function(){const e="data-ln-date",t="lnDate";if(window[t]!==void 0)return;function r(s){const u=s[t];if(u){if(u.isTextElement)u._initTextElement();else if(u.value){const d=_(u.value);d&&u._displayFormatted(d)}}}const n={"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"}},l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");function a(s,u,d){U(s.dom,"ln-date:change",{value:u,formatted:s.dom.value,date:d}),s.dom.dispatchEvent(new Event("change",{bubbles:!0}))}function i(s,u,d,h){s._setHiddenRaw(u),l.set.call(s._picker,u),s._lastISO=u,h!==void 0?(s._isFormatting=!0,s.dom.value=h,s._isFormatting=!1):d&&s._displayFormatted(d),a(s,u,d)}function c(s){s._setHiddenRaw(""),l.set.call(s._picker,""),s._isFormatting=!0,s.dom.value="",s._isFormatting=!1,s._lastISO="",a(s,"",null)}function o(s){if(s[t])return s[t];s[t]=this,this.dom=s;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),s.tagName!=="INPUT")return this.isTextElement=!0,this._initTextElement(),this;this.isTextElement=!1;const d=s.value,h=s.name,b=s.closest(".form-element, form")||s.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",""),s.parentNode.insertBefore(w,s),w.appendChild(s),this._wrapper=w;const g=document.createElement("input");g.type="hidden",g.name=h,s.removeAttribute("name"),s.hasAttribute("data-ln-fill-as")&&g.setAttribute("data-ln-fill-as",s.getAttribute("data-ln-fill-as")),s.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",s.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,s.type="text";const A=document.createElement("button");A.type="button",A.setAttribute("aria-label",s.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 l.get.call(g)},set:function(f){if(l.set.call(g,f),f&&f!==""){const m=_(f);m&&i(u,f,m)}else f===""&&c(u)}}),pe(s,l,{get:function(){return l.get.call(s)},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=s.getAttribute(e)||"",x=N(s),L=E(x),k=F(p,v,x,L);m(k),i(u,y,p,k)}else m(String(f)),c(u)}}),this._onPickerChange=function(){const f=C.value;if(f){const m=_(f);m&&i(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=N(u.dom),x=E(v);if(f===F(p,y,v,x))return}}const m=O(f);if(m){const p=S(m);i(u,p,m)}else if(u._lastISO){const p=_(u._lastISO);p&&u._displayFormatted(p)}else u.dom.value=""},s.addEventListener("blur",this._onBlur),this._onBtnClick=function(){u._openPicker()},A.addEventListener("click",this._onBtnClick);const T=s.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);i(u,p,m);return}}c(u)},0)},T.addEventListener("reset",this._onFormReset)),d&&d!==""){const f=_(d);f&&i(u,d,f)}return this}o.prototype._initTextElement=function(){const s=this.dom,u=s.getAttribute("data-ln-value"),d=s.getAttribute("data-ln-date"),h=s.getAttribute("datetime");let b=null;s.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=s.textContent.trim();const w=_(b)||O(b);if(w&&!isNaN(w.getTime())){const g=S(w);this._rawValue=g,s.tagName!=="TIME"&&!s.hasAttribute("data-ln-value")&&s.setAttribute("data-ln-value",g),this._formatTextContent()}else this._rawValue=null},o.prototype._formatTextContent=function(){if(this._rawValue){const s=_(this._rawValue);if(s){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(s,d||"medium",h,b)}}},o.prototype._openPicker=function(){if(typeof this._picker.showPicker=="function")try{this._picker.showPicker()}catch{this._picker.click()}else this._picker.click()},o.prototype._setHiddenRaw=function(s){l.set.call(this._hidden,s)},o.prototype._displayFormatted=function(s){const u=this.dom.getAttribute(e)||"",d=N(this.dom),h=E(d);this._isFormatting=!0,this.dom.value=F(s,u,d,h),this._isFormatting=!1},Object.defineProperty(o.prototype,"value",{get:function(){return this.isTextElement?this._rawValue||"":l.get.call(this._hidden)},set:function(s){if(this.isTextElement){if(!s||s===""){this._rawValue=null,this.dom.removeAttribute("data-ln-value"),this.dom.tagName==="TIME"&&this.dom.removeAttribute("datetime"),this.dom.textContent="";return}const d=_(s)||O(s);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(!s||s===""){c(this);return}const u=_(s);u&&i(this,s,u)}}),Object.defineProperty(o.prototype,"date",{get:function(){const s=this.value;return s?_(s):null},set:function(s){if(!s||!(s instanceof Date)||isNaN(s.getTime())){this.value="";return}this.value=S(s)}}),Object.defineProperty(o.prototype,"formatted",{get:function(){return this.isTextElement?this.dom.textContent:this.dom.value}}),o.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 s=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",s&&(this.dom.value=s),delete this.dom[t]},ce(e,t,o,"ln-date",{attributes:n,extraAttributes:["datetime","lang"],onAttributeChange:r})})()})();
|
|
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(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 r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){n=t[r];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,r={},i=e.elements,o={};if(a)for(let d=0;d<i.length;d++){const l=i[d];l.name&&l.type==="checkbox"&&!l.disabled&&(o[l.name]=(o[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&&o[l.name]===1?r[l.name]=l.checked:(r[l.name]||(r[l.name]=[]),l.checked&&r[l.name].push(l.value));else if(l.type==="radio")l.checked&&(r[l.name]=l.value);else if(l.type==="select-multiple"){r[l.name]=[];for(let s=0;s<l.options.length;s++)l.options[s].selected&&r[l.name].push(l.options[s].value)}else if(a&&l.type==="hidden")r[l.name]=l.value;else if(a&&(l.type==="number"||l.type==="range")){const s=Number(l.value);r[l.name]=l.value===""||isNaN(s)?null:s}else r[l.name]=l.value}return r}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=[],r={};for(let i=0;i<a.length;i++){const o=a[i];o.name&&o.type==="checkbox"&&(r[o.name]=(r[o.name]||0)+1)}for(let i=0;i<a.length;i++){const o=a[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 l=t[d];if(o.type==="checkbox"){if(Array.isArray(l))o.checked=l.indexOf(o.value)!==-1;else if(r[o.name]>1){const s=String(l).split(",").map(function(c){return c.trim()});o.checked=s.indexOf(o.value)!==-1}else o.checked=pe(l);n.push(o)}else if(o.type==="radio")o.checked=o.value===String(l),n.push(o);else if(o.type==="select-multiple"){if(Array.isArray(l))for(let s=0;s<o.options.length;s++)o.options[s].selected=l.indexOf(o.options[s].value)!==-1;n.push(o)}else o.value=l,o.tagName==="SELECT"&&l!=null&&o.setAttribute("data-ln-value",l),n.push(o)}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 o=0;o<a.length;o++){const d=a[o],l=d.getAttribute("data-ln-field");t[l]!=null&&(d.textContent=t[l])}const n=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<n.length;o++){const d=n[o],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 r=e.querySelectorAll("[data-ln-show]");for(let o=0;o<r.length;o++){const d=r[o],l=d.getAttribute("data-ln-show");l in t&&d.classList.toggle("hidden",!t[l])}const i=e.querySelectorAll("[data-ln-class]");for(let o=0;o<i.length;o++){const d=i[o],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(o,d){return t[d]!==void 0?t[d]:""}))}const n=function(i,o){return t[o]!==void 0?t[o]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let i=0;i<r.length;i++){const o=r[i],d=o.attributes;for(let l=0;l<d.length;l++){const s=d[l];s.value.indexOf("{{")!==-1&&o.setAttribute(s.name,s.value.replace(/\{\{\s*(\w+)\s*\}\}/g,n))}}return e}function xe(e,t,a,n,r,i){const o={};for(let l=0;l<e.children.length;l++){const s=e.children[l],c=s.getAttribute("data-ln-render-key");c&&(o[c]=s)}const d=document.createDocumentFragment();for(let l=0;l<t.length;l++){const s=t[l],c=String(n(s));let u=o[c];if(u)r(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),r(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 r=n.trim().toLowerCase();return!(r==="false"||r==="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||[]),r=function(i,o){const d=i.getAttribute(o);return d!==null&&n.has(d)?d:t};return _.set(a,r),r}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,r){if(!e||t===null)return!0;const i=n||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const d=l=>{r?console.warn(l,r):console.warn(l)};if(o==="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(o==="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(o==="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(o==="float")return isNaN(Number(t))?(d(`[${i}] Invalid float "${t}" for attribute "${a}". Fallback: ${e.fallback}.`),!1):!0;if(o==="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[r,i,o]=a[n];Object.defineProperty(e,n,{get:function(){return r(t,i,o)},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 r=n.read;if(!r&&n.type)switch(n.type){case"enum":r=G(n.values,n.fallback);break;case"integer":r=V;break;case"float":r=Q;break;case"boolean":r=H;break;case"list":r=z;break;case"json":r=J;break;case"string":default:r=k;break}r||(r=k),t[n.prop]=[r,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+"]",o={selector:t,attribute:a,ComponentFn:n};if(e.matches&&e.matches(i)&&h(e,o),e.querySelectorAll){const d=e.querySelectorAll(i);for(let l=0;l<d.length;l++)h(d[l],o)}}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 r=a[n];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const n in e.attributes){t.byDeclaredAttr.has(n)||t.byDeclaredAttr.set(n,[]);const r=t.byDeclaredAttr.get(n);r.some(i=>i.componentTag===e.componentTag)||r.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 r of n)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function te(e,t,a,n){for(let r=0;r<e.length;r++){const i=e[r];if(!t[i.attribute])continue;const o=i.effects&&i.effects[a];o?o(t,a,n):i.onAttrChange&&(!i.declared||i.declared.has(a))&&i.onAttrChange(t,a,n)}}function $e(e){const t=e.attributeName,a=t.indexOf("data-ln-")===0,n=Z(),r=n.byAttr.get(t),i=j()&&n.byDeclaredAttr&&n.byDeclaredAttr.has(t);if(!a&&!r&&!i)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(i&&x(o)){const d=n.byDeclaredAttr.get(t),l=o.getAttribute(t);for(let s=0;s<d.length;s++)K(d[s].spec,l,t,d[s].componentTag,o)}if(window.lnCore._debugSink&&(a||r)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),a){const d=n.byReactive.get(t);d&&te(d,o,t,e.oldValue),n.reactiveWildcard.length&&te(n.reactiveWildcard,o,t,e.oldValue)}if(r)for(let d=0;d<r.length;d++){const l=r[d];if(l.handler){l.handler(o,t,e.oldValue);continue}l.onAttributeChange&&o[l.attribute]?l.onAttributeChange(o,t):(P(o,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(o))}}}function ne(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let a=0;a<t.length;a++)try{$e(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,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 Ie(e){const t=D();if(t.length){if(e.target)for(let a=0;a<t.length;a++){const n=t[a];if(n.onSubtreeChange&&n.query){const r=n.query,i=e.target.nodeType===1?e.target.matches&&e.target.matches(r)?e.target:e.target.closest?e.target.closest(r):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(r):null;i&&n.onSubtreeChange(i,e)}}for(let a=0;a<e.addedNodes.length;a++){const n=e.addedNodes[a];if(n.nodeType===1){const r=!!(n.firstElementChild||n.children&&n.children.length);for(let i=0;i<t.length;i++){const o=t[i];if(o.selector&&o.attribute&&o.ComponentFn){if(!r)n.matches&&n.matches(o.query)&&h(n,o);else if(n.matches&&n.matches(o.query)&&h(n,o),n.querySelectorAll){const d=n.querySelectorAll(o.query);for(let l=0;l<d.length;l++)h(d[l],o)}}o.onInit&&o.onInit(n)}}}for(let a=0;a<e.removedNodes.length;a++){const n=e.removedNodes[a];if(n.nodeType===1){const r=!!(n.firstElementChild||n.children&&n.children.length);for(let i=0;i<t.length;i++){const o=t[i],d=o.query;if(d){if(!r)n.matches&&n.matches(d)&&$(n,o);else if(n.matches&&n.matches(d)&&$(n,o),n.querySelectorAll){const l=n.querySelectorAll(d);for(let s=0;s<l.length;s++)$(l[s],o)}}}}}}}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{Ie(n)}catch(r){console.error("[ln-core] lifecycle handler failed",n.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e,t){ee({observed:e,handler:t}),ne()}function Oe(e){D().push(e),ae()}function oe(e,t,a,n,r={}){const i=r.extraAttributes||[],o=r.onAttributeChange||null,d=r.onSubtreeChange||null,l=r.onInit||null,s=r.onAttrChange||null,c=r.effects||null,u=r.attributes||null,f=u?_e(u):c,q=u?new Set(Object.keys(u)):null,Xe=r.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:o,onAttrChange:s,effects:f,declared:q,persist:Xe}),ne();const Ye=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ze=r.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 I(e){const t=e===void 0?location.hash:e,a={},n=le(t);if(!n)return a;const r=n.split("&");for(let i=0;i<r.length;i++){const o=r[i];if(!o)continue;const d=o.indexOf(":"),l=d>-1?o.slice(0,d):o,s=d>-1?o.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=I();return e in t?t[e]:null}function Le(e,t){if(!e)return;const a=I();t==null?delete a[e]:a[e]=String(t);const r=Object.keys(a).map(function(i){const o=a[i];return o===""?i:i+":"+encodeURIComponent(o)}).join("&");le(location.hash)!==r&&(location.hash=r)}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),r=n?n.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:a,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,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 E=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 r=1;r<=e.length;r++)t.charAt(n-1)===e.charAt(r-1)?a[n][r]=a[n-1][r-1]:a[n][r]=Math.min(a[n-1][r-1]+1,a[n][r-1]+1,a[n-1][r]+1);return a[t.length][e.length]}function Ue(e,t=E){if(t.has(e))return null;let a=null,n=1/0;for(const i of t){const o=We(e,i);o<n&&(n=o,a=i)}const r=Math.max(3,Math.floor(e.length*.4));return n<=r?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=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const o=r[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const l=o.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:o,attribute:l.name,targetId:"",message:`[ln-debug] Empty ID reference in <${o.tagName.toLowerCase()} ${l.name}="">.`});continue}t.getElementById(s)||t.querySelector("#"+re(s))||n.push({type:"id-unresolved",element:o,attribute:l.name,targetId:s,message:`[ln-debug] Unresolved ID reference: <${o.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=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const o=r[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const l=o.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:o,attribute:l.name,storeName:"",message:`[ln-debug] Empty store reference in <${o.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:o,attribute:l.name,storeName:c,message:`[ln-debug] Unresolved store reference: <${o.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 r=new Map;for(let i=0;i<n.length;i++){const o=n[i],d=(o.getAttribute("data-ln-data-store")||"").trim();d&&(r.has(d)||r.set(d,[]),r.get(d).push(o))}for(const[i,o]of r.entries())o.length>1&&a.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 a}function Ge(e=document,t=E){const a=e.nodeType===9?e.body||e.documentElement:e;if(!a)return[];const n=[],r=[a,...a.querySelectorAll("*")];for(let i=0;i<r.length;i++){const o=r[i];if(o.attributes)for(let d=0;d<o.attributes.length;d++){const l=o.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:o,attribute:l.name,suggestion:s,message:`[ln-debug] Unknown attribute "${l.name}" on <${o.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||E,n=Ve(e),r=He(e),i=ze(e),o=Ge(e,a),d=[...n,...r,...i,...o];if(!t.silent)for(let l=0;l<d.length;l++)console.warn(d[l].message);return{idIssues:n,storeIssues:r,uniquenessIssues:i,spellingIssues:o,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 r=v(e);a&&a(r)},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(),Ee(["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,o){return v(i||(this.dom?this.dom.ownerDocument||this.dom:document),o)},n.prototype.destroy=function(){delete this.dom[t],de()};const r=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)}});r.verify=function(i,o){return v(i||document,o)},r.schedule=function(i,o,d){return g(i||document,o,d)}})(),C.scheduleVerification=g,C.verifyDOM=v,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),C})({});
|
|
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})({});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function F(){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 k(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 s=1;s<t.length;s++)if(t[s]&&t[s].nodeType===1){i=t[s];break}if(!k(i))return}e.apply(console,t)}}function x(e,t,r){const i=r||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function E(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){E(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,s={},u=e.elements,o={};if(r)for(let l=0;l<u.length;l++){const n=u[l];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let l=0;l<u.length;l++){const n=u[l];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&o[n.name]===1?s[n.name]=n.checked:(s[n.name]||(s[n.name]=[]),n.checked&&s[n.name].push(n.value));else if(n.type==="radio")n.checked&&(s[n.name]=n.value);else if(n.type==="select-multiple"){s[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&s[n.name].push(n.options[c].value)}else if(r&&n.type==="hidden")s[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const c=Number(n.value);s[n.name]=n.value===""||isNaN(c)?null:c}else s[n.name]=n.value}return s}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function re(e,t){const r=e.elements,i=[],s={};for(let u=0;u<r.length;u++){const o=r[u];o.name&&o.type==="checkbox"&&(s[o.name]=(s[o.name]||0)+1)}for(let u=0;u<r.length;u++){const o=r[u];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const l=o.getAttribute("data-ln-fill-as")||o.name;if(!l||!(l in t))continue;const n=t[l];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(s[o.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});o.checked=c.indexOf(o.value)!==-1}else o.checked=ie(n);i.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),i.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<o.options.length;c++)o.options[c].selected=n.indexOf(o.options[c].value)!==-1;i.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),i.push(o)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=re,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=ne);const M={};function le(e,t){M[e]=t}function se(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,E(function(){new MutationObserver(function(){x(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ce(e,t){if(!e||typeof t!="object")return;const r=e.toLowerCase().split("-")[0];$[r]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ce,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ue);const S={};function ae(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=S[e];return r?r.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const r=e.querySelectorAll("[data-ln-field]");for(let o=0;o<r.length;o++){const l=r[o],n=l.getAttribute("data-ln-field");t[n]!=null&&(l.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const l=i[o],n=l.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&l.setAttribute(a,t[f])}}const s=e.querySelectorAll("[data-ln-show]");for(let o=0;o<s.length;o++){const l=s[o],n=l.getAttribute("data-ln-show");n in t&&l.classList.toggle("hidden",!t[n])}const u=e.querySelectorAll("[data-ln-class]");for(let o=0;o<u.length;o++){const l=u[o],n=l.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&l.classList.toggle(a,!!t[f])}}return e}function fe(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const r=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<r.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",r[i],t??null),r[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)N(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 j(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const u=r.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,l){return t[l]!==void 0?t[l]:""}))}const i=function(u,o){return t[o]!==void 0?t[o]:""},s=Array.from(e.querySelectorAll("*"));e.nodeType===1&&s.push(e);for(let u=0;u<s.length;u++){const o=s[u],l=o.attributes;for(let n=0;n<l.length;n++){const c=l[n];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function ge(e,t,r,i,s,u){const o={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(o[d]=c)}const l=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(i(c));let a=o[d];if(a)s(a,c,n);else{const f=ae(r,u);if(!f||(j(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),s(a,c,n)}l.appendChild(a)}e.textContent="",e.appendChild(l)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=N,window.lnCore.lnFill=fe,window.lnCore.renderList=ge);function L(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function z(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function W(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const s=i.trim().toLowerCase();return!(s==="false"||s==="0")}function P(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const O=new Map;function U(e,t){const r=(e?e.join("|"):"")+"::"+t;if(O.has(r))return O.get(r);const i=new Set(e||[]),s=function(u,o){const l=u.getAttribute(o);return l!==null&&i.has(l)?l:t};return O.set(r,s),s}function H(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function V(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function K(e,t,r,i,s){if(!e||t===null)return!0;const u=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const l=n=>{s?console.warn(n,s):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(l(`[${u}] Invalid value "${t}" for boolean attribute "${r}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(l(`[${u}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return l(`[${u}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(l(`[${u}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(l(`[${u}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(l(`[${u}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return l(`[${u}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,r){for(const i in r){const[s,u,o]=r[i];Object.defineProperty(e,i,{get:function(){return s(t,u,o)},enumerable:!0,configurable:!0})}return e}function J(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let s=i.read;if(!s&&i.type)switch(i.type){case"enum":s=U(i.values,i.fallback);break;case"integer":s=z;break;case"float":s=H;break;case"boolean":s=W;break;case"list":s=P;break;case"json":s=V;break;case"string":default:s=L;break}s||(s=L),t[i.prop]=[s,r,i.fallback]}return t}function pe(e){const t={};for(const r in e){const i=e[r];i&&i.effect&&(t[r]=i.effect)}return Object.keys(t).length?t:null}function he(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=Q,window.lnCore.attrSpec=J,window.lnCore.attrStr=L,window.lnCore.attrInt=z,window.lnCore.attrBool=W,window.lnCore.attrList=P,window.lnCore.attrEnum=U,window.lnCore.attrFloat=H,window.lnCore.attrJson=V);function _(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function G(e,t,r,i){if(e.nodeType!==1)return;const u=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(u)&&_(e,o),e.querySelectorAll){const l=e.querySelectorAll(u);for(let n=0;n<l.length;n++)_(l[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function we(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function be(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 X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function me(e){const t=X(),r=e.observed||[];for(let i=0;i<r.length;i++){const s=r[i];t.byAttr.has(s)||t.byAttr.set(s,[]),t.byAttr.get(s).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 s=t.byDeclaredAttr.get(i);s.some(u=>u.componentTag===e.componentTag)||s.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=he(e);if(i===null)t.reactiveWildcard.push(e);else for(const s of i)t.byReactive.has(s)||t.byReactive.set(s,[]),t.byReactive.get(s).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,r,i){for(let s=0;s<e.length;s++){const u=e[s];if(!t[u.attribute])continue;const o=u.effects&&u.effects[r];o?o(t,r,i):u.onAttrChange&&(!u.declared||u.declared.has(r))&&u.onAttrChange(t,r,i)}}function Ce(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=X(),s=i.byAttr.get(t),u=F()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!s&&!u)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(u&&k(o)){const l=i.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let c=0;c<l.length;c++)K(l[c].spec,n,t,l[c].componentTag,o)}if(window.lnCore._debugSink&&(r||s)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const l=i.byReactive.get(t);l&&Y(l,o,t,e.oldValue),i.reactiveWildcard.length&&Y(i.reactiveWildcard,o,t,e.oldValue)}if(s)for(let l=0;l<s.length;l++){const n=s[l];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(G(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function ye(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,E(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++)try{Ce(t[r])}catch(i){console.error("[ln-core] mutation handler failed",t[r].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function D(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function T(e,t){if(!document.contains(e))if(t.attribute){const r=e[t.attribute];if(r&&typeof r.destroy=="function")try{r.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ve(e){const t=D();if(t.length){if(e.target)for(let r=0;r<t.length;r++){const i=t[r];if(i.onSubtreeChange&&i.query){const s=i.query,u=e.target.nodeType===1?e.target.matches&&e.target.matches(s)?e.target:e.target.closest?e.target.closest(s):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(s):null;u&&i.onSubtreeChange(u,e)}}for(let r=0;r<e.addedNodes.length;r++){const i=e.addedNodes[r];if(i.nodeType===1){const s=!!(i.firstElementChild||i.children&&i.children.length);for(let u=0;u<t.length;u++){const o=t[u];if(o.selector&&o.attribute&&o.ComponentFn){if(!s)i.matches&&i.matches(o.query)&&_(i,o);else if(i.matches&&i.matches(o.query)&&_(i,o),i.querySelectorAll){const l=i.querySelectorAll(o.query);for(let n=0;n<l.length;n++)_(l[n],o)}}o.onInit&&o.onInit(i)}}}for(let r=0;r<e.removedNodes.length;r++){const i=e.removedNodes[r];if(i.nodeType===1){const s=!!(i.firstElementChild||i.children&&i.children.length);for(let u=0;u<t.length;u++){const o=t[u],l=o.query;if(l){if(!s)i.matches&&i.matches(l)&&T(i,o);else if(i.matches&&i.matches(l)&&T(i,o),i.querySelectorAll){const n=i.querySelectorAll(l);for(let c=0;c<n.length;c++)T(n[c],o)}}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,E(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{ve(i)}catch(s){console.error("[ln-core] lifecycle handler failed",i.target,s)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){D().push(e),Z()}function ee(e,t,r,i,s={}){const u=s.extraAttributes||[],o=s.onAttributeChange||null,l=s.onSubtreeChange||null,n=s.onInit||null,c=s.onAttrChange||null,d=s.effects||null,a=s.attributes||null,f=a?pe(a):d,A=a?new Set(Object.keys(a)):null,v=s.persist||null;function y(h){const p=h||document.body;if(G(p,e,t,r),a&&F())for(const w in a){const Re=a[w],I=Array.from(p.querySelectorAll("["+w+"]"));p.matches&&p.matches("["+w+"]")&&I.push(p);for(let R=0;R<I.length;R++){const B=I[R];k(B)&&K(Re,B.getAttribute(w),w,i,B)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const h=/\[([\w-]+)/g;let p;for(;(p=h.exec(e))!==null;)b.push(p[1])}else b.push(e);me({selector:e,attribute:t,componentTag:i,attributes:a,ComponentFn:r,onInit:n,observed:b.concat(u),onAttributeChange:o,onAttrChange:c,effects:f,declared:A,persist:v}),ye();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=s.subtreeQuery||(m?e:"["+e+"]");D().push({selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:l,query:C}),Z(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=_e);function g(){we()>0?be(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g(),y}function te(e){return(e||"").replace(/^#/,"")}function q(e){const t=e===void 0?location.hash:e,r={},i=te(t);if(!i)return r;const s=i.split("&");for(let u=0;u<s.length;u++){const o=s[u];if(!o)continue;const l=o.indexOf(":"),n=l>-1?o.slice(0,l):o,c=l>-1?o.slice(l+1):"";if(n)try{r[n]=decodeURIComponent(c)}catch{r[n]=c}}return r}function Ae(e){if(!e)return null;const t=q();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const r=q();t==null?delete r[e]:r[e]=String(t);const s=Object.keys(r).map(function(u){const o=r[u];return o===""?u:u+":"+encodeURIComponent(o)}).join("&");te(location.hash)!==s&&(location.hash=s)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function xe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const r=e.getAttribute("data-ln-hash");if(r&&r.trim()!=="")return r.trim();const i=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return i?t?i+"-"+t:i:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Le(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 Oe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function De(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),i=e.slice(t+1),s=i?i.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:r,values:s}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=q,window.lnCore.hashGet=Ae,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=Oe,window.lnCore.hashFilterDecode=De);function Te(e,t,r,i){const s=typeof i=="number"?i:4,u=window.innerWidth,o=window.innerHeight,l=t.width,n=t.height,c=r.split("-"),d=c[0],a=c[1]==="start"||c[1]==="end"?c[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=f[d]||f.bottom;function v(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-l:e.left+(e.width-l)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function y(g){let h,p,w=!0;return g==="top"?(h=e.top-s-n,p=v(g),h<0&&(w=!1)):g==="bottom"?(h=e.bottom+s,p=v(g),h+n>o&&(w=!1)):g==="left"?(h=v(g),p=e.left-s-l,p<0&&(w=!1)):(h=v(g),p=e.right+s,p+l>u&&(w=!1)),{top:h,left:p,side:g,fits:w}}let b=null;for(let g=0;g<A.length;g++){const h=y(A[g]);if(h.fits){b=h;break}}b||(b=y(A[0]));let m=b.top,C=b.left;return l>=u?C=0:(C<0&&(C=0),C+l>u&&(C=u-l)),n>=o?m=0:(m<0&&(m=0),m+n>o&&(m=o-n)),{top:m,left:C,placement:b.side}}function qe(e){if(!e)return{width:0,height:0};const t=e.style,r=t.visibility,i=t.display,s=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const u=e.offsetWidth,o=e.offsetHeight;return t.visibility=r,t.display=i,t.position=s,{width:u,height:o}}function Ie(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ie),(function(){const e="data-ln-dropdown",t="lnDropdown",r="bottom-end";if(window[t]!==void 0)return;const i={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"position",type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:r,description:"Preferred positioning anchor"},"data-ln-dropdown-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},s=J(i);function u(o){this.dom=o,Q(this,o,s),this.toggleEl=o.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=o.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const l=this;return this._onRequestOpen=function(){l.toggleEl&&l.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){l.toggleEl&&l.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(l.toggleEl){const n=l.toggleEl.getAttribute("data-ln-toggle");l.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const c=l.toggleEl&&l.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){c&&(n.preventDefault(),n.stopPropagation(),l.toggleEl.setAttribute("data-ln-toggle","close"),l.triggerBtn&&l.triggerBtn.focus());return}if(n.key==="Tab"){c&&(l.triggerBtn&&l.triggerBtn.focus(),l.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=l._getMenuItems();if(d.length===0)return;if(!c&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),l.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=l._getMenuItems();f.length>0&&l._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!c)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;l._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;l._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),l._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),l._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==l.toggleEl||(l.triggerBtn&&l.triggerBtn.setAttribute("aria-expanded","true"),typeof l.toggleEl.showPopover=="function"&&l.toggleEl.showPopover(),l._initMenuAria(),l._reposition(),l._addOutsideClickListener(),l._addScrollRepositionListener(),l._addResizeCloseListener(),x(o,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==l.toggleEl||(l.triggerBtn&&l.triggerBtn.setAttribute("aria-expanded","false"),l._removeOutsideClickListener(),l._removeScrollRepositionListener(),l._removeResizeCloseListener(),l.toggleEl.style.top="",l.toggleEl.style.left="",l.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof l.toggleEl.hidePopover=="function"&&l.toggleEl.matches(":popover-open")&&l.toggleEl.hidePopover(),x(o,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}u.prototype._initMenuAria=function(){if(!this.toggleEl)return;const o=this.toggleEl.querySelectorAll("li");for(const n of o)n.setAttribute("role","none");const l=this._getMenuItems();for(let n=0;n<l.length;n++)l[n].setAttribute("role","menuitem"),l[n].setAttribute("tabindex",n===0?"0":"-1")},u.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},u.prototype._focusItem=function(o,l){for(let n=0;n<o.length;n++)o[n].setAttribute("tabindex",n===l?"0":"-1");o[l]&&o[l].focus()},u.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl)return;const o=this.triggerBtn.getBoundingClientRect(),l=qe(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,c=this.position||r,d=Te(o,l,c,n);this.toggleEl.style.top=d.top+"px",this.toggleEl.style.left=d.left+"px",this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},u.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const o=this;this._boundDocClick=function(l){o.dom.contains(l.target)||o.toggleEl&&o.toggleEl.contains(l.target)||o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},o._docClickTimeout=setTimeout(function(){o._docClickTimeout=null,document.addEventListener("click",o._boundDocClick)},0)},u.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},u.prototype._addScrollRepositionListener=function(){const o=this;this._boundScrollReposition=function(){o._reposition()},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},u.prototype._removeScrollRepositionListener=function(){this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},u.prototype._addResizeCloseListener=function(){const o=this;this._boundResizeClose=function(){o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},u.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},ee(e,t,u,"ln-dropdown",{attributes:i})})()})();
|
|
1
|
+
(function(){"use strict";function F(){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 k(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 s=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){s=t[r];break}if(!k(s))return}e.apply(console,t)}}function x(e,t,l){const s=l||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:s}))}function E(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){E(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const l=!!(t&&t.typed),s=t&&t.exclude,r={},u=e.elements,o={};if(l)for(let i=0;i<u.length;i++){const n=u[i];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let i=0;i<u.length;i++){const n=u[i];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(s&&n.matches&&n.matches(s)))if(n.type==="checkbox")l&&o[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&r[n.name].push(n.options[c].value)}else if(l&&n.type==="hidden")r[n.name]=n.value;else if(l&&(n.type==="number"||n.type==="range")){const c=Number(n.value);r[n.name]=n.value===""||isNaN(c)?null:c}else r[n.name]=n.value}return r}function ie(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function re(e,t){const l=e.elements,s=[],r={};for(let u=0;u<l.length;u++){const o=l[u];o.name&&o.type==="checkbox"&&(r[o.name]=(r[o.name]||0)+1)}for(let u=0;u<l.length;u++){const o=l[u];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const i=o.getAttribute("data-ln-fill-as")||o.name;if(!i||!(i in t))continue;const n=t[i];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(r[o.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});o.checked=c.indexOf(o.value)!==-1}else o.checked=ie(n);s.push(o)}else if(o.type==="radio")o.checked=o.value===String(n),s.push(o);else if(o.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<o.options.length;c++)o.options[c].selected=n.indexOf(o.options[c].value)!==-1;s.push(o)}else o.value=n,o.tagName==="SELECT"&&n!=null&&o.setAttribute("data-ln-value",n),s.push(o)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=re,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=ne);const M={};function le(e,t){M[e]=t}function se(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ue(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,E(function(){new MutationObserver(function(){x(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ce(e,t){if(!e||typeof t!="object")return;const l=e.toLowerCase().split("-")[0];$[l]=t}function de(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ce,window.lnCore.getLocaleFallback=de,window.lnCore.ensureLocaleObserver=ue);const S={};function ae(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const l=S[e];return l?l.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function N(e,t){if(!e||!t)return e;const l=e.querySelectorAll("[data-ln-field]");for(let o=0;o<l.length;o++){const i=l[o],n=i.getAttribute("data-ln-field");t[n]!=null&&(i.textContent=t[n])}const s=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<s.length;o++){const i=s[o],n=i.getAttribute("data-ln-attr").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&i.setAttribute(a,t[f])}}const r=e.querySelectorAll("[data-ln-show]");for(let o=0;o<r.length;o++){const i=r[o],n=i.getAttribute("data-ln-show");n in t&&i.classList.toggle("hidden",!t[n])}const u=e.querySelectorAll("[data-ln-class]");for(let o=0;o<u.length;o++){const i=u[o],n=i.getAttribute("data-ln-class").split(",");for(let c=0;c<n.length;c++){const d=n[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&i.classList.toggle(a,!!t[f])}}return e}function fe(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 l=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let s=0;s<l.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",l[s],t??null),l[s].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)N(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let l=0;l<t.length;l++)t[l].textContent=""}})));function j(e,t){if(!e||!t)return e;const l=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;l.nextNode();){const u=l.currentNode;u.textContent.indexOf("{{")!==-1&&(u.textContent=u.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,i){return t[i]!==void 0?t[i]:""}))}const s=function(u,o){return t[o]!==void 0?t[o]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let u=0;u<r.length;u++){const o=r[u],i=o.attributes;for(let n=0;n<i.length;n++){const c=i[n];c.value.indexOf("{{")!==-1&&o.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return e}function ge(e,t,l,s,r,u){const o={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(o[d]=c)}const i=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(s(c));let a=o[d];if(a)r(a,c,n);else{const f=ae(l,u);if(!f||(j(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),r(a,c,n)}i.appendChild(a)}e.textContent="",e.appendChild(i)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=N,window.lnCore.lnFill=fe,window.lnCore.renderList=ge);function L(e,t,l){const s=e.getAttribute(t);return s===null?l:s}function z(e,t,l){const s=parseInt(e.getAttribute(t),10);return isNaN(s)?l:s}function W(e,t,l=!1){const s=e.getAttribute(t);if(s===null)return!!l;const r=s.trim().toLowerCase();return!(r==="false"||r==="0")}function P(e,t){return(e.getAttribute(t)||"").split(",").map(l=>l.trim()).filter(Boolean)}const O=new Map;function U(e,t){const l=(e?e.join("|"):"")+"::"+t;if(O.has(l))return O.get(l);const s=new Set(e||[]),r=function(u,o){const i=u.getAttribute(o);return i!==null&&s.has(i)?i:t};return O.set(l,r),r}function H(e,t,l){const s=parseFloat(e.getAttribute(t));return isNaN(s)?l:s}function V(e,t,l){const s=e.getAttribute(t);if(!s)return l;try{return JSON.parse(s)}catch{return l}}function K(e,t,l,s,r){if(!e||t===null)return!0;const u=s||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const i=n=>{r?console.warn(n,r):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(i(`[${u}] Invalid value "${t}" for boolean attribute "${l}". Allowed: "true", "false", or presence-only.`),!1):!0}if(o==="enum"){const n=e.values||[];return n.includes(t)?!0:(i(`[${u}] Invalid value "${t}" for attribute "${l}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return i(`[${u}] Invalid integer "${t}" for attribute "${l}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(i(`[${u}] Value ${n} for attribute "${l}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(i(`[${u}] Value ${n} for attribute "${l}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(i(`[${u}] Invalid float "${t}" for attribute "${l}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return i(`[${u}] Invalid JSON for attribute "${l}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function Q(e,t,l){for(const s in l){const[r,u,o]=l[s];Object.defineProperty(e,s,{get:function(){return r(t,u,o)},enumerable:!0,configurable:!0})}return e}function J(e){const t={};for(const l in e){const s=e[l];if(!s||!s.prop)continue;let r=s.read;if(!r&&s.type)switch(s.type){case"enum":r=U(s.values,s.fallback);break;case"integer":r=z;break;case"float":r=H;break;case"boolean":r=W;break;case"list":r=P;break;case"json":r=V;break;case"string":default:r=L;break}r||(r=L),t[s.prop]=[r,l,s.fallback]}return t}function pe(e){const t={};for(const l in e){const s=e[l];s&&s.effect&&(t[l]=s.effect)}return Object.keys(t).length?t:null}function he(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const l in e.effects)t.add(l);if(e.onAttrChange&&e.declared)for(const l of e.declared)t.add(l);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=Q,window.lnCore.attrSpec=J,window.lnCore.attrStr=L,window.lnCore.attrInt=z,window.lnCore.attrBool=W,window.lnCore.attrList=P,window.lnCore.attrEnum=U,window.lnCore.attrFloat=H,window.lnCore.attrJson=V);function _(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(l){console.error("["+t.attribute+"] init failed",e,l)}}}function G(e,t,l,s){if(e.nodeType!==1)return;const u=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:l,ComponentFn:s};if(e.matches&&e.matches(u)&&_(e,o),e.querySelectorAll){const i=e.querySelectorAll(u);for(let n=0;n<i.length;n++)_(i[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function we(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function be(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 X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function me(e){const t=X(),l=e.observed||[];for(let s=0;s<l.length;s++){const r=l[s];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const s in e.attributes){t.byDeclaredAttr.has(s)||t.byDeclaredAttr.set(s,[]);const r=t.byDeclaredAttr.get(s);r.some(u=>u.componentTag===e.componentTag)||r.push({spec:e.attributes[s],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const s=he(e);if(s===null)t.reactiveWildcard.push(e);else for(const r of s)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,l,s){for(let r=0;r<e.length;r++){const u=e[r];if(!t[u.attribute])continue;const o=u.effects&&u.effects[l];o?o(t,l,s):u.onAttrChange&&(!u.declared||u.declared.has(l))&&u.onAttrChange(t,l,s)}}function Ce(e){const t=e.attributeName,l=t.indexOf("data-ln-")===0,s=X(),r=s.byAttr.get(t),u=F()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(t);if(!l&&!r&&!u)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(u&&k(o)){const i=s.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let c=0;c<i.length;c++)K(i[c].spec,n,t,i[c].componentTag,o)}if(window.lnCore._debugSink&&(l||r)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),l){const i=s.byReactive.get(t);i&&Y(i,o,t,e.oldValue),s.reactiveWildcard.length&&Y(s.reactiveWildcard,o,t,e.oldValue)}if(r)for(let i=0;i<r.length;i++){const n=r[i];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(G(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function ye(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,E(function(){new MutationObserver(function(t){for(let l=0;l<t.length;l++)try{Ce(t[l])}catch(s){console.error("[ln-core] mutation handler failed",t[l].target,s)}}).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 T(e,t){if(!document.contains(e))if(t.attribute){const l=e[t.attribute];if(l&&typeof l.destroy=="function")try{l.destroy()}catch(s){console.error("["+t.attribute+"] destroy failed",e,s)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ve(e){const t=D();if(!t.length)return;const l=e.target;if(l){const s=l.nodeType===1?l:l.parentElement;if(s&&(s.isContentEditable||s.closest&&s.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let s=0;s<t.length;s++){const r=t[s];if(r.onSubtreeChange&&r.query){const u=r.query,o=e.target.nodeType===1?e.target.matches&&e.target.matches(u)?e.target:e.target.closest?e.target.closest(u):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(u):null;o&&r.onSubtreeChange(o,e)}}for(let s=0;s<e.addedNodes.length;s++){const r=e.addedNodes[s];if(r.nodeType===1){const u=!!(r.firstElementChild||r.children&&r.children.length);for(let o=0;o<t.length;o++){const i=t[o];if(i.selector&&i.attribute&&i.ComponentFn){if(!u)r.matches&&r.matches(i.query)&&_(r,i);else if(r.matches&&r.matches(i.query)&&_(r,i),r.querySelectorAll){const n=r.querySelectorAll(i.query);for(let c=0;c<n.length;c++)_(n[c],i)}}i.onInit&&i.onInit(r)}}}for(let s=0;s<e.removedNodes.length;s++){const r=e.removedNodes[s];if(r.nodeType===1){const u=!!(r.firstElementChild||r.children&&r.children.length);for(let o=0;o<t.length;o++){const i=t[o],n=i.query;if(n){if(!u)r.matches&&r.matches(n)&&T(r,i);else if(r.matches&&r.matches(n)&&T(r,i),r.querySelectorAll){const c=r.querySelectorAll(n);for(let d=0;d<c.length;d++)T(c[d],i)}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,E(function(){new MutationObserver(function(t){for(let l=0;l<t.length;l++){const s=t[l];if(s.type==="childList")try{ve(s)}catch(r){console.error("[ln-core] lifecycle handler failed",s.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){D().push(e),Z()}function ee(e,t,l,s,r={}){const u=r.extraAttributes||[],o=r.onAttributeChange||null,i=r.onSubtreeChange||null,n=r.onInit||null,c=r.onAttrChange||null,d=r.effects||null,a=r.attributes||null,f=a?pe(a):d,A=a?new Set(Object.keys(a)):null,v=r.persist||null;function y(h){const p=h||document.body;if(G(p,e,t,l),a&&F())for(const w in a){const Re=a[w],I=Array.from(p.querySelectorAll("["+w+"]"));p.matches&&p.matches("["+w+"]")&&I.push(p);for(let R=0;R<I.length;R++){const B=I[R];k(B)&&K(Re,B.getAttribute(w),w,s,B)}}n&&n(p)}const b=[];if(e.indexOf("[")!==-1){const h=/\[([\w-]+)/g;let p;for(;(p=h.exec(e))!==null;)b.push(p[1])}else b.push(e);me({selector:e,attribute:t,componentTag:s,attributes:a,ComponentFn:l,onInit:n,observed:b.concat(u),onAttributeChange:o,onAttrChange:c,effects:f,declared:A,persist:v}),ye();const m=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,C=r.subtreeQuery||(m?e:"["+e+"]");D().push({selector:e,attribute:t,ComponentFn:l,onInit:n,onSubtreeChange:i,query:C}),Z(),window[t]=y,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=ee,window.lnCore.observeLifecycle=_e);function g(){we()>0?be(function(){y(document.body)}):y(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",g):g(),y}function te(e){return(e||"").replace(/^#/,"")}function q(e){const t=e===void 0?location.hash:e,l={},s=te(t);if(!s)return l;const r=s.split("&");for(let u=0;u<r.length;u++){const o=r[u];if(!o)continue;const i=o.indexOf(":"),n=i>-1?o.slice(0,i):o,c=i>-1?o.slice(i+1):"";if(n)try{l[n]=decodeURIComponent(c)}catch{l[n]=c}}return l}function Ae(e){if(!e)return null;const t=q();return e in t?t[e]:null}function Ee(e,t){if(!e)return;const l=q();t==null?delete l[e]:l[e]=String(t);const r=Object.keys(l).map(function(u){const o=l[u];return o===""?u:u+":"+encodeURIComponent(o)}).join("&");te(location.hash)!==r&&(location.hash=r)}function ke(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function xe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const l=e.getAttribute("data-ln-hash");if(l&&l.trim()!=="")return l.trim();const s=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return s?t?s+"-"+t:s:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Le(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 Oe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function De(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const l=e.slice(0,t),s=e.slice(t+1),r=s?s.split(",").map(function(u){try{return decodeURIComponent(u)}catch{return u}}).filter(Boolean):[];return{key:l,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=q,window.lnCore.hashGet=Ae,window.lnCore.hashSet=Ee,window.lnCore.hashLinkClick=ke,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Le,window.lnCore.hashFilterEncode=Oe,window.lnCore.hashFilterDecode=De);function Te(e,t,l,s){const r=typeof s=="number"?s:4,u=window.innerWidth,o=window.innerHeight,i=t.width,n=t.height,c=l.split("-"),d=c[0],a=c[1]==="start"||c[1]==="end"?c[1]:"center",f={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},A=f[d]||f.bottom;function v(g){return g==="top"||g==="bottom"?a==="start"?e.left:a==="end"?e.right-i:e.left+(e.width-i)/2:a==="start"?e.top:a==="end"?e.bottom-n:e.top+(e.height-n)/2}function y(g){let h,p,w=!0;return g==="top"?(h=e.top-r-n,p=v(g),h<0&&(w=!1)):g==="bottom"?(h=e.bottom+r,p=v(g),h+n>o&&(w=!1)):g==="left"?(h=v(g),p=e.left-r-i,p<0&&(w=!1)):(h=v(g),p=e.right+r,p+i>u&&(w=!1)),{top:h,left:p,side:g,fits:w}}let b=null;for(let g=0;g<A.length;g++){const h=y(A[g]);if(h.fits){b=h;break}}b||(b=y(A[0]));let m=b.top,C=b.left;return i>=u?C=0:(C<0&&(C=0),C+i>u&&(C=u-i)),n>=o?m=0:(m<0&&(m=0),m+n>o&&(m=o-n)),{top:m,left:C,placement:b.side}}function qe(e){if(!e)return{width:0,height:0};const t=e.style,l=t.visibility,s=t.display,r=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const u=e.offsetWidth,o=e.offsetHeight;return t.visibility=l,t.display=s,t.position=r,{width:u,height:o}}function Ie(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ie),(function(){const e="data-ln-dropdown",t="lnDropdown",l="bottom-end";if(window[t]!==void 0)return;const s={"data-ln-dropdown":{type:"marker",description:"Initializes the dropdown container"},"data-ln-dropdown-position":{prop:"position",type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],fallback:l,description:"Preferred positioning anchor"},"data-ln-dropdown-placement":{type:"enum",values:["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],description:"Active calculated placement applied at runtime"},"data-ln-dropdown-menu":{type:"marker",description:"Dropdown menu element containing items"}},r=J(s);function u(o){this.dom=o,Q(this,o,r),this.toggleEl=o.querySelector("[data-ln-toggle]"),this._boundDocClick=null,this._docClickTimeout=null,this._boundScrollReposition=null,this._boundResizeClose=null,this.toggleEl&&(this.toggleEl.setAttribute("data-ln-dropdown-menu",""),this.toggleEl.setAttribute("role","menu"),this.toggleEl.setAttribute("popover","manual"),this._initMenuAria()),this.triggerBtn=o.querySelector("[data-ln-toggle-for]"),this.triggerBtn&&(this.triggerBtn.setAttribute("aria-haspopup","menu"),this.triggerBtn.setAttribute("aria-expanded","false"));const i=this;return this._onRequestOpen=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","open")},this._onRequestClose=function(){i.toggleEl&&i.toggleEl.setAttribute("data-ln-toggle","close")},this._onRequestToggle=function(){if(i.toggleEl){const n=i.toggleEl.getAttribute("data-ln-toggle");i.toggleEl.setAttribute("data-ln-toggle",n==="open"?"close":"open")}},this._onKeydown=function(n){const c=i.toggleEl&&i.toggleEl.getAttribute("data-ln-toggle")==="open";if(n.key==="Escape"){c&&(n.preventDefault(),n.stopPropagation(),i.toggleEl.setAttribute("data-ln-toggle","close"),i.triggerBtn&&i.triggerBtn.focus());return}if(n.key==="Tab"){c&&(i.triggerBtn&&i.triggerBtn.focus(),i.toggleEl.setAttribute("data-ln-toggle","close"));return}const d=i._getMenuItems();if(d.length===0)return;if(!c&&(n.key==="ArrowDown"||n.key==="ArrowUp")){n.preventDefault(),i.toggleEl.setAttribute("data-ln-toggle","open"),setTimeout(function(){const f=i._getMenuItems();f.length>0&&i._focusItem(f,n.key==="ArrowDown"?0:f.length-1)},0);return}if(!c)return;const a=d.indexOf(document.activeElement);if(n.key==="ArrowDown"){n.preventDefault();const f=a<d.length-1?a+1:0;i._focusItem(d,f)}else if(n.key==="ArrowUp"){n.preventDefault();const f=a>0?a-1:d.length-1;i._focusItem(d,f)}else n.key==="Home"?(n.preventDefault(),i._focusItem(d,0)):n.key==="End"&&(n.preventDefault(),i._focusItem(d,d.length-1))},this.dom.addEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.addEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.addEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.addEventListener("keydown",this._onKeydown),this._onToggleOpen=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","true"),typeof i.toggleEl.showPopover=="function"&&i.toggleEl.showPopover(),i._initMenuAria(),i._reposition(),i._addOutsideClickListener(),i._addScrollRepositionListener(),i._addResizeCloseListener(),x(o,"ln-dropdown:open",{target:n.detail.target}))},this._onToggleClose=function(n){!n.detail||n.detail.target!==i.toggleEl||(i.triggerBtn&&i.triggerBtn.setAttribute("aria-expanded","false"),i._removeOutsideClickListener(),i._removeScrollRepositionListener(),i._removeResizeCloseListener(),i.toggleEl.style.top="",i.toggleEl.style.left="",i.toggleEl.removeAttribute("data-ln-dropdown-placement"),typeof i.toggleEl.hidePopover=="function"&&i.toggleEl.matches(":popover-open")&&i.toggleEl.hidePopover(),x(o,"ln-dropdown:close",{target:n.detail.target}))},this.toggleEl&&(this.toggleEl.addEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.addEventListener("ln-toggle:close",this._onToggleClose)),this}u.prototype._initMenuAria=function(){if(!this.toggleEl)return;const o=this.toggleEl.querySelectorAll("li");for(const n of o)n.setAttribute("role","none");const i=this._getMenuItems();for(let n=0;n<i.length;n++)i[n].setAttribute("role","menuitem"),i[n].setAttribute("tabindex",n===0?"0":"-1")},u.prototype._getMenuItems=function(){return this.toggleEl?Array.from(this.toggleEl.querySelectorAll('a[href], button:not([disabled]), [role="menuitem"]:not([disabled])')):[]},u.prototype._focusItem=function(o,i){for(let n=0;n<o.length;n++)o[n].setAttribute("tabindex",n===i?"0":"-1");o[i]&&o[i].focus()},u.prototype._reposition=function(){if(!this.triggerBtn||!this.toggleEl)return;const o=this.triggerBtn.getBoundingClientRect(),i=qe(this.toggleEl),n=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--size-xs"))*16||4,c=this.position||l,d=Te(o,i,c,n);this.toggleEl.style.top=d.top+"px",this.toggleEl.style.left=d.left+"px",this.toggleEl.setAttribute("data-ln-dropdown-placement",d.placement)},u.prototype._addOutsideClickListener=function(){if(this._boundDocClick)return;const o=this;this._boundDocClick=function(i){o.dom.contains(i.target)||o.toggleEl&&o.toggleEl.contains(i.target)||o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},o._docClickTimeout=setTimeout(function(){o._docClickTimeout=null,document.addEventListener("click",o._boundDocClick)},0)},u.prototype._removeOutsideClickListener=function(){this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null)},u.prototype._addScrollRepositionListener=function(){const o=this;this._boundScrollReposition=function(){o._reposition()},window.addEventListener("scroll",this._boundScrollReposition,{passive:!0,capture:!0})},u.prototype._removeScrollRepositionListener=function(){this._boundScrollReposition&&(window.removeEventListener("scroll",this._boundScrollReposition,{capture:!0}),this._boundScrollReposition=null)},u.prototype._addResizeCloseListener=function(){const o=this;this._boundResizeClose=function(){o.toggleEl&&o.toggleEl.getAttribute("data-ln-toggle")==="open"&&o.toggleEl.setAttribute("data-ln-toggle","close")},window.addEventListener("resize",this._boundResizeClose)},u.prototype._removeResizeCloseListener=function(){this._boundResizeClose&&(window.removeEventListener("resize",this._boundResizeClose),this._boundResizeClose=null)},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-dropdown:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-dropdown:request-close",this._onRequestClose),this.dom.removeEventListener("ln-dropdown:request-toggle",this._onRequestToggle),this.dom.removeEventListener("keydown",this._onKeydown),this._removeOutsideClickListener(),this._removeScrollRepositionListener(),this._removeResizeCloseListener(),this.toggleEl&&typeof this.toggleEl.hidePopover=="function"&&this.toggleEl.matches(":popover-open")&&this.toggleEl.hidePopover(),this.toggleEl&&(this.toggleEl.removeAttribute("data-ln-dropdown-placement"),this.toggleEl.removeEventListener("ln-toggle:open",this._onToggleOpen),this.toggleEl.removeEventListener("ln-toggle:close",this._onToggleClose)),delete this.dom[t])},ee(e,t,u,"ln-dropdown",{attributes:s})})()})();
|