@livenetworks/ashlar 2.1.1 → 2.1.3
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-autoresize/src/ln-autoresize.js +3 -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 +24 -12
- 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-date/src/ln-date.js +22 -12
- package/components/ln-debug/ln-debug.js +1 -1
- package/components/ln-dropdown/ln-dropdown.js +1 -1
- package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
- package/components/ln-dropdown/src/ln-dropdown.js +18 -5
- package/components/ln-editor/ln-editor.js +1 -1
- package/components/ln-external-links/ln-external-links.js +1 -1
- package/components/ln-filter/ln-filter.js +1 -1
- package/components/ln-filter/ln-filter.schema.json +1 -1
- package/components/ln-filter/src/ln-filter.js +11 -10
- package/components/ln-form/ln-form.js +1 -1
- package/components/ln-form/src/ln-form.js +11 -0
- 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-list/src/ln-list.js +14 -5
- 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-number/src/ln-number.js +21 -10
- 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-popover/ln-popover.schema.json +82 -82
- package/components/ln-popover/src/ln-popover.js +22 -5
- 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-search/ln-search.schema.json +103 -103
- package/components/ln-search/src/ln-search.js +9 -5
- 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-sortable/src/ln-sortable.js +52 -7
- 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-tabs/src/ln-tabs.js +12 -8
- package/components/ln-time/ln-time.js +1 -1
- package/components/ln-time/src/ln-time.js +17 -7
- 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-validate/src/ln-validate.js +21 -7
- 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 T(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function A(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){i=t[o];break}if(!A(i))return}e.apply(console,t)}}function C(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:i}))}function Y(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(o),o}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ee(e,t){const n=!!(t&&t.typed),i=t&&t.exclude,o={},c=e.elements,l={};if(n)for(let s=0;s<c.length;s++){const r=c[s];r.name&&r.type==="checkbox"&&!r.disabled&&(l[r.name]=(l[r.name]||0)+1)}for(let s=0;s<c.length;s++){const r=c[s];if(!(!r.name||r.disabled||r.type==="file"||r.type==="submit"||r.type==="button")&&!(i&&r.matches&&r.matches(i)))if(r.type==="checkbox")n&&l[r.name]===1?o[r.name]=r.checked:(o[r.name]||(o[r.name]=[]),r.checked&&o[r.name].push(r.value));else if(r.type==="radio")r.checked&&(o[r.name]=r.value);else if(r.type==="select-multiple"){o[r.name]=[];for(let a=0;a<r.options.length;a++)r.options[a].selected&&o[r.name].push(r.options[a].value)}else if(n&&r.type==="hidden")o[r.name]=r.value;else if(n&&(r.type==="number"||r.type==="range")){const a=Number(r.value);o[r.name]=r.value===""||isNaN(a)?null:a}else o[r.name]=r.value}return o}function te(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ne(e,t){const n=e.elements,i=[],o={};for(let c=0;c<n.length;c++){const l=n[c];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let c=0;c<n.length;c++){const l=n[c];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const r=t[s];if(l.type==="checkbox"){if(Array.isArray(r))l.checked=r.indexOf(l.value)!==-1;else if(o[l.name]>1){const a=String(r).split(",").map(function(u){return u.trim()});l.checked=a.indexOf(l.value)!==-1}else l.checked=te(r);i.push(l)}else if(l.type==="radio")l.checked=l.value===String(r),i.push(l);else if(l.type==="select-multiple"){if(Array.isArray(r))for(let a=0;a<l.options.length;a++)l.options[a].selected=r.indexOf(l.options[a].value)!==-1;i.push(l)}else l.value=r,l.tagName==="SELECT"&&r!=null&&l.setAttribute("data-ln-value",r),i.push(l)}return i}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ne,window.lnCore.serializeForm=ee,window.lnCore.resolveFormMethod=Z);const q={};function oe(e,t){q[e]=t}function re(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=oe,window.lnCore.getDataMapper=re);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const R={};function le(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];R[n]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return R[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=ie);const v={};function ce(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=v[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const s=n[l],r=s.getAttribute("data-ln-field");t[r]!=null&&(s.textContent=t[r])}const i=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<i.length;l++){const s=i[l],r=s.getAttribute("data-ln-attr").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&s.setAttribute(d,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const s=o[l],r=s.getAttribute("data-ln-show");r in t&&s.classList.toggle("hidden",!t[r])}const c=e.querySelectorAll("[data-ln-class]");for(let l=0;l<c.length;l++){const s=c[l],r=s.getAttribute("data-ln-class").split(",");for(let a=0;a<r.length;a++){const u=r[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&s.classList.toggle(d,!!t[f])}}return e}function ae(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let i=0;i<n.length;i++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[i],t??null),n[i].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function M(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const c=n.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const i=function(c,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let c=0;c<o.length;c++){const l=o[c],s=l.attributes;for(let r=0;r<s.length;r++){const a=s[r];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function ue(e,t,n,i,o,c){const l={};for(let r=0;r<e.children.length;r++){const a=e.children[r],u=a.getAttribute("data-ln-render-key");u&&(l[u]=a)}const s=document.createDocumentFragment();for(let r=0;r<t.length;r++){const a=t[r],u=String(i(a));let d=l[u];if(d)o(d,a,r);else{const f=ce(n,c);if(!f||(M(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),o(d,a,r)}s.appendChild(d)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=$,window.lnCore.lnFill=ae,window.lnCore.renderList=ue);function k(e,t,n){const i=e.getAttribute(t);return i===null?n:i}function N(e,t,n){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?n:i}function B(e,t,n=!1){const i=e.getAttribute(t);if(i===null)return!!n;const o=i.trim().toLowerCase();return!(o==="false"||o==="0")}function j(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const x=new Map;function W(e,t){const n=(e?e.join("|"):"")+"::"+t;if(x.has(n))return x.get(n);const i=new Set(e||[]),o=function(c,l){const s=c.getAttribute(l);return s!==null&&i.has(s)?s:t};return x.set(n,o),o}function U(e,t,n){const i=parseFloat(e.getAttribute(t));return isNaN(i)?n:i}function V(e,t,n){const i=e.getAttribute(t);if(!i)return n;try{return JSON.parse(i)}catch{return n}}function H(e,t,n,i,o){if(!e||t===null)return!0;const c=i||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=r=>{o?console.warn(r,o):console.warn(r)};if(l==="boolean"){const r=t.trim().toLowerCase();return r!==""&&r!=="true"&&r!=="false"&&r!=="1"&&r!=="0"?(s(`[${c}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const r=e.values||[];return r.includes(t)?!0:(s(`[${c}] Invalid value "${t}" for attribute "${n}". Allowed: ${r.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${c}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const r=parseInt(t,10);return e.min!==void 0&&r<e.min?(s(`[${c}] Value ${r} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&r>e.max?(s(`[${c}] Value ${r} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${c}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(r){return s(`[${c}] Invalid JSON for attribute "${n}": ${r.message}. Fallback: ${e.fallback}.`),!1}return!0}function de(e,t,n){for(const i in n){const[o,c,l]=n[i];Object.defineProperty(e,i,{get:function(){return o(t,c,l)},enumerable:!0,configurable:!0})}return e}function fe(e){const t={};for(const n in e){const i=e[n];if(!i||!i.prop)continue;let o=i.read;if(!o&&i.type)switch(i.type){case"enum":o=W(i.values,i.fallback);break;case"integer":o=N;break;case"float":o=U;break;case"boolean":o=B;break;case"list":o=j;break;case"json":o=V;break;case"string":default:o=k;break}o||(o=k),t[i.prop]=[o,n,i.fallback]}return t}function he(e){const t={};for(const n in e){const i=e[n];i&&i.effect&&(t[n]=i.effect)}return Object.keys(t).length?t:null}function we(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const n in e.effects)t.add(n);if(e.onAttrChange&&e.declared)for(const n of e.declared)t.add(n);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=de,window.lnCore.attrSpec=fe,window.lnCore.attrStr=k,window.lnCore.attrInt=N,window.lnCore.attrBool=B,window.lnCore.attrList=j,window.lnCore.attrEnum=W,window.lnCore.attrFloat=U,window.lnCore.attrJson=V);function g(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(n){console.error("["+t.attribute+"] init failed",e,n)}}}function Q(e,t,n,i){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:n,ComponentFn:i};if(e.matches&&e.matches(c)&&g(e,l),e.querySelectorAll){const s=e.querySelectorAll(c);for(let r=0;r<s.length;r++)g(s[r],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function be(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function pe(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function J(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ge(e){const t=J(),n=e.observed||[];for(let i=0;i<n.length;i++){const o=n[i];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 i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const o=t.byDeclaredAttr.get(i);o.some(c=>c.componentTag===e.componentTag)||o.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=we(e);if(i===null)t.reactiveWildcard.push(e);else for(const o of i)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function K(e,t,n,i){for(let o=0;o<e.length;o++){const c=e[o];if(!t[c.attribute])continue;const l=c.effects&&c.effects[n];l?l(t,n,i):c.onAttrChange&&(!c.declared||c.declared.has(n))&&c.onAttrChange(t,n,i)}}function me(e){const t=e.attributeName,n=t.indexOf("data-ln-")===0,i=J(),o=i.byAttr.get(t),c=T()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!n&&!o&&!c)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(c&&A(l)){const s=i.byDeclaredAttr.get(t),r=l.getAttribute(t);for(let a=0;a<s.length;a++)H(s[a].spec,r,t,s[a].componentTag,l)}if(window.lnCore._debugSink&&(n||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),n){const s=i.byReactive.get(t);s&&K(s,l,t,e.oldValue),i.reactiveWildcard.length&&K(i.reactiveWildcard,l,t,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const r=o[s];if(r.handler){r.handler(l,t,e.oldValue);continue}r.onAttributeChange&&l[r.attribute]?r.onAttributeChange(l,t):(Q(l,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(l))}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{me(t[n])}catch(i){console.error("[ln-core] mutation handler failed",t[n].target,i)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function _(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(e,t){if(!document.contains(e))if(t.attribute){const n=e[t.attribute];if(n&&typeof n.destroy=="function")try{n.destroy()}catch(i){console.error("["+t.attribute+"] destroy failed",e,i)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ye(e){const t=_();if(!t.length)return;const n=e.target;if(n){const i=n.nodeType===1?n:n.parentElement;if(i&&(i.isContentEditable||i.closest&&i.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let i=0;i<t.length;i++){const o=t[i];if(o.onSubtreeChange&&o.query){const c=o.query,l=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;l&&o.onSubtreeChange(l,e)}}for(let i=0;i<e.addedNodes.length;i++){const o=e.addedNodes[i];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!c)o.matches&&o.matches(s.query)&&g(o,s);else if(o.matches&&o.matches(s.query)&&g(o,s),o.querySelectorAll){const r=o.querySelectorAll(s.query);for(let a=0;a<r.length;a++)g(r[a],s)}}s.onInit&&s.onInit(o)}}}for(let i=0;i<e.removedNodes.length;i++){const o=e.removedNodes[i];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l],r=s.query;if(r){if(!c)o.matches&&o.matches(r)&&S(o,s);else if(o.matches&&o.matches(r)&&S(o,s),o.querySelectorAll){const a=o.querySelectorAll(r);for(let u=0;u<a.length;u++)S(a[u],s)}}}}}}function P(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const i=t[n];if(i.type==="childList")try{ye(i)}catch(o){console.error("[ln-core] lifecycle handler failed",i.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e){_().push(e),P()}function z(e,t,n,i,o={}){const c=o.extraAttributes||[],l=o.onAttributeChange||null,s=o.onSubtreeChange||null,r=o.onInit||null,a=o.onAttrChange||null,u=o.effects||null,d=o.attributes||null,f=d?he(d):u,h=d?new Set(Object.keys(d)):null,w=o.persist||null;function p(O){const b=O||document.body;if(Q(b,e,t,n),d&&T())for(const m in d){const Te=d[m],F=Array.from(b.querySelectorAll("["+m+"]"));b.matches&&b.matches("["+m+"]")&&F.push(b);for(let D=0;D<F.length;D++){const I=F[D];A(I)&&H(Te,I.getAttribute(m),m,i,I)}}r&&r(b)}const L=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let b;for(;(b=O.exec(e))!==null;)L.push(b[1])}else L.push(e);ge({selector:e,attribute:t,componentTag:i,attributes:d,ComponentFn:n,onInit:r,observed:L.concat(c),onAttributeChange:l,onAttrChange:a,effects:f,declared:h,persist:w}),Ce();const De=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Ie=o.subtreeQuery||(De?e:"["+e+"]");_().push({selector:e,attribute:t,ComponentFn:n,onInit:r,onSubtreeChange:s,query:Ie}),P(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=Ae);function X(){be()>0?pe(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),p}function G(e){return(e||"").replace(/^#/,"")}function E(e){const t=e===void 0?location.hash:e,n={},i=G(t);if(!i)return n;const o=i.split("&");for(let c=0;c<o.length;c++){const l=o[c];if(!l)continue;const s=l.indexOf(":"),r=s>-1?l.slice(0,s):l,a=s>-1?l.slice(s+1):"";if(r)try{n[r]=decodeURIComponent(a)}catch{n[r]=a}}return n}function ve(e){if(!e)return null;const t=E();return e in t?t[e]:null}function ke(e,t){if(!e)return;const n=E();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(c){const l=n[c];return l===""?c:c+":"+encodeURIComponent(l)}).join("&");G(location.hash)!==o&&(location.hash=o)}function xe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function _e(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const 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 Ee(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Le(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),i=e.slice(t+1),o=i?i.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=E,window.lnCore.hashGet=ve,window.lnCore.hashSet=ke,window.lnCore.hashLinkClick=xe,window.lnCore.resolveHashNamespace=_e,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Ee,window.lnCore.hashFilterEncode=Le,window.lnCore.hashFilterDecode=Oe);function Fe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Fe),(function(){const e="data-ln-picklist",t="lnPicklist",n="data-ln-picklist-list",i="data-ln-picklist-max";if(window[t]!==void 0)return;const o={"data-ln-picklist":{type:"enum",values:["enabled","disabled"],fallback:"enabled",effect:s,description:"Controls enabled/disabled state of the dual-list picklist"},"data-ln-picklist-max":{type:"integer",fallback:1/0,min:1,effect:r,description:"Maximum selectable items in the selected list"},"data-ln-picklist-list":{type:"enum",values:["available","selected"],description:"Role marker for available or selected picklist columns"}};function c(a){if(this.dom=a,this.isEnabled=a.getAttribute(e)!=="disabled",this.max=l(a),this.available=a.querySelector("["+n+'="available"]'),this.selected=a.querySelector("["+n+'="selected"]'),!this.available||!this.selected)return console.warn("[ln-picklist] requires both ["+n+'="available"] and ['+n+'="selected"]',a),this;this._onChange=this._onChange.bind(this),a.addEventListener("change",this._onChange),this._initial=[];for(const u of[this.available,this.selected])for(const d of u.children)this._initial.push(d);return this.sync(),this._form=a.closest("form"),this._form&&(this._onFormReset=this._onFormReset.bind(this),this._form.addEventListener("reset",this._onFormReset)),this}c.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._onChange&&this.dom.removeEventListener("change",this._onChange),this._form&&this._form.removeEventListener("reset",this._onFormReset),delete this.dom[t])},c.prototype.enable=function(){this.dom.setAttribute(e,"")},c.prototype.disable=function(){this.dom.setAttribute(e,"disabled")},c.prototype.sync=function(){if(!this.available||!this.selected)return;const a=Array.from(this.available.children).concat(Array.from(this.selected.children));for(let d=0;d<a.length;d++)this._initial.includes(a[d])||this._initial.push(a[d]);let u=0;for(let d=0;d<this._initial.length;d++){const f=this._initial[d];if(!f.isConnected)continue;const h=f.querySelector('input[type="checkbox"]');if(!h)continue;let w;h.checked?this.max===null||u<this.max?(w=this.selected,u++):(h.checked=!1,w=this.available):w=this.available,w.appendChild(f)}},c.prototype._onFormReset=function(a){const u=this;setTimeout(function(){u._destroyed||a.defaultPrevented||u.sync()},0)},c.prototype._onChange=function(a){const u=a.target.closest('input[type="checkbox"]');if(!u)return;const d=u.closest("li");if(!d)return;const f=d.parentElement;if(f!==this.available&&f!==this.selected)return;if(!this.isEnabled){u.checked=!u.checked;return}const h=u.checked?this.selected:this.available;if(f===h)return;if(h===this.selected&&this.max!==null&&this.selected.children.length>=this.max){u.checked=!u.checked,C(this.dom,"ln-picklist:max-reached",{max:this.max,item:d,checkbox:u,count:this.selected.children.length});return}const w={item:d,from:f,to:h,checkbox:u};if(Y(this.dom,"ln-picklist:before-move",w).defaultPrevented){u.checked=!u.checked;return}const p=document.activeElement===u;h.appendChild(d),p&&u.focus(),C(this.dom,"ln-picklist:move",w)};function l(a){const u=a.getAttribute(i);if(u===null||u==="")return null;const d=parseInt(u,10);return isNaN(d)||d<0?null:d}function s(a){const u=a[t];if(!u)return;const d=a.getAttribute(e)!=="disabled";d!==u.isEnabled&&(u.isEnabled=d,C(a,d?"ln-picklist:enabled":"ln-picklist:disabled",{target:a}))}function r(a){const u=a[t];u&&(u.max=l(a))}z(e,t,c,"ln-picklist",{attributes:o})})()})();
|
|
1
|
+
(function(){"use strict";function q(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function A(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let l=null;for(let r=1;r<t.length;r++)if(t[r]&&t[r].nodeType===1){l=t[r];break}if(!A(l))return}e.apply(console,t)}}function C(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:l}))}function te(e,t,o){const l=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,l);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:l});return e.dispatchEvent(r),r}function y(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){y(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function ne(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function oe(e,t){const o=!!(t&&t.typed),l=t&&t.exclude,r={},s=e.elements,i={};if(o)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(l&&n.matches&&n.matches(l)))if(n.type==="checkbox")o&&i[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&r[n.name].push(n.options[a].value)}else if(o&&n.type==="hidden")r[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const a=Number(n.value);r[n.name]=n.value===""||isNaN(a)?null:a}else r[n.name]=n.value}return r}function re(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ie(e,t){const o=e.elements,l=[],r={};for(let s=0;s<o.length;s++){const i=o[s];i.name&&i.type==="checkbox"&&(r[i.name]=(r[i.name]||0)+1)}for(let s=0;s<o.length;s++){const i=o[s];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(r[i.name]>1){const a=String(n).split(",").map(function(u){return u.trim()});i.checked=a.indexOf(i.value)!==-1}else i.checked=re(n);l.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),l.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let a=0;a<i.options.length;a++)i.options[a].selected=n.indexOf(i.options[a].value)!==-1;l.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),l.push(i)}return l}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ie,window.lnCore.serializeForm=oe,window.lnCore.resolveFormMethod=ne);const R={};function le(e,t){R[e]=t}function se(e){return R[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=le,window.lnCore.getDataMapper=se);function ce(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,y(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function ae(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];$[o]=t}function ue(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ae,window.lnCore.getLocaleFallback=ue,window.lnCore.ensureLocaleObserver=ce);const v={};function de(e,t){v[e]||(v[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=v[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function M(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const l=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();t[f]!=null&&c.setAttribute(d,t[f])}}const r=e.querySelectorAll("[data-ln-show]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const u=n[a].trim().split(":");if(u.length!==2)continue;const d=u[0].trim(),f=u[1].trim();f in t&&c.classList.toggle(d,!!t[f])}}return e}function 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 o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let l=0;l<o.length;l++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[l],t??null),o[l].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)M(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function N(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const s=o.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const l=function(s,i){return t[i]!==void 0?t[i]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let s=0;s<r.length;s++){const i=r[s],c=i.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&i.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,l))}}return e}function he(e,t,o,l,r,s){const i={};for(let n=0;n<e.children.length;n++){const a=e.children[n],u=a.getAttribute("data-ln-render-key");u&&(i[u]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],u=String(l(a));let d=i[u];if(d)r(d,a,n);else{const f=de(o,s);if(!f||(N(f,a),d=f.firstElementChild,!d))continue;d.setAttribute("data-ln-render-key",u),r(d,a,n)}c.appendChild(d)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=M,window.lnCore.lnFill=fe,window.lnCore.renderList=he);function k(e,t,o){const l=e.getAttribute(t);return l===null?o:l}function B(e,t,o){const l=parseInt(e.getAttribute(t),10);return isNaN(l)?o:l}function j(e,t,o=!1){const l=e.getAttribute(t);if(l===null)return!!o;const r=l.trim().toLowerCase();return!(r==="false"||r==="0")}function W(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const _=new Map;function U(e,t){const o=(e?e.join("|"):"")+"::"+t;if(_.has(o))return _.get(o);const l=new Set(e||[]),r=function(s,i){const c=s.getAttribute(i);return c!==null&&l.has(c)?c:t};return _.set(o,r),r}function V(e,t,o){const l=parseFloat(e.getAttribute(t));return isNaN(l)?o:l}function H(e,t,o){const l=e.getAttribute(t);if(!l)return o;try{return JSON.parse(l)}catch{return o}}function Q(e,t,o,l,r){if(!e||t===null)return!0;const s=l||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{r?console.warn(n,r):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${s}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function we(e,t,o){for(const l in o){const[r,s,i]=o[l];Object.defineProperty(e,l,{get:function(){return r(t,s,i)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const o in e){const l=e[o];if(!l||!l.prop)continue;let r=l.read;if(!r&&l.type)switch(l.type){case"enum":r=U(l.values,l.fallback);break;case"integer":r=B;break;case"float":r=V;break;case"boolean":r=j;break;case"list":r=W;break;case"json":r=H;break;case"string":default:r=k;break}r||(r=k),t[l.prop]=[r,o,l.fallback]}return t}function pe(e){const t={};for(const o in e){const l=e[o];l&&l.effect&&(t[o]=l.effect)}return Object.keys(t).length?t:null}function ge(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=we,window.lnCore.attrSpec=be,window.lnCore.attrStr=k,window.lnCore.attrInt=B,window.lnCore.attrBool=j,window.lnCore.attrList=W,window.lnCore.attrEnum=U,window.lnCore.attrFloat=V,window.lnCore.attrJson=H);function g(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function J(e,t,o,l){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:l};if(e.matches&&e.matches(s)&&g(e,i),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)g(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function me(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ce(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function K(){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 ye(e){const t=K(),o=e.observed||[];for(let l=0;l<o.length;l++){const r=o[l];t.byAttr.has(r)||t.byAttr.set(r,[]),t.byAttr.get(r).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const l in e.attributes){t.byDeclaredAttr.has(l)||t.byDeclaredAttr.set(l,[]);const r=t.byDeclaredAttr.get(l);r.some(s=>s.componentTag===e.componentTag)||r.push({spec:e.attributes[l],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const l=ge(e);if(l===null)t.reactiveWildcard.push(e);else for(const r of l)t.byReactive.has(r)||t.byReactive.set(r,[]),t.byReactive.get(r).push(e)}e.persist&&t.persist.push(e)}function P(e,t,o,l){for(let r=0;r<e.length;r++){const s=e[r];if(!t[s.attribute])continue;const i=s.effects&&s.effects[o];i?i(t,o,l):s.onAttrChange&&(!s.declared||s.declared.has(o))&&s.onAttrChange(t,o,l)}}function Ae(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,l=K(),r=l.byAttr.get(t),s=q()&&l.byDeclaredAttr&&l.byDeclaredAttr.has(t);if(!o&&!r&&!s)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(s&&A(i)){const c=l.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let a=0;a<c.length;a++)Q(c[a].spec,n,t,c[a].componentTag,i)}if(window.lnCore._debugSink&&(o||r)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=l.byReactive.get(t);c&&P(c,i,t,e.oldValue),l.reactiveWildcard.length&&P(l.reactiveWildcard,i,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const n=r[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(J(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function ve(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{Ae(t[o])}catch(l){console.error("[ln-core] mutation handler failed",t[o].target,l)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function x(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function S(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function E(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(l){console.error("["+t.attribute+"] destroy failed",e,l)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ke(e){const t=x();if(!t.length)return;const o=e.target;if(o){const r=o.nodeType===1?o:o.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const l=S();if(e.target&&l.length)for(let r=0;r<l.length;r++){const s=l[r],i=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&s.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const s=e.addedNodes[r];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)s.matches&&s.matches(n.query)&&g(s,n);else if(s.matches&&s.matches(n.query)&&g(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let u=0;u<a.length;u++)g(a[u],n)}}n.onInit&&n.onInit(s)}}}for(let r=0;r<e.removedNodes.length;r++){const s=e.removedNodes[r];if(s.nodeType===1){const i=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!i)s.matches&&s.matches(a)&&E(s,n);else if(s.matches&&s.matches(a)&&E(s,n),s.querySelectorAll){const u=s.querySelectorAll(a);for(let d=0;d<u.length;d++)E(u[d],n)}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,y(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const l=t[o];if(l.type==="childList")try{ke(l)}catch(r){console.error("[ln-core] lifecycle handler failed",l.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function _e(e){x().push(e),e.onSubtreeChange&&e.query&&S().push(e),z()}function G(e,t,o,l,r={}){const s=r.extraAttributes||[],i=r.onAttributeChange||null,c=r.onSubtreeChange||null,n=r.onInit||null,a=r.onAttrChange||null,u=r.effects||null,d=r.attributes||null,f=d?pe(d):u,h=d?new Set(Object.keys(d)):null,w=r.persist||null;function p(F){const b=F||document.body;if(J(b,e,t,o),d&&q())for(const m in d){const Re=d[m],D=Array.from(b.querySelectorAll("["+m+"]"));b.matches&&b.matches("["+m+"]")&&D.push(b);for(let I=0;I<D.length;I++){const T=D[I];A(T)&&Q(Re,T.getAttribute(m),m,l,T)}}n&&n(b)}const O=[];if(e.indexOf("[")!==-1){const F=/\[([\w-]+)/g;let b;for(;(b=F.exec(e))!==null;)O.push(b[1])}else O.push(e);ye({selector:e,attribute:t,componentTag:l,attributes:d,ComponentFn:o,onInit:n,observed:O.concat(s),onAttributeChange:i,onAttrChange:a,effects:f,declared:h,persist:w}),ve();const qe=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Y=r.subtreeQuery||(qe?e:"["+e+"]"),Z={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:Y};x().push(Z),c&&Y&&S().push(Z),z(),window[t]=p,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=_e);function ee(){me()>0?Ce(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee(),p}function X(e){return(e||"").replace(/^#/,"")}function L(e){const t=e===void 0?location.hash:e,o={},l=X(t);if(!l)return o;const r=l.split("&");for(let s=0;s<r.length;s++){const i=r[s];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,a=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(a)}catch{o[n]=a}}return o}function xe(e){if(!e)return null;const t=L();return e in t?t[e]:null}function Se(e,t){if(!e)return;const o=L();t==null?delete o[e]:o[e]=String(t);const r=Object.keys(o).map(function(s){const i=o[s];return i===""?s:s+":"+encodeURIComponent(i)}).join("&");X(location.hash)!==r&&(location.hash=r)}function Ee(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Le(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const l=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return l?t?l+"-"+t:l:t||null}function Oe(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 De(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ie(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),l=e.slice(t+1),r=l?l.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:o,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=L,window.lnCore.hashGet=xe,window.lnCore.hashSet=Se,window.lnCore.hashLinkClick=Ee,window.lnCore.resolveHashNamespace=Le,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Fe,window.lnCore.hashFilterEncode=De,window.lnCore.hashFilterDecode=Ie);function Te(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Te),(function(){const e="data-ln-picklist",t="lnPicklist",o="data-ln-picklist-list",l="data-ln-picklist-max";if(window[t]!==void 0)return;const r={"data-ln-picklist":{type:"enum",values:["enabled","disabled"],fallback:"enabled",effect:c,description:"Controls enabled/disabled state of the dual-list picklist"},"data-ln-picklist-max":{type:"integer",fallback:1/0,min:1,effect:n,description:"Maximum selectable items in the selected list"},"data-ln-picklist-list":{type:"enum",values:["available","selected"],description:"Role marker for available or selected picklist columns"}};function s(a){if(this.dom=a,this.isEnabled=a.getAttribute(e)!=="disabled",this.max=i(a),this.available=a.querySelector("["+o+'="available"]'),this.selected=a.querySelector("["+o+'="selected"]'),!this.available||!this.selected)return console.warn("[ln-picklist] requires both ["+o+'="available"] and ['+o+'="selected"]',a),this;this._onChange=this._onChange.bind(this),a.addEventListener("change",this._onChange),this._initial=[];for(const u of[this.available,this.selected])for(const d of u.children)this._initial.push(d);return this.sync(),this._form=a.closest("form"),this._form&&(this._onFormReset=this._onFormReset.bind(this),this._form.addEventListener("reset",this._onFormReset)),this}s.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._onChange&&this.dom.removeEventListener("change",this._onChange),this._form&&this._form.removeEventListener("reset",this._onFormReset),delete this.dom[t])},s.prototype.enable=function(){this.dom.setAttribute(e,"")},s.prototype.disable=function(){this.dom.setAttribute(e,"disabled")},s.prototype.sync=function(){if(!this.available||!this.selected)return;const a=Array.from(this.available.children).concat(Array.from(this.selected.children));for(let d=0;d<a.length;d++)this._initial.includes(a[d])||this._initial.push(a[d]);let u=0;for(let d=0;d<this._initial.length;d++){const f=this._initial[d];if(!f.isConnected)continue;const h=f.querySelector('input[type="checkbox"]');if(!h)continue;let w;h.checked?this.max===null||u<this.max?(w=this.selected,u++):(h.checked=!1,w=this.available):w=this.available,w.appendChild(f)}},s.prototype._onFormReset=function(a){const u=this;setTimeout(function(){u._destroyed||a.defaultPrevented||u.sync()},0)},s.prototype._onChange=function(a){const u=a.target.closest('input[type="checkbox"]');if(!u)return;const d=u.closest("li");if(!d)return;const f=d.parentElement;if(f!==this.available&&f!==this.selected)return;if(!this.isEnabled){u.checked=!u.checked;return}const h=u.checked?this.selected:this.available;if(f===h)return;if(h===this.selected&&this.max!==null&&this.selected.children.length>=this.max){u.checked=!u.checked,C(this.dom,"ln-picklist:max-reached",{max:this.max,item:d,checkbox:u,count:this.selected.children.length});return}const w={item:d,from:f,to:h,checkbox:u};if(te(this.dom,"ln-picklist:before-move",w).defaultPrevented){u.checked=!u.checked;return}const p=document.activeElement===u;h.appendChild(d),p&&u.focus(),C(this.dom,"ln-picklist:move",w)};function i(a){const u=a.getAttribute(l);if(u===null||u==="")return null;const d=parseInt(u,10);return isNaN(d)||d<0?null:d}function c(a){const u=a[t];if(!u)return;const d=a.getAttribute(e)!=="disabled";d!==u.isEnabled&&(u.isEnabled=d,C(a,d?"ln-picklist:enabled":"ln-picklist:disabled",{target:a}))}function n(a){const u=a[t];u&&(u.max=i(a))}G(e,t,s,"ln-picklist",{attributes:r})})()})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function N(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function 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 r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!x(r))return}e.apply(console,t)}}function E(e,t,i){const r=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function B(e,t,i){const r=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r);const o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:r});return e.dispatchEvent(o),o}function k(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){k(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function oe(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ie(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function re(e,t){const i=!!(t&&t.typed),r=t&&t.exclude,o={},c=e.elements,s={};if(i)for(let l=0;l<c.length;l++){const n=c[l];n.name&&n.type==="checkbox"&&!n.disabled&&(s[n.name]=(s[n.name]||0)+1)}for(let l=0;l<c.length;l++){const n=c[l];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")i&&s[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&o[n.name].push(n.options[u].value)}else if(i&&n.type==="hidden")o[n.name]=n.value;else if(i&&(n.type==="number"||n.type==="range")){const u=Number(n.value);o[n.name]=n.value===""||isNaN(u)?null:u}else o[n.name]=n.value}return o}function se(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function le(e,t){const i=e.elements,r=[],o={};for(let c=0;c<i.length;c++){const s=i[c];s.name&&s.type==="checkbox"&&(o[s.name]=(o[s.name]||0)+1)}for(let c=0;c<i.length;c++){const s=i[c];if(s.type==="file"||s.type==="submit"||s.type==="button")continue;const l=s.getAttribute("data-ln-fill-as")||s.name;if(!l||!(l in t))continue;const n=t[l];if(s.type==="checkbox"){if(Array.isArray(n))s.checked=n.indexOf(s.value)!==-1;else if(o[s.name]>1){const u=String(n).split(",").map(function(f){return f.trim()});s.checked=u.indexOf(s.value)!==-1}else s.checked=se(n);r.push(s)}else if(s.type==="radio")s.checked=s.value===String(n),r.push(s);else if(s.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<s.options.length;u++)s.options[u].selected=n.indexOf(s.options[u].value)!==-1;r.push(s)}else s.value=n,s.tagName==="SELECT"&&n!=null&&s.setAttribute("data-ln-value",n),r.push(s)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=le,window.lnCore.serializeForm=re,window.lnCore.resolveFormMethod=ie);const M={};function ce(e,t){M[e]=t}function ue(e){return M[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ce,window.lnCore.getDataMapper=ue);function ae(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){E(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const j={};function de(e,t){if(!e||typeof t!="object")return;const i=e.toLowerCase().split("-")[0];j[i]=t}function fe(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return j[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=de,window.lnCore.getLocaleFallback=fe,window.lnCore.ensureLocaleObserver=ae);const S={};function pe(e,t){S[e]||(S[e]=document.querySelector('[data-ln-template="'+e+'"]'));const i=S[e];return i?i.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const i=e.querySelectorAll("[data-ln-field]");for(let s=0;s<i.length;s++){const l=i[s],n=l.getAttribute("data-ln-field");t[n]!=null&&(l.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const l=r[s],n=l.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const f=n[u].trim().split(":");if(f.length!==2)continue;const p=f[0].trim(),a=f[1].trim();t[a]!=null&&l.setAttribute(p,t[a])}}const o=e.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const l=o[s],n=l.getAttribute("data-ln-show");n in t&&l.classList.toggle("hidden",!t[n])}const c=e.querySelectorAll("[data-ln-class]");for(let s=0;s<c.length;s++){const l=c[s],n=l.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const f=n[u].trim().split(":");if(f.length!==2)continue;const p=f[0].trim(),a=f[1].trim();a in t&&l.classList.toggle(p,!!t[a])}}return e}function he(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const i=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<i.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[r],t??null),i[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)W(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let i=0;i<t.length;i++)t[i].textContent=""}})));function P(e,t){if(!e||!t)return e;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){const c=i.currentNode;c.textContent.indexOf("{{")!==-1&&(c.textContent=c.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,l){return t[l]!==void 0?t[l]:""}))}const r=function(c,s){return t[s]!==void 0?t[s]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let c=0;c<o.length;c++){const s=o[c],l=s.attributes;for(let n=0;n<l.length;n++){const u=l[n];u.value.indexOf("{{")!==-1&&s.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ge(e,t,i,r,o,c){const s={};for(let n=0;n<e.children.length;n++){const u=e.children[n],f=u.getAttribute("data-ln-render-key");f&&(s[f]=u)}const l=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],f=String(r(u));let p=s[f];if(p)o(p,u,n);else{const a=pe(i,c);if(!a||(P(a,u),p=a.firstElementChild,!p))continue;p.setAttribute("data-ln-render-key",f),o(p,u,n)}l.appendChild(p)}e.textContent="",e.appendChild(l)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=P,window.lnCore.fill=W,window.lnCore.lnFill=he,window.lnCore.renderList=ge);function O(e,t,i){const r=e.getAttribute(t);return r===null?i:r}function H(e,t,i){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?i:r}function V(e,t,i=!1){const r=e.getAttribute(t);if(r===null)return!!i;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function U(e,t){return(e.getAttribute(t)||"").split(",").map(i=>i.trim()).filter(Boolean)}const L=new Map;function K(e,t){const i=(e?e.join("|"):"")+"::"+t;if(L.has(i))return L.get(i);const r=new Set(e||[]),o=function(c,s){const l=c.getAttribute(s);return l!==null&&r.has(l)?l:t};return L.set(i,o),o}function Q(e,t,i){const r=parseFloat(e.getAttribute(t));return isNaN(r)?i:r}function z(e,t,i){const r=e.getAttribute(t);if(!r)return i;try{return JSON.parse(r)}catch{return i}}function J(e,t,i,r,o){if(!e||t===null)return!0;const c=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const l=n=>{o?console.warn(n,o):console.warn(n)};if(s==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(l(`[${c}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const n=e.values||[];return n.includes(t)?!0:(l(`[${c}] Invalid value "${t}" for attribute "${i}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return l(`[${c}] Invalid integer "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(l(`[${c}] Value ${n} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(l(`[${c}] Value ${n} for attribute "${i}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(l(`[${c}] Invalid float "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(n){return l(`[${c}] Invalid JSON for attribute "${i}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function we(e,t,i){for(const r in i){const[o,c,s]=i[r];Object.defineProperty(e,r,{get:function(){return o(t,c,s)},enumerable:!0,configurable:!0})}return e}function be(e){const t={};for(const i in e){const r=e[i];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=K(r.values,r.fallback);break;case"integer":o=H;break;case"float":o=Q;break;case"boolean":o=V;break;case"list":o=U;break;case"json":o=z;break;case"string":default:o=O;break}o||(o=O),t[r.prop]=[o,i,r.fallback]}return t}function me(e){const t={};for(const i in e){const r=e[i];r&&r.effect&&(t[i]=r.effect)}return Object.keys(t).length?t:null}function ye(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const i in e.effects)t.add(i);if(e.onAttrChange&&e.declared)for(const i of e.declared)t.add(i);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=we,window.lnCore.attrSpec=be,window.lnCore.attrStr=O,window.lnCore.attrInt=H,window.lnCore.attrBool=V,window.lnCore.attrList=U,window.lnCore.attrEnum=K,window.lnCore.attrFloat=Q,window.lnCore.attrJson=z);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(i){console.error("["+t.attribute+"] init failed",e,i)}}}function G(e,t,i,r){if(e.nodeType!==1)return;const c=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s={selector:t,attribute:i,ComponentFn:r};if(e.matches&&e.matches(c)&&_(e,s),e.querySelectorAll){const l=e.querySelectorAll(c);for(let n=0;n<l.length;n++)_(l[n],s)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function Ce(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function ve(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function X(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Ae(e){const t=X(),i=e.observed||[];for(let r=0;r<i.length;r++){const o=i[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(c=>c.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=ye(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function Y(e,t,i,r){for(let o=0;o<e.length;o++){const c=e[o];if(!t[c.attribute])continue;const s=c.effects&&c.effects[i];s?s(t,i,r):c.onAttrChange&&(!c.declared||c.declared.has(i))&&c.onAttrChange(t,i,r)}}function _e(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,r=X(),o=r.byAttr.get(t),c=N()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!i&&!o&&!c)return;const s=e.target;if(e.oldValue!==s.getAttribute(t)){if(c&&x(s)){const l=r.byDeclaredAttr.get(t),n=s.getAttribute(t);for(let u=0;u<l.length;u++)J(l[u].spec,n,t,l[u].componentTag,s)}if(window.lnCore._debugSink&&(i||o)&&window.lnCore._debugSink("attr",t,s,{oldValue:e.oldValue,newValue:s.getAttribute(t)}),i){const l=r.byReactive.get(t);l&&Y(l,s,t,e.oldValue),r.reactiveWildcard.length&&Y(r.reactiveWildcard,s,t,e.oldValue)}if(o)for(let l=0;l<o.length;l++){const n=o[l];if(n.handler){n.handler(s,t,e.oldValue);continue}n.onAttributeChange&&s[n.attribute]?n.onAttributeChange(s,t):(G(s,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(s))}}}function ke(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++)try{_e(t[i])}catch(r){console.error("[ln-core] mutation handler failed",t[i].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function T(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function q(e,t){if(!document.contains(e))if(t.attribute){const i=e[t.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function xe(e){const t=T();if(!t.length)return;const i=e.target;if(i){const r=i.nodeType===1?i:i.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let r=0;r<t.length;r++){const o=t[r];if(o.onSubtreeChange&&o.query){const c=o.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&&o.onSubtreeChange(s,e)}}for(let r=0;r<e.addedNodes.length;r++){const o=e.addedNodes[r];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let s=0;s<t.length;s++){const l=t[s];if(l.selector&&l.attribute&&l.ComponentFn){if(!c)o.matches&&o.matches(l.query)&&_(o,l);else if(o.matches&&o.matches(l.query)&&_(o,l),o.querySelectorAll){const n=o.querySelectorAll(l.query);for(let u=0;u<n.length;u++)_(n[u],l)}}l.onInit&&l.onInit(o)}}}for(let r=0;r<e.removedNodes.length;r++){const o=e.removedNodes[r];if(o.nodeType===1){const c=!!(o.firstElementChild||o.children&&o.children.length);for(let s=0;s<t.length;s++){const l=t[s],n=l.query;if(n){if(!c)o.matches&&o.matches(n)&&q(o,l);else if(o.matches&&o.matches(n)&&q(o,l),o.querySelectorAll){const u=o.querySelectorAll(n);for(let f=0;f<u.length;f++)q(u[f],l)}}}}}}function Z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++){const r=t[i];if(r.type==="childList")try{xe(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ee(e){T().push(e),Z()}function D(e,t,i,r,o={}){const c=o.extraAttributes||[],s=o.onAttributeChange||null,l=o.onSubtreeChange||null,n=o.onInit||null,u=o.onAttrChange||null,f=o.effects||null,p=o.attributes||null,a=p?me(p):f,h=p?new Set(Object.keys(p)):null,g=o.persist||null;function b(m){const y=m||document.body;if(G(y,e,t,i),p&&N())for(const A in p){const $e=p[A],F=Array.from(y.querySelectorAll("["+A+"]"));y.matches&&y.matches("["+A+"]")&&F.push(y);for(let R=0;R<F.length;R++){const $=F[R];x($)&&J($e,$.getAttribute(A),A,r,$)}}n&&n(y)}const d=[];if(e.indexOf("[")!==-1){const m=/\[([\w-]+)/g;let y;for(;(y=m.exec(e))!==null;)d.push(y[1])}else d.push(e);Ae({selector:e,attribute:t,componentTag:r,attributes:p,ComponentFn:i,onInit:n,observed:d.concat(c),onAttributeChange:s,onAttrChange:u,effects:a,declared:h,persist:g}),ke();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,v=o.subtreeQuery||(C?e:"["+e+"]");T().push({selector:e,attribute:t,ComponentFn:i,onInit:n,onSubtreeChange:l,query:v}),Z(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=D,window.lnCore.observeLifecycle=Ee);function w(){Ce()>0?ve(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",w):w(),b}function ee(e){return(e||"").replace(/^#/,"")}function I(e){const t=e===void 0?location.hash:e,i={},r=ee(t);if(!r)return i;const o=r.split("&");for(let c=0;c<o.length;c++){const s=o[c];if(!s)continue;const l=s.indexOf(":"),n=l>-1?s.slice(0,l):s,u=l>-1?s.slice(l+1):"";if(n)try{i[n]=decodeURIComponent(u)}catch{i[n]=u}}return i}function Se(e){if(!e)return null;const t=I();return e in t?t[e]:null}function Oe(e,t){if(!e)return;const i=I();t==null?delete i[e]:i[e]=String(t);const o=Object.keys(i).map(function(c){const s=i[c];return s===""?c:c+":"+encodeURIComponent(s)}).join("&");ee(location.hash)!==o&&(location.hash=o)}function Le(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function Te(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const i=e.getAttribute("data-ln-hash");if(i&&i.trim()!=="")return i.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function qe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function De(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Ie(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Fe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const i=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(c){try{return decodeURIComponent(c)}catch{return c}}).filter(Boolean):[];return{key:i,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=I,window.lnCore.hashGet=Se,window.lnCore.hashSet=Oe,window.lnCore.hashLinkClick=Le,window.lnCore.resolveHashNamespace=Te,window.lnCore.hashSortEncode=qe,window.lnCore.hashSortDecode=De,window.lnCore.hashFilterEncode=Ie,window.lnCore.hashFilterDecode=Fe);function te(e,t,i,r){const o=r,c=window.innerWidth,s=window.innerHeight,l=t.width,n=t.height,u=(i||"bottom").split("-"),f=u[0],p=u[1]==="start"||u[1]==="end"?u[1]:"center",a={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},h=a[f]||a.bottom;function g(w){return w==="top"||w==="bottom"?p==="start"?e.left:p==="end"?e.right-l:e.left+(e.width-l)/2:p==="start"?e.top:p==="end"?e.bottom-n:e.top+(e.height-n)/2}function b(w){let m,y,A=!0;return w==="top"?(m=e.top-o-n,y=g(w),m<0&&(A=!1)):w==="bottom"?(m=e.bottom+o,y=g(w),m+n>s&&(A=!1)):w==="left"?(m=g(w),y=e.left-o-l,y<0&&(A=!1)):(m=g(w),y=e.right+o,y+l>c&&(A=!1)),{top:m,left:y,side:w,fits:A}}let d=null;for(let w=0;w<h.length;w++){const m=b(h[w]);if(m.fits){d=m;break}}d||(d=b(h[0]));let C=d.top,v=d.left;return l>=c?v=0:(v<0&&(v=0),v+l>c&&(v=c-l)),n>=s?C=0:(C<0&&(C=0),C+n>s&&(C=s-n)),{top:C,left:v,placement:d.side}}function ne(e){if(!e)return{width:0,height:0};const t=e.style,i=t.visibility,r=t.display,o=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const c=e.offsetWidth,s=e.offsetHeight;return t.visibility=i,t.display=r,t.position=o,{width:c,height:s}}function Re(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Re),(function(){const e="data-ln-popover",t="lnPopover",i="data-ln-popover-for",r="data-ln-popover-position";if(window[t]!==void 0)return;const o={"data-ln-popover":{type:"enum",values:["open","close"],fallback:"close",effect:p,description:"Control state of the popover"},"data-ln-popover-for":{type:"string",description:"Target element ID that this trigger controls"},"data-ln-popover-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:"bottom",description:"Preferred positioning anchor"},"data-ln-popover-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"}},c=[];let s=null;function l(){s||(s=function(a){if(a.key!=="Escape"||c.length===0)return;c[c.length-1].close()},document.addEventListener("keydown",s))}function n(){c.length>0||s&&(document.removeEventListener("keydown",s),s=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open",this.trigger=null,this._previousFocus=null,this._boundDocClick=null,this._docClickTimeout=null,this._boundReposition=null;const h=this;return this._onRequestOpen=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.open(b)},this._onRequestClose=function(){h.close()},this._onRequestToggle=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.toggle(b)},this._onNativeToggle=function(g){g.newState==="closed"&&h.isOpen&&(h._applyClose(),h.dom.setAttribute(e,"closed"))},a.addEventListener("ln-popover:request-open",this._onRequestOpen),a.addEventListener("ln-popover:request-close",this._onRequestClose),a.addEventListener("ln-popover:request-toggle",this._onRequestToggle),a.addEventListener("toggle",this._onNativeToggle),a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.hasAttribute("role")||a.setAttribute("role","dialog"),a.hasAttribute("popover")||a.setAttribute("popover","manual"),this.isOpen&&this._applyOpen(null),this}u.prototype.open=function(a){this.isOpen||(this.trigger=a||null,this.dom.setAttribute(e,"open"))},u.prototype.close=function(){this.isOpen&&this.dom.setAttribute(e,"closed")},u.prototype.toggle=function(a){this.isOpen?this.close():this.open(a)},u.prototype._applyOpen=function(a){this.isOpen=!0,a&&(this.trigger=a),this._previousFocus=document.activeElement,typeof this.dom.showPopover=="function"&&this.dom.showPopover();const h=ne(this.dom);if(this.trigger){const C=this.trigger.getBoundingClientRect(),v=this.dom.getAttribute(r)||"bottom",w=te(C,h,v,8);this.dom.style.top=w.top+"px",this.dom.style.left=w.left+"px",this.dom.setAttribute("data-ln-popover-placement",w.placement),this.trigger.setAttribute("aria-expanded","true")}const g=this.dom.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.prototype.find.call(g,oe);b?b.focus():this.dom.focus();const d=this;this._boundDocClick=function(C){d.dom.contains(C.target)||d.trigger&&d.trigger.contains(C.target)||d.close()},d._docClickTimeout=setTimeout(function(){d._docClickTimeout=null,document.addEventListener("click",d._boundDocClick)},0),this._boundReposition=function(){if(!d.trigger)return;const C=d.trigger.getBoundingClientRect(),v=ne(d.dom),w=d.dom.getAttribute(r)||"bottom",m=te(C,v,w,8);d.dom.style.top=m.top+"px",d.dom.style.left=m.left+"px",d.dom.setAttribute("data-ln-popover-placement",m.placement)},window.addEventListener("scroll",this._boundReposition,{passive:!0,capture:!0}),window.addEventListener("resize",this._boundReposition),c.push(this),l(),E(this.dom,"ln-popover:open",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger})},u.prototype._applyClose=function(){this.isOpen=!1,this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null),this._boundReposition&&(window.removeEventListener("scroll",this._boundReposition,{capture:!0}),window.removeEventListener("resize",this._boundReposition),this._boundReposition=null),this.dom.style.top="",this.dom.style.left="",this.dom.removeAttribute("data-ln-popover-placement"),this.trigger&&this.trigger.setAttribute("aria-expanded","false"),typeof this.dom.hidePopover=="function"&&this.dom.matches(":popover-open")&&this.dom.hidePopover();const a=c.indexOf(this);a!==-1&&c.splice(a,1),n(),this._previousFocus&&this.trigger&&this._previousFocus===this.trigger?this.trigger.focus():this.trigger&&document.activeElement===document.body&&this.trigger.focus(),this._previousFocus=null,E(this.dom,"ln-popover:close",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger}),this.trigger=null},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-popover:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-popover:request-close",this._onRequestClose),this.dom.removeEventListener("ln-popover:request-toggle",this._onRequestToggle),this.dom.removeEventListener("toggle",this._onNativeToggle),this.isOpen&&this._applyClose(),delete this.dom[t])};function f(a){this.dom=a;const h=a.getAttribute(i);return a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",h),this._onClick=function(g){if(g.ctrlKey||g.metaKey||g.button===1)return;g.preventDefault();const b=document.getElementById(h);if(!b)return;b[t]&&(b[t].trigger=a);const d=b.getAttribute(e);b.setAttribute(e,d==="open"?"closed":"open")},a.addEventListener("click",this._onClick),this}f.prototype.destroy=function(){this.dom.removeEventListener("click",this._onClick),delete this.dom[t+"Trigger"]};function p(a){const h=a[t];if(!h)return;const b=a.getAttribute(e)==="open";if(b!==h.isOpen)if(b){if(B(a,"ln-popover:before-open",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"closed");return}h._applyOpen(h.trigger)}else{if(B(a,"ln-popover:before-close",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"open");return}h._applyClose()}}D(e,t,u,"ln-popover",{attributes:o}),D(i,t+"Trigger",f,"ln-popover-trigger")})()})();
|
|
1
|
+
(function(){"use strict";function M(){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 E(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(!E(s))return}e.apply(console,t)}}function S(e,t,o){const s=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:s}))}function j(e,t,o){const s=o||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,s);const r=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:s});return e.dispatchEvent(r),r}function x(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){x(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function re(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function se(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function le(e,t){const o=!!(t&&t.typed),s=t&&t.exclude,r={},l=e.elements,i={};if(o)for(let c=0;c<l.length;c++){const n=l[c];n.name&&n.type==="checkbox"&&!n.disabled&&(i[n.name]=(i[n.name]||0)+1)}for(let c=0;c<l.length;c++){const n=l[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(s&&n.matches&&n.matches(s)))if(n.type==="checkbox")o&&i[n.name]===1?r[n.name]=n.checked:(r[n.name]||(r[n.name]=[]),n.checked&&r[n.name].push(n.value));else if(n.type==="radio")n.checked&&(r[n.name]=n.value);else if(n.type==="select-multiple"){r[n.name]=[];for(let u=0;u<n.options.length;u++)n.options[u].selected&&r[n.name].push(n.options[u].value)}else if(o&&n.type==="hidden")r[n.name]=n.value;else if(o&&(n.type==="number"||n.type==="range")){const u=Number(n.value);r[n.name]=n.value===""||isNaN(u)?null:u}else r[n.name]=n.value}return r}function ce(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function ue(e,t){const o=e.elements,s=[],r={};for(let l=0;l<o.length;l++){const i=o[l];i.name&&i.type==="checkbox"&&(r[i.name]=(r[i.name]||0)+1)}for(let l=0;l<o.length;l++){const i=o[l];if(i.type==="file"||i.type==="submit"||i.type==="button")continue;const c=i.getAttribute("data-ln-fill-as")||i.name;if(!c||!(c in t))continue;const n=t[c];if(i.type==="checkbox"){if(Array.isArray(n))i.checked=n.indexOf(i.value)!==-1;else if(r[i.name]>1){const u=String(n).split(",").map(function(p){return p.trim()});i.checked=u.indexOf(i.value)!==-1}else i.checked=ce(n);s.push(i)}else if(i.type==="radio")i.checked=i.value===String(n),s.push(i);else if(i.type==="select-multiple"){if(Array.isArray(n))for(let u=0;u<i.options.length;u++)i.options[u].selected=n.indexOf(i.options[u].value)!==-1;s.push(i)}else i.value=n,i.tagName==="SELECT"&&n!=null&&i.setAttribute("data-ln-value",n),s.push(i)}return s}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=ue,window.lnCore.serializeForm=le,window.lnCore.resolveFormMethod=se);const W={};function ae(e,t){W[e]=t}function de(e){return W[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ae,window.lnCore.getDataMapper=de);function fe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,x(function(){new MutationObserver(function(){S(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const P={};function pe(e,t){if(!e||typeof t!="object")return;const o=e.toLowerCase().split("-")[0];P[o]=t}function he(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return P[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=pe,window.lnCore.getLocaleFallback=he,window.lnCore.ensureLocaleObserver=fe);const O={};function ge(e,t){O[e]||(O[e]=document.querySelector('[data-ln-template="'+e+'"]'));const o=O[e];return o?o.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function H(e,t){if(!e||!t)return e;const o=e.querySelectorAll("[data-ln-field]");for(let i=0;i<o.length;i++){const c=o[i],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const s=e.querySelectorAll("[data-ln-attr]");for(let i=0;i<s.length;i++){const c=s[i],n=c.getAttribute("data-ln-attr").split(",");for(let u=0;u<n.length;u++){const p=n[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),a=p[1].trim();t[a]!=null&&c.setAttribute(f,t[a])}}const r=e.querySelectorAll("[data-ln-show]");for(let i=0;i<r.length;i++){const c=r[i],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const l=e.querySelectorAll("[data-ln-class]");for(let i=0;i<l.length;i++){const c=l[i],n=c.getAttribute("data-ln-class").split(",");for(let u=0;u<n.length;u++){const p=n[u].trim().split(":");if(p.length!==2)continue;const f=p[0].trim(),a=p[1].trim();a in t&&c.classList.toggle(f,!!t[a])}}return e}function we(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const o=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let s=0;s<o.length;s++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",o[s],t??null),o[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)H(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let o=0;o<t.length;o++)t[o].textContent=""}})));function V(e,t){if(!e||!t)return e;const o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;o.nextNode();){const l=o.currentNode;l.textContent.indexOf("{{")!==-1&&(l.textContent=l.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(i,c){return t[c]!==void 0?t[c]:""}))}const s=function(l,i){return t[i]!==void 0?t[i]:""},r=Array.from(e.querySelectorAll("*"));e.nodeType===1&&r.push(e);for(let l=0;l<r.length;l++){const i=r[l],c=i.attributes;for(let n=0;n<c.length;n++){const u=c[n];u.value.indexOf("{{")!==-1&&i.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,s))}}return e}function be(e,t,o,s,r,l){const i={};for(let n=0;n<e.children.length;n++){const u=e.children[n],p=u.getAttribute("data-ln-render-key");p&&(i[p]=u)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const u=t[n],p=String(s(u));let f=i[p];if(f)r(f,u,n);else{const a=ge(o,l);if(!a||(V(a,u),f=a.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",p),r(f,u,n)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=V,window.lnCore.fill=H,window.lnCore.lnFill=we,window.lnCore.renderList=be);function L(e,t,o){const s=e.getAttribute(t);return s===null?o:s}function U(e,t,o){const s=parseInt(e.getAttribute(t),10);return isNaN(s)?o:s}function K(e,t,o=!1){const s=e.getAttribute(t);if(s===null)return!!o;const r=s.trim().toLowerCase();return!(r==="false"||r==="0")}function Q(e,t){return(e.getAttribute(t)||"").split(",").map(o=>o.trim()).filter(Boolean)}const T=new Map;function z(e,t){const o=(e?e.join("|"):"")+"::"+t;if(T.has(o))return T.get(o);const s=new Set(e||[]),r=function(l,i){const c=l.getAttribute(i);return c!==null&&s.has(c)?c:t};return T.set(o,r),r}function J(e,t,o){const s=parseFloat(e.getAttribute(t));return isNaN(s)?o:s}function G(e,t,o){const s=e.getAttribute(t);if(!s)return o;try{return JSON.parse(s)}catch{return o}}function X(e,t,o,s,r){if(!e||t===null)return!0;const l=s||"ln-component",i=e.type;if(i==="trigger"||i==="marker"||i==="string"||i==="list"||!i||t===""&&e.fallback!==void 0)return!0;const c=n=>{r?console.warn(n,r):console.warn(n)};if(i==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${l}] Invalid value "${t}" for boolean attribute "${o}". Allowed: "true", "false", or presence-only.`),!1):!0}if(i==="enum"){const n=e.values||[];return n.includes(t)?!0:(c(`[${l}] Invalid value "${t}" for attribute "${o}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(i==="integer"){if(!/^-?\d+$/.test(t))return c(`[${l}] Invalid integer "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${l}] Value ${n} for attribute "${o}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${l}] Value ${n} for attribute "${o}" is greater than max (${e.max}).`),!1):!0}if(i==="float")return isNaN(Number(t))?(c(`[${l}] Invalid float "${t}" for attribute "${o}". Fallback: ${e.fallback}.`),!1):!0;if(i==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${l}] Invalid JSON for attribute "${o}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function me(e,t,o){for(const s in o){const[r,l,i]=o[s];Object.defineProperty(e,s,{get:function(){return r(t,l,i)},enumerable:!0,configurable:!0})}return e}function ye(e){const t={};for(const o in e){const s=e[o];if(!s||!s.prop)continue;let r=s.read;if(!r&&s.type)switch(s.type){case"enum":r=z(s.values,s.fallback);break;case"integer":r=U;break;case"float":r=J;break;case"boolean":r=K;break;case"list":r=Q;break;case"json":r=G;break;case"string":default:r=L;break}r||(r=L),t[s.prop]=[r,o,s.fallback]}return t}function Ce(e){const t={};for(const o in e){const s=e[o];s&&s.effect&&(t[o]=s.effect)}return Object.keys(t).length?t:null}function ve(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const o in e.effects)t.add(o);if(e.onAttrChange&&e.declared)for(const o of e.declared)t.add(o);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=me,window.lnCore.attrSpec=ye,window.lnCore.attrStr=L,window.lnCore.attrInt=U,window.lnCore.attrBool=K,window.lnCore.attrList=Q,window.lnCore.attrEnum=z,window.lnCore.attrFloat=J,window.lnCore.attrJson=G);function A(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(o){console.error("["+t.attribute+"] init failed",e,o)}}}function Y(e,t,o,s){if(e.nodeType!==1)return;const l=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",i={selector:t,attribute:o,ComponentFn:s};if(e.matches&&e.matches(l)&&A(e,i),e.querySelectorAll){const c=e.querySelectorAll(l);for(let n=0;n<c.length;n++)A(c[n],i)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function _e(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function Ae(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function 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 ke(e){const t=Z(),o=e.observed||[];for(let s=0;s<o.length;s++){const r=o[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(l=>l.componentTag===e.componentTag)||r.push({spec:e.attributes[s],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const s=ve(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 ee(e,t,o,s){for(let r=0;r<e.length;r++){const l=e[r];if(!t[l.attribute])continue;const i=l.effects&&l.effects[o];i?i(t,o,s):l.onAttrChange&&(!l.declared||l.declared.has(o))&&l.onAttrChange(t,o,s)}}function xe(e){const t=e.attributeName,o=t.indexOf("data-ln-")===0,s=Z(),r=s.byAttr.get(t),l=M()&&s.byDeclaredAttr&&s.byDeclaredAttr.has(t);if(!o&&!r&&!l)return;const i=e.target;if(e.oldValue!==i.getAttribute(t)){if(l&&E(i)){const c=s.byDeclaredAttr.get(t),n=i.getAttribute(t);for(let u=0;u<c.length;u++)X(c[u].spec,n,t,c[u].componentTag,i)}if(window.lnCore._debugSink&&(o||r)&&window.lnCore._debugSink("attr",t,i,{oldValue:e.oldValue,newValue:i.getAttribute(t)}),o){const c=s.byReactive.get(t);c&&ee(c,i,t,e.oldValue),s.reactiveWildcard.length&&ee(s.reactiveWildcard,i,t,e.oldValue)}if(r)for(let c=0;c<r.length;c++){const n=r[c];if(n.handler){n.handler(i,t,e.oldValue);continue}n.onAttributeChange&&i[n.attribute]?n.onAttributeChange(i,t):(Y(i,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(i))}}}function Ee(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,x(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++)try{xe(t[o])}catch(s){console.error("[ln-core] mutation handler failed",t[o].target,s)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function R(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function q(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function D(e,t){if(!document.contains(e))if(t.attribute){const o=e[t.attribute];if(o&&typeof o.destroy=="function")try{o.destroy()}catch(s){console.error("["+t.attribute+"] destroy failed",e,s)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function Se(e){const t=R();if(!t.length)return;const o=e.target;if(o){const r=o.nodeType===1?o:o.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}const s=q();if(e.target&&s.length)for(let r=0;r<s.length;r++){const l=s[r],i=l.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(i)?e.target:e.target.closest?e.target.closest(i):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(i):null;c&&l.onSubtreeChange(c,e)}for(let r=0;r<e.addedNodes.length;r++){const l=e.addedNodes[r];if(l.nodeType===1){const i=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!i)l.matches&&l.matches(n.query)&&A(l,n);else if(l.matches&&l.matches(n.query)&&A(l,n),l.querySelectorAll){const u=l.querySelectorAll(n.query);for(let p=0;p<u.length;p++)A(u[p],n)}}n.onInit&&n.onInit(l)}}}for(let r=0;r<e.removedNodes.length;r++){const l=e.removedNodes[r];if(l.nodeType===1){const i=!!(l.firstElementChild||l.children&&l.children.length);for(let c=0;c<t.length;c++){const n=t[c],u=n.query;if(u){if(!i)l.matches&&l.matches(u)&&D(l,n);else if(l.matches&&l.matches(u)&&D(l,n),l.querySelectorAll){const p=l.querySelectorAll(u);for(let f=0;f<p.length;f++)D(p[f],n)}}}}}}function te(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,x(function(){new MutationObserver(function(t){for(let o=0;o<t.length;o++){const s=t[o];if(s.type==="childList")try{Se(s)}catch(r){console.error("[ln-core] lifecycle handler failed",s.target,r)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Oe(e){R().push(e),e.onSubtreeChange&&e.query&&q().push(e),te()}function I(e,t,o,s,r={}){const l=r.extraAttributes||[],i=r.onAttributeChange||null,c=r.onSubtreeChange||null,n=r.onInit||null,u=r.onAttrChange||null,p=r.effects||null,f=r.attributes||null,a=f?Ce(f):p,h=f?new Set(Object.keys(f)):null,g=r.persist||null;function b(v){const y=v||document.body;if(Y(y,e,t,o),f&&M())for(const k in f){const Be=f[k],$=Array.from(y.querySelectorAll("["+k+"]"));y.matches&&y.matches("["+k+"]")&&$.push(y);for(let N=0;N<$.length;N++){const B=$[N];E(B)&&X(Be,B.getAttribute(k),k,s,B)}}n&&n(y)}const d=[];if(e.indexOf("[")!==-1){const v=/\[([\w-]+)/g;let y;for(;(y=v.exec(e))!==null;)d.push(y[1])}else d.push(e);ke({selector:e,attribute:t,componentTag:s,attributes:f,ComponentFn:o,onInit:n,observed:d.concat(l),onAttributeChange:i,onAttrChange:u,effects:a,declared:h,persist:g}),Ee();const C=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,_=r.subtreeQuery||(C?e:"["+e+"]"),w={selector:e,attribute:t,ComponentFn:o,onInit:n,onSubtreeChange:c,query:_};R().push(w),c&&_&&q().push(w),te(),window[t]=b,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=I,window.lnCore.observeLifecycle=Oe);function m(){_e()>0?Ae(function(){b(document.body)}):b(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",m):m(),b}function ne(e){return(e||"").replace(/^#/,"")}function F(e){const t=e===void 0?location.hash:e,o={},s=ne(t);if(!s)return o;const r=s.split("&");for(let l=0;l<r.length;l++){const i=r[l];if(!i)continue;const c=i.indexOf(":"),n=c>-1?i.slice(0,c):i,u=c>-1?i.slice(c+1):"";if(n)try{o[n]=decodeURIComponent(u)}catch{o[n]=u}}return o}function Le(e){if(!e)return null;const t=F();return e in t?t[e]:null}function Te(e,t){if(!e)return;const o=F();t==null?delete o[e]:o[e]=String(t);const r=Object.keys(o).map(function(l){const i=o[l];return i===""?l:l+":"+encodeURIComponent(i)}).join("&");ne(location.hash)!==r&&(location.hash=r)}function Re(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function qe(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const o=e.getAttribute("data-ln-hash");if(o&&o.trim()!=="")return o.trim();const 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 De(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ie(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Fe(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function $e(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const o=e.slice(0,t),s=e.slice(t+1),r=s?s.split(",").map(function(l){try{return decodeURIComponent(l)}catch{return l}}).filter(Boolean):[];return{key:o,values:r}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=F,window.lnCore.hashGet=Le,window.lnCore.hashSet=Te,window.lnCore.hashLinkClick=Re,window.lnCore.resolveHashNamespace=qe,window.lnCore.hashSortEncode=De,window.lnCore.hashSortDecode=Ie,window.lnCore.hashFilterEncode=Fe,window.lnCore.hashFilterDecode=$e);function oe(e,t,o,s){const r=s,l=window.innerWidth,i=window.innerHeight,c=t.width,n=t.height,u=(o||"bottom").split("-"),p=u[0],f=u[1]==="start"||u[1]==="end"?u[1]:"center",a={top:["top","bottom","right","left"],bottom:["bottom","top","right","left"],left:["left","right","top","bottom"],right:["right","left","top","bottom"]},h=a[p]||a.bottom;function g(w){return w==="top"||w==="bottom"?f==="start"?e.left:f==="end"?e.right-c:e.left+(e.width-c)/2:f==="start"?e.top:f==="end"?e.bottom-n:e.top+(e.height-n)/2}function b(w){let m,v,y=!0;return w==="top"?(m=e.top-r-n,v=g(w),m<0&&(y=!1)):w==="bottom"?(m=e.bottom+r,v=g(w),m+n>i&&(y=!1)):w==="left"?(m=g(w),v=e.left-r-c,v<0&&(y=!1)):(m=g(w),v=e.right+r,v+c>l&&(y=!1)),{top:m,left:v,side:w,fits:y}}let d=null;for(let w=0;w<h.length;w++){const m=b(h[w]);if(m.fits){d=m;break}}d||(d=b(h[0]));let C=d.top,_=d.left;return c>=l?_=0:(_<0&&(_=0),_+c>l&&(_=l-c)),n>=i?C=0:(C<0&&(C=0),C+n>i&&(C=i-n)),{top:C,left:_,placement:d.side}}function ie(e){if(!e)return{width:0,height:0};const t=e.style,o=t.visibility,s=t.display,r=t.position;t.visibility="hidden",t.display="block",t.position="fixed";const l=e.offsetWidth,i=e.offsetHeight;return t.visibility=o,t.display=s,t.position=r,{width:l,height:i}}function Ne(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ne),(function(){const e="data-ln-popover",t="lnPopover",o="data-ln-popover-for",s="data-ln-popover-position";if(window[t]!==void 0)return;const r={"data-ln-popover":{type:"enum",values:["open","close"],fallback:"close",effect:f,description:"Control state of the popover"},"data-ln-popover-for":{type:"string",description:"Target element ID that this trigger controls"},"data-ln-popover-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:"bottom",description:"Preferred positioning anchor"},"data-ln-popover-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"}},l=[];let i=null;function c(){i||(i=function(a){if(a.key!=="Escape"||l.length===0)return;l[l.length-1].close()},document.addEventListener("keydown",i))}function n(){l.length>0||i&&(document.removeEventListener("keydown",i),i=null)}function u(a){this.dom=a,this.isOpen=a.getAttribute(e)==="open",this.trigger=null,this._previousFocus=null,this._boundDocClick=null,this._docClickTimeout=null,this._boundReposition=null;const h=this;return this._onRequestOpen=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.open(b)},this._onRequestClose=function(){h.close()},this._onRequestToggle=function(g){const b=g.detail&&g.detail.trigger?g.detail.trigger:null;h.toggle(b)},this._onNativeToggle=function(g){g.newState==="closed"&&h.isOpen&&(h._applyClose(),h.dom.setAttribute(e,"closed"))},a.addEventListener("ln-popover:request-open",this._onRequestOpen),a.addEventListener("ln-popover:request-close",this._onRequestClose),a.addEventListener("ln-popover:request-toggle",this._onRequestToggle),a.addEventListener("toggle",this._onNativeToggle),a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),a.hasAttribute("role")||a.setAttribute("role","dialog"),a.hasAttribute("popover")||a.setAttribute("popover","manual"),this.isOpen&&this._applyOpen(null),this}u.prototype.open=function(a){this.isOpen||(this.trigger=a||null,this.dom.setAttribute(e,"open"))},u.prototype.close=function(){this.isOpen&&this.dom.setAttribute(e,"closed")},u.prototype.toggle=function(a){this.isOpen?this.close():this.open(a)},u.prototype._applyOpen=function(a){this.isOpen=!0,a&&(this.trigger=a),this._previousFocus=document.activeElement,typeof this.dom.showPopover=="function"&&this.dom.showPopover();const h=ie(this.dom);if(this.trigger){const C=this.trigger.getBoundingClientRect(),_=this.dom.getAttribute(s)||"bottom",w=oe(C,h,_,8);this.dom.style.top=w.top+"px",this.dom.style.left=w.left+"px",this.dom.setAttribute("data-ln-popover-placement",w.placement),this.trigger.setAttribute("aria-expanded","true")}const g=this.dom.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'),b=Array.prototype.find.call(g,re);b?b.focus():this.dom.focus();const d=this;this._boundDocClick=function(C){d.dom.contains(C.target)||d.trigger&&d.trigger.contains(C.target)||d.close()},d._docClickTimeout=setTimeout(function(){d._docClickTimeout=null,document.addEventListener("click",d._boundDocClick)},0),this._repositionRaf=null,this._performReposition=function(){if(!d.trigger||!document.contains(d.dom))return;const C=d.trigger.getBoundingClientRect(),_=ie(d.dom),w=d.dom.getAttribute(s)||"bottom",m=oe(C,_,w,8),v=m.top+"px",y=m.left+"px";d.dom.style.top!==v&&(d.dom.style.top=v),d.dom.style.left!==y&&(d.dom.style.left=y),d.dom.getAttribute("data-ln-popover-placement")!==m.placement&&d.dom.setAttribute("data-ln-popover-placement",m.placement)},this._boundReposition=function(){d._repositionRaf||(d._repositionRaf=requestAnimationFrame(function(){d._repositionRaf=null,d._performReposition()}))},window.addEventListener("scroll",this._boundReposition,{passive:!0,capture:!0}),window.addEventListener("resize",this._boundReposition),l.push(this),c(),S(this.dom,"ln-popover:open",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger})},u.prototype._applyClose=function(){this.isOpen=!1,this._repositionRaf&&(cancelAnimationFrame(this._repositionRaf),this._repositionRaf=null),this._docClickTimeout&&(clearTimeout(this._docClickTimeout),this._docClickTimeout=null),this._boundDocClick&&(document.removeEventListener("click",this._boundDocClick),this._boundDocClick=null),this._boundReposition&&(window.removeEventListener("scroll",this._boundReposition,{capture:!0}),window.removeEventListener("resize",this._boundReposition),this._boundReposition=null),this.dom.style.top="",this.dom.style.left="",this.dom.removeAttribute("data-ln-popover-placement"),this.trigger&&this.trigger.setAttribute("aria-expanded","false"),typeof this.dom.hidePopover=="function"&&this.dom.matches(":popover-open")&&this.dom.hidePopover();const a=l.indexOf(this);a!==-1&&l.splice(a,1),n(),this._previousFocus&&this.trigger&&this._previousFocus===this.trigger?this.trigger.focus():this.trigger&&document.activeElement===document.body&&this.trigger.focus(),this._previousFocus=null,S(this.dom,"ln-popover:close",{popoverId:this.dom.id,target:this.dom,trigger:this.trigger}),this.trigger=null},u.prototype.destroy=function(){this.dom[t]&&(this.dom.removeEventListener("ln-popover:request-open",this._onRequestOpen),this.dom.removeEventListener("ln-popover:request-close",this._onRequestClose),this.dom.removeEventListener("ln-popover:request-toggle",this._onRequestToggle),this.dom.removeEventListener("toggle",this._onNativeToggle),this.isOpen&&this._applyClose(),delete this.dom[t])};function p(a){this.dom=a;const h=a.getAttribute(o);return a.setAttribute("aria-haspopup","dialog"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",h),this._onClick=function(g){if(g.ctrlKey||g.metaKey||g.button===1)return;g.preventDefault();const b=document.getElementById(h);if(!b)return;b[t]&&(b[t].trigger=a);const d=b.getAttribute(e);b.setAttribute(e,d==="open"?"closed":"open")},a.addEventListener("click",this._onClick),this}p.prototype.destroy=function(){this.dom.removeEventListener("click",this._onClick),delete this.dom[t+"Trigger"]};function f(a){const h=a[t];if(!h)return;const b=a.getAttribute(e)==="open";if(b!==h.isOpen)if(b){if(j(a,"ln-popover:before-open",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"closed");return}h._applyOpen(h.trigger)}else{if(j(a,"ln-popover:before-close",{popoverId:a.id,target:a,trigger:h.trigger}).defaultPrevented){a.setAttribute(e,"open");return}h._applyClose()}}I(e,t,u,"ln-popover",{attributes:r}),I(o,t+"Trigger",p,"ln-popover-trigger")})()})();
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
-
"component": "ln-popover",
|
|
4
|
-
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
-
"attributes": {
|
|
6
|
-
"data-ln-debug": {
|
|
7
|
-
"direction": null,
|
|
8
|
-
"sources": [
|
|
9
|
-
"ln-popover-dev.scss"
|
|
10
|
-
]
|
|
11
|
-
},
|
|
12
|
-
"data-ln-popover": {
|
|
13
|
-
"direction": "both",
|
|
14
|
-
"sources": [
|
|
15
|
-
"ln-popover-dev.scss",
|
|
16
|
-
"ln-popover.scss",
|
|
17
|
-
"src/ln-popover.js"
|
|
18
|
-
],
|
|
19
|
-
"type": "enum",
|
|
20
|
-
"values": [
|
|
21
|
-
"open",
|
|
22
|
-
"close"
|
|
23
|
-
],
|
|
24
|
-
"fallback": "close",
|
|
25
|
-
"description": "Control state of the popover"
|
|
26
|
-
},
|
|
27
|
-
"data-ln-popover-for": {
|
|
28
|
-
"direction": "author",
|
|
29
|
-
"sources": [
|
|
30
|
-
"ln-popover-dev.scss",
|
|
31
|
-
"src/ln-popover.js"
|
|
32
|
-
],
|
|
33
|
-
"type": "string",
|
|
34
|
-
"description": "Target element ID that this trigger controls"
|
|
35
|
-
},
|
|
36
|
-
"data-ln-popover-placement": {
|
|
37
|
-
"direction": "
|
|
38
|
-
"sources": [
|
|
39
|
-
"src/ln-popover.js"
|
|
40
|
-
],
|
|
41
|
-
"type": "enum",
|
|
42
|
-
"values": [
|
|
43
|
-
"top",
|
|
44
|
-
"top-start",
|
|
45
|
-
"top-end",
|
|
46
|
-
"bottom",
|
|
47
|
-
"bottom-start",
|
|
48
|
-
"bottom-end",
|
|
49
|
-
"left",
|
|
50
|
-
"left-start",
|
|
51
|
-
"left-end",
|
|
52
|
-
"right",
|
|
53
|
-
"right-start",
|
|
54
|
-
"right-end"
|
|
55
|
-
],
|
|
56
|
-
"description": "Active calculated placement applied at runtime"
|
|
57
|
-
},
|
|
58
|
-
"data-ln-popover-position": {
|
|
59
|
-
"direction": "author",
|
|
60
|
-
"sources": [
|
|
61
|
-
"src/ln-popover.js"
|
|
62
|
-
],
|
|
63
|
-
"type": "enum",
|
|
64
|
-
"values": [
|
|
65
|
-
"top",
|
|
66
|
-
"top-start",
|
|
67
|
-
"top-end",
|
|
68
|
-
"bottom",
|
|
69
|
-
"bottom-start",
|
|
70
|
-
"bottom-end",
|
|
71
|
-
"left",
|
|
72
|
-
"left-start",
|
|
73
|
-
"left-end",
|
|
74
|
-
"right",
|
|
75
|
-
"right-start",
|
|
76
|
-
"right-end"
|
|
77
|
-
],
|
|
78
|
-
"fallback": "bottom",
|
|
79
|
-
"description": "Preferred positioning anchor"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$comment": "This file is partly generated. The $comment, component, generator, and each attribute's direction, sources, type, values, fallback, and description keys are owned by the generator and synchronized from JS source code. All other keys are preserved and safe to hand-author. Regenerate with `npm run sync:ln-schemas`.",
|
|
3
|
+
"component": "ln-popover",
|
|
4
|
+
"generator": "scripts/sync-ln-schemas.mjs",
|
|
5
|
+
"attributes": {
|
|
6
|
+
"data-ln-debug": {
|
|
7
|
+
"direction": null,
|
|
8
|
+
"sources": [
|
|
9
|
+
"ln-popover-dev.scss"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"data-ln-popover": {
|
|
13
|
+
"direction": "both",
|
|
14
|
+
"sources": [
|
|
15
|
+
"ln-popover-dev.scss",
|
|
16
|
+
"ln-popover.scss",
|
|
17
|
+
"src/ln-popover.js"
|
|
18
|
+
],
|
|
19
|
+
"type": "enum",
|
|
20
|
+
"values": [
|
|
21
|
+
"open",
|
|
22
|
+
"close"
|
|
23
|
+
],
|
|
24
|
+
"fallback": "close",
|
|
25
|
+
"description": "Control state of the popover"
|
|
26
|
+
},
|
|
27
|
+
"data-ln-popover-for": {
|
|
28
|
+
"direction": "author",
|
|
29
|
+
"sources": [
|
|
30
|
+
"ln-popover-dev.scss",
|
|
31
|
+
"src/ln-popover.js"
|
|
32
|
+
],
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Target element ID that this trigger controls"
|
|
35
|
+
},
|
|
36
|
+
"data-ln-popover-placement": {
|
|
37
|
+
"direction": "both",
|
|
38
|
+
"sources": [
|
|
39
|
+
"src/ln-popover.js"
|
|
40
|
+
],
|
|
41
|
+
"type": "enum",
|
|
42
|
+
"values": [
|
|
43
|
+
"top",
|
|
44
|
+
"top-start",
|
|
45
|
+
"top-end",
|
|
46
|
+
"bottom",
|
|
47
|
+
"bottom-start",
|
|
48
|
+
"bottom-end",
|
|
49
|
+
"left",
|
|
50
|
+
"left-start",
|
|
51
|
+
"left-end",
|
|
52
|
+
"right",
|
|
53
|
+
"right-start",
|
|
54
|
+
"right-end"
|
|
55
|
+
],
|
|
56
|
+
"description": "Active calculated placement applied at runtime"
|
|
57
|
+
},
|
|
58
|
+
"data-ln-popover-position": {
|
|
59
|
+
"direction": "author",
|
|
60
|
+
"sources": [
|
|
61
|
+
"src/ln-popover.js"
|
|
62
|
+
],
|
|
63
|
+
"type": "enum",
|
|
64
|
+
"values": [
|
|
65
|
+
"top",
|
|
66
|
+
"top-start",
|
|
67
|
+
"top-end",
|
|
68
|
+
"bottom",
|
|
69
|
+
"bottom-start",
|
|
70
|
+
"bottom-end",
|
|
71
|
+
"left",
|
|
72
|
+
"left-start",
|
|
73
|
+
"left-end",
|
|
74
|
+
"right",
|
|
75
|
+
"right-start",
|
|
76
|
+
"right-end"
|
|
77
|
+
],
|
|
78
|
+
"fallback": "bottom",
|
|
79
|
+
"description": "Preferred positioning anchor"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -168,15 +168,27 @@ import { dispatch, dispatchCancelable, computePlacement, measureHidden, isVisibl
|
|
|
168
168
|
}, 0);
|
|
169
169
|
|
|
170
170
|
// Reposition on scroll/resize while open.
|
|
171
|
-
this.
|
|
172
|
-
|
|
171
|
+
this._repositionRaf = null;
|
|
172
|
+
this._performReposition = function () {
|
|
173
|
+
if (!self.trigger || !document.contains(self.dom)) return;
|
|
173
174
|
const r = self.trigger.getBoundingClientRect();
|
|
174
175
|
const sz = measureHidden(self.dom);
|
|
175
176
|
const preferred = self.dom.getAttribute(POSITION_SELECTOR) || 'bottom';
|
|
176
177
|
const p = computePlacement(r, sz, preferred, 8);
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
self.dom.
|
|
178
|
+
const topStr = p.top + 'px';
|
|
179
|
+
const leftStr = p.left + 'px';
|
|
180
|
+
if (self.dom.style.top !== topStr) self.dom.style.top = topStr;
|
|
181
|
+
if (self.dom.style.left !== leftStr) self.dom.style.left = leftStr;
|
|
182
|
+
if (self.dom.getAttribute('data-ln-popover-placement') !== p.placement) {
|
|
183
|
+
self.dom.setAttribute('data-ln-popover-placement', p.placement);
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
this._boundReposition = function () {
|
|
187
|
+
if (self._repositionRaf) return;
|
|
188
|
+
self._repositionRaf = requestAnimationFrame(function () {
|
|
189
|
+
self._repositionRaf = null;
|
|
190
|
+
self._performReposition();
|
|
191
|
+
});
|
|
180
192
|
};
|
|
181
193
|
window.addEventListener('scroll', this._boundReposition, { passive: true, capture: true });
|
|
182
194
|
window.addEventListener('resize', this._boundReposition);
|
|
@@ -194,6 +206,11 @@ import { dispatch, dispatchCancelable, computePlacement, measureHidden, isVisibl
|
|
|
194
206
|
_component.prototype._applyClose = function () {
|
|
195
207
|
this.isOpen = false;
|
|
196
208
|
|
|
209
|
+
if (this._repositionRaf) {
|
|
210
|
+
cancelAnimationFrame(this._repositionRaf);
|
|
211
|
+
this._repositionRaf = null;
|
|
212
|
+
}
|
|
213
|
+
|
|
197
214
|
if (this._docClickTimeout) {
|
|
198
215
|
clearTimeout(this._docClickTimeout);
|
|
199
216
|
this._docClickTimeout = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(){"use strict";function D(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function m(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!m(r))return}e.apply(console,t)}}function F(e,t,i){const r=i||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Y(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function Z(e,t){const i=!!(t&&t.typed),r=t&&t.exclude,o={},a=e.elements,l={};if(i)for(let s=0;s<a.length;s++){const n=a[s];n.name&&n.type==="checkbox"&&!n.disabled&&(l[n.name]=(l[n.name]||0)+1)}for(let s=0;s<a.length;s++){const n=a[s];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(r&&n.matches&&n.matches(r)))if(n.type==="checkbox")i&&l[n.name]===1?o[n.name]=n.checked:(o[n.name]||(o[n.name]=[]),n.checked&&o[n.name].push(n.value));else if(n.type==="radio")n.checked&&(o[n.name]=n.value);else if(n.type==="select-multiple"){o[n.name]=[];for(let c=0;c<n.options.length;c++)n.options[c].selected&&o[n.name].push(n.options[c].value)}else if(i&&n.type==="hidden")o[n.name]=n.value;else if(i&&(n.type==="number"||n.type==="range")){const c=Number(n.value);o[n.name]=n.value===""||isNaN(c)?null:c}else o[n.name]=n.value}return o}function ee(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function te(e,t){const i=e.elements,r=[],o={};for(let a=0;a<i.length;a++){const l=i[a];l.name&&l.type==="checkbox"&&(o[l.name]=(o[l.name]||0)+1)}for(let a=0;a<i.length;a++){const l=i[a];if(l.type==="file"||l.type==="submit"||l.type==="button")continue;const s=l.getAttribute("data-ln-fill-as")||l.name;if(!s||!(s in t))continue;const n=t[s];if(l.type==="checkbox"){if(Array.isArray(n))l.checked=n.indexOf(l.value)!==-1;else if(o[l.name]>1){const c=String(n).split(",").map(function(d){return d.trim()});l.checked=c.indexOf(l.value)!==-1}else l.checked=ee(n);r.push(l)}else if(l.type==="radio")l.checked=l.value===String(n),r.push(l);else if(l.type==="select-multiple"){if(Array.isArray(n))for(let c=0;c<l.options.length;c++)l.options[c].selected=n.indexOf(l.options[c].value)!==-1;r.push(l)}else l.value=n,l.tagName==="SELECT"&&n!=null&&l.setAttribute("data-ln-value",n),r.push(l)}return r}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.populateForm=te,window.lnCore.serializeForm=Z,window.lnCore.resolveFormMethod=Y);const q={};function ne(e,t){q[e]=t}function re(e){return q[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ne,window.lnCore.getDataMapper=re);function oe(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){F(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const I={};function ie(e,t){if(!e||typeof t!="object")return;const i=e.toLowerCase().split("-")[0];I[i]=t}function le(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return I[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=ie,window.lnCore.getLocaleFallback=le,window.lnCore.ensureLocaleObserver=oe);const C={};function se(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const i=C[e];return i?i.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function $(e,t){if(!e||!t)return e;const i=e.querySelectorAll("[data-ln-field]");for(let l=0;l<i.length;l++){const s=i[l],n=s.getAttribute("data-ln-field");t[n]!=null&&(s.textContent=t[n])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const s=r[l],n=s.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 u=d[0].trim(),f=d[1].trim();t[f]!=null&&s.setAttribute(u,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const s=o[l],n=s.getAttribute("data-ln-show");n in t&&s.classList.toggle("hidden",!t[n])}const a=e.querySelectorAll("[data-ln-class]");for(let l=0;l<a.length;l++){const s=a[l],n=s.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 u=d[0].trim(),f=d[1].trim();f in t&&s.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 i=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<i.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",i[r],t??null),i[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)$(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let i=0;i<t.length;i++)t[i].textContent=""}})));function N(e,t){if(!e||!t)return e;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;i.nextNode();){const a=i.currentNode;a.textContent.indexOf("{{")!==-1&&(a.textContent=a.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const r=function(a,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let a=0;a<o.length;a++){const l=o[a],s=l.attributes;for(let n=0;n<s.length;n++){const c=s[n];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ce(e,t,i,r,o,a){const l={};for(let n=0;n<e.children.length;n++){const c=e.children[n],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const s=document.createDocumentFragment();for(let n=0;n<t.length;n++){const c=t[n],d=String(r(c));let u=l[d];if(u)o(u,c,n);else{const f=se(i,a);if(!f||(N(f,c),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),o(u,c,n)}s.appendChild(u)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=N,window.lnCore.fill=$,window.lnCore.lnFill=ae,window.lnCore.renderList=ce);function y(e,t,i){const r=e.getAttribute(t);return r===null?i:r}function T(e,t,i){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?i:r}function M(e,t,i=!1){const r=e.getAttribute(t);if(r===null)return!!i;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function R(e,t){return(e.getAttribute(t)||"").split(",").map(i=>i.trim()).filter(Boolean)}const A=new Map;function B(e,t){const i=(e?e.join("|"):"")+"::"+t;if(A.has(i))return A.get(i);const r=new Set(e||[]),o=function(a,l){const s=a.getAttribute(l);return s!==null&&r.has(s)?s:t};return A.set(i,o),o}function j(e,t,i){const r=parseFloat(e.getAttribute(t));return isNaN(r)?i:r}function V(e,t,i){const r=e.getAttribute(t);if(!r)return i;try{return JSON.parse(r)}catch{return i}}function W(e,t,i,r,o){if(!e||t===null)return!0;const a=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const s=n=>{o?console.warn(n,o):console.warn(n)};if(l==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(s(`[${a}] Invalid value "${t}" for boolean attribute "${i}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const n=e.values||[];return n.includes(t)?!0:(s(`[${a}] Invalid value "${t}" for attribute "${i}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${a}] Invalid integer "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(s(`[${a}] Value ${n} for attribute "${i}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(s(`[${a}] Value ${n} for attribute "${i}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${a}] Invalid float "${t}" for attribute "${i}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(n){return s(`[${a}] Invalid JSON for attribute "${i}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function ue(e,t,i){for(const r in i){const[o,a,l]=i[r];Object.defineProperty(e,r,{get:function(){return o(t,a,l)},enumerable:!0,configurable:!0})}return e}function de(e){const t={};for(const i in e){const r=e[i];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=B(r.values,r.fallback);break;case"integer":o=T;break;case"float":o=j;break;case"boolean":o=M;break;case"list":o=R;break;case"json":o=V;break;case"string":default:o=y;break}o||(o=y),t[r.prop]=[o,i,r.fallback]}return t}function fe(e){const t={};for(const i in e){const r=e[i];r&&r.effect&&(t[i]=r.effect)}return Object.keys(t).length?t:null}function we(e){if(e.onAttrChange&&!e.declared)return null;const t=new Set;if(e.effects)for(const i in e.effects)t.add(i);if(e.onAttrChange&&e.declared)for(const i of e.declared)t.add(i);return t}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.defineAttrs=ue,window.lnCore.attrSpec=de,window.lnCore.attrStr=y,window.lnCore.attrInt=T,window.lnCore.attrBool=M,window.lnCore.attrList=R,window.lnCore.attrEnum=B,window.lnCore.attrFloat=j,window.lnCore.attrJson=V);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(i){console.error("["+t.attribute+"] init failed",e,i)}}}function U(e,t,i,r){if(e.nodeType!==1)return;const a=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l={selector:t,attribute:i,ComponentFn:r};if(e.matches&&e.matches(a)&&h(e,l),e.querySelectorAll){const s=e.querySelectorAll(a);for(let n=0;n<s.length;n++)h(s[n],l)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function he(){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 H(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function P(e){const t=H(),i=e.observed||[];for(let r=0;r<i.length;r++){const o=i[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(a=>a.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=we(e);if(r===null)t.reactiveWildcard.push(e);else for(const o of r)t.byReactive.has(o)||t.byReactive.set(o,[]),t.byReactive.get(o).push(e)}e.persist&&t.persist.push(e)}function Q(e,t,i,r){for(let o=0;o<e.length;o++){const a=e[o];if(!t[a.attribute])continue;const l=a.effects&&a.effects[i];l?l(t,i,r):a.onAttrChange&&(!a.declared||a.declared.has(i))&&a.onAttrChange(t,i,r)}}function pe(e){const t=e.attributeName,i=t.indexOf("data-ln-")===0,r=H(),o=r.byAttr.get(t),a=D()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(t);if(!i&&!o&&!a)return;const l=e.target;if(e.oldValue!==l.getAttribute(t)){if(a&&m(l)){const s=r.byDeclaredAttr.get(t),n=l.getAttribute(t);for(let c=0;c<s.length;c++)W(s[c].spec,n,t,s[c].componentTag,l)}if(window.lnCore._debugSink&&(i||o)&&window.lnCore._debugSink("attr",t,l,{oldValue:e.oldValue,newValue:l.getAttribute(t)}),i){const s=r.byReactive.get(t);s&&Q(s,l,t,e.oldValue),r.reactiveWildcard.length&&Q(r.reactiveWildcard,l,t,e.oldValue)}if(o)for(let s=0;s<o.length;s++){const n=o[s];if(n.handler){n.handler(l,t,e.oldValue);continue}n.onAttributeChange&&l[n.attribute]?n.onAttributeChange(l,t):(U(l,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(l))}}}function J(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++)try{pe(t[i])}catch(r){console.error("[ln-core] mutation handler failed",t[i].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function v(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function x(e,t){if(!document.contains(e))if(t.attribute){const i=e[t.attribute];if(i&&typeof i.destroy=="function")try{i.destroy()}catch(r){console.error("["+t.attribute+"] destroy failed",e,r)}delete e[t.attribute]}else t.onDestroy&&t.onDestroy(e)}function ge(e){const t=v();if(!t.length)return;const i=e.target;if(i){const r=i.nodeType===1?i:i.parentElement;if(r&&(r.isContentEditable||r.closest&&r.closest('[contenteditable]:not([contenteditable="false"])')))return}if(e.target)for(let r=0;r<t.length;r++){const o=t[r];if(o.onSubtreeChange&&o.query){const a=o.query,l=e.target.nodeType===1?e.target.matches&&e.target.matches(a)?e.target:e.target.closest?e.target.closest(a):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(a):null;l&&o.onSubtreeChange(l,e)}}for(let r=0;r<e.addedNodes.length;r++){const o=e.addedNodes[r];if(o.nodeType===1){const a=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l];if(s.selector&&s.attribute&&s.ComponentFn){if(!a)o.matches&&o.matches(s.query)&&h(o,s);else if(o.matches&&o.matches(s.query)&&h(o,s),o.querySelectorAll){const n=o.querySelectorAll(s.query);for(let c=0;c<n.length;c++)h(n[c],s)}}s.onInit&&s.onInit(o)}}}for(let r=0;r<e.removedNodes.length;r++){const o=e.removedNodes[r];if(o.nodeType===1){const a=!!(o.firstElementChild||o.children&&o.children.length);for(let l=0;l<t.length;l++){const s=t[l],n=s.query;if(n){if(!a)o.matches&&o.matches(n)&&x(o,s);else if(o.matches&&o.matches(n)&&x(o,s),o.querySelectorAll){const c=o.querySelectorAll(n);for(let d=0;d<c.length;d++)x(c[d],s)}}}}}}function K(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let i=0;i<t.length;i++){const r=t[i];if(r.type==="childList")try{ge(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function me(e,t){P({observed:e,handler:t}),J()}function Ce(e){v().push(e),K()}function z(e,t,i,r,o={}){const a=o.extraAttributes||[],l=o.onAttributeChange||null,s=o.onSubtreeChange||null,n=o.onInit||null,c=o.onAttrChange||null,d=o.effects||null,u=o.attributes||null,f=u?fe(u):d,Fe=u?new Set(Object.keys(u)):null,qe=o.persist||null;function g(k){const w=k||document.body;if(U(w,e,t,i),u&&D())for(const b in u){const Ne=u[b],O=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&O.push(w);for(let E=0;E<O.length;E++){const L=O[E];m(L)&&W(Ne,L.getAttribute(b),b,r,L)}}n&&n(w)}const _=[];if(e.indexOf("[")!==-1){const k=/\[([\w-]+)/g;let w;for(;(w=k.exec(e))!==null;)_.push(w[1])}else _.push(e);P({selector:e,attribute:t,componentTag:r,attributes:u,ComponentFn:i,onInit:n,observed:_.concat(a),onAttributeChange:l,onAttrChange:c,effects:f,declared:Fe,persist:qe}),J();const Ie=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,$e=o.subtreeQuery||(Ie?e:"["+e+"]");v().push({selector:e,attribute:t,ComponentFn:i,onInit:n,onSubtreeChange:s,query:$e}),K(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=z,window.lnCore.observeLifecycle=Ce);function X(){he()>0?be(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",X):X(),g}function G(e){return(e||"").replace(/^#/,"")}function S(e){const t=e===void 0?location.hash:e,i={},r=G(t);if(!r)return i;const o=r.split("&");for(let a=0;a<o.length;a++){const l=o[a];if(!l)continue;const s=l.indexOf(":"),n=s>-1?l.slice(0,s):l,c=s>-1?l.slice(s+1):"";if(n)try{i[n]=decodeURIComponent(c)}catch{i[n]=c}}return i}function ye(e){if(!e)return null;const t=S();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const i=S();t==null?delete i[e]:i[e]=String(t);const o=Object.keys(i).map(function(a){const l=i[a];return l===""?a:a+":"+encodeURIComponent(l)}).join("&");G(location.hash)!==o&&(location.hash=o)}function ve(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 i=e.getAttribute("data-ln-hash");if(i&&i.trim()!=="")return i.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function _e(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function ke(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const i=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(a){try{return decodeURIComponent(a)}catch{return a}}).filter(Boolean):[];return{key:i,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=S,window.lnCore.hashGet=ye,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=ve,window.lnCore.resolveHashNamespace=xe,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=_e,window.lnCore.hashFilterEncode=ke,window.lnCore.hashFilterDecode=Oe);function Ee(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Ee);function Le(e,t=100,i=0){const r=parseFloat(String(e))||0,o=parseFloat(String(t))||100,a=parseFloat(String(i))||0,l=Math.max(a,Math.min(r,o)),s=o-a;let n=0;return s>0&&(n=(l-a)/s*100),n=Math.max(0,Math.min(100,n)),{value:r,min:a,max:o,clampedValue:l,percentage:n}}function De(e,t,i=100){if(t!=null&&t!==""){const r=parseFloat(String(t));if(!isNaN(r)&&r>0)return r}if(e!=null&&e!==""){const r=parseFloat(String(e));if(!isNaN(r)&&r>0)return r}return i}(function(){const e="[data-ln-progress]",t="lnProgress";if(window[t]!==void 0)return;function i(l){const s=l[t];s&&a.call(s)}const r={"data-ln-progress":{type:"float",fallback:0,min:0,effect:i,description:"Current progress value"},"data-ln-progress-max":{type:"float",fallback:100,min:0,effect:i,description:"Maximum progress scale value"}};function o(l){return this.dom=l,this._parentObserver=null,a.call(this),this}o.prototype.destroy=function(){this.dom[t]&&(this._parentObserver&&this._parentObserver.disconnect(),delete this.dom[t])};function a(){const l=this.dom.getAttribute("data-ln-progress"),s=this.dom.parentElement,n=s?s.getAttribute("data-ln-progress-max"):null,c=this.dom.getAttribute("data-ln-progress-max"),d=De(c,n,100),u=Le(l,d);this.dom.style.width=u.percentage+"%",this.dom.setAttribute("role","progressbar"),this.dom.setAttribute("aria-valuemin",String(u.min)),this.dom.setAttribute("aria-valuemax",String(u.max)),this.dom.setAttribute("aria-valuenow",String(u.clampedValue)),F(this.dom,"ln-progress:change",{target:this.dom,value:u.value,max:u.max,percentage:u.percentage})}z(e,t,o,"ln-progress",{attributes:r}),me(["data-ln-progress-max"],function(l){const s=l.querySelectorAll?l.querySelectorAll(e):[];for(let n=0;n<s.length;n++){const c=s[n][t];c&&a.call(c)}})})()})();
|
|
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 m(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let l=1;l<t.length;l++)if(t[l]&&t[l].nodeType===1){i=t[l];break}if(!m(i))return}e.apply(console,t)}}function q(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 p(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){p(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function te(e){const t=e.querySelector('input[name="_method"]');return((t&&t.value!==""?t.value:e.method)||"").toUpperCase()}function ne(e,t){const r=!!(t&&t.typed),i=t&&t.exclude,l={},s=e.elements,o={};if(r)for(let c=0;c<s.length;c++){const n=s[c];n.name&&n.type==="checkbox"&&!n.disabled&&(o[n.name]=(o[n.name]||0)+1)}for(let c=0;c<s.length;c++){const n=s[c];if(!(!n.name||n.disabled||n.type==="file"||n.type==="submit"||n.type==="button")&&!(i&&n.matches&&n.matches(i)))if(n.type==="checkbox")r&&o[n.name]===1?l[n.name]=n.checked:(l[n.name]||(l[n.name]=[]),n.checked&&l[n.name].push(n.value));else if(n.type==="radio")n.checked&&(l[n.name]=n.value);else if(n.type==="select-multiple"){l[n.name]=[];for(let a=0;a<n.options.length;a++)n.options[a].selected&&l[n.name].push(n.options[a].value)}else if(r&&n.type==="hidden")l[n.name]=n.value;else if(r&&(n.type==="number"||n.type==="range")){const a=Number(n.value);l[n.name]=n.value===""||isNaN(a)?null:a}else l[n.name]=n.value}return l}function re(e){if(typeof e!="string")return!!e;const t=e.trim().toLowerCase();return t!=="false"&&t!=="0"&&t!==""&&t!=="off"&&t!=="no"}function oe(e,t){const r=e.elements,i=[],l={};for(let s=0;s<r.length;s++){const o=r[s];o.name&&o.type==="checkbox"&&(l[o.name]=(l[o.name]||0)+1)}for(let s=0;s<r.length;s++){const o=r[s];if(o.type==="file"||o.type==="submit"||o.type==="button")continue;const c=o.getAttribute("data-ln-fill-as")||o.name;if(!c||!(c in t))continue;const n=t[c];if(o.type==="checkbox"){if(Array.isArray(n))o.checked=n.indexOf(o.value)!==-1;else if(l[o.name]>1){const a=String(n).split(",").map(function(d){return d.trim()});o.checked=a.indexOf(o.value)!==-1}else o.checked=re(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 a=0;a<o.options.length;a++)o.options[a].selected=n.indexOf(o.options[a].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=oe,window.lnCore.serializeForm=ne,window.lnCore.resolveFormMethod=te);const I={};function ie(e,t){I[e]=t}function le(e){return I[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=ie,window.lnCore.getDataMapper=le);function se(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,p(function(){new MutationObserver(function(){q(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 ae(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=ae,window.lnCore.ensureLocaleObserver=se);const C={};function ue(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const r=C[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 c=r[o],n=c.getAttribute("data-ln-field");t[n]!=null&&(c.textContent=t[n])}const i=e.querySelectorAll("[data-ln-attr]");for(let o=0;o<i.length;o++){const c=i[o],n=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();t[f]!=null&&c.setAttribute(u,t[f])}}const l=e.querySelectorAll("[data-ln-show]");for(let o=0;o<l.length;o++){const c=l[o],n=c.getAttribute("data-ln-show");n in t&&c.classList.toggle("hidden",!t[n])}const s=e.querySelectorAll("[data-ln-class]");for(let o=0;o<s.length;o++){const c=s[o],n=c.getAttribute("data-ln-class").split(",");for(let a=0;a<n.length;a++){const d=n[a].trim().split(":");if(d.length!==2)continue;const u=d[0].trim(),f=d[1].trim();f in t&&c.classList.toggle(u,!!t[f])}}return e}function de(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 T(e,t){if(!e||!t)return e;const r=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;r.nextNode();){const s=r.currentNode;s.textContent.indexOf("{{")!==-1&&(s.textContent=s.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(o,c){return t[c]!==void 0?t[c]:""}))}const i=function(s,o){return t[o]!==void 0?t[o]:""},l=Array.from(e.querySelectorAll("*"));e.nodeType===1&&l.push(e);for(let s=0;s<l.length;s++){const o=l[s],c=o.attributes;for(let n=0;n<c.length;n++){const a=c[n];a.value.indexOf("{{")!==-1&&o.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function fe(e,t,r,i,l,s){const o={};for(let n=0;n<e.children.length;n++){const a=e.children[n],d=a.getAttribute("data-ln-render-key");d&&(o[d]=a)}const c=document.createDocumentFragment();for(let n=0;n<t.length;n++){const a=t[n],d=String(i(a));let u=o[d];if(u)l(u,a,n);else{const f=ue(r,s);if(!f||(T(f,a),u=f.firstElementChild,!u))continue;u.setAttribute("data-ln-render-key",d),l(u,a,n)}c.appendChild(u)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=T,window.lnCore.fill=N,window.lnCore.lnFill=de,window.lnCore.renderList=fe);function y(e,t,r){const i=e.getAttribute(t);return i===null?r:i}function M(e,t,r){const i=parseInt(e.getAttribute(t),10);return isNaN(i)?r:i}function R(e,t,r=!1){const i=e.getAttribute(t);if(i===null)return!!r;const l=i.trim().toLowerCase();return!(l==="false"||l==="0")}function B(e,t){return(e.getAttribute(t)||"").split(",").map(r=>r.trim()).filter(Boolean)}const A=new Map;function j(e,t){const r=(e?e.join("|"):"")+"::"+t;if(A.has(r))return A.get(r);const i=new Set(e||[]),l=function(s,o){const c=s.getAttribute(o);return c!==null&&i.has(c)?c:t};return A.set(r,l),l}function V(e,t,r){const i=parseFloat(e.getAttribute(t));return isNaN(i)?r:i}function W(e,t,r){const i=e.getAttribute(t);if(!i)return r;try{return JSON.parse(i)}catch{return r}}function U(e,t,r,i,l){if(!e||t===null)return!0;const s=i||"ln-component",o=e.type;if(o==="trigger"||o==="marker"||o==="string"||o==="list"||!o||t===""&&e.fallback!==void 0)return!0;const c=n=>{l?console.warn(n,l):console.warn(n)};if(o==="boolean"){const n=t.trim().toLowerCase();return n!==""&&n!=="true"&&n!=="false"&&n!=="1"&&n!=="0"?(c(`[${s}] 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:(c(`[${s}] Invalid value "${t}" for attribute "${r}". Allowed: ${n.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(o==="integer"){if(!/^-?\d+$/.test(t))return c(`[${s}] Invalid integer "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1;const n=parseInt(t,10);return e.min!==void 0&&n<e.min?(c(`[${s}] Value ${n} for attribute "${r}" is less than min (${e.min}).`),!1):e.max!==void 0&&n>e.max?(c(`[${s}] Value ${n} for attribute "${r}" is greater than max (${e.max}).`),!1):!0}if(o==="float")return isNaN(Number(t))?(c(`[${s}] Invalid float "${t}" for attribute "${r}". Fallback: ${e.fallback}.`),!1):!0;if(o==="json")try{return JSON.parse(t),!0}catch(n){return c(`[${s}] Invalid JSON for attribute "${r}": ${n.message}. Fallback: ${e.fallback}.`),!1}return!0}function we(e,t,r){for(const i in r){const[l,s,o]=r[i];Object.defineProperty(e,i,{get:function(){return l(t,s,o)},enumerable:!0,configurable:!0})}return e}function he(e){const t={};for(const r in e){const i=e[r];if(!i||!i.prop)continue;let l=i.read;if(!l&&i.type)switch(i.type){case"enum":l=j(i.values,i.fallback);break;case"integer":l=M;break;case"float":l=V;break;case"boolean":l=R;break;case"list":l=B;break;case"json":l=W;break;case"string":default:l=y;break}l||(l=y),t[i.prop]=[l,r,i.fallback]}return t}function be(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 pe(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=we,window.lnCore.attrSpec=he,window.lnCore.attrStr=y,window.lnCore.attrInt=M,window.lnCore.attrBool=R,window.lnCore.attrList=B,window.lnCore.attrEnum=j,window.lnCore.attrFloat=V,window.lnCore.attrJson=W);function h(e,t){if(!e[t.attribute]){window.lnCore._persistSink&&e.hasAttribute&&e.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(e,t.selector);try{e[t.attribute]=new t.ComponentFn(e)}catch(r){console.error("["+t.attribute+"] init failed",e,r)}}}function H(e,t,r,i){if(e.nodeType!==1)return;const s=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",o={selector:t,attribute:r,ComponentFn:i};if(e.matches&&e.matches(s)&&h(e,o),e.querySelectorAll){const c=e.querySelectorAll(s);for(let n=0;n<c.length;n++)h(c[n],o)}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ge(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function me(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function P(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function Q(e){const t=P(),r=e.observed||[];for(let i=0;i<r.length;i++){const l=r[i];t.byAttr.has(l)||t.byAttr.set(l,[]),t.byAttr.get(l).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const i in e.attributes){t.byDeclaredAttr.has(i)||t.byDeclaredAttr.set(i,[]);const l=t.byDeclaredAttr.get(i);l.some(s=>s.componentTag===e.componentTag)||l.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=pe(e);if(i===null)t.reactiveWildcard.push(e);else for(const l of i)t.byReactive.has(l)||t.byReactive.set(l,[]),t.byReactive.get(l).push(e)}e.persist&&t.persist.push(e)}function J(e,t,r,i){for(let l=0;l<e.length;l++){const s=e[l];if(!t[s.attribute])continue;const o=s.effects&&s.effects[r];o?o(t,r,i):s.onAttrChange&&(!s.declared||s.declared.has(r))&&s.onAttrChange(t,r,i)}}function Ce(e){const t=e.attributeName,r=t.indexOf("data-ln-")===0,i=P(),l=i.byAttr.get(t),s=F()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(t);if(!r&&!l&&!s)return;const o=e.target;if(e.oldValue!==o.getAttribute(t)){if(s&&m(o)){const c=i.byDeclaredAttr.get(t),n=o.getAttribute(t);for(let a=0;a<c.length;a++)U(c[a].spec,n,t,c[a].componentTag,o)}if(window.lnCore._debugSink&&(r||l)&&window.lnCore._debugSink("attr",t,o,{oldValue:e.oldValue,newValue:o.getAttribute(t)}),r){const c=i.byReactive.get(t);c&&J(c,o,t,e.oldValue),i.reactiveWildcard.length&&J(i.reactiveWildcard,o,t,e.oldValue)}if(l)for(let c=0;c<l.length;c++){const n=l[c];if(n.handler){n.handler(o,t,e.oldValue);continue}n.onAttributeChange&&o[n.attribute]?n.onAttributeChange(o,t):(H(o,n.selector,n.attribute,n.ComponentFn),n.onInit&&n.onInit(o))}}}function K(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,p(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 v(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function x(){return window.lnCore=window.lnCore||{},window.lnCore._subtreeRegistry=window.lnCore._subtreeRegistry||[]}function _(e,t){if(!document.contains(e))if(t.attribute){const 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 ye(e){const t=v();if(!t.length)return;const r=e.target;if(r){const l=r.nodeType===1?r:r.parentElement;if(l&&(l.isContentEditable||l.closest&&l.closest('[contenteditable]:not([contenteditable="false"])')))return}const i=x();if(e.target&&i.length)for(let l=0;l<i.length;l++){const s=i[l],o=s.query,c=e.target.nodeType===1?e.target.matches&&e.target.matches(o)?e.target:e.target.closest?e.target.closest(o):null:e.target.parentElement&&e.target.parentElement.closest?e.target.parentElement.closest(o):null;c&&s.onSubtreeChange(c,e)}for(let l=0;l<e.addedNodes.length;l++){const s=e.addedNodes[l];if(s.nodeType===1){const o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c];if(n.selector&&n.attribute&&n.ComponentFn){if(!o)s.matches&&s.matches(n.query)&&h(s,n);else if(s.matches&&s.matches(n.query)&&h(s,n),s.querySelectorAll){const a=s.querySelectorAll(n.query);for(let d=0;d<a.length;d++)h(a[d],n)}}n.onInit&&n.onInit(s)}}}for(let l=0;l<e.removedNodes.length;l++){const s=e.removedNodes[l];if(s.nodeType===1){const o=!!(s.firstElementChild||s.children&&s.children.length);for(let c=0;c<t.length;c++){const n=t[c],a=n.query;if(a){if(!o)s.matches&&s.matches(a)&&_(s,n);else if(s.matches&&s.matches(a)&&_(s,n),s.querySelectorAll){const d=s.querySelectorAll(a);for(let u=0;u<d.length;u++)_(d[u],n)}}}}}}function z(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,p(function(){new MutationObserver(function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.type==="childList")try{ye(i)}catch(l){console.error("[ln-core] lifecycle handler failed",i.target,l)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function Ae(e,t){Q({observed:e,handler:t}),K()}function ve(e){v().push(e),e.onSubtreeChange&&e.query&&x().push(e),z()}function G(e,t,r,i,l={}){const s=l.extraAttributes||[],o=l.onAttributeChange||null,c=l.onSubtreeChange||null,n=l.onInit||null,a=l.onAttrChange||null,d=l.effects||null,u=l.attributes||null,f=u?be(u):d,$e=u?new Set(Object.keys(u)):null,Ne=l.persist||null;function g(O){const w=O||document.body;if(H(w,e,t,r),u&&F())for(const b in u){const Me=u[b],E=Array.from(w.querySelectorAll("["+b+"]"));w.matches&&w.matches("["+b+"]")&&E.push(w);for(let L=0;L<E.length;L++){const D=E[L];m(D)&&U(Me,D.getAttribute(b),b,i,D)}}n&&n(w)}const k=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)k.push(w[1])}else k.push(e);Q({selector:e,attribute:t,componentTag:i,attributes:u,ComponentFn:r,onInit:n,observed:k.concat(s),onAttributeChange:o,onAttrChange:a,effects:f,declared:$e,persist:Ne}),K();const Te=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1,Y=l.subtreeQuery||(Te?e:"["+e+"]"),Z={selector:e,attribute:t,ComponentFn:r,onInit:n,onSubtreeChange:c,query:Y};v().push(Z),c&&Y&&x().push(Z),z(),window[t]=g,typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerComponent=G,window.lnCore.observeLifecycle=ve);function ee(){ge()>0?me(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",ee):ee(),g}function X(e){return(e||"").replace(/^#/,"")}function S(e){const t=e===void 0?location.hash:e,r={},i=X(t);if(!i)return r;const l=i.split("&");for(let s=0;s<l.length;s++){const o=l[s];if(!o)continue;const c=o.indexOf(":"),n=c>-1?o.slice(0,c):o,a=c>-1?o.slice(c+1):"";if(n)try{r[n]=decodeURIComponent(a)}catch{r[n]=a}}return r}function xe(e){if(!e)return null;const t=S();return e in t?t[e]:null}function _e(e,t){if(!e)return;const r=S();t==null?delete r[e]:r[e]=String(t);const l=Object.keys(r).map(function(s){const o=r[s];return o===""?s:s+":"+encodeURIComponent(o)}).join("&");X(location.hash)!==l&&(location.hash=l)}function Se(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ke(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const 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 Oe(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Ee(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function Le(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function De(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const r=e.slice(0,t),i=e.slice(t+1),l=i?i.split(",").map(function(s){try{return decodeURIComponent(s)}catch{return s}}).filter(Boolean):[];return{key:r,values:l}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=S,window.lnCore.hashGet=xe,window.lnCore.hashSet=_e,window.lnCore.hashLinkClick=Se,window.lnCore.resolveHashNamespace=ke,window.lnCore.hashSortEncode=Oe,window.lnCore.hashSortDecode=Ee,window.lnCore.hashFilterEncode=Le,window.lnCore.hashFilterDecode=De);function Fe(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=Fe);function qe(e,t=100,r=0){const i=parseFloat(String(e))||0,l=parseFloat(String(t))||100,s=parseFloat(String(r))||0,o=Math.max(s,Math.min(i,l)),c=l-s;let n=0;return c>0&&(n=(o-s)/c*100),n=Math.max(0,Math.min(100,n)),{value:i,min:s,max:l,clampedValue:o,percentage:n}}function Ie(e,t,r=100){if(t!=null&&t!==""){const i=parseFloat(String(t));if(!isNaN(i)&&i>0)return i}if(e!=null&&e!==""){const i=parseFloat(String(e));if(!isNaN(i)&&i>0)return i}return r}(function(){const e="[data-ln-progress]",t="lnProgress";if(window[t]!==void 0)return;function r(o){const c=o[t];c&&s.call(c)}const i={"data-ln-progress":{type:"float",fallback:0,min:0,effect:r,description:"Current progress value"},"data-ln-progress-max":{type:"float",fallback:100,min:0,effect:r,description:"Maximum progress scale value"}};function l(o){return this.dom=o,this._parentObserver=null,s.call(this),this}l.prototype.destroy=function(){this.dom[t]&&(this._parentObserver&&this._parentObserver.disconnect(),delete this.dom[t])};function s(){const o=this.dom.getAttribute("data-ln-progress"),c=this.dom.parentElement,n=c?c.getAttribute("data-ln-progress-max"):null,a=this.dom.getAttribute("data-ln-progress-max"),d=Ie(a,n,100),u=qe(o,d);this.dom.style.width=u.percentage+"%",this.dom.setAttribute("role","progressbar"),this.dom.setAttribute("aria-valuemin",String(u.min)),this.dom.setAttribute("aria-valuemax",String(u.max)),this.dom.setAttribute("aria-valuenow",String(u.clampedValue)),q(this.dom,"ln-progress:change",{target:this.dom,value:u.value,max:u.max,percentage:u.percentage})}G(e,t,l,"ln-progress",{attributes:i}),Ae(["data-ln-progress-max"],function(o){const c=o.querySelectorAll?o.querySelectorAll(e):[];for(let n=0;n<c.length;n++){const a=c[n][t];a&&s.call(a)}})})()})();
|