@alixex/ranui-cdn 0.0.0-stage → 1.0.0

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 (45) hide show
  1. package/README.md +32 -2
  2. package/dist/IIFE-LICENSES.md +2415 -0
  3. package/dist/iife/attachments.iife.js +1 -0
  4. package/dist/iife/button.iife.js +111 -0
  5. package/dist/iife/card.iife.js +1 -0
  6. package/dist/iife/checkbox.iife.js +1 -0
  7. package/dist/iife/colorpicker.iife.js +111 -0
  8. package/dist/iife/content.iife.js +1 -0
  9. package/dist/iife/conversation.iife.js +1 -0
  10. package/dist/iife/disclosure-row.iife.js +1 -0
  11. package/dist/iife/dropdown.iife.js +1 -0
  12. package/dist/iife/fan-gallery.iife.js +1 -0
  13. package/dist/iife/glass.iife.js +290 -0
  14. package/dist/iife/icon.iife.js +111 -0
  15. package/dist/iife/image.iife.js +1 -0
  16. package/dist/iife/input.iife.js +111 -0
  17. package/dist/iife/link.iife.js +1 -0
  18. package/dist/iife/loading.iife.js +1 -0
  19. package/dist/iife/markdown.iife.js +4048 -0
  20. package/dist/iife/math.iife.js +206 -0
  21. package/dist/iife/menubar.iife.js +70 -0
  22. package/dist/iife/mermaid.iife.js +3700 -0
  23. package/dist/iife/message.iife.js +111 -0
  24. package/dist/iife/modal.iife.js +111 -0
  25. package/dist/iife/player.iife.js +175 -0
  26. package/dist/iife/popover.iife.js +1 -0
  27. package/dist/iife/progress.iife.js +1 -0
  28. package/dist/iife/radar.iife.js +1 -0
  29. package/dist/iife/reasoning.iife.js +3 -0
  30. package/dist/iife/route.iife.js +1 -0
  31. package/dist/iife/router.iife.js +1 -0
  32. package/dist/iife/scratch.iife.js +1 -0
  33. package/dist/iife/section.iife.js +1 -0
  34. package/dist/iife/select.iife.js +111 -0
  35. package/dist/iife/skeleton.iife.js +1 -0
  36. package/dist/iife/state-dot.iife.js +1 -0
  37. package/dist/iife/surface-switch.iife.js +111 -0
  38. package/dist/iife/tab.iife.js +111 -0
  39. package/dist/iife/tabpane.iife.js +1 -0
  40. package/dist/iife/theme-switch.iife.js +111 -0
  41. package/dist/iife/token-meter.iife.js +2 -0
  42. package/dist/iife/tool-card.iife.js +4 -0
  43. package/dist/iife/voice-button.iife.js +1 -0
  44. package/dist/index.iife.js +47 -0
  45. package/package.json +30 -3
@@ -0,0 +1 @@
1
+ var ranui_conversation=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{display:flex;flex-direction:column;min-height:0;color:var(--ran-conversation-color, var(--ran-color-text));font-size:var(--ran-conversation-font-size, var(--ran-text-copy-2))}.ran-conversation{display:flex;flex:1;flex-direction:column;min-height:0;overflow-y:auto;overscroll-behavior:contain;background:var(--ran-conversation-background, var(--ran-color-bg));overflow-anchor:none}.ran-conversation-list{display:flex;flex-direction:column;box-sizing:border-box;gap:var(--ran-conversation-gap, var(--ran-space-4));margin:0 auto;padding:var(--ran-conversation-padding, var(--ran-space-4));width:100%;max-width:var(--ran-conversation-measure, 46rem)}:is(r-tool-card,r-reasoning).ran-conversation-row+:is(r-tool-card,r-reasoning).ran-conversation-row{margin-top:calc(var(--ran-conversation-step-gap, 0px) - var(--ran-conversation-gap, var(--ran-space-4)))}.ran-conversation-row{display:block;min-width:0;content-visibility:auto;contain-intrinsic-size:auto 8rem}.ran-conversation-older{display:flex;box-sizing:border-box;justify-content:center;margin:0 auto;padding:var(--ran-conversation-padding, var(--ran-space-4)) var(--ran-conversation-padding, var(--ran-space-4)) 0;width:100%;max-width:var(--ran-conversation-measure, 46rem)}.ran-conversation-older[hidden]{display:none}.ran-conversation-older button{border:1px solid var(--ran-conversation-older-border-color, var(--ran-color-border));border-radius:var(--ran-conversation-older-radius, var(--ran-radius-full));background:none;padding:var(--ran-conversation-older-padding, var(--ran-space-1) var(--ran-space-3));color:var(--ran-conversation-older-color, var(--ran-color-text-secondary));font:inherit;font-size:var(--ran-conversation-older-font-size, var(--ran-text-label-3));cursor:pointer}.ran-conversation-older button:hover:not(:disabled){border-color:var(--ran-conversation-older-hover-border-color, var(--ran-color-border-hover));color:var(--ran-conversation-older-hover-color, var(--ran-color-text))}.ran-conversation-older button:disabled{cursor:default;opacity:.6}.ran-conversation-older button:focus-visible{outline:2px solid var(--ran-color-focus);outline-offset:2px}.ran-conversation-footer{flex:none;background:var(--ran-conversation-footer-background, var(--ran-color-bg))}.ran-conversation-empty{padding:var(--ran-conversation-empty-padding, var(--ran-space-8));color:var(--ran-conversation-empty-color, var(--ran-color-text-secondary));text-align:center}`,n=typeof document>`u`,r=24;function i(e){return Math.max(0,e.scrollHeight-e.clientHeight)}function a(e,t){return e.getBoundingClientRect().top-t.getBoundingClientRect().top}function o(e){let{scrollport:t,observe:n=[],threshold:o=r,onPinnedChange:s}=e,c=!0,l=t.scrollTop,u=null,d=!1,f=e=>{e!==c&&(c=e,s?.(e))},p=e=>{t.scrollTop=e,l=t.scrollTop},m=()=>{u=null,p(t.scrollHeight),f(!0)},h=()=>{let n=i(t);Math.abs(t.scrollTop-Math.min(l,n))>.5?(l=t.scrollTop,f(n-t.scrollTop<=o)):c&&e.enabled?.()!==!1?m():l=t.scrollTop};t.addEventListener(`scroll`,h,{passive:!0});let g=null;if(n.length>0&&typeof ResizeObserver<`u`){g=new ResizeObserver(()=>{c&&!d&&e.enabled?.()!==!1&&p(t.scrollHeight)});for(let e of n)g.observe(e)}return{get pinned(){return c},toBottom:m,follow(){c&&!d&&e.enabled?.()!==!1&&p(t.scrollHeight)},captureAnchor(e){u={row:e,top:a(e,t)}},restoreAnchor(e){if(u===null)return!1;let n=e===void 0?u.row:e(),{top:r}=u;return u=null,n===null||!t.contains(n)?!1:(p(t.scrollTop+a(n,t)-r),!0)},releaseAnchor(){u=null},destroy(){d=!0,t.removeEventListener(`scroll`,h),g?.disconnect()}}}var s=/["'&<>]/;function c(e){let t=``+e,n=s.exec(t);if(!n)return t;let r,i=``,a=0,o=0;for(a=n.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:r=`&quot;`;break;case 38:r=`&amp;`;break;case 39:r=`&#39;`;break;case 60:r=`&lt;`;break;case 62:r=`&gt;`;break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=r}return o===a?i:i+t.substring(o,a)}var l=class{ac=null;get signal(){return this.ac??=new AbortController,this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},u=new Map,d=`data-adopted-style`,f=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},p=(e,t,n=d)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!f(e,t,u)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}},m=0,h=1,g=2,_=null,v=null,y=0,b=new Set,x=!1;function S(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(ne(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)D(e,g);y===0&&re()}}]}function C(e){let t=ee(e,!0);return te(t),k(t),()=>j(t)}function w(e){let t=_;_=null;try{return e()}finally{_=t}}function T(e){let t={owned:[],cleanups:[],owner:v},n=v,r=_;v=t,_=null;try{return e(()=>ie(t))}finally{v=n,_=r}}function E(e){v&&v.cleanups.push(e)}function ee(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:g,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:v}}function te(e){v&&v.owned.push(e)}function ne(e){_&&(_.sources.add(e),e.observers.add(_))}function D(e,t){if(e.disposed||e.state>=t)return;let n=e.state===m;if(e.state=t,e.isEffect)b.add(e);else if(n)for(let t of e.observers)D(t,h)}function re(){if(!(y>0||x)){x=!0;try{for(;b.size>0;){let e=[...b];b.clear();for(let t of e)t.disposed||O(t)}}finally{x=!1}}}function O(e){if(!(e.disposed||e.state===m)){if(e.state===h)for(let t of e.sources)`fn`in t&&O(t);e.state===g&&k(e),e.state=m}}function k(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);A(e);let t=_,n=v;_=e,v=e,e.running=!0,e.state=m;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)D(t,g)}}finally{e.running=!1,_=t,v=n}}function A(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function j(e){e.disposed||(e.disposed=!0,A(e),e.observers.clear())}function ie(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function ae(e){return c(e)}var oe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,se=`.#[`;function ce(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n<e.length;){let r=e[n];if(r===`[`){let r=e.indexOf(`]`,n+1);if(r===-1)return null;t.push(e.slice(n,r+1)),n=r+1;continue}if(r!==`.`&&r!==`#`)return null;let i=n+1;for(;i<e.length&&!se.includes(e[i]);)i+=1;if(i===n+1)return null;t.push(e.slice(n,i)),n=i}return t.length>0?t:null}var le=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},ue=(e,t)=>{let n=t.trim();if(!n)return!1;let r=ce(n);return r!==null&&r.every(t=>le(e,t))},M=(e,t,n)=>{for(let r of e)oe(r)&&(ue(r,t)&&n.push(r),M(r.childrenList,t,n))};function N(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var P=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return N(this.childrenList,e,t)}serialize(){return this.childrenList.map(e=>typeof e==`string`?c(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}},de=new Map,F=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??de}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:c(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new P)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return N(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new fe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${ae(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,i=r?` style="${ae(r)}"`:``,a=``;return this.shadowRoot&&(a+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?a+=this._innerHTML:a+=this.childrenList.map(e=>typeof e==`string`?c(e):(e instanceof P,e.serialize())).join(``):a+=c(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!a?`<${t}${n}${i} />`:`<${t}${n}${i}>${a}</${t}>`}},fe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof P))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return N(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return M(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${String(e).replace(/<\/style/gi,`<\\/style`)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?c(e):(e instanceof P,e.serialize())).join(``)}</template>`}},I={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let r of t){if(r==null)continue;if(Array.isArray(r)){I.append(e,r);continue}if(typeof r==`function`){I.append(e,[r()]);continue}if(typeof r==`object`&&(`__ranFor`in r||`__ranIndex`in r))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=r instanceof L?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},pe=`http://www.w3.org/2000/svg`,me=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),L=class{runtime;el;constructor(e,t,r=I){this.runtime=r;let i=t??(me.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new F(e):i?document.createElementNS(i,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new he(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},he=class{runtime;root;hostEl;constructor(e,t,n,r=I){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},R=()=>({current:null}),z=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(z(t)):e.concat(t),[]),B=e=>e==null?null:e instanceof L?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,ge=(e,t)=>{if(n){H(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};C(()=>{let e=t();o();let n=document.createDocumentFragment();a=T(t=>(H(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),E(()=>a?.())},_e=`__ranFor`,ve=e=>typeof e==`object`&&!!e&&e[_e]===!0,ye=(e,t,n)=>{let[r,i]=S(t),a=null,o=T(t=>{let i=B(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},V=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},be=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;E(()=>{for(let e of i.values())e.dispose();i.clear()}),C(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o)){Te()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=i.get(o);s?(i.delete(o),s.index(r)):s=ye(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();V(r,a),i=n})},xe=`__ranIndex`,Se=e=>typeof e==`object`&&!!e&&e[xe]===!0,Ce=(e,t,n)=>{let[r,i]=S(e),a=null,o=T(e=>{let i=B(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},we=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];E(()=>{for(let e of i)e.dispose();i=[]}),C(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(Ce(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}V(r,i.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{n?w(()=>U(e,t)):U(e,t)},U=(e,t)=>{z(t).forEach(t=>{if(ve(t)){be(e,t);return}if(Se(t)){we(e,t);return}if(typeof t==`function`){ge(e,t);return}let n=B(t);n!=null&&e.appendChild(n)})},Te=()=>!1,Ee={bind(e,t){typeof e==`function`?n?w(()=>t(e())):C(()=>t(e())):t(e)},append:H},De=class extends L{constructor(e,t){super(e,t,Ee)}};function Oe(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,pe),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:ke,Div:W,Svg:Ae,Span:je,Slot:Me,ButtonBuilder:Ne,InputBuilder:Pe,Style:Fe,Label:Ie,Ul:Le,Li:Re,Section:ze,Article:Be,Nav:Ve,Header:He,Footer:Ue,Main:We,DeclarativeShadow:Ge}=Oe(De),Ke=new Map;function qe(e,t){n?(Ke.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Je=typeof document<`u`?HTMLElement:F,Ye=`data-ranui`,G=`data-ranui-sheet`,K=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}p(e,t,Ye)},q=new WeakMap,J=new Map,Xe=e=>{if(typeof CSSStyleSheet>`u`)return;let t=J.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},J.set(e,t)}catch{return}return t.users++,t.sheet},Ze=e=>{let t=J.get(e);t&&--t.users===0&&J.delete(e)},Qe=(e,t)=>{if(typeof document>`u`)return;let n=q.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),Ze(n.text)):n&&e.querySelector(`style[${G}]`)?.remove(),q.delete(e),!t))return;let r=Xe(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{Ze(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(G,``),n.textContent=t,e.appendChild(n)}q.set(e,{text:t,sheet:r})},Y=new WeakMap,$e=new WeakMap,et=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,tt=`:host([hidden]){display:none}`,nt=new Map,rt=e=>{let t=nt.get(e);if(t!==void 0)return t;let n=`${tt}\n${et}`,r=e?`${e}\n${n}`:n;return nt.set(e,r),r},it=e=>{let t=$e.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return $e.set(e,n),n}catch{return}},at=(e,t=``,n={mode:`closed`},r)=>{let i=r??it(e),a=e.shadowRoot||Y.get(e)||i?.shadowRoot||e.attachShadow(n);return Y.set(e,a),K(a,rt(t)),a},ot=(e,t,...n)=>{e.replaceChildren(...n),K(e,rt(t))},X=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},Z=(e,t,n=``)=>e.getAttribute(t)??n,Q=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},st=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Qe(t,e.getAttribute(`sheet`)||``)},ct=e=>{if(typeof requestAnimationFrame==`function`){let t=requestAnimationFrame(e);return()=>cancelAnimationFrame(t)}let t=!1;return queueMicrotask(()=>{t||e()}),()=>{t=!0}};function lt(e){let{definitions:t,scheduler:n=ct}=e,r=new Set;for(let e of t){if(r.has(e.kind))throw Error(`conversation: duplicate definition kind "${e.kind}"`);r.add(e.kind)}let i=[],a=new Map,o=new Set,s=new Set,c=0,l=null,u=0,d=`none`,f=null,p=()=>(f??=i.map(e=>Object.freeze({...e})),f),m=()=>{let e=p(),t=s===null?void 0:new Set(s);s=new Set;for(let n of[...o])n(e,t)},h=e=>{if(e!==`none`){if(u>0){e===`immediate`?d=`immediate`:d===`none`&&(d=`animation-frame`);return}if(e===`immediate`){l?.(),l=null,m();return}l===null&&(l=n(()=>{l=null,m()}))}},g={previous(e){for(let t=i.length-1;t>=0;--t)if(i[t].kind===e)return Object.freeze({...i[t]})}};return{push(e){let n=`none`;for(let r of t){let t=r.match(e);if(t===null)continue;let o=`${r.kind}:${t.id}`,l=a.get(o);if(t.role===`start`){let n={key:o,kind:r.kind,id:t.id,seq:l?.seq??(c+=1),state:r.start(e,g)};l===void 0?i.push(n):i[i.indexOf(l)]=n,a.set(o,n)}else if(l!==void 0)l.state=r.update(l.state,e);else continue;f=null,s?.add(o);let u=r.publication?.(e)??`immediate`;u===`immediate`?n=`immediate`:u===`animation-frame`&&n===`none`&&(n=`animation-frame`)}h(n)},truncate(e){let t=a.get(e);if(t===void 0)return 0;let n=i.filter(e=>e.seq<t.seq),r=i.length-n.length;for(let e of i)e.seq>=t.seq&&a.delete(e.key);return i=n,f=null,h(`immediate`),r},batch(e){u+=1;try{e()}finally{if(--u,u===0){let e=d;d=`none`,h(e)}}},nodes:p,subscribe(e){return o.add(e),()=>{o.delete(e)}},reset(){i=[],a.clear(),c=0,f=null,s=null,h(`immediate`)},destroy(){l?.(),l=null,o.clear()}}}var ut=`olderrequest`,$=class extends Je{_events=new l;_shadowDom;_scroll;_list;_older;_olderButton;_footer;_views=[];_engine=null;_unsubscribe=null;_follower=null;_reportedPinned=!0;_rows=new Map;_emptyRow=null;static get observedAttributes(){return[`follow`,`empty`,`older`,`loading-older`,`sheet`]}constructor(){super(),this._shadowDom=at(this,t);let e=R(),n=R(),r=R();this._scroll=W().class(`ran-conversation`).attr(`part`,`conversation`).children(W().class(`ran-conversation-older`).ref(n).attr(`part`,`older`).children(Ne().ref(r).attr(`type`,`button`).build()).build(),W().class(`ran-conversation-list`).ref(e).attr(`part`,`list`).build()).build(),this._footer=W().class(`ran-conversation-footer`).attr(`part`,`footer`).children(Me().attr(`name`,`footer`).build()).build(),ot(this._shadowDom,t,this._scroll,this._footer),this._list=X(e,`list`),this._older=X(n,`older`),this._olderButton=X(r,`older button`),this._older.hidden=!0}get older(){return Z(this,`older`)}set older(e){Q(this,`older`,e)}get loadingOlder(){return this.hasAttribute(`loading-older`)}set loadingOlder(e){e?this.setAttribute(`loading-older`,``):this.removeAttribute(`loading-older`)}get follow(){return Z(this,`follow`,`true`)!==`false`}set follow(e){Q(this,`follow`,e?`true`:`false`)}get empty(){return Z(this,`empty`)}set empty(e){Q(this,`empty`,e)}get sheet(){return Z(this,`sheet`)}set sheet(e){Q(this,`sheet`,e)}get pinned(){return this.follow&&(this._follower?.pinned??!0)}register(e){if(this._engine!==null)throw Error(`r-conversation: register("${e.kind}") after the first push — register every view first`);this._views.push(e)}push(e){this._ensureEngine().push(e)}truncate(e){return this._engine?.truncate(e)??0}batch(e){this._ensureEngine().batch(e)}reset(){this._engine?.reset()}scrollToBottom(){this.follow=!0,this._follower?.toBottom()}captureAnchor(e){let t=e===void 0?this._list.firstElementChild:this._rows.get(e);return!(t instanceof HTMLElement)||this._follower===null?!1:(this._follower.captureAnchor(t),!0)}restoreAnchor(){return this._follower?.restoreAnchor()??!1}connectedCallback(){this.handlerExternalCss(),this._syncEmpty(),this._syncOlder(),this._events.on(this._olderButton,`click`,this._requestOlder),this._follower=o({scrollport:this._scroll,observe:[this._list,this._footer],enabled:()=>this.follow,onPinnedChange:()=>this._reportPinned()}),this._reportedPinned=this.pinned}disconnectedCallback(){this._events.abort(),this._unsubscribe?.(),this._unsubscribe=null,this._follower?.destroy(),this._follower=null,this._engine?.destroy(),this._engine=null}attributeChangedCallback(e,t,n){t!==n&&(e===`sheet`&&this.handlerExternalCss(),e===`empty`&&this._syncEmpty(),(e===`older`||e===`loading-older`)&&this._syncOlder(),e===`follow`&&(this._reportPinned(),this.follow&&this._follower?.follow()))}handlerExternalCss=()=>{st(this,this._shadowDom,`sheet`,null,this.sheet)};_reportPinned(){let e=this.pinned;this.isConnected&&e!==this._reportedPinned&&(this._reportedPinned=e,this.dispatchEvent(new CustomEvent(`pinnedchange`,{detail:{pinned:e},bubbles:!0,composed:!0})))}_ensureEngine(){if(this._engine!==null)return this._engine;let e=lt({definitions:this._views});return this._unsubscribe=e.subscribe((e,t)=>{this._renderNodes(e,t)}),this._engine=e,e}_viewFor(e){return this._views.find(t=>t.kind===e)}_renderNodes(e,t){let n=new Set;for(let r of e){let e=this._viewFor(r.kind);if(e?.mount===void 0)continue;n.add(r.key);let i=this._rows.get(r.key),a=!1;if(i===void 0){let t=e.mount(r);if(t===null)continue;t.classList.add(`ran-conversation-row`),t.setAttribute(`part`,`row`),t.dataset.kind=r.kind,t.dataset.key=r.key,this._rows.set(r.key,t),i=t,a=!0}(a||t===void 0||t.has(r.key))&&e.patch?.(i,r)}for(let[e,t]of this._rows)n.has(e)||(t.remove(),this._rows.delete(e));let r=null;for(let t of e){let e=this._rows.get(t.key);if(e===void 0)continue;let n=r===null?this._list.firstChild:r.nextSibling;n!==e&&this._list.insertBefore(e,n),r=e}this._syncEmpty(),this.follow&&this._follower?.follow()}_requestOlder=()=>{this.loadingOlder||(this.captureAnchor(),this.dispatchEvent(new CustomEvent(ut,{bubbles:!0,composed:!0})))};_syncOlder(){let e=this.older;this._older.hidden=e===``,this._olderButton.textContent=e,this._olderButton.disabled=this.loadingOlder}_syncEmpty(){let e=this.empty;this._rows.size!==0||e===``?(this._emptyRow?.remove(),this._emptyRow=null):(this._emptyRow??=W().class(`ran-conversation-empty`).attr(`part`,`empty`).build(),this._emptyRow.textContent=e,this._emptyRow.parentNode===null&&this._list.appendChild(this._emptyRow))}};return qe(`r-conversation`,$),e.Conversation=$,e.default=$,e.OLDER_REQUEST=ut,e})({});
@@ -0,0 +1 @@
1
+ var ranui_disclosure_row=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{display:block;min-width:0;color:var(--ran-disclosure-color, var(--ran-color-text));font-size:var(--ran-disclosure-font-size, var(--ran-text-copy-2));--ran-disclosure-body-indent: calc(var(--ran-disclosure-leading-size, 16px) + var(--ran-disclosure-gap, var(--ran-space-2)))}.ran-disclosure{display:flex;flex-direction:column;min-width:0}.ran-disclosure-row{position:relative;overflow:hidden;display:flex;align-items:center;gap:var(--ran-disclosure-gap, var(--ran-space-2));border-radius:var(--ran-disclosure-radius, var(--ran-radius-sm));min-width:0;height:var(--ran-disclosure-row-height, 24px)}@media(pointer:coarse){.ran-disclosure-row{height:var(--ran-disclosure-row-height, var(--ran-size-7, 32px))}}:host([expandable]) .ran-disclosure-row{cursor:pointer}:host([expandable]) .ran-disclosure-row:hover{box-shadow:calc(-1 * var(--ran-space-2)) 0 0 0 var(--ran-disclosure-hover-background, var(--ran-color-bg-hover)),var(--ran-space-2) 0 0 0 var(--ran-disclosure-hover-background, var(--ran-color-bg-hover));background:var(--ran-disclosure-hover-background, var(--ran-color-bg-hover))}.ran-disclosure-row:focus-visible{outline:2px solid var(--ran-color-focus);outline-offset:2px}.ran-disclosure-leading{display:inline-grid;flex:none;place-items:center;width:var(--ran-disclosure-leading-size, 16px);height:var(--ran-disclosure-leading-size, 16px);color:var(--ran-disclosure-leading-color, var(--ran-color-text-secondary))}.ran-disclosure-icon,.ran-disclosure-chevron{grid-area:1 / 1;transition:opacity var(--ran-disclosure-transition, var(--ran-motion-duration-fast)) var(--ran-motion-ease-standard)}.ran-disclosure-icon{display:inline-flex;align-items:center;justify-content:center}.ran-disclosure-chevron{width:var(--ran-disclosure-chevron-size, 12px);height:var(--ran-disclosure-chevron-size, 12px);transform:rotate(-90deg);transition:opacity var(--ran-disclosure-transition, var(--ran-motion-duration-fast)) var(--ran-motion-ease-standard),transform var(--ran-disclosure-toggle-duration, var(--ran-motion-duration-base)) var(--ran-motion-ease-standard)}:host([open]) .ran-disclosure-chevron{transform:rotate(0)}:host(:not([expandable])) .ran-disclosure-chevron{display:none}.ran-disclosure.has-leading .ran-disclosure-chevron{opacity:0}:host([expandable]) .has-leading .ran-disclosure-row:hover .ran-disclosure-icon,:host([expandable]) .has-leading .ran-disclosure-row:focus-visible .ran-disclosure-icon,:host([expandable][open]) .has-leading .ran-disclosure-icon{opacity:0}:host([expandable]) .has-leading .ran-disclosure-row:hover .ran-disclosure-chevron,:host([expandable]) .has-leading .ran-disclosure-row:focus-visible .ran-disclosure-chevron,:host([expandable][open]) .has-leading .ran-disclosure-chevron{opacity:1}.ran-disclosure-title{flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;font-weight:var(--ran-disclosure-title-weight, 400);min-width:0;white-space:nowrap}.ran-disclosure-sep{flex:none;border-radius:50%;background:var(--ran-disclosure-sep-color, var(--ran-color-text-disabled));width:2px;height:2px}.ran-disclosure-summary{flex:1 1 0;min-width:0;overflow:hidden;color:var(--ran-disclosure-summary-color, var(--ran-color-text-secondary));text-overflow:ellipsis;white-space:nowrap}.has-summary .ran-disclosure-summary{min-width:min(50%,16ch)}:host([tone="error"]) .ran-disclosure-summary{color:var(--ran-disclosure-error-color, var(--ran-color-danger))}:host([busy]) .ran-disclosure-row:after{content:"";position:absolute;top:0;bottom:0;left:0;background:linear-gradient(90deg,transparent 0%,var(--ran-disclosure-sweep-color, color-mix(in srgb, var(--ran-color-bg) 65%, transparent)) 55%,transparent 100%);width:var(--ran-disclosure-sweep-width, 12rem);animation:ran-disclosure-sweep var(--ran-disclosure-sweep-duration, 2.6s) ease-out infinite;pointer-events:none}@keyframes ran-disclosure-sweep{0%{left:-12rem}90%,to{left:100%}}@media(prefers-reduced-motion:reduce){:host([busy]) .ran-disclosure-row:after{display:none}}.ran-disclosure-body{display:grid;grid-template-rows:0fr;min-width:0;transition:grid-template-rows var(--ran-disclosure-toggle-duration, var(--ran-motion-duration-base)) var(--ran-motion-ease-standard)}:host([open]) .ran-disclosure-body{grid-template-rows:1fr}.ran-disclosure-body-inner{min-width:0;overflow:hidden;content-visibility:hidden;transition:content-visibility var(--ran-disclosure-toggle-duration, var(--ran-motion-duration-base)) allow-discrete}:host([open]) .ran-disclosure-body-inner{content-visibility:visible}@media(prefers-reduced-motion:reduce){.ran-disclosure-icon,.ran-disclosure-chevron,.ran-disclosure-body,.ran-disclosure-body-inner{transition:none}}`,n=typeof document>`u`,r=/["'&<>]/;function i(e){let t=``+e,n=r.exec(t);if(!n)return t;let i,a=``,o=0,s=0;for(o=n.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:i=`&quot;`;break;case 38:i=`&amp;`;break;case 39:i=`&#39;`;break;case 60:i=`&lt;`;break;case 62:i=`&gt;`;break;default:continue}s!==o&&(a+=t.substring(s,o)),s=o+1,a+=i}return s===o?a:a+t.substring(s,o)}var a=class{ac=null;get signal(){return this.ac??=new AbortController,this.ac.signal}on(e,t,n,r){return e.addEventListener(t,n,{...r,signal:this.signal}),this}delegate(e,t,n,r,i){return e.addEventListener(n,n=>{let i=n.target?.closest(t);i&&e.contains(i)&&r(n,i)},{...i,signal:this.signal}),this}abort(){this.ac?.abort(),this.ac=null}},o=new Map,s=`data-adopted-style`,c=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},l=(e,t,n=s)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!c(e,t,o)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}},u=0,d=1,f=2,p=null,m=null,ee=0,h=new Set,g=!1;function _(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(re(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)S(e,f);ee===0&&ie()}}]}function v(e){let t=te(e,!0);return ne(t),w(t),()=>E(t)}function y(e){let t=p;p=null;try{return e()}finally{p=t}}function b(e){let t={owned:[],cleanups:[],owner:m},n=m,r=p;m=t,p=null;try{return e(()=>ae(t))}finally{m=n,p=r}}function x(e){m&&m.cleanups.push(e)}function te(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:f,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:m}}function ne(e){m&&m.owned.push(e)}function re(e){p&&(p.sources.add(e),e.observers.add(p))}function S(e,t){if(e.disposed||e.state>=t)return;let n=e.state===u;if(e.state=t,e.isEffect)h.add(e);else if(n)for(let t of e.observers)S(t,d)}function ie(){if(!(ee>0||g)){g=!0;try{for(;h.size>0;){let e=[...h];h.clear();for(let t of e)t.disposed||C(t)}}finally{g=!1}}}function C(e){if(!(e.disposed||e.state===u)){if(e.state===d)for(let t of e.sources)`fn`in t&&C(t);e.state===f&&w(e),e.state=u}}function w(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);T(e);let t=p,n=m;p=e,m=e,e.running=!0,e.state=u;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)S(t,f)}}finally{e.running=!1,p=t,m=n}}function T(e){for(let t of e.owned)E(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function E(e){e.disposed||(e.disposed=!0,T(e),e.observers.clear())}function ae(e){for(let t of e.owned)E(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function oe(e){return i(e)}var se=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,ce=`.#[`;function le(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n<e.length;){let r=e[n];if(r===`[`){let r=e.indexOf(`]`,n+1);if(r===-1)return null;t.push(e.slice(n,r+1)),n=r+1;continue}if(r!==`.`&&r!==`#`)return null;let i=n+1;for(;i<e.length&&!ce.includes(e[i]);)i+=1;if(i===n+1)return null;t.push(e.slice(n,i)),n=i}return t.length>0?t:null}var ue=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},de=(e,t)=>{let n=t.trim();if(!n)return!1;let r=le(n);return r!==null&&r.every(t=>ue(e,t))},D=(e,t,n)=>{for(let r of e)se(r)&&(de(r,t)&&n.push(r),D(r.childrenList,t,n))};function O(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var k=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return O(this.childrenList,e,t)}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}},fe=new Map,A=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??fe}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:i(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new k)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return O(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new pe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${oe(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=r?` style="${oe(r)}"`:``,o=``;return this.shadowRoot&&(o+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?o+=this._innerHTML:o+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof k,e.serialize())).join(``):o+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!o?`<${t}${n}${a} />`:`<${t}${n}${a}>${o}</${t}>`}},pe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof k))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return O(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return D(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${String(e).replace(/<\/style/gi,`<\\/style`)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof k,e.serialize())).join(``)}</template>`}},j={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let r of t){if(r==null)continue;if(Array.isArray(r)){j.append(e,r);continue}if(typeof r==`function`){j.append(e,[r()]);continue}if(typeof r==`object`&&(`__ranFor`in r||`__ranIndex`in r))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=r instanceof M?r.build():typeof r==`string`&&!n?document.createTextNode(r):r;e.appendChild(t)}}},me=`http://www.w3.org/2000/svg`,he=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),M=class{runtime;el;constructor(e,t,r=j){this.runtime=r;let i=t??(he.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=n?new A(e):i?document.createElementNS(i,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{n?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(n){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new ge(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(n)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},ge=class{runtime;root;hostEl;constructor(e,t,n,r=j){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(n)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return n?this.root.serialize():this.root.innerHTML}},N=()=>({current:null}),P=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(P(t)):e.concat(t),[]),F=e=>e==null?null:e instanceof M?e.build():typeof e==`string`?n?e:document.createTextNode(e):e,_e=(e,t)=>{if(n){L(e,[t()]);return}let r=document.createComment(``),i=document.createComment(``);e.appendChild(r),e.appendChild(i);let a=null,o=()=>{a?.(),a=null;let e=r.nextSibling;for(;e&&e!==i;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};v(()=>{let e=t();o();let n=document.createDocumentFragment();a=b(t=>(L(n,[e]),t)),i.parentNode?.insertBefore(n,i)}),x(()=>a?.())},ve=`__ranFor`,ye=e=>typeof e==`object`&&!!e&&e[ve]===!0,be=(e,t,n)=>{let[r,i]=_(t),a=null,o=b(t=>{let i=F(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},I=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},xe=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=F(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=new Map;x(()=>{for(let e of i.values())e.dispose();i.clear()}),v(()=>{let e=t.each()??[],n=new Map,a=[];e.forEach((e,r)=>{let o=t.key(e,r);if(n.has(o)){Ee()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=i.get(o);s?(i.delete(o),s.index(r)):s=be(e,r,t.render),n.set(o,s),s.node&&a.push(s.node)});for(let e of i.values())e.node?.parentNode?.removeChild(e.node),e.dispose();I(r,a),i=n})},Se=`__ranIndex`,Ce=e=>typeof e==`object`&&!!e&&e[Se]===!0,we=(e,t,n)=>{let[r,i]=_(e),a=null,o=b(e=>{let i=F(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},Te=(e,t)=>{if(n){(t.each()??[]).forEach((n,r)=>{let i=F(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let r=document.createComment(``);e.appendChild(r);let i=[];x(()=>{for(let e of i)e.dispose();i=[]}),v(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<i.length?i[n].setItem(e[n]):i.push(we(e[n],n,t.render));for(let t=i.length-1;t>=e.length;t--){let{node:e}=i[t];e?.parentNode?.removeChild(e),i[t].dispose(),i.pop()}I(r,i.map(e=>e.node).filter(e=>e!=null))})},L=(e,t)=>{n?y(()=>R(e,t)):R(e,t)},R=(e,t)=>{P(t).forEach(t=>{if(ye(t)){xe(e,t);return}if(Ce(t)){Te(e,t);return}if(typeof t==`function`){_e(e,t);return}let n=F(t);n!=null&&e.appendChild(n)})},Ee=()=>!1,De={bind(e,t){typeof e==`function`?n?y(()=>t(e())):v(()=>t(e())):t(e)},append:L},Oe=class extends M{constructor(e,t){super(e,t,De)}};function ke(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,me),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:z,Div:B,Svg:Ae,Span:V,Slot:H,ButtonBuilder:je,InputBuilder:Me,Style:Ne,Label:Pe,Ul:Fe,Li:Ie,Section:Le,Article:Re,Nav:ze,Header:Be,Footer:Ve,Main:He,DeclarativeShadow:Ue}=ke(Oe),We=new Map;function Ge(e,t){n?(We.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ke=typeof document<`u`?HTMLElement:A,qe=`data-ranui`,U=`data-ranui-sheet`,W=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}l(e,t,qe)},G=new WeakMap,K=new Map,Je=e=>{if(typeof CSSStyleSheet>`u`)return;let t=K.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},K.set(e,t)}catch{return}return t.users++,t.sheet},Ye=e=>{let t=K.get(e);t&&--t.users===0&&K.delete(e)},Xe=(e,t)=>{if(typeof document>`u`)return;let n=G.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),Ye(n.text)):n&&e.querySelector(`style[${U}]`)?.remove(),G.delete(e),!t))return;let r=Je(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{Ye(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(U,``),n.textContent=t,e.appendChild(n)}G.set(e,{text:t,sheet:r})},q=new WeakMap,Ze=new WeakMap,Qe=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,$e=`:host([hidden]){display:none}`,et=new Map,tt=e=>{let t=et.get(e);if(t!==void 0)return t;let n=`${$e}\n${Qe}`,r=e?`${e}\n${n}`:n;return et.set(e,r),r},nt=e=>{let t=Ze.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return Ze.set(e,n),n}catch{return}},rt=(e,t=``,n={mode:`closed`},r)=>{let i=r??nt(e),a=e.shadowRoot||q.get(e)||i?.shadowRoot||e.attachShadow(n);return q.set(e,a),W(a,tt(t)),a},it=(e,t,...n)=>{e.replaceChildren(...n),W(e,tt(t))},J=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},Y=(e,t,n=``)=>e.getAttribute(t)??n,X=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},at=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Xe(t,e.getAttribute(`sheet`)||``)};function ot(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}var st=`disclosuretoggle`,ct=`disclosurebeforetoggle`,lt=0,Z=new Map;function Q(e){return typeof e?.assignedNodes==`function`&&e.assignedNodes().some(e=>e.nodeType===Node.ELEMENT_NODE||(e.textContent??``).trim()!==``)}var $=class extends Ke{_events=new a;_shadowDom;_root;_row;_title;_summary;_sep;_leadingSlot;_headingSlot;_summarySlot;_titleText;_summaryText;_body;_bodyInner;_bodyId=`ran-disclosure-body-${lt+=1}`;static get observedAttributes(){return[`open`,`expandable`,`heading`,`summary`,`tone`,`busy`,`name`,`sheet`]}constructor(){super(),this._shadowDom=rt(this,t);let e=N(),n=N(),r=N(),i=N(),a=N(),o=N(),s=N(),c=N(),l=N(),u=N(),d=N(),f=B().class(`ran-disclosure`).attr(`part`,`disclosure`).children(B().class(`ran-disclosure-row`).ref(e).attr(`part`,`row`).children(V().class(`ran-disclosure-leading`).attr(`part`,`leading`).children(V().class(`ran-disclosure-icon`).children(H().ref(a).attr(`name`,`leading`).build()).build(),z(`svg`).class(`ran-disclosure-chevron`).attr(`viewBox`,`0 0 24 24`).attr(`fill`,`none`).attr(`stroke`,`currentColor`).attr(`stroke-width`,`1.75`).attr(`stroke-linecap`,`round`).attr(`stroke-linejoin`,`round`).attr(`aria-hidden`,`true`).children(z(`path`).attr(`d`,`M6 9l6 6 6-6`).build()).build()).build(),V().class(`ran-disclosure-title`).ref(n).attr(`part`,`title`).children(H().ref(o).attr(`name`,`heading`).children(V().class(`ran-disclosure-title-text`).ref(c).build()).build()).build(),V().class(`ran-disclosure-sep`).ref(i).attr(`part`,`separator`).attr(`aria-hidden`,`true`).build(),V().class(`ran-disclosure-summary`).ref(r).attr(`part`,`summary`).children(H().ref(s).attr(`name`,`summary`).children(V().class(`ran-disclosure-summary-text`).ref(l).build()).build()).build()).build(),B().class(`ran-disclosure-body`).attr(`part`,`body`).id(this._bodyId).ref(u).children(B().class(`ran-disclosure-body-inner`).ref(d).children(H().build()).build()).build()).build();it(this._shadowDom,t,f),this._root=f,this._leadingSlot=a.current,this._headingSlot=o.current,this._summarySlot=s.current,this._titleText=c.current,this._summaryText=l.current,this._body=u.current,this._bodyInner=d.current,this._row=J(e,`row`),this._title=J(n,`title`),this._summary=J(r,`summary`),this._sep=J(i,`separator`)}get open(){return this.hasAttribute(`open`)}set open(e){e!==this.open&&(e?this.setAttribute(`open`,``):this.removeAttribute(`open`))}get expandable(){return this.hasAttribute(`expandable`)}set expandable(e){e?this.setAttribute(`expandable`,``):this.removeAttribute(`expandable`)}get heading(){return Y(this,`heading`)}set heading(e){X(this,`heading`,e)}get summary(){return Y(this,`summary`)}set summary(e){X(this,`summary`,e)}get busy(){return this.hasAttribute(`busy`)}set busy(e){e?this.setAttribute(`busy`,``):this.removeAttribute(`busy`)}get tone(){return Y(this,`tone`)}set tone(e){X(this,`tone`,e)}get name(){return Y(this,`name`)}set name(e){X(this,`name`,e)}get sheet(){return Y(this,`sheet`)}set sheet(e){X(this,`sheet`,e)}connectedCallback(){this.handlerExternalCss(),this._events.on(this._row,`click`,this._toggle),this._events.on(this._row,`keydown`,this._keydown),this._events.on(this._leadingSlot,`slotchange`,this._syncLeading),this._events.on(this._headingSlot,`slotchange`,this._syncFromSlot),this._events.on(this._summarySlot,`slotchange`,this._syncFromSlot),this._join(),this._syncLeading(),this._sync(),this.open&&this._closeGroupPeers()}disconnectedCallback(){this._events.abort(),this._leave()}attributeChangedCallback(e,t,n){t!==n&&(e===`sheet`?this.handlerExternalCss():(e===`name`&&(this._leave(t??``),this._join()),e===`open`&&n!==null&&this._closeGroupPeers(),this._sync()))}handlerExternalCss=()=>{at(this,this._shadowDom,`sheet`,null,this.sheet)};_toggle=()=>{if(!this.expandable)return;let e=!this.open;this.dispatchEvent(new CustomEvent(`disclosurebeforetoggle`,{detail:{open:e},bubbles:!0,composed:!0,cancelable:!0}))&&(this.open=e,this.dispatchEvent(new CustomEvent(st,{detail:{open:this.open},bubbles:!0,composed:!0})))};_keydown=e=>{this.expandable&&ot(e)&&(e.preventDefault(),this._toggle())};_join(){let{name:e}=this;if(!e)return;let t=Z.get(e)??new Set;t.add(this),Z.set(e,t)}_leave(e=this.name){let t=Z.get(e);t&&(t.delete(this),t.size===0&&Z.delete(e))}_closeGroupPeers(){let e=this.name?Z.get(this.name):void 0;e&&e.forEach(e=>{e!==this&&(e.open=!1)})}_syncLeading=()=>{this._root.classList.toggle(`has-leading`,Q(this._leadingSlot))};_syncFromSlot=()=>{this._sync()};_sync(){let{heading:e,summary:t,expandable:n,open:r}=this;this._titleText.textContent=e,this._summaryText.textContent=t;let i=e!==``||Q(this._headingSlot),a=t!==``||Q(this._summarySlot);this._root.classList.toggle(`has-summary`,a),this._sep.hidden=!i||!a,n?(this._row.setAttribute(`role`,`button`),this._row.tabIndex=0,this._row.setAttribute(`aria-expanded`,String(r)),this._row.setAttribute(`aria-controls`,this._bodyId)):(this._row.removeAttribute(`role`),this._row.removeAttribute(`tabindex`),this._row.removeAttribute(`aria-expanded`),this._row.removeAttribute(`aria-controls`)),this.busy?this._row.setAttribute(`aria-busy`,`true`):this._row.removeAttribute(`aria-busy`);let o=!(n&&r);o&&this._bodyInner.matches(`:focus-within`)&&this._row.focus({preventScroll:!0}),this._bodyInner.inert=o}};return Ge(`r-disclosure-row`,$),e.DISCLOSURE_BEFORE_TOGGLE=ct,e.DISCLOSURE_TOGGLE=st,e.DisclosureRow=$,e.default=$,e})({});
@@ -0,0 +1 @@
1
+ var ranui_dropdown=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)||n.add(t)},n=(e,t)=>{if(typeof document>`u`)return;let n=e.classList;n.contains(t)&&n.remove(t)},r=/["'&<>]/;function i(e){let t=``+e,n=r.exec(t);if(!n)return t;let i,a=``,o=0,s=0;for(o=n.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:i=`&quot;`;break;case 38:i=`&amp;`;break;case 39:i=`&#39;`;break;case 60:i=`&lt;`;break;case 62:i=`&gt;`;break;default:continue}s!==o&&(a+=t.substring(s,o)),s=o+1,a+=i}return s===o?a:a+t.substring(s,o)}var a=new Map,o=`data-adopted-style`,s=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ee=(e,t,n=o)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!s(e,t,a)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}},c=typeof document>`u`,l=0,u=1,d=2,f=null,p=null,m=0,h=new Set,g=!1;function _(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(re(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)S(e,d);m===0&&ie()}}]}function v(e){let t=te(e,!0);return ne(t),w(t),()=>E(t)}function y(e){let t=f;f=null;try{return e()}finally{f=t}}function b(e){let t={owned:[],cleanups:[],owner:p},n=p,r=f;p=t,f=null;try{return e(()=>ae(t))}finally{p=n,f=r}}function x(e){p&&p.cleanups.push(e)}function te(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:d,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:p}}function ne(e){p&&p.owned.push(e)}function re(e){f&&(f.sources.add(e),e.observers.add(f))}function S(e,t){if(e.disposed||e.state>=t)return;let n=e.state===l;if(e.state=t,e.isEffect)h.add(e);else if(n)for(let t of e.observers)S(t,u)}function ie(){if(!(m>0||g)){g=!0;try{for(;h.size>0;){let e=[...h];h.clear();for(let t of e)t.disposed||C(t)}}finally{g=!1}}}function C(e){if(!(e.disposed||e.state===l)){if(e.state===u)for(let t of e.sources)`fn`in t&&C(t);e.state===d&&w(e),e.state=l}}function w(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);T(e);let t=f,n=p;f=e,p=e,e.running=!0,e.state=l;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)S(t,d)}}finally{e.running=!1,f=t,p=n}}function T(e){for(let t of e.owned)E(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function E(e){e.disposed||(e.disposed=!0,T(e),e.observers.clear())}function ae(e){for(let t of e.owned)E(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function D(e){return i(e)}var oe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,se=`.#[`;function ce(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n<e.length;){let r=e[n];if(r===`[`){let r=e.indexOf(`]`,n+1);if(r===-1)return null;t.push(e.slice(n,r+1)),n=r+1;continue}if(r!==`.`&&r!==`#`)return null;let i=n+1;for(;i<e.length&&!se.includes(e[i]);)i+=1;if(i===n+1)return null;t.push(e.slice(n,i)),n=i}return t.length>0?t:null}var le=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},ue=(e,t)=>{let n=t.trim();if(!n)return!1;let r=ce(n);return r!==null&&r.every(t=>le(e,t))},O=(e,t,n)=>{for(let r of e)oe(r)&&(ue(r,t)&&n.push(r),O(r.childrenList,t,n))};function k(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var A=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return k(this.childrenList,e,t)}serialize(){return this.childrenList.map(e=>typeof e==`string`?i(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}},de=new Map,j=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??de}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:i(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new A)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return k(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new fe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${D(t)}"`).join(``),r=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=r?` style="${D(r)}"`:``,o=``;return this.shadowRoot&&(o+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?o+=this._innerHTML:o+=this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof A,e.serialize())).join(``):o+=i(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!o?`<${t}${n}${a} />`:`<${t}${n}${a}>${o}</${t}>`}},fe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof A))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return k(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return O(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${String(e).replace(/<\/style/gi,`<\\/style`)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?i(e):(e instanceof A,e.serialize())).join(``)}</template>`}},M={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let n of t){if(n==null)continue;if(Array.isArray(n)){M.append(e,n);continue}if(typeof n==`function`){M.append(e,[n()]);continue}if(typeof n==`object`&&(`__ranFor`in n||`__ranIndex`in n))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=n instanceof N?n.build():typeof n==`string`&&!c?document.createTextNode(n):n;e.appendChild(t)}}},pe=`http://www.w3.org/2000/svg`,me=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),N=class{runtime;el;constructor(e,t,n=M){this.runtime=n;let r=t??(me.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=c?new j(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{c?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(c){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new he(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(c)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},he=class{runtime;root;hostEl;constructor(e,t,n,r=M){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(c)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return c?this.root.serialize():this.root.innerHTML}},P=()=>({current:null}),F=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(F(t)):e.concat(t),[]),I=e=>e==null?null:e instanceof N?e.build():typeof e==`string`?c?e:document.createTextNode(e):e,ge=(e,t)=>{if(c){R(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};v(()=>{let e=t();a();let n=document.createDocumentFragment();i=b(t=>(R(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),x(()=>i?.())},_e=`__ranFor`,ve=e=>typeof e==`object`&&!!e&&e[_e]===!0,ye=(e,t,n)=>{let[r,i]=_(t),a=null,o=b(t=>{let i=I(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},L=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},be=(e,t)=>{if(c){(t.each()??[]).forEach((n,r)=>{let i=I(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;x(()=>{for(let e of r.values())e.dispose();r.clear()}),v(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Te()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=r.get(o);s?(r.delete(o),s.index(n)):s=ye(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();L(n,a),r=i})},xe=`__ranIndex`,Se=e=>typeof e==`object`&&!!e&&e[xe]===!0,Ce=(e,t,n)=>{let[r,i]=_(e),a=null,o=b(e=>{let i=I(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},we=(e,t)=>{if(c){(t.each()??[]).forEach((n,r)=>{let i=I(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];x(()=>{for(let e of r)e.dispose();r=[]}),v(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(Ce(e[n],n,t.render));for(let t=r.length-1;t>=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}L(n,r.map(e=>e.node).filter(e=>e!=null))})},R=(e,t)=>{c?y(()=>z(e,t)):z(e,t)},z=(e,t)=>{F(t).forEach(t=>{if(ve(t)){be(e,t);return}if(Se(t)){we(e,t);return}if(typeof t==`function`){ge(e,t);return}let n=I(t);n!=null&&e.appendChild(n)})},Te=()=>!1,Ee={bind(e,t){typeof e==`function`?c?y(()=>t(e())):v(()=>t(e())):t(e)},append:R},De=class extends N{constructor(e,t){super(e,t,Ee)}};function Oe(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,pe),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:ke,Div:B,Svg:Ae,Span:je,Slot:Me,ButtonBuilder:Ne,InputBuilder:Pe,Style:Fe,Label:Ie,Ul:Le,Li:Re,Section:ze,Article:Be,Nav:Ve,Header:He,Footer:Ue,Main:We,DeclarativeShadow:Ge}=Oe(De),Ke=new Map;function qe(e,t){c?(Ke.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Je=typeof document<`u`?HTMLElement:j,Ye=`data-ranui`,V=`data-ranui-sheet`,H=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}ee(e,t,Ye)},U=new WeakMap,W=new Map,Xe=e=>{if(typeof CSSStyleSheet>`u`)return;let t=W.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},W.set(e,t)}catch{return}return t.users++,t.sheet},G=e=>{let t=W.get(e);t&&--t.users===0&&W.delete(e)},Ze=(e,t)=>{if(typeof document>`u`)return;let n=U.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),G(n.text)):n&&e.querySelector(`style[${V}]`)?.remove(),U.delete(e),!t))return;let r=Xe(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{G(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(V,``),n.textContent=t,e.appendChild(n)}U.set(e,{text:t,sheet:r})},K=new WeakMap,q=new WeakMap,Qe=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,$e=`:host([hidden]){display:none}`,J=new Map,Y=e=>{let t=J.get(e);if(t!==void 0)return t;let n=`${$e}\n${Qe}`,r=e?`${e}\n${n}`:n;return J.set(e,r),r},et=e=>{let t=q.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return q.set(e,n),n}catch{return}},tt=(e,t=``,n={mode:`closed`},r)=>{let i=r??et(e),a=e.shadowRoot||K.get(e)||i?.shadowRoot||e.attachShadow(n);return K.set(e,a),H(a,Y(t)),a},nt=(e,t,...n)=>{e.replaceChildren(...n),H(e,Y(t))},X=(e,t)=>{if(e.current===null)throw Error(`ranui: ${t} is missing its .ref() on the builder`);return e.current},Z=(e,t,n=``)=>e.getAttribute(t)??n,Q=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},rt=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Ze(t,e.getAttribute(`sheet`)||``)},it=`@keyframes ranui-dropdown-up-in{0%{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}to{transform:scaleY(1);transform-origin:100% 100%;opacity:1}}@keyframes ranui-dropdown-up-out{0%{transform:scaleY(1);transform-origin:100% 100%;opacity:1}to{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}}@keyframes ranui-dropdown-down-in{0%{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleY(1);transform-origin:0% 0%;opacity:1}}@keyframes ranui-dropdown-down-out{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}}@keyframes ranui-dropdown-left-in{0%{transform:scaleX(.8);transform-origin:100% 0%;opacity:0}to{transform:scaleX(1);transform-origin:100% 0%;opacity:1}}@keyframes ranui-dropdown-left-out{0%{transform:scaleX(1);transform-origin:100% 0%;opacity:1}to{transform:scaleX(.8);transform-origin:100% 0%;opacity:0}}@keyframes ranui-dropdown-right-in{0%{transform:scaleX(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleX(1);transform-origin:0% 0%;opacity:1}}@keyframes ranui-dropdown-right-out{0%{transform:scaleX(1);transform-origin:0% 0%;opacity:1}to{transform:scaleX(.8);transform-origin:0% 0%;opacity:0}}.ran-dropdown-down-in{animation:ranui-dropdown-down-in var(--ran-dropdown-animation-duration, var(--ran-motion-duration-base, .2s)) var(--ran-dropdown-animation-timing-function, var(--ran-motion-ease-standard, ease));animation-fill-mode:forwards}.ran-dropdown-down-out{animation:ranui-dropdown-down-out var(--ran-dropdown-animation-duration, var(--ran-motion-duration-base, .2s)) var(--ran-dropdown-animation-timing-function, var(--ran-motion-ease-standard, ease));animation-fill-mode:forwards}.ran-dropdown-up-in{animation:ranui-dropdown-up-in var(--ran-dropdown-animation-duration, var(--ran-motion-duration-base, .2s)) var(--ran-dropdown-animation-timing-function, var(--ran-motion-ease-standard, ease));animation-fill-mode:forwards}.ran-dropdown-up-out{animation:ranui-dropdown-up-out var(--ran-dropdown-animation-duration, var(--ran-motion-duration-base, .2s)) var(--ran-dropdown-animation-timing-function, var(--ran-motion-ease-standard, ease));animation-fill-mode:forwards}.ran-dropdown-left-in{animation:ranui-dropdown-left-in var(--ran-dropdown-animation-duration, var(--ran-motion-duration-base, .2s)) var(--ran-dropdown-animation-timing-function, var(--ran-motion-ease-standard, ease));animation-fill-mode:forwards}.ran-dropdown-left-out{animation:ranui-dropdown-left-out var(--ran-dropdown-animation-duration, var(--ran-motion-duration-base, .2s)) var(--ran-dropdown-animation-timing-function, var(--ran-motion-ease-standard, ease));animation-fill-mode:forwards}.ran-dropdown-right-in{animation:ranui-dropdown-right-in var(--ran-dropdown-animation-duration, var(--ran-motion-duration-base, .2s)) var(--ran-dropdown-animation-timing-function, var(--ran-motion-ease-standard, ease));animation-fill-mode:forwards}.ran-dropdown-right-out{animation:ranui-dropdown-right-out var(--ran-dropdown-animation-duration, var(--ran-motion-duration-base, .2s)) var(--ran-dropdown-animation-timing-function, var(--ran-motion-ease-standard, ease));animation-fill-mode:forwards}:host{text-align:var(--ran-dropdown-host-text-align, left);z-index:var(--ran-dropdown-host-z-index, auto)}:host([data-ran-floating]),:host([data-ran-floating]) .ranui-dropdown-container,:host([data-ran-floating]) ::slotted(*){transition-property:none!important;transition-delay:0s}:host([data-ran-floating="placing"]){opacity:0;pointer-events:none}.ranui-dropdown{position:var(--ran-dropdown-position, relative);transform-origin:var(--ran-x, 50%) var(--ran-y, 50%);box-sizing:var(--ran-dropdown-box-sizing, border-box);margin:var(--ran-dropdown-margin, 0);padding:var(--ran-dropdown-padding, 0);color:var(--ran-dropdown-color, var(--ran-color-text, rgba(0, 0, 0, .88)));font-size:var(--ran-dropdown-font-size, var(--ran-text-label-1, 14px));font-weight:var(--ran-dropdown-font-weight, var(--ran-text-label-weight, 500));list-style:var(--ran-dropdown-list-style, none);font-family:var(--ran-dropdown-font-family, var(--ran-skin-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"));z-index:var(--ran-dropdown-z-index, var(--ran-z-dropdown, 1100));overflow:var(--ran-dropdown-overflow, hidden);font-variant:var(--ran-dropdown-font-variant, initial);background:var(--ran-dropdown-background, var(--ran-color-bg-elevated, #ffffff));border:var(--ran-dropdown-border, 1px solid var(--ran-color-border, #e4e4e8));border-radius:var(--ran-dropdown-border-radius, var(--ran-radius-md, 12px));outline:var(--ran-dropdown-outline, none);box-shadow:var(--ran-dropdown-box-shadow, var(--ran-shadow-menu, var(--ran-shadow-elevated, 0 6px 16px 0 rgba(0, 0, 0, .08), 0 3px 6px -4px rgba(0, 0, 0, .12), 0 9px 28px 8px rgba(0, 0, 0, .05))));cursor:var(--ran-dropdown-cursor, auto);width:var(--ran-dropdown-width, 100%);height:var(--ran-dropdown-height, 100%);min-height:var(--ran-dropdown-min-height, 100%);min-width:var(--ran-dropdown-min-width, 100%)}:host([role="listbox"]) .ranui-dropdown,:host([role="menu"]) .ranui-dropdown{padding:var(--ran-dropdown-padding, var(--ran-space-1, 4px))}.ranui-dropdown-container{position:var(--ran-dropdown-container-position, relative);display:var(--ran-dropdown-container-display, block);width:var(--ran-dropdown-container-width, 100%);height:var(--ran-dropdown-container-height, 100%);box-sizing:var(--ran-dropdown-container-box-sizing, border-box)}.ranui-dropdown-container .top{left:50%;transform:translate(calc(0px - var(--ran-dropdown-arrow-width, 16px) / 2 + var(--ran-dropdown-arrow-anchor-offset, 0px))) translateY(calc(-1 * var(--ran-dropdown-arrow-height, var(--ran-dropdown-arrow-width, 16px)) + var(--ran-dropdown-arrow-overlap, 2px))) rotate(0);top:0}.ranui-dropdown-container .bottom{left:50%;transform:translate(calc(0px - var(--ran-dropdown-arrow-width, 16px) / 2 + var(--ran-dropdown-arrow-anchor-offset, 0px))) translateY(var(--ran-dropdown-arrow-overlap, 2px)) rotate(180deg);top:max(0px,calc(100% - calc(var(--ran-dropdown-arrow-width, 16px) / 4)))}.ranui-dropdown-container .left,.ranui-dropdown-container .right{top:max(0px,calc(var(--ran-dropdown-arrow-anchor-height, var(--ran-dropdown-min-height, 100%)) / 2 - var(--ran-dropdown-arrow-width, 16px) / 2))}.ranui-dropdown-container .left{transform:translate(calc(0px - var(--ran-dropdown-arrow-width, 16px) + var(--ran-dropdown-arrow-overlap, 2px))) translateY(calc(var(--ran-dropdown-arrow-shape-offset, 0px) + var(--ran-dropdown-arrow-anchor-offset-y, 0px))) rotate(270deg)}.ranui-dropdown-container .right{left:100%;transform:translate(calc(0px - var(--ran-dropdown-arrow-overlap, 2px))) translateY(calc(var(--ran-dropdown-arrow-shape-offset, 0px) + var(--ran-dropdown-arrow-anchor-offset-y, 0px))) rotate(90deg)}.ranui-dropdown-arrow{position:var(--ran-dropdown-arrow-position, absolute);box-sizing:var(--ran-dropdown-arrow-box-sizing, border-box);z-index:var(--ran-dropdown-arrow-z-index, 1);display:var(--ran-dropdown-arrow-display, block);pointer-events:var(--ran-dropdown-arrow-pointer-events, none);width:var(--ran-dropdown-arrow-width, var(--ran-dropdown-arrow-width, 16px));height:var(--ran-dropdown-arrow-height, var(--ran-dropdown-arrow-width, 16px));overflow:var(--ran-dropdown-arrow-overflow, hidden)}.ranui-dropdown-arrow svg{display:block;width:100%;height:100%;overflow:visible}.ranui-dropdown-arrow path{fill:var(--ran-dropdown-arrow-fill-background, var(--ran-dropdown-arrow-tip-background, var(--ran-color-bg-elevated, #ffffff)));filter:var(--ran-dropdown-arrow-shadow, drop-shadow(0 -1px 0 var(--ran-color-border)))}::slotted(.ran-select-option-hover){position:absolute;top:0;left:0;z-index:0;width:0;height:0;border-radius:var(--ran-dropdown-option-item-border-radius, var(--ran-radius-sm, 8px));background:var(--ran-select-option-hover-background, var(--ran-surface-glass-hover));opacity:0;pointer-events:none;transition:var(--ran-select-option-hover-transition, transform var(--ran-motion-duration-slow, .28s) var(--ran-motion-ease-standard, cubic-bezier(.2, 0, 0, 1)), width var(--ran-motion-duration-slow, .28s) var(--ran-motion-ease-standard, cubic-bezier(.2, 0, 0, 1)), height var(--ran-motion-duration-slow, .28s) var(--ran-motion-ease-standard, cubic-bezier(.2, 0, 0, 1)))}::slotted(.ran-select-option-hover[data-instant]){transition:none}@media(prefers-reduced-motion:reduce){::slotted(.ran-select-option-hover){transition:none}}:host([surface="glass"]) .ranui-dropdown{background:var(--ran-surface-glass-overlay-specular, linear-gradient(180deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, .12) 24%, transparent 48%), linear-gradient(0deg, rgba(255, 255, 255, .22) 0%, transparent 30%), radial-gradient(120% 55% at 50% -8%, rgba(255, 255, 255, .28), transparent 58%)),var(--ran-surface-glass-overlay-fill, rgba(255, 255, 255, .48));-webkit-backdrop-filter:blur(var(--ran-surface-glass-overlay-blur, 18px)) saturate(var(--ran-surface-glass-saturate, 180%)) brightness(var(--ran-surface-glass-brightness, 1.08));backdrop-filter:blur(var(--ran-surface-glass-overlay-blur, 18px)) saturate(var(--ran-surface-glass-saturate, 180%)) brightness(var(--ran-surface-glass-brightness, 1.08));border-color:var(--ran-surface-glass-overlay-border, rgba(255, 255, 255, .72));box-shadow:var(--ran-surface-glass-overlay-shadow, 0 18px 48px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(255, 255, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .4), inset 0 0 0 .5px rgba(255, 255, 255, .5), inset 0 -24px 48px rgba(255, 255, 255, .1))}@media(prefers-reduced-transparency:reduce){:host([surface="glass"]) .ranui-dropdown{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-overlay-solid-fallback, var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-overlay-solid-shadow, var(--ran-shadow-modal))}}:host-context([data-ran-surface="glass"]):host(:not([surface="solid"])) .ranui-dropdown{background:var(--ran-surface-glass-overlay-specular, linear-gradient(180deg, rgba(255, 255, 255, .42) 0%, rgba(255, 255, 255, .12) 24%, transparent 48%), linear-gradient(0deg, rgba(255, 255, 255, .22) 0%, transparent 30%), radial-gradient(120% 55% at 50% -8%, rgba(255, 255, 255, .28), transparent 58%)),var(--ran-surface-glass-overlay-fill, rgba(255, 255, 255, .48));-webkit-backdrop-filter:blur(var(--ran-surface-glass-overlay-blur, 18px)) saturate(var(--ran-surface-glass-saturate, 180%)) brightness(var(--ran-surface-glass-brightness, 1.08));backdrop-filter:blur(var(--ran-surface-glass-overlay-blur, 18px)) saturate(var(--ran-surface-glass-saturate, 180%)) brightness(var(--ran-surface-glass-brightness, 1.08));border-color:var(--ran-surface-glass-overlay-border, rgba(255, 255, 255, .72));box-shadow:var(--ran-surface-glass-overlay-shadow, 0 18px 48px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(255, 255, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .95), inset 0 -1px 0 rgba(255, 255, 255, .4), inset 0 0 0 .5px rgba(255, 255, 255, .5), inset 0 -24px 48px rgba(255, 255, 255, .1))}@media(prefers-reduced-transparency:reduce){:host-context([data-ran-surface="glass"]):host(:not([surface="solid"])) .ranui-dropdown{-webkit-backdrop-filter:none;backdrop-filter:none;background:var(--ran-surface-glass-overlay-solid-fallback, var(--ran-color-bg-elevated));box-shadow:var(--ran-surface-glass-overlay-solid-shadow, var(--ran-shadow-modal))}}@media(prefers-reduced-motion:reduce){.ran-dropdown-down-in,.ran-dropdown-down-out,.ran-dropdown-up-in,.ran-dropdown-up-out,.ran-dropdown-left-in,.ran-dropdown-left-out,.ran-dropdown-right-in,.ran-dropdown-right-out{animation:none}}`,at=function(e){return e.TOP=`top`,e.BOTTOM=`bottom`,e.LEFT=`left`,e.RIGHT=`right`,e}({}),$=class extends Je{dropdown;_slot;_shadowDom;arrowIcon;container;static get observedAttributes(){return[`transit`,`arrow`,`sheet`,`surface`]}constructor(){super(),this._shadowDom=tt(this,it);let e=P(),t=P(),n=B().class(`ranui-dropdown-container`).children(B().style(`-webkit-tap-highlight-color`,`transparent`).style(`outline`,`0`).class(`ranui-dropdown`).ref(e).part(`dropdown`).children(Me().class(`slot`).ref(t))).build();nt(this._shadowDom,it,n),this.container=n,this.dropdown=X(e,`ranui dropdown`),this._slot=X(t,`slot`)}get transit(){return Z(this,`transit`)}set transit(e){Q(this,`transit`,e,{removeEmpty:!0})}get arrow(){return Z(this,`arrow`)}set arrow(e){Q(this,`arrow`,e,{removeEmpty:!0})}get sheet(){return Z(this,`sheet`)}set sheet(e){Q(this,`sheet`,e)}get surface(){return Z(this,`surface`)}set surface(e){Q(this,`surface`,e,{removeEmpty:!0})}handlerExternalCss=()=>{rt(this,this._shadowDom,`sheet`,null,this.sheet)};appliedTransit=``;handlerTransit=()=>{this.container&&(this.appliedTransit&&n(this.container,this.appliedTransit),this.appliedTransit=this.transit,this.appliedTransit&&t(this.container,this.appliedTransit))};getAnimationTarget=()=>this.container;handlerArrow=()=>{let e=(this.arrow||``).trim();e?(!this.arrowIcon&&this.container&&(this.arrowIcon=B().class(`ranui-dropdown-arrow`).build(),this.arrowIcon.innerHTML=`<svg viewBox="0 0 16 16" preserveAspectRatio="none" aria-hidden="true" focusable="false"><path d="M 0 16 A 4 4 0 0 0 2.82842712474619 14.82842712474619 L 6.585786437626905 11.050252531694166 A 2 2 0 0 1 9.414213562373096 11.050252531694166 L 13.17157287525381 14.82842712474619 A 4 4 0 0 0 16 16 Z"/></svg>`,this.container.appendChild(this.arrowIcon)),this.arrowIcon&&(this.arrowIcon.className=`ranui-dropdown-arrow ${e}`)):(this.arrowIcon&&this.container.contains(this.arrowIcon)&&this.container.removeChild(this.arrowIcon),this.arrowIcon=void 0)};stopPropagation=e=>{e.stopPropagation()};connectedCallback(){this.handlerExternalCss(),this.handlerTransit(),this.handlerArrow()}disconnectedCallback(){}attributeChangedCallback(e,t,n){e===`transit`&&this.handlerTransit(),e===`arrow`&&this.handlerArrow(),e===`sheet`&&t!==n&&this.handlerExternalCss()}};return qe(`r-dropdown`,$),e.ARROW_TYPE=at,e.Dropdown=$,e.default=$,e})({});
@@ -0,0 +1 @@
1
+ var ranui_fan_gallery=(function(e){Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var t=`:host{display:block;width:100%}.ran-fan-gallery{display:grid;justify-items:center;align-items:end;padding:var(--ran-fan-gallery-padding, var(--ran-space-10));padding-inline:max(var(--ran-fan-gallery-padding, var(--ran-space-10)),var(--fan-reach, 0px))}::slotted(*){grid-area:1 / 1;transform-origin:50% calc(100% + var(--ran-fan-gallery-pivot, 320px));transform:rotate(var(--fan-angle, 0deg)) translateY(calc(var(--fan-lifted, 0) * -1 * var(--ran-fan-gallery-lift, var(--ran-space-4))));z-index:var(--fan-lifted, 0);transition:transform var(--fan-duration, .4s) var(--fan-easing, ease-out) var(--fan-delay, 0s)}@media(prefers-reduced-motion:reduce){::slotted(*){transition:none}}`,n=/["'&<>]/;function r(e){let t=``+e,r=n.exec(t);if(!r)return t;let i,a=``,o=0,s=0;for(o=r.index;o<t.length;o++){switch(t.charCodeAt(o)){case 34:i=`&quot;`;break;case 38:i=`&amp;`;break;case 39:i=`&#39;`;break;case 60:i=`&lt;`;break;case 62:i=`&gt;`;break;default:continue}s!==o&&(a+=t.substring(s,o)),s=o+1,a+=i}return s===o?a:a+t.substring(s,o)}var i=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,a=.001,o=10;function s({stiffness:e=170,damping:t=26,mass:n=1,velocity:r=0}={}){let i=Math.sqrt(e/n),s=t/(2*Math.sqrt(e*n)),c;if(s<1){let e=i*Math.sqrt(1-s*s),t=(r-s*i)/e;c=n=>Math.exp(-s*i*n)*(-Math.cos(e*n)+t*Math.sin(e*n))}else if(s===1)c=e=>(-1+(r-i)*e)*Math.exp(-i*e);else{let e=i*Math.sqrt(s*s-1),t=-s*i+e,n=-s*i-e,a=(r+t)/(n-t),o=-1-a;c=e=>o*Math.exp(t*e)+a*Math.exp(n*e)}let l=e=>e<=0?0:1+c(e),u=o;for(let e=o;e>=0;e-=1/240)if(Math.abs(c(e))>=a){u=Math.min(o,e+1/240);break}let d=Math.max(16,Math.min(120,Math.round(u*60))),f=[];for(let e=0;e<=d;e++)f.push(String(Math.round((e===d?1:l(e/d*u))*1e4)/1e4));return{at:l,duration:u,easing:`linear(${f.join(`, `)})`}}var c=(e,t,{each:n=.05,from:r=`start`}={})=>{let i=r===`end`?t-1-e:r===`center`?Math.abs(e-(t-1)/2):e;return Math.max(0,i)*n};function l(e,{line:t=.85,onEnter:n}){if(typeof window>`u`)return()=>{};let r=()=>n({reduced:i()});if(typeof IntersectionObserver>`u`)return r(),()=>{};let a=Math.round((1-Math.min(1,Math.max(0,t)))*100),o=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(o.disconnect(),r())},{rootMargin:`0px 0px -${a}% 0px`});return o.observe(e),()=>o.disconnect()}var u=new Map,d=`data-adopted-style`,f=(e,t,n)=>{if(typeof CSSStyleSheet>`u`)return!1;try{if(!n.has(t)){let e=new CSSStyleSheet;e.replaceSync(t),n.set(t,e)}let r=n.get(t);return e.adoptedStyleSheets.includes(r)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]),!0}catch{return!1}},ee=(e,t,n=d)=>{if(t){if(typeof document>`u`){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t);return}if(!f(e,t,u)&&!e.querySelector(`style[${n}]`)){let r=document.createElement(`style`);r.setAttribute(n,``),r.textContent=t,e.appendChild(r)}}},p=typeof document>`u`,m=0,h=1,g=2,_=null,v=null,y=0,b=new Set,x=!1;function S(e,t){let n=t?.equals??Object.is,r={value:e,observers:new Set};return[()=>(re(r),r.value),e=>{let t=typeof e==`function`?e(r.value):e;if(!n(r.value,t)){r.value=t;for(let e of r.observers)D(e,g);y===0&&ie()}}]}function C(e){let t=te(e,!0);return ne(t),k(t),()=>j(t)}function w(e){let t=_;_=null;try{return e()}finally{_=t}}function T(e){let t={owned:[],cleanups:[],owner:v},n=v,r=_;v=t,_=null;try{return e(()=>ae(t))}finally{v=n,_=r}}function E(e){v&&v.cleanups.push(e)}function te(e,t,n){return{fn:e,sources:new Set,isEffect:t,running:!1,disposed:!1,state:g,observers:new Set,value:void 0,equals:n??Object.is,owned:[],cleanups:[],owner:v}}function ne(e){v&&v.owned.push(e)}function re(e){_&&(_.sources.add(e),e.observers.add(_))}function D(e,t){if(e.disposed||e.state>=t)return;let n=e.state===m;if(e.state=t,e.isEffect)b.add(e);else if(n)for(let t of e.observers)D(t,h)}function ie(){if(!(y>0||x)){x=!0;try{for(;b.size>0;){let e=[...b];b.clear();for(let t of e)t.disposed||O(t)}}finally{x=!1}}}function O(e){if(!(e.disposed||e.state===m)){if(e.state===h)for(let t of e.sources)`fn`in t&&O(t);e.state===g&&k(e),e.state=m}}function k(e){if(e.running)throw Error(`ranview reactivity: cyclic dependency detected (a computation triggered itself).`);A(e);let t=_,n=v;_=e,v=e,e.running=!0,e.state=m;try{let t=e.fn();if(e.isEffect)typeof t==`function`&&e.cleanups.push(t);else{let n=e.value;if(e.value=t,e.observers.size>0&&!e.equals(n,t))for(let t of e.observers)D(t,g)}}finally{e.running=!1,_=t,v=n}}function A(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0;for(let t of e.sources)t.observers.delete(e);e.sources.clear()}function j(e){e.disposed||(e.disposed=!0,A(e),e.observers.clear())}function ae(e){for(let t of e.owned)j(t);e.owned.length=0;for(let t of e.cleanups)t();e.cleanups.length=0}function M(e){return r(e)}var oe=e=>typeof e!=`string`&&`tagName`in e&&`childrenList`in e,se=`.#[`;function ce(e){let t=[],n=0,r=/^[a-zA-Z][\w-]*/.exec(e);for(r!==null&&(t.push(r[0]),n=r[0].length);n<e.length;){let r=e[n];if(r===`[`){let r=e.indexOf(`]`,n+1);if(r===-1)return null;t.push(e.slice(n,r+1)),n=r+1;continue}if(r!==`.`&&r!==`#`)return null;let i=n+1;for(;i<e.length&&!se.includes(e[i]);)i+=1;if(i===n+1)return null;t.push(e.slice(n,i)),n=i}return t.length>0?t:null}var le=(e,t)=>{let n=t;if(n.startsWith(`.`))return e.classList.contains(n.slice(1));if(n.startsWith(`#`))return e.getAttribute(`id`)===n.slice(1);if(n.startsWith(`[`)&&n.endsWith(`]`)){let[t,r]=n.slice(1,-1).trim().split(`=`),i=(t||``).trim();if(!i)return!1;if(r==null)return e.hasAttribute(i);let a=r.trim().replace(/^['"]|['"]$/g,``);return e.getAttribute(i)===a}return e.tagName===n.toLowerCase()},ue=(e,t)=>{let n=t.trim();if(!n)return!1;let r=ce(n);return r!==null&&r.every(t=>le(e,t))},N=(e,t,n)=>{for(let r of e)oe(r)&&(ue(r,t)&&n.push(r),N(r.childrenList,t,n))};function P(e,t,n){if(n==null)return e.push(t),t;let r=e.indexOf(n);return r===-1?e.push(t):e.splice(r,0,t),t}var F=class{childrenList=[];appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return P(this.childrenList,e,t)}serialize(){return this.childrenList.map(e=>typeof e==`string`?r(e):e.serialize()).join(``)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}},de=new Map,I=class{tagName;attributes=new Map;_inlineStyles=null;get inlineStyles(){return this._inlineStyles??de}childrenList=[];shadowRoot=null;_textContent=null;get textContent(){return this._textContent}set textContent(e){this._textContent=e}content;eventListeners=null;_style=null;_classList=null;get style(){return this._style??={setProperty:(e,t)=>{let n=e.startsWith(`--`)?e:e.replace(/([A-Z])/g,`-$1`).toLowerCase();(this._inlineStyles??=new Map).set(n,t)},removeProperty:e=>this._inlineStyles?.delete(e)??!1}}get classList(){return this._classList??={add:(...e)=>{let t=this.attributes.get(`class`)||``,n=new Set([...t.split(` `).filter(Boolean),...e]);this.attributes.set(`class`,Array.from(n).join(` `))},remove:(...e)=>{let t=(this.attributes.get(`class`)||``).split(` `).filter(t=>!e.includes(t));this.attributes.set(`class`,t.join(` `))},toggle:e=>{this.classList.contains(e)?this.classList.remove(e):this.classList.add(e)},contains:e=>(this.attributes.get(`class`)||``).split(` `).includes(e)}}_innerHTML=``;get innerHTML(){return this._textContent===null?this._innerHTML:r(this._textContent)}set innerHTML(e){this._innerHTML=e,this._textContent=null,this.tagName===`template`&&this.content&&(this.content.childrenList=[e])}constructor(e=`div`){this.tagName=e.toLowerCase(),this.tagName===`template`&&(this.content=new F)}get hidden(){return this.hasAttribute(`hidden`)}set hidden(e){e?this.setAttribute(`hidden`,``):this.removeAttribute(`hidden`)}setAttribute(e,t){this.attributes.set(e,t)}getAttribute(e){return this.attributes.get(e)||null}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return P(this.childrenList,e,t)}attachShadow(e){return this.shadowRoot=new fe(this,e),this.shadowRoot}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}addEventListener(e,t){let n=this.eventListeners??=new Map,r=n.get(e)||new Set;r.add(t),n.set(e,r)}removeEventListener(e,t){let n=this.eventListeners?.get(e);n&&(n.delete(t),n.size===0&&this.eventListeners?.delete(e))}dispatchEvent(e){let t=this.eventListeners?.get(e.type);if(!t||t.size===0)return!0;for(let n of t)typeof n==`function`?n.call(this,e):n.handleEvent(e);return!e.defaultPrevented}serialize(e){typeof this._preSerialize==`function`&&this._preSerialize();let t=e||this._ssrTag||this.tagName;this.shadowRoot&&!this.hasAttribute(`data-ran-dsd`)&&this.setAttribute(`data-ran-dsd`,``);let n=Array.from(this.attributes.entries()).map(([e,t])=>` ${e}="${M(t)}"`).join(``),i=this._inlineStyles?Array.from(this._inlineStyles.entries()).map(([e,t])=>`${e}:${t}`).join(`;`):``,a=i?` style="${M(i)}"`:``,o=``;return this.shadowRoot&&(o+=this.shadowRoot.serialize()),this.textContent===null?this._innerHTML?o+=this._innerHTML:o+=this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof F,e.serialize())).join(``):o+=r(this.textContent),[`area`,`base`,`br`,`col`,`embed`,`hr`,`img`,`input`,`link`,`meta`,`param`,`source`,`track`,`wbr`].includes(t)&&!o?`<${t}${n}${a} />`:`<${t}${n}${a}>${o}</${t}>`}},fe=class{host;options;childrenList=[];adoptedStyleSheets=[];constructor(e,t){this.host=e,this.options=t}get children(){return this.childrenList.filter(e=>typeof e!=`string`&&!(e instanceof F))}appendChild(e){return this.childrenList.push(e),e}insertBefore(e,t){return P(this.childrenList,e,t)}replaceChildren(...e){this.childrenList=e.filter(e=>e!=null)}querySelector(e){let t=this.querySelectorAll(e);return t.length>0?t[0]:null}querySelectorAll(e){let t=[];return N(this.childrenList,e,t),t}serialize(){return`<template shadowrootmode="${this.options.mode}"${this.options.delegatesFocus?` shadowrootdelegatesfocus`:``}>${this.adoptedStyleSheets.map(e=>`<style>${String(e).replace(/<\/style/gi,`<\\/style`)}</style>`).join(``)}${this.childrenList.map(e=>typeof e==`string`?r(e):(e instanceof F,e.serialize())).join(``)}</template>`}},L={bind(e,t){t(typeof e==`function`?e():e)},append(e,t){for(let n of t){if(n==null)continue;if(Array.isArray(n)){L.append(e,n);continue}if(typeof n==`function`){L.append(e,[n()]);continue}if(typeof n==`object`&&(`__ranFor`in n||`__ranIndex`in n))throw TypeError(`Import For and Index from the static entry when using static builders`);let t=n instanceof R?n.build():typeof n==`string`&&!p?document.createTextNode(n):n;e.appendChild(t)}}},pe=`http://www.w3.org/2000/svg`,me=new Set(`svg.circle.clipPath.defs.desc.ellipse.feBlend.feColorMatrix.feComposite.feDropShadow.feFlood.feGaussianBlur.feMerge.feMergeNode.feOffset.filter.foreignObject.g.image.line.linearGradient.marker.mask.path.pattern.polygon.polyline.radialGradient.rect.stop.switch.symbol.text.textPath.tspan.use`.split(`.`)),R=class{runtime;el;constructor(e,t,n=L){this.runtime=n;let r=t??(me.has(e)?`http://www.w3.org/2000/svg`:void 0);this.el=p?new I(e):r?document.createElementNS(r,e):document.createElement(e)}id(e){return this.el.setAttribute(`id`,e),this}bind(e,t){this.runtime.bind(e,t)}class(e){return this.bind(e,e=>{p?this.el.attributes.set(`class`,e):this.el.setAttribute(`class`,e)}),this}addClass(...e){return e.forEach(e=>this.el.classList.add(e)),this}removeClass(...e){return e.forEach(e=>this.el.classList.remove(e)),this}attr(e,t){return this.bind(t,t=>this.el.setAttribute(e,t)),this}attrs(e){return Object.entries(e).forEach(([e,t])=>{t!=null&&this.el.setAttribute(e,String(t))}),this}boolAttr(e,t,n=``){return this.bind(t,t=>{t?this.el.setAttribute(e,n):this.el.removeAttribute(e)}),this}part(e){return this.attr(`part`,e)}data(e,t){return this.attr(`data-${e}`,t)}style(e,t){return typeof e==`string`?this.bind(t??``,t=>this.el.style.setProperty(e,t)):Object.entries(e).forEach(([e,t])=>this.el.style.setProperty(e,t)),this}cssVar(e,t){let n=e.startsWith(`--`)?e:`--${e}`;return this.style(n,t)}aria(e,t){return this.attr(`aria-${e}`,t)}role(e){return this.attr(`role`,e)}tabIndex(e){return this.attr(`tabindex`,String(e))}label(e){return this.aria(`label`,e)}labelledBy(e){return this.aria(`labelledby`,e)}describedBy(e){return this.aria(`describedby`,e)}ariaHidden(e=!0){return this.aria(`hidden`,String(e))}on(e,t,n){return this.el.addEventListener(e,t,n),this}listen(e,t,n,r){return e.on(this.el,t,n,r),this}delegate(e,t,n,r,i){return e.delegate(this.el,t,n,r,i),this}children(...e){return this.runtime.append(this.el,e),this}replaceChildren(...e){if(p){let e=this.el;e.childrenList=[]}else this.el.replaceChildren();return this.children(...e)}text(e){return this.bind(e,e=>{this.el.textContent=e}),this}unsafeHtml(e){return this.bind(e,e=>{this.el.innerHTML=e}),this}ref(e){return e.current=this.el,this}shadow(e={mode:`closed`}){let t=this.el.attachShadow(e);return new he(this.el,t,e,this.runtime)}build(){return this.el}serialize(){if(p)return this.el.serialize();let e=document.createElement(`div`);return e.appendChild(this.el.cloneNode(!0)),e.innerHTML}},he=class{runtime;root;hostEl;constructor(e,t,n,r=L){this.runtime=r,this.hostEl=e,this.root=t}children(...e){return this.runtime.append(this.root,e),this}adoptSheet(...e){return this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,...e],this}css(e){if(p)return this.root.adoptedStyleSheets.push(e),this;if(typeof CSSStyleSheet<`u`)try{let t=new CSSStyleSheet;return t.replaceSync(e),this.root.adoptedStyleSheets=[...this.root.adoptedStyleSheets,t],this}catch{}let t=document.createElement(`style`);return t.textContent=e,this.root.appendChild(t),this}done(){return{host:this.hostEl,shadow:this.root}}serialize(){return p?this.root.serialize():this.root.innerHTML}},z=e=>e.reduce((e,t)=>Array.isArray(t)?e.concat(z(t)):e.concat(t),[]),B=e=>e==null?null:e instanceof R?e.build():typeof e==`string`?p?e:document.createTextNode(e):e,ge=(e,t)=>{if(p){H(e,[t()]);return}let n=document.createComment(``),r=document.createComment(``);e.appendChild(n),e.appendChild(r);let i=null,a=()=>{i?.(),i=null;let e=n.nextSibling;for(;e&&e!==r;){let t=e.nextSibling;e.parentNode?.removeChild(e),e=t}};C(()=>{let e=t();a();let n=document.createDocumentFragment();i=T(t=>(H(n,[e]),t)),r.parentNode?.insertBefore(n,r)}),E(()=>i?.())},_e=`__ranFor`,ve=e=>typeof e==`object`&&!!e&&e[_e]===!0,ye=(e,t,n)=>{let[r,i]=S(t),a=null,o=T(t=>{let i=B(n(e,r));return a=typeof i==`string`?document.createTextNode(i):i,t});return{node:a,index:i,dispose:o}},V=(e,t)=>{let n=e.parentNode;if(!n)return;let r=e;for(let e of t)r.nextSibling!==e&&n.insertBefore(e,r.nextSibling),r=e},be=(e,t)=>{if(p){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(n,()=>r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=new Map;E(()=>{for(let e of r.values())e.dispose();r.clear()}),C(()=>{let e=t.each()??[],i=new Map,a=[];e.forEach((e,n)=>{let o=t.key(e,n);if(i.has(o)){Te()&&console.error(`[ranview For] duplicate key "${String(o)}" — keys must be unique; ignoring the duplicate item.`);return}let s=r.get(o);s?(r.delete(o),s.index(n)):s=ye(e,n,t.render),i.set(o,s),s.node&&a.push(s.node)});for(let e of r.values())e.node?.parentNode?.removeChild(e.node),e.dispose();V(n,a),r=i})},xe=`__ranIndex`,Se=e=>typeof e==`object`&&!!e&&e[xe]===!0,Ce=(e,t,n)=>{let[r,i]=S(e),a=null,o=T(e=>{let i=B(n(r,t));return a=typeof i==`string`?document.createTextNode(i):i,e});return{node:a,setItem:i,dispose:o}},we=(e,t)=>{if(p){(t.each()??[]).forEach((n,r)=>{let i=B(t.render(()=>n,r));i!=null&&e.appendChild(i)});return}let n=document.createComment(``);e.appendChild(n);let r=[];E(()=>{for(let e of r)e.dispose();r=[]}),C(()=>{let e=t.each()??[];for(let n=0;n<e.length;n++)n<r.length?r[n].setItem(e[n]):r.push(Ce(e[n],n,t.render));for(let t=r.length-1;t>=e.length;t--){let{node:e}=r[t];e?.parentNode?.removeChild(e),r[t].dispose(),r.pop()}V(n,r.map(e=>e.node).filter(e=>e!=null))})},H=(e,t)=>{p?w(()=>U(e,t)):U(e,t)},U=(e,t)=>{z(t).forEach(t=>{if(ve(t)){be(e,t);return}if(Se(t)){we(e,t);return}if(typeof t==`function`){ge(e,t);return}let n=B(t);n!=null&&e.appendChild(n)})},Te=()=>!1,Ee={bind(e,t){typeof e==`function`?p?w(()=>t(e())):C(()=>t(e())):t(e)},append:H},De=class extends R{constructor(e,t){super(e,t,Ee)}};function Oe(e){let t=t=>new e(t);return{View:t,Div:()=>t(`div`),Svg:t=>new e(t,pe),Span:()=>t(`span`),Slot:()=>t(`slot`),ButtonBuilder:()=>t(`button`),InputBuilder:()=>t(`input`),Style:()=>t(`style`),Label:()=>t(`label`),Ul:()=>t(`ul`),Li:()=>t(`li`),Section:()=>t(`section`),Article:()=>t(`article`),Nav:()=>t(`nav`),Header:()=>t(`header`),Footer:()=>t(`footer`),Main:()=>t(`main`),DeclarativeShadow:(e=`open`,n=!1)=>{let r=t(`template`);return r.attr(`shadowrootmode`,e),n&&r.attr(`shadowrootdelegatesfocus`,``),r}}}var{View:ke,Div:Ae,Svg:je,Span:Me,Slot:Ne,ButtonBuilder:Pe,InputBuilder:Fe,Style:Ie,Label:Le,Ul:Re,Li:ze,Section:Be,Article:Ve,Nav:He,Header:Ue,Footer:We,Main:Ge,DeclarativeShadow:Ke}=Oe(De),qe=new Map;function Je(e,t){p?(qe.set(e,t),t.prototype._ssrTag=e):customElements.get(e)||customElements.define(e,t)}var Ye=typeof document<`u`?HTMLElement:I,Xe=`data-ranui`,W=`data-ranui-sheet`,G=(e,t)=>{if(typeof document>`u`&&t){let n=e.adoptedStyleSheets;Array.isArray(n)&&!n.includes(t)&&n.push(t)}ee(e,t,Xe)},K=new WeakMap,q=new Map,Ze=e=>{if(typeof CSSStyleSheet>`u`)return;let t=q.get(e);if(!t)try{let n=new CSSStyleSheet;n.replaceSync(e),t={sheet:n,users:0},q.set(e,t)}catch{return}return t.users++,t.sheet},J=e=>{let t=q.get(e);t&&--t.users===0&&q.delete(e)},Qe=(e,t)=>{if(typeof document>`u`)return;let n=K.get(e);if((n?.text??``)===t||(n?.sheet?(e.adoptedStyleSheets=e.adoptedStyleSheets.filter(e=>e!==n.sheet),J(n.text)):n&&e.querySelector(`style[${W}]`)?.remove(),K.delete(e),!t))return;let r=Ze(t);if(r)try{e.adoptedStyleSheets=[...e.adoptedStyleSheets,r]}catch{J(t),r=void 0}if(!r){let n=document.createElement(`style`);n.setAttribute(W,``),n.textContent=t,e.appendChild(n)}K.set(e,{text:t,sheet:r})},Y=new WeakMap,X=new WeakMap,$e=`@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;transition-duration:.01ms !important;scroll-behavior:auto !important}}`,et=`:host([hidden]){display:none}`,Z=new Map,Q=e=>{let t=Z.get(e);if(t!==void 0)return t;let n=`${et}\n${$e}`,r=e?`${e}\n${n}`:n;return Z.set(e,r),r},tt=e=>{let t=X.get(e);if(t)return t;try{let t=e.attachInternals;if(typeof t!=`function`)return;let n=t.call(e);return X.set(e,n),n}catch{return}},nt=(e,t=``,n={mode:`closed`},r)=>{let i=r??tt(e),a=e.shadowRoot||Y.get(e)||i?.shadowRoot||e.attachShadow(n);return Y.set(e,a),G(a,Q(t)),a},rt=(e,t,...n)=>{e.replaceChildren(...n),G(e,Q(t))},it=(e,t,n=``)=>e.getAttribute(t)??n,at=(e,t,n,r={})=>{r.removeEmpty&&!n?e.removeAttribute(t):e.setAttribute(t,n??``)},ot=(e,t,n,r,i)=>{n===`sheet`&&r!==i&&Qe(t,e.getAttribute(`sheet`)||``)},st=s({stiffness:200,damping:20}),ct=4,$=class extends Ye{_shadowDom;_slot;_stage;_open=!1;_hovered=null;_focused=null;_stopEntry=null;_sizes=null;static get observedAttributes(){return[`spread`,`sheet`]}constructor(){super(),this._shadowDom=nt(this,t),this._slot=Ne().build(),this._stage=Ae().class(`ran-fan-gallery`).attr(`part`,`stage`).children(this._slot).build(),rt(this._shadowDom,t,this._stage),this._slot.addEventListener(`slotchange`,()=>{this._observeSizes(),this._layout(!1)}),this.addEventListener(`pointerover`,e=>this._track(`_hovered`,this._itemOf(e))),this.addEventListener(`pointerleave`,()=>this._track(`_hovered`,null)),this.addEventListener(`focusin`,e=>this._track(`_focused`,this._itemOf(e))),this.addEventListener(`focusout`,e=>{this.contains(e.relatedTarget)||this._track(`_focused`,null)})}get spread(){return it(this,`spread`,`24`)}set spread(e){at(this,`spread`,e)}get sheet(){return it(this,`sheet`)}set sheet(e){at(this,`sheet`,e)}connectedCallback(){this.handlerExternalCss(),this._observeSizes(),this.style.setProperty(`--fan-duration`,`${st.duration}s`),this.style.setProperty(`--fan-easing`,st.easing),this._open||i()?(this._open=!0,this._layout(!1)):(this._layout(!1),this._stopEntry=l(this,{line:1,onEnter:({reduced:e})=>{this._stopEntry=null,this._open=!0,this._layout(!e)}}))}disconnectedCallback(){this._stopEntry?.(),this._stopEntry=null,this._sizes?.disconnect(),this._sizes=null}attributeChangedCallback(e,t,n){t!==n&&(e===`sheet`&&this.handlerExternalCss(),e===`spread`&&(this._reserve(),this._layout(!1)))}handlerExternalCss=()=>{ot(this,this._shadowDom,`sheet`,null,this.sheet)};_itemOf(e){let t=this._slot.assignedElements();return e.composedPath().find(e=>t.includes(e))??null}_track(e,t){this[e]!==t&&(this[e]=t,this._layout(!1))}_observeSizes(){if(typeof ResizeObserver<`u`){this._sizes??=new ResizeObserver(()=>this._reserve()),this._sizes.disconnect(),this._sizes.observe(this);for(let e of this._slot.assignedElements())this._sizes.observe(e)}}_reserve(){let e=this._slot.assignedElements(),t=Number.parseFloat(this.spread),n=((Number.isFinite(t)?Math.abs(t)/2:0)+(e.length>1?ct:0))*Math.PI/180,r=0,i=0;for(let t of e){let e=t.offsetWidth,a=Number.parseFloat(getComputedStyle(t).transformOrigin.split(` `)[1]??``)||t.offsetHeight;r=Math.max(r,e/2*Math.cos(n)+a*Math.sin(n)-e/2),i=Math.max(i,e)}this.style.setProperty(`--fan-reach`,`${Math.ceil(r)}px`);let a=i+2*Math.max(Math.ceil(r),Number.parseFloat(getComputedStyle(this._stage).paddingTop)||0),o=this.clientWidth,s=a>0&&o>0?Math.min(1,o/a):1;this._stage.style.setProperty(`zoom`,s<1?String(Math.floor(s*1e3)/1e3):``)}_layout(e){let t=this._slot.assignedElements(),n=t.length,r=Number.parseFloat(this.spread),i=n>1&&Number.isFinite(r)?r/(n-1):0,a=this._hovered??this._focused,o=this._open&&a?t.indexOf(a):-1;t.forEach((t,r)=>{let a=this._open?(r-(n-1)/2)*i:0,s=o<0||r===o?0:r<o?-4:ct;t.style.setProperty(`--fan-angle`,`${a+s}deg`),t.style.setProperty(`--fan-lifted`,r===o?`1`:`0`),t.style.setProperty(`--fan-delay`,e?`${c(r,n,{each:.06})}s`:`0s`)})}};return Je(`r-fan-gallery`,$),e.FanGallery=$,e.default=$,e})({});