@tempots/beatui 0.60.7 → 0.60.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +108 -108
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),Z=require("@tempots/ui"),h=require("./translations-DM5R5VZ0.cjs"),q=require("./colors-B9fcMxa_.cjs"),T=require("./index-CyyNsVT9.cjs"),D=require("./notice-BIcHmVnn.cjs"),H=require("./modal-DA0OKusk.cjs"),ge=require("./theme-Dt6lCAvY.cjs"),S=require("./utils-B25pniId.cjs"),pe=require("./timer-DK_yKNwE.cjs"),Bt=require("./link-portal-_tiDFZqh.cjs"),be=require("./toolbar-CC22Z53U.cjs");function Lt(t,n=0,a=()=>!0){let r=null,l;const i=e.prop(t.value);return t.on(s=>{l=s,a(s)?r==null&&(r=setTimeout(()=>{r=null,i.set(l)},n)):i.set(s)}),t.onDispose(()=>{r!=null&&clearTimeout(r)}),i}const Ze=(t,n)=>t<n?t:n,ve=(t,n)=>t>n?t:n,Et=(t,{abortSignal:n}={})=>new Promise((a,r)=>{const l=setTimeout(a,t);n&&n.addEventListener("abort",()=>{clearTimeout(l),r(new DOMException("Aborted","AbortError"))})}),Oe=["xs","sm","md","lg","xl"];function At(t,n=1){const a=Oe.indexOf(t);if(a===-1)throw new Error(`Invalid size: ${t}`);const r=Math.min(Math.max(a+n,0),Oe.length-1);return Oe[r]}function nt(t,n,a,r){const l=["bc-badge",`bc-badge--size-${t}`,`bc-control--rounded-${n}`];return a&&l.push("bc-badge--circle"),r&&l.push("bc-badge--full-width"),l.join(" ")}function at(t,n){const a=new Map,r=(l,i,s,u)=>{a.set("--badge-bg-hover",l),a.set("--badge-text-hover",s),a.set("--badge-bg-hover-dark",i),a.set("--badge-text-hover-dark",u)};switch(t){case"filled":{const l=h.backgroundValue(n,"solid","light"),i=h.backgroundValue(n,"solid","dark"),s=h.hoverBackgroundValue(n,"soft","light"),u=h.hoverBackgroundValue(n,"soft","dark");a.set("--badge-bg",l.backgroundColor),a.set("--badge-text",l.textColor),a.set("--badge-bg-dark",i.backgroundColor),a.set("--badge-text-dark",i.textColor),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"light":{const l=h.backgroundValue(n,"light","light"),i=h.backgroundValue(n,"light","dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg",l.backgroundColor),a.set("--badge-text",l.textColor),a.set("--badge-bg-dark",i.backgroundColor),a.set("--badge-text-dark",i.textColor),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"outline":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.borderColorValue(n,"light"),u=h.borderColorValue(n,"dark"),c=h.hoverBackgroundValue(n,"light","light"),o=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","transparent"),a.set("--badge-text",l),a.set("--badge-bg-dark","transparent"),a.set("--badge-text-dark",i),a.set("--badge-border",s),a.set("--badge-border-dark",u),r(c.backgroundColor,o.backgroundColor,c.textColor,o.textColor);break}case"default":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","var(--bg-background-light)"),a.set("--badge-text",l),a.set("--badge-bg-dark","var(--bg-background-dark)"),a.set("--badge-text-dark",i),a.set("--badge-border","var(--border-border-light)"),a.set("--badge-border-dark","var(--border-border-dark)"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"text":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","transparent"),a.set("--badge-text",l),a.set("--badge-bg-dark","transparent"),a.set("--badge-text-dark",i),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}}return Array.from(a.entries()).map(([l,i])=>`${l}: ${i}`).join("; ")}function Nt({variant:t="filled",size:n="md",color:a="base",roundedness:r="full",circle:l=!1,fullWidth:i=!1},...s){return e.html.span(e.attr.class(e.computedOf(n,r,l,i)((u,c,o,p)=>nt(u??"md",c??"sm",o??!1,p??!1))),e.attr.style(e.computedOf(t,a)((u,c)=>at(u??"filled",c??"base"))),e.html.span(e.attr.class("bc-badge__content"),...s))}function Ft({onChange:t,accept:n="*/*",onDragContent:a,content:r,onInvalidSelection:l,disabled:i=!1}){const s=e.prop(!1),u=e.prop([]);let c=null,o=0;const p=b=>b.dataTransfer?.types.includes("Files")??!1,m=(b,x)=>x==="*/*"?!0:x.split(",").map(P=>P.trim()).some(P=>{if(P==="*/*")return!0;if(P.endsWith("/*")){const I=P.slice(0,-2);return b.type.startsWith(I+"/")}return b.type===P||b.name.endsWith(P)}),C=b=>{e.Value.get(i)||p(b)&&(b.preventDefault(),b.stopPropagation(),o++,o===1&&(s.value=!0))},f=b=>{e.Value.get(i)||p(b)&&(b.preventDefault(),b.stopPropagation(),b.dataTransfer!=null&&(b.dataTransfer.dropEffect="copy"))},y=b=>{e.Value.get(i)||p(b)&&(b.preventDefault(),b.stopPropagation(),o--,o===0&&(s.value=!1))},g=b=>{if(e.Value.get(i)||!p(b))return;b.preventDefault(),b.stopPropagation(),o=0,s.value=!1;const x=Array.from(b.dataTransfer?.files??[]);if(x.length>0){const k=e.Value.get(n),P=x.filter(V=>m(V,k)),I=x.filter(V=>!P.includes(V));P.length>0&&(u.value=P,t(P,"dragdrop")),I.length>0&&l?.(x)}};typeof document<"u"&&(document.addEventListener("dragenter",C),document.addEventListener("dragover",f),document.addEventListener("dragleave",y),document.addEventListener("drop",g));const w=()=>{typeof document<"u"&&(document.removeEventListener("dragenter",C),document.removeEventListener("dragover",f),document.removeEventListener("dragleave",y),document.removeEventListener("drop",g)),o=0},v=()=>{c?.click()},d=b=>{const x=b.target,k=Array.from(x.files??[]);k.length>0&&(u.value=k,t(k,"click")),x.value=""};return e.Fragment(e.OnDispose(w),e.html.input(e.attr.type("file"),e.attr.name("bui-page-drop-zone"),e.attr.multiple(!0),e.attr.accept(n),e.style.position("absolute"),e.style.opacity("0"),e.style.pointerEvents("none"),e.style.width("0"),e.style.height("0"),e.on.change(d),e.WithElement(b=>(c=b,e.OnDispose(()=>{c!=null&&(c.value="")})))),a!=null?e.When(s,()=>a({files:u})):null,r!=null?r({isDragging:s,files:u,selectFiles:v}):null)}function Mt(t,n,a,r,l,i){const s=["bc-table"];return t!=="md"&&s.push(`bc-table--size-${t}`),n&&s.push("bc-table--hoverable"),a&&s.push("bc-table--sticky-header"),r&&s.push("bc-table--with-striped-rows"),l&&s.push("bc-table--with-column-borders"),i&&s.push("bc-table--with-row-borders"),s.join(" ")}function Ut(t){if(t!=null)return t==="none"?"--table-border-radius: 0":`--table-border-radius: var(--radius-${t})`}function Rt({size:t="md",hoverable:n=!1,stickyHeader:a=!1,fullWidth:r=!1,withStripedRows:l=!1,withTableBorder:i=!0,withColumnBorders:s=!1,withRowBorders:u=!0,borderRadius:c}={},...o){const p=e.computedOf(t,n,a,l,s,u)((f,y,g,w,v,d)=>Mt(f??"md",y??!1,g??!1,w??!1,v??!1,d??!0)),m=e.computedOf(a,r,i)((f,y,g)=>{const w=["bc-table-container"];return f&&w.push("bc-table-container--sticky"),y&&w.push("bc-table-container--full-width"),g&&w.push("bc-table-container--with-table-border"),w.join(" ")}),C=e.computedOf(c)(f=>Ut(f));return e.html.div(e.attr.class(m),e.attr.style(C),e.html.table(e.attr.class(p),...o))}function Wt(t,n){const a=["bc-tag"];return t!=="md"&&a.push(`bc-tag--${t}`),n&&a.push("bc-tag--disabled"),a.join(" ")}function Ht(t){const n=h.backgroundValue(t,"light","light"),a=h.backgroundValue(t,"light","dark"),r=h.hoverBackgroundValue(t,"light","light"),l=h.hoverBackgroundValue(t,"light","dark");return[`--tag-bg: ${n.backgroundColor}`,`--tag-text: ${n.textColor}`,`--tag-bg-dark: ${a.backgroundColor}`,`--tag-text-dark: ${a.textColor}`,`--tag-bg-hover: ${r.backgroundColor}`,`--tag-text-hover: ${r.textColor}`,`--tag-bg-hover-dark: ${l.backgroundColor}`,`--tag-text-hover-dark: ${l.textColor}`].join("; ")}const Fe=({value:t,color:n="base",onClose:a,size:r="md",class:l,disabled:i})=>e.html.span(e.attr.class(e.computedOf(r??"md",i??!1)((s,u)=>Wt(s,u))),e.attr.style(e.computedOf(n)(s=>Ht(s??"base"))),e.attr.class(l),e.html.span(t),a!=null?e.Use(h.BeatUII18n,s=>D.CloseButton({size:"xs",label:s.$.removeItem,color:"white",disabled:i,onClick:()=>a?.(e.Value.get(t))},e.attr.class("bc-tag__close"))):e.Empty);function rt({value:t,onChange:n,disabled:a}){return S.SegmentedInput({size:"sm",value:t,disabled:a,options:{system:e.html.span(e.attr.title("System"),h.Icon({icon:"line-md:laptop",color:"gray"})),light:e.html.span(e.attr.title("Light"),h.Icon({icon:"line-md:sunny-twotone-loop",color:"yellow"})),dark:e.html.span(e.attr.title("Dark"),h.Icon({icon:"line-md:sunny-outline-to-moon-alt-loop-transition",color:"blue"}))},onChange:n})}function jt(){return e.Use(ge.Theme,({appearancePreference:t,setAppearancePreference:n})=>rt({value:t,onChange:n}))}function zt({value:t,onChange:n,onInput:a}){let r=null;return e.html.div(e.attr.class("bc-color-input__swatch-container"),e.html.span(e.attr.class("bc-color-input__swatch"),e.on.click(()=>r?.showPicker()),e.input.color(e.WithElement(l=>(r=l,e.Empty)),e.attr.value(t),e.style.width("4px"),e.style.height("4px"),n!=null?e.on.change(e.emitValue(n)):e.Empty,a!=null?e.on.input(e.emitValue(a)):e.Empty),e.attr.style(e.Value.map(t,l=>`background-color: ${l}`))))}function Gt(t){const{value:n,onBlur:a,onChange:r,onInput:l}=t;return h.InputContainer({...t,input:e.input.text(h.CommonInputAttributes(t),e.attr.value(n),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(r)):e.Empty,l!=null?e.on.input(e.emitValue(l)):e.Empty)},e.attr.class("bc-color-input"),zt({value:n,onChange:t.onChange,onInput:t.onInput}))}function Yt(t){const n={fade:!0,scale:!0};return t.startsWith("top")?(n.slide="down",n.transformOrigin="bottom"):t.startsWith("bottom")?(n.slide="up",n.transformOrigin="top"):t.startsWith("left")?(n.slide="right",n.transformOrigin="right"):t.startsWith("right")&&(n.slide="left",n.transformOrigin="left"),n}function he(t){const{content:n,placement:a="top",showDelay:r=250,hideDelay:l=500,mainAxisOffset:i=8,crossAxisOffset:s=0,showOn:u="hover-focus",closable:c=!0,arrow:o,role:p,hasPopup:m="dialog"}=t;return Z.PopOver((C,f)=>{const y=H.useAnimatedElementToggle({initialStatus:"closed"}),g=D.sessionId("flyout"),w=e.prop(!1);let v=null,d=null,b=!1;function x(){P!=null&&(clearTimeout(P),P=null),V!=null&&(clearTimeout(V),V=null),d&&(d(),d=null),v&&(document.removeEventListener("keydown",v),v=null),w.set(!1),b=!1}function k(){e.Value.get(c)&&(v=B=>{B.key==="Escape"&&$()},document.addEventListener("keydown",v)),b=!0,w.set(!0),C({placement:a??"top",mainAxisOffset:i,crossAxisOffset:s,onClickOutside:()=>{e.Value.get(c)&&$()},arrow:o,content:e.WithElement(B=>{y.setElement(B),d=pe.g(()=>{y.open(),d=null});const A=F=>{e.Value.get(c)&&F.key==="Escape"&&(F.preventDefault(),F.stopPropagation(),$(),w.set(!1))};return document.addEventListener("keydown",A,!0),e.Fragment(e.OnDispose(()=>{x(),document.removeEventListener("keydown",A,!0)}),e.attr.class("bc-flyout-container"),e.attr.id(g),e.attr.tabindex(-1),e.html.div(e.attr.class("bc-flyout"),H.AnimatedToggleClass({animation:e.Value.map(a,Yt),status:y.status}),p?e.attr.role(p):e.attr.role("dialog"),n()))})})}let P=null;function I(){if(P!=null&&(clearTimeout(P),P=null),V!=null&&(clearTimeout(V),V=null),y.isOpened.value||y.isOpening.value||y.isStartOpening.value)return;if(y.isClosing.value||y.isStartClosing.value){y.open();return}const B=e.Value.get(r);P=setTimeout(()=>{P=null,k()},B)}let V=null;function $(){if(P!=null&&(clearTimeout(P),P=null),V!=null&&(clearTimeout(V),V=null),w.set(!1),d&&(d(),d=null,b)){f(),x();return}const B=e.Value.get(l);V=setTimeout(()=>{V=null,y.close(),y.listenOnClosed(()=>{f(),x()})},B)}return e.WithElement(B=>{const A=()=>{I(),w.set(!0)},F=()=>{$(),w.set(!1)},R=e.Fragment(e.aria.expanded(w),e.aria.controls(g),e.aria.haspopup(m));if(typeof u=="function")return e.Fragment(R,u(A,F));const j=u;return e.Fragment(R,e.OneOfValue(j,{"hover-focus":()=>e.Fragment(e.on.mouseenter(()=>A()),e.on.mouseleave(()=>F()),e.on.focus(()=>A()),e.on.blur(()=>F())),hover:()=>e.Fragment(e.on.mouseenter(()=>A()),e.on.mouseleave(()=>F())),focus:()=>e.Fragment(e.on.focus(()=>A()),e.on.blur(()=>F())),click:()=>{function E(){document.removeEventListener("click",z)}function z(){E(),F()}return e.Fragment(e.OnDispose(E),e.on.click(()=>{A(),pe.g(()=>{document.addEventListener("click",z,{once:!0})})}))},never:()=>null}))})})}function qt(t,n,a,r){const l=["bc-action-card"];return t&&l.push("bc-action-card--active"),n&&l.push("bc-action-card--disabled"),a!=="md"&&l.push(`bc-action-card--${a}`),r&&!n&&l.push("bc-action-card--clickable"),l.join(" ")}function Zt(t,n,a,r){const l=new Map;if(t!=null&&l.set("--action-card-bg",t),n!=null&&l.set("--action-card-border",n),a!=null&&l.set("--action-card-title-color",a),r!=null&&l.set("--action-card-description-color",r),l.size!==0)return Array.from(l.entries()).map(([i,s])=>`${i}: ${s}`).join("; ")}function Jt({icon:t,title:n,description:a,active:r=!1,disabled:l=!1,onClick:i,size:s="md",iconColor:u="primary",iconSize:c="md",backgroundColor:o,borderColor:p,titleColor:m,descriptionColor:C}){const f=i!=null;return e.html.div(e.attr.class(e.computedOf(r,l,s)((y,g,w)=>qt(y??!1,g??!1,w??"md",f))),e.attr.style(e.computedOf(o,p,m,C)((y,g,w,v)=>Zt(y,g,w,v))),e.When(f,()=>e.Fragment(e.Unless(l,()=>e.Fragment(e.on.click(()=>i?.()),e.attr.tabindex(0))),e.attr.role("button"))),e.aria.disabled(l),e.html.div(e.attr.class("bc-action-card__icon"),h.Icon({icon:t,size:c,color:u})),e.html.div(e.attr.class("bc-action-card__content"),e.html.div(e.attr.class("bc-action-card__title"),n),e.html.div(e.attr.class("bc-action-card__description"),a)))}const Kt=["!=","<=",">=","<",">","="];function Qt(t){for(const n of Kt)if(typeof t=="string"&&t.startsWith(n))return[n,t.slice(n.length)];return["=",t]}function lt(t,n,a){const[r,l]=Qt(n),i=t.findIndex(c=>c[1]===l);if(i===-1)throw new Error(`Breakpoint ${String(l)} not found`);const s=t[i][0],u=i<t.length-1?t[i+1][0]:1/0;switch(r){case"=":return a>=s&&a<u;case"!=":return!(a>=s&&a<u);case"<=":return a<=s;case">=":return a>=s;case"<":return a<s;case">":return a>s;default:return!1}}function Xt(t,n){const a=t.findIndex(r=>r[0]>n)-1;return a>=0?t[a][1]:(t.length>0&&n>=t[0][0],t[0][1])}function Me(t,{breakpoints:n,mode:a="viewport"}){const l=[...Object.entries(n).map(([s,u])=>[u,s])].sort((s,u)=>s[0]-u[0]),i=s=>{const u=s.map(({width:o})=>{const p=l.findIndex(m=>m[0]>o)-1;return p>=0?{width:o,breakpoint:l[p][1]}:l.length>0&&o>=l[0][0]?{width:o,breakpoint:l[0][1]}:{width:o,breakpoint:l[0][1]}});return t({value:u,breakpoints:n,asList:l,is:(o,p)=>lt(l,o,p)})};return a==="element"?Z.ElementRect(i):Z.WindowSize(i)}let Pe=NaN;function en(t,n){return t?(isNaN(Pe)&&(Pe=parseFloat(getComputedStyle(document.documentElement).fontSize)),parseFloat(t)*Pe):n}function Q(t,n,a){return en(t.getPropertyValue(n),a)}function ot(t){return e.WithElement(n=>{const a=getComputedStyle(n),r={zero:0,xs:Q(a,"--breakpoint-xs",640),sm:Q(a,"--breakpoint-sm",768),md:Q(a,"--breakpoint-md",1024),lg:Q(a,"--breakpoint-lg",1280),xl:Q(a,"--breakpoint-xl",1536)};return Me(t,{breakpoints:r})})}function tn(t){return e.WithElement(n=>{const a=getComputedStyle(n),r={zero:0,"3xs":Q(a,"--container-3xs",256),"2xs":Q(a,"--container-2xs",288),xs:Q(a,"--container-xs",320),sm:Q(a,"--container-sm",384),md:Q(a,"--container-md",448),lg:Q(a,"--container-lg",512),xl:Q(a,"--container-xl",640),"2xl":Q(a,"--container-2xl",768),"3xl":Q(a,"--container-3xl",1024),"4xl":Q(a,"--container-4xl",1280),"5xl":Q(a,"--container-5xl",1536),"6xl":Q(a,"--container-6xl",2048)};return Me(t,{breakpoints:r,mode:"element"})})}function ee(t,n){return`bc-panel ${(Array.isArray(t)?t:[t]).map(r=>`bc-panel--side-${r}`).join(" ")} bc-panel--shadow-${n}`}function ie(t){const n=e.Value.toSignal(t).map(r=>h.backgroundValue(r,"lighter","light")),a=e.Value.toSignal(t).map(r=>h.backgroundValue(r,"lighter","dark"));return e.Fragment(e.style.variable("--panel-bg",n.$.backgroundColor),e.style.variable("--panel-text",n.$.textColor),e.style.variable("--panel-bg-dark",a.$.backgroundColor),e.style.variable("--panel-text-dark",a.$.textColor))}const ne={banner:{zero:32,xs:32,sm:32,md:32,lg:32,xl:32},header:{zero:60,xs:60,sm:60,md:60,lg:60,xl:60},mainHeader:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},mainFooter:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},footer:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},menu:{zero:300,xs:300,sm:300,md:300,lg:300,xl:300},aside:{zero:280,xs:280,sm:280,md:280,lg:280,xl:280}};function Je(t,n){if(typeof t=="number")return{zero:t,xs:t,sm:t,md:t,lg:t,xl:t};const a={zero:t.zero??n.zero,xs:t.xs??n.xs,sm:t.sm??n.sm,md:t.md??n.md,lg:t.lg??n.lg,xl:t.xl??n.xl};return a.xs<a.zero&&(a.xs=a.zero),a.sm<a.xs&&(a.sm=a.xs),a.md<a.sm&&(a.md=a.sm),a.lg<a.md&&(a.lg=a.md),a.xl<a.lg&&(a.xl=a.lg),a}function _e(t){t=t.filter(n=>n.some(a=>a!=null&&!a.startsWith("?")));for(let n=0;n<t[0].length;n++)t.every(a=>a[n]==null||a[n].startsWith("?"))&&(t=t.map(a=>a.filter((r,l)=>l!==n)),n--);return t=t.map(n=>n.map(a=>a?.startsWith("?")?a.slice(1):a)),t}function nn({smallBreakpoint:t,mediumBreakpoint:n,vertical:a,horizontal:r,is:l}){function i(c){let o=[[null],[null],[null],[null],[null],[null]];const p=[];p.push("1fr");const m=[];return r.banner&&(m.push(r.banner[c]+"px"),o[0][1]="banner"),(r.header||a.menu||a.aside)&&(m.push((r.header?.[c]??ne.header[c])+"px"),o[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[c]+"px"),o[2][1]="mainHeader"),m.push("1fr"),o[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[c]+"px"),o[4][1]="mainFooter"),r.footer&&(m.push(r.footer[c]+"px"),o[5][1]="footer"),o=_e(o),{columns:p.join(" "),rows:m.join(" "),areas:o.map(f=>`"${f.join(" ")}"`).join(`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),Z=require("@tempots/ui"),h=require("./translations-DM5R5VZ0.cjs"),q=require("./colors-B9fcMxa_.cjs"),T=require("./index-CyyNsVT9.cjs"),D=require("./notice-BIcHmVnn.cjs"),H=require("./modal-DA0OKusk.cjs"),ge=require("./theme-Dt6lCAvY.cjs"),S=require("./utils-B25pniId.cjs"),pe=require("./timer-DK_yKNwE.cjs"),Bt=require("./link-portal-_tiDFZqh.cjs"),be=require("./toolbar-CC22Z53U.cjs");function Lt(t,n=0,a=()=>!0){let r=null,l;const i=e.prop(t.value);return t.on(s=>{l=s,a(s)?r==null&&(r=setTimeout(()=>{r=null,i.set(l)},n)):i.set(s)}),t.onDispose(()=>{r!=null&&clearTimeout(r)}),i}const Ze=(t,n)=>t<n?t:n,ve=(t,n)=>t>n?t:n,Et=(t,{abortSignal:n}={})=>new Promise((a,r)=>{const l=setTimeout(a,t);n&&n.addEventListener("abort",()=>{clearTimeout(l),r(new DOMException("Aborted","AbortError"))})}),Oe=["xs","sm","md","lg","xl"];function At(t,n=1){const a=Oe.indexOf(t);if(a===-1)throw new Error(`Invalid size: ${t}`);const r=Math.min(Math.max(a+n,0),Oe.length-1);return Oe[r]}function nt(t,n,a,r){const l=["bc-badge",`bc-badge--size-${t}`,`bc-control--rounded-${n}`];return a&&l.push("bc-badge--circle"),r&&l.push("bc-badge--full-width"),l.join(" ")}function at(t,n){const a=new Map,r=(l,i,s,u)=>{a.set("--badge-bg-hover",l),a.set("--badge-text-hover",s),a.set("--badge-bg-hover-dark",i),a.set("--badge-text-hover-dark",u)};switch(t){case"filled":{const l=h.backgroundValue(n,"solid","light"),i=h.backgroundValue(n,"solid","dark"),s=h.hoverBackgroundValue(n,"soft","light"),u=h.hoverBackgroundValue(n,"soft","dark");a.set("--badge-bg",l.backgroundColor),a.set("--badge-text",l.textColor),a.set("--badge-bg-dark",i.backgroundColor),a.set("--badge-text-dark",i.textColor),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"light":{const l=h.backgroundValue(n,"light","light"),i=h.backgroundValue(n,"light","dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg",l.backgroundColor),a.set("--badge-text",l.textColor),a.set("--badge-bg-dark",i.backgroundColor),a.set("--badge-text-dark",i.textColor),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"outline":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.borderColorValue(n,"light"),u=h.borderColorValue(n,"dark"),c=h.hoverBackgroundValue(n,"light","light"),o=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","transparent"),a.set("--badge-text",l),a.set("--badge-bg-dark","transparent"),a.set("--badge-text-dark",i),a.set("--badge-border",s),a.set("--badge-border-dark",u),r(c.backgroundColor,o.backgroundColor,c.textColor,o.textColor);break}case"default":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","var(--bg-background-light)"),a.set("--badge-text",l),a.set("--badge-bg-dark","var(--bg-background-dark)"),a.set("--badge-text-dark",i),a.set("--badge-border","var(--border-border-light)"),a.set("--badge-border-dark","var(--border-border-dark)"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}case"text":{const l=h.textColorValue(n,"light"),i=h.textColorValue(n,"dark"),s=h.hoverBackgroundValue(n,"light","light"),u=h.hoverBackgroundValue(n,"light","dark");a.set("--badge-bg","transparent"),a.set("--badge-text",l),a.set("--badge-bg-dark","transparent"),a.set("--badge-text-dark",i),a.set("--badge-border","transparent"),a.set("--badge-border-dark","transparent"),r(s.backgroundColor,u.backgroundColor,s.textColor,u.textColor);break}}return Array.from(a.entries()).map(([l,i])=>`${l}: ${i}`).join("; ")}function Nt({variant:t="filled",size:n="md",color:a="base",roundedness:r="full",circle:l=!1,fullWidth:i=!1},...s){return e.html.span(e.attr.class(e.computedOf(n,r,l,i)((u,c,o,p)=>nt(u??"md",c??"sm",o??!1,p??!1))),e.attr.style(e.computedOf(t,a)((u,c)=>at(u??"filled",c??"base"))),e.html.span(e.attr.class("bc-badge__content"),...s))}function Ft({onChange:t,accept:n="*/*",onDragContent:a,content:r,onInvalidSelection:l,disabled:i=!1}){const s=e.prop(!1),u=e.prop([]);let c=null,o=0;const p=b=>b.dataTransfer?.types.includes("Files")??!1,m=(b,x)=>x==="*/*"?!0:x.split(",").map(P=>P.trim()).some(P=>{if(P==="*/*")return!0;if(P.endsWith("/*")){const k=P.slice(0,-2);return b.type.startsWith(k+"/")}return b.type===P||b.name.endsWith(P)}),C=b=>{e.Value.get(i)||p(b)&&(b.preventDefault(),b.stopPropagation(),o++,o===1&&(s.value=!0))},f=b=>{e.Value.get(i)||p(b)&&(b.preventDefault(),b.stopPropagation(),b.dataTransfer!=null&&(b.dataTransfer.dropEffect="copy"))},y=b=>{e.Value.get(i)||p(b)&&(b.preventDefault(),b.stopPropagation(),o--,o===0&&(s.value=!1))},g=b=>{if(e.Value.get(i)||!p(b))return;b.preventDefault(),b.stopPropagation(),o=0,s.value=!1;const x=Array.from(b.dataTransfer?.files??[]);if(x.length>0){const I=e.Value.get(n),P=x.filter(V=>m(V,I)),k=x.filter(V=>!P.includes(V));P.length>0&&(u.value=P,t(P,"dragdrop")),k.length>0&&l?.(x)}};typeof document<"u"&&(document.addEventListener("dragenter",C),document.addEventListener("dragover",f),document.addEventListener("dragleave",y),document.addEventListener("drop",g));const w=()=>{typeof document<"u"&&(document.removeEventListener("dragenter",C),document.removeEventListener("dragover",f),document.removeEventListener("dragleave",y),document.removeEventListener("drop",g)),o=0},v=()=>{c?.click()},d=b=>{const x=b.target,I=Array.from(x.files??[]);I.length>0&&(u.value=I,t(I,"click")),x.value=""};return e.Fragment(e.OnDispose(w),e.html.input(e.attr.type("file"),e.attr.name("bui-page-drop-zone"),e.attr.multiple(!0),e.attr.accept(n),e.style.position("absolute"),e.style.opacity("0"),e.style.pointerEvents("none"),e.style.width("0"),e.style.height("0"),e.on.change(d),e.WithElement(b=>(c=b,e.OnDispose(()=>{c!=null&&(c.value="")})))),a!=null?e.When(s,()=>a({files:u})):null,r!=null?r({isDragging:s,files:u,selectFiles:v}):null)}function Mt(t,n,a,r,l,i){const s=["bc-table"];return t!=="md"&&s.push(`bc-table--size-${t}`),n&&s.push("bc-table--hoverable"),a&&s.push("bc-table--sticky-header"),r&&s.push("bc-table--with-striped-rows"),l&&s.push("bc-table--with-column-borders"),i&&s.push("bc-table--with-row-borders"),s.join(" ")}function Ut(t){if(t!=null)return t==="none"?"--table-border-radius: 0":`--table-border-radius: var(--radius-${t})`}function Rt({size:t="md",hoverable:n=!1,stickyHeader:a=!1,fullWidth:r=!1,withStripedRows:l=!1,withTableBorder:i=!0,withColumnBorders:s=!1,withRowBorders:u=!0,borderRadius:c}={},...o){const p=e.computedOf(t,n,a,l,s,u)((f,y,g,w,v,d)=>Mt(f??"md",y??!1,g??!1,w??!1,v??!1,d??!0)),m=e.computedOf(a,r,i)((f,y,g)=>{const w=["bc-table-container"];return f&&w.push("bc-table-container--sticky"),y&&w.push("bc-table-container--full-width"),g&&w.push("bc-table-container--with-table-border"),w.join(" ")}),C=e.computedOf(c)(f=>Ut(f));return e.html.div(e.attr.class(m),e.attr.style(C),e.html.table(e.attr.class(p),...o))}function Wt(t,n){const a=["bc-tag"];return t!=="md"&&a.push(`bc-tag--${t}`),n&&a.push("bc-tag--disabled"),a.join(" ")}function Ht(t){const n=h.backgroundValue(t,"light","light"),a=h.backgroundValue(t,"light","dark"),r=h.hoverBackgroundValue(t,"light","light"),l=h.hoverBackgroundValue(t,"light","dark");return[`--tag-bg: ${n.backgroundColor}`,`--tag-text: ${n.textColor}`,`--tag-bg-dark: ${a.backgroundColor}`,`--tag-text-dark: ${a.textColor}`,`--tag-bg-hover: ${r.backgroundColor}`,`--tag-text-hover: ${r.textColor}`,`--tag-bg-hover-dark: ${l.backgroundColor}`,`--tag-text-hover-dark: ${l.textColor}`].join("; ")}const Fe=({value:t,color:n="base",onClose:a,size:r="md",class:l,disabled:i})=>e.html.span(e.attr.class(e.computedOf(r??"md",i??!1)((s,u)=>Wt(s,u))),e.attr.style(e.computedOf(n)(s=>Ht(s??"base"))),e.attr.class(l),e.html.span(t),a!=null?e.Use(h.BeatUII18n,s=>D.CloseButton({size:"xs",label:s.$.removeItem,color:"white",disabled:i,onClick:()=>a?.(e.Value.get(t))},e.attr.class("bc-tag__close"))):e.Empty);function rt({value:t,onChange:n,disabled:a}){return S.SegmentedInput({size:"sm",value:t,disabled:a,options:{system:e.html.span(e.attr.title("System"),h.Icon({icon:"line-md:laptop",color:"gray"})),light:e.html.span(e.attr.title("Light"),h.Icon({icon:"line-md:sunny-twotone-loop",color:"yellow"})),dark:e.html.span(e.attr.title("Dark"),h.Icon({icon:"line-md:sunny-outline-to-moon-alt-loop-transition",color:"blue"}))},onChange:n})}function jt(){return e.Use(ge.Theme,({appearancePreference:t,setAppearancePreference:n})=>rt({value:t,onChange:n}))}function zt({value:t,onChange:n,onInput:a}){let r=null;return e.html.div(e.attr.class("bc-color-input__swatch-container"),e.html.span(e.attr.class("bc-color-input__swatch"),e.on.click(()=>r?.showPicker()),e.input.color(e.WithElement(l=>(r=l,e.Empty)),e.attr.value(t),e.style.width("4px"),e.style.height("4px"),n!=null?e.on.change(e.emitValue(n)):e.Empty,a!=null?e.on.input(e.emitValue(a)):e.Empty),e.attr.style(e.Value.map(t,l=>`background-color: ${l}`))))}function Gt(t){const{value:n,onBlur:a,onChange:r,onInput:l}=t;return h.InputContainer({...t,input:e.input.text(h.CommonInputAttributes(t),e.attr.value(n),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(r)):e.Empty,l!=null?e.on.input(e.emitValue(l)):e.Empty)},e.attr.class("bc-color-input"),zt({value:n,onChange:t.onChange,onInput:t.onInput}))}function Yt(t){const n={fade:!0,scale:!0};return t.startsWith("top")?(n.slide="down",n.transformOrigin="bottom"):t.startsWith("bottom")?(n.slide="up",n.transformOrigin="top"):t.startsWith("left")?(n.slide="right",n.transformOrigin="right"):t.startsWith("right")&&(n.slide="left",n.transformOrigin="left"),n}function he(t){const{content:n,placement:a="top",showDelay:r=250,hideDelay:l=500,mainAxisOffset:i=8,crossAxisOffset:s=0,showOn:u="hover-focus",closable:c=!0,arrow:o,role:p,hasPopup:m="dialog"}=t;return Z.PopOver((C,f)=>{const y=H.useAnimatedElementToggle({initialStatus:"closed"}),g=D.sessionId("flyout"),w=e.prop(!1);let v=null,d=null,b=!1;function x(){P!=null&&(clearTimeout(P),P=null),V!=null&&(clearTimeout(V),V=null),d&&(d(),d=null),v&&(document.removeEventListener("keydown",v),v=null),w.set(!1),b=!1}function I(){e.Value.get(c)&&(v=B=>{B.key==="Escape"&&$()},document.addEventListener("keydown",v)),b=!0,w.set(!0),C({placement:a??"top",mainAxisOffset:i,crossAxisOffset:s,onClickOutside:()=>{e.Value.get(c)&&$()},arrow:o,content:e.WithElement(B=>{y.setElement(B),d=pe.g(()=>{y.open(),d=null});const A=F=>{e.Value.get(c)&&F.key==="Escape"&&(F.preventDefault(),F.stopPropagation(),$(),w.set(!1))};return document.addEventListener("keydown",A,!0),e.Fragment(e.OnDispose(()=>{x(),document.removeEventListener("keydown",A,!0)}),e.attr.class("bc-flyout-container"),e.attr.id(g),e.attr.tabindex(-1),e.html.div(e.attr.class("bc-flyout"),H.AnimatedToggleClass({animation:e.Value.map(a,Yt),status:y.status}),p?e.attr.role(p):e.attr.role("dialog"),n()))})})}let P=null;function k(){if(P!=null&&(clearTimeout(P),P=null),V!=null&&(clearTimeout(V),V=null),y.isOpened.value||y.isOpening.value||y.isStartOpening.value)return;if(y.isClosing.value||y.isStartClosing.value){y.open();return}const B=e.Value.get(r);P=setTimeout(()=>{P=null,I()},B)}let V=null;function $(){if(P!=null&&(clearTimeout(P),P=null),V!=null&&(clearTimeout(V),V=null),w.set(!1),d&&(d(),d=null,b)){f(),x();return}const B=e.Value.get(l);V=setTimeout(()=>{V=null,y.close(),y.listenOnClosed(()=>{f(),x()})},B)}return e.WithElement(B=>{const A=()=>{k(),w.set(!0)},F=()=>{$(),w.set(!1)},R=e.Fragment(e.aria.expanded(w),e.aria.controls(g),e.aria.haspopup(m));if(typeof u=="function")return e.Fragment(R,u(A,F));const j=u;return e.Fragment(R,e.OneOfValue(j,{"hover-focus":()=>e.Fragment(e.on.mouseenter(()=>A()),e.on.mouseleave(()=>F()),e.on.focus(()=>A()),e.on.blur(()=>F())),hover:()=>e.Fragment(e.on.mouseenter(()=>A()),e.on.mouseleave(()=>F())),focus:()=>e.Fragment(e.on.focus(()=>A()),e.on.blur(()=>F())),click:()=>{function E(){document.removeEventListener("click",z)}function z(){E(),F()}return e.Fragment(e.OnDispose(E),e.on.click(()=>{A(),pe.g(()=>{document.addEventListener("click",z,{once:!0})})}))},never:()=>null}))})})}function qt(t,n,a,r){const l=["bc-action-card"];return t&&l.push("bc-action-card--active"),n&&l.push("bc-action-card--disabled"),a!=="md"&&l.push(`bc-action-card--${a}`),r&&!n&&l.push("bc-action-card--clickable"),l.join(" ")}function Zt(t,n,a,r){const l=new Map;if(t!=null&&l.set("--action-card-bg",t),n!=null&&l.set("--action-card-border",n),a!=null&&l.set("--action-card-title-color",a),r!=null&&l.set("--action-card-description-color",r),l.size!==0)return Array.from(l.entries()).map(([i,s])=>`${i}: ${s}`).join("; ")}function Jt({icon:t,title:n,description:a,active:r=!1,disabled:l=!1,onClick:i,size:s="md",iconColor:u="primary",iconSize:c="md",backgroundColor:o,borderColor:p,titleColor:m,descriptionColor:C}){const f=i!=null;return e.html.div(e.attr.class(e.computedOf(r,l,s)((y,g,w)=>qt(y??!1,g??!1,w??"md",f))),e.attr.style(e.computedOf(o,p,m,C)((y,g,w,v)=>Zt(y,g,w,v))),e.When(f,()=>e.Fragment(e.Unless(l,()=>e.Fragment(e.on.click(()=>i?.()),e.attr.tabindex(0))),e.attr.role("button"))),e.aria.disabled(l),e.html.div(e.attr.class("bc-action-card__icon"),h.Icon({icon:t,size:c,color:u})),e.html.div(e.attr.class("bc-action-card__content"),e.html.div(e.attr.class("bc-action-card__title"),n),e.html.div(e.attr.class("bc-action-card__description"),a)))}const Kt=["!=","<=",">=","<",">","="];function Qt(t){for(const n of Kt)if(typeof t=="string"&&t.startsWith(n))return[n,t.slice(n.length)];return["=",t]}function lt(t,n,a){const[r,l]=Qt(n),i=t.findIndex(c=>c[1]===l);if(i===-1)throw new Error(`Breakpoint ${String(l)} not found`);const s=t[i][0],u=i<t.length-1?t[i+1][0]:1/0;switch(r){case"=":return a>=s&&a<u;case"!=":return!(a>=s&&a<u);case"<=":return a<=s;case">=":return a>=s;case"<":return a<s;case">":return a>s;default:return!1}}function Xt(t,n){const a=t.findIndex(r=>r[0]>n)-1;return a>=0?t[a][1]:(t.length>0&&n>=t[0][0],t[0][1])}function Me(t,{breakpoints:n,mode:a="viewport"}){const l=[...Object.entries(n).map(([s,u])=>[u,s])].sort((s,u)=>s[0]-u[0]),i=s=>{const u=s.map(({width:o})=>{const p=l.findIndex(m=>m[0]>o)-1;return p>=0?{width:o,breakpoint:l[p][1]}:l.length>0&&o>=l[0][0]?{width:o,breakpoint:l[0][1]}:{width:o,breakpoint:l[0][1]}});return t({value:u,breakpoints:n,asList:l,is:(o,p)=>lt(l,o,p)})};return a==="element"?Z.ElementRect(i):Z.WindowSize(i)}let Pe=NaN;function en(t,n){return t?(isNaN(Pe)&&(Pe=parseFloat(getComputedStyle(document.documentElement).fontSize)),parseFloat(t)*Pe):n}function Q(t,n,a){return en(t.getPropertyValue(n),a)}function ot(t){return e.WithElement(n=>{const a=getComputedStyle(n),r={zero:0,xs:Q(a,"--breakpoint-xs",640),sm:Q(a,"--breakpoint-sm",768),md:Q(a,"--breakpoint-md",1024),lg:Q(a,"--breakpoint-lg",1280),xl:Q(a,"--breakpoint-xl",1536)};return Me(t,{breakpoints:r})})}function tn(t){return e.WithElement(n=>{const a=getComputedStyle(n),r={zero:0,"3xs":Q(a,"--container-3xs",256),"2xs":Q(a,"--container-2xs",288),xs:Q(a,"--container-xs",320),sm:Q(a,"--container-sm",384),md:Q(a,"--container-md",448),lg:Q(a,"--container-lg",512),xl:Q(a,"--container-xl",640),"2xl":Q(a,"--container-2xl",768),"3xl":Q(a,"--container-3xl",1024),"4xl":Q(a,"--container-4xl",1280),"5xl":Q(a,"--container-5xl",1536),"6xl":Q(a,"--container-6xl",2048)};return Me(t,{breakpoints:r,mode:"element"})})}function ee(t,n){return`bc-panel ${(Array.isArray(t)?t:[t]).map(r=>`bc-panel--side-${r}`).join(" ")} bc-panel--shadow-${n}`}function ie(t){const n=e.Value.toSignal(t).map(r=>h.backgroundValue(r,"lighter","light")),a=e.Value.toSignal(t).map(r=>h.backgroundValue(r,"lighter","dark"));return e.Fragment(e.style.variable("--panel-bg",n.$.backgroundColor),e.style.variable("--panel-text",n.$.textColor),e.style.variable("--panel-bg-dark",a.$.backgroundColor),e.style.variable("--panel-text-dark",a.$.textColor))}const ne={banner:{zero:32,xs:32,sm:32,md:32,lg:32,xl:32},header:{zero:60,xs:60,sm:60,md:60,lg:60,xl:60},mainHeader:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},mainFooter:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},footer:{zero:48,xs:48,sm:48,md:48,lg:48,xl:48},menu:{zero:300,xs:300,sm:300,md:300,lg:300,xl:300},aside:{zero:280,xs:280,sm:280,md:280,lg:280,xl:280}};function Je(t,n){if(typeof t=="number")return{zero:t,xs:t,sm:t,md:t,lg:t,xl:t};const a={zero:t.zero??n.zero,xs:t.xs??n.xs,sm:t.sm??n.sm,md:t.md??n.md,lg:t.lg??n.lg,xl:t.xl??n.xl};return a.xs<a.zero&&(a.xs=a.zero),a.sm<a.xs&&(a.sm=a.xs),a.md<a.sm&&(a.md=a.sm),a.lg<a.md&&(a.lg=a.md),a.xl<a.lg&&(a.xl=a.lg),a}function _e(t){t=t.filter(n=>n.some(a=>a!=null&&!a.startsWith("?")));for(let n=0;n<t[0].length;n++)t.every(a=>a[n]==null||a[n].startsWith("?"))&&(t=t.map(a=>a.filter((r,l)=>l!==n)),n--);return t=t.map(n=>n.map(a=>a?.startsWith("?")?a.slice(1):a)),t}function nn({smallBreakpoint:t,mediumBreakpoint:n,vertical:a,horizontal:r,is:l}){function i(c){let o=[[null],[null],[null],[null],[null],[null]];const p=[];p.push("1fr");const m=[];return r.banner&&(m.push(r.banner[c]+"px"),o[0][1]="banner"),(r.header||a.menu||a.aside)&&(m.push((r.header?.[c]??ne.header[c])+"px"),o[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[c]+"px"),o[2][1]="mainHeader"),m.push("1fr"),o[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[c]+"px"),o[4][1]="mainFooter"),r.footer&&(m.push(r.footer[c]+"px"),o[5][1]="footer"),o=_e(o),{columns:p.join(" "),rows:m.join(" "),areas:o.map(f=>`"${f.join(" ")}"`).join(`
|
|
2
2
|
`),displayMenu:!1,displayAside:!1,menuWidth:ne.menu[c]+"px",asideWidth:ne.aside[c]+"px"}}function s(c){let o=[[null,null],[null,null],[null,null],[null,null],[null,null],[null,null]];const p=[];a.menu&&(p.push(a.menu[c]+"px"),o[2][0]="?menu",o[3][0]="menu",o[4][0]="?menu"),p.push("1fr");const m=[];return r.banner&&(m.push(r.banner[c]+"px"),o[0][0]="?banner",o[0][1]="banner"),(r.header||a.aside)&&(m.push((r.header?.[c]??ne.header[c])+"px"),o[1][0]="?header",o[1][1]="header"),r.mainHeader&&(m.push(r.mainHeader[c]+"px"),o[2][1]="mainHeader"),m.push("1fr"),o[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[c]+"px"),o[4][1]="mainFooter"),r.footer&&(m.push(r.footer[c]+"px"),o[5][0]="?footer",o[5][1]="footer"),o=_e(o),{columns:p.join(" "),rows:m.join(" "),areas:o.map(f=>`"${f.join(" ")}"`).join(`
|
|
3
3
|
`),displayMenu:!0,displayAside:!1,menuWidth:ne.menu[c]+"px",asideWidth:ne.aside[c]+"px"}}function u(c){let o=[[null,null,null],[null,null,null],[null,null,null],[null,null,null],[null,null,null],[null,null,null]];const p=[];a.menu&&(p.push(a.menu[c]+"px"),o[2][0]="?menu",o[3][0]="menu",o[4][0]="?menu"),p.push("1fr"),a.aside&&(p.push(a.aside[c]+"px"),o[2][2]="?aside",o[3][2]="aside",o[4][2]="?aside");const m=[];return r.banner&&(m.push(r.banner[c]+"px"),o[0][0]="?banner",o[0][1]="banner",o[0][2]="?banner"),r.header&&(m.push(r.header[c]+"px"),o[1][0]="?header",o[1][1]="header",o[1][2]="?header"),r.mainHeader&&(m.push(r.mainHeader[c]+"px"),o[2][1]="mainHeader"),m.push("1fr"),o[3][1]="main",r.mainFooter&&(m.push(r.mainFooter[c]+"px"),o[4][1]="mainFooter"),r.footer&&(m.push(r.footer[c]+"px"),o[5][0]="?footer",o[5][1]="footer",o[5][2]="?footer"),o=_e(o),{columns:p.join(" "),rows:m.join(" "),areas:o.map(f=>`"${f.join(" ")}"`).join(`
|
|
4
|
-
`),displayMenu:!0,displayAside:!0,menuWidth:ne.menu[c]+"px",asideWidth:ne.aside[c]+"px"}}return({width:c,breakpoint:o})=>l(`<=${t}`,c)?i(o):l(`<=${n}`,c)?s(o):u(o)}const an=["menu","aside"],rn=["banner","header","mainHeader","mainFooter","footer"];function ln(t,{displayMenu:n},a){return t?n?"block":a?"float":"none":"none"}function on(t,{displayAside:n},a){return t?n?"block":a?"float":"none":"none"}function sn({smallBreakpoint:t="sm",mediumBreakpoint:n="md",...a}){const r=Object.fromEntries(an.filter(i=>a[i]).map(i=>[i,Je(a[i].width??{},ne[i])])),l=Object.fromEntries(rn.filter(i=>a[i]).map(i=>[i,Je(a[i].height??{},ne[i])]));return e.Use(h.BeatUII18n,i=>ot(({value:s,is:u})=>{const c=nn({smallBreakpoint:t,mediumBreakpoint:n,vertical:r,horizontal:l,is:u}),o=s.map(c),p=l.header!=null||r.menu!=null||r.aside!=null,m=e.computedOf(r.aside!=null,o)((d,{displayAside:b})=>d&&!b),C=e.computedOf(r.menu!=null,o)((d,{displayMenu:b})=>d&&!b),f=H.useAnimatedElementToggle(),y=H.useAnimatedElementToggle(),g=e.prop(0),w=e.computedOf(r.menu!=null,o,f.display)(ln),v=e.computedOf(r.aside!=null,o,y.display)(on);return e.html.div(e.style.display("grid"),e.style.height("100%"),e.style.width("100%"),e.style.gridTemplateColumns(o.$.columns),e.style.gridTemplateRows(o.$.rows),e.style.gridTemplateAreas(o.$.areas),e.style.gridColumnGap("0"),e.style.gridRowGap("0"),a.banner?e.html.header(e.attr.class(ee("none",a.banner.shadow??"none")),ie(a.banner.color??"white"),e.style.height("100%"),e.style.gridArea("banner"),a.banner.content):null,e.html.header(e.attr.class(ee("bottom",a.header?.shadow??"none")),ie(a.header?.color??"white"),e.style.zIndex("20"),e.style.display(p?"block":"none"),e.style.gridArea("header"),Z.ElementRect(d=>(d.$.bottom.feedProp(g),null)),e.html.div(e.style.display("flex"),e.style.height("100%"),e.html.div(e.style.display(C.map(d=>d?"flex":"none")),e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),h.Button({onClick:()=>f.toggle(),variant:"light",color:"base"},e.aria.label(i.$.toggleMenu),h.Icon({icon:f.display.map(d=>d?"line-md/menu-to-close-alt-transition":"line-md/close-to-menu-alt-transition")}))),e.html.div(e.style.height("100%"),e.style.flexGrow("1"),a.header?.content),e.html.div(e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),e.style.display(m.map(d=>d?"flex":"none")),h.Button({onClick:()=>y.toggle(),roundedness:"full",variant:"light",color:"base"},e.aria.label(i.$.toggleAside),h.Icon({icon:"line-md/chevron-left"},e.attr.style("transition: transform 0.2s ease-in-out"),e.attr.style(y.display.map(d=>`transform: rotate(${d?180:0}deg)`))))))),a.menu?e.html.nav(e.WithElement(d=>f.setElement(d)),e.style.zIndex("10"),e.aria.label(i.$.mainNavigation),e.attr.role("navigation"),e.style.overflow("hidden"),e.attr.class(w.map(d=>d==="float"?ee("right",a.menu?.shadow??"md"):ee("right",a.menu?.shadow??"none"))),ie(a.menu?.color??"white"),e.style.height(w.map(d=>d==="float"?"auto":"100%")),e.style.overflow("hidden"),e.style.gridArea("menu"),e.style.display(e.computedOf(w,f.status)((d,b)=>d==="none"&&b==="closed"?"none":"block")),e.style.position(e.computedOf(w,f.status)((d,b)=>d==="float"||d==="none"&&b!=="closed"?"fixed":"initial")),e.style.top(g.map(d=>`${d}px`)),H.AnimatedToggleClass({animation:{slide:"right"},status:e.computedOf(w,f.status)((d,b)=>d==="block"?"opened":b)}),e.style.width(e.coalesce(a.menu?.width,o.$.menuWidth)),e.style.bottom("0"),a.menu?.content):null,a.mainHeader?e.html.header(e.style.height("100%"),e.style.gridArea("mainHeader"),e.attr.class(ee("none",a.mainHeader?.shadow??"none")),ie(a.mainHeader?.color??"white"),a.mainHeader.content):null,e.html.main(e.style.height("100%"),e.style.overflow("hidden"),e.style.gridArea("main"),e.attr.class(ee("none",a.main?.shadow??"none")),ie(a.main?.color??"white"),a.main.content),a.mainFooter?e.html.footer(e.style.height("100%"),e.style.gridArea("mainFooter"),e.attr.class(ee("none",a.mainFooter?.shadow??"none")),ie(a.mainFooter?.color??"white"),a.mainFooter.content):null,a.aside?e.html.aside(e.WithElement(d=>{y.setElement(d)}),e.style.zIndex("10"),e.aria.label(i.$.sidebar),e.attr.role("complementary"),e.attr.class(v.map(d=>d==="float"?ee("left","md"):ee("left","none"))),ie("white"),e.style.height("100%"),e.style.gridArea("aside"),e.style.display(e.computedOf(v,y.status)((d,b)=>d==="none"&&b==="closed"?"none":"block")),e.style.position(e.computedOf(v,y.status)((d,b)=>d==="float"||d==="none"&&b!=="closed"?"fixed":"initial")),e.style.top(g.map(d=>`${d}px`)),H.AnimatedToggleClass({animation:{slide:"left"},status:e.computedOf(v,y.status)((d,b)=>d==="block"?"opened":b)}),e.style.width(e.coalesce(a.aside?.width,o.$.asideWidth)),e.style.bottom(g.map(d=>`${d}px`)),a.aside.content):null,a.footer?e.html.footer(e.attr.class(ee("top","none")),ie("white"),e.style.height("100%"),e.style.gridArea("footer"),a.footer.content):null)}))}function un(...t){return e.html.div(e.attr.class("bc-center-h"),e.html.div(e.attr.class("bc-center__content"),...t))}function cn(t){const n=["bc-center"];return t!=="lg"&&n.push(`bc-center--gap-${t}`),n.join(" ")}function dn({gap:t="lg"}={},...n){return e.html.div(e.attr.class(e.computedOf(t)(a=>cn(a??"lg"))),...n)}function it({open:t},...n){return e.WithElement(a=>{const{status:r,setOpen:l,dispose:i}=H.useAnimatedElementToggle({initialStatus:e.Value.get(t)?"opened":"closed",element:a});return e.Value.on(t,l),Z.ElementRect(s=>{const u=e.prop(null);return e.computedOf(r,s.$.height)((o,p)=>o==="opened"&&p>0?p:null).on(o=>{o!=null&&u.set(o)}),r.on(o=>{if(a&&o==="start-opening"){const p=a.style.height,m=a.style.transition;a.style.transition="none",a.style.height="auto",a.offsetHeight;const C=a.scrollHeight;C>0&&u.set(C),a.style.height=p,a.style.transition=m,a.offsetHeight}}),e.Fragment(e.OnDispose(i),e.attr.style(u.map(o=>`--collapse-height: ${o!=null?`${o}px`:"auto"}`)),e.attr.class(r.map(o=>`bc-collapse bc-collapse--${o}`)),...n)})})}function pn(t){return`${t}px`}function Ke(t){return e.Value.map(t,pn)}function mn({body:t,contentWidth:n,contentHeight:a,header:r,headerHeight:l=0,topStart:i,topEnd:s,footer:u,footerHeight:c=0,bottomStart:o,bottomEnd:p,sidebarStart:m,sidebarStartWidth:C=0,sidebarEnd:f,sidebarEndWidth:y=0,anchorMode:g="container-edge"}){const w=e.prop(0n),v=e.prop(0n),d=Ke(l),b=Ke(C),x=e.prop(16);return e.html.div(e.attr.class("bc-nine-slice-container"),Z.ElementRect(k=>{const P=e.computedOf(k.$.width,C,y)((_,N,Y)=>_-N-Y),I=e.computedOf(k.$.height,l,c)((_,N,Y)=>_-N-Y),V=e.computedOf(n,P)((_,N)=>_>BigInt(N)),$=e.computedOf(a,I)((_,N)=>_>BigInt(N)),B=e.computedOf(P,$,x)((_,N,Y)=>N?_-Y:_),A=e.computedOf(I,V,x)((_,N,Y)=>N?_-Y:_),F=e.computedOf(n,B)((_,N)=>Number(_/BigInt(Math.max(1,N)))),R=e.computedOf(a,A)((_,N)=>Number(_/BigInt(Math.max(1,N)))),j=e.Value.map(g,_=>_==="body-end"||_==="body-end-bottom"),E=e.When(j,()=>e.style.left(e.computedOf(C,n,B,y)((_,N,Y,O)=>{const L=_+Number(N),M=_+Y,G=Math.min(L,M);return`${Math.max(_+O,G)}px`})),()=>e.style.right("0")),z=e.Value.map(g,_=>_==="body-bottom"||_==="body-end-bottom"),X=e.When(z,()=>e.style.top(e.computedOf(l,a,A,c)((_,N,Y,O)=>{const L=_+Number(N),M=_+Y,G=Math.min(L,M);return`${Math.max(_+O,G)}px`})),()=>e.style.bottom("0")),K=e.computedOf($,x)((_,N)=>_?`${N}px`:"0"),J=e.computedOf(V,x)((_,N)=>_?`${N}px`:"0"),le=e.style.transform(e.computedOf(v,w,V,$)((_,N,Y,O)=>{const L=Y?`translateX(-${_}px)`:"",M=O?`translateY(-${N}px)`:"";return`${L} ${M}`.trim()||"none"})),me=e.style.transform(v.map(_=>`translateX(-${_}px)`)),ae=e.style.transform(w.map(_=>`translateY(-${_}px)`)),ye=e.computedOf(a,A)((_,N)=>_-BigInt(Math.max(1,N))),de=e.computedOf(n,B)((_,N)=>_-BigInt(Math.max(1,N)));let U=null,se=0,ue=0;const Ie=()=>{const _=ye.value,N=de.value,Y=$.value,O=V.value;if(Y&&ue!==0){const L=Ze(ve(0n,_),ve(0n,w.value+BigInt(Math.round(ue))));w.set(L)}if(O&&se!==0){const L=Ze(ve(0n,N),ve(0n,v.value+BigInt(Math.round(se))));v.set(L)}se=0,ue=0,U=null};return V.on(_=>{_||v.set(0n)}),$.on(_=>{_||w.set(0n)}),e.Fragment(e.OnDispose(()=>{U&&clearTimeout(U)}),e.on.wheel(_=>{_.preventDefault();const{deltaX:N,deltaY:Y}=_;se+=N,ue+=Y,U||(U=setTimeout(Ie,16))}),e.html.div(e.attr.class("bc-nine-slice-pane-container"),e.style.right(K),e.style.bottom(J),i!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-start"),e.style.top("0"),e.style.left("0"),i):null,r!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-header"),e.style.top("0"),e.style.left(b),e.html.div(e.attr.class("bc-nine-slice-pane-content"),me,r)):null,s!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-end"),e.style.top("0"),E,s):null,m!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),e.style.left("0"),e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),ae,m)):null,e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-body"),e.style.left(b),e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),le,t)),f!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),E,e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),ae,f)):null,o!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),e.style.left("0"),X,o):null,u!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-footer"),e.style.left(b),X,e.html.div(e.attr.class("bc-nine-slice-pane-content"),me,u)):null,p!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),E,X,p):null),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar"),e.style.overflowX("scroll"),e.style.left("0"),e.style.right(e.computedOf($,x)((_,N)=>_?`${N}px`:"0")),e.style.bottom("0"),e.style.height(V.map(_=>_?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar-thumb"),e.style.width(F.map(_=>`${100/Math.max(1,_)}%`)),e.style.height("100%"),e.style.backgroundColor("#ff000066")),e.on.scroll(_=>{const N=_.target,Y=N.scrollLeft,O=N.scrollWidth-N.clientWidth;if(O>0){const L=Y/O,M=de.value;v.set(BigInt(Math.round(Number(M)*L)))}})),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar"),e.style.overflowY("scroll"),e.style.top("0"),e.style.bottom(e.computedOf(V,x)((_,N)=>_?`${N}px`:"0")),e.style.right("0"),e.style.width($.map(_=>_?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar-thumb"),e.style.width("100%"),e.style.height(e.computedOf(l,c,a,R)((_,N,Y,O)=>`${100/Math.max(1,O)}%`)),e.style.backgroundColor("#ff000066")),e.on.scroll(_=>{const N=_.target,Y=N.scrollTop,O=N.scrollHeight-N.clientHeight;if(O>0){const L=Y/O,M=ye.value;w.set(BigInt(Math.round(Number(M)*L)))}})))}))}function Le({header:t,footer:n,body:a,shadowOnScroll:r=!0},...l){const i=e.prop("none");function s(c){const o=c.scrollTop===0,p=c.scrollTop+c.clientHeight>=c.scrollHeight-1;o&&p?i.set("none"):o?i.set("bottom"):p?i.set("top"):i.set("both")}return e.html.div(e.attr.class("bc-scrollable-panel"),e.attr.class(e.computedOf(i,r)((c,o)=>{if(!o)return"";switch(c){case"both":return"bc-scrollable-panel--scrolled-up bc-scrollable-panel--scrolled-down";case"bottom":return"bc-scrollable-panel--scrolled-up";case"top":return"bc-scrollable-panel--scrolled-down";default:return""}})),t&&e.html.div(e.attr.class("bc-scrollable-panel__header"),t),e.html.div(e.attr.class("bc-scrollable-panel--header-shadow"),e.html.div()),e.html.div(e.attr.class("bc-scrollable-panel__body"),e.WithElement(c=>e.OnDispose(pe.g(()=>s(c)))),e.on.scroll(c=>{const o=c.target;s(o)}),a),e.html.div(e.attr.class("bc-scrollable-panel--footer-shadow"),e.html.div()),n&&e.html.div(e.attr.class("bc-scrollable-panel__footer"),n),...l)}function fn(t,n,a){const r=["bc-sink"];return t!=="default"&&r.push(`bc-sink--${t}`),n!=="md"&&r.push(`bc-sink--padding-${n}`),a!=="lg"&&r.push(`bc-sink--rounded-${a}`),r.join(" ")}function gn({variant:t="default",size:n="md",roundedness:a="lg"}={},...r){return e.html.div(e.attr.class(e.computedOf(t,n,a)((l,i,s)=>fn(l??"default",i??"md",s??"lg"))),...r)}const re={value:(t,n,{disabled:a,before:r,after:l}={})=>({type:"value",value:t,label:n,disabled:a,before:r,after:l}),group:(t,n,{disabled:a,before:r,after:l}={})=>({type:"group",group:t,options:n,disabled:a,before:r,after:l}),break:{type:"break"},getValues:t=>t.flatMap(n=>n.type==="group"?re.getValues(n.options):n.type==="break"?[]:[n.value]),contains:(t,n,a=(r,l)=>r===l)=>re.getValues(t).some(r=>a(r,n))},Ue=t=>{const{onChange:n,onBlur:a,role:r,display:l,optionsSource:i,allowSpaceToggle:s=!1,onBeforeOpen:u,onAfterOpen:c,buildListboxContent:o}=t,p=e.prop(!1),m=e.prop(-1),C=e.prop(null),f=D.sessionId("dropdown"),y=D.sessionId("listbox");let g,w;const v=b=>{n?.(b),p.set(!1),m.set(-1),C.set(null),g?.focus()},d=b=>{const x=re.getValues(e.Value.get(i));switch(b.key){case"ArrowDown":{if(b.preventDefault(),!p.value)p.set(!0),x.length>0&&(m.set(0),C.set(x[0]));else{const k=Math.min(m.value+1,x.length-1);m.set(k),C.set(x[k]??null)}break}case"ArrowUp":{if(b.preventDefault(),p.value){const k=Math.max(m.value-1,0);m.set(k),C.set(x[k]??null)}break}case"Enter":{if(b.preventDefault(),p.value&&m.value>=0){const k=x[m.value];k!=null&&v(k)}else{u?.();const k=re.getValues(e.Value.get(i));p.set(!0),k.length>0&&(m.set(0),C.set(k[0])),setTimeout(()=>c?.(),0)}break}case"Escape":{p.value&&(b.preventDefault(),p.set(!1),m.set(-1),C.set(null),g?.focus());break}case" ":{if(e.Value.get(s)){b.preventDefault();const k=re.getValues(e.Value.get(i));p.set(!p.value),p.value&&k.length>0&&(m.set(0),C.set(k[0]))}break}}};return h.InputContainer({...t,input:S.Group(e.attr.class("bc-dropdown__trigger"),e.html.span(e.attr.class("bc-dropdown__display"),l),h.Icon({icon:"ph:caret-up-down-bold",color:"neutral"},e.attr.class("bc-dropdown__arrow")))},Z.ElementRect(b=>e.Fragment(e.WithElement(x=>(g=x,x.addEventListener("keydown",d),e.OnDispose(()=>x.removeEventListener("keydown",d)))),h.CommonInputAttributes(t),e.attr.id(f),e.attr.tabindex(0),e.aria.controls(y),e.aria.expanded(p),e.attr.class("bc-dropdown"),e.attr.role(r),e.aria.activedescendant(e.computedOf(p,C)((x,k)=>x&&k!=null?`dropdown-option-${String(k)}`:"")),a!=null?e.on.blur(()=>{setTimeout(()=>{w?.contains(document.activeElement)||(p.set(!1),m.set(-1),a())},100)}):e.Empty,he({content:()=>e.html.div(e.WithElement(x=>{w=x}),e.style.minWidth(b.$.width.map(x=>`${x-10}px`)),e.attr.class("bc-dropdown__listbox"),e.attr.role("listbox"),e.attr.id(y),e.aria.labelledby(f),o({dropdownId:f,listboxId:y,focusedValue:C,handleKeyDown:d,onSelect:v})),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",showOn:(x,k)=>{const P=k;k=()=>{p.set(!1),m.set(-1),C.set(null),P()};const I=()=>{if(p.value)k();else{u?.();const V=re.getValues(e.Value.get(i));p.set(!0),V.length>0&&(m.set(0),C.set(V[0])),x(),setTimeout(()=>c?.(),0)}};return e.on.click(I)},showDelay:0,hideDelay:0,closable:!0}))))},st=(t,n,a,r,l)=>e.Ensure(t,i=>e.OneOfType(i,{value:s=>{const u=e.computedOf(s,a)((o,p)=>n(o.value,p)),c=e.computedOf(s,l)((o,p)=>p!=null&&n(o.value,p));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(u,c,s)((o,p,m)=>{const C=[];return o&&C.push("bc-dropdown__option--selected"),p&&C.push("bc-dropdown__option--focused"),m.disabled&&C.push("bc-dropdown__option--disabled"),C.join(" ")})),e.attr.role("option"),e.attr.id(s.map(o=>`dropdown-option-${String(o.value)}`)),e.aria.selected(u),S.Expando("value",s.$.value),e.When(s.map(o=>!o.disabled),()=>e.on.click(()=>r(s.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),s.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),s.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),s.$.label),s.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),s.value.after)))},group:s=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(s.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),s.$.group),e.ForEach(s.$.options,u=>st(u,n,a,r,l))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),ut=t=>{const{value:n,options:a,unselectedLabel:r,equality:l=(o,p)=>o===p,placeholder:i,searchable:s=!1}=t,u=e.computedOf(n,a)((o,p)=>{if(o==null)return"";const m=C=>{for(const f of C){if(f.type==="value"&&l(f.value,o))return f.label;if(f.type==="group"){const y=m(f.options);if(y)return y}}};return m(p)||String(o)}),c=e.computedOf(s)(o=>!o);return Ue({...t,role:"dropdown",display:e.When(u.map(o=>o.length>0),()=>u,()=>e.Use(h.BeatUII18n,o=>e.coalesce(i,r,o.$.selectOne))),optionsSource:a,allowSpaceToggle:c,buildListboxContent:({focusedValue:o,onSelect:p})=>e.ForEach(a,m=>st(m,l,n,p,o))})},ct=t=>{const{controller:n,onChange:a,onBlur:r,...l}=t;return ut({...l,value:n.signal,onChange:D.makeOnChangeHandler(n,a),onBlur:D.makeOnBlurHandler(n,r)})},bn=t=>D.InputWrapper({...t,content:ct(t)}),dt=(t,n,a,r,l,i)=>e.Ensure(t,s=>e.OneOfType(s,{value:u=>{const c=e.computedOf(u,a)((p,m)=>n(p.value,m)),o=e.computedOf(u,l)((p,m)=>m!=null&&n(p.value,m));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(c,o,u)((p,m,C)=>{const f=[];return p&&f.push("bc-dropdown__option--selected"),m&&f.push("bc-dropdown__option--focused"),C.disabled&&f.push("bc-dropdown__option--disabled"),f.join(" ")})),e.attr.role("option"),e.attr.id(u.map(p=>`dropdown-option-${String(p.value)}`)),e.aria.selected(c),e.When(u.map(p=>!p.disabled),()=>e.on.click(()=>r(u.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),u.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),u.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),i(u.$.value)),u.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),u.value.after)))},group:u=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(u.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),u.$.group),e.ForEach(u.$.options,c=>dt(c,n,a,r,l,i))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),pt=t=>{const{value:n,loadOptions:a,renderOption:r,renderValue:l,equality:i=(d,b)=>d===b,placeholder:s,searchPlaceholder:u,debounceMs:c=150}=t,o=e.prop(""),p=e.prop(!1),m=e.prop([]);let C;const f=e.Value.toSignal(n),y=()=>(l??r)(f);let g=null;const w=d=>{p.set(!0),Promise.resolve(a(d)).then(b=>{m.set(b??[])}).catch(()=>{m.set([])}).finally(()=>p.set(!1))},v=d=>{g!=null&&(clearTimeout(g),g=null),g=setTimeout(()=>{w(d)},Math.max(0,c))};return Ue({...t,role:"combobox",display:e.When(e.computedOf(n)(d=>d!=null),y,()=>e.Use(h.BeatUII18n,d=>d.$.selectOne)),optionsSource:m,onBeforeOpen:()=>{const d=e.Value.get(o);v(d)},onAfterOpen:()=>{C?.focus()},buildListboxContent:({focusedValue:d,handleKeyDown:b,onSelect:x})=>e.Fragment(e.html.div(e.attr.class("bc-dropdown__search"),e.html.input(e.attr.type("text"),e.attr.class("bc-dropdown__search-input"),e.attr.placeholder(e.computedOf(u,s)((k,P)=>k??P??"Search")),e.attr.value(o),e.WithElement(k=>(C=k,e.Empty)),e.on.input(k=>{const P=k.target;o.set(P.value),v(P.value)}),e.on.keydown(b))),e.When(p,()=>e.html.div(e.attr.class("bc-dropdown__loading"),h.Icon({icon:"ph:spinner-bold",color:"neutral"})),()=>e.ForEach(m,k=>dt(k,i,f,x,d,r))))})},mt=t=>{const{controller:n,onChange:a,onBlur:r,...l}=t;return pt({...l,value:n.signal,onChange:D.makeOnChangeHandler(n,a),onBlur:D.makeOnBlurHandler(n,r)})},hn=t=>D.InputWrapper({...t,content:mt(t)});function Re(t){const{items:n,placement:a="bottom-start",showDelay:r=0,hideDelay:l=100,mainAxisOffset:i=4,crossAxisOffset:s=0,showOn:u="click",closable:c=!0,onClose:o,onAction:p,ariaLabel:m,ariaLabelledBy:C}=t,f=D.sessionId("menu"),y=e.prop(-1),g=e.prop([]);let w=null;return e.Fragment(he({content:()=>e.WithElement(v=>{w=document.activeElement;const d=(I,V,$)=>{if(V.length===0)return-1;let B=I+$,A=0;for(;A<V.length;){B>=V.length&&(B=0),B<0&&(B=V.length-1);const F=V[B];if(F&&F.getAttribute("aria-disabled")!=="true")return B;B+=$,A++}return I},b=I=>{const V=g.value,$=y.value;switch(I.key){case"ArrowDown":I.preventDefault(),I.stopPropagation();const B=d($,V,1);x(B,V);break;case"ArrowUp":I.preventDefault(),I.stopPropagation();const A=d($,V,-1);x(A,V);break;case"Enter":case" ":if(I.preventDefault(),I.stopPropagation(),$>=0&&V[$]){const F=V[$];if(F.getAttribute("aria-disabled")==="true")return;const R=F.getAttribute("data-key");R&&p&&p(R),F.click(),o?.()}break;case"Escape":o?.();break;case"Home":I.preventDefault(),I.stopPropagation(),V.length>0&&x(0,V);break;case"End":I.preventDefault(),I.stopPropagation(),V.length>0&&x(V.length-1,V);break;case"ArrowRight":if(I.preventDefault(),I.stopPropagation(),$>=0&&V[$]){const F=V[$];F.classList.contains("bc-menu-item--has-submenu")&&F.dispatchEvent(new Event("mouseenter"))}break;case"ArrowLeft":I.preventDefault(),I.stopPropagation(),o?.();break}},x=(I,V)=>{y.value>=0&&V[y.value]&&(V[y.value].classList.remove("bc-menu-item--focused"),V[y.value].removeAttribute("aria-selected")),I>=0&&V[I]&&(V[I].classList.add("bc-menu-item--focused"),V[I].setAttribute("aria-selected","true"),y.set(I),typeof V[I].scrollIntoView=="function"&&V[I].scrollIntoView({block:"nearest"}))},k=()=>{const I=Array.from(v.querySelectorAll('[role="menuitem"]'));if(g.set(I),I.length>0){const V=I.findIndex($=>$.getAttribute("aria-disabled")!=="true");V>=0&&x(V,I)}},P=new MutationObserver(k);return P.observe(v,{childList:!0,subtree:!0}),setTimeout(()=>{k(),v.focus()},0),document.addEventListener("keydown",b,!0),e.Fragment(e.OnDispose(()=>{P.disconnect(),document.removeEventListener("keydown",b,!0),w&&w.focus()}),e.attr.class("bc-menu"),e.attr.id(f),e.attr.role("menu"),e.attr.tabindex(-1),e.aria.orientation("vertical"),m?e.aria.label(m):e.Fragment(),C?e.aria.labelledby(C):e.Fragment(),e.aria.activedescendant(y.map(I=>{const V=g.value;return I>=0&&V[I]?V[I].id||`${f}-item-${I}`:""})),e.on.click(I=>{const $=I.target.closest('[role="menuitem"]');if($&&$.getAttribute("aria-disabled")!=="true"){const B=$.getAttribute("data-key");B&&p&&p(B)}}),e.html.div(e.attr.class("sr-only"),e.aria.live("polite"),e.aria.atomic(!0),y.map(I=>{const V=g.value;if(I>=0&&V[I]){const $=V[I].textContent||"";return V[I].getAttribute("aria-disabled")==="true"?`${$}, disabled`:`${$}, ${I+1} of ${V.length}`}return""})),...n())}),placement:a,showDelay:r,hideDelay:l,mainAxisOffset:i,crossAxisOffset:s,showOn:u,closable:c,role:"menu"}))}function yn(t){const{key:n,content:a,startContent:r,endContent:l,disabled:i=!1,onClick:s,ariaLabel:u,submenu:c,submenuPlacement:o="right-start"}=t,p=n??D.sessionId("menu-item"),m=`menu-item-${p}`,C=c!=null;return e.html.div(e.attr.class(e.computedOf(i)(f=>`bc-menu-item ${f?"bc-menu-item--disabled":""} ${C?"bc-menu-item--has-submenu":""}`)),e.attr.id(m),e.attr.role("menuitem"),e.attr.tabindex(-1),e.dataAttr.key(p),e.aria.disabled(i),e.aria.selected(!1),C?e.aria.expanded(!1):e.Fragment(),u?e.aria.label(u):e.Fragment(),e.on.click(f=>{if(e.Value.get(i)){f.preventDefault(),f.stopPropagation();return}s?.()}),r&&e.html.span(e.attr.class("bc-menu-item__start"),r),e.html.span(e.attr.class("bc-menu-item__content"),a),l&&e.html.span(e.attr.class("bc-menu-item__end"),l),C&&c?he({content:()=>e.Fragment(e.attr.class("bc-menu bc-submenu"),e.attr.role("menu"),...c()),placement:o,showOn:"hover",hasPopup:"menu",showDelay:100,hideDelay:300,mainAxisOffset:0,crossAxisOffset:0,role:"menu"}):e.Fragment())}function We(t={}){const{label:n}=t;return e.html.div(e.attr.class("bc-menu-separator"),e.attr.role("separator"),e.aria.orientation("horizontal"),n&&e.html.span(e.attr.class("bc-menu-separator__label"),n))}function ft(t,n,a){return t.some(l=>a(l,n))?t.filter(l=>!a(l,n)):[...t,n]}function gt(t,n,a){return t.filter(r=>!a(r,n))}function bt(t,n,a){return t.some(r=>a(r,n))}function ht(t,n,a){for(const r of t)if(r.type==="value"){if(a(r.value,n))return{label:r.label}}else if(r.type==="group"){const l=ht(r.options,n,a);if(l!=null)return l}}function vn(t,n,a){return ht(t,n,a)?.label??String(n)}function yt(t,n,a){const r=n.trim().toLowerCase(),l=a??((s,u)=>u.label.toLowerCase().includes(s));if(r==="")return t;const i=[];for(const s of t)if(s.type==="value")l(r,{label:s.label})&&i.push(s);else if(s.type==="group"){const u=yt(s.options,r,l);u.length>0&&i.push({...s,options:u})}return i}function He(t){const{values:n,options:a,equality:r,disabled:l,onRemove:i}=t;return e.NotEmpty(n,()=>e.ForEach(n,s=>Fe({value:e.computedOf(s,a)((u,c)=>vn(c,u,r)),onClose:()=>i(s.value),disabled:l})),()=>e.html.span(e.attr.class("bc-input-container__placeholder"),t.placeholder))}function je(t){const{value:n,options:a,equality:r=(o,p)=>o===p,placeholder:l}=t,i=o=>{const p=e.Value.get(n);t.onChange?.(gt(p,o,r))},s=o=>{const p=e.Value.get(n);t.onChange?.(ft(p,o,r))},u=o=>e.computedOf(n)(p=>bt(p,o,r)),c=Re({items:()=>{const o=e.Value.get(a),p=[];for(const m of o)if(m.type==="value"){const C=u(m.value);p.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(m.disabled===!0),e.aria.checked(C),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),m.label),e.on.click(()=>s(m.value))))}else m.type==="group"?p.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),m.group),...m.options.map(C=>{if(C.type==="value"){const f=u(C.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(C.disabled===!0),e.aria.checked(f),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),C.label),e.on.click(()=>s(C.value)))}return e.Fragment()}))):p.push(We());return p},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:"click",closable:!0});return h.InputContainer({...t,before:t.before??h.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),c,He({values:n,placeholder:l,options:a,equality:r,disabled:t.disabled,onRemove:i})),after:h.InputIcon({icon:"line-md:plus",color:"neutral",size:"sm"})})}function wn(t){return D.BaseControl(je,t)}function Cn(t){return D.Control(je,t)}function ze(t){const{value:n,options:a,equality:r=(f,y)=>f===y,placeholder:l,searchPlaceholder:i,filter:s}=t,u=e.prop(""),c=f=>{const y=e.Value.get(n);t.onChange?.(gt(y,f,r))},o=f=>{const y=e.Value.get(n);t.onChange?.(ft(y,f,r))},p=f=>e.computedOf(n)(y=>bt(y,f,r)),m=e.computedOf(a,u)((f,y)=>yt(f,y,s)),C=Re({items:()=>{const f=[],y=e.Value.get(m);if(y.length===0)return f.push(e.html.div(e.attr.class("bc-dropdown__empty"),e.Use(h.BeatUII18n,g=>g.$.noResults))),f;for(const g of y)if(g.type==="value"){const w=p(g.value);f.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(g.disabled===!0),e.aria.checked(w),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),g.label),e.on.click(()=>o(g.value))))}else g.type==="group"?f.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),g.group),...g.options.map(w=>{if(w.type==="value"){const v=p(w.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(w.disabled===!0),e.aria.checked(v),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),w.label),e.on.click(()=>o(w.value)))}return e.Fragment()}))):f.push(We());return f},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:(f,y)=>e.WithElement(g=>{const w=g.querySelector(".bc-dropdown__search-input");if(w){const v=()=>f();return w.addEventListener("focus",v),e.OnDispose(()=>{w.removeEventListener("focus",v)})}return e.Fragment()}),closable:!0});return h.InputContainer({...t,before:t.before??h.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),He({values:n,options:a,placeholder:l,equality:r,disabled:t.disabled,onRemove:c}),e.html.div(e.attr.class("bc-input-container__tags-selector"),e.html.input(e.attr.type("text"),e.attr.class("bc-dropdown__search-input"),e.attr.placeholder(e.computedOf(i,l)((f,y)=>f??y??"")),e.attr.value(u),e.on.input(f=>{const y=f.target;u.set(y.value)}),e.on.keydown(f=>{(f.key==="ArrowUp"||f.key==="ArrowDown"||f.key==="Enter"||f.key===" ")&&f.stopPropagation()})),C))})}function Sn(t){return D.BaseControl(ze,t)}function Vn(t){return D.Control(ze,t)}const xn=t=>{const{value:n,onBlur:a,onChange:r}=t;return h.InputContainer({...t,input:e.input.date(h.CommonInputAttributes(t),e.attr.valueAsDate(n),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValueAsDate(r)):e.Empty)})},kn=t=>{const n=t.getFullYear(),a=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),l=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0");return`${n}-${a}-${r}T${l}:${i}`},In=t=>{const{value:n,onBlur:a,onChange:r}=t;return h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,kn)),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(l=>r(new Date(l)))):e.Empty)})},Tn=t=>{const{value:n,onInput:a,onChange:r,...l}=t;return S.FilesInput({...l,maxFiles:1,value:e.Value.map(n,i=>i==null?[]:[i]),onChange:i=>{r?.(i[0])},onInput:i=>{a?.(i[0])}})},On=t=>Z.Query({request:t.request,load:t.load,convertError:String,success:({value:n})=>{const a=n.map(r=>r.map(l=>typeof l=="object"&&"id"in l&&"label"in l?re.value(l.id,l.label):l));return S.NativeSelect({...t,options:a,unselectedLabel:t.unselectedLabel,equality:t.equality})},pending:()=>e.Use(h.BeatUII18n,n=>e.html.span(h.Icon({icon:"line-md:loading-twotone-loop",title:n.$.loadingShort})))}),Pn=t=>{const{value:n,onBlur:a,onChange:r,onInput:l,after:i,disabled:s,...u}=t,c=S.NullableResetAfter(n,s,r);return S.MaskInput({...u,value:e.Value.map(n,S.nullToEmpty),onChange:r!=null?o=>r(S.emptyToNull(o)):void 0,onInput:l!=null?o=>l(S.emptyToNull(o)):void 0,onBlur:a,after:i!=null?e.Fragment(c,i):c})},Qe=t=>{try{return BigInt(t)}catch{return null}},_n=t=>{const{value:n,step:a,min:r,max:l,onChange:i,onInput:s,after:u}=t,c=f=>{const y=r!=null?e.Value.get(r):void 0,g=l!=null?e.Value.get(l):void 0;return y!=null&&f<y?y:g!=null&&f>g?g:f},o=a!=null?e.Use(h.BeatUII18n,f=>{const y=e.computedOf(n,r)((v,d)=>d==null?!0:(v??0n)>d),g=e.computedOf(n,l)((v,d)=>d==null?!0:(v??0n)<d),w=(v,d)=>{const b=e.Value.get(n)??0n,x=e.Value.get(a),k=d?.shiftKey?10n:1n,P=b+x*k*v,I=r!=null?e.Value.get(r):void 0,V=l!=null?e.Value.get(l):void 0;if(v<0n&&I!=null&&P<I||v>0n&&V!=null&&P>V)return;const $=c(P);$!==b&&i&&i($)};return D.Stack(e.attr.class("bc-number-input-steppers"),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),e.attr.disabled(e.computedOf(g,t.disabled??!1)((v,d)=>!v||d)),e.on.click(v=>w(1n,v)),e.aria.label(f.$.incrementValue),h.Icon({icon:"line-md:plus",size:"xs"})),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),e.attr.disabled(e.computedOf(y,t.disabled??!1)((v,d)=>!v||d)),e.on.click(v=>w(-1n,v)),e.aria.label(f.$.decrementValue),h.Icon({icon:"line-md:minus",size:"xs"})))}):null,p=u!=null&&o!=null?e.Fragment(o,u):u??o,m=i?f=>{const y=Qe(f);y!=null&&i(c(y))}:void 0,C=s?f=>{const y=Qe(f);y!=null&&s(c(y))}:void 0;return S.MaskInput({...t,value:e.Value.map(n,f=>f.toString()),onChange:m,onInput:C,after:p,mask:null,allowMode:"digits",class:"bc-number-input"})},Xe=t=>{if(t==null||t==="")return null;try{return BigInt(t)}catch{return null}},Dn=t=>{const{value:n,step:a,min:r,max:l,onChange:i,onInput:s,after:u}=t,c=y=>{const g=r!=null?e.Value.get(r):void 0,w=l!=null?e.Value.get(l):void 0;return g!=null&&y<g?g:w!=null&&y>w?w:y},o=a!=null?e.Use(h.BeatUII18n,y=>{const g=e.computedOf(n,r)((d,b)=>{const x=d??0n;return b==null?!0:x>b}),w=e.computedOf(n,l)((d,b)=>{const x=d??0n;return b==null?!0:x<b}),v=(d,b)=>{const x=e.Value.get(n)??0n,k=e.Value.get(a),P=b?.shiftKey?10n:1n,I=x+k*P*d,V=r!=null?e.Value.get(r):void 0,$=l!=null?e.Value.get(l):void 0;if(d<0n&&V!=null&&I<V||d>0n&&$!=null&&I>$)return;const B=c(I);B!==x&&i&&i(B)};return D.Stack(e.attr.class("bc-number-input-steppers"),e.attr.type("button"),e.html.button(e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),e.attr.disabled(e.computedOf(w,t.disabled??!1)((d,b)=>!d||b)),e.on.click(d=>v(1n,d)),e.aria.label(y.$.incrementValue),h.Icon({icon:"line-md:plus",size:"xs"})),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),e.attr.disabled(e.computedOf(g,t.disabled??!1)((d,b)=>!d||b)),e.on.click(d=>v(-1n,d)),e.aria.label(y.$.decrementValue),h.Icon({icon:"line-md:minus",size:"xs"})))}):null,p=S.NullableResetAfter(n,t.disabled,i),m=u!=null&&o!=null?e.Fragment(o,p,u):u!=null?e.Fragment(p,u):o!=null?e.Fragment(o,p):p,C=i?y=>{const g=Xe(y);i(g===null?null:c(g))}:void 0,f=s?y=>{const g=Xe(y);s(g===null?null:c(g))}:void 0;return S.MaskInput({...t,value:e.Value.map(n,y=>y==null?"":y.toString()),onChange:C,onInput:f,after:m,mask:null,allowMode:"digits",class:"bc-number-input"})},$n=t=>{const{value:n,onChange:a,onBlur:r,before:l}=t,i=e.prop(""),s=c=>{a?.(e.Value.get(n).filter(o=>o!==c))},u=()=>{const c=i.value.trim(),o=e.Value.get(n);c===""||o.includes(c)||(i.set(""),a?.([...o,c]))};return h.InputContainer({...t,before:l??h.InputIcon({icon:"tabler:tag",size:t.size,color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),e.ForEach(n,c=>Fe({value:c,onClose:()=>s(c.value),disabled:t.disabled})),e.input.text(h.CommonInputAttributes(t),e.attr.value(i),e.attr.class("bc-input bc-input-container__tags-input"),e.on.input(e.emitValue(i.set)),a!=null?e.on.change(u):e.Empty,r!=null?e.on.blur(r):e.Empty))})};function Ve(t){return n=>{const{value:a,onBlur:r,onChange:l}=n;return S.WithTemporal(i=>h.InputContainer({...n,input:e.input[t.inputType](h.CommonInputAttributes(n),e.attr.value(e.Value.map(a,t.valueToString)),e.attr.class("bc-input"),r!=null?e.on.blur(e.emitValue(r)):e.Empty,l!=null?e.on.change(e.emitValue(s=>l(t.parseValue(i,s)))):e.Empty)}))}}function xe(t){return n=>{const{value:a,onBlur:r,onChange:l,after:i,disabled:s}=n,u=S.NullableResetAfter(a,s,l);return S.WithTemporal(c=>h.InputContainer({...n,input:e.input[t.inputType](h.CommonInputAttributes(n),e.attr.value(e.Value.map(a,o=>o==null?"":t.valueToString(o))),e.attr.class("bc-input"),r!=null?e.on.blur(e.emitValue(r)):e.Empty,l!=null?e.on.change(e.emitValue(o=>l(o===""?null:t.parseValue(c,o)))):e.Empty),after:i!=null?e.Fragment(u,i):u}))}}const Bn=Ve({inputType:"date",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainDate.from(n)}),Ln=xe({inputType:"date",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainDate.from(n)}),En=Ve({inputType:"time",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainTime.from(n)}),An=xe({inputType:"time",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainTime.from(n)}),Nn=Ve({inputType:"datetime-local",valueToString:t=>t.toJSON(),parseValue:(t,n)=>t.PlainDateTime.from(n)}),Fn=xe({inputType:"datetime-local",valueToString:t=>t.toJSON(),parseValue:(t,n)=>t.PlainDateTime.from(n)}),Mn=t=>{const n=new Date(t),a=n.getFullYear().toString().padStart(4,"0"),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0");return`${a}-${r}-${l}T${i}:${s}`},Un=t=>{const{value:n,onBlur:a,onChange:r}=t;return S.WithTemporal(l=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,i=>Mn(Number(i.epochMilliseconds)))),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(i=>r(l.Instant.from(new Date(i).toISOString())))):e.Empty)}))},Rn=t=>{const n=new Date(t),a=n.getFullYear().toString().padStart(4,"0"),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0");return`${a}-${r}-${l}T${i}:${s}`},Wn=t=>{const{value:n,onBlur:a,onChange:r,after:l,disabled:i}=t,s=S.NullableResetAfter(n,i,r);return S.WithTemporal(u=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,c=>c==null?null:Rn(Number(c.epochMilliseconds)))),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(c=>r(c===""?null:u.Instant.from(new Date(c).toISOString())))):e.Empty),after:l!=null?e.Fragment(s,l):s}))},Hn=t=>{const{value:n,onBlur:a,onChange:r}=t;return S.WithTemporal(l=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,i=>i.toJSON())),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(i=>{const s=l.PlainDateTime.from(i),u=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(l.ZonedDateTime.from({...s,timeZone:u}))})):e.Empty)}))},jn=t=>{const{value:n,onBlur:a,onChange:r,after:l,disabled:i}=t,s=S.NullableResetAfter(n,i,r);return S.WithTemporal(u=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,c=>c?.toJSON())),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(c=>{if(c==="")return r(null);const o=u.PlainDateTime.from(c),p=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(u.ZonedDateTime.from({...o,timeZone:p}))})):e.Empty),after:l!=null?e.Fragment(s,l):s}))},zn=Ve({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainYearMonth.from(n)}),Gn=xe({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainYearMonth.from(n)}),Yn=t=>{const{value:n,onChange:a}=t;return S.WithTemporal(r=>S.MaskInput({...t,value:e.Value.map(n,l=>l.toString()),onChange:a!=null?l=>a(r.PlainMonthDay.from(`--${l}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD"}))},qn=t=>{const{value:n,onChange:a,after:r,disabled:l}=t,i=S.NullableResetAfter(n,l,a);return S.WithTemporal(s=>S.MaskInput({...t,value:e.Value.map(n,u=>u?.toString()??""),onChange:a!=null?u=>a(u===""?null:s.PlainMonthDay.from(`--${u}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD",after:r!=null?e.Fragment(i,r):i}))},Zn=t=>{const{value:n,onChange:a}=t;return S.WithTemporal(r=>S.MaskInput({...t,value:e.Value.map(n,l=>l.toString()),onChange:a?l=>a(r.Duration.from(l)):void 0,onInput:void 0,...S.durationMaskConfig(r.Duration.from),placeholder:"P0DT0H0M0S"}))};function Jn(t,n,a){return e.Ensure(t.signal,()=>{const r=t.transform(l=>l,l=>l);return n(r)},a)}const Kn={filling:{type:"filling"},submitting:{type:"submitting"},error:t=>({type:"error",error:t}),success:{type:"success"}};class vt extends D.Controller{constructor(n,a,r,l,i){super(n,a,r,l,i)}isValidColor=this.signal.map(S.isValidColor);isValidHex=this.signal.map(S.isValidHexColor);normalizedHex=this.signal.map(n=>S.normalizeHexColor(n)??n);setColor=n=>{if(S.isValidHexColor(n)){const a=S.normalizeHexColor(n);if(a){this.change(a);return}}this.change(n)};setHex=n=>{const a=S.normalizeHexColor(n);a&&this.change(a)};setRgb=(n,a,r)=>{const l=s=>{const u=Math.round(Math.max(0,Math.min(255,s))).toString(16);return u.length===1?"0"+u:u},i=`#${l(n)}${l(a)}${l(r)}`;this.change(i)};getRgb=()=>{const n=this.signal.value,a=S.normalizeHexColor(n);if(!a)return null;const r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null};withFormat=n=>{const a=l=>{switch(n){case"hex":return S.normalizeHexColor(l)??l;case"rgb":const i=this.getRgb();return i?`rgb(${i.r}, ${i.g}, ${i.b})`:l;case"hsl":return l;default:return l}},r=l=>S.normalizeHexColor(l)??l;return this.transform(a,r,[`format-${n}`])}}function Qn(t){return new vt(t.path,t.change,t.signal,t.status,{disabled:t.disabled})}function Xn(t){return{id:t.name,disabled:t.disabled,value:t.normalizedHex,hasError:t.errorVisible,onChange:t.setColor,onInput:t.setColor}}function ea({locales:t,onChange:n,updateLocale:a=!0}){return e.Use(h.BeatUII18n,r=>e.Use(h.Locale,({locale:l,setLocale:i})=>D.InputWrapper({layout:"horizontal",content:S.Group(e.attr.class("bc-group--align-center bc-group--gap-2"),h.Icon({icon:"ic:twotone-language",size:"lg",color:"neutral",title:r.$.locale}),S.NativeSelect({options:e.Value.map(t,s=>s.map(u=>{let c=u.name;return u.nativeName!=null&&u.nativeName!==u.name&&(c+=` (${u.nativeName})`),re.value(u.code,c)})),value:l,onChange:s=>{a&&i(s),n?.(s)}}))})))}const ta=()=>e.Use(h.Locale,({direction:t})=>e.Portal("body",e.attr.class(t.map(n=>`b-${n}`))));function wt(t,n,a,r,l){const i=["bc-notification"];return t&&i.push("bc-notification--bordered"),n&&i.push("bc-notification--has-icon"),a&&i.push("bc-notification--closable"),r&&i.push("bc-notification--loading"),l&&l.length>0&&i.push(l),i.join(" ")}function Ct(t,n){return[`--notification-accent-color: ${q.getColorVar(t,500)}`,`--notification-radius: ${T.getRadiusVar(n)}`].join("; ")}function St({loading:t=!1,withCloseButton:n=!1,withBorder:a=!1,color:r="primary",radius:l="md",title:i,icon:s,onClose:u,class:c}={},...o){const p=e.Value.map(s,m=>m!=null);return e.html.section(e.attr.class(e.computedOf(a,p,n,t,c)((m,C,f,y,g)=>[wt(m,C,f,y,g)].join(" "))),e.attr.style(e.computedOf(r,l)((m,C)=>Ct(m,C))),e.aria.live("polite"),e.aria.busy(t),e.When(t,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__loader"),h.Icon({icon:"line-md:loading-twotone-loop",size:"lg",color:r,accessibility:"decorative"})),()=>e.When(p,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__icon"),h.Icon({icon:s,size:"lg",color:r})),()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__accent"),e.aria.hidden(!0)))),e.html.div(e.attr.class("bc-notification__body"),i!=null?e.html.div(e.attr.class("bc-notification__title"),i):null,e.html.div(e.attr.class("bc-notification__content"),...o)),e.When(n,()=>e.html.div(e.attr.class("bc-notification__meta"),D.CloseButton({size:"sm",color:r,onClick:u}))))}class na{handles=[];attach(n){return this.detach(n),this.handles.push(n),()=>this.detach(n)}detach(n){const a=this.handles.lastIndexOf(n);a>=0&&this.handles.splice(a,1)}get current(){const n=this.handles[this.handles.length-1];if(!n)throw new Error("NotificationService: no provider attached. Ensure BeatUI includes notifications or attach the provider manually.");return n}show(n,...a){return this.current.show(n,...a)}clear(){this.current.clear()}}const Vt=new na,Ge={mark:e.makeProviderMark("NotificationProvider"),create:({position:t="bottom-end"}={})=>{const n=e.prop(0),a=[];function r(c){return a.push(c),()=>{const o=a.lastIndexOf(c);o>=0&&a.splice(o,1)}}const l=[],i=({dismissAfter:c,onClose:o,animation:p={fade:!0},...m},...C)=>{n.update(g=>g+1);const f=c!=null?typeof c=="number"?Et(c*1e3):c:void 0,y={animation:p,class:e.Value.toSignal(m.class),loading:e.Value.toSignal(m.loading??!1),withCloseButton:e.Value.toSignal(m.withCloseButton==null&&c==null?!0:m.withCloseButton??!0),withBorder:e.Value.toSignal(m.withBorder??!1),color:e.Value.toSignal(m.color??"primary"),radius:e.Value.toSignal(m.radius??"md"),title:m.title??e.Empty,icon:e.Value.toSignal(m.icon),children:C,listenRequestClose:g=>(l.push(g),o?.(),()=>{}),delayedClose:f};a.forEach(g=>g(y))},s=()=>{l.forEach(c=>c()),l.length=0},u=Vt.attach({show:i,clear:s});return{value:{activeNotifications:n,show:i,clear:s,position:t,listenOnShow:r},dispose:()=>{u(),s()}}}};function xt(){return e.Use(Ge,({listenOnShow:t,position:n})=>e.html.div(e.attr.class("bc-notification-viewport"),e.attr.class(`bc-notification-viewport--${n}`),e.WithBrowserCtx(a=>e.OnDispose(t(r=>{const l=[],i=e.html.div(H.AnimatedToggle({animation:r.animation,initialStatus:"start-opening"},({close:s,listenOnClosed:u})=>(r.delayedClose?.finally(s),u(()=>{l.forEach(c=>c())}),St({class:r.class,loading:r.loading,withCloseButton:r.withCloseButton,withBorder:r.withBorder,color:r.color,radius:r.radius,title:r.title,icon:r.icon,onClose:s},...r.children))));l.push(e.renderWithContext(i,a))})))))}function aa({includeAuthI18n:t=!1,enableAppearance:n=!0,defaultAppearance:a="system",appearancePreferenceKey:r="bui-appearance",includeNotifications:l=!0,notificationPosition:i="bottom-end"},...s){return e.WithProvider(({set:u,use:c})=>{u(Z.Location,{}),u(h.Locale,{}),u(h.BeatUII18n,{}),u(ge.Theme,{defaultAppearance:n?a:"light",appearancePreferenceKey:r}),l&&u(Ge,{position:i}),Z.NavigationService.attach(c(Z.Location));const o=e.Fragment(n?ge.ThemeAppearance():e.Empty,ta(),l?xt():e.Empty,...s);return t?e.Task(()=>Promise.resolve().then(()=>require("./translations-BRRDPpLp.cjs")),({AuthI18n:p})=>e.Provide(p,{},()=>o)):o})}function ra({content:t,toolbar:n=!0,page:a,zoom:r,view:l,pagemode:i,scrollbar:s=!0,navpanes:u=!0,search:c,nameddest:o,viewrect:p,highlight:m,allowfullscreen:C=!1}){const f=e.Value.toSignal(t).mapAsync(async g=>{if(g instanceof Blob){const w=await g.arrayBuffer(),v=new Blob([w],{type:"application/pdf"});return URL.createObjectURL(v)}else{if(g instanceof ArrayBuffer)return URL.createObjectURL(new Blob([g],{type:"application/pdf"}));if(g instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(g)],{type:"application/pdf"}));if(typeof g=="string"){const v=await(await fetch(g)).arrayBuffer(),d=new Blob([v],{type:"application/pdf"});return URL.createObjectURL(d)}}},null),y=e.computedOf(f,n,a,r,l,i,s,u,c,o,p,m)((g,w,v,d,b,x,k,P,I,V,$,B)=>{if(g==null)return null;const A=[];w===!1&&A.push("toolbar=0"),v!=null&&v>0&&A.push(`page=${v}`),d!=null&&d>0&&A.push(`zoom=${d}`),b!=null&&A.push(`view=${b}`),x!=null&&A.push(`pagemode=${x}`),k===!1&&A.push("scrollbar=0"),P===!1&&A.push("navpanes=0"),I!=null&&A.push(`search=${encodeURIComponent(I)}`),V!=null&&A.push(`nameddest=${encodeURIComponent(V)}`),$!=null&&A.push(`viewrect=${encodeURIComponent($)}`),B!=null&&A.push(`highlight=${encodeURIComponent(B)}`);const F=A.join("&");return F?`${g}#${F}`:g});return f.on((g,w)=>{w!=null&&URL.revokeObjectURL(w)}),e.html.div(e.OnDispose(()=>{const g=f.value;g!=null&&URL.revokeObjectURL(g)}),e.attr.class("h-full w-full"),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(C),e.attr.title("PDF Preview"),e.attr.loading("lazy"),e.WithElement(g=>{const w=g;let v=!0;return y.on(d=>{d!=null&&(v?(w.src=d,v=!1):(w.src="about:blank",setTimeout(()=>{w.src=d},50)))}),e.Empty})))}function la({content:t,page:n,zoom:a,pagemode:r,nameddest:l,search:i,textLayerMode:s,sidebarViewOnLoad:u,scrollModeOnLoad:c,spreadModeOnLoad:o,enableScripting:p,enablePrinting:m,viewerUrl:C=null,allowfullscreen:f=!0,class:y=null}){const g=e.Value.toSignal(t).mapAsync(async v=>{if(v instanceof Blob)return URL.createObjectURL(v);if(v instanceof ArrayBuffer)return URL.createObjectURL(new Blob([v],{type:"application/pdf"}));if(v instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(v)],{type:"application/pdf"}));if(typeof v=="string")return v},null),w=e.computedOf(g,C,n,a,r,l,i,s,u,c,o,p,m)((v,d,b,x,k,P,I,V,$,B,A,F,R)=>{if(v==null)return null;const j=d??"https://mozilla.github.io/pdf.js/web/viewer.html",E=new URLSearchParams;E.set("file",encodeURIComponent(v));const z=[];b!=null&&b>0&&z.push(`page=${b}`),x!=null&&(typeof x=="string"?z.push(`zoom=${x}`):z.push(`zoom=${x}`)),k!=null&&z.push(`pagemode=${k}`),P!=null&&z.push(`nameddest=${encodeURIComponent(P)}`),I!=null&&z.push(`search=${encodeURIComponent(I)}`),V!=null&&z.push(`textLayer=${V}`),$!=null&&z.push(`sidebar=${$}`),B!=null&&z.push(`scrollMode=${B}`),A!=null&&z.push(`spreadMode=${A}`),F!=null&&z.push(`enableScripting=${F?"1":"0"}`),R!=null&&z.push(`enablePrinting=${R?"1":"0"}`);const X=z.length>0?`#${z.join("&")}`:"";return`${j}?${E.toString()}${X}`});return g.on((v,d)=>{d!=null&&d.startsWith("blob:")&&URL.revokeObjectURL(d)}),e.html.div(e.OnDispose(()=>{const v=g.value;v!=null&&v.startsWith("blob:")&&URL.revokeObjectURL(v)}),e.attr.class("bc-pdfjs-preview h-full w-full"),e.attr.class(y),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(f),e.attr.title("PDF Preview"),e.attr.loading("lazy"),e.attr.src(w)))}const oa=({id:t,css:n})=>e.Portal("head",e.html.style(e.attr.id(t),e.attr.innerHTML(n)));function te(t,n){return n==null?null:e.html.meta(e.attr.name(t),e.attr.content(e.Value.map(n,a=>String(a))))}function W(t,n){return n==null?null:e.html.meta(e.attr.property(t),e.attr.content(e.Value.map(n,a=>String(a))))}function Se(t,n){return n==null?null:e.ForEach(n,a=>W(t,a))}function ia(t,n){return n==null?null:e.When(e.Value.map(n,a=>Array.isArray(a)),()=>Se(t,n),()=>W(t,n))}const sa=t=>{const n=[];if(n.push(W("og:title",t.title)),n.push(W("og:type",t.type)),n.push(W("og:url",t.url)),n.push(W("og:image",t.image)),n.push(W("og:description",t.description)),n.push(W("og:site_name",t.siteName)),n.push(W("og:locale",t.locale)),t.localeAlternate!=null){const a=Se("og:locale:alternate",t.localeAlternate);a!=null&&n.push(a)}if(n.push(W("og:image:alt",t.imageAlt)),n.push(W("og:image:width",t.imageWidth)),n.push(W("og:image:height",t.imageHeight)),n.push(W("og:image:type",t.imageType)),t.images!=null){const a=Se("og:image",t.images);a!=null&&n.push(a)}if(n.push(W("og:video",t.video)),n.push(W("og:video:type",t.videoType)),n.push(W("og:video:width",t.videoWidth)),n.push(W("og:video:height",t.videoHeight)),n.push(W("og:video:secure_url",t.videoSecureUrl)),n.push(W("og:audio",t.audio)),n.push(W("og:audio:type",t.audioType)),n.push(W("og:audio:secure_url",t.audioSecureUrl)),n.push(W("article:published_time",t.publishedTime)),n.push(W("article:modified_time",t.modifiedTime)),n.push(W("article:expiration_time",t.expirationTime)),n.push(ia("article:author",t.author)),n.push(W("article:section",t.section)),t.tags!=null){const a=Se("article:tag",t.tags);a!=null&&n.push(a)}return n.push(W("profile:first_name",t.firstName)),n.push(W("profile:last_name",t.lastName)),n.push(W("profile:username",t.username)),n.push(W("profile:gender",t.gender)),n.push(te("twitter:card",t.twitterCard)),n.push(te("twitter:site",t.twitterSite)),n.push(te("twitter:creator",t.twitterCreator)),n.push(te("twitter:title",e.coalesce(t.twitterTitle,t.title))),n.push(te("twitter:description",e.coalesce(t.twitterDescription,t.description))),n.push(te("twitter:image",e.coalesce(t.twitterImage,t.image))),n.push(te("twitter:image:alt",e.coalesce(t.twitterImageAlt,t.imageAlt))),t.canonical!=null&&e.Value.get(t.canonical)!=null&&n.push(e.html.link(e.attr.rel("canonical"),e.attr.href(t.canonical))),n.push(te("robots",t.robots)),n.push(te("keywords",t.keywords)),n.push(te("author",t.metaAuthor)),e.Portal("head",n.filter(a=>a!=null).flat())},Ye=({viewTransition:t,state:n,scroll:a,replace:r})=>{const l={};return n!==void 0&&(l.state=n),a!==void 0&&(l.scroll=a),r!==void 0&&(l.replace=r),t!==void 0&&(l.viewTransition=t),l};function Ee(t,n){const a=["bc-link"];if(n)a.push("bc-link--disabled");else switch(t){case"plain":a.push("bc-link--plain");break;case"hover":a.push("bc-link--hover");break;case"default":default:a.push("bc-link--default");break}return a.join(" ")}function Ae(t){const n=h.textColorValue(t,"light"),a=h.textColorValue(t,"dark");return[`--link-color: ${n}`,`--link-color-dark: ${a}`,`--link-hover-color: ${n}`,`--link-hover-color-dark: ${a}`].join("; ")}function kt({href:t,variant:n="default",color:a="primary",colorDisabled:r="base",disabled:l=!1,viewTransition:i=!0,state:s,scroll:u,replace:c,target:o,rel:p},...m){return e.When(l,()=>e.html.span(e.attr.class(e.computedOf(n,l)((C,f)=>Ee(C,f))),e.attr.style(e.computedOf(r)(C=>Ae(C??"base"))),...m),()=>Z.Anchor({href:t,...Ye({viewTransition:i,state:s,scroll:u,replace:c})},e.attr.class(e.computedOf(n,l)((C,f)=>Ee(C,f))),e.attr.style(e.computedOf(a)(C=>Ae(C??"primary"))),o?e.attr.target(o):null,p?e.attr.rel(p):null,...m))}const ua=t=>t?t.startsWith("#")?t:`#${t}`:"",ca=t=>{if(!t)return new URLSearchParams;if(typeof t=="string"){const n=t.startsWith("?")?t.slice(1):t;return new URLSearchParams(n)}return t instanceof URLSearchParams?new URLSearchParams(t):new URLSearchParams(t)};function It(t,n,a){const r=ca(t.search),l=r.toString(),i=l?`?${l}`:"",s=ua(t.hash);switch(a){case"exact":return t.pathname+i+s===n;case"prefix":return t.pathname.startsWith(n)||(t.pathname+i).startsWith(n);case"params":try{const u=typeof document<"u"&&document.baseURI?document.baseURI:"http://localhost/",c=new URL(n,u);if(t.pathname!==c.pathname)return!1;const o=Array.from(new URLSearchParams(c.search).entries()).sort(),p=Array.from(r.entries()).sort();return o.length!==p.length?!1:o.every(([m,C],f)=>{const[y,g]=p[f];return m===y&&C===g})}catch{return t.pathname===n}default:return!1}}function ke(t,n){return n==="exact"?e.computedOf(t)(a=>a):e.computedOf(t)(a=>r=>It(r,a,n))}function da({href:t,matchMode:n="exact",disableWhenActive:a=!0,...r},...l){return e.Use(Z.Location,i=>{const s=i.matchSignal(ke(t,n)),u=e.computedOf(s,a)((c,o)=>o??!0?c:!1);return kt({...r,href:t,disabled:u},...l)})}function pa({href:t,viewTransition:n=!0,state:a,scroll:r,replace:l,target:i,rel:s,matchMode:u,disableWhenActive:c,variant:o="filled",size:p="md",color:m="base",roundedness:C="sm",disabled:f=!1},...y){return u!==void 0||c!==void 0?e.Use(Z.Location,g=>{const w=u!==void 0?g.matchSignal(ke(t,u)):e.computedOf(g.location)(()=>!1),v=e.computedOf(w,c)((b,x)=>!(x??!0)||!u?!1:b),d=e.computedOf(f,v)((b,x)=>b||x);return et({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:o,size:p,color:m,roundedness:C,disabled:d},...y)}):et({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:o,size:p,color:m,roundedness:C,disabled:f},...y)}function et({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:u="default",size:c="md",color:o="base",roundedness:p="sm",disabled:m=!1,fullWidth:C=!1,loading:f=!1},...y){return e.When(m??!1,()=>e.html.span(e.attr.class(e.computedOf(c,p,f,C)(h.generateButtonClasses)),e.attr.style(e.computedOf(u,o,m)((g,w,v)=>h.generateButtonStyles(g??"filled",w??"base",v))),...y),()=>Z.Anchor({href:t,...Ye({viewTransition:n,state:a,scroll:r,replace:l})},e.attr.class(e.computedOf(c,p,f,C)(h.generateButtonClasses)),e.attr.style(e.computedOf(u,o,m)((g,w,v)=>h.generateButtonStyles(g??"filled",w??"base",v))),i?e.attr.target(i):null,s?e.attr.rel(s):null,...y))}const Tt={mark:e.makeProviderMark("SidebarContext"),create:t=>({value:{backgroundMode:"light"},dispose:()=>{}})};function ma({backgroundMode:t="light"},...n){return e.Provide(Tt,e.Value.map(t,a=>({backgroundMode:a})),()=>e.html.div(e.attr.class("bc-sidebar"),e.attr.class(e.Value.map(t,a=>a==="dark"?"bc-sidebar--dark-bg":"")),...n))}function Ne({rail:t,header:n},...a){return D.Stack(n!=null?e.html.div(e.attr.class("bc-sidebar-group__header"),n):null,e.html.div(e.attr.class(e.Value.map(t??!1,r=>r?"bc-sidebar-group--rail":"")),e.attr.class("bc-sidebar-group"),...a))}function Ot(t,...n){const a=Ye({viewTransition:t.viewTransition??!0,state:t.state,scroll:t.scroll,replace:t.replace});return Z.Anchor({href:t.href,...a},...n)}function Pt(...t){return e.html.span(...t)}function _t(t,...n){return e.html.button(e.attr.type("button"),e.on.click(t.onClick),t.ariaExpanded!=null?e.aria.expanded(e.Value.map(t.ariaExpanded,a=>a)):null,t.ariaControls!=null?e.aria.controls(t.ariaControls):null,t.ariaLabel!=null?e.aria.label(t.ariaLabel):null,...n)}function Dt(t){const n=[e.attr.class("bc-sidebar-link")];return t.icon!=null&&n.push(e.html.span(e.attr.class("bc-sidebar-link--icon"),h.Icon({icon:t.icon}))),n.push(e.html.span(e.attr.class("bc-sidebar-link__content"),t.content)),t.right!=null&&n.push(e.html.span(e.attr.class("bc-sidebar-link__right"),t.right)),t.action!=null&&n.push(e.html.button(e.attr.type("button"),e.attr.class("bc-sidebar-link--action"),e.on.click((a,r)=>{t.action?.onClick?.(r)}),h.Icon({icon:t.action?.icon}))),"onClick"in t?_t(t,...n):e.Use(Z.Location,a=>{const r=a.matchSignal(ke(t.href,"exact"),{includeSearch:!1,includeHash:!1});return e.When(r,()=>Pt(...n),()=>Ot(t,...n))})}function fa({rail:t=!0,icon:n,header:a,startOpen:r=!0},...l){const i=e.Value.deriveProp(r),s=D.sessionId("sidebar-group"),u=`${s}-content`;return Ne({},e.attr.class("bc-sidebar-group-collapsible"),e.attr.class(i.map(c=>c?"bc-sidebar-group-collapsible--open":"bc-sidebar-group-collapsible--closed")),e.attr.role("group"),e.attr.id(s),Dt({icon:n,onClick:()=>i.update(c=>!c),ariaExpanded:i,ariaControls:u,right:e.html.span(e.attr.class("bc-sidebar-group-collapsible-indicator"),h.Icon({icon:"lucide:chevron-down",color:"base"})),content:a}),Ne({rail:t},e.attr.id(u),it({open:i},...l)))}function ga(){return e.html.hr(e.attr.class("bc-sidebar-separator"))}function ba(t,n,a,r){const l=["bc-tabs",`bc-tabs--${t}`,`bc-tabs--${n}`];return a&&l.push("bc-tabs--disabled"),r!=null&&r!=="default"&&l.push(`bc-tabs--variant-${r}`),l.join(" ")}function ha(t,n){if(t!=="filled")return"";const a=new Map,r=h.backgroundValue(n,"solid","light"),l=h.backgroundValue(n,"solid","dark");a.set("--tabs-filled-inactive-bg",r.backgroundColor),a.set("--tabs-filled-inactive-text","var(--color-white)");const i=h.hoverBackgroundValue(n,"solid","light");a.set("--tabs-filled-inactive-bg-hover",i.backgroundColor);const s=h.hoverBackgroundValue(n,"solid","dark");a.set("--tabs-filled-inactive-bg-dark-hover",s.backgroundColor),a.set("--tabs-filled-inactive-bg-dark",l.backgroundColor),a.set("--tabs-filled-inactive-text-dark",l.textColor),a.set("--tabs-filled-active-bg","var(--color-white)"),a.set("--tabs-filled-active-text","var(--color-base-800)"),a.set("--tabs-filled-active-bg-dark","var(--color-base-900)");const u=n==="white"||n==="black"||n==="transparent"?"var(--color-white)":q.getColorVar(n,400);return a.set("--tabs-filled-active-text-dark",u),Array.from(a.entries()).map(([c,o])=>`${c}: ${o}`).join("; ")}function ya(t,n,a){const r=["bc-tab",`bc-tab--${t}`];return n&&r.push("bc-tab--active"),a&&r.push("bc-tab--disabled"),r.join(" ")}function we(t,n,a){const r=n.length;let l=t+a;l>=r?l=0:l<0&&(l=r-1);let i=0;for(;i<r;){const s=n[l];if(!e.Value.get(s.disabled??!1))return l;l+=a,l>=r?l=0:l<0&&(l=r-1),i++}return t}function va(t){const{items:n,value:a,onChange:r,size:l="md",variant:i="default",color:s="primary",disabled:u=!1,orientation:c="horizontal",showContent:o=!0,ariaLabel:p}=t,m=D.sessionId("tablist"),C=e.prop(-1),f=e.computedOf(a)(g=>n.find(w=>w.key===g)),y=g=>{if(e.Value.get(u))return;const v=C.value,d=e.Value.get(c)==="horizontal";let b=v;switch(g.key){case(d?"ArrowRight":"ArrowDown"):g.preventDefault(),b=we(v,n,1);break;case(d?"ArrowLeft":"ArrowUp"):g.preventDefault(),b=we(v,n,-1);break;case"Home":g.preventDefault(),b=we(-1,n,1);break;case"End":g.preventDefault(),b=we(n.length,n,-1);break;case"Enter":case" ":if(g.preventDefault(),v>=0&&v<n.length){const x=n[v];e.Value.get(x.disabled??!1)||r?.(x.key)}break}b!==v&&b>=0&&b<n.length&&(C.set(b),setTimeout(()=>{const x=document.querySelector(`[data-tab-index="${b}"]`);x&&x.focus()},0))};return e.html.div(e.attr.class(e.computedOf(l,c,u,i)((g,w,v,d)=>ba(g??"md",w??"horizontal",v??!1,d??"default"))),e.attr.style(e.computedOf(i,s)((g,w)=>ha(g??"default",w??"primary"))),e.html.div(e.attr.class("bc-tabs__list"),e.attr.role("tablist"),e.attr.id(m),e.aria.orientation(c??"horizontal"),p?e.aria.label(p):e.Fragment(),e.on.keydown(y),...n.map((g,w)=>{const v=e.computedOf(a)(k=>k===g.key),d=e.computedOf(u,g.disabled)((k,P)=>k||P),b=`${m}-tab-${g.key}`,x=`${m}-panel-${g.key}`;return e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(l,v,d)((k,P,I)=>ya(k??"md",P??!1,I??!1))),e.attr.id(b),e.attr.role("tab"),e.attr.tabindex(e.computedOf(v,C)((k,P)=>k||P===w?0:-1)),e.aria.selected(v),e.aria.controls(x),e.aria.disabled(d),e.attr.disabled(d),e.dataAttr["tab-index"](String(w)),g.ariaLabel?e.aria.label(g.ariaLabel):e.Fragment(),e.on.click(k=>{k.preventDefault(),e.Value.get(g.disabled??!1)||e.Value.get(u)||(r?.(g.key),C.set(w))}),e.on.focus(()=>{C.set(w)}),g.label)})),e.When(o??!0,()=>e.Ensure(f,g=>{const w=g.$.key,v=w.map(b=>`${m}-tab-${b}`),d=w.map(b=>`${m}-panel-${b}`);return e.html.div(e.attr.class("bc-tabs__panels"),e.html.div(e.attr.class("bc-tabs__panel"),e.attr.id(d),e.attr.role("tabpanel"),e.attr.tabindex(0),e.aria.labelledby(v),e.MapSignal(g,b=>b.content())))})))}function wa(t){return H.Overlay((n,a)=>{let r=a;const l=()=>r();return t(u=>{const{size:c="md",side:o="right",dismissable:p=!0,showCloseButton:m=!0,onClose:C,overlayEffect:f="opaque",container:y="body",header:g,body:w,footer:v}=u;r=a;const d=e.prop("capturing");e.Value.on(p,k=>{d.set(k?"capturing":"non-capturing")});const b=e.computedOf(g!=null,m)((k,P)=>k||P),x=e.WithElement(k=>{const P=H.useAnimatedElementToggle({initialStatus:"closed",element:k});P.listenOnClosed(()=>{a()}),r=()=>{P.close()},pe.g(()=>P.open());const V=D.sessionId("drawer"),$=g!=null?`${V}-header`:void 0,B=`${V}-body`;return e.html.div(e.attr.class(e.computedOf(c,o,P.status)((A,F,R)=>`bc-drawer bc-drawer--size-${A} bc-drawer--container-${y} bc-drawer--side-${F} bc-drawer--status-${R}`)),e.attr.role("dialog"),e.aria.modal(!0),...$?[e.aria.labelledby($)]:[],e.aria.describedby(B),e.attr.tabindex(-1),e.attr.id(V),e.dataAttr.focusTrap("true"),H.FocusTrap({active:!0,escapeDeactivates:!1,initialFocus:()=>document.querySelector(`#${V} [aria-label="Close drawer"]`)||null}),e.on.mousedown(A=>A.stopPropagation()),e.MapSignal(b,A=>Le(A?{header:e.html.div(e.attr.class("bc-drawer__header"),e.html.div(e.attr.id($),g),e.When(m,()=>e.Use(h.BeatUII18n,F=>D.CloseButton({size:"sm",onClick:l,label:F.$.closeDrawer})))),body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(B),w),footer:v&&e.html.div(e.attr.class("bc-drawer__footer"),v)}:{body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(B),w),footer:v&&e.html.div(e.attr.class("bc-drawer__footer"),v)})))});n({mode:d,effect:f??"opaque",container:y,content:x,onClickOutside:()=>{C?.(),l()},onEscape:()=>{C?.(),l()}})},()=>{l()})})}function Ca(t){const n={up:"M0 16 L8 10 L16 16 Z",down:"M0 0 L8 6 L16 0 Z",left:"M16 0 L10 8 L16 16 Z",right:"M0 0 L6 8 L0 16 Z"};return e.svg.svg(e.svgAttr.viewBox("0 0 16 16"),e.svg.path(e.svgAttr.d(t.map(a=>n[a]))))}function Sa(t){const{content:n,placement:a="top",showDelay:r=250,hideDelay:l=500,mainAxisOffset:i=8,crossAxisOffset:s=0,showOn:u="hover-focus"}=t,c=D.sessionId("tooltip");return e.Fragment(e.aria.describedby(c),he({content:()=>e.Fragment(e.attr.class("bc-tooltip"),e.attr.role("tooltip"),e.attr.id(c),n),placement:a,showDelay:r,hideDelay:l,mainAxisOffset:i,crossAxisOffset:s,showOn:u,closable:!0,role:"tooltip",arrow:o=>{const p=o.map(({placement:m})=>m.includes("top")?"down":m.includes("bottom")?"up":m.includes("left")?"right":m.includes("right")?"left":"up");return e.Fragment(e.attr.class("bc-tooltip__arrow"),e.attr.class(p.map(m=>`bc-tooltip__arrow-${m}`)),e.style.transform(o.map(({x:m,y:C})=>m==null&&C==null?"":m!=null?`translate(${m}px, 0)`:`translate(0, ${C}px)`)),Ca(p))}}))}function Va(t,n,a,r,l,i){const s=h.backgroundValue(t,"solid","light"),u=h.backgroundValue(t,"solid","dark");return[`--ribbon-bg: ${s.backgroundColor}`,`--ribbon-text: ${s.textColor}`,`--ribbon-bg-dark: ${u.backgroundColor}`,`--ribbon-text-dark: ${u.textColor}`,`--ribbon-inset: ${De(n)}`,`--ribbon-offset: ${De(a)}`,`--ribbon-width: ${De(r)}`,`--ribbon-angle: ${l}deg`,`--ribbon-corner: ${i}`].join("; ")}function De(t){return t==null?null:typeof t=="number"?`${t}px`:t}function xa({color:t="primary",class:n,inset:a=0,offset:r=40,width:l=100,angle:i=45,corner:s="top-end"},...u){return e.html.div(e.attr.class("bc-ribbon"),e.attr.style(e.computedOf(t,a,r,l,i,s)(Va)),e.attr.class(n),...u)}function ka(t,n){const{dismissable:a=!0,showCloseButton:r=!0,overlayEffect:l="opaque",container:i="body",padding:s=32}=t;return H.Overlay((u,c)=>{let o=()=>{};return n(C=>{o=c;const f=e.prop(typeof a!="boolean"||a?"capturing":"non-capturing");let y=typeof a=="boolean"?a:!0;e.Value.on(a,w=>{y=w,f.set(w?"capturing":"non-capturing")});const g=e.html.div(e.attr.class("bc-lightbox"),e.When(r,()=>e.Use(h.BeatUII18n,w=>e.html.div(e.attr.class("bc-lightbox__close"),D.CloseButton({size:"md",label:w.$.closeModal,onClick:()=>{o(),c()}}))),()=>null),e.html.div(e.attr.class("bc-lightbox__viewport"),e.attr.style(e.computedOf(s)(w=>`padding:${typeof w=="number"?w+"px":w}`)),e.html.div(e.attr.class("bc-lightbox__content"),C)));u({mode:f,effect:l??"opaque",container:i,content:g,onClickOutside:()=>{y&&(o(),c())},onEscape:()=>{y&&(o(),c())}})},()=>{o(),c()})})}function Ia(t,n){const a=["bc-announcement-bar"];return t&&a.push("bc-announcement-bar--dismissible"),n&&n.length>0&&a.push(n),a.join(" ")}function Ta(t){return`--announcement-bar-bg-color: ${q.getColorVar(t,600)}`}function Oa({color:t="primary",icon:n,closable:a=!1,onDismiss:r,class:l},...i){const s=e.prop(!0);return e.When(s,()=>{const u=e.Value.map(a,c=>!!c||r!=null);return e.html.div(e.attr.class(e.computedOf(u,l)((c,o)=>Ia(c,o))),e.attr.style(e.Value.map(t,c=>Ta(c))),e.html.div(e.attr.class("bc-announcement-bar__content"),e.When(e.Value.map(n,c=>c!=null),()=>e.html.div(e.attr.class("bc-announcement-bar__icon"),h.Icon({icon:n,size:"sm",accessibility:"decorative"}))),e.html.div(e.attr.class("bc-announcement-bar__text"),...i),e.When(u,()=>e.html.div(e.attr.class("bc-announcement-bar__close"),D.CloseButton({size:"xs",color:"white",onClick:()=>{s.set(!1),r?.()}})))))})}function Pa(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i.test(t)}let Ce=null;function _a(){return typeof window<"u"&&window.YT?.Player?Promise.resolve(window.YT):Ce||(Ce=new Promise(t=>{const n=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{n?.(),t(window.YT)};const a=document.createElement("script");a.src="https://www.youtube.com/iframe_api",a.async=!0,document.head.appendChild(a)}),Ce)}function Da(t){const{url:n,playing:a=!1,loop:r=!1,controls:l=!1,volume:i=1,muted:s=!1,playbackRate:u=1,pip:c=!1,playsinline:o=!0,width:p,height:m,progressInterval:C=1e3,seekTo:f,config:y,onReady:g,onStart:w,onPlay:v,onPause:d,onBuffer:b,onBufferEnd:x,onEnded:k,onError:P,onDuration:I,onSeek:V,onProgress:$,onPlaybackRateChange:B,onPlaybackQualityChange:A}=t;function F(O){return/\.m3u8(\?|$)/i.test(O)}function R(O){try{const L=O.canPlayType("application/vnd.apple.mpegurl");return L==="probably"||L==="maybe"}catch{return!1}}const j=e.prop("file");let E=null,z=null,X=null;function K(){try{X?.destroy()}catch{}X=null}const J=[];J.push(e.Value.on(n,O=>{typeof O=="string"&&O.length>0&&Pa(O)?j.value="youtube":(j.value="file",E&&le())}));async function le(){const O=E;if(!O)return;const L=e.Value.get(n);if(typeof L!="string"||L.length===0)return;K();const M=y?.file?.forceHLS??!1;if(F(L)||M){if(R(O)){O.setAttribute("src",L);try{O.load()}catch{}return}if(typeof window>"u")return;try{const G=await Promise.resolve().then(()=>require("./hls.light.min-D3hUMpII.cjs")).then(oe=>oe.hls_light_min),fe=G;let ce=fe.default??fe.Hls??G;for(let oe=0;oe<3&&(typeof ce=="object"&&ce!=null&&"default"in ce);oe++)ce=ce.default;if(typeof ce=="function"){const oe=ce;if(typeof oe.isSupported=="function"&&oe.isSupported()){O.removeAttribute("src");try{O.load()}catch{}const Te=new oe(y?.hls);X=Te,Te.attachMedia(O),Te.loadSource(L)}else{O.setAttribute("src",L);try{O.load()}catch{}}}else{O.setAttribute("src",L);try{O.load()}catch{}}}catch(G){P?.(G),O.setAttribute("src",L);try{O.load()}catch{}}return}O.setAttribute("src",L);try{O.load()}catch{}}function me(){z?.();const O=e.Value.get(C)??1e3;z=pe.x(()=>{const L=E;if(!L)return;const M=L.duration||0,G=L.currentTime||0,fe=L.buffered?.length?L.buffered.end(L.buffered.length-1):0;$?.({played:M>0?G/M:0,playedSeconds:G,loaded:M>0?Math.min(fe,M)/M:0,loadedSeconds:Math.min(fe,M)})},O)}function ae(O){if(O!=null)return typeof O=="number"?`${O}px`:O}const ye=e.html.video(e.WithElement(O=>{E=O,g?.();try{E.playbackRate=e.Value.get(u)??1}catch{}E.muted=!!(e.Value.get(s)??!1),E.loop=!!(e.Value.get(r)??!1),E.controls=!!(e.Value.get(l)??!1),E.playsInline!=null&&(!!(e.Value.get(o)??!0)?E.setAttribute("playsinline",""):E.removeAttribute("playsinline")),e.Value.get(a)&&(E.play?.().catch(()=>{}),w?.());try{const L=!!(e.Value.get(c)??!1),M=document,G=E;L?typeof G.requestPictureInPicture=="function"&&M.pictureInPictureElement!==E&&G.requestPictureInPicture().catch(()=>{}):M.pictureInPictureElement===E&&typeof M.exitPictureInPicture=="function"&&M.exitPictureInPicture().catch(()=>{})}catch{}me(),le()}),e.style.width(e.Value.map(p,ae)),e.style.height(e.Value.map(m,ae)),e.on.play(()=>v?.()),e.on.playing(()=>{w?.(),x?.()}),e.on.pause(()=>d?.()),e.on.waiting(()=>b?.()),e.on.canplay(()=>{const O=E?.duration;O!=null&&Number.isFinite(O)&&I?.(O)}),e.on.ended(()=>k?.()),e.on.error(O=>{X||P?.(O)}));let de=null,U=null,se=null;function ue(){const O=e.Value.get(n);!de||typeof O!="string"||_a().then(L=>{const M=$t(O);if(M){if(U){U.loadVideoById({videoId:M});return}U=new L.Player(de,{videoId:M,playerVars:$a(t),events:{onReady:()=>{g?.(),_(),e.Value.get(a)&&w?.(),Ie()},onStateChange:G=>{switch(G.data){case L.PlayerState.PLAYING:v?.(),x?.();break;case L.PlayerState.PAUSED:d?.();break;case L.PlayerState.BUFFERING:b?.();break;case L.PlayerState.ENDED:k?.();break}},onError:G=>P?.(G),onPlaybackRateChange:G=>B?.(G.data),onPlaybackQualityChange:G=>A?.(G.data)}})}})}function Ie(){se?.();const O=e.Value.get(C)??1e3;se=pe.x(()=>{if(!U)return;const L=U.getDuration?.()??0,M=U.getCurrentTime?.()??0,G=U.getVideoLoadedFraction?.()??0;$?.({played:L>0?M/L:0,playedSeconds:M,loaded:G,loadedSeconds:G*L})},O)}function _(){if(!U)return;try{const M=e.Value.get(u)??1;U.setPlaybackRate?.(M)}catch{}try{const M=Math.round(Math.min(Math.max(e.Value.get(i)??1,0),1)*100);U.setVolume?.(M)}catch{}try{e.Value.get(s)??!1?U.mute?.():U.unMute?.()}catch{}e.Value.get(a)??!1?U.playVideo?.():U.pauseVideo?.();const L=e.Value.get(f);typeof L=="number"&&Number.isFinite(L)&&(U.seekTo?.(L,!0),V?.(L))}const N=e.html.div(e.WithElement(O=>{de=O,ue(),g?.()}));J.push(e.Value.on(n,()=>{j.value==="youtube"&&ue()})),J.push(e.Value.on(a,()=>{j.value==="file"&&E?e.Value.get(a)?E.play?.().catch(()=>{}):E.pause?.():j.value==="youtube"&&U&&(e.Value.get(a)?U.playVideo?.():U.pauseVideo?.())})),J.push(e.Value.on(i,()=>{if(j.value==="file"&&E)E.volume=Math.min(Math.max(e.Value.get(i)??1,0),1);else if(j.value==="youtube"&&U){const O=Math.round(Math.min(Math.max(e.Value.get(i)??1,0),1)*100);U.setVolume?.(O)}})),J.push(e.Value.on(s,()=>{j.value==="file"&&E?E.muted=!!e.Value.get(s):j.value==="youtube"&&U&&(e.Value.get(s)?U.mute?.():U.unMute?.())})),J.push(e.Value.on(u,()=>{if(j.value==="file"&&E)try{E.playbackRate=e.Value.get(u)??1}catch{}else j.value==="youtube"&&U&&U.setPlaybackRate?.(e.Value.get(u)??1)})),J.push(e.Value.on(c,async()=>{if(!(j.value!=="file"||!E))try{const O=!!(e.Value.get(c)??!1),L=document,M=E;O?typeof M.requestPictureInPicture=="function"&&L.pictureInPictureElement!==E&&await M.requestPictureInPicture()?.catch(()=>{}):L.pictureInPictureElement===E&&typeof L.exitPictureInPicture=="function"&&await L.exitPictureInPicture()?.catch(()=>{})}catch{}})),J.push(e.Value.on(f??null,()=>{const O=e.Value.get(f);if(O!=null)if(j.value==="file"&&E)try{E.currentTime=O,V?.(O)}catch{}else j.value==="youtube"&&U&&(U.seekTo?.(O,!0),V?.(O))}));const Y=e.html.div(e.attr.class("bc-base-video"),e.style.width(e.Value.map(p,ae)),e.style.height(e.Value.map(m,ae)),e.When(e.Value.map(j,O=>O==="youtube"),()=>N,()=>ye));return e.Fragment(e.OnDispose(...J),Y)}function $t(t){const n=/[?&]v=([^&#]+)/.exec(t);if(n)return n[1];const a=/youtu\.be\/([^?&#]+)/.exec(t);if(a)return a[1];const r=/youtube\.com\/embed\/([^?&#]+)/.exec(t);return r?r[1]:null}function $a(t){const n={autoplay:e.Value.get(t.playing)??!1?1:0,controls:e.Value.get(t.controls)??!1?1:0,rel:0,playsinline:e.Value.get(t.playsinline)??!0?1:0,modestbranding:1},a=e.Value.get(t.loop)??!1,r=e.Value.get(t.url),l=typeof r=="string"?$t(r):null;return a&&l&&(n.loop=1,n.playlist=l),n}const qe="https://cdn.jsdelivr.net/npm/pdfjs-dist@5.4.394/",Ba=t=>{if(!t||typeof t!="object")return!1;const n=t;return!!(n.getDocument&&typeof n.getDocument=="function")};function La(){if(typeof window>"u")return;const n=window.pdfjsLib;n?.GlobalWorkerOptions?.workerSrc||n?.GlobalWorkerOptions&&(n.GlobalWorkerOptions.workerSrc=`${qe}build/pdf.worker.min.mjs`)}const Ea=t=>new Promise((n,a)=>{const r=document.createElement("script");r.type="module",r.src=t,r.onload=()=>n(),r.onerror=()=>a(new Error(`Failed to load script: ${t}`)),document.head.appendChild(r)}),Aa=async()=>{const t=window;if(t.pdfjsLib&&Ba(t.pdfjsLib))return t.pdfjsLib;if(await Ea(`${qe}build/pdf.min.mjs`),await new Promise(n=>setTimeout(n,100)),!t.pdfjsLib)throw new Error("PDF.js failed to initialize after loading");return t.pdfjsLib};let $e=null,tt=!1;async function Na(){if($e)return $e;!tt&&typeof window<"u"&&(La(),tt=!0);const t=await Aa();return $e=t,t.GlobalWorkerOptions&&(t.GlobalWorkerOptions.workerSrc=`${qe}build/pdf.worker.min.mjs`),t}function Fa(t,n){if(t.byteLength!==n.byteLength)return!1;const a=t.byteLength,r=new DataView(t.buffer,t.byteOffset,a),l=new DataView(n.buffer,n.byteOffset,a),i=a>>>2,s=a&3;for(let u=0;u<i;u++)if(r.getUint32(u*4)!==l.getUint32(u*4))return!1;for(let u=a-s;u<a;u++)if(t[u]!==n[u])return!1;return!0}function Ma(t,n){if(t.byteLength!==n.byteLength)return!1;const a=t.byteLength,r=a>>>2,l=new Uint32Array(t,0,r),i=new Uint32Array(n,0,r);for(let o=0;o<r;o++)if(l[o]!==i[o])return!1;const s=a&3,u=new Uint8Array(t,r*4,s),c=new Uint8Array(n,r*4,s);for(let o=0;o<s;o++)if(u[o]!==c[o])return!1;return!0}function Ua(t,n){try{return typeof t=="string"&&typeof n=="string"?t===n:t instanceof Uint8Array&&n instanceof Uint8Array?Fa(t,n):t instanceof ArrayBuffer&&n instanceof ArrayBuffer?Ma(t,n):!1}catch{return!1}}function Be(t){return typeof t=="string"?t:t instanceof Uint8Array?t.slice():t instanceof ArrayBuffer?t.slice(0):t}function Ra({source:t,page:n=1,fit:a="width",scale:r=1,rotation:l=0,quality:i=2,renderTextLayer:s=!0,renderAnnotationLayer:u=!1,onPageChange:c,onLoadComplete:o},...p){const m=Na();let C=Be(e.Value.get(t)),f=null,y=e.Value.get(n);return e.Use(h.BeatUII18n,g=>e.Fragment(e.OnDispose(()=>{f!=null&&(f.destroy(),f=null)}),Z.ElementRect(w=>{const v=w.map(d=>d,({width:d,height:b},{width:x,height:k})=>d===x&&b===k);return Z.Query({request:e.computedOf(t,n,a,r,l,i,s,u,v)((d,b,x,k,P,I,V,$,B)=>({source:d,page:b,fit:x,scale:k,rotation:P,quality:I,renderTextLayer:V,renderAnnotationLayer:$,containerWidth:B.width,containerHeight:B.height})),load:async({request:d})=>{const b=await m,x=d.source,k=Be(x),P=Be(x);(f==null||!Ua(C,k))&&(f!=null&&(f.destroy(),f=null),C=k,f=await b.getDocument(P).promise,o?.({numPages:f.numPages}));const I=d.page<1||d.page>f.numPages?1:d.page;c!=null&&I!==y&&(y=I,c(I));const V=await f.getPage(I);let $;if(d.fit==="none")$=d.scale;else{const R=V.getViewport({scale:1,rotation:d.rotation}),j=R.width/R.height,E=d.containerWidth/d.containerHeight;switch(d.fit){case"width":$=d.containerWidth/R.width;break;case"height":$=d.containerHeight/R.height;break;case"contain":$=Math.min(d.containerWidth/R.width,d.containerHeight/R.height);break;case"cover":j>E?$=d.containerHeight/R.height:$=d.containerWidth/R.width;break}}const B=V.getViewport({scale:$,rotation:d.rotation}),A=V.getViewport({scale:$*d.quality,rotation:d.rotation});let F=null;return{pdfWidth:B.width,pdfHeight:B.height,canvasWidth:Math.floor(B.width),canvasHeight:Math.floor(B.height),highResWidth:Math.floor(A.width),highResHeight:Math.floor(A.height),render:async(R,j,E)=>{if(F)try{F.cancel(),await F.promise.catch(()=>{})}catch{}R.width=A.width,R.height=A.height,R.style.width=`${B.width}px`,R.style.height=`${B.height}px`;const z=R.getContext("2d");if(!z)throw new Error("Failed to get canvas context");const X=V.render({canvasContext:z,canvas:R,viewport:A});F=X;try{await X.promise}catch(K){if((K instanceof Error?K.name:K?.name)!=="RenderingCancelledException")throw K;return}finally{F===X&&(F=null)}if(d.renderTextLayer&&j!=null){j.innerHTML="";try{const K=await V.getTextContent(),J=b.TextLayer;J!=null&&await new J({textContentSource:K,container:j,viewport:B}).render()}catch(K){console.warn("Failed to render text layer:",K)}}if(d.renderAnnotationLayer&&E!=null){E.innerHTML="",E.style.width=`${B.width}px`,E.style.height=`${B.height}px`;try{const K=await V.getAnnotations(),J=b.AnnotationLayer;if(J!=null&&K.length>0){const le={getDestinationHash:()=>"",getAnchorUrl:ae=>ae,executeNamedAction:()=>{},executeSetOCGState:()=>{},cachePageRef:()=>{}};await new J({div:E,page:V,viewport:B,linkService:le,annotationStorage:null}).render({viewport:B,div:E,annotations:K,page:V,linkService:le,renderForms:!0})}}catch(K){console.warn("Failed to render annotation layer:",K)}}}}},convertError:d=>d instanceof Error?d.message:JSON.stringify(d),pending:()=>e.html.div(e.attr.class("bc-pdf-page-viewer__loading"),h.Icon({icon:"line-md:loading-twotone-loop",size:"lg"}),e.html.span(e.attr.class("bc-pdf-page-viewer__loading-text"),g.map(d=>d.pdfPageViewer.loading))),failure:({error:d})=>e.html.div(e.attr.class("bc-pdf-page-viewer__error"),h.Icon({icon:"line-md:alert-circle",size:"lg",color:"danger"}),e.html.span(e.attr.class("bc-pdf-page-viewer__error-text"),d)),success:({value:d})=>e.html.div(e.attr.class(e.Value.map(a,b=>b==="none"?"bc-pdf-page-viewer":`bc-pdf-page-viewer bc-pdf-page-viewer--fit-${b}`)),e.html.div(e.attr.class("bc-pdf-page-viewer__content"),e.When(e.Value.map(a,b=>b==="none"),()=>e.attr.style(d.$.canvasWidth.map(b=>`width: ${b}px; height: ${d.value.canvasHeight}px;`)),()=>e.Fragment()),e.html.canvas(e.attr.class("bc-pdf-page-viewer__canvas"),e.attr.width(d.$.canvasWidth.map(String)),e.attr.height(d.$.canvasHeight.map(String)),...p),e.html.div(e.attr.class("bc-pdf-page-viewer__text-layer")),e.html.div(e.attr.class("bc-pdf-page-viewer__annotation-layer"))),e.WithElement(b=>{const x=b.querySelector(".bc-pdf-page-viewer__canvas"),k=b.querySelector(".bc-pdf-page-viewer__text-layer"),P=b.querySelector(".bc-pdf-page-viewer__annotation-layer");return e.Value.on(d,async I=>{await I.render(x,k,P)}),e.Empty}))})})))}Object.defineProperty(exports,"Use",{enumerable:!0,get:()=>e.Use});exports.BeatUII18n=h.BeatUII18n;exports.Button=h.Button;exports.CommonInputAttributes=h.CommonInputAttributes;exports.Icon=h.Icon;exports.InputContainer=h.InputContainer;exports.InputIcon=h.InputIcon;exports.LOGICAL_PROPERTY_MAP=h.LOGICAL_PROPERTY_MAP;exports.Locale=h.Locale;exports.TextInput=h.TextInput;exports.defaultLocale=h.defaultLocale;exports.defaultMessages=h.defaultMessages;exports.formatFileSize=h.formatFileSize;exports.generateButtonClasses=h.generateButtonClasses;exports.generateButtonStyles=h.generateButtonStyles;exports.generateInputContainerInputClasses=h.generateInputContainerInputClasses;exports.getDirectionClassName=h.getDirectionClassName;exports.getDirectionFromLocale=h.getDirectionFromLocale;exports.getIconLocally=h.getIconLocally;exports.getOppositeDirection=h.getOppositeDirection;exports.getPhysicalProperty=h.getPhysicalProperty;exports.isIndexedDBAvailable=h.isIndexedDBAvailable;exports.isRTLLocale=h.isRTLLocale;exports.makeI18nProvider=h.makeI18nProvider;exports.makeMessages=h.makeMessages;exports.resolveDirection=h.resolveDirection;exports.storeIconLocally=h.storeIconLocally;exports.backgroundConfig=q.backgroundConfig;exports.bgColors=q.bgColors;exports.borderColors=q.borderColors;exports.colorShades=q.colorShades;exports.colors=q.colors;exports.generateColorVariables=q.generateColorVariables;exports.generateCoreColorVariables=q.generateCoreColorVariables;exports.generateSemanticColorVariables=q.generateSemanticColorVariables;exports.getColorVar=q.getColorVar;exports.getColorVarName=q.getColorVarName;exports.interactiveColors=q.interactiveColors;exports.normalizeColorName=q.normalizeColorName;exports.resolveSemanticColorMap=q.resolveSemanticColorMap;exports.semanticColorNames=q.semanticColorNames;exports.semanticColors=q.semanticColors;exports.textColors=q.textColors;exports.themeColorNames=q.themeColorNames;exports.baseSpacing=T.baseSpacing;exports.beatuiPreset=T.beatuiPreset;exports.breakpoints=T.breakpoints;exports.changeFontSize=T.changeFontSize;exports.createBeatuiPreset=T.createBeatuiPreset;exports.fontFamily=T.fontFamily;exports.fontSize=T.fontSize;exports.fontWeight=T.fontWeight;exports.generateAllTokenVariables=T.generateAllTokenVariables;exports.generateBreakpointVariables=T.generateBreakpointVariables;exports.generateCoreTokenVariables=T.generateCoreTokenVariables;exports.generateFontFamilyOverrideVariables=T.generateFontFamilyOverrideVariables;exports.generateMotionVariables=T.generateMotionVariables;exports.generateRadiusVariables=T.generateRadiusVariables;exports.generateSemanticFontVariables=T.generateSemanticFontVariables;exports.generateSemanticMotionVariables=T.generateSemanticMotionVariables;exports.generateSemanticRadiusVariables=T.generateSemanticRadiusVariables;exports.generateSemanticShadowVariables=T.generateSemanticShadowVariables;exports.generateSemanticSpacingVariables=T.generateSemanticSpacingVariables;exports.generateSemanticTextShadowVariables=T.generateSemanticTextShadowVariables;exports.generateSemanticTokenVariables=T.generateSemanticTokenVariables;exports.generateShadowVariables=T.generateShadowVariables;exports.generateSpacingVariables=T.generateSpacingVariables;exports.generateTextShadowVariables=T.generateTextShadowVariables;exports.generateTypographyVariables=T.generateTypographyVariables;exports.generateZIndexVariables=T.generateZIndexVariables;exports.getBreakpointMediaQuery=T.getBreakpointMediaQuery;exports.getBreakpointVar=T.getBreakpointVar;exports.getBreakpointVarName=T.getBreakpointVarName;exports.getFontFamilyVar=T.getFontFamilyVar;exports.getFontFamilyVarName=T.getFontFamilyVarName;exports.getFontSizeVar=T.getFontSizeVar;exports.getFontSizeVarName=T.getFontSizeVarName;exports.getFontWeightVar=T.getFontWeightVar;exports.getFontWeightVarName=T.getFontWeightVarName;exports.getLetterSpacingVar=T.getLetterSpacingVar;exports.getLetterSpacingVarName=T.getLetterSpacingVarName;exports.getLineHeightVar=T.getLineHeightVar;exports.getLineHeightVarName=T.getLineHeightVarName;exports.getMotionDurationVar=T.getMotionDurationVar;exports.getMotionDurationVarName=T.getMotionDurationVarName;exports.getMotionEasingVar=T.getMotionEasingVar;exports.getMotionEasingVarName=T.getMotionEasingVarName;exports.getRadiusMediaQuery=T.getRadiusMediaQuery;exports.getRadiusVar=T.getRadiusVar;exports.getRadiusVarName=T.getRadiusVarName;exports.getSemanticFontVar=T.getSemanticFontVar;exports.getSemanticFontVarName=T.getSemanticFontVarName;exports.getSemanticMotionVarName=T.getSemanticMotionVarName;exports.getSemanticRadiusVarName=T.getSemanticRadiusVarName;exports.getSemanticShadowVarName=T.getSemanticShadowVarName;exports.getSemanticSpacingVarName=T.getSemanticSpacingVarName;exports.getSemanticTextShadowVarName=T.getSemanticTextShadowVarName;exports.getShadowVar=T.getShadowVar;exports.getShadowVarName=T.getShadowVarName;exports.getSpacingVar=T.getSpacingVar;exports.getSpacingVarName=T.getSpacingVarName;exports.getTextShadowVar=T.getTextShadowVar;exports.getTextShadowVarName=T.getTextShadowVarName;exports.getTokenValue=T.getTokenValue;exports.getZIndexVar=T.getZIndexVar;exports.getZIndexVarName=T.getZIndexVarName;exports.letterSpacing=T.letterSpacing;exports.lineHeight=T.lineHeight;exports.motionDurations=T.motionDurations;exports.motionEasings=T.motionEasings;exports.radius=T.radius;exports.semanticFontNames=T.semanticFontNames;exports.semanticMotionNames=T.semanticMotionNames;exports.semanticRadiusNames=T.semanticRadiusNames;exports.semanticShadowNames=T.semanticShadowNames;exports.semanticSpacingNames=T.semanticSpacingNames;exports.semanticTextShadowNames=T.semanticTextShadowNames;exports.shadows=T.shadows;exports.spacing=T.spacing;exports.textShadows=T.textShadows;exports.zIndex=T.zIndex;exports.ArrayController=D.ArrayController;exports.BaseControl=D.BaseControl;exports.BaseMappedControl=D.BaseMappedControl;exports.CheckboxInput=D.CheckboxInput;exports.CloseButton=D.CloseButton;exports.Control=D.Control;exports.Controller=D.Controller;exports.DangerLabel=D.DangerLabel;exports.EmailInput=D.EmailInput;exports.EmphasisLabel=D.EmphasisLabel;exports.InputWrapper=D.InputWrapper;exports.Label=D.Label;exports.MappedControl=D.MappedControl;exports.MutedLabel=D.MutedLabel;exports.Notice=D.Notice;exports.ObjectController=D.ObjectController;exports.PasswordInput=D.PasswordInput;exports.RequiredSymbol=D.RequiredSymbol;exports.Stack=D.Stack;exports.connectCommonAttributes=D.connectCommonAttributes;exports.connectNumberInput=D.connectNumberInput;exports.connectStringInput=D.connectStringInput;exports.convertStandardSchemaIssues=D.convertStandardSchemaIssues;exports.convertStandardSchemaPathToPath=D.convertStandardSchemaPathToPath;exports.makeMapValidation=D.makeMapValidation;exports.makeOnBlurHandler=D.makeOnBlurHandler;exports.makeOnChangeHandler=D.makeOnChangeHandler;exports.parsePath=D.parsePath;exports.pathToString=D.pathToString;exports.sessionId=D.sessionId;exports.standardSchemaResultToValidation=D.standardSchemaResultToValidation;exports.taskToValidation=D.taskToValidation;exports.useController=D.useController;exports.useForm=D.useForm;exports.wrapSegment=D.wrapSegment;exports.AnimatedToggle=H.AnimatedToggle;exports.AnimatedToggleClass=H.AnimatedToggleClass;exports.BooleanValidator=H.BooleanValidator;exports.ConfirmModal=H.ConfirmModal;exports.FocusTrap=H.FocusTrap;exports.Modal=H.Modal;exports.ObjectValidator=H.ObjectValidator;exports.Overlay=H.Overlay;exports.StringValidator=H.StringValidator;exports.boolean=H.boolean;exports.createStandardSchema=H.createStandardSchema;exports.object=H.object;exports.string=H.string;exports.useAnimatedElementToggle=H.useAnimatedElementToggle;exports.useAnimatedToggle=H.useAnimatedToggle;exports.useFocusTrap=H.useFocusTrap;exports.useTimedToggle=H.useTimedToggle;exports.Theme=ge.Theme;exports.ThemeAppearance=ge.ThemeAppearance;exports.Base64Input=S.Base64Input;exports.Base64sInput=S.Base64sInput;exports.BaseListControl=S.BaseListControl;exports.BaseNativeSelectControl=S.BaseNativeSelectControl;exports.Card=S.Card;exports.ColorSwatchInput=S.ColorSwatchInput;exports.EditableText=S.EditableText;exports.Expando=S.Expando;exports.FilesInput=S.FilesInput;exports.Group=S.Group;exports.ListControl=S.ListControl;exports.ListInput=S.ListInput;exports.MaskInput=S.MaskInput;exports.NativeSelect=S.NativeSelect;exports.NativeSelectControl=S.NativeSelectControl;exports.NullableDateInput=S.NullableDateInput;exports.NullableDateTimeInput=S.NullableDateTimeInput;exports.NullableDurationInput=S.NullableDurationInput;exports.NullableEmailInput=S.NullableEmailInput;exports.NullableNumberInput=S.NullableNumberInput;exports.NullablePasswordInput=S.NullablePasswordInput;exports.NullableRatingInput=S.NullableRatingInput;exports.NullableSliderInput=S.NullableSliderInput;exports.NullableTextArea=S.NullableTextArea;exports.NullableTextInput=S.NullableTextInput;exports.NullableUUIDInput=S.NullableUUIDInput;exports.NullableUrlInput=S.NullableUrlInput;exports.NumberInput=S.NumberInput;exports.RatingInput=S.RatingInput;exports.SegmentedInput=S.SegmentedInput;exports.SliderInput=S.SliderInput;exports.Switch=S.Switch;exports.TextArea=S.TextArea;exports.UUIDInput=S.UUIDInput;exports.UnionController=S.UnionController;exports.UnstyledDropZone=S.UnstyledDropZone;exports.UrlInput=S.UrlInput;exports.WithTemporal=S.WithTemporal;exports.emitExpando=S.emitExpando;exports.emitOptionExpando=S.emitOptionExpando;exports.emptyToNull=S.emptyToNull;exports.ensureTemporal=S.ensureTemporal;exports.fileToBase64=S.fileToBase64;exports.formatColor=S.formatColor;exports.getContrastRatio=S.getContrastRatio;exports.hexToRgb=S.hexToRgb;exports.hslToRgb=S.hslToRgb;exports.hwbToRgb=S.hwbToRgb;exports.isValidColor=S.isValidColor;exports.isValidHexColor=S.isValidHexColor;exports.isValidHslColor=S.isValidHslColor;exports.isValidRgbColor=S.isValidRgbColor;exports.isValidRgbaColor=S.isValidRgbaColor;exports.linearToSrgb=S.linearToSrgb;exports.mulberry32=S.mulberry32;exports.normalizeHexColor=S.normalizeHexColor;exports.nullToEmpty=S.nullToEmpty;exports.oklchToRgb=S.oklchToRgb;exports.parseAnyColor=S.parseAnyColor;exports.resolveEffectiveFormat=S.resolveEffectiveFormat;exports.rgbToHex=S.rgbToHex;exports.rgbToHsl=S.rgbToHsl;exports.rgbToHwb=S.rgbToHwb;exports.rgbToOklch=S.rgbToOklch;exports.srgbToLinear=S.srgbToLinear;exports.toRgbaString=S.toRgbaString;exports.transformEmptyStringToUndefined=S.transformEmptyStringToUndefined;exports.transformNullToUndefined=S.transformNullToUndefined;exports.transformUndefinedToNull=S.transformUndefinedToNull;exports.LinkPortal=Bt.LinkPortal;exports.Toolbar=be.Toolbar;exports.ToolbarButton=be.ToolbarButton;exports.ToolbarDivider=be.ToolbarDivider;exports.ToolbarGroup=be.ToolbarGroup;exports.ToolbarSpacer=be.ToolbarSpacer;exports.ActionCard=Jt;exports.AnnouncementBar=Oa;exports.AppShell=sn;exports.AppearanceSelector=rt;exports.Badge=Nt;exports.BaseComboboxControl=mt;exports.BaseComboboxTagsControl=Sn;exports.BaseDropdownControl=ct;exports.BaseSelectTagsControl=wn;exports.BaseVideoPlayer=Da;exports.BeatUI=aa;exports.BigintInput=_n;exports.ButtonLink=pa;exports.Center=dn;exports.CenterH=un;exports.Chips=He;exports.Collapse=it;exports.CollapsibleSidebarGroup=fa;exports.ColorController=vt;exports.ColorInput=Gt;exports.ComboboxControl=hn;exports.ComboboxInput=pt;exports.ComboboxTagsControl=Vn;exports.ComboboxTagsInput=ze;exports.DateInput=xn;exports.DateTimeInput=In;exports.Drawer=wa;exports.DropdownBase=Ue;exports.DropdownControl=bn;exports.DropdownInput=ut;exports.DurationInput=Zn;exports.EnsureControl=Jn;exports.FileInput=Tn;exports.Flyout=he;exports.FormStatus=Kn;exports.InstantInput=Un;exports.LazyNativeSelect=On;exports.Lightbox=ka;exports.Link=kt;exports.LocaleSelector=ea;exports.Menu=Re;exports.MenuItem=yn;exports.MenuSeparator=We;exports.NativePdfPreview=ra;exports.NavigationLink=da;exports.NineSliceScrollView=mn;exports.Notification=St;exports.NotificationProvider=Ge;exports.NotificationService=Vt;exports.NotificationViewport=xt;exports.NullableBigintInput=Dn;exports.NullableInstantInput=Wn;exports.NullableMaskInput=Pn;exports.NullablePlainDateInput=Ln;exports.NullablePlainDateTimeInput=Fn;exports.NullablePlainMonthDayInput=qn;exports.NullablePlainTimeInput=An;exports.NullablePlainYearMonthInput=Gn;exports.NullableZonedDateTimeInput=jn;exports.OpenGraph=sa;exports.Option=re;exports.PDFJSPreview=la;exports.PageDropZone=Ft;exports.PdfPageViewer=Ra;exports.PlainDateInput=Bn;exports.PlainDateTimeInput=Nn;exports.PlainMonthDayInput=Yn;exports.PlainTimeInput=En;exports.PlainYearMonthInput=zn;exports.Ribbon=xa;exports.ScrollablePanel=Le;exports.SelectTagsControl=Cn;exports.SelectTagsInput=je;exports.Sidebar=ma;exports.SidebarActiveLink=Pt;exports.SidebarClickLink=_t;exports.SidebarContext=Tt;exports.SidebarGroup=Ne;exports.SidebarLink=Dt;exports.SidebarSeparator=ga;exports.SidebarUrlLink=Ot;exports.Sink=gn;exports.StandaloneAppearanceSelector=jt;exports.StylePortal=oa;exports.Table=Rt;exports.Tabs=va;exports.Tag=Fe;exports.TagsInput=$n;exports.Tooltip=Sa;exports.WithBeatUIBreakpoint=ot;exports.WithBeatUIElementBreakpoint=tn;exports.WithBreakpoint=Me;exports.ZonedDateTimeInput=Hn;exports.colorInputOptionsFromController=Xn;exports.compareBreakpoint=lt;exports.createColorController=Qn;exports.createLocationMatcher=ke;exports.delaySignal=Lt;exports.findBreakpoint=Xt;exports.generateBadgeClasses=nt;exports.generateBadgeStyles=at;exports.generateLinkClasses=Ee;exports.generateLinkStyles=Ae;exports.generateNotificationClasses=wt;exports.generateNotificationStyles=Ct;exports.increaseSize=At;exports.isUrlMatch=It;
|
|
4
|
+
`),displayMenu:!0,displayAside:!0,menuWidth:ne.menu[c]+"px",asideWidth:ne.aside[c]+"px"}}return({width:c,breakpoint:o})=>l(`<=${t}`,c)?i(o):l(`<=${n}`,c)?s(o):u(o)}const an=["menu","aside"],rn=["banner","header","mainHeader","mainFooter","footer"];function ln(t,{displayMenu:n},a){return t?n?"block":a?"float":"none":"none"}function on(t,{displayAside:n},a){return t?n?"block":a?"float":"none":"none"}function sn({smallBreakpoint:t="sm",mediumBreakpoint:n="md",...a}){const r=Object.fromEntries(an.filter(i=>a[i]).map(i=>[i,Je(a[i].width??{},ne[i])])),l=Object.fromEntries(rn.filter(i=>a[i]).map(i=>[i,Je(a[i].height??{},ne[i])]));return e.Use(h.BeatUII18n,i=>ot(({value:s,is:u})=>{const c=nn({smallBreakpoint:t,mediumBreakpoint:n,vertical:r,horizontal:l,is:u}),o=s.map(c),p=l.header!=null||r.menu!=null||r.aside!=null,m=e.computedOf(r.aside!=null,o)((d,{displayAside:b})=>d&&!b),C=e.computedOf(r.menu!=null,o)((d,{displayMenu:b})=>d&&!b),f=H.useAnimatedElementToggle(),y=H.useAnimatedElementToggle(),g=e.prop(0),w=e.computedOf(r.menu!=null,o,f.display)(ln),v=e.computedOf(r.aside!=null,o,y.display)(on);return e.html.div(e.style.display("grid"),e.style.height("100%"),e.style.width("100%"),e.style.gridTemplateColumns(o.$.columns),e.style.gridTemplateRows(o.$.rows),e.style.gridTemplateAreas(o.$.areas),e.style.gridColumnGap("0"),e.style.gridRowGap("0"),a.banner?e.html.header(e.attr.class(ee("none",a.banner.shadow??"none")),ie(a.banner.color??"white"),e.style.height("100%"),e.style.gridArea("banner"),a.banner.content):null,e.html.header(e.attr.class(ee("bottom",a.header?.shadow??"none")),ie(a.header?.color??"white"),e.style.zIndex("20"),e.style.display(p?"block":"none"),e.style.gridArea("header"),Z.ElementRect(d=>(d.$.bottom.feedProp(g),null)),e.html.div(e.style.display("flex"),e.style.height("100%"),e.html.div(e.style.display(C.map(d=>d?"flex":"none")),e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),h.Button({onClick:()=>f.toggle(),variant:"light",color:"base"},e.aria.label(i.$.toggleMenu),h.Icon({icon:f.display.map(d=>d?"line-md/menu-to-close-alt-transition":"line-md/close-to-menu-alt-transition")}))),e.html.div(e.style.height("100%"),e.style.flexGrow("1"),a.header?.content),e.html.div(e.style.alignItems("center"),e.style.justifyContent("center"),e.style.height("100%"),e.style.width("60px"),e.style.display(m.map(d=>d?"flex":"none")),h.Button({onClick:()=>y.toggle(),roundedness:"full",variant:"light",color:"base"},e.aria.label(i.$.toggleAside),h.Icon({icon:"line-md/chevron-left"},e.attr.style("transition: transform 0.2s ease-in-out"),e.attr.style(y.display.map(d=>`transform: rotate(${d?180:0}deg)`))))))),a.menu?e.html.nav(e.WithElement(d=>f.setElement(d)),e.style.zIndex("10"),e.aria.label(i.$.mainNavigation),e.attr.role("navigation"),e.style.overflow("hidden"),e.attr.class(w.map(d=>d==="float"?ee("right",a.menu?.shadow??"md"):ee("right",a.menu?.shadow??"none"))),ie(a.menu?.color??"white"),e.style.height(w.map(d=>d==="float"?"auto":"100%")),e.style.overflow("hidden"),e.style.gridArea("menu"),e.style.display(e.computedOf(w,f.status)((d,b)=>d==="none"&&b==="closed"?"none":"block")),e.style.position(e.computedOf(w,f.status)((d,b)=>d==="float"||d==="none"&&b!=="closed"?"fixed":"initial")),e.style.top(g.map(d=>`${d}px`)),H.AnimatedToggleClass({animation:{slide:"right"},status:e.computedOf(w,f.status)((d,b)=>d==="block"?"opened":b)}),e.style.width(e.coalesce(a.menu?.width,o.$.menuWidth)),e.style.bottom("0"),a.menu?.content):null,a.mainHeader?e.html.header(e.style.height("100%"),e.style.gridArea("mainHeader"),e.attr.class(ee("none",a.mainHeader?.shadow??"none")),ie(a.mainHeader?.color??"white"),a.mainHeader.content):null,e.html.main(e.style.height("100%"),e.style.overflow("hidden"),e.style.gridArea("main"),e.attr.class(ee("none",a.main?.shadow??"none")),ie(a.main?.color??"white"),a.main.content),a.mainFooter?e.html.footer(e.style.height("100%"),e.style.gridArea("mainFooter"),e.attr.class(ee("none",a.mainFooter?.shadow??"none")),ie(a.mainFooter?.color??"white"),a.mainFooter.content):null,a.aside?e.html.aside(e.WithElement(d=>{y.setElement(d)}),e.style.zIndex("10"),e.aria.label(i.$.sidebar),e.attr.role("complementary"),e.attr.class(v.map(d=>d==="float"?ee("left","md"):ee("left","none"))),ie("white"),e.style.height("100%"),e.style.gridArea("aside"),e.style.display(e.computedOf(v,y.status)((d,b)=>d==="none"&&b==="closed"?"none":"block")),e.style.position(e.computedOf(v,y.status)((d,b)=>d==="float"||d==="none"&&b!=="closed"?"fixed":"initial")),e.style.top(g.map(d=>`${d}px`)),H.AnimatedToggleClass({animation:{slide:"left"},status:e.computedOf(v,y.status)((d,b)=>d==="block"?"opened":b)}),e.style.width(e.coalesce(a.aside?.width,o.$.asideWidth)),e.style.bottom(g.map(d=>`${d}px`)),a.aside.content):null,a.footer?e.html.footer(e.attr.class(ee("top","none")),ie("white"),e.style.height("100%"),e.style.gridArea("footer"),a.footer.content):null)}))}function un(...t){return e.html.div(e.attr.class("bc-center-h"),e.html.div(e.attr.class("bc-center__content"),...t))}function cn(t){const n=["bc-center"];return t!=="lg"&&n.push(`bc-center--gap-${t}`),n.join(" ")}function dn({gap:t="lg"}={},...n){return e.html.div(e.attr.class(e.computedOf(t)(a=>cn(a??"lg"))),...n)}function it({open:t},...n){return e.WithElement(a=>{const{status:r,setOpen:l,dispose:i}=H.useAnimatedElementToggle({initialStatus:e.Value.get(t)?"opened":"closed",element:a});return e.Value.on(t,l),Z.ElementRect(s=>{const u=e.prop(null);return e.computedOf(r,s.$.height)((o,p)=>o==="opened"&&p>0?p:null).on(o=>{o!=null&&u.set(o)}),r.on(o=>{if(a&&o==="start-opening"){const p=a.style.height,m=a.style.transition;a.style.transition="none",a.style.height="auto",a.offsetHeight;const C=a.scrollHeight;C>0&&u.set(C),a.style.height=p,a.style.transition=m,a.offsetHeight}}),e.Fragment(e.OnDispose(i),e.attr.style(u.map(o=>`--collapse-height: ${o!=null?`${o}px`:"auto"}`)),e.attr.class(r.map(o=>`bc-collapse bc-collapse--${o}`)),...n)})})}function pn(t){return`${t}px`}function Ke(t){return e.Value.map(t,pn)}function mn({body:t,contentWidth:n,contentHeight:a,header:r,headerHeight:l=0,topStart:i,topEnd:s,footer:u,footerHeight:c=0,bottomStart:o,bottomEnd:p,sidebarStart:m,sidebarStartWidth:C=0,sidebarEnd:f,sidebarEndWidth:y=0,anchorMode:g="container-edge"}){const w=e.prop(0n),v=e.prop(0n),d=Ke(l),b=Ke(C),x=e.prop(16);return e.html.div(e.attr.class("bc-nine-slice-container"),Z.ElementRect(I=>{const P=e.computedOf(I.$.width,C,y)((_,N,Y)=>_-N-Y),k=e.computedOf(I.$.height,l,c)((_,N,Y)=>_-N-Y),V=e.computedOf(n,P)((_,N)=>_>BigInt(N)),$=e.computedOf(a,k)((_,N)=>_>BigInt(N)),B=e.computedOf(P,$,x)((_,N,Y)=>N?_-Y:_),A=e.computedOf(k,V,x)((_,N,Y)=>N?_-Y:_),F=e.computedOf(n,B)((_,N)=>Number(_/BigInt(Math.max(1,N)))),R=e.computedOf(a,A)((_,N)=>Number(_/BigInt(Math.max(1,N)))),j=e.Value.map(g,_=>_==="body-end"||_==="body-end-bottom"),E=e.When(j,()=>e.style.left(e.computedOf(C,n,B,y)((_,N,Y,O)=>{const L=_+Number(N),M=_+Y,G=Math.min(L,M);return`${Math.max(_+O,G)}px`})),()=>e.style.right("0")),z=e.Value.map(g,_=>_==="body-bottom"||_==="body-end-bottom"),X=e.When(z,()=>e.style.top(e.computedOf(l,a,A,c)((_,N,Y,O)=>{const L=_+Number(N),M=_+Y,G=Math.min(L,M);return`${Math.max(_+O,G)}px`})),()=>e.style.bottom("0")),K=e.computedOf($,x)((_,N)=>_?`${N}px`:"0"),J=e.computedOf(V,x)((_,N)=>_?`${N}px`:"0"),le=e.style.transform(e.computedOf(v,w,V,$)((_,N,Y,O)=>{const L=Y?`translateX(-${_}px)`:"",M=O?`translateY(-${N}px)`:"";return`${L} ${M}`.trim()||"none"})),me=e.style.transform(v.map(_=>`translateX(-${_}px)`)),ae=e.style.transform(w.map(_=>`translateY(-${_}px)`)),ye=e.computedOf(a,A)((_,N)=>_-BigInt(Math.max(1,N))),de=e.computedOf(n,B)((_,N)=>_-BigInt(Math.max(1,N)));let U=null,se=0,ue=0;const Ie=()=>{const _=ye.value,N=de.value,Y=$.value,O=V.value;if(Y&&ue!==0){const L=Ze(ve(0n,_),ve(0n,w.value+BigInt(Math.round(ue))));w.set(L)}if(O&&se!==0){const L=Ze(ve(0n,N),ve(0n,v.value+BigInt(Math.round(se))));v.set(L)}se=0,ue=0,U=null};return V.on(_=>{_||v.set(0n)}),$.on(_=>{_||w.set(0n)}),e.Fragment(e.OnDispose(()=>{U&&clearTimeout(U)}),e.on.wheel(_=>{_.preventDefault();const{deltaX:N,deltaY:Y}=_;se+=N,ue+=Y,U||(U=setTimeout(Ie,16))}),e.html.div(e.attr.class("bc-nine-slice-pane-container"),e.style.right(K),e.style.bottom(J),i!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-start"),e.style.top("0"),e.style.left("0"),i):null,r!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-header"),e.style.top("0"),e.style.left(b),e.html.div(e.attr.class("bc-nine-slice-pane-content"),me,r)):null,s!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-top-end"),e.style.top("0"),E,s):null,m!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-start"),e.style.left("0"),e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),ae,m)):null,e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-body"),e.style.left(b),e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),le,t)),f!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-sidebar-end"),E,e.style.top(d),e.html.div(e.attr.class("bc-nine-slice-pane-content"),ae,f)):null,o!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-start"),e.style.left("0"),X,o):null,u!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-footer"),e.style.left(b),X,e.html.div(e.attr.class("bc-nine-slice-pane-content"),me,u)):null,p!=null?e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-bottom-end"),E,X,p):null),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar"),e.style.overflowX("scroll"),e.style.left("0"),e.style.right(e.computedOf($,x)((_,N)=>_?`${N}px`:"0")),e.style.bottom("0"),e.style.height(V.map(_=>_?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-horizontal-scrollbar-thumb"),e.style.width(F.map(_=>`${100/Math.max(1,_)}%`)),e.style.height("100%"),e.style.backgroundColor("#ff000066")),e.on.scroll(_=>{const N=_.target,Y=N.scrollLeft,O=N.scrollWidth-N.clientWidth;if(O>0){const L=Y/O,M=de.value;v.set(BigInt(Math.round(Number(M)*L)))}})),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar"),e.style.overflowY("scroll"),e.style.top("0"),e.style.bottom(e.computedOf(V,x)((_,N)=>_?`${N}px`:"0")),e.style.right("0"),e.style.width($.map(_=>_?"16px":"0")),e.html.div(e.attr.class("bc-nine-slice-pane bc-nine-slice-vertical-scrollbar-thumb"),e.style.width("100%"),e.style.height(e.computedOf(l,c,a,R)((_,N,Y,O)=>`${100/Math.max(1,O)}%`)),e.style.backgroundColor("#ff000066")),e.on.scroll(_=>{const N=_.target,Y=N.scrollTop,O=N.scrollHeight-N.clientHeight;if(O>0){const L=Y/O,M=ye.value;w.set(BigInt(Math.round(Number(M)*L)))}})))}))}function Le({header:t,footer:n,body:a,shadowOnScroll:r=!0},...l){const i=e.prop("none");function s(c){const o=c.scrollTop===0,p=c.scrollTop+c.clientHeight>=c.scrollHeight-1;o&&p?i.set("none"):o?i.set("bottom"):p?i.set("top"):i.set("both")}return e.html.div(e.attr.class("bc-scrollable-panel"),e.attr.class(e.computedOf(i,r)((c,o)=>{if(!o)return"";switch(c){case"both":return"bc-scrollable-panel--scrolled-up bc-scrollable-panel--scrolled-down";case"bottom":return"bc-scrollable-panel--scrolled-up";case"top":return"bc-scrollable-panel--scrolled-down";default:return""}})),t&&e.html.div(e.attr.class("bc-scrollable-panel__header"),t),e.html.div(e.attr.class("bc-scrollable-panel--header-shadow"),e.html.div()),e.html.div(e.attr.class("bc-scrollable-panel__body"),e.WithElement(c=>e.OnDispose(pe.g(()=>s(c)))),e.on.scroll(c=>{const o=c.target;s(o)}),a),e.html.div(e.attr.class("bc-scrollable-panel--footer-shadow"),e.html.div()),n&&e.html.div(e.attr.class("bc-scrollable-panel__footer"),n),...l)}function fn(t,n,a){const r=["bc-sink"];return t!=="default"&&r.push(`bc-sink--${t}`),n!=="md"&&r.push(`bc-sink--padding-${n}`),a!=="lg"&&r.push(`bc-sink--rounded-${a}`),r.join(" ")}function gn({variant:t="default",size:n="md",roundedness:a="lg"}={},...r){return e.html.div(e.attr.class(e.computedOf(t,n,a)((l,i,s)=>fn(l??"default",i??"md",s??"lg"))),...r)}const re={value:(t,n,{disabled:a,before:r,after:l}={})=>({type:"value",value:t,label:n,disabled:a,before:r,after:l}),group:(t,n,{disabled:a,before:r,after:l}={})=>({type:"group",group:t,options:n,disabled:a,before:r,after:l}),break:{type:"break"},getValues:t=>t.flatMap(n=>n.type==="group"?re.getValues(n.options):n.type==="break"?[]:[n.value]),contains:(t,n,a=(r,l)=>r===l)=>re.getValues(t).some(r=>a(r,n))},Ue=t=>{const{onChange:n,onBlur:a,role:r,display:l,optionsSource:i,allowSpaceToggle:s=!1,onBeforeOpen:u,onAfterOpen:c,buildListboxContent:o}=t,p=e.prop(!1),m=e.prop(-1),C=e.prop(null),f=D.sessionId("dropdown"),y=D.sessionId("listbox");let g,w;const v=b=>{n?.(b),p.set(!1),m.set(-1),C.set(null),g?.focus()},d=b=>{const x=re.getValues(e.Value.get(i));switch(b.key){case"ArrowDown":{if(b.preventDefault(),!p.value)p.set(!0),x.length>0&&(m.set(0),C.set(x[0]));else{const I=Math.min(m.value+1,x.length-1);m.set(I),C.set(x[I]??null)}break}case"ArrowUp":{if(b.preventDefault(),p.value){const I=Math.max(m.value-1,0);m.set(I),C.set(x[I]??null)}break}case"Enter":{if(b.preventDefault(),p.value&&m.value>=0){const I=x[m.value];I!=null&&v(I)}else{u?.();const I=re.getValues(e.Value.get(i));p.set(!0),I.length>0&&(m.set(0),C.set(I[0])),setTimeout(()=>c?.(),0)}break}case"Escape":{p.value&&(b.preventDefault(),p.set(!1),m.set(-1),C.set(null),g?.focus());break}case" ":{if(e.Value.get(s)){b.preventDefault();const I=re.getValues(e.Value.get(i));p.set(!p.value),p.value&&I.length>0&&(m.set(0),C.set(I[0]))}break}}};return h.InputContainer({...t,input:S.Group(e.attr.class("bc-dropdown__trigger"),e.html.span(e.attr.class("bc-dropdown__display"),l),h.Icon({icon:"ph:caret-up-down-bold",color:"neutral"},e.attr.class("bc-dropdown__arrow")))},Z.ElementRect(b=>e.Fragment(e.WithElement(x=>(g=x,x.addEventListener("keydown",d),e.OnDispose(()=>x.removeEventListener("keydown",d)))),h.CommonInputAttributes(t),e.attr.id(f),e.attr.tabindex(0),e.aria.controls(y),e.aria.expanded(p),e.attr.class("bc-dropdown"),e.attr.role(r),e.aria.activedescendant(e.computedOf(p,C)((x,I)=>x&&I!=null?`dropdown-option-${String(I)}`:"")),a!=null?e.on.blur(()=>{setTimeout(()=>{w?.contains(document.activeElement)||(p.set(!1),m.set(-1),a())},100)}):e.Empty,he({content:()=>e.html.div(e.WithElement(x=>{w=x}),e.style.minWidth(b.$.width.map(x=>`${x-10}px`)),e.attr.class("bc-dropdown__listbox"),e.attr.role("listbox"),e.attr.id(y),e.aria.labelledby(f),o({dropdownId:f,listboxId:y,focusedValue:C,handleKeyDown:d,onSelect:v})),mainAxisOffset:0,placement:"bottom-start",hasPopup:"listbox",showOn:(x,I)=>{const P=I;I=()=>{p.set(!1),m.set(-1),C.set(null),P()};const k=()=>{if(p.value)I();else{u?.();const V=re.getValues(e.Value.get(i));p.set(!0),V.length>0&&(m.set(0),C.set(V[0])),x(),setTimeout(()=>c?.(),0)}};return e.on.click(k)},showDelay:0,hideDelay:0,closable:!0}))))},st=(t,n,a,r,l)=>e.Ensure(t,i=>e.OneOfType(i,{value:s=>{const u=e.computedOf(s,a)((o,p)=>n(o.value,p)),c=e.computedOf(s,l)((o,p)=>p!=null&&n(o.value,p));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(u,c,s)((o,p,m)=>{const C=[];return o&&C.push("bc-dropdown__option--selected"),p&&C.push("bc-dropdown__option--focused"),m.disabled&&C.push("bc-dropdown__option--disabled"),C.join(" ")})),e.attr.role("option"),e.attr.id(s.map(o=>`dropdown-option-${String(o.value)}`)),e.aria.selected(u),S.Expando("value",s.$.value),e.When(s.map(o=>!o.disabled),()=>e.on.click(()=>r(s.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),s.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),s.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),s.$.label),s.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),s.value.after)))},group:s=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(s.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),s.$.group),e.ForEach(s.$.options,u=>st(u,n,a,r,l))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),ut=t=>{const{value:n,options:a,unselectedLabel:r,equality:l=(o,p)=>o===p,placeholder:i,searchable:s=!1}=t,u=e.computedOf(n,a)((o,p)=>{if(o==null)return"";const m=C=>{for(const f of C){if(f.type==="value"&&l(f.value,o))return f.label;if(f.type==="group"){const y=m(f.options);if(y)return y}}};return m(p)||String(o)}),c=e.computedOf(s)(o=>!o);return Ue({...t,role:"dropdown",display:e.When(u.map(o=>o.length>0),()=>u,()=>e.Use(h.BeatUII18n,o=>e.coalesce(i,r,o.$.selectOne))),optionsSource:a,allowSpaceToggle:c,buildListboxContent:({focusedValue:o,onSelect:p})=>e.ForEach(a,m=>st(m,l,n,p,o))})},ct=t=>{const{controller:n,onChange:a,onBlur:r,...l}=t;return ut({...l,value:n.signal,onChange:D.makeOnChangeHandler(n,a),onBlur:D.makeOnBlurHandler(n,r)})},bn=t=>D.InputWrapper({...t,content:ct(t)}),dt=(t,n,a,r,l,i)=>e.Ensure(t,s=>e.OneOfType(s,{value:u=>{const c=e.computedOf(u,a)((p,m)=>n(p.value,m)),o=e.computedOf(u,l)((p,m)=>m!=null&&n(p.value,m));return e.html.div(e.attr.class("bc-dropdown__option"),e.attr.class(e.computedOf(c,o,u)((p,m,C)=>{const f=[];return p&&f.push("bc-dropdown__option--selected"),m&&f.push("bc-dropdown__option--focused"),C.disabled&&f.push("bc-dropdown__option--disabled"),f.join(" ")})),e.attr.role("option"),e.attr.id(u.map(p=>`dropdown-option-${String(p.value)}`)),e.aria.selected(c),e.When(u.map(p=>!p.disabled),()=>e.on.click(()=>r(u.value.value)),()=>e.Empty),e.html.div(e.attr.class("bc-dropdown__option-content"),u.value.before&&e.html.span(e.attr.class("bc-dropdown__option-before"),u.value.before),e.html.span(e.attr.class("bc-dropdown__option-label"),i(u.$.value)),u.value.after&&e.html.span(e.attr.class("bc-dropdown__option-after"),u.value.after)))},group:u=>e.html.div(e.attr.class("bc-dropdown__group"),e.attr.role("group"),e.aria.label(u.$.group),e.html.div(e.attr.class("bc-dropdown__group-label"),u.$.group),e.ForEach(u.$.options,c=>dt(c,n,a,r,l,i))),break:()=>e.html.hr(e.attr.class("bc-dropdown__separator"))})),pt=t=>{const{value:n,loadOptions:a,renderOption:r,renderValue:l,equality:i=(d,b)=>d===b,placeholder:s,searchPlaceholder:u,debounceMs:c=150}=t,o=e.prop(""),p=e.prop(!1),m=e.prop([]);let C;const f=e.Value.toSignal(n),y=()=>(l??r)(f);let g=null;const w=d=>{p.set(!0),Promise.resolve(a(d)).then(b=>{m.set(b??[])}).catch(()=>{m.set([])}).finally(()=>p.set(!1))},v=d=>{g!=null&&(clearTimeout(g),g=null),g=setTimeout(()=>{w(d)},Math.max(0,c))};return Ue({...t,role:"combobox",display:e.When(e.computedOf(n)(d=>d!=null),y,()=>e.Use(h.BeatUII18n,d=>d.$.selectOne)),optionsSource:m,onBeforeOpen:()=>{const d=e.Value.get(o);v(d)},onAfterOpen:()=>{C?.focus()},buildListboxContent:({focusedValue:d,handleKeyDown:b,onSelect:x})=>e.Fragment(e.html.div(e.attr.class("bc-dropdown__search"),e.html.input(e.attr.type("text"),e.attr.class("bc-dropdown__search-input"),e.attr.placeholder(e.computedOf(u,s)((I,P)=>I??P??"Search")),e.attr.value(o),e.WithElement(I=>(C=I,e.Empty)),e.on.input(I=>{const P=I.target;o.set(P.value),v(P.value)}),e.on.keydown(b))),e.When(p,()=>e.html.div(e.attr.class("bc-dropdown__loading"),h.Icon({icon:"ph:spinner-bold",color:"neutral"})),()=>e.ForEach(m,I=>dt(I,i,f,x,d,r))))})},mt=t=>{const{controller:n,onChange:a,onBlur:r,...l}=t;return pt({...l,value:n.signal,onChange:D.makeOnChangeHandler(n,a),onBlur:D.makeOnBlurHandler(n,r)})},hn=t=>D.InputWrapper({...t,content:mt(t)});function Re(t){const{items:n,placement:a="bottom-start",showDelay:r=0,hideDelay:l=100,mainAxisOffset:i=4,crossAxisOffset:s=0,showOn:u="click",closable:c=!0,onClose:o,onAction:p,ariaLabel:m,ariaLabelledBy:C}=t,f=D.sessionId("menu"),y=e.prop(-1),g=e.prop([]);let w=null;return e.Fragment(he({content:()=>e.WithElement(v=>{w=document.activeElement;const d=(k,V,$)=>{if(V.length===0)return-1;let B=k+$,A=0;for(;A<V.length;){B>=V.length&&(B=0),B<0&&(B=V.length-1);const F=V[B];if(F&&F.getAttribute("aria-disabled")!=="true")return B;B+=$,A++}return k},b=k=>{const V=g.value,$=y.value;switch(k.key){case"ArrowDown":k.preventDefault(),k.stopPropagation();const B=d($,V,1);x(B,V);break;case"ArrowUp":k.preventDefault(),k.stopPropagation();const A=d($,V,-1);x(A,V);break;case"Enter":case" ":if(k.preventDefault(),k.stopPropagation(),$>=0&&V[$]){const F=V[$];if(F.getAttribute("aria-disabled")==="true")return;const R=F.getAttribute("data-key");R&&p&&p(R),F.click(),o?.()}break;case"Escape":o?.();break;case"Home":k.preventDefault(),k.stopPropagation(),V.length>0&&x(0,V);break;case"End":k.preventDefault(),k.stopPropagation(),V.length>0&&x(V.length-1,V);break;case"ArrowRight":if(k.preventDefault(),k.stopPropagation(),$>=0&&V[$]){const F=V[$];F.classList.contains("bc-menu-item--has-submenu")&&F.dispatchEvent(new Event("mouseenter"))}break;case"ArrowLeft":k.preventDefault(),k.stopPropagation(),o?.();break}},x=(k,V)=>{y.value>=0&&V[y.value]&&(V[y.value].classList.remove("bc-menu-item--focused"),V[y.value].removeAttribute("aria-selected")),k>=0&&V[k]&&(V[k].classList.add("bc-menu-item--focused"),V[k].setAttribute("aria-selected","true"),y.set(k),typeof V[k].scrollIntoView=="function"&&V[k].scrollIntoView({block:"nearest"}))},I=()=>{const k=Array.from(v.querySelectorAll('[role="menuitem"]'));if(g.set(k),k.length>0){const V=k.findIndex($=>$.getAttribute("aria-disabled")!=="true");V>=0&&x(V,k)}},P=new MutationObserver(I);return P.observe(v,{childList:!0,subtree:!0}),setTimeout(()=>{I(),v.focus()},0),document.addEventListener("keydown",b,!0),e.Fragment(e.OnDispose(()=>{P.disconnect(),document.removeEventListener("keydown",b,!0),w&&w.focus()}),e.attr.class("bc-menu"),e.attr.id(f),e.attr.role("menu"),e.attr.tabindex(-1),e.aria.orientation("vertical"),m?e.aria.label(m):e.Fragment(),C?e.aria.labelledby(C):e.Fragment(),e.aria.activedescendant(y.map(k=>{const V=g.value;return k>=0&&V[k]?V[k].id||`${f}-item-${k}`:""})),e.on.click(k=>{const $=k.target.closest('[role="menuitem"]');if($&&$.getAttribute("aria-disabled")!=="true"){const B=$.getAttribute("data-key");B&&p&&p(B)}}),e.html.div(e.attr.class("sr-only"),e.aria.live("polite"),e.aria.atomic(!0),y.map(k=>{const V=g.value;if(k>=0&&V[k]){const $=V[k].textContent||"";return V[k].getAttribute("aria-disabled")==="true"?`${$}, disabled`:`${$}, ${k+1} of ${V.length}`}return""})),...n())}),placement:a,showDelay:r,hideDelay:l,mainAxisOffset:i,crossAxisOffset:s,showOn:u,closable:c,role:"menu"}))}function yn(t){const{key:n,content:a,startContent:r,endContent:l,disabled:i=!1,onClick:s,ariaLabel:u,submenu:c,submenuPlacement:o="right-start"}=t,p=n??D.sessionId("menu-item"),m=`menu-item-${p}`,C=c!=null;return e.html.div(e.attr.class(e.computedOf(i)(f=>`bc-menu-item ${f?"bc-menu-item--disabled":""} ${C?"bc-menu-item--has-submenu":""}`)),e.attr.id(m),e.attr.role("menuitem"),e.attr.tabindex(-1),e.dataAttr.key(p),e.aria.disabled(i),e.aria.selected(!1),C?e.aria.expanded(!1):e.Fragment(),u?e.aria.label(u):e.Fragment(),e.on.click(f=>{if(e.Value.get(i)){f.preventDefault(),f.stopPropagation();return}s?.()}),r&&e.html.span(e.attr.class("bc-menu-item__start"),r),e.html.span(e.attr.class("bc-menu-item__content"),a),l&&e.html.span(e.attr.class("bc-menu-item__end"),l),C&&c?he({content:()=>e.Fragment(e.attr.class("bc-menu bc-submenu"),e.attr.role("menu"),...c()),placement:o,showOn:"hover",hasPopup:"menu",showDelay:100,hideDelay:300,mainAxisOffset:0,crossAxisOffset:0,role:"menu"}):e.Fragment())}function We(t={}){const{label:n}=t;return e.html.div(e.attr.class("bc-menu-separator"),e.attr.role("separator"),e.aria.orientation("horizontal"),n&&e.html.span(e.attr.class("bc-menu-separator__label"),n))}function ft(t,n,a){return t.some(l=>a(l,n))?t.filter(l=>!a(l,n)):[...t,n]}function gt(t,n,a){return t.filter(r=>!a(r,n))}function bt(t,n,a){return t.some(r=>a(r,n))}function ht(t,n,a){for(const r of t)if(r.type==="value"){if(a(r.value,n))return{label:r.label}}else if(r.type==="group"){const l=ht(r.options,n,a);if(l!=null)return l}}function vn(t,n,a){return ht(t,n,a)?.label??String(n)}function yt(t,n,a){const r=n.trim().toLowerCase(),l=a??((s,u)=>u.label.toLowerCase().includes(s));if(r==="")return t;const i=[];for(const s of t)if(s.type==="value")l(r,{label:s.label})&&i.push(s);else if(s.type==="group"){const u=yt(s.options,r,l);u.length>0&&i.push({...s,options:u})}return i}function He(t){const{values:n,options:a,equality:r,disabled:l,onRemove:i}=t;return e.NotEmpty(n,()=>e.ForEach(n,s=>Fe({value:e.computedOf(s,a)((u,c)=>vn(c,u,r)),onClose:()=>i(s.value),disabled:l})),()=>e.html.span(e.attr.class("bc-input-container__placeholder"),t.placeholder))}function je(t){const{value:n,options:a,equality:r=(o,p)=>o===p,placeholder:l}=t,i=o=>{const p=e.Value.get(n);t.onChange?.(gt(p,o,r))},s=o=>{const p=e.Value.get(n);t.onChange?.(ft(p,o,r))},u=o=>e.computedOf(n)(p=>bt(p,o,r)),c=Re({items:()=>{const o=e.Value.get(a),p=[];for(const m of o)if(m.type==="value"){const C=u(m.value);p.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(m.disabled===!0),e.aria.checked(C),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),m.label),e.on.click(()=>s(m.value))))}else m.type==="group"?p.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),m.group),...m.options.map(C=>{if(C.type==="value"){const f=u(C.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(C.disabled===!0),e.aria.checked(f),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),C.label),e.on.click(()=>s(C.value)))}return e.Fragment()}))):p.push(We());return p},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:"click",closable:!0});return h.InputContainer({...t,before:t.before??h.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),c,He({values:n,placeholder:l,options:a,equality:r,disabled:t.disabled,onRemove:i})),after:h.InputIcon({icon:"line-md:plus",color:"neutral",size:"sm"})})}function wn(t){return D.BaseControl(je,t)}function Cn(t){return D.Control(je,t)}function ze(t){const{value:n,options:a,equality:r=(f,y)=>f===y,placeholder:l,searchPlaceholder:i,filter:s}=t,u=e.prop(""),c=f=>{const y=e.Value.get(n);t.onChange?.(gt(y,f,r))},o=f=>{const y=e.Value.get(n);t.onChange?.(ft(y,f,r))},p=f=>e.computedOf(n)(y=>bt(y,f,r)),m=e.computedOf(a,u)((f,y)=>yt(f,y,s)),C=Re({items:()=>{const f=[],y=e.Value.get(m);if(y.length===0)return f.push(e.html.div(e.attr.class("bc-dropdown__empty"),e.Use(h.BeatUII18n,g=>g.$.noResults))),f;for(const g of y)if(g.type==="value"){const w=p(g.value);f.push(e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(g.disabled===!0),e.aria.checked(w),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),g.label),e.on.click(()=>o(g.value))))}else g.type==="group"?f.push(e.html.div(e.attr.class("bc-menu-group"),e.html.div(e.attr.class("bc-menu-group__label"),g.group),...g.options.map(w=>{if(w.type==="value"){const v=p(w.value);return e.html.div(e.attr.role("menuitem"),e.attr.tabindex(-1),e.aria.disabled(w.disabled===!0),e.aria.checked(v),e.attr.class("bc-menu-item"),e.html.span(e.attr.class("bc-menu-item__content"),w.label),e.on.click(()=>o(w.value)))}return e.Fragment()}))):f.push(We());return f},placement:"bottom-start",showDelay:0,hideDelay:100,showOn:(f,y)=>e.WithElement(g=>{const w=g.querySelector(".bc-dropdown__search-input");if(w){const v=()=>f();return w.addEventListener("focus",v),e.OnDispose(()=>{w.removeEventListener("focus",v)})}return e.Fragment()}),closable:!0});return h.InputContainer({...t,before:t.before??h.InputIcon({icon:"tabler:tags",color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),He({values:n,options:a,placeholder:l,equality:r,disabled:t.disabled,onRemove:c}),e.html.div(e.attr.class("bc-input-container__tags-selector"),e.html.input(e.attr.type("text"),e.attr.class("bc-dropdown__search-input"),e.attr.placeholder(e.computedOf(i,l)((f,y)=>f??y??"")),e.attr.value(u),e.on.input(f=>{const y=f.target;u.set(y.value)}),e.on.keydown(f=>{(f.key==="ArrowUp"||f.key==="ArrowDown"||f.key==="Enter"||f.key===" ")&&f.stopPropagation()})),C))})}function Sn(t){return D.BaseControl(ze,t)}function Vn(t){return D.Control(ze,t)}const xn=t=>{const{value:n,onBlur:a,onChange:r}=t;return h.InputContainer({...t,input:e.input.date(h.CommonInputAttributes(t),e.attr.valueAsDate(n),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValueAsDate(r)):e.Empty)})},kn=t=>{const n=t.getFullYear(),a=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0"),l=t.getHours().toString().padStart(2,"0"),i=t.getMinutes().toString().padStart(2,"0");return`${n}-${a}-${r}T${l}:${i}`},In=t=>{const{value:n,onBlur:a,onChange:r}=t;return h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,kn)),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(l=>r(new Date(l)))):e.Empty)})},Tn=t=>{const{value:n,onInput:a,onChange:r,...l}=t;return S.FilesInput({...l,maxFiles:1,value:e.Value.map(n,i=>i==null?[]:[i]),onChange:i=>{r?.(i[0])},onInput:i=>{a?.(i[0])}})},On=t=>Z.Query({request:t.request,load:t.load,convertError:String,success:({value:n})=>{const a=n.map(r=>r.map(l=>typeof l=="object"&&"id"in l&&"label"in l?re.value(l.id,l.label):l));return S.NativeSelect({...t,options:a,unselectedLabel:t.unselectedLabel,equality:t.equality})},pending:()=>e.Use(h.BeatUII18n,n=>e.html.span(h.Icon({icon:"line-md:loading-twotone-loop",title:n.$.loadingShort})))}),Pn=t=>{const{value:n,onBlur:a,onChange:r,onInput:l,after:i,disabled:s,...u}=t,c=S.NullableResetAfter(n,s,r);return S.MaskInput({...u,value:e.Value.map(n,S.nullToEmpty),onChange:r!=null?o=>r(S.emptyToNull(o)):void 0,onInput:l!=null?o=>l(S.emptyToNull(o)):void 0,onBlur:a,after:i!=null?e.Fragment(c,i):c})},Qe=t=>{try{return BigInt(t)}catch{return null}},_n=t=>{const{value:n,step:a,min:r,max:l,onChange:i,onInput:s,after:u}=t,c=f=>{const y=r!=null?e.Value.get(r):void 0,g=l!=null?e.Value.get(l):void 0;return y!=null&&f<y?y:g!=null&&f>g?g:f},o=a!=null?e.Use(h.BeatUII18n,f=>{const y=e.computedOf(n,r)((v,d)=>d==null?!0:(v??0n)>d),g=e.computedOf(n,l)((v,d)=>d==null?!0:(v??0n)<d),w=(v,d)=>{const b=e.Value.get(n)??0n,x=e.Value.get(a),I=d?.shiftKey?10n:1n,P=b+x*I*v,k=r!=null?e.Value.get(r):void 0,V=l!=null?e.Value.get(l):void 0;if(v<0n&&k!=null&&P<k||v>0n&&V!=null&&P>V)return;const $=c(P);$!==b&&i&&i($)};return D.Stack(e.attr.class("bc-number-input-steppers"),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),e.attr.disabled(e.computedOf(g,t.disabled??!1)((v,d)=>!v||d)),e.on.click(v=>w(1n,v)),e.aria.label(f.$.incrementValue),h.Icon({icon:"line-md:plus",size:"xs"})),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),e.attr.disabled(e.computedOf(y,t.disabled??!1)((v,d)=>!v||d)),e.on.click(v=>w(-1n,v)),e.aria.label(f.$.decrementValue),h.Icon({icon:"line-md:minus",size:"xs"})))}):null,p=u!=null&&o!=null?e.Fragment(o,u):u??o,m=i?f=>{const y=Qe(f);y!=null&&i(c(y))}:void 0,C=s?f=>{const y=Qe(f);y!=null&&s(c(y))}:void 0;return S.MaskInput({...t,value:e.Value.map(n,f=>f.toString()),onChange:m,onInput:C,after:p,mask:null,allowMode:"digits",class:"bc-number-input"})},Xe=t=>{if(t==null||t==="")return null;try{return BigInt(t)}catch{return null}},Dn=t=>{const{value:n,step:a,min:r,max:l,onChange:i,onInput:s,after:u}=t,c=y=>{const g=r!=null?e.Value.get(r):void 0,w=l!=null?e.Value.get(l):void 0;return g!=null&&y<g?g:w!=null&&y>w?w:y},o=a!=null?e.Use(h.BeatUII18n,y=>{const g=e.computedOf(n,r)((d,b)=>{const x=d??0n;return b==null?!0:x>b}),w=e.computedOf(n,l)((d,b)=>{const x=d??0n;return b==null?!0:x<b}),v=(d,b)=>{const x=e.Value.get(n)??0n,I=e.Value.get(a),P=b?.shiftKey?10n:1n,k=x+I*P*d,V=r!=null?e.Value.get(r):void 0,$=l!=null?e.Value.get(l):void 0;if(d<0n&&V!=null&&k<V||d>0n&&$!=null&&k>$)return;const B=c(k);B!==x&&i&&i(B)};return D.Stack(e.attr.class("bc-number-input-steppers"),e.attr.type("button"),e.html.button(e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--increment"),e.attr.disabled(e.computedOf(w,t.disabled??!1)((d,b)=>!d||b)),e.on.click(d=>v(1n,d)),e.aria.label(y.$.incrementValue),h.Icon({icon:"line-md:plus",size:"xs"})),e.html.button(e.attr.type("button"),e.attr.class("bc-button bc-number-input-steppers-button bc-number-input-steppers-button--decrement"),e.attr.disabled(e.computedOf(g,t.disabled??!1)((d,b)=>!d||b)),e.on.click(d=>v(-1n,d)),e.aria.label(y.$.decrementValue),h.Icon({icon:"line-md:minus",size:"xs"})))}):null,p=S.NullableResetAfter(n,t.disabled,i),m=u!=null&&o!=null?e.Fragment(o,p,u):u!=null?e.Fragment(p,u):o!=null?e.Fragment(o,p):p,C=i?y=>{const g=Xe(y);i(g===null?null:c(g))}:void 0,f=s?y=>{const g=Xe(y);s(g===null?null:c(g))}:void 0;return S.MaskInput({...t,value:e.Value.map(n,y=>y==null?"":y.toString()),onChange:C,onInput:f,after:m,mask:null,allowMode:"digits",class:"bc-number-input"})},$n=t=>{const{value:n,onChange:a,onBlur:r,before:l}=t,i=e.prop(""),s=c=>{a?.(e.Value.get(n).filter(o=>o!==c))},u=()=>{const c=i.value.trim(),o=e.Value.get(n);c===""||o.includes(c)||(i.set(""),a?.([...o,c]))};return h.InputContainer({...t,before:l??h.InputIcon({icon:"tabler:tag",size:t.size,color:"neutral"}),input:e.Fragment(e.attr.class("bc-input-container__tags"),e.ForEach(n,c=>Fe({value:c,onClose:()=>s(c.value),disabled:t.disabled})),e.input.text(h.CommonInputAttributes(t),e.attr.value(i),e.attr.class("bc-input bc-input-container__tags-input"),e.on.input(e.emitValue(i.set)),a!=null?e.on.change(u):e.Empty,r!=null?e.on.blur(r):e.Empty))})};function Ve(t){return n=>{const{value:a,onBlur:r,onChange:l}=n;return S.WithTemporal(i=>h.InputContainer({...n,input:e.input[t.inputType](h.CommonInputAttributes(n),e.attr.value(e.Value.map(a,t.valueToString)),e.attr.class("bc-input"),r!=null?e.on.blur(e.emitValue(r)):e.Empty,l!=null?e.on.change(e.emitValue(s=>l(t.parseValue(i,s)))):e.Empty)}))}}function xe(t){return n=>{const{value:a,onBlur:r,onChange:l,after:i,disabled:s}=n,u=S.NullableResetAfter(a,s,l);return S.WithTemporal(c=>h.InputContainer({...n,input:e.input[t.inputType](h.CommonInputAttributes(n),e.attr.value(e.Value.map(a,o=>o==null?"":t.valueToString(o))),e.attr.class("bc-input"),r!=null?e.on.blur(e.emitValue(r)):e.Empty,l!=null?e.on.change(e.emitValue(o=>l(o===""?null:t.parseValue(c,o)))):e.Empty),after:i!=null?e.Fragment(u,i):u}))}}const Bn=Ve({inputType:"date",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainDate.from(n)}),Ln=xe({inputType:"date",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainDate.from(n)}),En=Ve({inputType:"time",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainTime.from(n)}),An=xe({inputType:"time",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainTime.from(n)}),Nn=Ve({inputType:"datetime-local",valueToString:t=>t.toJSON(),parseValue:(t,n)=>t.PlainDateTime.from(n)}),Fn=xe({inputType:"datetime-local",valueToString:t=>t.toJSON(),parseValue:(t,n)=>t.PlainDateTime.from(n)}),Mn=t=>{const n=new Date(t),a=n.getFullYear().toString().padStart(4,"0"),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0");return`${a}-${r}-${l}T${i}:${s}`},Un=t=>{const{value:n,onBlur:a,onChange:r}=t;return S.WithTemporal(l=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,i=>Mn(Number(i.epochMilliseconds)))),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(i=>r(l.Instant.from(new Date(i).toISOString())))):e.Empty)}))},Rn=t=>{const n=new Date(t),a=n.getFullYear().toString().padStart(4,"0"),r=(n.getMonth()+1).toString().padStart(2,"0"),l=n.getDate().toString().padStart(2,"0"),i=n.getHours().toString().padStart(2,"0"),s=n.getMinutes().toString().padStart(2,"0");return`${a}-${r}-${l}T${i}:${s}`},Wn=t=>{const{value:n,onBlur:a,onChange:r,after:l,disabled:i}=t,s=S.NullableResetAfter(n,i,r);return S.WithTemporal(u=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,c=>c==null?null:Rn(Number(c.epochMilliseconds)))),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(c=>r(c===""?null:u.Instant.from(new Date(c).toISOString())))):e.Empty),after:l!=null?e.Fragment(s,l):s}))},Hn=t=>{const{value:n,onBlur:a,onChange:r}=t;return S.WithTemporal(l=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,i=>i.toJSON())),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(i=>{const s=l.PlainDateTime.from(i),u=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(l.ZonedDateTime.from({...s,timeZone:u}))})):e.Empty)}))},jn=t=>{const{value:n,onBlur:a,onChange:r,after:l,disabled:i}=t,s=S.NullableResetAfter(n,i,r);return S.WithTemporal(u=>h.InputContainer({...t,input:e.input["datetime-local"](h.CommonInputAttributes(t),e.attr.value(e.Value.map(n,c=>c?.toJSON())),e.attr.class("bc-input"),a!=null?e.on.blur(e.emitValue(a)):e.Empty,r!=null?e.on.change(e.emitValue(c=>{if(c==="")return r(null);const o=u.PlainDateTime.from(c),p=e.Value.get(t.placeholder)??Intl.DateTimeFormat().resolvedOptions().timeZone;return r(u.ZonedDateTime.from({...o,timeZone:p}))})):e.Empty),after:l!=null?e.Fragment(s,l):s}))},zn=Ve({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainYearMonth.from(n)}),Gn=xe({inputType:"month",valueToString:t=>t.toString(),parseValue:(t,n)=>t.PlainYearMonth.from(n)}),Yn=t=>{const{value:n,onChange:a}=t;return S.WithTemporal(r=>S.MaskInput({...t,value:e.Value.map(n,l=>l.toString()),onChange:a!=null?l=>a(r.PlainMonthDay.from(`--${l}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD"}))},qn=t=>{const{value:n,onChange:a,after:r,disabled:l}=t,i=S.NullableResetAfter(n,l,a);return S.WithTemporal(s=>S.MaskInput({...t,value:e.Value.map(n,u=>u?.toString()??""),onChange:a!=null?u=>a(u===""?null:s.PlainMonthDay.from(`--${u}`)):void 0,onInput:void 0,mask:"99-99",placeholder:"MM-DD",after:r!=null?e.Fragment(i,r):i}))},Zn=t=>{const{value:n,onChange:a}=t;return S.WithTemporal(r=>S.MaskInput({...t,value:e.Value.map(n,l=>l.toString()),onChange:a?l=>a(r.Duration.from(l)):void 0,onInput:void 0,...S.durationMaskConfig(r.Duration.from),placeholder:"P0DT0H0M0S"}))};function Jn(t,n,a){return e.Ensure(t.signal,()=>{const r=t.transform(l=>l,l=>l);return n(r)},a)}const Kn={filling:{type:"filling"},submitting:{type:"submitting"},error:t=>({type:"error",error:t}),success:{type:"success"}};class vt extends D.Controller{constructor(n,a,r,l,i){super(n,a,r,l,i)}isValidColor=this.signal.map(S.isValidColor);isValidHex=this.signal.map(S.isValidHexColor);normalizedHex=this.signal.map(n=>S.normalizeHexColor(n)??n);setColor=n=>{if(S.isValidHexColor(n)){const a=S.normalizeHexColor(n);if(a){this.change(a);return}}this.change(n)};setHex=n=>{const a=S.normalizeHexColor(n);a&&this.change(a)};setRgb=(n,a,r)=>{const l=s=>{const u=Math.round(Math.max(0,Math.min(255,s))).toString(16);return u.length===1?"0"+u:u},i=`#${l(n)}${l(a)}${l(r)}`;this.change(i)};getRgb=()=>{const n=this.signal.value,a=S.normalizeHexColor(n);if(!a)return null;const r=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return r?{r:parseInt(r[1],16),g:parseInt(r[2],16),b:parseInt(r[3],16)}:null};withFormat=n=>{const a=l=>{switch(n){case"hex":return S.normalizeHexColor(l)??l;case"rgb":const i=this.getRgb();return i?`rgb(${i.r}, ${i.g}, ${i.b})`:l;case"hsl":return l;default:return l}},r=l=>S.normalizeHexColor(l)??l;return this.transform(a,r,[`format-${n}`])}}function Qn(t){return new vt(t.path,t.change,t.signal,t.status,{disabled:t.disabled})}function Xn(t){return{id:t.name,disabled:t.disabled,value:t.normalizedHex,hasError:t.errorVisible,onChange:t.setColor,onInput:t.setColor}}function ea({locales:t,onChange:n,updateLocale:a=!0}){return e.Use(h.BeatUII18n,r=>e.Use(h.Locale,({locale:l,setLocale:i})=>D.InputWrapper({layout:"horizontal",content:S.Group(e.attr.class("bc-group--align-center bc-group--gap-2"),h.Icon({icon:"ic:twotone-language",size:"lg",color:"neutral",title:r.$.locale}),S.NativeSelect({options:e.Value.map(t,s=>s.map(u=>{let c=u.name;return u.nativeName!=null&&u.nativeName!==u.name&&(c+=` (${u.nativeName})`),re.value(u.code,c)})),value:l,onChange:s=>{a&&i(s),n?.(s)}}))})))}const ta=()=>e.Use(h.Locale,({direction:t})=>e.Portal("body",e.attr.class(t.map(n=>`b-${n}`))));function wt(t,n,a,r,l){const i=["bc-notification"];return t&&i.push("bc-notification--bordered"),n&&i.push("bc-notification--has-icon"),a&&i.push("bc-notification--closable"),r&&i.push("bc-notification--loading"),l&&l.length>0&&i.push(l),i.join(" ")}function Ct(t,n){return[`--notification-accent-color: ${q.getColorVar(t,500)}`,`--notification-radius: ${T.getRadiusVar(n)}`].join("; ")}function St({loading:t=!1,withCloseButton:n=!1,withBorder:a=!1,color:r="primary",radius:l="md",title:i,icon:s,onClose:u,class:c}={},...o){const p=e.Value.map(s,m=>m!=null);return e.html.section(e.attr.class(e.computedOf(a,p,n,t,c)((m,C,f,y,g)=>[wt(m,C,f,y,g)].join(" "))),e.attr.style(e.computedOf(r,l)((m,C)=>Ct(m,C))),e.aria.live("polite"),e.aria.busy(t),e.When(t,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__loader"),h.Icon({icon:"line-md:loading-twotone-loop",size:"lg",color:r,accessibility:"decorative"})),()=>e.When(p,()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__icon"),h.Icon({icon:s,size:"lg",color:r})),()=>e.html.div(e.attr.class("bc-notification__visual bc-notification__accent"),e.aria.hidden(!0)))),e.html.div(e.attr.class("bc-notification__body"),i!=null?e.html.div(e.attr.class("bc-notification__title"),i):null,e.html.div(e.attr.class("bc-notification__content"),...o)),e.When(n,()=>e.html.div(e.attr.class("bc-notification__meta"),D.CloseButton({size:"sm",color:r,onClick:u}))))}class na{handles=[];attach(n){return this.detach(n),this.handles.push(n),()=>this.detach(n)}detach(n){const a=this.handles.lastIndexOf(n);a>=0&&this.handles.splice(a,1)}get current(){const n=this.handles[this.handles.length-1];if(!n)throw new Error("NotificationService: no provider attached. Ensure BeatUI includes notifications or attach the provider manually.");return n}show(n,...a){return this.current.show(n,...a)}clear(){this.current.clear()}}const Vt=new na,Ge={mark:e.makeProviderMark("NotificationProvider"),create:({position:t="bottom-end"}={})=>{const n=e.prop(0),a=[];function r(c){return a.push(c),()=>{const o=a.lastIndexOf(c);o>=0&&a.splice(o,1)}}const l=[],i=({dismissAfter:c,onClose:o,animation:p={fade:!0},...m},...C)=>{n.update(g=>g+1);const f=c!=null?typeof c=="number"?Et(c*1e3):c:void 0,y={animation:p,class:e.Value.toSignal(m.class),loading:e.Value.toSignal(m.loading??!1),withCloseButton:e.Value.toSignal(m.withCloseButton==null&&c==null?!0:m.withCloseButton??!0),withBorder:e.Value.toSignal(m.withBorder??!1),color:e.Value.toSignal(m.color??"primary"),radius:e.Value.toSignal(m.radius??"md"),title:m.title??e.Empty,icon:e.Value.toSignal(m.icon),children:C,listenRequestClose:g=>(l.push(g),o?.(),()=>{}),delayedClose:f};a.forEach(g=>g(y))},s=()=>{l.forEach(c=>c()),l.length=0},u=Vt.attach({show:i,clear:s});return{value:{activeNotifications:n,show:i,clear:s,position:t,listenOnShow:r},dispose:()=>{u(),s()}}}};function xt(){return e.Use(Ge,({listenOnShow:t,position:n})=>e.html.div(e.attr.class("bc-notification-viewport"),e.attr.class(`bc-notification-viewport--${n}`),e.WithBrowserCtx(a=>e.OnDispose(t(r=>{const l=[],i=e.html.div(H.AnimatedToggle({animation:r.animation,initialStatus:"start-opening"},({close:s,listenOnClosed:u})=>(r.delayedClose?.finally(s),u(()=>{l.forEach(c=>c())}),St({class:r.class,loading:r.loading,withCloseButton:r.withCloseButton,withBorder:r.withBorder,color:r.color,radius:r.radius,title:r.title,icon:r.icon,onClose:s},...r.children))));l.push(e.renderWithContext(i,a))})))))}function aa({includeAuthI18n:t=!1,enableAppearance:n=!0,defaultAppearance:a="system",appearancePreferenceKey:r="bui-appearance",includeNotifications:l=!0,notificationPosition:i="bottom-end"},...s){return e.WithProvider(({set:u,use:c})=>{u(Z.Location,{}),u(h.Locale,{}),u(h.BeatUII18n,{}),u(ge.Theme,{defaultAppearance:n?a:"light",appearancePreferenceKey:r}),l&&u(Ge,{position:i}),Z.NavigationService.attach(c(Z.Location));const o=e.Fragment(n?ge.ThemeAppearance():e.Empty,ta(),l?xt():e.Empty,...s);return t?e.Task(()=>Promise.resolve().then(()=>require("./translations-BRRDPpLp.cjs")),({AuthI18n:p})=>e.Provide(p,{},()=>o)):o})}function ra({content:t,toolbar:n=!0,page:a,zoom:r,view:l,pagemode:i,scrollbar:s=!0,navpanes:u=!0,search:c,nameddest:o,viewrect:p,highlight:m,allowfullscreen:C=!1}){const f=e.Value.toSignal(t).mapAsync(async g=>{if(g instanceof Blob){const w=await g.arrayBuffer(),v=new Blob([w],{type:"application/pdf"});return URL.createObjectURL(v)}else{if(g instanceof ArrayBuffer)return URL.createObjectURL(new Blob([g],{type:"application/pdf"}));if(g instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(g)],{type:"application/pdf"}));if(typeof g=="string"){const v=await(await fetch(g)).arrayBuffer(),d=new Blob([v],{type:"application/pdf"});return URL.createObjectURL(d)}}},null),y=e.computedOf(f,n,a,r,l,i,s,u,c,o,p,m)((g,w,v,d,b,x,I,P,k,V,$,B)=>{if(g==null)return null;const A=[];w===!1&&A.push("toolbar=0"),v!=null&&v>0&&A.push(`page=${v}`),d!=null&&d>0&&A.push(`zoom=${d}`),b!=null&&A.push(`view=${b}`),x!=null&&A.push(`pagemode=${x}`),I===!1&&A.push("scrollbar=0"),P===!1&&A.push("navpanes=0"),k!=null&&A.push(`search=${encodeURIComponent(k)}`),V!=null&&A.push(`nameddest=${encodeURIComponent(V)}`),$!=null&&A.push(`viewrect=${encodeURIComponent($)}`),B!=null&&A.push(`highlight=${encodeURIComponent(B)}`);const F=A.join("&");return F?`${g}#${F}`:g});return f.on((g,w)=>{w!=null&&URL.revokeObjectURL(w)}),e.html.div(e.OnDispose(()=>{const g=f.value;g!=null&&URL.revokeObjectURL(g)}),e.attr.class("h-full w-full"),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(C),e.attr.title("PDF Preview"),e.attr.loading("lazy"),e.WithElement(g=>{const w=g;let v=!0;return y.on(d=>{d!=null&&(v?(w.src=d,v=!1):(w.src="about:blank",setTimeout(()=>{w.src=d},50)))}),e.Empty})))}function la({content:t,page:n,zoom:a,pagemode:r,nameddest:l,search:i,textLayerMode:s,sidebarViewOnLoad:u,scrollModeOnLoad:c,spreadModeOnLoad:o,enableScripting:p,enablePrinting:m,viewerUrl:C=null,allowfullscreen:f=!0,class:y=null}){const g=e.Value.toSignal(t).mapAsync(async v=>{if(v instanceof Blob)return URL.createObjectURL(v);if(v instanceof ArrayBuffer)return URL.createObjectURL(new Blob([v],{type:"application/pdf"}));if(v instanceof Uint8Array)return URL.createObjectURL(new Blob([new Uint8Array(v)],{type:"application/pdf"}));if(typeof v=="string")return v},null),w=e.computedOf(g,C,n,a,r,l,i,s,u,c,o,p,m)((v,d,b,x,I,P,k,V,$,B,A,F,R)=>{if(v==null)return null;const j=d??"https://mozilla.github.io/pdf.js/web/viewer.html",E=new URLSearchParams;E.set("file",encodeURIComponent(v));const z=[];b!=null&&b>0&&z.push(`page=${b}`),x!=null&&(typeof x=="string"?z.push(`zoom=${x}`):z.push(`zoom=${x}`)),I!=null&&z.push(`pagemode=${I}`),P!=null&&z.push(`nameddest=${encodeURIComponent(P)}`),k!=null&&z.push(`search=${encodeURIComponent(k)}`),V!=null&&z.push(`textLayer=${V}`),$!=null&&z.push(`sidebar=${$}`),B!=null&&z.push(`scrollMode=${B}`),A!=null&&z.push(`spreadMode=${A}`),F!=null&&z.push(`enableScripting=${F?"1":"0"}`),R!=null&&z.push(`enablePrinting=${R?"1":"0"}`);const X=z.length>0?`#${z.join("&")}`:"";return`${j}?${E.toString()}${X}`});return g.on((v,d)=>{d!=null&&d.startsWith("blob:")&&URL.revokeObjectURL(d)}),e.html.div(e.OnDispose(()=>{const v=g.value;v!=null&&v.startsWith("blob:")&&URL.revokeObjectURL(v)}),e.attr.class("bc-pdfjs-preview h-full w-full"),e.attr.class(y),e.html.iframe(e.attr.class("h-full w-full"),e.attr.allowfullscreen(f),e.attr.title("PDF Preview"),e.attr.loading("lazy"),e.attr.src(w)))}const oa=({id:t,css:n})=>e.Portal("head",e.html.style(e.attr.id(t),e.attr.innerHTML(n)));function te(t,n){return n==null?null:e.html.meta(e.attr.name(t),e.attr.content(e.Value.map(n,a=>String(a))))}function W(t,n){return n==null?null:e.html.meta(e.attr.property(t),e.attr.content(e.Value.map(n,a=>String(a))))}function Se(t,n){return n==null?null:e.ForEach(n,a=>W(t,a))}function ia(t,n){return n==null?null:e.When(e.Value.map(n,a=>Array.isArray(a)),()=>Se(t,n),()=>W(t,n))}const sa=t=>{const n=[];if(n.push(W("og:title",t.title)),n.push(W("og:type",t.type)),n.push(W("og:url",t.url)),n.push(W("og:image",t.image)),n.push(W("og:description",t.description)),n.push(W("og:site_name",t.siteName)),n.push(W("og:locale",t.locale)),t.localeAlternate!=null){const a=Se("og:locale:alternate",t.localeAlternate);a!=null&&n.push(a)}if(n.push(W("og:image:alt",t.imageAlt)),n.push(W("og:image:width",t.imageWidth)),n.push(W("og:image:height",t.imageHeight)),n.push(W("og:image:type",t.imageType)),t.images!=null){const a=Se("og:image",t.images);a!=null&&n.push(a)}if(n.push(W("og:video",t.video)),n.push(W("og:video:type",t.videoType)),n.push(W("og:video:width",t.videoWidth)),n.push(W("og:video:height",t.videoHeight)),n.push(W("og:video:secure_url",t.videoSecureUrl)),n.push(W("og:audio",t.audio)),n.push(W("og:audio:type",t.audioType)),n.push(W("og:audio:secure_url",t.audioSecureUrl)),n.push(W("article:published_time",t.publishedTime)),n.push(W("article:modified_time",t.modifiedTime)),n.push(W("article:expiration_time",t.expirationTime)),n.push(ia("article:author",t.author)),n.push(W("article:section",t.section)),t.tags!=null){const a=Se("article:tag",t.tags);a!=null&&n.push(a)}return n.push(W("profile:first_name",t.firstName)),n.push(W("profile:last_name",t.lastName)),n.push(W("profile:username",t.username)),n.push(W("profile:gender",t.gender)),n.push(te("twitter:card",t.twitterCard)),n.push(te("twitter:site",t.twitterSite)),n.push(te("twitter:creator",t.twitterCreator)),n.push(te("twitter:title",e.coalesce(t.twitterTitle,t.title))),n.push(te("twitter:description",e.coalesce(t.twitterDescription,t.description))),n.push(te("twitter:image",e.coalesce(t.twitterImage,t.image))),n.push(te("twitter:image:alt",e.coalesce(t.twitterImageAlt,t.imageAlt))),t.canonical!=null&&e.Value.get(t.canonical)!=null&&n.push(e.html.link(e.attr.rel("canonical"),e.attr.href(t.canonical))),n.push(te("robots",t.robots)),n.push(te("keywords",t.keywords)),n.push(te("author",t.metaAuthor)),e.Portal("head",n.filter(a=>a!=null).flat())},Ye=({viewTransition:t,state:n,scroll:a,replace:r})=>{const l={};return n!==void 0&&(l.state=n),a!==void 0&&(l.scroll=a),r!==void 0&&(l.replace=r),t!==void 0&&(l.viewTransition=t),l};function Ee(t,n){const a=["bc-link"];if(n)a.push("bc-link--disabled");else switch(t){case"plain":a.push("bc-link--plain");break;case"hover":a.push("bc-link--hover");break;case"default":default:a.push("bc-link--default");break}return a.join(" ")}function Ae(t){const n=h.textColorValue(t,"light"),a=h.textColorValue(t,"dark");return[`--link-color: ${n}`,`--link-color-dark: ${a}`,`--link-hover-color: ${n}`,`--link-hover-color-dark: ${a}`].join("; ")}function kt({href:t,variant:n="default",color:a="primary",colorDisabled:r="base",disabled:l=!1,viewTransition:i=!0,state:s,scroll:u,replace:c,target:o,rel:p},...m){return e.When(l,()=>e.html.span(e.attr.class(e.computedOf(n,l)((C,f)=>Ee(C,f))),e.attr.style(e.computedOf(r)(C=>Ae(C??"base"))),...m),()=>Z.Anchor({href:t,...Ye({viewTransition:i,state:s,scroll:u,replace:c})},e.attr.class(e.computedOf(n,l)((C,f)=>Ee(C,f))),e.attr.style(e.computedOf(a)(C=>Ae(C??"primary"))),o?e.attr.target(o):null,p?e.attr.rel(p):null,...m))}const ua=t=>t?t.startsWith("#")?t:`#${t}`:"",ca=t=>{if(!t)return new URLSearchParams;if(typeof t=="string"){const n=t.startsWith("?")?t.slice(1):t;return new URLSearchParams(n)}return t instanceof URLSearchParams?new URLSearchParams(t):new URLSearchParams(t)};function It(t,n,a){const r=ca(t.search),l=r.toString(),i=l?`?${l}`:"",s=ua(t.hash);switch(a){case"exact":return t.pathname+i+s===n;case"prefix":return t.pathname.startsWith(n)||(t.pathname+i).startsWith(n);case"params":try{const u=typeof document<"u"&&document.baseURI?document.baseURI:"http://localhost/",c=new URL(n,u);if(t.pathname!==c.pathname)return!1;const o=Array.from(new URLSearchParams(c.search).entries()).sort(),p=Array.from(r.entries()).sort();return o.length!==p.length?!1:o.every(([m,C],f)=>{const[y,g]=p[f];return m===y&&C===g})}catch{return t.pathname===n}default:return!1}}function ke(t,n){return n==="exact"?e.computedOf(t)(a=>a):e.computedOf(t)(a=>r=>It(r,a,n))}function da({href:t,matchMode:n="exact",disableWhenActive:a=!0,...r},...l){return e.Use(Z.Location,i=>{const s=i.matchSignal(ke(t,n)),u=e.computedOf(s,a)((c,o)=>o??!0?c:!1);return kt({...r,href:t,disabled:u},...l)})}function pa({href:t,viewTransition:n=!0,state:a,scroll:r,replace:l,target:i,rel:s,matchMode:u,disableWhenActive:c,variant:o="filled",size:p="md",color:m="base",roundedness:C="sm",disabled:f=!1},...y){return u!==void 0||c!==void 0?e.Use(Z.Location,g=>{const w=u!==void 0?g.matchSignal(ke(t,u)):e.computedOf(g.location)(()=>!1),v=e.computedOf(w,c)((b,x)=>!(x??!0)||!u?!1:b),d=e.computedOf(f,v)((b,x)=>b||x);return et({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:o,size:p,color:m,roundedness:C,disabled:d},...y)}):et({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:o,size:p,color:m,roundedness:C,disabled:f},...y)}function et({href:t,viewTransition:n,state:a,scroll:r,replace:l,target:i,rel:s,variant:u="default",size:c="md",color:o="base",roundedness:p="sm",disabled:m=!1,fullWidth:C=!1,loading:f=!1},...y){return e.When(m??!1,()=>e.html.span(e.attr.class(e.computedOf(c,p,f,C)(h.generateButtonClasses)),e.attr.style(e.computedOf(u,o,m)((g,w,v)=>h.generateButtonStyles(g??"filled",w??"base",v))),...y),()=>Z.Anchor({href:t,...Ye({viewTransition:n,state:a,scroll:r,replace:l})},e.attr.class(e.computedOf(c,p,f,C)(h.generateButtonClasses)),e.attr.style(e.computedOf(u,o,m)((g,w,v)=>h.generateButtonStyles(g??"filled",w??"base",v))),i?e.attr.target(i):null,s?e.attr.rel(s):null,...y))}const Tt={mark:e.makeProviderMark("SidebarContext"),create:t=>({value:{backgroundMode:"light"},dispose:()=>{}})};function ma({backgroundMode:t="light"},...n){return e.Provide(Tt,e.Value.map(t,a=>({backgroundMode:a})),()=>e.html.div(e.attr.class("bc-sidebar"),e.attr.class(e.Value.map(t,a=>a==="dark"?"bc-sidebar--dark-bg":"")),...n))}function Ne({rail:t,header:n},...a){return D.Stack(n!=null?e.html.div(e.attr.class("bc-sidebar-group__header"),n):null,e.html.div(e.attr.class(e.Value.map(t??!1,r=>r?"bc-sidebar-group--rail":"")),e.attr.class("bc-sidebar-group"),...a))}function Ot(t,...n){const a=Ye({viewTransition:t.viewTransition??!0,state:t.state,scroll:t.scroll,replace:t.replace});return Z.Anchor({href:t.href,...a},...n)}function Pt(...t){return e.html.span(...t)}function _t(t,...n){return e.html.button(e.attr.type("button"),e.on.click(t.onClick),t.ariaExpanded!=null?e.aria.expanded(e.Value.map(t.ariaExpanded,a=>a)):null,t.ariaControls!=null?e.aria.controls(t.ariaControls):null,t.ariaLabel!=null?e.aria.label(t.ariaLabel):null,...n)}function Dt(t){const n=[e.attr.class("bc-sidebar-link")];return t.icon!=null&&n.push(e.html.span(e.attr.class("bc-sidebar-link--icon"),h.Icon({icon:t.icon}))),n.push(e.html.span(e.attr.class("bc-sidebar-link__content"),t.content)),t.right!=null&&n.push(e.html.span(e.attr.class("bc-sidebar-link__right"),t.right)),t.action!=null&&n.push(e.html.button(e.attr.type("button"),e.attr.class("bc-sidebar-link--action"),e.on.click((a,r)=>{t.action?.onClick?.(r)}),h.Icon({icon:t.action?.icon}))),"onClick"in t?_t(t,...n):e.Use(Z.Location,a=>{const r=a.matchSignal(ke(t.href,"exact"),{includeSearch:!1,includeHash:!1});return e.When(r,()=>Pt(...n),()=>Ot(t,...n))})}function fa({rail:t=!0,icon:n,header:a,startOpen:r=!0},...l){const i=e.Value.deriveProp(r),s=D.sessionId("sidebar-group"),u=`${s}-content`;return Ne({},e.attr.class("bc-sidebar-group-collapsible"),e.attr.class(i.map(c=>c?"bc-sidebar-group-collapsible--open":"bc-sidebar-group-collapsible--closed")),e.attr.role("group"),e.attr.id(s),Dt({icon:n,onClick:()=>i.update(c=>!c),ariaExpanded:i,ariaControls:u,right:e.html.span(e.attr.class("bc-sidebar-group-collapsible-indicator"),h.Icon({icon:"lucide:chevron-down",color:"base"})),content:a}),Ne({rail:t},e.attr.id(u),it({open:i},...l)))}function ga(){return e.html.hr(e.attr.class("bc-sidebar-separator"))}function ba(t,n,a,r){const l=["bc-tabs",`bc-tabs--${t}`,`bc-tabs--${n}`];return a&&l.push("bc-tabs--disabled"),r!=null&&r!=="default"&&l.push(`bc-tabs--variant-${r}`),l.join(" ")}function ha(t,n){if(t!=="filled")return"";const a=new Map,r=h.backgroundValue(n,"solid","light"),l=h.backgroundValue(n,"solid","dark");a.set("--tabs-filled-inactive-bg",r.backgroundColor),a.set("--tabs-filled-inactive-text","var(--color-white)");const i=h.hoverBackgroundValue(n,"solid","light");a.set("--tabs-filled-inactive-bg-hover",i.backgroundColor);const s=h.hoverBackgroundValue(n,"solid","dark");a.set("--tabs-filled-inactive-bg-dark-hover",s.backgroundColor),a.set("--tabs-filled-inactive-bg-dark",l.backgroundColor),a.set("--tabs-filled-inactive-text-dark",l.textColor),a.set("--tabs-filled-active-bg","var(--color-white)"),a.set("--tabs-filled-active-text","var(--color-base-800)"),a.set("--tabs-filled-active-bg-dark","var(--color-base-900)");const u=n==="white"||n==="black"||n==="transparent"?"var(--color-white)":q.getColorVar(n,400);return a.set("--tabs-filled-active-text-dark",u),Array.from(a.entries()).map(([c,o])=>`${c}: ${o}`).join("; ")}function ya(t,n,a){const r=["bc-tab",`bc-tab--${t}`];return n&&r.push("bc-tab--active"),a&&r.push("bc-tab--disabled"),r.join(" ")}function we(t,n,a){const r=n.length;let l=t+a;l>=r?l=0:l<0&&(l=r-1);let i=0;for(;i<r;){const s=n[l];if(!e.Value.get(s.disabled??!1))return l;l+=a,l>=r?l=0:l<0&&(l=r-1),i++}return t}function va(t){const{items:n,value:a,onChange:r,size:l="md",variant:i="default",color:s="primary",disabled:u=!1,orientation:c="horizontal",showContent:o=!0,ariaLabel:p}=t,m=D.sessionId("tablist"),C=e.prop(-1),f=e.computedOf(a)(g=>n.find(w=>w.key===g)),y=g=>{if(e.Value.get(u))return;const v=C.value,d=e.Value.get(c)==="horizontal";let b=v;switch(g.key){case(d?"ArrowRight":"ArrowDown"):g.preventDefault(),b=we(v,n,1);break;case(d?"ArrowLeft":"ArrowUp"):g.preventDefault(),b=we(v,n,-1);break;case"Home":g.preventDefault(),b=we(-1,n,1);break;case"End":g.preventDefault(),b=we(n.length,n,-1);break;case"Enter":case" ":if(g.preventDefault(),v>=0&&v<n.length){const x=n[v];e.Value.get(x.disabled??!1)||r?.(x.key)}break}b!==v&&b>=0&&b<n.length&&(C.set(b),setTimeout(()=>{const x=document.querySelector(`[data-tab-index="${b}"]`);x&&x.focus()},0))};return e.html.div(e.attr.class(e.computedOf(l,c,u,i)((g,w,v,d)=>ba(g??"md",w??"horizontal",v??!1,d??"default"))),e.attr.style(e.computedOf(i,s)((g,w)=>ha(g??"default",w??"primary"))),e.html.div(e.attr.class("bc-tabs__list"),e.attr.role("tablist"),e.attr.id(m),e.aria.orientation(c??"horizontal"),p?e.aria.label(p):e.Fragment(),e.on.keydown(y),...n.map((g,w)=>{const v=e.computedOf(a)(I=>I===g.key),d=e.computedOf(u,g.disabled)((I,P)=>I||P),b=`${m}-tab-${g.key}`,x=`${m}-panel-${g.key}`;return e.html.button(e.attr.type("button"),e.attr.class(e.computedOf(l,v,d)((I,P,k)=>ya(I??"md",P??!1,k??!1))),e.attr.id(b),e.attr.role("tab"),e.attr.tabindex(e.computedOf(v,C)((I,P)=>I||P===w?0:-1)),e.aria.selected(v),e.aria.controls(x),e.aria.disabled(d),e.attr.disabled(d),e.dataAttr["tab-index"](String(w)),g.ariaLabel?e.aria.label(g.ariaLabel):e.Fragment(),e.on.click(I=>{I.preventDefault(),e.Value.get(g.disabled??!1)||e.Value.get(u)||(r?.(g.key),C.set(w))}),e.on.focus(()=>{C.set(w)}),g.label)})),e.When(o??!0,()=>e.Ensure(f,g=>{const w=g.$.key,v=w.map(b=>`${m}-tab-${b}`),d=w.map(b=>`${m}-panel-${b}`);return e.html.div(e.attr.class("bc-tabs__panels"),e.html.div(e.attr.class("bc-tabs__panel"),e.attr.id(d),e.attr.role("tabpanel"),e.attr.tabindex(0),e.aria.labelledby(v),e.MapSignal(g,b=>b.content())))})))}function wa(t){return H.Overlay((n,a)=>{let r=a;const l=()=>r();return t(u=>{const{size:c="md",side:o="right",dismissable:p=!0,showCloseButton:m=!0,onClose:C,overlayEffect:f="opaque",container:y="body",header:g,body:w,footer:v}=u;r=a;const d=e.prop("capturing");e.Value.on(p,I=>{d.set(I?"capturing":"non-capturing")});const b=e.computedOf(g!=null,m)((I,P)=>I||P),x=e.WithElement(I=>{const P=H.useAnimatedElementToggle({initialStatus:"closed",element:I});P.listenOnClosed(()=>{a()}),r=()=>{P.close()},pe.g(()=>P.open());const V=D.sessionId("drawer"),$=g!=null?`${V}-header`:void 0,B=`${V}-body`;return e.html.div(e.attr.class(e.computedOf(c,o,P.status)((A,F,R)=>`bc-drawer bc-drawer--size-${A} bc-drawer--container-${y} bc-drawer--side-${F} bc-drawer--status-${R}`)),e.attr.role("dialog"),e.aria.modal(!0),...$?[e.aria.labelledby($)]:[],e.aria.describedby(B),e.attr.tabindex(-1),e.attr.id(V),e.dataAttr.focusTrap("true"),H.FocusTrap({active:!0,escapeDeactivates:!1,initialFocus:()=>document.querySelector(`#${V} [aria-label="Close drawer"]`)||null}),e.on.mousedown(A=>A.stopPropagation()),e.MapSignal(b,A=>Le(A?{header:e.html.div(e.attr.class("bc-drawer__header"),e.html.div(e.attr.id($),g),e.When(m,()=>e.Use(h.BeatUII18n,F=>D.CloseButton({size:"sm",onClick:l,label:F.$.closeDrawer})))),body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(B),w),footer:v&&e.html.div(e.attr.class("bc-drawer__footer"),v)}:{body:e.html.div(e.attr.class("bc-drawer__body"),e.attr.id(B),w),footer:v&&e.html.div(e.attr.class("bc-drawer__footer"),v)})))});n({mode:d,effect:f??"opaque",container:y,content:x,onClickOutside:()=>{C?.(),l()},onEscape:()=>{C?.(),l()}})},()=>{l()})})}function Ca(t){const n={up:"M0 16 L8 10 L16 16 Z",down:"M0 0 L8 6 L16 0 Z",left:"M16 0 L10 8 L16 16 Z",right:"M0 0 L6 8 L0 16 Z"};return e.svg.svg(e.svgAttr.viewBox("0 0 16 16"),e.svg.path(e.svgAttr.d(t.map(a=>n[a]))))}function Sa(t){const{content:n,placement:a="top",showDelay:r=250,hideDelay:l=500,mainAxisOffset:i=8,crossAxisOffset:s=0,showOn:u="hover-focus"}=t,c=D.sessionId("tooltip");return e.Fragment(e.aria.describedby(c),he({content:()=>e.Fragment(e.attr.class("bc-tooltip"),e.attr.role("tooltip"),e.attr.id(c),n),placement:a,showDelay:r,hideDelay:l,mainAxisOffset:i,crossAxisOffset:s,showOn:u,closable:!0,role:"tooltip",arrow:o=>{const p=o.map(({placement:m})=>m.includes("top")?"down":m.includes("bottom")?"up":m.includes("left")?"right":m.includes("right")?"left":"up");return e.Fragment(e.attr.class("bc-tooltip__arrow"),e.attr.class(p.map(m=>`bc-tooltip__arrow-${m}`)),e.style.transform(o.map(({x:m,y:C})=>m==null&&C==null?"":m!=null?`translate(${m}px, 0)`:`translate(0, ${C}px)`)),Ca(p))}}))}function Va(t,n,a,r,l,i){const s=h.backgroundValue(t,"solid","light"),u=h.backgroundValue(t,"solid","dark");return[`--ribbon-bg: ${s.backgroundColor}`,`--ribbon-text: ${s.textColor}`,`--ribbon-bg-dark: ${u.backgroundColor}`,`--ribbon-text-dark: ${u.textColor}`,`--ribbon-inset: ${De(n)}`,`--ribbon-offset: ${De(a)}`,`--ribbon-width: ${De(r)}`,`--ribbon-angle: ${l}deg`,`--ribbon-corner: ${i}`].join("; ")}function De(t){return t==null?null:typeof t=="number"?`${t}px`:t}function xa({color:t="primary",class:n,inset:a=0,offset:r=40,width:l=100,angle:i=45,corner:s="top-end"},...u){return e.html.div(e.attr.class("bc-ribbon"),e.attr.style(e.computedOf(t,a,r,l,i,s)(Va)),e.attr.class(n),...u)}function ka(t,n){const{dismissable:a=!0,showCloseButton:r=!0,overlayEffect:l="opaque",container:i="body",padding:s=32}=t;return H.Overlay((u,c)=>{let o=()=>{};return n(C=>{o=c;const f=e.prop(typeof a!="boolean"||a?"capturing":"non-capturing");let y=typeof a=="boolean"?a:!0;e.Value.on(a,w=>{y=w,f.set(w?"capturing":"non-capturing")});const g=e.html.div(e.attr.class("bc-lightbox"),e.When(r,()=>e.Use(h.BeatUII18n,w=>e.html.div(e.attr.class("bc-lightbox__close"),D.CloseButton({size:"md",label:w.$.closeModal,onClick:()=>{o(),c()}}))),()=>null),e.html.div(e.attr.class("bc-lightbox__viewport"),e.attr.style(e.computedOf(s)(w=>`padding:${typeof w=="number"?w+"px":w}`)),e.html.div(e.attr.class("bc-lightbox__content"),C)));u({mode:f,effect:l??"opaque",container:i,content:g,onClickOutside:()=>{y&&(o(),c())},onEscape:()=>{y&&(o(),c())}})},()=>{o(),c()})})}function Ia(t,n){const a=["bc-announcement-bar"];return t&&a.push("bc-announcement-bar--dismissible"),n&&n.length>0&&a.push(n),a.join(" ")}function Ta(t){return`--announcement-bar-bg-color: ${q.getColorVar(t,600)}`}function Oa({color:t="primary",icon:n,closable:a=!1,onDismiss:r,class:l},...i){const s=e.prop(!0);return e.When(s,()=>{const u=e.Value.map(a,c=>!!c||r!=null);return e.html.div(e.attr.class(e.computedOf(u,l)((c,o)=>Ia(c,o))),e.attr.style(e.Value.map(t,c=>Ta(c))),e.html.div(e.attr.class("bc-announcement-bar__content"),e.When(e.Value.map(n,c=>c!=null),()=>e.html.div(e.attr.class("bc-announcement-bar__icon"),h.Icon({icon:n,size:"sm",accessibility:"decorative"}))),e.html.div(e.attr.class("bc-announcement-bar__text"),...i),e.When(u,()=>e.html.div(e.attr.class("bc-announcement-bar__close"),D.CloseButton({size:"xs",color:"white",onClick:()=>{s.set(!1),r?.()}})))))})}function Pa(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\//i.test(t)}let Ce=null;function _a(){return typeof window<"u"&&window.YT?.Player?Promise.resolve(window.YT):Ce||(Ce=new Promise(t=>{const n=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{n?.(),t(window.YT)};const a=document.createElement("script");a.src="https://www.youtube.com/iframe_api",a.async=!0,document.head.appendChild(a)}),Ce)}function Da(t){const{url:n,playing:a=!1,loop:r=!1,controls:l=!1,volume:i=1,muted:s=!1,playbackRate:u=1,pip:c=!1,playsinline:o=!0,width:p,height:m,progressInterval:C=1e3,seekTo:f,config:y,onReady:g,onStart:w,onPlay:v,onPause:d,onBuffer:b,onBufferEnd:x,onEnded:I,onError:P,onDuration:k,onSeek:V,onProgress:$,onPlaybackRateChange:B,onPlaybackQualityChange:A}=t;function F(O){return/\.m3u8(\?|$)/i.test(O)}function R(O){try{const L=O.canPlayType("application/vnd.apple.mpegurl");return L==="probably"||L==="maybe"}catch{return!1}}const j=e.prop("file");let E=null,z=null,X=null;function K(){try{X?.destroy()}catch{}X=null}const J=[];J.push(e.Value.on(n,O=>{typeof O=="string"&&O.length>0&&Pa(O)?j.value="youtube":(j.value="file",E&&le())}));async function le(){const O=E;if(!O)return;const L=e.Value.get(n);if(typeof L!="string"||L.length===0)return;K();const M=y?.file?.forceHLS??!1;if(F(L)||M){if(R(O)){O.setAttribute("src",L);try{O.load()}catch{}return}if(typeof window>"u")return;try{const G=await Promise.resolve().then(()=>require("./hls.light.min-D3hUMpII.cjs")).then(oe=>oe.hls_light_min),fe=G;let ce=fe.default??fe.Hls??G;for(let oe=0;oe<3&&(typeof ce=="object"&&ce!=null&&"default"in ce);oe++)ce=ce.default;if(typeof ce=="function"){const oe=ce;if(typeof oe.isSupported=="function"&&oe.isSupported()){O.removeAttribute("src");try{O.load()}catch{}const Te=new oe(y?.hls);X=Te,Te.attachMedia(O),Te.loadSource(L)}else{O.setAttribute("src",L);try{O.load()}catch{}}}else{O.setAttribute("src",L);try{O.load()}catch{}}}catch(G){P?.(G),O.setAttribute("src",L);try{O.load()}catch{}}return}O.setAttribute("src",L);try{O.load()}catch{}}function me(){z?.();const O=e.Value.get(C)??1e3;z=pe.x(()=>{const L=E;if(!L)return;const M=L.duration||0,G=L.currentTime||0,fe=L.buffered?.length?L.buffered.end(L.buffered.length-1):0;$?.({played:M>0?G/M:0,playedSeconds:G,loaded:M>0?Math.min(fe,M)/M:0,loadedSeconds:Math.min(fe,M)})},O)}function ae(O){if(O!=null)return typeof O=="number"?`${O}px`:O}const ye=e.html.video(e.WithElement(O=>{E=O,g?.();try{E.playbackRate=e.Value.get(u)??1}catch{}E.muted=!!(e.Value.get(s)??!1),E.loop=!!(e.Value.get(r)??!1),E.controls=!!(e.Value.get(l)??!1),E.playsInline!=null&&(!!(e.Value.get(o)??!0)?E.setAttribute("playsinline",""):E.removeAttribute("playsinline")),e.Value.get(a)&&(E.play?.().catch(()=>{}),w?.());try{const L=!!(e.Value.get(c)??!1),M=document,G=E;L?typeof G.requestPictureInPicture=="function"&&M.pictureInPictureElement!==E&&G.requestPictureInPicture().catch(()=>{}):M.pictureInPictureElement===E&&typeof M.exitPictureInPicture=="function"&&M.exitPictureInPicture().catch(()=>{})}catch{}me(),le()}),e.style.width(e.Value.map(p,ae)),e.style.height(e.Value.map(m,ae)),e.on.play(()=>v?.()),e.on.playing(()=>{w?.(),x?.()}),e.on.pause(()=>d?.()),e.on.waiting(()=>b?.()),e.on.canplay(()=>{const O=E?.duration;O!=null&&Number.isFinite(O)&&k?.(O)}),e.on.ended(()=>I?.()),e.on.error(O=>{X||P?.(O)}));let de=null,U=null,se=null;function ue(){const O=e.Value.get(n);!de||typeof O!="string"||_a().then(L=>{const M=$t(O);if(M){if(U){U.loadVideoById({videoId:M});return}U=new L.Player(de,{videoId:M,playerVars:$a(t),events:{onReady:()=>{g?.(),_(),e.Value.get(a)&&w?.(),Ie()},onStateChange:G=>{switch(G.data){case L.PlayerState.PLAYING:v?.(),x?.();break;case L.PlayerState.PAUSED:d?.();break;case L.PlayerState.BUFFERING:b?.();break;case L.PlayerState.ENDED:I?.();break}},onError:G=>P?.(G),onPlaybackRateChange:G=>B?.(G.data),onPlaybackQualityChange:G=>A?.(G.data)}})}})}function Ie(){se?.();const O=e.Value.get(C)??1e3;se=pe.x(()=>{if(!U)return;const L=U.getDuration?.()??0,M=U.getCurrentTime?.()??0,G=U.getVideoLoadedFraction?.()??0;$?.({played:L>0?M/L:0,playedSeconds:M,loaded:G,loadedSeconds:G*L})},O)}function _(){if(!U)return;try{const M=e.Value.get(u)??1;U.setPlaybackRate?.(M)}catch{}try{const M=Math.round(Math.min(Math.max(e.Value.get(i)??1,0),1)*100);U.setVolume?.(M)}catch{}try{e.Value.get(s)??!1?U.mute?.():U.unMute?.()}catch{}e.Value.get(a)??!1?U.playVideo?.():U.pauseVideo?.();const L=e.Value.get(f);typeof L=="number"&&Number.isFinite(L)&&(U.seekTo?.(L,!0),V?.(L))}const N=e.html.div(e.WithElement(O=>{de=O,ue(),g?.()}));J.push(e.Value.on(n,()=>{j.value==="youtube"&&ue()})),J.push(e.Value.on(a,()=>{j.value==="file"&&E?e.Value.get(a)?E.play?.().catch(()=>{}):E.pause?.():j.value==="youtube"&&U&&(e.Value.get(a)?U.playVideo?.():U.pauseVideo?.())})),J.push(e.Value.on(i,()=>{if(j.value==="file"&&E)E.volume=Math.min(Math.max(e.Value.get(i)??1,0),1);else if(j.value==="youtube"&&U){const O=Math.round(Math.min(Math.max(e.Value.get(i)??1,0),1)*100);U.setVolume?.(O)}})),J.push(e.Value.on(s,()=>{j.value==="file"&&E?E.muted=!!e.Value.get(s):j.value==="youtube"&&U&&(e.Value.get(s)?U.mute?.():U.unMute?.())})),J.push(e.Value.on(u,()=>{if(j.value==="file"&&E)try{E.playbackRate=e.Value.get(u)??1}catch{}else j.value==="youtube"&&U&&U.setPlaybackRate?.(e.Value.get(u)??1)})),J.push(e.Value.on(c,async()=>{if(!(j.value!=="file"||!E))try{const O=!!(e.Value.get(c)??!1),L=document,M=E;O?typeof M.requestPictureInPicture=="function"&&L.pictureInPictureElement!==E&&await M.requestPictureInPicture()?.catch(()=>{}):L.pictureInPictureElement===E&&typeof L.exitPictureInPicture=="function"&&await L.exitPictureInPicture()?.catch(()=>{})}catch{}})),J.push(e.Value.on(f??null,()=>{const O=e.Value.get(f);if(O!=null)if(j.value==="file"&&E)try{E.currentTime=O,V?.(O)}catch{}else j.value==="youtube"&&U&&(U.seekTo?.(O,!0),V?.(O))}));const Y=e.html.div(e.attr.class("bc-base-video"),e.style.width(e.Value.map(p,ae)),e.style.height(e.Value.map(m,ae)),e.When(e.Value.map(j,O=>O==="youtube"),()=>N,()=>ye));return e.Fragment(e.OnDispose(...J),Y)}function $t(t){const n=/[?&]v=([^&#]+)/.exec(t);if(n)return n[1];const a=/youtu\.be\/([^?&#]+)/.exec(t);if(a)return a[1];const r=/youtube\.com\/embed\/([^?&#]+)/.exec(t);return r?r[1]:null}function $a(t){const n={autoplay:e.Value.get(t.playing)??!1?1:0,controls:e.Value.get(t.controls)??!1?1:0,rel:0,playsinline:e.Value.get(t.playsinline)??!0?1:0,modestbranding:1},a=e.Value.get(t.loop)??!1,r=e.Value.get(t.url),l=typeof r=="string"?$t(r):null;return a&&l&&(n.loop=1,n.playlist=l),n}const qe="https://cdn.jsdelivr.net/npm/pdfjs-dist@5.4.394/",Ba=t=>{if(!t||typeof t!="object")return!1;const n=t;return!!(n.getDocument&&typeof n.getDocument=="function")};function La(){if(typeof window>"u")return;const n=window.pdfjsLib;n?.GlobalWorkerOptions?.workerSrc||n?.GlobalWorkerOptions&&(n.GlobalWorkerOptions.workerSrc=`${qe}build/pdf.worker.min.mjs`)}const Ea=t=>new Promise((n,a)=>{const r=document.createElement("script");r.type="module",r.src=t,r.onload=()=>n(),r.onerror=()=>a(new Error(`Failed to load script: ${t}`)),document.head.appendChild(r)}),Aa=async()=>{const t=window;if(t.pdfjsLib&&Ba(t.pdfjsLib))return t.pdfjsLib;if(await Ea(`${qe}build/pdf.min.mjs`),await new Promise(n=>setTimeout(n,100)),!t.pdfjsLib)throw new Error("PDF.js failed to initialize after loading");return t.pdfjsLib};let $e=null,tt=!1;async function Na(){if($e)return $e;!tt&&typeof window<"u"&&(La(),tt=!0);const t=await Aa();return $e=t,t.GlobalWorkerOptions&&(t.GlobalWorkerOptions.workerSrc=`${qe}build/pdf.worker.min.mjs`),t}function Fa(t,n){if(t.byteLength!==n.byteLength)return!1;const a=t.byteLength,r=new DataView(t.buffer,t.byteOffset,a),l=new DataView(n.buffer,n.byteOffset,a),i=a>>>2,s=a&3;for(let u=0;u<i;u++)if(r.getUint32(u*4)!==l.getUint32(u*4))return!1;for(let u=a-s;u<a;u++)if(t[u]!==n[u])return!1;return!0}function Ma(t,n){if(t.byteLength!==n.byteLength)return!1;const a=t.byteLength,r=a>>>2,l=new Uint32Array(t,0,r),i=new Uint32Array(n,0,r);for(let o=0;o<r;o++)if(l[o]!==i[o])return!1;const s=a&3,u=new Uint8Array(t,r*4,s),c=new Uint8Array(n,r*4,s);for(let o=0;o<s;o++)if(u[o]!==c[o])return!1;return!0}function Ua(t,n){try{return typeof t=="string"&&typeof n=="string"?t===n:t instanceof Uint8Array&&n instanceof Uint8Array?Fa(t,n):t instanceof ArrayBuffer&&n instanceof ArrayBuffer?Ma(t,n):!1}catch{return!1}}function Be(t){return typeof t=="string"?t:t instanceof Uint8Array?t.slice():t instanceof ArrayBuffer?t.slice(0):t}function Ra({source:t,page:n=1,fit:a="width",scale:r=1,rotation:l=0,quality:i=2,renderTextLayer:s=!0,renderAnnotationLayer:u=!1,onPageChange:c,onLoadComplete:o},...p){const m=Na();let C=Be(e.Value.get(t)),f=null,y=e.Value.get(n);return e.Use(h.BeatUII18n,g=>e.Fragment(e.OnDispose(()=>{f!=null&&(f.destroy(),f=null)}),Z.ElementRect(w=>{const v=w.map(d=>d,(d,b)=>d!=null&&b!=null&&d.width===b.width&&d.height===b.height);return Z.Query({request:e.computedOf(t,n,a,r,l,i,s,u,v)((d,b,x,I,P,k,V,$,B)=>({source:d,page:b,fit:x,scale:I,rotation:P,quality:k,renderTextLayer:V,renderAnnotationLayer:$,containerWidth:B.width,containerHeight:B.height})),load:async({request:d})=>{const b=await m,x=d.source,I=Be(x),P=Be(x);(f==null||!Ua(C,I))&&(f!=null&&(f.destroy(),f=null),C=I,f=await b.getDocument(P).promise,o?.({numPages:f.numPages}));const k=d.page<1||d.page>f.numPages?1:d.page;c!=null&&k!==y&&(y=k,c(k));const V=await f.getPage(k);let $;if(d.fit==="none")$=d.scale;else{const R=V.getViewport({scale:1,rotation:d.rotation}),j=R.width/R.height,E=d.containerWidth/d.containerHeight;switch(d.fit){case"width":$=d.containerWidth/R.width;break;case"height":$=d.containerHeight/R.height;break;case"contain":$=Math.min(d.containerWidth/R.width,d.containerHeight/R.height);break;case"cover":j>E?$=d.containerHeight/R.height:$=d.containerWidth/R.width;break}}const B=V.getViewport({scale:$,rotation:d.rotation}),A=V.getViewport({scale:$*d.quality,rotation:d.rotation});let F=null;return{pdfWidth:B.width,pdfHeight:B.height,canvasWidth:Math.floor(B.width),canvasHeight:Math.floor(B.height),highResWidth:Math.floor(A.width),highResHeight:Math.floor(A.height),render:async(R,j,E)=>{if(F)try{F.cancel(),await F.promise.catch(()=>{})}catch{}R.width=A.width,R.height=A.height,R.style.width=`${B.width}px`,R.style.height=`${B.height}px`;const z=R.getContext("2d");if(!z)throw new Error("Failed to get canvas context");const X=V.render({canvasContext:z,canvas:R,viewport:A});F=X;try{await X.promise}catch(K){if((K instanceof Error?K.name:K?.name)!=="RenderingCancelledException")throw K;return}finally{F===X&&(F=null)}if(d.renderTextLayer&&j!=null){j.innerHTML="";try{const K=await V.getTextContent(),J=b.TextLayer;J!=null&&await new J({textContentSource:K,container:j,viewport:B}).render()}catch(K){console.warn("Failed to render text layer:",K)}}if(d.renderAnnotationLayer&&E!=null){E.innerHTML="",E.style.width=`${B.width}px`,E.style.height=`${B.height}px`;try{const K=await V.getAnnotations(),J=b.AnnotationLayer;if(J!=null&&K.length>0){const le={getDestinationHash:()=>"",getAnchorUrl:ae=>ae,executeNamedAction:()=>{},executeSetOCGState:()=>{},cachePageRef:()=>{}};await new J({div:E,page:V,viewport:B,linkService:le,annotationStorage:null}).render({viewport:B,div:E,annotations:K,page:V,linkService:le,renderForms:!0})}}catch(K){console.warn("Failed to render annotation layer:",K)}}}}},convertError:d=>d instanceof Error?d.message:JSON.stringify(d),pending:()=>e.html.div(e.attr.class("bc-pdf-page-viewer__loading"),h.Icon({icon:"line-md:loading-twotone-loop",size:"lg"}),e.html.span(e.attr.class("bc-pdf-page-viewer__loading-text"),g.map(d=>d.pdfPageViewer.loading))),failure:({error:d})=>e.html.div(e.attr.class("bc-pdf-page-viewer__error"),h.Icon({icon:"line-md:alert-circle",size:"lg",color:"danger"}),e.html.span(e.attr.class("bc-pdf-page-viewer__error-text"),d)),success:({value:d})=>e.html.div(e.attr.class(e.Value.map(a,b=>b==="none"?"bc-pdf-page-viewer":`bc-pdf-page-viewer bc-pdf-page-viewer--fit-${b}`)),e.html.div(e.attr.class("bc-pdf-page-viewer__content"),e.When(e.Value.map(a,b=>b==="none"),()=>e.attr.style(d.$.canvasWidth.map(b=>`width: ${b}px; height: ${d.value.canvasHeight}px;`)),()=>e.Fragment()),e.html.canvas(e.attr.class("bc-pdf-page-viewer__canvas"),e.attr.width(d.$.canvasWidth.map(String)),e.attr.height(d.$.canvasHeight.map(String)),...p),e.html.div(e.attr.class("bc-pdf-page-viewer__text-layer")),e.html.div(e.attr.class("bc-pdf-page-viewer__annotation-layer"))),e.WithElement(b=>{const x=b.querySelector(".bc-pdf-page-viewer__canvas"),I=b.querySelector(".bc-pdf-page-viewer__text-layer"),P=b.querySelector(".bc-pdf-page-viewer__annotation-layer");return e.Value.on(d,async k=>{await k.render(x,I,P)}),e.Empty}))})})))}Object.defineProperty(exports,"Use",{enumerable:!0,get:()=>e.Use});exports.BeatUII18n=h.BeatUII18n;exports.Button=h.Button;exports.CommonInputAttributes=h.CommonInputAttributes;exports.Icon=h.Icon;exports.InputContainer=h.InputContainer;exports.InputIcon=h.InputIcon;exports.LOGICAL_PROPERTY_MAP=h.LOGICAL_PROPERTY_MAP;exports.Locale=h.Locale;exports.TextInput=h.TextInput;exports.defaultLocale=h.defaultLocale;exports.defaultMessages=h.defaultMessages;exports.formatFileSize=h.formatFileSize;exports.generateButtonClasses=h.generateButtonClasses;exports.generateButtonStyles=h.generateButtonStyles;exports.generateInputContainerInputClasses=h.generateInputContainerInputClasses;exports.getDirectionClassName=h.getDirectionClassName;exports.getDirectionFromLocale=h.getDirectionFromLocale;exports.getIconLocally=h.getIconLocally;exports.getOppositeDirection=h.getOppositeDirection;exports.getPhysicalProperty=h.getPhysicalProperty;exports.isIndexedDBAvailable=h.isIndexedDBAvailable;exports.isRTLLocale=h.isRTLLocale;exports.makeI18nProvider=h.makeI18nProvider;exports.makeMessages=h.makeMessages;exports.resolveDirection=h.resolveDirection;exports.storeIconLocally=h.storeIconLocally;exports.backgroundConfig=q.backgroundConfig;exports.bgColors=q.bgColors;exports.borderColors=q.borderColors;exports.colorShades=q.colorShades;exports.colors=q.colors;exports.generateColorVariables=q.generateColorVariables;exports.generateCoreColorVariables=q.generateCoreColorVariables;exports.generateSemanticColorVariables=q.generateSemanticColorVariables;exports.getColorVar=q.getColorVar;exports.getColorVarName=q.getColorVarName;exports.interactiveColors=q.interactiveColors;exports.normalizeColorName=q.normalizeColorName;exports.resolveSemanticColorMap=q.resolveSemanticColorMap;exports.semanticColorNames=q.semanticColorNames;exports.semanticColors=q.semanticColors;exports.textColors=q.textColors;exports.themeColorNames=q.themeColorNames;exports.baseSpacing=T.baseSpacing;exports.beatuiPreset=T.beatuiPreset;exports.breakpoints=T.breakpoints;exports.changeFontSize=T.changeFontSize;exports.createBeatuiPreset=T.createBeatuiPreset;exports.fontFamily=T.fontFamily;exports.fontSize=T.fontSize;exports.fontWeight=T.fontWeight;exports.generateAllTokenVariables=T.generateAllTokenVariables;exports.generateBreakpointVariables=T.generateBreakpointVariables;exports.generateCoreTokenVariables=T.generateCoreTokenVariables;exports.generateFontFamilyOverrideVariables=T.generateFontFamilyOverrideVariables;exports.generateMotionVariables=T.generateMotionVariables;exports.generateRadiusVariables=T.generateRadiusVariables;exports.generateSemanticFontVariables=T.generateSemanticFontVariables;exports.generateSemanticMotionVariables=T.generateSemanticMotionVariables;exports.generateSemanticRadiusVariables=T.generateSemanticRadiusVariables;exports.generateSemanticShadowVariables=T.generateSemanticShadowVariables;exports.generateSemanticSpacingVariables=T.generateSemanticSpacingVariables;exports.generateSemanticTextShadowVariables=T.generateSemanticTextShadowVariables;exports.generateSemanticTokenVariables=T.generateSemanticTokenVariables;exports.generateShadowVariables=T.generateShadowVariables;exports.generateSpacingVariables=T.generateSpacingVariables;exports.generateTextShadowVariables=T.generateTextShadowVariables;exports.generateTypographyVariables=T.generateTypographyVariables;exports.generateZIndexVariables=T.generateZIndexVariables;exports.getBreakpointMediaQuery=T.getBreakpointMediaQuery;exports.getBreakpointVar=T.getBreakpointVar;exports.getBreakpointVarName=T.getBreakpointVarName;exports.getFontFamilyVar=T.getFontFamilyVar;exports.getFontFamilyVarName=T.getFontFamilyVarName;exports.getFontSizeVar=T.getFontSizeVar;exports.getFontSizeVarName=T.getFontSizeVarName;exports.getFontWeightVar=T.getFontWeightVar;exports.getFontWeightVarName=T.getFontWeightVarName;exports.getLetterSpacingVar=T.getLetterSpacingVar;exports.getLetterSpacingVarName=T.getLetterSpacingVarName;exports.getLineHeightVar=T.getLineHeightVar;exports.getLineHeightVarName=T.getLineHeightVarName;exports.getMotionDurationVar=T.getMotionDurationVar;exports.getMotionDurationVarName=T.getMotionDurationVarName;exports.getMotionEasingVar=T.getMotionEasingVar;exports.getMotionEasingVarName=T.getMotionEasingVarName;exports.getRadiusMediaQuery=T.getRadiusMediaQuery;exports.getRadiusVar=T.getRadiusVar;exports.getRadiusVarName=T.getRadiusVarName;exports.getSemanticFontVar=T.getSemanticFontVar;exports.getSemanticFontVarName=T.getSemanticFontVarName;exports.getSemanticMotionVarName=T.getSemanticMotionVarName;exports.getSemanticRadiusVarName=T.getSemanticRadiusVarName;exports.getSemanticShadowVarName=T.getSemanticShadowVarName;exports.getSemanticSpacingVarName=T.getSemanticSpacingVarName;exports.getSemanticTextShadowVarName=T.getSemanticTextShadowVarName;exports.getShadowVar=T.getShadowVar;exports.getShadowVarName=T.getShadowVarName;exports.getSpacingVar=T.getSpacingVar;exports.getSpacingVarName=T.getSpacingVarName;exports.getTextShadowVar=T.getTextShadowVar;exports.getTextShadowVarName=T.getTextShadowVarName;exports.getTokenValue=T.getTokenValue;exports.getZIndexVar=T.getZIndexVar;exports.getZIndexVarName=T.getZIndexVarName;exports.letterSpacing=T.letterSpacing;exports.lineHeight=T.lineHeight;exports.motionDurations=T.motionDurations;exports.motionEasings=T.motionEasings;exports.radius=T.radius;exports.semanticFontNames=T.semanticFontNames;exports.semanticMotionNames=T.semanticMotionNames;exports.semanticRadiusNames=T.semanticRadiusNames;exports.semanticShadowNames=T.semanticShadowNames;exports.semanticSpacingNames=T.semanticSpacingNames;exports.semanticTextShadowNames=T.semanticTextShadowNames;exports.shadows=T.shadows;exports.spacing=T.spacing;exports.textShadows=T.textShadows;exports.zIndex=T.zIndex;exports.ArrayController=D.ArrayController;exports.BaseControl=D.BaseControl;exports.BaseMappedControl=D.BaseMappedControl;exports.CheckboxInput=D.CheckboxInput;exports.CloseButton=D.CloseButton;exports.Control=D.Control;exports.Controller=D.Controller;exports.DangerLabel=D.DangerLabel;exports.EmailInput=D.EmailInput;exports.EmphasisLabel=D.EmphasisLabel;exports.InputWrapper=D.InputWrapper;exports.Label=D.Label;exports.MappedControl=D.MappedControl;exports.MutedLabel=D.MutedLabel;exports.Notice=D.Notice;exports.ObjectController=D.ObjectController;exports.PasswordInput=D.PasswordInput;exports.RequiredSymbol=D.RequiredSymbol;exports.Stack=D.Stack;exports.connectCommonAttributes=D.connectCommonAttributes;exports.connectNumberInput=D.connectNumberInput;exports.connectStringInput=D.connectStringInput;exports.convertStandardSchemaIssues=D.convertStandardSchemaIssues;exports.convertStandardSchemaPathToPath=D.convertStandardSchemaPathToPath;exports.makeMapValidation=D.makeMapValidation;exports.makeOnBlurHandler=D.makeOnBlurHandler;exports.makeOnChangeHandler=D.makeOnChangeHandler;exports.parsePath=D.parsePath;exports.pathToString=D.pathToString;exports.sessionId=D.sessionId;exports.standardSchemaResultToValidation=D.standardSchemaResultToValidation;exports.taskToValidation=D.taskToValidation;exports.useController=D.useController;exports.useForm=D.useForm;exports.wrapSegment=D.wrapSegment;exports.AnimatedToggle=H.AnimatedToggle;exports.AnimatedToggleClass=H.AnimatedToggleClass;exports.BooleanValidator=H.BooleanValidator;exports.ConfirmModal=H.ConfirmModal;exports.FocusTrap=H.FocusTrap;exports.Modal=H.Modal;exports.ObjectValidator=H.ObjectValidator;exports.Overlay=H.Overlay;exports.StringValidator=H.StringValidator;exports.boolean=H.boolean;exports.createStandardSchema=H.createStandardSchema;exports.object=H.object;exports.string=H.string;exports.useAnimatedElementToggle=H.useAnimatedElementToggle;exports.useAnimatedToggle=H.useAnimatedToggle;exports.useFocusTrap=H.useFocusTrap;exports.useTimedToggle=H.useTimedToggle;exports.Theme=ge.Theme;exports.ThemeAppearance=ge.ThemeAppearance;exports.Base64Input=S.Base64Input;exports.Base64sInput=S.Base64sInput;exports.BaseListControl=S.BaseListControl;exports.BaseNativeSelectControl=S.BaseNativeSelectControl;exports.Card=S.Card;exports.ColorSwatchInput=S.ColorSwatchInput;exports.EditableText=S.EditableText;exports.Expando=S.Expando;exports.FilesInput=S.FilesInput;exports.Group=S.Group;exports.ListControl=S.ListControl;exports.ListInput=S.ListInput;exports.MaskInput=S.MaskInput;exports.NativeSelect=S.NativeSelect;exports.NativeSelectControl=S.NativeSelectControl;exports.NullableDateInput=S.NullableDateInput;exports.NullableDateTimeInput=S.NullableDateTimeInput;exports.NullableDurationInput=S.NullableDurationInput;exports.NullableEmailInput=S.NullableEmailInput;exports.NullableNumberInput=S.NullableNumberInput;exports.NullablePasswordInput=S.NullablePasswordInput;exports.NullableRatingInput=S.NullableRatingInput;exports.NullableSliderInput=S.NullableSliderInput;exports.NullableTextArea=S.NullableTextArea;exports.NullableTextInput=S.NullableTextInput;exports.NullableUUIDInput=S.NullableUUIDInput;exports.NullableUrlInput=S.NullableUrlInput;exports.NumberInput=S.NumberInput;exports.RatingInput=S.RatingInput;exports.SegmentedInput=S.SegmentedInput;exports.SliderInput=S.SliderInput;exports.Switch=S.Switch;exports.TextArea=S.TextArea;exports.UUIDInput=S.UUIDInput;exports.UnionController=S.UnionController;exports.UnstyledDropZone=S.UnstyledDropZone;exports.UrlInput=S.UrlInput;exports.WithTemporal=S.WithTemporal;exports.emitExpando=S.emitExpando;exports.emitOptionExpando=S.emitOptionExpando;exports.emptyToNull=S.emptyToNull;exports.ensureTemporal=S.ensureTemporal;exports.fileToBase64=S.fileToBase64;exports.formatColor=S.formatColor;exports.getContrastRatio=S.getContrastRatio;exports.hexToRgb=S.hexToRgb;exports.hslToRgb=S.hslToRgb;exports.hwbToRgb=S.hwbToRgb;exports.isValidColor=S.isValidColor;exports.isValidHexColor=S.isValidHexColor;exports.isValidHslColor=S.isValidHslColor;exports.isValidRgbColor=S.isValidRgbColor;exports.isValidRgbaColor=S.isValidRgbaColor;exports.linearToSrgb=S.linearToSrgb;exports.mulberry32=S.mulberry32;exports.normalizeHexColor=S.normalizeHexColor;exports.nullToEmpty=S.nullToEmpty;exports.oklchToRgb=S.oklchToRgb;exports.parseAnyColor=S.parseAnyColor;exports.resolveEffectiveFormat=S.resolveEffectiveFormat;exports.rgbToHex=S.rgbToHex;exports.rgbToHsl=S.rgbToHsl;exports.rgbToHwb=S.rgbToHwb;exports.rgbToOklch=S.rgbToOklch;exports.srgbToLinear=S.srgbToLinear;exports.toRgbaString=S.toRgbaString;exports.transformEmptyStringToUndefined=S.transformEmptyStringToUndefined;exports.transformNullToUndefined=S.transformNullToUndefined;exports.transformUndefinedToNull=S.transformUndefinedToNull;exports.LinkPortal=Bt.LinkPortal;exports.Toolbar=be.Toolbar;exports.ToolbarButton=be.ToolbarButton;exports.ToolbarDivider=be.ToolbarDivider;exports.ToolbarGroup=be.ToolbarGroup;exports.ToolbarSpacer=be.ToolbarSpacer;exports.ActionCard=Jt;exports.AnnouncementBar=Oa;exports.AppShell=sn;exports.AppearanceSelector=rt;exports.Badge=Nt;exports.BaseComboboxControl=mt;exports.BaseComboboxTagsControl=Sn;exports.BaseDropdownControl=ct;exports.BaseSelectTagsControl=wn;exports.BaseVideoPlayer=Da;exports.BeatUI=aa;exports.BigintInput=_n;exports.ButtonLink=pa;exports.Center=dn;exports.CenterH=un;exports.Chips=He;exports.Collapse=it;exports.CollapsibleSidebarGroup=fa;exports.ColorController=vt;exports.ColorInput=Gt;exports.ComboboxControl=hn;exports.ComboboxInput=pt;exports.ComboboxTagsControl=Vn;exports.ComboboxTagsInput=ze;exports.DateInput=xn;exports.DateTimeInput=In;exports.Drawer=wa;exports.DropdownBase=Ue;exports.DropdownControl=bn;exports.DropdownInput=ut;exports.DurationInput=Zn;exports.EnsureControl=Jn;exports.FileInput=Tn;exports.Flyout=he;exports.FormStatus=Kn;exports.InstantInput=Un;exports.LazyNativeSelect=On;exports.Lightbox=ka;exports.Link=kt;exports.LocaleSelector=ea;exports.Menu=Re;exports.MenuItem=yn;exports.MenuSeparator=We;exports.NativePdfPreview=ra;exports.NavigationLink=da;exports.NineSliceScrollView=mn;exports.Notification=St;exports.NotificationProvider=Ge;exports.NotificationService=Vt;exports.NotificationViewport=xt;exports.NullableBigintInput=Dn;exports.NullableInstantInput=Wn;exports.NullableMaskInput=Pn;exports.NullablePlainDateInput=Ln;exports.NullablePlainDateTimeInput=Fn;exports.NullablePlainMonthDayInput=qn;exports.NullablePlainTimeInput=An;exports.NullablePlainYearMonthInput=Gn;exports.NullableZonedDateTimeInput=jn;exports.OpenGraph=sa;exports.Option=re;exports.PDFJSPreview=la;exports.PageDropZone=Ft;exports.PdfPageViewer=Ra;exports.PlainDateInput=Bn;exports.PlainDateTimeInput=Nn;exports.PlainMonthDayInput=Yn;exports.PlainTimeInput=En;exports.PlainYearMonthInput=zn;exports.Ribbon=xa;exports.ScrollablePanel=Le;exports.SelectTagsControl=Cn;exports.SelectTagsInput=je;exports.Sidebar=ma;exports.SidebarActiveLink=Pt;exports.SidebarClickLink=_t;exports.SidebarContext=Tt;exports.SidebarGroup=Ne;exports.SidebarLink=Dt;exports.SidebarSeparator=ga;exports.SidebarUrlLink=Ot;exports.Sink=gn;exports.StandaloneAppearanceSelector=jt;exports.StylePortal=oa;exports.Table=Rt;exports.Tabs=va;exports.Tag=Fe;exports.TagsInput=$n;exports.Tooltip=Sa;exports.WithBeatUIBreakpoint=ot;exports.WithBeatUIElementBreakpoint=tn;exports.WithBreakpoint=Me;exports.ZonedDateTimeInput=Hn;exports.colorInputOptionsFromController=Xn;exports.compareBreakpoint=lt;exports.createColorController=Qn;exports.createLocationMatcher=ke;exports.delaySignal=Lt;exports.findBreakpoint=Xt;exports.generateBadgeClasses=nt;exports.generateBadgeStyles=at;exports.generateLinkClasses=Ee;exports.generateLinkStyles=Ae;exports.generateNotificationClasses=wt;exports.generateNotificationStyles=Ct;exports.increaseSize=At;exports.isUrlMatch=It;
|
package/dist/index.es.js
CHANGED
|
@@ -158,8 +158,8 @@ function ur({
|
|
|
158
158
|
const p = (v) => v.dataTransfer?.types.includes("Files") ?? !1, b = (v, I) => I === "*/*" ? !0 : I.split(",").map((D) => D.trim()).some((D) => {
|
|
159
159
|
if (D === "*/*") return !0;
|
|
160
160
|
if (D.endsWith("/*")) {
|
|
161
|
-
const
|
|
162
|
-
return v.type.startsWith(
|
|
161
|
+
const _ = D.slice(0, -2);
|
|
162
|
+
return v.type.startsWith(_ + "/");
|
|
163
163
|
}
|
|
164
164
|
return v.type === D || v.name.endsWith(D);
|
|
165
165
|
}), k = (v) => {
|
|
@@ -173,12 +173,12 @@ function ur({
|
|
|
173
173
|
v.preventDefault(), v.stopPropagation(), l = 0, i.value = !1;
|
|
174
174
|
const I = Array.from(v.dataTransfer?.files ?? []);
|
|
175
175
|
if (I.length > 0) {
|
|
176
|
-
const
|
|
177
|
-
(C) => b(C,
|
|
178
|
-
),
|
|
176
|
+
const $ = m.get(t), D = I.filter(
|
|
177
|
+
(C) => b(C, $)
|
|
178
|
+
), _ = I.filter(
|
|
179
179
|
(C) => !D.includes(C)
|
|
180
180
|
);
|
|
181
|
-
D.length > 0 && (c.value = D, e(D, "dragdrop")),
|
|
181
|
+
D.length > 0 && (c.value = D, e(D, "dragdrop")), _.length > 0 && s?.(I);
|
|
182
182
|
}
|
|
183
183
|
};
|
|
184
184
|
typeof document < "u" && (document.addEventListener("dragenter", k), document.addEventListener("dragover", g), document.addEventListener("dragleave", y), document.addEventListener("drop", h));
|
|
@@ -187,8 +187,8 @@ function ur({
|
|
|
187
187
|
}, w = () => {
|
|
188
188
|
u?.click();
|
|
189
189
|
}, d = (v) => {
|
|
190
|
-
const I = v.target,
|
|
191
|
-
|
|
190
|
+
const I = v.target, $ = Array.from(I.files ?? []);
|
|
191
|
+
$.length > 0 && (c.value = $, e($, "click")), I.value = "";
|
|
192
192
|
};
|
|
193
193
|
return R(
|
|
194
194
|
le(x),
|
|
@@ -421,7 +421,7 @@ function Ze(e) {
|
|
|
421
421
|
function I() {
|
|
422
422
|
D != null && (clearTimeout(D), D = null), C != null && (clearTimeout(C), C = null), d && (d(), d = null), w && (document.removeEventListener("keydown", w), w = null), x.set(!1), v = !1;
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function $() {
|
|
425
425
|
m.get(u) && (w = (B) => {
|
|
426
426
|
B.key === "Escape" && V();
|
|
427
427
|
}, document.addEventListener("keydown", w)), v = !0, x.set(!0), k({
|
|
@@ -462,7 +462,7 @@ function Ze(e) {
|
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
464
|
let D = null;
|
|
465
|
-
function
|
|
465
|
+
function _() {
|
|
466
466
|
if (D != null && (clearTimeout(D), D = null), C != null && (clearTimeout(C), C = null), y.isOpened.value || y.isOpening.value || y.isStartOpening.value)
|
|
467
467
|
return;
|
|
468
468
|
if (y.isClosing.value || y.isStartClosing.value) {
|
|
@@ -471,7 +471,7 @@ function Ze(e) {
|
|
|
471
471
|
}
|
|
472
472
|
const B = m.get(a);
|
|
473
473
|
D = setTimeout(() => {
|
|
474
|
-
D = null,
|
|
474
|
+
D = null, $();
|
|
475
475
|
}, B);
|
|
476
476
|
}
|
|
477
477
|
let C = null;
|
|
@@ -489,7 +489,7 @@ function Ze(e) {
|
|
|
489
489
|
}
|
|
490
490
|
return te((B) => {
|
|
491
491
|
const N = () => {
|
|
492
|
-
|
|
492
|
+
_(), x.set(!0);
|
|
493
493
|
}, U = () => {
|
|
494
494
|
V(), x.set(!1);
|
|
495
495
|
}, z = R(
|
|
@@ -1252,13 +1252,13 @@ function wr({
|
|
|
1252
1252
|
const x = Z(0n), w = Z(0n), d = _t(s), v = _t(k), I = Z(16);
|
|
1253
1253
|
return f.div(
|
|
1254
1254
|
r.class("bc-nine-slice-container"),
|
|
1255
|
-
Ae((
|
|
1255
|
+
Ae(($) => {
|
|
1256
1256
|
const D = T(
|
|
1257
|
-
|
|
1257
|
+
$.$.width,
|
|
1258
1258
|
k,
|
|
1259
1259
|
y
|
|
1260
|
-
)((L, F, K) => L - F - K),
|
|
1261
|
-
|
|
1260
|
+
)((L, F, K) => L - F - K), _ = T(
|
|
1261
|
+
$.$.height,
|
|
1262
1262
|
s,
|
|
1263
1263
|
u
|
|
1264
1264
|
)((L, F, K) => L - F - K), C = T(
|
|
@@ -1266,13 +1266,13 @@ function wr({
|
|
|
1266
1266
|
D
|
|
1267
1267
|
)((L, F) => L > BigInt(F)), V = T(
|
|
1268
1268
|
n,
|
|
1269
|
-
|
|
1269
|
+
_
|
|
1270
1270
|
)((L, F) => L > BigInt(F)), B = T(
|
|
1271
1271
|
D,
|
|
1272
1272
|
V,
|
|
1273
1273
|
I
|
|
1274
1274
|
)((L, F, K) => F ? L - K : L), N = T(
|
|
1275
|
-
|
|
1275
|
+
_,
|
|
1276
1276
|
C,
|
|
1277
1277
|
I
|
|
1278
1278
|
)((L, F, K) => F ? L - K : L), U = T(
|
|
@@ -1687,29 +1687,29 @@ const Ce = {
|
|
|
1687
1687
|
if (v.preventDefault(), !p.value)
|
|
1688
1688
|
p.set(!0), I.length > 0 && (b.set(0), k.set(I[0]));
|
|
1689
1689
|
else {
|
|
1690
|
-
const
|
|
1690
|
+
const $ = Math.min(
|
|
1691
1691
|
b.value + 1,
|
|
1692
1692
|
I.length - 1
|
|
1693
1693
|
);
|
|
1694
|
-
b.set(
|
|
1694
|
+
b.set($), k.set(I[$] ?? null);
|
|
1695
1695
|
}
|
|
1696
1696
|
break;
|
|
1697
1697
|
}
|
|
1698
1698
|
case "ArrowUp": {
|
|
1699
1699
|
if (v.preventDefault(), p.value) {
|
|
1700
|
-
const
|
|
1701
|
-
b.set(
|
|
1700
|
+
const $ = Math.max(b.value - 1, 0);
|
|
1701
|
+
b.set($), k.set(I[$] ?? null);
|
|
1702
1702
|
}
|
|
1703
1703
|
break;
|
|
1704
1704
|
}
|
|
1705
1705
|
case "Enter": {
|
|
1706
1706
|
if (v.preventDefault(), p.value && b.value >= 0) {
|
|
1707
|
-
const
|
|
1708
|
-
|
|
1707
|
+
const $ = I[b.value];
|
|
1708
|
+
$ != null && w($);
|
|
1709
1709
|
} else {
|
|
1710
1710
|
c?.();
|
|
1711
|
-
const
|
|
1712
|
-
p.set(!0),
|
|
1711
|
+
const $ = Ce.getValues(m.get(o));
|
|
1712
|
+
p.set(!0), $.length > 0 && (b.set(0), k.set($[0])), setTimeout(() => u?.(), 0);
|
|
1713
1713
|
}
|
|
1714
1714
|
break;
|
|
1715
1715
|
}
|
|
@@ -1720,8 +1720,8 @@ const Ce = {
|
|
|
1720
1720
|
case " ": {
|
|
1721
1721
|
if (m.get(i)) {
|
|
1722
1722
|
v.preventDefault();
|
|
1723
|
-
const
|
|
1724
|
-
p.set(!p.value), p.value &&
|
|
1723
|
+
const $ = Ce.getValues(m.get(o));
|
|
1724
|
+
p.set(!p.value), p.value && $.length > 0 && (b.set(0), k.set($[0]));
|
|
1725
1725
|
}
|
|
1726
1726
|
break;
|
|
1727
1727
|
}
|
|
@@ -1755,7 +1755,7 @@ const Ce = {
|
|
|
1755
1755
|
p,
|
|
1756
1756
|
k
|
|
1757
1757
|
)(
|
|
1758
|
-
(I,
|
|
1758
|
+
(I, $) => I && $ != null ? `dropdown-option-${String($)}` : ""
|
|
1759
1759
|
)
|
|
1760
1760
|
),
|
|
1761
1761
|
n != null ? A.blur(() => {
|
|
@@ -1784,21 +1784,21 @@ const Ce = {
|
|
|
1784
1784
|
mainAxisOffset: 0,
|
|
1785
1785
|
placement: "bottom-start",
|
|
1786
1786
|
hasPopup: "listbox",
|
|
1787
|
-
showOn: (I,
|
|
1788
|
-
const D =
|
|
1789
|
-
|
|
1787
|
+
showOn: (I, $) => {
|
|
1788
|
+
const D = $;
|
|
1789
|
+
$ = () => {
|
|
1790
1790
|
p.set(!1), b.set(-1), k.set(null), D();
|
|
1791
1791
|
};
|
|
1792
|
-
const
|
|
1792
|
+
const _ = () => {
|
|
1793
1793
|
if (p.value)
|
|
1794
|
-
|
|
1794
|
+
$();
|
|
1795
1795
|
else {
|
|
1796
1796
|
c?.();
|
|
1797
1797
|
const C = Ce.getValues(m.get(o));
|
|
1798
1798
|
p.set(!0), C.length > 0 && (b.set(0), k.set(C[0])), I(), setTimeout(() => u?.(), 0);
|
|
1799
1799
|
}
|
|
1800
1800
|
};
|
|
1801
|
-
return A.click(
|
|
1801
|
+
return A.click(_);
|
|
1802
1802
|
},
|
|
1803
1803
|
showDelay: 0,
|
|
1804
1804
|
hideDelay: 0,
|
|
@@ -2048,12 +2048,12 @@ const Ce = {
|
|
|
2048
2048
|
T(
|
|
2049
2049
|
c,
|
|
2050
2050
|
i
|
|
2051
|
-
)((
|
|
2051
|
+
)(($, D) => $ ?? D ?? "Search")
|
|
2052
2052
|
),
|
|
2053
2053
|
r.value(l),
|
|
2054
|
-
te((
|
|
2055
|
-
A.input((
|
|
2056
|
-
const D =
|
|
2054
|
+
te(($) => (k = $, H)),
|
|
2055
|
+
A.input(($) => {
|
|
2056
|
+
const D = $.target;
|
|
2057
2057
|
l.set(D.value), w(D.value);
|
|
2058
2058
|
}),
|
|
2059
2059
|
A.keydown(v)
|
|
@@ -2067,8 +2067,8 @@ const Ce = {
|
|
|
2067
2067
|
),
|
|
2068
2068
|
() => Pe(
|
|
2069
2069
|
b,
|
|
2070
|
-
(
|
|
2071
|
-
|
|
2070
|
+
($) => Xt(
|
|
2071
|
+
$,
|
|
2072
2072
|
o,
|
|
2073
2073
|
g,
|
|
2074
2074
|
I,
|
|
@@ -2111,9 +2111,9 @@ function en(e) {
|
|
|
2111
2111
|
Ze({
|
|
2112
2112
|
content: () => te((w) => {
|
|
2113
2113
|
x = document.activeElement;
|
|
2114
|
-
const d = (
|
|
2114
|
+
const d = (_, C, V) => {
|
|
2115
2115
|
if (C.length === 0) return -1;
|
|
2116
|
-
let B =
|
|
2116
|
+
let B = _ + V, N = 0;
|
|
2117
2117
|
for (; N < C.length; ) {
|
|
2118
2118
|
B >= C.length && (B = 0), B < 0 && (B = C.length - 1);
|
|
2119
2119
|
const U = C[B];
|
|
@@ -2121,23 +2121,23 @@ function en(e) {
|
|
|
2121
2121
|
return B;
|
|
2122
2122
|
B += V, N++;
|
|
2123
2123
|
}
|
|
2124
|
-
return
|
|
2125
|
-
}, v = (
|
|
2124
|
+
return _;
|
|
2125
|
+
}, v = (_) => {
|
|
2126
2126
|
const C = h.value, V = y.value;
|
|
2127
|
-
switch (
|
|
2127
|
+
switch (_.key) {
|
|
2128
2128
|
case "ArrowDown":
|
|
2129
|
-
|
|
2129
|
+
_.preventDefault(), _.stopPropagation();
|
|
2130
2130
|
const B = d(V, C, 1);
|
|
2131
2131
|
I(B, C);
|
|
2132
2132
|
break;
|
|
2133
2133
|
case "ArrowUp":
|
|
2134
|
-
|
|
2134
|
+
_.preventDefault(), _.stopPropagation();
|
|
2135
2135
|
const N = d(V, C, -1);
|
|
2136
2136
|
I(N, C);
|
|
2137
2137
|
break;
|
|
2138
2138
|
case "Enter":
|
|
2139
2139
|
case " ":
|
|
2140
|
-
if (
|
|
2140
|
+
if (_.preventDefault(), _.stopPropagation(), V >= 0 && C[V]) {
|
|
2141
2141
|
const U = C[V];
|
|
2142
2142
|
if (U.getAttribute("aria-disabled") === "true")
|
|
2143
2143
|
return;
|
|
@@ -2149,13 +2149,13 @@ function en(e) {
|
|
|
2149
2149
|
l?.();
|
|
2150
2150
|
break;
|
|
2151
2151
|
case "Home":
|
|
2152
|
-
|
|
2152
|
+
_.preventDefault(), _.stopPropagation(), C.length > 0 && I(0, C);
|
|
2153
2153
|
break;
|
|
2154
2154
|
case "End":
|
|
2155
|
-
|
|
2155
|
+
_.preventDefault(), _.stopPropagation(), C.length > 0 && I(C.length - 1, C);
|
|
2156
2156
|
break;
|
|
2157
2157
|
case "ArrowRight":
|
|
2158
|
-
if (
|
|
2158
|
+
if (_.preventDefault(), _.stopPropagation(), V >= 0 && C[V]) {
|
|
2159
2159
|
const U = C[V];
|
|
2160
2160
|
U.classList.contains(
|
|
2161
2161
|
"bc-menu-item--has-submenu"
|
|
@@ -2163,26 +2163,26 @@ function en(e) {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
break;
|
|
2165
2165
|
case "ArrowLeft":
|
|
2166
|
-
|
|
2166
|
+
_.preventDefault(), _.stopPropagation(), l?.();
|
|
2167
2167
|
break;
|
|
2168
2168
|
}
|
|
2169
|
-
}, I = (
|
|
2169
|
+
}, I = (_, C) => {
|
|
2170
2170
|
y.value >= 0 && C[y.value] && (C[y.value].classList.remove(
|
|
2171
2171
|
"bc-menu-item--focused"
|
|
2172
|
-
), C[y.value].removeAttribute("aria-selected")),
|
|
2173
|
-
},
|
|
2174
|
-
const
|
|
2172
|
+
), C[y.value].removeAttribute("aria-selected")), _ >= 0 && C[_] && (C[_].classList.add("bc-menu-item--focused"), C[_].setAttribute("aria-selected", "true"), y.set(_), typeof C[_].scrollIntoView == "function" && C[_].scrollIntoView({ block: "nearest" }));
|
|
2173
|
+
}, $ = () => {
|
|
2174
|
+
const _ = Array.from(
|
|
2175
2175
|
w.querySelectorAll('[role="menuitem"]')
|
|
2176
2176
|
);
|
|
2177
|
-
if (h.set(
|
|
2178
|
-
const C =
|
|
2177
|
+
if (h.set(_), _.length > 0) {
|
|
2178
|
+
const C = _.findIndex(
|
|
2179
2179
|
(V) => V.getAttribute("aria-disabled") !== "true"
|
|
2180
2180
|
);
|
|
2181
|
-
C >= 0 && I(C,
|
|
2181
|
+
C >= 0 && I(C, _);
|
|
2182
2182
|
}
|
|
2183
|
-
}, D = new MutationObserver(
|
|
2183
|
+
}, D = new MutationObserver($);
|
|
2184
2184
|
return D.observe(w, { childList: !0, subtree: !0 }), setTimeout(() => {
|
|
2185
|
-
|
|
2185
|
+
$(), w.focus();
|
|
2186
2186
|
}, 0), document.addEventListener("keydown", v, !0), R(
|
|
2187
2187
|
le(() => {
|
|
2188
2188
|
D.disconnect(), document.removeEventListener("keydown", v, !0), x && x.focus();
|
|
@@ -2195,13 +2195,13 @@ function en(e) {
|
|
|
2195
2195
|
b ? E.label(b) : R(),
|
|
2196
2196
|
k ? E.labelledby(k) : R(),
|
|
2197
2197
|
E.activedescendant(
|
|
2198
|
-
y.map((
|
|
2198
|
+
y.map((_) => {
|
|
2199
2199
|
const C = h.value;
|
|
2200
|
-
return
|
|
2200
|
+
return _ >= 0 && C[_] ? C[_].id || `${g}-item-${_}` : "";
|
|
2201
2201
|
})
|
|
2202
2202
|
),
|
|
2203
|
-
A.click((
|
|
2204
|
-
const V =
|
|
2203
|
+
A.click((_) => {
|
|
2204
|
+
const V = _.target.closest(
|
|
2205
2205
|
'[role="menuitem"]'
|
|
2206
2206
|
);
|
|
2207
2207
|
if (V && V.getAttribute("aria-disabled") !== "true") {
|
|
@@ -2214,11 +2214,11 @@ function en(e) {
|
|
|
2214
2214
|
r.class("sr-only"),
|
|
2215
2215
|
E.live("polite"),
|
|
2216
2216
|
E.atomic(!0),
|
|
2217
|
-
y.map((
|
|
2217
|
+
y.map((_) => {
|
|
2218
2218
|
const C = h.value;
|
|
2219
|
-
if (
|
|
2220
|
-
const V = C[
|
|
2221
|
-
return C[
|
|
2219
|
+
if (_ >= 0 && C[_]) {
|
|
2220
|
+
const V = C[_].textContent || "";
|
|
2221
|
+
return C[_].getAttribute("aria-disabled") === "true" ? `${V}, disabled` : `${V}, ${_ + 1} of ${C.length}`;
|
|
2222
2222
|
}
|
|
2223
2223
|
return "";
|
|
2224
2224
|
})
|
|
@@ -2685,8 +2685,8 @@ const Pr = (e) => {
|
|
|
2685
2685
|
t,
|
|
2686
2686
|
s
|
|
2687
2687
|
)((w, d) => d == null ? !0 : (w ?? 0n) < d), x = (w, d) => {
|
|
2688
|
-
const v = m.get(t) ?? 0n, I = m.get(n),
|
|
2689
|
-
if (w < 0n &&
|
|
2688
|
+
const v = m.get(t) ?? 0n, I = m.get(n), $ = d?.shiftKey ? 10n : 1n, D = v + I * $ * w, _ = a != null ? m.get(a) : void 0, C = s != null ? m.get(s) : void 0;
|
|
2689
|
+
if (w < 0n && _ != null && D < _ || w > 0n && C != null && D > C) return;
|
|
2690
2690
|
const V = u(D);
|
|
2691
2691
|
V !== v && o && o(V);
|
|
2692
2692
|
};
|
|
@@ -2765,9 +2765,9 @@ const Pr = (e) => {
|
|
|
2765
2765
|
const I = d ?? 0n;
|
|
2766
2766
|
return v == null ? !0 : I < v;
|
|
2767
2767
|
}), w = (d, v) => {
|
|
2768
|
-
const I = m.get(t) ?? 0n,
|
|
2769
|
-
if (d < 0n && C != null &&
|
|
2770
|
-
const B = u(
|
|
2768
|
+
const I = m.get(t) ?? 0n, $ = m.get(n), D = v?.shiftKey ? 10n : 1n, _ = I + $ * D * d, C = a != null ? m.get(a) : void 0, V = s != null ? m.get(s) : void 0;
|
|
2769
|
+
if (d < 0n && C != null && _ < C || d > 0n && V != null && _ > V) return;
|
|
2770
|
+
const B = u(_);
|
|
2771
2771
|
B !== I && o && o(B);
|
|
2772
2772
|
};
|
|
2773
2773
|
return ft(
|
|
@@ -3500,10 +3500,10 @@ function rs({
|
|
|
3500
3500
|
l,
|
|
3501
3501
|
p,
|
|
3502
3502
|
b
|
|
3503
|
-
)((h, x, w, d, v, I,
|
|
3503
|
+
)((h, x, w, d, v, I, $, D, _, C, V, B) => {
|
|
3504
3504
|
if (h == null) return null;
|
|
3505
3505
|
const N = [];
|
|
3506
|
-
x === !1 && N.push("toolbar=0"), w != null && w > 0 && N.push(`page=${w}`), d != null && d > 0 && N.push(`zoom=${d}`), v != null && N.push(`view=${v}`), I != null && N.push(`pagemode=${I}`),
|
|
3506
|
+
x === !1 && N.push("toolbar=0"), w != null && w > 0 && N.push(`page=${w}`), d != null && d > 0 && N.push(`zoom=${d}`), v != null && N.push(`view=${v}`), I != null && N.push(`pagemode=${I}`), $ === !1 && N.push("scrollbar=0"), D === !1 && N.push("navpanes=0"), _ != null && N.push(`search=${encodeURIComponent(_)}`), C != null && N.push(`nameddest=${encodeURIComponent(C)}`), V != null && N.push(`viewrect=${encodeURIComponent(V)}`), B != null && N.push(`highlight=${encodeURIComponent(B)}`);
|
|
3507
3507
|
const U = N.join("&");
|
|
3508
3508
|
return U ? `${h}#${U}` : h;
|
|
3509
3509
|
});
|
|
@@ -3581,12 +3581,12 @@ function ss({
|
|
|
3581
3581
|
l,
|
|
3582
3582
|
p,
|
|
3583
3583
|
b
|
|
3584
|
-
)((w, d, v, I,
|
|
3584
|
+
)((w, d, v, I, $, D, _, C, V, B, N, U, z) => {
|
|
3585
3585
|
if (w == null) return null;
|
|
3586
3586
|
const G = d ?? "https://mozilla.github.io/pdf.js/web/viewer.html", O = new URLSearchParams();
|
|
3587
3587
|
O.set("file", encodeURIComponent(w));
|
|
3588
3588
|
const q = [];
|
|
3589
|
-
v != null && v > 0 && q.push(`page=${v}`), I != null && (typeof I == "string" ? q.push(`zoom=${I}`) : q.push(`zoom=${I}`)),
|
|
3589
|
+
v != null && v > 0 && q.push(`page=${v}`), I != null && (typeof I == "string" ? q.push(`zoom=${I}`) : q.push(`zoom=${I}`)), $ != null && q.push(`pagemode=${$}`), D != null && q.push(`nameddest=${encodeURIComponent(D)}`), _ != null && q.push(`search=${encodeURIComponent(_)}`), C != null && q.push(`textLayer=${C}`), V != null && q.push(`sidebar=${V}`), B != null && q.push(`scrollMode=${B}`), N != null && q.push(`spreadMode=${N}`), U != null && q.push(`enableScripting=${U ? "1" : "0"}`), z != null && q.push(`enablePrinting=${z ? "1" : "0"}`);
|
|
3590
3590
|
const oe = q.length > 0 ? `#${q.join("&")}` : "";
|
|
3591
3591
|
return `${G}?${O.toString()}${oe}`;
|
|
3592
3592
|
});
|
|
@@ -4206,10 +4206,10 @@ function ps(e) {
|
|
|
4206
4206
|
p ? E.label(p) : R(),
|
|
4207
4207
|
A.keydown(y),
|
|
4208
4208
|
...t.map((h, x) => {
|
|
4209
|
-
const w = T(n)((
|
|
4209
|
+
const w = T(n)(($) => $ === h.key), d = T(
|
|
4210
4210
|
c,
|
|
4211
4211
|
h.disabled
|
|
4212
|
-
)((
|
|
4212
|
+
)(($, D) => $ || D), v = `${b}-tab-${h.key}`, I = `${b}-panel-${h.key}`;
|
|
4213
4213
|
return f.button(
|
|
4214
4214
|
r.type("button"),
|
|
4215
4215
|
r.class(
|
|
@@ -4218,10 +4218,10 @@ function ps(e) {
|
|
|
4218
4218
|
w,
|
|
4219
4219
|
d
|
|
4220
4220
|
)(
|
|
4221
|
-
(
|
|
4222
|
-
|
|
4221
|
+
($, D, _) => Ma(
|
|
4222
|
+
$ ?? "md",
|
|
4223
4223
|
D ?? !1,
|
|
4224
|
-
|
|
4224
|
+
_ ?? !1
|
|
4225
4225
|
)
|
|
4226
4226
|
)
|
|
4227
4227
|
),
|
|
@@ -4231,7 +4231,7 @@ function ps(e) {
|
|
|
4231
4231
|
T(
|
|
4232
4232
|
w,
|
|
4233
4233
|
k
|
|
4234
|
-
)((
|
|
4234
|
+
)(($, D) => $ || D === x ? 0 : -1)
|
|
4235
4235
|
),
|
|
4236
4236
|
E.selected(w),
|
|
4237
4237
|
E.controls(I),
|
|
@@ -4239,8 +4239,8 @@ function ps(e) {
|
|
|
4239
4239
|
r.disabled(d),
|
|
4240
4240
|
lt["tab-index"](String(x)),
|
|
4241
4241
|
h.ariaLabel ? E.label(h.ariaLabel) : R(),
|
|
4242
|
-
A.click((
|
|
4243
|
-
|
|
4242
|
+
A.click(($) => {
|
|
4243
|
+
$.preventDefault(), m.get(h.disabled ?? !1) || m.get(c) || (a?.(h.key), k.set(x));
|
|
4244
4244
|
}),
|
|
4245
4245
|
A.focus(() => {
|
|
4246
4246
|
k.set(x);
|
|
@@ -4288,16 +4288,16 @@ function bs(e) {
|
|
|
4288
4288
|
} = c;
|
|
4289
4289
|
a = n;
|
|
4290
4290
|
const d = Z("capturing");
|
|
4291
|
-
m.on(p, (
|
|
4292
|
-
d.set(
|
|
4291
|
+
m.on(p, ($) => {
|
|
4292
|
+
d.set($ ? "capturing" : "non-capturing");
|
|
4293
4293
|
});
|
|
4294
4294
|
const v = T(
|
|
4295
4295
|
h != null,
|
|
4296
4296
|
b
|
|
4297
|
-
)((
|
|
4297
|
+
)(($, D) => $ || D), I = te(($) => {
|
|
4298
4298
|
const D = Ne({
|
|
4299
4299
|
initialStatus: "closed",
|
|
4300
|
-
element:
|
|
4300
|
+
element: $
|
|
4301
4301
|
});
|
|
4302
4302
|
D.listenOnClosed(() => {
|
|
4303
4303
|
n();
|
|
@@ -4656,9 +4656,9 @@ function ys(e) {
|
|
|
4656
4656
|
onPause: d,
|
|
4657
4657
|
onBuffer: v,
|
|
4658
4658
|
onBufferEnd: I,
|
|
4659
|
-
onEnded:
|
|
4659
|
+
onEnded: $,
|
|
4660
4660
|
onError: D,
|
|
4661
|
-
onDuration:
|
|
4661
|
+
onDuration: _,
|
|
4662
4662
|
onSeek: C,
|
|
4663
4663
|
onProgress: V,
|
|
4664
4664
|
onPlaybackRateChange: B,
|
|
@@ -4804,9 +4804,9 @@ function ys(e) {
|
|
|
4804
4804
|
A.waiting(() => v?.()),
|
|
4805
4805
|
A.canplay(() => {
|
|
4806
4806
|
const P = O?.duration;
|
|
4807
|
-
P != null && Number.isFinite(P) &&
|
|
4807
|
+
P != null && Number.isFinite(P) && _?.(P);
|
|
4808
4808
|
}),
|
|
4809
|
-
A.ended(() =>
|
|
4809
|
+
A.ended(() => $?.()),
|
|
4810
4810
|
A.error((P) => {
|
|
4811
4811
|
oe || D?.(P);
|
|
4812
4812
|
})
|
|
@@ -4840,7 +4840,7 @@ function ys(e) {
|
|
|
4840
4840
|
v?.();
|
|
4841
4841
|
break;
|
|
4842
4842
|
case M.PlayerState.ENDED:
|
|
4843
|
-
|
|
4843
|
+
$?.();
|
|
4844
4844
|
break;
|
|
4845
4845
|
}
|
|
4846
4846
|
},
|
|
@@ -5064,7 +5064,7 @@ function ws({
|
|
|
5064
5064
|
Ae((x) => {
|
|
5065
5065
|
const w = x.map(
|
|
5066
5066
|
(d) => d,
|
|
5067
|
-
(
|
|
5067
|
+
(d, v) => d != null && v != null && d.width === v.width && d.height === v.height
|
|
5068
5068
|
);
|
|
5069
5069
|
return Rt({
|
|
5070
5070
|
request: T(
|
|
@@ -5077,24 +5077,24 @@ function ws({
|
|
|
5077
5077
|
i,
|
|
5078
5078
|
c,
|
|
5079
5079
|
w
|
|
5080
|
-
)((d, v, I,
|
|
5080
|
+
)((d, v, I, $, D, _, C, V, B) => ({
|
|
5081
5081
|
source: d,
|
|
5082
5082
|
page: v,
|
|
5083
5083
|
fit: I,
|
|
5084
|
-
scale:
|
|
5084
|
+
scale: $,
|
|
5085
5085
|
rotation: D,
|
|
5086
|
-
quality:
|
|
5086
|
+
quality: _,
|
|
5087
5087
|
renderTextLayer: C,
|
|
5088
5088
|
renderAnnotationLayer: V,
|
|
5089
5089
|
containerWidth: B.width,
|
|
5090
5090
|
containerHeight: B.height
|
|
5091
5091
|
})),
|
|
5092
5092
|
load: async ({ request: d }) => {
|
|
5093
|
-
const v = await b, I = d.source,
|
|
5094
|
-
(g == null || !Ja(k,
|
|
5095
|
-
const
|
|
5096
|
-
u != null &&
|
|
5097
|
-
const C = await g.getPage(
|
|
5093
|
+
const v = await b, I = d.source, $ = rt(I), D = rt(I);
|
|
5094
|
+
(g == null || !Ja(k, $)) && (g != null && (g.destroy(), g = null), k = $, g = await v.getDocument(D).promise, l?.({ numPages: g.numPages }));
|
|
5095
|
+
const _ = d.page < 1 || d.page > g.numPages ? 1 : d.page;
|
|
5096
|
+
u != null && _ !== y && (y = _, u(_));
|
|
5097
|
+
const C = await g.getPage(_);
|
|
5098
5098
|
let V;
|
|
5099
5099
|
if (d.fit === "none")
|
|
5100
5100
|
V = d.scale;
|
|
@@ -5269,13 +5269,13 @@ function ws({
|
|
|
5269
5269
|
te((v) => {
|
|
5270
5270
|
const I = v.querySelector(
|
|
5271
5271
|
".bc-pdf-page-viewer__canvas"
|
|
5272
|
-
),
|
|
5272
|
+
), $ = v.querySelector(
|
|
5273
5273
|
".bc-pdf-page-viewer__text-layer"
|
|
5274
5274
|
), D = v.querySelector(
|
|
5275
5275
|
".bc-pdf-page-viewer__annotation-layer"
|
|
5276
5276
|
);
|
|
5277
|
-
return m.on(d, async (
|
|
5278
|
-
await
|
|
5277
|
+
return m.on(d, async (_) => {
|
|
5278
|
+
await _.render(I, $, D);
|
|
5279
5279
|
}), H;
|
|
5280
5280
|
})
|
|
5281
5281
|
)
|