@livenetworks/ashlar 2.0.6 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/LICENSE +641 -641
  2. package/components/COMPONENTS.md +1116 -1116
  3. package/components/index.js +81 -81
  4. package/components/ln-accordion/ln-accordion-dev.scss +8 -8
  5. package/components/ln-accordion/ln-accordion.js +1 -1
  6. package/components/ln-accordion/ln-accordion.schema.json +30 -30
  7. package/components/ln-accordion/src/ln-accordion.js +1 -0
  8. package/components/ln-ajax/ln-ajax-dev.scss +8 -8
  9. package/components/ln-ajax/ln-ajax.js +1 -1
  10. package/components/ln-ajax/ln-ajax.schema.json +30 -30
  11. package/components/ln-api-connector/ln-api-connector.js +1 -1
  12. package/components/ln-api-connector/ln-api-connector.schema.json +96 -96
  13. package/components/ln-api-connector/src/ln-api-connector.js +1 -0
  14. package/components/ln-api-queue/ln-api-queue.js +1 -1
  15. package/components/ln-api-queue/ln-api-queue.schema.json +34 -34
  16. package/components/ln-api-queue/src/ln-api-queue.js +3 -13
  17. package/components/ln-autoresize/ln-autoresize-dev.scss +8 -8
  18. package/components/ln-autoresize/ln-autoresize.js +1 -1
  19. package/components/ln-autoresize/ln-autoresize.schema.json +22 -22
  20. package/components/ln-autosave/ln-autosave-dev.scss +13 -13
  21. package/components/ln-autosave/ln-autosave.js +1 -1
  22. package/components/ln-autosave/ln-autosave.schema.json +48 -48
  23. package/components/ln-autosave/src/autosave-model.js +34 -34
  24. package/components/ln-chart/ln-chart.js +1 -1
  25. package/components/ln-chart/ln-chart.schema.json +146 -146
  26. package/components/ln-chart/src/chart-model.js +154 -154
  27. package/components/ln-circular-progress/ln-circular-progress.js +1 -1
  28. package/components/ln-circular-progress/ln-circular-progress.schema.json +42 -42
  29. package/components/ln-confirm/ln-confirm-dev.scss +24 -24
  30. package/components/ln-confirm/ln-confirm.js +1 -1
  31. package/components/ln-confirm/ln-confirm.schema.json +66 -66
  32. package/components/ln-confirm/src/ln-confirm.js +178 -178
  33. package/components/ln-core/crypto.js +286 -265
  34. package/components/ln-core/dom.js +115 -115
  35. package/components/ln-core/form.js +136 -136
  36. package/components/ln-core/helpers.js +33 -33
  37. package/components/ln-core/http.js +48 -48
  38. package/components/ln-core/index.js +1 -1
  39. package/components/ln-core/ln-core.schema.json +109 -109
  40. package/components/ln-core/locale.js +55 -55
  41. package/components/ln-core/matching.js +78 -78
  42. package/components/ln-core/number.js +125 -125
  43. package/components/ln-core/template.js +206 -206
  44. package/components/ln-couchdb-connector/README.md +4 -0
  45. package/components/ln-couchdb-connector/ln-couchdb-connector.js +1 -1
  46. package/components/ln-couchdb-connector/ln-couchdb-connector.schema.json +50 -50
  47. package/components/ln-couchdb-connector/src/ln-couchdb-connector.js +19 -1
  48. package/components/ln-data-coordinator/README.md +9 -38
  49. package/components/ln-data-coordinator/ln-data-coordinator-dev.scss +8 -8
  50. package/components/ln-data-coordinator/ln-data-coordinator.js +1 -1
  51. package/components/ln-data-coordinator/ln-data-coordinator.schema.json +16 -16
  52. package/components/ln-data-coordinator/src/data-read-policy.js +0 -7
  53. package/components/ln-data-coordinator/src/ln-data-coordinator.js +428 -1299
  54. package/components/ln-data-store/README.md +3 -2
  55. package/components/ln-data-store/ln-data-store-dev.scss +13 -13
  56. package/components/ln-data-store/ln-data-store.js +1 -1
  57. package/components/ln-data-store/ln-data-store.schema.json +84 -84
  58. package/components/ln-data-store/src/data-store-model.js +184 -155
  59. package/components/ln-data-store/src/ln-data-store.js +58 -11
  60. package/components/ln-date/README.md +4 -0
  61. package/components/ln-date/ln-date.js +1 -1
  62. package/components/ln-date/ln-date.schema.json +92 -92
  63. package/components/ln-date/src/date-model.js +186 -186
  64. package/components/ln-date/src/ln-date.js +3 -3
  65. package/components/ln-debug/ln-debug.js +1 -1
  66. package/components/ln-debug/ln-debug.schema.json +28 -28
  67. package/components/ln-debug/src/console-sink.js +19 -19
  68. package/components/ln-debug/src/gate.js +95 -95
  69. package/components/ln-debug/src/generated-attributes.js +2 -2
  70. package/components/ln-dropdown/ln-dropdown-dev.scss +13 -13
  71. package/components/ln-dropdown/ln-dropdown.js +1 -1
  72. package/components/ln-dropdown/ln-dropdown.schema.json +90 -90
  73. package/components/ln-editor/ln-editor.js +1 -1
  74. package/components/ln-editor/ln-editor.schema.json +58 -58
  75. package/components/ln-external-links/ln-external-links.js +1 -1
  76. package/components/ln-external-links/ln-external-links.schema.json +18 -18
  77. package/components/ln-fill/ln-fill.js +1 -1
  78. package/components/ln-fill/ln-fill.schema.json +23 -23
  79. package/components/ln-filter/ln-filter.js +1 -1
  80. package/components/ln-filter/ln-filter.schema.json +153 -153
  81. package/components/ln-filter/src/filter-model.js +185 -185
  82. package/components/ln-form/ln-form-dev.scss +8 -8
  83. package/components/ln-form/ln-form.js +1 -1
  84. package/components/ln-form/ln-form.schema.json +45 -45
  85. package/components/ln-http/ln-http.js +1 -1
  86. package/components/ln-http/ln-http.schema.json +6 -6
  87. package/components/ln-icon/ln-icon.schema.json +6 -6
  88. package/components/ln-include/ln-include.js +1 -1
  89. package/components/ln-include/ln-include.schema.json +23 -23
  90. package/components/ln-key/ln-key-dev.scss +18 -18
  91. package/components/ln-key/ln-key.js +1 -1
  92. package/components/ln-key/ln-key.schema.json +56 -56
  93. package/components/ln-key/src/ln-key.js +10 -10
  94. package/components/ln-link/ln-link-dev.scss +8 -8
  95. package/components/ln-link/ln-link.js +1 -1
  96. package/components/ln-link/ln-link.schema.json +22 -22
  97. package/components/ln-list/README.md +152 -152
  98. package/components/ln-list/ln-list-dev.scss +8 -8
  99. package/components/ln-list/ln-list.js +1 -1
  100. package/components/ln-list/ln-list.schema.json +166 -166
  101. package/components/ln-list/src/ln-list.js +4 -4
  102. package/components/ln-modal/README.md +4 -6
  103. package/components/ln-modal/ln-modal.js +1 -1
  104. package/components/ln-modal/ln-modal.schema.json +65 -65
  105. package/components/ln-modal/src/ln-modal.js +28 -8
  106. package/components/ln-nav/ln-nav.js +1 -1
  107. package/components/ln-nav/ln-nav.schema.json +25 -25
  108. package/components/ln-number/ln-number.js +1 -1
  109. package/components/ln-number/ln-number.schema.json +63 -63
  110. package/components/ln-number/src/number-model.js +31 -31
  111. package/components/ln-obfuscator/README.md +60 -60
  112. package/components/ln-obfuscator/ln-obfuscator.js +1 -1
  113. package/components/ln-obfuscator/ln-obfuscator.schema.json +49 -49
  114. package/components/ln-obfuscator/src/ln-obfuscator.js +159 -159
  115. package/components/ln-obfuscator/src/obfuscator-model.js +250 -250
  116. package/components/ln-options/ln-options.js +1 -1
  117. package/components/ln-options/ln-options.schema.json +41 -41
  118. package/components/ln-options/src/ln-options.js +1 -0
  119. package/components/ln-persist/README.md +151 -151
  120. package/components/ln-persist/ln-persist.js +1 -1
  121. package/components/ln-persist/ln-persist.schema.json +28 -28
  122. package/components/ln-persist/src/ln-persist.js +83 -83
  123. package/components/ln-picklist/README.md +230 -230
  124. package/components/ln-picklist/ln-picklist-dev.scss +22 -22
  125. package/components/ln-picklist/ln-picklist.js +1 -1
  126. package/components/ln-picklist/ln-picklist.schema.json +49 -49
  127. package/components/ln-picklist/src/ln-picklist.js +228 -228
  128. package/components/ln-popover/README.md +4 -0
  129. package/components/ln-popover/ln-popover-dev.scss +13 -13
  130. package/components/ln-popover/ln-popover.js +1 -1
  131. package/components/ln-popover/ln-popover.schema.json +82 -82
  132. package/components/ln-popover/src/ln-popover.js +9 -0
  133. package/components/ln-progress/ln-progress-dev.scss +8 -8
  134. package/components/ln-progress/ln-progress.js +1 -1
  135. package/components/ln-progress/ln-progress.schema.json +40 -40
  136. package/components/ln-router/ln-router.js +1 -1
  137. package/components/ln-router/ln-router.schema.json +76 -76
  138. package/components/ln-scroll/README.md +45 -45
  139. package/components/ln-scroll/ln-scroll.js +1 -1
  140. package/components/ln-scroll/ln-scroll.schema.json +85 -85
  141. package/components/ln-scroll/src/ln-scroll.js +150 -150
  142. package/components/ln-search/README.md +188 -188
  143. package/components/ln-search/ln-search.js +1 -1
  144. package/components/ln-search/ln-search.schema.json +103 -103
  145. package/components/ln-slug/ln-slug.js +1 -1
  146. package/components/ln-slug/ln-slug.schema.json +23 -23
  147. package/components/ln-sort/ln-sort.js +1 -1
  148. package/components/ln-sort/ln-sort.schema.json +104 -104
  149. package/components/ln-sort/src/ln-sort.js +321 -321
  150. package/components/ln-sort/src/sort-model.js +117 -117
  151. package/components/ln-sortable/ln-sortable-dev.scss +13 -13
  152. package/components/ln-sortable/ln-sortable.js +1 -1
  153. package/components/ln-sortable/ln-sortable.schema.json +36 -36
  154. package/components/ln-stat/ln-stat-dev.scss +8 -8
  155. package/components/ln-stat/ln-stat.js +1 -1
  156. package/components/ln-stat/ln-stat.schema.json +32 -32
  157. package/components/ln-stat/src/stat-model.js +28 -28
  158. package/components/ln-table/ln-table.js +1 -1
  159. package/components/ln-table/ln-table.schema.json +211 -211
  160. package/components/ln-table/src/ln-table.js +2 -0
  161. package/components/ln-table/src/table-model.js +98 -98
  162. package/components/ln-table-coordinator/ln-table-coordinator.js +1 -1
  163. package/components/ln-table-coordinator/ln-table-coordinator.schema.json +93 -93
  164. package/components/ln-table-coordinator/src/ln-table-coordinator.js +3 -3
  165. package/components/ln-tabs/README.md +2 -2
  166. package/components/ln-tabs/ln-tabs.js +1 -1
  167. package/components/ln-tabs/ln-tabs.schema.json +75 -75
  168. package/components/ln-tabs/src/ln-tabs.js +208 -207
  169. package/components/ln-tabs/src/tabs-model.js +82 -82
  170. package/components/ln-time/ln-time-dev.scss +13 -13
  171. package/components/ln-time/ln-time.js +1 -1
  172. package/components/ln-time/ln-time.schema.json +38 -38
  173. package/components/ln-toast/ln-toast.js +1 -1
  174. package/components/ln-toast/ln-toast.schema.json +65 -65
  175. package/components/ln-toggle/ln-toggle.js +1 -1
  176. package/components/ln-toggle/ln-toggle.schema.json +52 -52
  177. package/components/ln-tooltip/ln-tooltip.js +1 -1
  178. package/components/ln-tooltip/ln-tooltip.schema.json +86 -86
  179. package/components/ln-translations/ln-translations.js +1 -1
  180. package/components/ln-translations/ln-translations.schema.json +120 -120
  181. package/components/ln-ui-coordinator/README.md +62 -62
  182. package/components/ln-ui-coordinator/ln-ui-coordinator.js +1 -1
  183. package/components/ln-ui-coordinator/ln-ui-coordinator.schema.json +28 -28
  184. package/components/ln-ui-coordinator/src/ln-ui-coordinator.js +140 -140
  185. package/components/ln-upload/ln-upload.js +1 -1
  186. package/components/ln-upload/ln-upload.schema.json +193 -193
  187. package/components/ln-upload/src/upload-model.js +78 -78
  188. package/components/ln-validate/ln-validate.js +1 -1
  189. package/components/ln-validate/ln-validate.schema.json +50 -50
  190. package/components/ln-validate/src/validate-model.js +64 -64
  191. package/components/ln-websocket-connector/README.md +166 -166
  192. package/components/ln-websocket-connector/ln-websocket-connector.js +1 -1
  193. package/components/ln-websocket-connector/ln-websocket-connector.schema.json +29 -29
  194. package/components/ln-websocket-connector/src/ln-websocket-connector.js +283 -279
  195. package/ln-ashlar.html-data.json +7 -8
  196. package/package.json +84 -84
  197. package/theme/brand.css +73 -73
  198. package/theme/components/_confirm.scss +6 -6
  199. package/theme/components/_picklist.scss +3 -3
  200. package/theme/config/_palette.scss +274 -274
  201. package/theme/config/_theme.scss +292 -292
  202. package/theme/config/_tokens.scss +285 -285
  203. package/theme/config/mixins/_index.scss +62 -62
  204. package/theme/config/mixins/_picklist.scss +66 -66
  205. package/theme/ln-ashlar-dev.scss +66 -66
  206. package/theme/ln-ashlar-landing.scss +56 -56
  207. package/theme/ln-ashlar-theme.scss +63 -63
  208. package/theme/presentation/_bento.scss +151 -151
  209. package/theme/presentation/_cta.scss +111 -111
  210. package/theme/presentation/_effects.scss +216 -216
  211. package/theme/presentation/_features.scss +108 -108
  212. package/theme/presentation/_footer.scss +129 -129
  213. package/theme/presentation/_hero.scss +158 -158
  214. package/theme/presentation/_layout.scss +170 -170
  215. package/theme/presentation/_navbar.scss +140 -140
  216. package/theme/presentation/_pricing.scss +262 -262
  217. package/theme/presentation/_stats.scss +87 -87
  218. package/theme/presentation/_testimonials.scss +124 -124
  219. package/theme/presentation/_tokens.scss +39 -39
  220. package/theme/presentation/_typography.scss +163 -163
  221. package/web-types.json +12 -12
@@ -1,6 +1,6 @@
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-http",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {}
6
- }
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-http",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {}
6
+ }
@@ -1,6 +1,6 @@
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-icon",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {}
6
- }
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-icon",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {}
6
+ }
@@ -1 +1 @@
1
- (function(){"use strict";function E(){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 g(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(!g(r))return}e.apply(console,t)}}function C(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const $={};function j(e,t){$[e]=t}function W(e){return $[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=j,window.lnCore.getDataMapper=W);function V(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const I={};function Q(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];I[n]=t}function U(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=Q,window.lnCore.getLocaleFallback=U,window.lnCore.ensureLocaleObserver=V);const y={};function J(e,t){y[e]||(y[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=y[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function D(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],c=s.getAttribute("data-ln-field");t[c]!=null&&(s.textContent=t[c])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const s=r[l],c=s.getAttribute("data-ln-attr").split(",");for(let u=0;u<c.length;u++){const d=c[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&s.setAttribute(a,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const s=o[l],c=s.getAttribute("data-ln-show");c in t&&s.classList.toggle("hidden",!t[c])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const s=i[l],c=s.getAttribute("data-ln-class").split(",");for(let u=0;u<c.length;u++){const d=c[u].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&s.classList.toggle(a,!!t[f])}}return e}function K(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)D(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 i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const r=function(i,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let i=0;i<o.length;i++){const l=o[i],s=l.attributes;for(let c=0;c<s.length;c++){const u=s[c];u.value.indexOf("{{")!==-1&&l.setAttribute(u.name,u.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function P(e,t,n,r,o,i){const l={};for(let c=0;c<e.children.length;c++){const u=e.children[c],d=u.getAttribute("data-ln-render-key");d&&(l[d]=u)}const s=document.createDocumentFragment();for(let c=0;c<t.length;c++){const u=t[c],d=String(r(u));let a=l[d];if(a)o(a,u,c);else{const f=J(n,i);if(!f||(M(f,u),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),o(a,u,c)}s.appendChild(a)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=D,window.lnCore.lnFill=K,window.lnCore.renderList=P);function m(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function G(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function X(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function z(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const A=new Map;function Y(e,t){const n=(e?e.join("|"):"")+"::"+t;if(A.has(n))return A.get(n);const r=new Set(e||[]),o=function(i,l){const s=i.getAttribute(l);return s!==null&&r.has(s)?s:t};return A.set(n,o),o}function Z(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ee(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function R(e,t,n,r,o){if(!e||t===null)return!0;const i=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=c=>{o?console.warn(c,o):console.warn(c)};if(l==="boolean"){const c=t.trim().toLowerCase();return c!==""&&c!=="true"&&c!=="false"&&c!=="1"&&c!=="0"?(s(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const c=e.values||[];return c.includes(t)?!0:(s(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${c.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const c=parseInt(t,10);return e.min!==void 0&&c<e.min?(s(`[${i}] Value ${c} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&c>e.max?(s(`[${i}] Value ${c} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(c){return s(`[${i}] Invalid JSON for attribute "${n}": ${c.message}. Fallback: ${e.fallback}.`),!1}return!0}function te(e,t,n){for(const r in n){const[o,i,l]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,i,l)},enumerable:!0,configurable:!0})}return e}function ne(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Y(r.values,r.fallback);break;case"integer":o=G;break;case"float":o=Z;break;case"boolean":o=X;break;case"list":o=z;break;case"json":o=ee;break;case"string":default:o=m;break}o||(o=m),t[r.prop]=[o,n,r.fallback]}return t}function re(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function oe(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}function _(e,t,n,r){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&l.push(e);for(const s of l)if(!s[n]){window.lnCore._persistSink&&s.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(s,t);try{s[n]=new r(s)}catch(c){console.error("["+n+"] init failed",s,c)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ie(){typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=(window.lnCore._bootHolds||0)+1)}function k(){if(typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=Math.max(0,(window.lnCore._bootHolds||0)-1),window.lnCore._bootHolds===0&&window.lnCore._bootQueue)){const e=window.lnCore._bootQueue;window.lnCore._bootQueue=[];for(let t=0;t<e.length;t++)e[t]()}}function le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function se(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function q(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ce(e){const t=q(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(i=>i.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=oe(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 F(e,t,n,r){for(let o=0;o<e.length;o++){const i=e[o];if(!t[i.attribute])continue;const l=i.effects&&i.effects[n];l?l(t,n,r):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,r)}}function ue(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=q(),o=r.byAttr.get(n);if(E()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&g(t)){const i=r.byDeclaredAttr.get(n),l=t.getAttribute(n);for(let s=0;s<i.length;s++)R(i[s].spec,l,n,i[s].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=r.byReactive.get(n);i&&F(i,t,n,e.oldValue),r.reactiveWildcard.length&&F(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let i=0;i<o.length;i++){const l=o[i];if(l.handler){l.handler(t,n,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,n):(_(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function de(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ue(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function N(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ae(e){const t=N();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,i=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;i&&r.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o];_(r,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o],l=i.query,s=Array.from(r.querySelectorAll(l));r.matches&&r.matches(l)&&s.push(r);for(let c=0;c<s.length;c++){const u=s[c];if(!document.contains(u)){const d=u[i.attribute];if(d&&typeof d.destroy=="function")try{d.destroy()}catch(a){console.error("["+i.attribute+"] destroy failed",u,a)}delete u[i.attribute]}}}}}}function fe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{ae(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function we(e,t,n,r,o={}){const i=o.extraAttributes||[],l=o.onAttributeChange||null,s=o.onSubtreeChange||null,c=o.onInit||null,u=o.onAttrChange||null,d=o.effects||null,a=o.attributes||null,f=a?re(a):d,_e=a?new Set(Object.keys(a)):null,ke=o.persist||null;function p(O){const w=O||document.body;if(_(w,e,t,n),a&&E())for(const h in a){const Se=a[h],x=Array.from(w.querySelectorAll("["+h+"]"));w.matches&&w.matches("["+h+"]")&&x.push(w);for(let L=0;L<x.length;L++){const T=x[L];g(T)&&R(Se,T.getAttribute(h),h,r,T)}}c&&c(w)}const S=[];if(e.indexOf("[")!==-1){const O=/\[([\w-]+)/g;let w;for(;(w=O.exec(e))!==null;)S.push(w[1])}else S.push(e);ce({selector:e,attribute:t,componentTag:r,attributes:a,ComponentFn:n,onInit:c,observed:S.concat(i),onAttributeChange:l,onAttrChange:u,effects:f,declared:_e,persist:ke}),de();const ve=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";N().push({selector:e,attribute:t,ComponentFn:n,onInit:c,onSubtreeChange:s,query:ve}),fe(),window[t]=p;function H(){le()>0?se(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",H):H(),p}function B(e){return(e||"").replace(/^#/,"")}function v(e){const t=e===void 0?location.hash:e,n={},r=B(t);if(!r)return n;const o=r.split("&");for(let i=0;i<o.length;i++){const l=o[i];if(!l)continue;const s=l.indexOf(":"),c=s>-1?l.slice(0,s):l,u=s>-1?l.slice(s+1):"";if(c)try{n[c]=decodeURIComponent(u)}catch{n[c]=u}}return n}function he(e){if(!e)return null;const t=v();return e in t?t[e]:null}function be(e,t){if(!e)return;const n=v();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(i){const l=n[i];return l===""?i:i+":"+encodeURIComponent(l)}).join("&");B(location.hash)!==o&&(location.hash=o)}function pe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ge(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Ce(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ye(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ae(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=v,window.lnCore.hashGet=he,window.lnCore.hashSet=be,window.lnCore.hashLinkClick=pe,window.lnCore.resolveHashNamespace=ge,window.lnCore.hashSortEncode=Ce,window.lnCore.hashSortDecode=ye,window.lnCore.hashFilterEncode=me,window.lnCore.hashFilterDecode=Ae),(function(){const e="template[data-ln-include]",t="lnInclude";if(window[t]!==void 0)return;const n={"data-ln-include":{prop:"url",read:m,type:"string",fallback:"",description:"URL of external HTML template to fetch and include"}},r=ne(n),o=new Map;function i(l){if(this.dom=l,te(this,l,r),this._held=!1,this._destroyed=!1,!this.url)return this;ie(),this._held=!0;const s=this,c=this.url;let u=o.get(c);return u||(u=fetch(c).then(function(d){if(!d.ok)throw new Error("HTTP error! status: "+d.status);return d.text()}).catch(function(d){throw o.delete(c),d}),o.set(c,u)),u.then(function(d){if(s._destroyed)return;const a=document.createElement("template");a.innerHTML=d,s.dom.content.appendChild(a.content),C(s.dom,"ln-include:loaded",{target:s.dom,url:s.url}),s._held&&(s._held=!1,k())}).catch(function(d){s._destroyed||(console.error("[ln-include] Failed to fetch template from "+s.url+":",d),C(s.dom,"ln-include:error",{target:s.dom,url:s.url,error:d}),s._held&&(s._held=!1,k()))}),this}i.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._held&&(this._held=!1,k()),delete this.dom[t])},we(e,t,i,"ln-include",{attributes:n})})()})();
1
+ (function(){"use strict";function E(){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 g(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(!g(r))return}e.apply(console,t)}}function C(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function b(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){b(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const I={};function j(e,t){I[e]=t}function W(e){return I[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=j,window.lnCore.getDataMapper=W);function U(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,b(function(){new MutationObserver(function(){C(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const $={};function V(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];$[n]=t}function Q(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return $[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=V,window.lnCore.getLocaleFallback=Q,window.lnCore.ensureLocaleObserver=U);const y={};function J(e,t){y[e]||(y[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=y[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function D(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],u=s.getAttribute("data-ln-field");t[u]!=null&&(s.textContent=t[u])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const s=r[l],u=s.getAttribute("data-ln-attr").split(",");for(let c=0;c<u.length;c++){const d=u[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();t[f]!=null&&s.setAttribute(a,t[f])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const s=o[l],u=s.getAttribute("data-ln-show");u in t&&s.classList.toggle("hidden",!t[u])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const s=i[l],u=s.getAttribute("data-ln-class").split(",");for(let c=0;c<u.length;c++){const d=u[c].trim().split(":");if(d.length!==2)continue;const a=d[0].trim(),f=d[1].trim();f in t&&s.classList.toggle(a,!!t[f])}}return e}function K(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)D(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 i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,s){return t[s]!==void 0?t[s]:""}))}const r=function(i,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let i=0;i<o.length;i++){const l=o[i],s=l.attributes;for(let u=0;u<s.length;u++){const c=s[u];c.value.indexOf("{{")!==-1&&l.setAttribute(c.name,c.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function P(e,t,n,r,o,i){const l={};for(let u=0;u<e.children.length;u++){const c=e.children[u],d=c.getAttribute("data-ln-render-key");d&&(l[d]=c)}const s=document.createDocumentFragment();for(let u=0;u<t.length;u++){const c=t[u],d=String(r(c));let a=l[d];if(a)o(a,c,u);else{const f=J(n,i);if(!f||(M(f,c),a=f.firstElementChild,!a))continue;a.setAttribute("data-ln-render-key",d),o(a,c,u)}s.appendChild(a)}e.textContent="",e.appendChild(s)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=M,window.lnCore.fill=D,window.lnCore.lnFill=K,window.lnCore.renderList=P);function m(e,t,n){const r=e.getAttribute(t);return r===null?n:r}function G(e,t,n){const r=parseInt(e.getAttribute(t),10);return isNaN(r)?n:r}function X(e,t,n=!1){const r=e.getAttribute(t);if(r===null)return!!n;const o=r.trim().toLowerCase();return!(o==="false"||o==="0")}function z(e,t){return(e.getAttribute(t)||"").split(",").map(n=>n.trim()).filter(Boolean)}const A=new Map;function Y(e,t){const n=(e?e.join("|"):"")+"::"+t;if(A.has(n))return A.get(n);const r=new Set(e||[]),o=function(i,l){const s=i.getAttribute(l);return s!==null&&r.has(s)?s:t};return A.set(n,o),o}function Z(e,t,n){const r=parseFloat(e.getAttribute(t));return isNaN(r)?n:r}function ee(e,t,n){const r=e.getAttribute(t);if(!r)return n;try{return JSON.parse(r)}catch{return n}}function R(e,t,n,r,o){if(!e||t===null)return!0;const i=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=u=>{o?console.warn(u,o):console.warn(u)};if(l==="boolean"){const u=t.trim().toLowerCase();return u!==""&&u!=="true"&&u!=="false"&&u!=="1"&&u!=="0"?(s(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const u=e.values||[];return u.includes(t)?!0:(s(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${u.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return s(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const u=parseInt(t,10);return e.min!==void 0&&u<e.min?(s(`[${i}] Value ${u} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&u>e.max?(s(`[${i}] Value ${u} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(s(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(u){return s(`[${i}] Invalid JSON for attribute "${n}": ${u.message}. Fallback: ${e.fallback}.`),!1}return!0}function te(e,t,n){for(const r in n){const[o,i,l]=n[r];Object.defineProperty(e,r,{get:function(){return o(t,i,l)},enumerable:!0,configurable:!0})}return e}function ne(e){const t={};for(const n in e){const r=e[n];if(!r||!r.prop)continue;let o=r.read;if(!o&&r.type)switch(r.type){case"enum":o=Y(r.values,r.fallback);break;case"integer":o=G;break;case"float":o=Z;break;case"boolean":o=X;break;case"list":o=z;break;case"json":o=ee;break;case"string":default:o=m;break}o||(o=m),t[r.prop]=[o,n,r.fallback]}return t}function re(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function oe(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}function _(e,t,n,r){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&l.push(e);for(const s of l)if(!s[n]){window.lnCore._persistSink&&s.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(s,t);try{s[n]=new r(s)}catch(u){console.error("["+n+"] init failed",s,u)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function ie(){typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=(window.lnCore._bootHolds||0)+1)}function x(){if(typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=Math.max(0,(window.lnCore._bootHolds||0)-1),window.lnCore._bootHolds===0&&window.lnCore._bootQueue)){const e=window.lnCore._bootQueue;window.lnCore._bootQueue=[];for(let t=0;t<e.length;t++)e[t]()}}function le(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function se(e){typeof window<"u"?(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[],window.lnCore._bootHolds>0?window.lnCore._bootQueue.push(e):setTimeout(e,0)):e()}function q(){window.lnCore=window.lnCore||{};const e=window.lnCore._attrRegistry=window.lnCore._attrRegistry||{byAttr:new Map,reactive:[],persist:[]};return e.byReactive=e.byReactive||new Map,e.reactiveWildcard=e.reactiveWildcard||[],e}function ue(e){const t=q(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(i=>i.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=oe(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 F(e,t,n,r){for(let o=0;o<e.length;o++){const i=e[o];if(!t[i.attribute])continue;const l=i.effects&&i.effects[n];l?l(t,n,r):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,r)}}function ce(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=q(),o=r.byAttr.get(n);if(E()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&g(t)){const i=r.byDeclaredAttr.get(n),l=t.getAttribute(n);for(let s=0;s<i.length;s++)R(i[s].spec,l,n,i[s].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=r.byReactive.get(n);i&&F(i,t,n,e.oldValue),r.reactiveWildcard.length&&F(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let i=0;i<o.length;i++){const l=o[i];if(l.handler){l.handler(t,n,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,n):(_(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function de(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{ce(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function N(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ae(e){const t=N();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,i=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;i&&r.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o];_(r,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o],l=i.query,s=Array.from(r.querySelectorAll(l));r.matches&&r.matches(l)&&s.push(r);for(let u=0;u<s.length;u++){const c=s[u];if(!document.contains(c)){const d=c[i.attribute];if(d&&typeof d.destroy=="function")try{d.destroy()}catch(a){console.error("["+i.attribute+"] destroy failed",c,a)}delete c[i.attribute]}}}}}}function fe(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,b(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{ae(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function we(e,t,n,r,o={}){const i=o.extraAttributes||[],l=o.onAttributeChange||null,s=o.onSubtreeChange||null,u=o.onInit||null,c=o.onAttrChange||null,d=o.effects||null,a=o.attributes||null,f=a?re(a):d,xe=a?new Set(Object.keys(a)):null,ve=o.persist||null;function p(S){const w=S||document.body;if(_(w,e,t,n),a&&E())for(const h in a){const Se=a[h],O=Array.from(w.querySelectorAll("["+h+"]"));w.matches&&w.matches("["+h+"]")&&O.push(w);for(let L=0;L<O.length;L++){const T=O[L];g(T)&&R(Se,T.getAttribute(h),h,r,T)}}u&&u(w)}const k=[];if(e.indexOf("[")!==-1){const S=/\[([\w-]+)/g;let w;for(;(w=S.exec(e))!==null;)k.push(w[1])}else k.push(e);ue({selector:e,attribute:t,componentTag:r,attributes:a,ComponentFn:n,onInit:u,observed:k.concat(i),onAttributeChange:l,onAttrChange:c,effects:f,declared:xe,persist:ve}),de();const ke=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";N().push({selector:e,attribute:t,ComponentFn:n,onInit:u,onSubtreeChange:s,query:ke}),fe(),window[t]=p;function H(){le()>0?se(function(){p(document.body)}):p(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",H):H(),p}function B(e){return(e||"").replace(/^#/,"")}function v(e){const t=e===void 0?location.hash:e,n={},r=B(t);if(!r)return n;const o=r.split("&");for(let i=0;i<o.length;i++){const l=o[i];if(!l)continue;const s=l.indexOf(":"),u=s>-1?l.slice(0,s):l,c=s>-1?l.slice(s+1):"";if(u)try{n[u]=decodeURIComponent(c)}catch{n[u]=c}}return n}function he(e){if(!e)return null;const t=v();return e in t?t[e]:null}function be(e,t){if(!e)return;const n=v();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(i){const l=n[i];return l===""?i:i+":"+encodeURIComponent(l)}).join("&");B(location.hash)!==o&&(location.hash=o)}function pe(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ge(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Ce(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ye(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function me(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ae(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=v,window.lnCore.hashGet=he,window.lnCore.hashSet=be,window.lnCore.hashLinkClick=pe,window.lnCore.resolveHashNamespace=ge,window.lnCore.hashSortEncode=Ce,window.lnCore.hashSortDecode=ye,window.lnCore.hashFilterEncode=me,window.lnCore.hashFilterDecode=Ae);function _e(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=_e),(function(){const e="template[data-ln-include]",t="lnInclude";if(window[t]!==void 0)return;const n={"data-ln-include":{prop:"url",read:m,type:"string",fallback:"",description:"URL of external HTML template to fetch and include"}},r=ne(n),o=new Map;function i(l){if(this.dom=l,te(this,l,r),this._held=!1,this._destroyed=!1,!this.url)return this;ie(),this._held=!0;const s=this,u=this.url;let c=o.get(u);return c||(c=fetch(u).then(function(d){if(!d.ok)throw new Error("HTTP error! status: "+d.status);return d.text()}).catch(function(d){throw o.delete(u),d}),o.set(u,c)),c.then(function(d){if(s._destroyed)return;const a=document.createElement("template");a.innerHTML=d,s.dom.content.appendChild(a.content),C(s.dom,"ln-include:loaded",{target:s.dom,url:s.url}),s._held&&(s._held=!1,x())}).catch(function(d){s._destroyed||(console.error("[ln-include] Failed to fetch template from "+s.url+":",d),C(s.dom,"ln-include:error",{target:s.dom,url:s.url,error:d}),s._held&&(s._held=!1,x()))}),this}i.prototype.destroy=function(){this.dom[t]&&(this._destroyed=!0,this._held&&(this._held=!1,x()),delete this.dom[t])},we(e,t,i,"ln-include",{attributes:n})})()})();
@@ -1,23 +1,23 @@
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-include",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {
6
- "data-ln-debug": {
7
- "direction": null,
8
- "sources": [
9
- "ln-include-dev.scss"
10
- ]
11
- },
12
- "data-ln-include": {
13
- "direction": null,
14
- "sources": [
15
- "ln-include-dev.scss",
16
- "src/ln-include.js"
17
- ],
18
- "type": "string",
19
- "fallback": "",
20
- "description": "URL of external HTML template to fetch and include"
21
- }
22
- }
23
- }
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-include",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {
6
+ "data-ln-debug": {
7
+ "direction": null,
8
+ "sources": [
9
+ "ln-include-dev.scss"
10
+ ]
11
+ },
12
+ "data-ln-include": {
13
+ "direction": null,
14
+ "sources": [
15
+ "ln-include-dev.scss",
16
+ "src/ln-include.js"
17
+ ],
18
+ "type": "string",
19
+ "fallback": "",
20
+ "description": "URL of external HTML template to fetch and include"
21
+ }
22
+ }
23
+ }
@@ -1,18 +1,18 @@
1
- @use '../../theme/config/mixins' as *;
2
-
3
- [data-ln-debug] {
4
- // 1. Shortcut String Check: shortcut combination string cannot be empty
5
- [data-ln-key=""] {
6
- @include dev-inline-error("data-ln-key shortcut combination cannot be empty");
7
- }
8
-
9
- // 2. Map Target Check: map item target selector cannot be empty
10
- [data-ln-key-for=""] {
11
- @include dev-inline-error("data-ln-key-for target selector cannot be empty");
12
- }
13
-
14
- // 3. Separate Declaration Target Check: data-ln-key-target selector cannot be empty
15
- [data-ln-key-target=""] {
16
- @include dev-inline-error("data-ln-key-target selector cannot be empty");
17
- }
18
- }
1
+ @use '../../theme/config/mixins' as *;
2
+
3
+ [data-ln-debug] {
4
+ // 1. Shortcut String Check: shortcut combination string cannot be empty
5
+ [data-ln-key=""] {
6
+ @include dev-inline-error("data-ln-key shortcut combination cannot be empty");
7
+ }
8
+
9
+ // 2. Map Target Check: map item target selector cannot be empty
10
+ [data-ln-key-for=""] {
11
+ @include dev-inline-error("data-ln-key-for target selector cannot be empty");
12
+ }
13
+
14
+ // 3. Separate Declaration Target Check: data-ln-key-target selector cannot be empty
15
+ [data-ln-key-target=""] {
16
+ @include dev-inline-error("data-ln-key-target selector cannot be empty");
17
+ }
18
+ }
@@ -1 +1 @@
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 D(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(!D(r))return}e.apply(console,t)}}function K(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function Y(e,t,n){const r=n||{};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 Z(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ee(e){if(!e)return!1;if(typeof e.closest=="function")return!!e.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])');const t=String(e.tagName||"").toLowerCase();return t==="input"||t==="textarea"||t==="select"||!!e.isContentEditable}function te(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function ne(e,t){return!e||!document.contains(e)||te(e)||t&&typeof e[t]!="function"?!1:Z(e)}const U={};function re(e,t){U[e]=t}function oe(e){return U[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=re,window.lnCore.getDataMapper=oe);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,k(function(){new MutationObserver(function(){K(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const N={};function se(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];N[n]=t}function le(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return N[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=se,window.lnCore.getLocaleFallback=le,window.lnCore.ensureLocaleObserver=ie);const I={};function ce(e,t){I[e]||(I[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=I[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let s=0;s<n.length;s++){const c=n[s],l=c.getAttribute("data-ln-field");t[l]!=null&&(c.textContent=t[l])}const r=e.querySelectorAll("[data-ln-attr]");for(let s=0;s<r.length;s++){const c=r[s],l=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<l.length;a++){const d=l[a].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();t[h]!=null&&c.setAttribute(f,t[h])}}const o=e.querySelectorAll("[data-ln-show]");for(let s=0;s<o.length;s++){const c=o[s],l=c.getAttribute("data-ln-show");l in t&&c.classList.toggle("hidden",!t[l])}const i=e.querySelectorAll("[data-ln-class]");for(let s=0;s<i.length;s++){const c=i[s],l=c.getAttribute("data-ln-class").split(",");for(let a=0;a<l.length;a++){const d=l[a].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();h in t&&c.classList.toggle(f,!!t[h])}}return e}function ue(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)W(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function j(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(s,c){return t[c]!==void 0?t[c]:""}))}const r=function(i,s){return t[s]!==void 0?t[s]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let i=0;i<o.length;i++){const s=o[i],c=s.attributes;for(let l=0;l<c.length;l++){const a=c[l];a.value.indexOf("{{")!==-1&&s.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ae(e,t,n,r,o,i){const s={};for(let l=0;l<e.children.length;l++){const a=e.children[l],d=a.getAttribute("data-ln-render-key");d&&(s[d]=a)}const c=document.createDocumentFragment();for(let l=0;l<t.length;l++){const a=t[l],d=String(r(a));let f=s[d];if(f)o(f,a,l);else{const h=ce(n,i);if(!h||(j(h,a),f=h.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),o(f,a,l)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=W,window.lnCore.lnFill=ue,window.lnCore.renderList=ae);function V(e,t,n,r,o){if(!e||t===null)return!0;const i=r||"ln-component",s=e.type;if(s==="trigger"||s==="marker"||s==="string"||s==="list"||!s||t===""&&e.fallback!==void 0)return!0;const c=l=>{o?console.warn(l,o):console.warn(l)};if(s==="boolean"){const l=t.trim().toLowerCase();return l!==""&&l!=="true"&&l!=="false"&&l!=="1"&&l!=="0"?(c(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(s==="enum"){const l=e.values||[];return l.includes(t)?!0:(c(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${l.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(s==="integer"){if(!/^-?\d+$/.test(t))return c(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const l=parseInt(t,10);return e.min!==void 0&&l<e.min?(c(`[${i}] Value ${l} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&l>e.max?(c(`[${i}] Value ${l} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(s==="float")return isNaN(Number(t))?(c(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(s==="json")try{return JSON.parse(t),!0}catch(l){return c(`[${i}] Invalid JSON for attribute "${n}": ${l.message}. Fallback: ${e.fallback}.`),!1}return!0}function fe(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function de(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}function R(e,t,n,r){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",s=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&s.push(e);for(const c of s)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new r(c)}catch(l){console.error("["+n+"] init failed",c,l)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function we(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function he(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 pe(e){const t=H(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(i=>i.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=de(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 P(e,t,n,r){for(let o=0;o<e.length;o++){const i=e[o];if(!t[i.attribute])continue;const s=i.effects&&i.effects[n];s?s(t,n,r):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,r)}}function be(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=H(),o=r.byAttr.get(n);if(q()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&D(t)){const i=r.byDeclaredAttr.get(n),s=t.getAttribute(n);for(let c=0;c<i.length;c++)V(i[c].spec,s,n,i[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=r.byReactive.get(n);i&&P(i,t,n,e.oldValue),r.reactiveWildcard.length&&P(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let i=0;i<o.length;i++){const s=o[i];if(s.handler){s.handler(t,n,e.oldValue);continue}s.onAttributeChange&&t[s.attribute]?s.onAttributeChange(t,n):(R(t,s.selector,s.attribute,s.ComponentFn),s.onInit&&s.onInit(t))}}function ge(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,k(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{be(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function Q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ye(e){const t=Q();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,i=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;i&&r.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o];R(r,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o],s=i.query,c=Array.from(r.querySelectorAll(s));r.matches&&r.matches(s)&&c.push(r);for(let l=0;l<c.length;l++){const a=c[l];if(!document.contains(a)){const d=a[i.attribute];if(d&&typeof d.destroy=="function")try{d.destroy()}catch(f){console.error("["+i.attribute+"] destroy failed",a,f)}delete a[i.attribute]}}}}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,k(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{ye(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function z(e,t,n,r,o={}){const i=o.extraAttributes||[],s=o.onAttributeChange||null,c=o.onSubtreeChange||null,l=o.onInit||null,a=o.onAttrChange||null,d=o.effects||null,f=o.attributes||null,h=f?fe(f):d,S=f?new Set(Object.keys(f)):null,T=o.persist||null;function g(C){const b=C||document.body;if(R(b,e,t,n),f&&q())for(const p in f){const v=f[p],m=Array.from(b.querySelectorAll("["+p+"]"));b.matches&&b.matches("["+p+"]")&&m.push(b);for(let A=0;A<m.length;A++){const E=m[A];D(E)&&V(v,E.getAttribute(p),p,r,E)}}l&&l(b)}const y=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let b;for(;(b=C.exec(e))!==null;)y.push(b[1])}else y.push(e);pe({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:l,observed:y.concat(i),onAttributeChange:s,onAttrChange:a,effects:h,declared:S,persist:T}),ge();const u=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";Q().push({selector:e,attribute:t,ComponentFn:n,onInit:l,onSubtreeChange:c,query:u}),Ce(),window[t]=g;function w(){we()>0?he(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",w):w(),g}function G(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,n={},r=G(t);if(!r)return n;const o=r.split("&");for(let i=0;i<o.length;i++){const s=o[i];if(!s)continue;const c=s.indexOf(":"),l=c>-1?s.slice(0,c):s,a=c>-1?s.slice(c+1):"";if(l)try{n[l]=decodeURIComponent(a)}catch{n[l]=a}}return n}function me(e){if(!e)return null;const t=$();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const n=$();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(i){const s=n[i];return s===""?i:i+":"+encodeURIComponent(s)}).join("&");G(location.hash)!==o&&(location.hash=o)}function _e(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ke(e,t){if(!e||!e.hasAttribute("data-ln-hash"))return null;const n=e.getAttribute("data-ln-hash");if(n&&n.trim()!=="")return n.trim();const r=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return r?t?r+"-"+t:r:t||null}function Se(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Te(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function ve(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Ee(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=me,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=_e,window.lnCore.resolveHashNamespace=ke,window.lnCore.hashSortEncode=Se,window.lnCore.hashSortDecode=Te,window.lnCore.hashFilterEncode=ve,window.lnCore.hashFilterDecode=Ee);const _=["Ctrl","Alt","Shift","Meta"],Oe={alt:"Alt",control:"Ctrl",ctrl:"Ctrl",meta:"Meta",command:"Meta",cmd:"Meta",option:"Alt",shift:"Shift",esc:"Escape",escape:"Escape",space:"Space",spacebar:"Space",enter:"Enter",return:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",del:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",arrowup:"ArrowUp",up:"ArrowUp",arrowdown:"ArrowDown",down:"ArrowDown",arrowleft:"ArrowLeft",left:"ArrowLeft",arrowright:"ArrowRight",right:"ArrowRight"};function J(e){if(e===" ")return"Space";const t=String(e||"").trim();if(!t)return"";const n=Oe[t.toLowerCase()];return n||(t.length===1||/^f\d{1,2}$/i.test(t)?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1))}function X(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return"";const n=t.split("+"),r=new Set;let o="";for(let s=0;s<n.length;s++){const c=J(n[s]);if(!c)return"";if(_.indexOf(c)!==-1){r.add(c);continue}if(o)return"";o=c}if(!o)return"";const i=[];for(let s=0;s<_.length;s++)r.has(_[s])&&i.push(_[s]);return i.push(o),i.join("+")}function xe(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return[];const n=t.split(/[\s,]+/),r=[];for(let o=0;o<n.length;o++){const i=X(n[o]);i&&r.indexOf(i)===-1&&r.push(i)}return r}function Le(e,t){const n=String(t||"").trim();if(!n||/[\s,]/.test(n))return"";const r=String(e||"").replace(/\s*\+\s*/g,"+").trim();return/[\s,]/.test(r)?"":X(r?r+"+"+n:n)}function De(e){if(!e)return"";const t=J(e.key);if(!t||_.indexOf(t)!==-1)return"";const n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&n.push("Meta"),n.push(t),n.join("+")}function Ie(e){if(!e||!e.tagName)return null;const t=String(e.tagName).toLowerCase();if(t==="button"||t==="a"&&e.hasAttribute&&e.hasAttribute("href"))return"click";if(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)return"focus";if(e.hasAttribute&&e.hasAttribute("contenteditable")){const n=e.getAttribute("contenteditable");if(n===""||String(n).toLowerCase()!=="false")return"focus"}return null}function Re(e,t,n,r){if(!e||!t||n!=="click"||e.target!==t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)return!1;const o=String(t.tagName||"").toLowerCase();return o==="button"?r==="Enter"||r==="Space":o==="a"&&t.hasAttribute&&t.hasAttribute("href")&&r==="Enter"}(function(){const e="data-ln-key",t="lnKey",n="data-ln-key-target",r="data-ln-key-allow-input",o="data-ln-key-modifier",i="data-ln-key-for",s="lnKeyFor";if(window[t]!==void 0)return;function c(u){const w=u[t];if(w){if(!u.hasAttribute(e)){w.destroy();return}w.sync()}}function l(u){const w=u[s];w&&!u.hasAttribute(i)&&w.destroy()}const a={"data-ln-key":{type:"string",effect:c,description:"Keyboard shortcut combination (e.g. meta+k, ctrl+s)"},"data-ln-key-target":{type:"string",effect:c,description:"Target element selector or ID to receive synthetic click or focus"},"data-ln-key-allow-input":{type:"boolean",effect:c,description:"Permits shortcut execution even when focused inside an editable input"}},d={"data-ln-key-for":{type:"string",effect:l,description:"Target element ID that this shortcut badge is displayed for"},"data-ln-key-modifier":{type:"string",description:"Platform modifier text representation override"}},f=new Set;let h=null;function S(){h||(h=function(u){if(u.defaultPrevented||u.isComposing||u.repeat)return;const w=De(u);if(!w)return;const C=ee(u.target),b=document.querySelectorAll("["+e+"], ["+i+"]");let p=null,v=!1,m=!1;for(let B=0;B<b.length;B++){const F=b[B],O=F[t]||F[s];if(!O||!O.matches(w)||C&&!O.allowsInput())continue;const x=O.resolveTarget(),L=Ie(x);if(!(!L||!ne(x,L))){if(Re(u,x,L,w)){m=!0;continue}p?v=!0:p={host:F,target:x,action:L}}}if(m||!p)return;v&&console.warn('[ln-key] Duplicate active shortcut "'+w+'"; first DOM match wins.');const A={source:p.host,target:p.target,action:p.action,key:w,event:u};Y(p.host,"ln-key:before-trigger",A).defaultPrevented||(u.preventDefault(),p.target[p.action](),K(p.host,"ln-key:trigger",A))},document.addEventListener("keydown",h))}function T(){f.size>0||!h||(document.removeEventListener("keydown",h),h=null)}function g(u){return this.dom=u,this.shortcuts=[],f.add(this),this.sync(),S(),this}g.prototype.sync=function(){this.shortcuts=xe(this.dom.getAttribute(e))},g.prototype.matches=function(u){return this.shortcuts.indexOf(u)!==-1},g.prototype.allowsInput=function(){return this.dom.hasAttribute(r)},g.prototype.resolveTarget=function(){const u=this.dom.getAttribute(n);return u?M(u,n):this.dom},g.prototype.destroy=function(){this.dom[t]&&(f.delete(this),delete this.dom[t],T())};function y(u){return this.dom=u,f.add(this),S(),this}y.prototype._modifierContext=function(){return this.dom.closest("["+o+"]")},y.prototype.shortcut=function(){const u=this._modifierContext(),w=u?u.getAttribute(o):"";return Le(w,this.dom.textContent)},y.prototype.matches=function(u){return this.shortcut()===u},y.prototype.allowsInput=function(){if(this.dom.hasAttribute(r))return!0;const u=this._modifierContext();return!!(u&&u.hasAttribute(r))},y.prototype.resolveTarget=function(){return M(this.dom.getAttribute(i),i)},y.prototype.destroy=function(){this.dom[s]&&(f.delete(this),delete this.dom[s],T())};function M(u,w){if(!u)return null;try{const C=document.querySelector(u);return C||console.warn("[ln-key] Target not found for "+w+' selector "'+u+'".'),C}catch{return console.warn("[ln-key] Invalid "+w+' selector "'+u+'".'),null}}z(e,t,g,"ln-key",{attributes:a}),z(i,s,y,"ln-key-for",{attributes:d})})()})();
1
+ (function(){"use strict";function U(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function I(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let r=null;for(let o=1;o<t.length;o++)if(t[o]&&t[o].nodeType===1){r=t[o];break}if(!I(r))return}e.apply(console,t)}}function q(e,t,n){const r=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,r),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:r}))}function Y(e,t,n){const r=n||{};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 _(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){_(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}function Z(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)}function ee(e){if(!e)return!1;if(typeof e.closest=="function")return!!e.closest('input, textarea, select, [contenteditable]:not([contenteditable="false"])');const t=String(e.tagName||"").toLowerCase();return t==="input"||t==="textarea"||t==="select"||!!e.isContentEditable}function te(e){return!!(!e||e.disabled||typeof e.getAttribute=="function"&&e.getAttribute("aria-disabled")==="true"||typeof e.closest=="function"&&e.closest("[inert]"))}function ne(e,t){return!e||!document.contains(e)||te(e)||t&&typeof e[t]!="function"?!1:Z(e)}const K={};function re(e,t){K[e]=t}function oe(e){return K[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=re,window.lnCore.getDataMapper=oe);function ie(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,_(function(){new MutationObserver(function(){q(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const N={};function le(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];N[n]=t}function se(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return N[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=le,window.lnCore.getLocaleFallback=se,window.lnCore.ensureLocaleObserver=ie);const L={};function ce(e,t){L[e]||(L[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=L[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function W(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let l=0;l<n.length;l++){const c=n[l],s=c.getAttribute("data-ln-field");t[s]!=null&&(c.textContent=t[s])}const r=e.querySelectorAll("[data-ln-attr]");for(let l=0;l<r.length;l++){const c=r[l],s=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<s.length;a++){const d=s[a].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();t[h]!=null&&c.setAttribute(f,t[h])}}const o=e.querySelectorAll("[data-ln-show]");for(let l=0;l<o.length;l++){const c=o[l],s=c.getAttribute("data-ln-show");s in t&&c.classList.toggle("hidden",!t[s])}const i=e.querySelectorAll("[data-ln-class]");for(let l=0;l<i.length;l++){const c=i[l],s=c.getAttribute("data-ln-class").split(",");for(let a=0;a<s.length;a++){const d=s[a].trim().split(":");if(d.length!==2)continue;const f=d[0].trim(),h=d[1].trim();h in t&&c.classList.toggle(f,!!t[h])}}return e}function ue(e,t){e.matches&&e.matches("[data-ln-form], [data-ln-fillable]")&&(window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",e,t??null),e.dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0})));const n=e.querySelectorAll("[data-ln-form], [data-ln-fillable]");for(let r=0;r<n.length;r++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[r],t??null),n[r].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)W(e.target,e.detail);else{const t=e.target.querySelectorAll("[data-ln-field]");for(let n=0;n<t.length;n++)t[n].textContent=""}})));function j(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(l,c){return t[c]!==void 0?t[c]:""}))}const r=function(i,l){return t[l]!==void 0?t[l]:""},o=Array.from(e.querySelectorAll("*"));e.nodeType===1&&o.push(e);for(let i=0;i<o.length;i++){const l=o[i],c=l.attributes;for(let s=0;s<c.length;s++){const a=c[s];a.value.indexOf("{{")!==-1&&l.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,r))}}return e}function ae(e,t,n,r,o,i){const l={};for(let s=0;s<e.children.length;s++){const a=e.children[s],d=a.getAttribute("data-ln-render-key");d&&(l[d]=a)}const c=document.createDocumentFragment();for(let s=0;s<t.length;s++){const a=t[s],d=String(r(a));let f=l[d];if(f)o(f,a,s);else{const h=ce(n,i);if(!h||(j(h,a),f=h.firstElementChild,!f))continue;f.setAttribute("data-ln-render-key",d),o(f,a,s)}c.appendChild(f)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=j,window.lnCore.fill=W,window.lnCore.lnFill=ue,window.lnCore.renderList=ae);function V(e,t,n,r,o){if(!e||t===null)return!0;const i=r||"ln-component",l=e.type;if(l==="trigger"||l==="marker"||l==="string"||l==="list"||!l||t===""&&e.fallback!==void 0)return!0;const c=s=>{o?console.warn(s,o):console.warn(s)};if(l==="boolean"){const s=t.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(c(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(l==="enum"){const s=e.values||[];return s.includes(t)?!0:(c(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${s.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(l==="integer"){if(!/^-?\d+$/.test(t))return c(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const s=parseInt(t,10);return e.min!==void 0&&s<e.min?(c(`[${i}] Value ${s} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&s>e.max?(c(`[${i}] Value ${s} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(l==="float")return isNaN(Number(t))?(c(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(l==="json")try{return JSON.parse(t),!0}catch(s){return c(`[${i}] Invalid JSON for attribute "${n}": ${s.message}. Fallback: ${e.fallback}.`),!1}return!0}function fe(e){const t={};for(const n in e){const r=e[n];r&&r.effect&&(t[n]=r.effect)}return Object.keys(t).length?t:null}function de(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}function R(e,t,n,r){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",l=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&l.push(e);for(const c of l)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new r(c)}catch(s){console.error("["+n+"] init failed",c,s)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function we(){return typeof window<"u"&&window.lnCore&&window.lnCore._bootHolds||0}function he(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 pe(e){const t=H(),n=e.observed||[];for(let r=0;r<n.length;r++){const o=n[r];t.byAttr.has(o)||t.byAttr.set(o,[]),t.byAttr.get(o).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const r in e.attributes){t.byDeclaredAttr.has(r)||t.byDeclaredAttr.set(r,[]);const o=t.byDeclaredAttr.get(r);o.some(i=>i.componentTag===e.componentTag)||o.push({spec:e.attributes[r],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const r=de(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 P(e,t,n,r){for(let o=0;o<e.length;o++){const i=e[o];if(!t[i.attribute])continue;const l=i.effects&&i.effects[n];l?l(t,n,r):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,r)}}function be(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const r=H(),o=r.byAttr.get(n);if(U()&&r.byDeclaredAttr&&r.byDeclaredAttr.has(n)&&I(t)){const i=r.byDeclaredAttr.get(n),l=t.getAttribute(n);for(let c=0;c<i.length;c++)V(i[c].spec,l,n,i[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||o)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=r.byReactive.get(n);i&&P(i,t,n,e.oldValue),r.reactiveWildcard.length&&P(r.reactiveWildcard,t,n,e.oldValue)}if(o)for(let i=0;i<o.length;i++){const l=o[i];if(l.handler){l.handler(t,n,e.oldValue);continue}l.onAttributeChange&&t[l.attribute]?l.onAttributeChange(t,n):(R(t,l.selector,l.attribute,l.ComponentFn),l.onInit&&l.onInit(t))}}function ge(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,_(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{be(t[n])}catch(r){console.error("[ln-core] mutation handler failed",t[n].target,r)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function Q(){return window.lnCore=window.lnCore||{},window.lnCore._lifecycleRegistry=window.lnCore._lifecycleRegistry||[]}function ye(e){const t=Q();if(t.length){if(e.target)for(let n=0;n<t.length;n++){const r=t[n];if(r.onSubtreeChange){const o=r.query,i=e.target.nodeType===1?e.target.matches(o)?e.target:e.target.closest(o):e.target.parentElement?e.target.parentElement.closest(o):null;i&&r.onSubtreeChange(i,e)}}for(let n=0;n<e.addedNodes.length;n++){const r=e.addedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o];R(r,i.selector,i.attribute,i.ComponentFn),i.onInit&&i.onInit(r)}}for(let n=0;n<e.removedNodes.length;n++){const r=e.removedNodes[n];if(r.nodeType===1)for(let o=0;o<t.length;o++){const i=t[o],l=i.query,c=Array.from(r.querySelectorAll(l));r.matches&&r.matches(l)&&c.push(r);for(let s=0;s<c.length;s++){const a=c[s];if(!document.contains(a)){const d=a[i.attribute];if(d&&typeof d.destroy=="function")try{d.destroy()}catch(f){console.error("["+i.attribute+"] destroy failed",a,f)}delete a[i.attribute]}}}}}}function Ce(){window.lnCore=window.lnCore||{},!window.lnCore._lifecycleObserverBound&&(window.lnCore._lifecycleObserverBound=!0,_(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++){const r=t[n];if(r.type==="childList")try{ye(r)}catch(o){console.error("[ln-core] lifecycle handler failed",r.target,o)}}}).observe(document.body,{childList:!0,subtree:!0})},"ln-core"))}function z(e,t,n,r,o={}){const i=o.extraAttributes||[],l=o.onAttributeChange||null,c=o.onSubtreeChange||null,s=o.onInit||null,a=o.onAttrChange||null,d=o.effects||null,f=o.attributes||null,h=f?fe(f):d,k=f?new Set(Object.keys(f)):null,S=o.persist||null;function g(C){const b=C||document.body;if(R(b,e,t,n),f&&U())for(const p in f){const v=f[p],m=Array.from(b.querySelectorAll("["+p+"]"));b.matches&&b.matches("["+p+"]")&&m.push(b);for(let A=0;A<m.length;A++){const T=m[A];I(T)&&V(v,T.getAttribute(p),p,r,T)}}s&&s(b)}const y=[];if(e.indexOf("[")!==-1){const C=/\[([\w-]+)/g;let b;for(;(b=C.exec(e))!==null;)y.push(b[1])}else y.push(e);pe({selector:e,attribute:t,componentTag:r,attributes:f,ComponentFn:n,onInit:s,observed:y.concat(i),onAttributeChange:l,onAttrChange:a,effects:h,declared:k,persist:S}),ge();const u=e.indexOf("[")!==-1||e.indexOf(".")!==-1||e.indexOf("#")!==-1?e:"["+e+"]";Q().push({selector:e,attribute:t,ComponentFn:n,onInit:s,onSubtreeChange:c,query:u}),Ce(),window[t]=g;function w(){we()>0?he(function(){g(document.body)}):g(document.body)}return document.readyState==="loading"?document.addEventListener("DOMContentLoaded",w):w(),g}function G(e){return(e||"").replace(/^#/,"")}function $(e){const t=e===void 0?location.hash:e,n={},r=G(t);if(!r)return n;const o=r.split("&");for(let i=0;i<o.length;i++){const l=o[i];if(!l)continue;const c=l.indexOf(":"),s=c>-1?l.slice(0,c):l,a=c>-1?l.slice(c+1):"";if(s)try{n[s]=decodeURIComponent(a)}catch{n[s]=a}}return n}function me(e){if(!e)return null;const t=$();return e in t?t[e]:null}function Ae(e,t){if(!e)return;const n=$();t==null?delete n[e]:n[e]=String(t);const o=Object.keys(n).map(function(i){const l=n[i];return l===""?i:i+":"+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 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 ke(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function Se(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 ve(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function Te(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),r=e.slice(t+1),o=r?r.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:o}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=$,window.lnCore.hashGet=me,window.lnCore.hashSet=Ae,window.lnCore.hashLinkClick=xe,window.lnCore.resolveHashNamespace=_e,window.lnCore.hashSortEncode=ke,window.lnCore.hashSortDecode=Se,window.lnCore.hashFilterEncode=ve,window.lnCore.hashFilterDecode=Te);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);const x=["Ctrl","Alt","Shift","Meta"],Oe={alt:"Alt",control:"Ctrl",ctrl:"Ctrl",meta:"Meta",command:"Meta",cmd:"Meta",option:"Alt",shift:"Shift",esc:"Escape",escape:"Escape",space:"Space",spacebar:"Space",enter:"Enter",return:"Enter",tab:"Tab",backspace:"Backspace",delete:"Delete",del:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",arrowup:"ArrowUp",up:"ArrowUp",arrowdown:"ArrowDown",down:"ArrowDown",arrowleft:"ArrowLeft",left:"ArrowLeft",arrowright:"ArrowRight",right:"ArrowRight"};function J(e){if(e===" ")return"Space";const t=String(e||"").trim();if(!t)return"";const n=Oe[t.toLowerCase()];return n||(t.length===1||/^f\d{1,2}$/i.test(t)?t.toUpperCase():t.charAt(0).toUpperCase()+t.slice(1))}function X(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return"";const n=t.split("+"),r=new Set;let o="";for(let l=0;l<n.length;l++){const c=J(n[l]);if(!c)return"";if(x.indexOf(c)!==-1){r.add(c);continue}if(o)return"";o=c}if(!o)return"";const i=[];for(let l=0;l<x.length;l++)r.has(x[l])&&i.push(x[l]);return i.push(o),i.join("+")}function De(e){const t=String(e||"").replace(/\s*\+\s*/g,"+").trim();if(!t)return[];const n=t.split(/[\s,]+/),r=[];for(let o=0;o<n.length;o++){const i=X(n[o]);i&&r.indexOf(i)===-1&&r.push(i)}return r}function Ie(e,t){const n=String(t||"").trim();if(!n||/[\s,]/.test(n))return"";const r=String(e||"").replace(/\s*\+\s*/g,"+").trim();return/[\s,]/.test(r)?"":X(r?r+"+"+n:n)}function Le(e){if(!e)return"";const t=J(e.key);if(!t||x.indexOf(t)!==-1)return"";const n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&n.push("Meta"),n.push(t),n.join("+")}function Re(e){if(!e||!e.tagName)return null;const t=String(e.tagName).toLowerCase();if(t==="button"||t==="a"&&e.hasAttribute&&e.hasAttribute("href"))return"click";if(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)return"focus";if(e.hasAttribute&&e.hasAttribute("contenteditable")){const n=e.getAttribute("contenteditable");if(n===""||String(n).toLowerCase()!=="false")return"focus"}return null}function $e(e,t,n,r){if(!e||!t||n!=="click"||e.target!==t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)return!1;const o=String(t.tagName||"").toLowerCase();return o==="button"?r==="Enter"||r==="Space":o==="a"&&t.hasAttribute&&t.hasAttribute("href")&&r==="Enter"}(function(){const e="data-ln-key",t="lnKey",n="data-ln-key-target",r="data-ln-key-allow-input",o="data-ln-key-modifier",i="data-ln-key-for",l="lnKeyFor";if(window[t]!==void 0)return;function c(u){const w=u[t];if(w){if(!u.hasAttribute(e)){w.destroy();return}w.sync()}}function s(u){const w=u[l];w&&!u.hasAttribute(i)&&w.destroy()}const a={"data-ln-key":{type:"string",effect:c,description:"Keyboard shortcut combination (e.g. meta+k, ctrl+s)"},"data-ln-key-target":{type:"string",effect:c,description:"Target element selector or ID to receive synthetic click or focus"},"data-ln-key-allow-input":{type:"boolean",effect:c,description:"Permits shortcut execution even when focused inside an editable input"}},d={"data-ln-key-for":{type:"string",effect:s,description:"Target element ID that this shortcut badge is displayed for"},"data-ln-key-modifier":{type:"string",description:"Platform modifier text representation override"}},f=new Set;let h=null;function k(){h||(h=function(u){if(u.defaultPrevented||u.isComposing||u.repeat)return;const w=Le(u);if(!w)return;const C=ee(u.target),b=document.querySelectorAll("["+e+"], ["+i+"]");let p=null,v=!1,m=!1;for(let B=0;B<b.length;B++){const F=b[B],E=F[t]||F[l];if(!E||!E.matches(w)||C&&!E.allowsInput())continue;const O=E.resolveTarget(),D=Re(O);if(!(!D||!ne(O,D))){if($e(u,O,D,w)){m=!0;continue}p?v=!0:p={host:F,target:O,action:D}}}if(m||!p)return;v&&console.warn('[ln-key] Duplicate active shortcut "'+w+'"; first DOM match wins.');const A={source:p.host,target:p.target,action:p.action,key:w,event:u};Y(p.host,"ln-key:before-trigger",A).defaultPrevented||(u.preventDefault(),p.target[p.action](),q(p.host,"ln-key:trigger",A))},document.addEventListener("keydown",h))}function S(){f.size>0||!h||(document.removeEventListener("keydown",h),h=null)}function g(u){return this.dom=u,this.shortcuts=[],f.add(this),this.sync(),k(),this}g.prototype.sync=function(){this.shortcuts=De(this.dom.getAttribute(e))},g.prototype.matches=function(u){return this.shortcuts.indexOf(u)!==-1},g.prototype.allowsInput=function(){return this.dom.hasAttribute(r)},g.prototype.resolveTarget=function(){const u=this.dom.getAttribute(n);return u?M(u,n):this.dom},g.prototype.destroy=function(){this.dom[t]&&(f.delete(this),delete this.dom[t],S())};function y(u){return this.dom=u,f.add(this),k(),this}y.prototype._modifierContext=function(){return this.dom.closest("["+o+"]")},y.prototype.shortcut=function(){const u=this._modifierContext(),w=u?u.getAttribute(o):"";return Ie(w,this.dom.textContent)},y.prototype.matches=function(u){return this.shortcut()===u},y.prototype.allowsInput=function(){if(this.dom.hasAttribute(r))return!0;const u=this._modifierContext();return!!(u&&u.hasAttribute(r))},y.prototype.resolveTarget=function(){return M(this.dom.getAttribute(i),i)},y.prototype.destroy=function(){this.dom[l]&&(f.delete(this),delete this.dom[l],S())};function M(u,w){if(!u)return null;try{const C=document.querySelector(u);return C||console.warn("[ln-key] Target not found for "+w+' selector "'+u+'".'),C}catch{return console.warn("[ln-key] Invalid "+w+' selector "'+u+'".'),null}}z(e,t,g,"ln-key",{attributes:a}),z(i,l,y,"ln-key-for",{attributes:d})})()})();
@@ -1,56 +1,56 @@
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-key",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {
6
- "data-ln-debug": {
7
- "direction": null,
8
- "sources": [
9
- "ln-key-dev.scss"
10
- ]
11
- },
12
- "data-ln-key": {
13
- "direction": "author",
14
- "sources": [
15
- "ln-key-dev.scss",
16
- "src/ln-key.js"
17
- ],
18
- "type": "string",
19
- "description": "Keyboard shortcut combination (e.g. meta+k, ctrl+s)"
20
- },
21
- "data-ln-key-allow-input": {
22
- "direction": "author",
23
- "sources": [
24
- "src/ln-key.js"
25
- ],
26
- "type": "boolean",
27
- "description": "Permits shortcut execution even when focused inside an editable input"
28
- },
29
- "data-ln-key-for": {
30
- "direction": "author",
31
- "sources": [
32
- "ln-key-dev.scss",
33
- "src/ln-key.js"
34
- ],
35
- "type": "string",
36
- "description": "Target element ID that this shortcut badge is displayed for"
37
- },
38
- "data-ln-key-modifier": {
39
- "direction": "author",
40
- "sources": [
41
- "src/ln-key.js"
42
- ],
43
- "type": "string",
44
- "description": "Platform modifier text representation override"
45
- },
46
- "data-ln-key-target": {
47
- "direction": "author",
48
- "sources": [
49
- "ln-key-dev.scss",
50
- "src/ln-key.js"
51
- ],
52
- "type": "string",
53
- "description": "Target element selector or ID to receive synthetic click or focus"
54
- }
55
- }
56
- }
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-key",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {
6
+ "data-ln-debug": {
7
+ "direction": null,
8
+ "sources": [
9
+ "ln-key-dev.scss"
10
+ ]
11
+ },
12
+ "data-ln-key": {
13
+ "direction": "author",
14
+ "sources": [
15
+ "ln-key-dev.scss",
16
+ "src/ln-key.js"
17
+ ],
18
+ "type": "string",
19
+ "description": "Keyboard shortcut combination (e.g. meta+k, ctrl+s)"
20
+ },
21
+ "data-ln-key-allow-input": {
22
+ "direction": "author",
23
+ "sources": [
24
+ "src/ln-key.js"
25
+ ],
26
+ "type": "boolean",
27
+ "description": "Permits shortcut execution even when focused inside an editable input"
28
+ },
29
+ "data-ln-key-for": {
30
+ "direction": "author",
31
+ "sources": [
32
+ "ln-key-dev.scss",
33
+ "src/ln-key.js"
34
+ ],
35
+ "type": "string",
36
+ "description": "Target element ID that this shortcut badge is displayed for"
37
+ },
38
+ "data-ln-key-modifier": {
39
+ "direction": "author",
40
+ "sources": [
41
+ "src/ln-key.js"
42
+ ],
43
+ "type": "string",
44
+ "description": "Platform modifier text representation override"
45
+ },
46
+ "data-ln-key-target": {
47
+ "direction": "author",
48
+ "sources": [
49
+ "ln-key-dev.scss",
50
+ "src/ln-key.js"
51
+ ],
52
+ "type": "string",
53
+ "description": "Target element selector or ID to receive synthetic click or focus"
54
+ }
55
+ }
56
+ }
@@ -27,16 +27,16 @@ import { browserAlreadyHandles, composeExternalShortcut, eventToShortcut, inferK
27
27
  if (instance && !el.hasAttribute(FOR_ATTRIBUTE)) instance.destroy();
28
28
  }
29
29
 
30
- const ATTRIBUTES = {
31
- 'data-ln-key': { type: 'string', effect: _syncKey, description: 'Keyboard shortcut combination (e.g. meta+k, ctrl+s)' },
32
- 'data-ln-key-target': { type: 'string', effect: _syncKey, description: 'Target element selector or ID to receive synthetic click or focus' },
33
- 'data-ln-key-allow-input': { type: 'boolean', effect: _syncKey, description: 'Permits shortcut execution even when focused inside an editable input' }
34
- };
35
-
36
- const FOR_ATTRIBUTES = {
37
- 'data-ln-key-for': { type: 'string', effect: _syncKeyFor, description: 'Target element ID that this shortcut badge is displayed for' },
38
- 'data-ln-key-modifier': { type: 'string', description: 'Platform modifier text representation override' }
39
- };
30
+ const ATTRIBUTES = {
31
+ 'data-ln-key': { type: 'string', effect: _syncKey, description: 'Keyboard shortcut combination (e.g. meta+k, ctrl+s)' },
32
+ 'data-ln-key-target': { type: 'string', effect: _syncKey, description: 'Target element selector or ID to receive synthetic click or focus' },
33
+ 'data-ln-key-allow-input': { type: 'boolean', effect: _syncKey, description: 'Permits shortcut execution even when focused inside an editable input' }
34
+ };
35
+
36
+ const FOR_ATTRIBUTES = {
37
+ 'data-ln-key-for': { type: 'string', effect: _syncKeyFor, description: 'Target element ID that this shortcut badge is displayed for' },
38
+ 'data-ln-key-modifier': { type: 'string', description: 'Platform modifier text representation override' }
39
+ };
40
40
 
41
41
  const instances = new Set();
42
42
  let keydownListener = null;
@@ -1,8 +1,8 @@
1
- @use '../../theme/config/mixins' as *;
2
-
3
- [data-ln-debug] {
4
- // 1. Link Anchor Check: data-ln-link container must contain at least one <a href="...">
5
- [data-ln-link]:not(:has(a[href])) {
6
- @include dev-dom-error("[data-ln-link] container is missing a required child <a href=\"...\"> link.");
7
- }
8
- }
1
+ @use '../../theme/config/mixins' as *;
2
+
3
+ [data-ln-debug] {
4
+ // 1. Link Anchor Check: data-ln-link container must contain at least one <a href="...">
5
+ [data-ln-link]:not(:has(a[href])) {
6
+ @include dev-dom-error("[data-ln-link] container is missing a required child <a href=\"...\"> link.");
7
+ }
8
+ }
@@ -1 +1 @@
1
- (function(){"use strict";function R(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function k(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let i=null;for(let u=1;u<t.length;u++)if(t[u]&&t[u].nodeType===1){i=t[u];break}if(!k(i))return}e.apply(console,t)}}function q(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 B(e,t,n){const i=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,i);const u=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:i});return e.dispatchEvent(u),u}function g(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){g(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const _={};function I(e,t){_[e]=t}function M(e){return _[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=I,window.lnCore.getDataMapper=M);function F(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,g(function(){new MutationObserver(function(){q(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const v={};function W(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];v[n]=t}function N(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return v[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=W,window.lnCore.getLocaleFallback=N,window.lnCore.ensureLocaleObserver=F);const C={};function V(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=C[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function S(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let r=0;r<n.length;r++){const c=n[r],s=c.getAttribute("data-ln-field");t[s]!=null&&(c.textContent=t[s])}const i=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<i.length;r++){const c=i[r],s=c.getAttribute("data-ln-attr").split(",");for(let a=0;a<s.length;a++){const w=s[a].trim().split(":");if(w.length!==2)continue;const h=w[0].trim(),p=w[1].trim();t[p]!=null&&c.setAttribute(h,t[p])}}const u=e.querySelectorAll("[data-ln-show]");for(let r=0;r<u.length;r++){const c=u[r],s=c.getAttribute("data-ln-show");s in t&&c.classList.toggle("hidden",!t[s])}const o=e.querySelectorAll("[data-ln-class]");for(let r=0;r<o.length;r++){const c=o[r],s=c.getAttribute("data-ln-class").split(",");for(let a=0;a<s.length;a++){const w=s[a].trim().split(":");if(w.length!==2)continue;const h=w[0].trim(),p=w[1].trim();p in t&&c.classList.toggle(h,!!t[p])}}return e}function j(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)S(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 L(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const o=n.currentNode;o.textContent.indexOf("{{")!==-1&&(o.textContent=o.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const i=function(o,r){return t[r]!==void 0?t[r]:""},u=Array.from(e.querySelectorAll("*"));e.nodeType===1&&u.push(e);for(let o=0;o<u.length;o++){const r=u[o],c=r.attributes;for(let s=0;s<c.length;s++){const a=c[s];a.value.indexOf("{{")!==-1&&r.setAttribute(a.name,a.value.replace(/\{\{\s*(\w+)\s*\}\}/g,i))}}return e}function K(e,t,n,i,u,o){const r={};for(let s=0;s<e.children.length;s++){const a=e.children[s],w=a.getAttribute("data-ln-render-key");w&&(r[w]=a)}const c=document.createDocumentFragment();for(let s=0;s<t.length;s++){const a=t[s],w=String(i(a));let h=r[w];if(h)u(h,a,s);else{const p=V(n,o);if(!p||(L(p,a),h=p.firstElementChild,!h))continue;h.setAttribute("data-ln-render-key",w),u(h,a,s)}c.appendChild(h)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=L,window.lnCore.fill=S,window.lnCore.lnFill=j,window.lnCore.renderList=K);function H(e,t,n,i,u){if(!e||t===null)return!0;const o=i||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=s=>{u?console.warn(s,u):console.warn(s)};if(r==="boolean"){const s=t.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(c(`[${o}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const s=e.values||[];return s.includes(t)?!0:(c(`[${o}] Invalid value "${t}" for attribute "${n}". Allowed: ${s.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${o}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const s=parseInt(t,10);return e.min!==void 0&&s<e.min?(c(`[${o}] Value ${s} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&s>e.max?(c(`[${o}] Value ${s} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${o}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(s){return c(`[${o}] Invalid JSON for attribute "${n}": ${s.message}. Fallback: ${e.fallback}.`),!1}return!0}function U(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}function Y(e,t,n,i){if(e.nodeType!==1)return;const o=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r=Array.from(e.querySelectorAll(o));e.matches&&e.matches(o)&&r.push(e);for(const c of r)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new i(c)}catch(s){console.error("["+n+"] init failed",c,s)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function E(){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 G(e){const t=E(),n=e.observed||[];for(let i=0;i<n.length;i++){const u=n[i];t.byAttr.has(u)||t.byAttr.set(u,[]),t.byAttr.get(u).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 u=t.byDeclaredAttr.get(i);u.some(o=>o.componentTag===e.componentTag)||u.push({spec:e.attributes[i],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const i=U(e);if(i===null)t.reactiveWildcard.push(e);else for(const u of i)t.byReactive.has(u)||t.byReactive.set(u,[]),t.byReactive.get(u).push(e)}e.persist&&t.persist.push(e)}function O(e,t,n,i){for(let u=0;u<e.length;u++){const o=e[u];if(!t[o.attribute])continue;const r=o.effects&&o.effects[n];r?r(t,n,i):o.onAttrChange&&(!o.declared||o.declared.has(n))&&o.onAttrChange(t,n,i)}}function J(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const i=E(),u=i.byAttr.get(n);if(R()&&i.byDeclaredAttr&&i.byDeclaredAttr.has(n)&&k(t)){const o=i.byDeclaredAttr.get(n),r=t.getAttribute(n);for(let c=0;c<o.length;c++)H(o[c].spec,r,n,o[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||u)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const o=i.byReactive.get(n);o&&O(o,t,n,e.oldValue),i.reactiveWildcard.length&&O(i.reactiveWildcard,t,n,e.oldValue)}if(u)for(let o=0;o<u.length;o++){const r=u[o];if(r.handler){r.handler(t,n,e.oldValue);continue}r.onAttributeChange&&t[r.attribute]?r.onAttributeChange(t,n):(Y(t,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(t))}}function P(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,g(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{J(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 Q(e,t){G({observed:e,handler:t}),P()}function D(e){return(e||"").replace(/^#/,"")}function m(e){const t=e===void 0?location.hash:e,n={},i=D(t);if(!i)return n;const u=i.split("&");for(let o=0;o<u.length;o++){const r=u[o];if(!r)continue;const c=r.indexOf(":"),s=c>-1?r.slice(0,c):r,a=c>-1?r.slice(c+1):"";if(s)try{n[s]=decodeURIComponent(a)}catch{n[s]=a}}return n}function z(e){if(!e)return null;const t=m();return e in t?t[e]:null}function X(e,t){if(!e)return;const n=m();t==null?delete n[e]:n[e]=String(t);const u=Object.keys(n).map(function(o){const r=n[o];return r===""?o:o+":"+encodeURIComponent(r)}).join("&");D(location.hash)!==u&&(location.hash=u)}function Z(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ee(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 te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ne(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function re(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function ie(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),u=i?i.split(",").map(function(o){try{return decodeURIComponent(o)}catch{return o}}).filter(Boolean):[];return{key:n,values:u}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=m,window.lnCore.hashGet=z,window.lnCore.hashSet=X,window.lnCore.hashLinkClick=Z,window.lnCore.resolveHashNamespace=ee,window.lnCore.hashSortEncode=te,window.lnCore.hashSortDecode=ne,window.lnCore.hashFilterEncode=re,window.lnCore.hashFilterDecode=ie),(function(){const e="data-ln-link",t="lnLink";if(window[t]!==void 0)return;let n=null;function i(){n=document.createElement("div"),n.className="ln-link-status",document.body.appendChild(n)}function u(l){n&&(n.textContent=l,n.classList.add("ln-link-status--visible"))}function o(){n&&n.classList.remove("ln-link-status--visible")}function r(l,d){if(d.target.closest("a, button, input, select, textarea"))return;const f=l.querySelector("a");if(!f)return;const b=f.getAttribute("href");if(!b)return;if(d.ctrlKey||d.metaKey||d.button===1){window.open(b,"_blank","noopener,noreferrer");return}B(l,"ln-link:navigate",{target:l,href:b,link:f}).defaultPrevented||f.click()}function c(l){const d=l.querySelector("a");if(!d)return;const f=d.getAttribute("href");f&&u(f)}function s(){o()}function a(l){l[t+"Row"]||!l.querySelector("a")||(l[t+"Row"]=!0,l._lnLinkClick=function(f){r(l,f)},l._lnLinkEnter=function(){c(l)},l.addEventListener("click",l._lnLinkClick),l.addEventListener("mouseenter",l._lnLinkEnter),l.addEventListener("mouseleave",s))}function w(l){l[t+"Row"]&&(l._lnLinkClick&&l.removeEventListener("click",l._lnLinkClick),l._lnLinkEnter&&l.removeEventListener("mouseenter",l._lnLinkEnter),l.removeEventListener("mouseleave",s),delete l._lnLinkClick,delete l._lnLinkEnter,delete l[t+"Row"])}function h(l){if(!l[t+"Init"])return;const d=l.tagName;if(d==="TABLE"||d==="TBODY"){const f=d==="TABLE"&&l.querySelector("tbody")||l;for(const b of f.querySelectorAll("tr"))w(b)}else w(l);delete l[t+"Init"]}function p(l){if(l[t+"Init"])return;l[t+"Init"]=!0;const d=l.tagName;if(d==="TABLE"||d==="TBODY"){const f=d==="TABLE"&&l.querySelector("tbody")||l;for(const b of f.querySelectorAll("tr"))a(b)}else a(l)}function y(l){l.hasAttribute&&l.hasAttribute(e)&&p(l);const d=l.querySelectorAll?l.querySelectorAll("["+e+"]"):[];for(const f of d)p(f)}function oe(){g(function(){new MutationObserver(function(d){for(const f of d)if(f.type==="childList"){for(const b of f.addedNodes)if(b.nodeType===1){y(b);const A=b.closest("["+e+"]");if(A)if(b.tagName==="TR")a(b);else{const x=A.tagName;if(x==="TABLE"||x==="TBODY"){const le=b.querySelectorAll?b.querySelectorAll("tr"):[];for(const se of le)a(se)}}}}}).observe(document.body,{childList:!0,subtree:!0}),Q([e],function(d){d.hasAttribute&&d.hasAttribute(e)?y(d):h(d)})},"ln-link")}function T(l){y(l)}window[t]={init:T,destroy:h};function $(){i(),oe(),T(document.body)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",$):$()})()})();
1
+ (function(){"use strict";function R(){return typeof window>"u"?!1:window.lnDebug===!0||window.lnCore&&window.lnCore._debugSink?!0:typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug")||document.body.querySelector("[data-ln-debug]")!==null:!1}function k(e){if(typeof window>"u")return!1;if(window.lnDebug===!0)return!0;if(window.lnCore&&window.lnCore._debugIsContained)return e?window.lnCore._debugIsContained(e):window.lnCore._debugSink!==null;if(e&&e.closest){const t=e.closest("[data-ln-debug]");return!(!t||typeof document<"u"&&t===document.documentElement)}return typeof document<"u"&&document.body?document.body.hasAttribute("data-ln-debug"):!1}if(typeof window<"u"&&(window.lnCore=window.lnCore||{},!window.lnCore._warnBound)){window.lnCore._warnBound=!0;const e=console.warn;console.warn=function(...t){if(typeof t[0]=="string"&&(t[0].startsWith("[ln-")||t[0].startsWith("[lnCore"))){let o=null;for(let u=1;u<t.length;u++)if(t[u]&&t[u].nodeType===1){o=t[u];break}if(!k(o))return}e.apply(console,t)}}function q(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o),e.dispatchEvent(new CustomEvent(t,{bubbles:!0,detail:o}))}function I(e,t,n){const o=n||{};window.lnCore._debugSink&&window.lnCore._debugSink("event",t,e,o);const u=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:o});return e.dispatchEvent(u),u}function g(e,t){if(!document.body){document.addEventListener("DOMContentLoaded",function(){g(e,t)}),console.warn("["+t+'] Script loaded before <body> — add "defer" to your <script> tag');return}e()}const v={};function B(e,t){v[e]=t}function M(e){return v[e]||{ingress:t=>t,egress:t=>t}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerDataMapper=B,window.lnCore.getDataMapper=M);function F(){typeof window>"u"||(window.lnCore=window.lnCore||{},!window.lnCore._localeObserverBound&&(window.lnCore._localeObserverBound=!0,g(function(){new MutationObserver(function(){q(document,"ln-core:locale-change",{})}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"],subtree:!0})},"ln-core")))}const _={};function W(e,t){if(!e||typeof t!="object")return;const n=e.toLowerCase().split("-")[0];_[n]=t}function N(e){if(!e)return null;const t=e.toLowerCase().split("-")[0];return _[t]||null}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.registerLocaleFallback=W,window.lnCore.getLocaleFallback=N,window.lnCore.ensureLocaleObserver=F);const C={};function V(e,t){C[e]||(C[e]=document.querySelector('[data-ln-template="'+e+'"]'));const n=C[e];return n?n.content.cloneNode(!0):(console.warn("["+(t||"ln-core")+'] Template "'+e+'" not found'),null)}function x(e,t){if(!e||!t)return e;const n=e.querySelectorAll("[data-ln-field]");for(let r=0;r<n.length;r++){const c=n[r],s=c.getAttribute("data-ln-field");t[s]!=null&&(c.textContent=t[s])}const o=e.querySelectorAll("[data-ln-attr]");for(let r=0;r<o.length;r++){const c=o[r],s=c.getAttribute("data-ln-attr").split(",");for(let d=0;d<s.length;d++){const w=s[d].trim().split(":");if(w.length!==2)continue;const h=w[0].trim(),p=w[1].trim();t[p]!=null&&c.setAttribute(h,t[p])}}const u=e.querySelectorAll("[data-ln-show]");for(let r=0;r<u.length;r++){const c=u[r],s=c.getAttribute("data-ln-show");s in t&&c.classList.toggle("hidden",!t[s])}const i=e.querySelectorAll("[data-ln-class]");for(let r=0;r<i.length;r++){const c=i[r],s=c.getAttribute("data-ln-class").split(",");for(let d=0;d<s.length;d++){const w=s[d].trim().split(":");if(w.length!==2)continue;const h=w[0].trim(),p=w[1].trim();p in t&&c.classList.toggle(h,!!t[p])}}return e}function j(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 o=0;o<n.length;o++)window.lnCore._debugSink&&window.lnCore._debugSink("event","ln-fill",n[o],t??null),n[o].dispatchEvent(new CustomEvent("ln-fill",{detail:t??null,bubbles:!0}));return e}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._fillBound||(window.lnCore._fillBound=!0,document.addEventListener("ln-fill",function(e){if(!(!e.target.matches||!e.target.matches("[data-ln-fillable]")))if(e.detail)x(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 S(e,t){if(!e||!t)return e;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(;n.nextNode();){const i=n.currentNode;i.textContent.indexOf("{{")!==-1&&(i.textContent=i.textContent.replace(/\{\{\s*(\w+)\s*\}\}/g,function(r,c){return t[c]!==void 0?t[c]:""}))}const o=function(i,r){return t[r]!==void 0?t[r]:""},u=Array.from(e.querySelectorAll("*"));e.nodeType===1&&u.push(e);for(let i=0;i<u.length;i++){const r=u[i],c=r.attributes;for(let s=0;s<c.length;s++){const d=c[s];d.value.indexOf("{{")!==-1&&r.setAttribute(d.name,d.value.replace(/\{\{\s*(\w+)\s*\}\}/g,o))}}return e}function U(e,t,n,o,u,i){const r={};for(let s=0;s<e.children.length;s++){const d=e.children[s],w=d.getAttribute("data-ln-render-key");w&&(r[w]=d)}const c=document.createDocumentFragment();for(let s=0;s<t.length;s++){const d=t[s],w=String(o(d));let h=r[w];if(h)u(h,d,s);else{const p=V(n,i);if(!p||(S(p,d),h=p.firstElementChild,!h))continue;h.setAttribute("data-ln-render-key",w),u(h,d,s)}c.appendChild(h)}e.textContent="",e.appendChild(c)}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.fillTemplate=S,window.lnCore.fill=x,window.lnCore.lnFill=j,window.lnCore.renderList=U);function K(e,t,n,o,u){if(!e||t===null)return!0;const i=o||"ln-component",r=e.type;if(r==="trigger"||r==="marker"||r==="string"||r==="list"||!r||t===""&&e.fallback!==void 0)return!0;const c=s=>{u?console.warn(s,u):console.warn(s)};if(r==="boolean"){const s=t.trim().toLowerCase();return s!==""&&s!=="true"&&s!=="false"&&s!=="1"&&s!=="0"?(c(`[${i}] Invalid value "${t}" for boolean attribute "${n}". Allowed: "true", "false", or presence-only.`),!1):!0}if(r==="enum"){const s=e.values||[];return s.includes(t)?!0:(c(`[${i}] Invalid value "${t}" for attribute "${n}". Allowed: ${s.join(", ")}. Fallback: "${e.fallback}".`),!1)}if(r==="integer"){if(!/^-?\d+$/.test(t))return c(`[${i}] Invalid integer "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1;const s=parseInt(t,10);return e.min!==void 0&&s<e.min?(c(`[${i}] Value ${s} for attribute "${n}" is less than min (${e.min}).`),!1):e.max!==void 0&&s>e.max?(c(`[${i}] Value ${s} for attribute "${n}" is greater than max (${e.max}).`),!1):!0}if(r==="float")return isNaN(Number(t))?(c(`[${i}] Invalid float "${t}" for attribute "${n}". Fallback: ${e.fallback}.`),!1):!0;if(r==="json")try{return JSON.parse(t),!0}catch(s){return c(`[${i}] Invalid JSON for attribute "${n}": ${s.message}. Fallback: ${e.fallback}.`),!1}return!0}function H(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}function Y(e,t,n,o){if(e.nodeType!==1)return;const i=t.indexOf("[")!==-1||t.indexOf(".")!==-1||t.indexOf("#")!==-1?t:"["+t+"]",r=Array.from(e.querySelectorAll(i));e.matches&&e.matches(i)&&r.push(e);for(const c of r)if(!c[n]){window.lnCore._persistSink&&c.hasAttribute("data-ln-persist")&&window.lnCore._persistSink(c,t);try{c[n]=new o(c)}catch(s){console.error("["+n+"] init failed",c,s)}}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore._bootHolds=window.lnCore._bootHolds||0,window.lnCore._bootQueue=window.lnCore._bootQueue||[]);function L(){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 G(e){const t=L(),n=e.observed||[];for(let o=0;o<n.length;o++){const u=n[o];t.byAttr.has(u)||t.byAttr.set(u,[]),t.byAttr.get(u).push(e)}if(t.byDeclaredAttr=t.byDeclaredAttr||new Map,e.attributes)for(const o in e.attributes){t.byDeclaredAttr.has(o)||t.byDeclaredAttr.set(o,[]);const u=t.byDeclaredAttr.get(o);u.some(i=>i.componentTag===e.componentTag)||u.push({spec:e.attributes[o],componentTag:e.componentTag})}if(e.onAttrChange||e.effects){t.reactive.push(e);const o=H(e);if(o===null)t.reactiveWildcard.push(e);else for(const u of o)t.byReactive.has(u)||t.byReactive.set(u,[]),t.byReactive.get(u).push(e)}e.persist&&t.persist.push(e)}function E(e,t,n,o){for(let u=0;u<e.length;u++){const i=e[u];if(!t[i.attribute])continue;const r=i.effects&&i.effects[n];r?r(t,n,o):i.onAttrChange&&(!i.declared||i.declared.has(n))&&i.onAttrChange(t,n,o)}}function J(e){const t=e.target,n=e.attributeName;if(e.oldValue===t.getAttribute(n))return;const o=L(),u=o.byAttr.get(n);if(R()&&o.byDeclaredAttr&&o.byDeclaredAttr.has(n)&&k(t)){const i=o.byDeclaredAttr.get(n),r=t.getAttribute(n);for(let c=0;c<i.length;c++)K(i[c].spec,r,n,i[c].componentTag,t)}if(window.lnCore._debugSink&&(n.indexOf("data-ln-")===0||u)&&window.lnCore._debugSink("attr",n,t,{oldValue:e.oldValue,newValue:t.getAttribute(n)}),n.indexOf("data-ln-")===0){const i=o.byReactive.get(n);i&&E(i,t,n,e.oldValue),o.reactiveWildcard.length&&E(o.reactiveWildcard,t,n,e.oldValue)}if(u)for(let i=0;i<u.length;i++){const r=u[i];if(r.handler){r.handler(t,n,e.oldValue);continue}r.onAttributeChange&&t[r.attribute]?r.onAttributeChange(t,n):(Y(t,r.selector,r.attribute,r.ComponentFn),r.onInit&&r.onInit(t))}}function P(){window.lnCore=window.lnCore||{},!window.lnCore._attrObserverBound&&(window.lnCore._attrObserverBound=!0,g(function(){new MutationObserver(function(t){for(let n=0;n<t.length;n++)try{J(t[n])}catch(o){console.error("[ln-core] mutation handler failed",t[n].target,o)}}).observe(document.body,{attributes:!0,subtree:!0,attributeOldValue:!0})},"ln-core"))}function Q(e,t){G({observed:e,handler:t}),P()}function O(e){return(e||"").replace(/^#/,"")}function m(e){const t=e===void 0?location.hash:e,n={},o=O(t);if(!o)return n;const u=o.split("&");for(let i=0;i<u.length;i++){const r=u[i];if(!r)continue;const c=r.indexOf(":"),s=c>-1?r.slice(0,c):r,d=c>-1?r.slice(c+1):"";if(s)try{n[s]=decodeURIComponent(d)}catch{n[s]=d}}return n}function z(e){if(!e)return null;const t=m();return e in t?t[e]:null}function X(e,t){if(!e)return;const n=m();t==null?delete n[e]:n[e]=String(t);const u=Object.keys(n).map(function(i){const r=n[i];return r===""?i:i+":"+encodeURIComponent(r)}).join("&");O(location.hash)!==u&&(location.hash=u)}function Z(e){return e.button===1||e.ctrlKey||e.metaKey||e.shiftKey?!1:(e.preventDefault(),!0)}function ee(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 o=e.getAttribute("data-ln-sort")||e.getAttribute("data-ln-search-for")||e.getAttribute("data-ln-search")||e.getAttribute("data-ln-filter")||e.id;return o?t?o+"-"+t:o:t||null}function te(e,t){return!t||t==="none"||e===null||e===void 0?null:String(e)+"."+t}function ne(e){return!e||typeof e!="string"?null:e.endsWith(".asc")?{fieldOrColumn:e.slice(0,-4),direction:"asc"}:e.endsWith(".desc")?{fieldOrColumn:e.slice(0,-5),direction:"desc"}:null}function re(e,t){return!e||!Array.isArray(t)||t.length===0?null:e+":"+t.map(encodeURIComponent).join(",")}function oe(e){if(!e||typeof e!="string")return null;const t=e.indexOf(":");if(t===-1)return null;const n=e.slice(0,t),o=e.slice(t+1),u=o?o.split(",").map(function(i){try{return decodeURIComponent(i)}catch{return i}}).filter(Boolean):[];return{key:n,values:u}}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.hashParse=m,window.lnCore.hashGet=z,window.lnCore.hashSet=X,window.lnCore.hashLinkClick=Z,window.lnCore.resolveHashNamespace=ee,window.lnCore.hashSortEncode=te,window.lnCore.hashSortDecode=ne,window.lnCore.hashFilterEncode=re,window.lnCore.hashFilterDecode=oe);function ie(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}typeof window<"u"&&(window.lnCore=window.lnCore||{},window.lnCore.uuid=ie),(function(){const e="data-ln-link",t="lnLink";if(window[t]!==void 0)return;let n=null;function o(){n=document.createElement("div"),n.className="ln-link-status",document.body.appendChild(n)}function u(l){n&&(n.textContent=l,n.classList.add("ln-link-status--visible"))}function i(){n&&n.classList.remove("ln-link-status--visible")}function r(l,a){if(a.target.closest("a, button, input, select, textarea"))return;const f=l.querySelector("a");if(!f)return;const b=f.getAttribute("href");if(!b)return;if(a.ctrlKey||a.metaKey||a.button===1){window.open(b,"_blank","noopener,noreferrer");return}I(l,"ln-link:navigate",{target:l,href:b,link:f}).defaultPrevented||f.click()}function c(l){const a=l.querySelector("a");if(!a)return;const f=a.getAttribute("href");f&&u(f)}function s(){i()}function d(l){l[t+"Row"]||!l.querySelector("a")||(l[t+"Row"]=!0,l._lnLinkClick=function(f){r(l,f)},l._lnLinkEnter=function(){c(l)},l.addEventListener("click",l._lnLinkClick),l.addEventListener("mouseenter",l._lnLinkEnter),l.addEventListener("mouseleave",s))}function w(l){l[t+"Row"]&&(l._lnLinkClick&&l.removeEventListener("click",l._lnLinkClick),l._lnLinkEnter&&l.removeEventListener("mouseenter",l._lnLinkEnter),l.removeEventListener("mouseleave",s),delete l._lnLinkClick,delete l._lnLinkEnter,delete l[t+"Row"])}function h(l){if(!l[t+"Init"])return;const a=l.tagName;if(a==="TABLE"||a==="TBODY"){const f=a==="TABLE"&&l.querySelector("tbody")||l;for(const b of f.querySelectorAll("tr"))w(b)}else w(l);delete l[t+"Init"]}function p(l){if(l[t+"Init"])return;l[t+"Init"]=!0;const a=l.tagName;if(a==="TABLE"||a==="TBODY"){const f=a==="TABLE"&&l.querySelector("tbody")||l;for(const b of f.querySelectorAll("tr"))d(b)}else d(l)}function y(l){l.hasAttribute&&l.hasAttribute(e)&&p(l);const a=l.querySelectorAll?l.querySelectorAll("["+e+"]"):[];for(const f of a)p(f)}function le(){g(function(){new MutationObserver(function(a){for(const f of a)if(f.type==="childList"){for(const b of f.addedNodes)if(b.nodeType===1){y(b);const A=b.closest("["+e+"]");if(A)if(b.tagName==="TR")d(b);else{const $=A.tagName;if($==="TABLE"||$==="TBODY"){const se=b.querySelectorAll?b.querySelectorAll("tr"):[];for(const ue of se)d(ue)}}}}}).observe(document.body,{childList:!0,subtree:!0}),Q([e],function(a){a.hasAttribute&&a.hasAttribute(e)?y(a):h(a)})},"ln-link")}function D(l){y(l)}window[t]={init:D,destroy:h};function T(){o(),le(),D(document.body)}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",T):T()})()})();
@@ -1,22 +1,22 @@
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-link",
4
- "generator": "scripts/sync-ln-schemas.mjs",
5
- "attributes": {
6
- "data-ln-debug": {
7
- "direction": null,
8
- "sources": [
9
- "ln-link-dev.scss"
10
- ]
11
- },
12
- "data-ln-link": {
13
- "direction": "author",
14
- "sources": [
15
- "ln-link-dev.scss",
16
- "src/ln-link.js"
17
- ],
18
- "type": "marker",
19
- "description": "Makes entire table row or container clickable based on child anchor link"
20
- }
21
- }
22
- }
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-link",
4
+ "generator": "scripts/sync-ln-schemas.mjs",
5
+ "attributes": {
6
+ "data-ln-debug": {
7
+ "direction": null,
8
+ "sources": [
9
+ "ln-link-dev.scss"
10
+ ]
11
+ },
12
+ "data-ln-link": {
13
+ "direction": "author",
14
+ "sources": [
15
+ "ln-link-dev.scss",
16
+ "src/ln-link.js"
17
+ ],
18
+ "type": "marker",
19
+ "description": "Makes entire table row or container clickable based on child anchor link"
20
+ }
21
+ }
22
+ }