@hypermedia-components/core 0.1.0 → 0.1.2
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/csrf-header.d.ts +25 -0
- package/dist/csrf-header.js +83 -0
- package/dist/datagrid.js +58 -11
- package/dist/field-errors.js +29 -5
- package/dist/hc-combobox.css +1 -1
- package/dist/hc-command.css +1 -1
- package/dist/hc-datagrid.css +3 -3
- package/dist/hc-dialog.css +1 -1
- package/dist/hc-drawer.css +1 -1
- package/dist/hc-hovercard.css +1 -1
- package/dist/hc-menu.css +1 -1
- package/dist/hc-multicombobox.css +1 -1
- package/dist/hc-navmenu.css +1 -1
- package/dist/hc-popover.css +1 -1
- package/dist/hc-switch.css +1 -1
- package/dist/hc-tabs.css +2 -2
- package/dist/hc-toast.css +1 -1
- package/dist/hc.behaviors.d.ts +2 -1
- package/dist/hc.behaviors.js +3 -0
- package/dist/hc.behaviors.min.js +2 -2
- package/dist/hc.core.css +10 -0
- package/dist/hc.core.min.css +1 -1
- package/dist/hc.css +26 -16
- package/dist/hc.min.css +1 -1
- package/dist/hc.min.js +2 -2
- package/dist/hc.tokens.core.css +10 -0
- package/dist/hc.tokens.css +10 -0
- package/dist/i18n.js +15 -8
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/locales/ja.d.ts +3 -0
- package/dist/locales/ja.js +44 -0
- package/package.json +11 -6
- package/src/tokens/README.md +9 -1
- package/src/tokens/semantic.tokens.json +8 -0
- package/src/tokens/theme.dark.tokens.json +8 -0
package/dist/hc.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Pe=Object.freeze({"combobox.empty":"No matches","combobox.loading":"Loading\u2026","combobox.error":"Couldn\u2019t load options","combobox.create":"Create \u201C{value}\u201D","multicombobox.empty":"No matches","multicombobox.create":"Add \u201C{value}\u201D","multicombobox.remove":"Remove {label}","calendar.label":"Calendar","calendar.prevMonth":"Previous month","calendar.nextMonth":"Next month","calendar.month":"Month","calendar.year":"Year","confirm.message":"Continue?","confirm.title":"Confirm","confirm.confirm":"Confirm","confirm.cancel":"Cancel","fieldErrors.unknown":"Invalid value","shell.toggleNav":"Toggle navigation","shell.collapseNav":"Collapse sidebar","splitter.resize":"Resize panels","themeToggle.label":"Switch color theme","toast.label":"Notifications"}),
|
|
2
|
-
`),n}function Gr(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ne])return e[Ne];let n=null,t=null;function r(){if(!n||!n.isConnected){n=Xr(e);let o=n.querySelector("[data-hc-confirm-cancel]"),s=n.querySelector("[data-hc-confirm-ok]");o.addEventListener("click",()=>n.close("cancel")),s.addEventListener("click",()=>n.close("confirm")),n.addEventListener("close",()=>{let c=t,l=n.returnValue;t=null,c&&l==="confirm"&&c.dispatchEvent(new CustomEvent("hc:confirmed",{bubbles:!0}))}),e.body.appendChild(n)}return n}function i(o){let s=o.target.closest("[data-hc-confirm]");if(!s)return;o.preventDefault(),o.stopPropagation();let c=r(),l=s.getAttribute("data-hc-confirm")||$("confirm.message"),f=s.getAttribute("data-hc-confirm-title")||$("confirm.title"),b=s.getAttribute("data-hc-confirm-label")||$("confirm.confirm"),h=s.getAttribute("data-hc-cancel-label")||$("confirm.cancel"),A=s.getAttribute("data-hc-confirm-variant")||s.getAttribute("data-variant")||"primary";c.querySelector("#hc-confirm-title").textContent=f,c.querySelector("#hc-confirm-message").textContent=l;let m=c.querySelector("[data-hc-confirm-ok]");m.textContent=b,m.setAttribute("data-variant",A),c.querySelector("[data-hc-confirm-cancel]").textContent=h,t=s,c.returnValue="",c.showModal(),c.querySelector("[data-hc-confirm-cancel]").focus()}e.addEventListener("click",i,!0);let a=()=>{e[Ne]===a&&(e.removeEventListener("click",i,!0),n&&n.isConnected&&n.remove(),n=null,t=null,delete e[Ne])};return e[Ne]=a,a}var jr=4500,Ie="__hcToastUninstall";function Zr(e){let n=e.querySelector("[data-hc-toast-region]");return n?{region:n,created:!1}:(n=e.createElement("div"),n.className="hc-toast-region",n.setAttribute("data-hc-toast-region",""),n.setAttribute("role","region"),n.setAttribute("aria-label",$("toast.label")),e.body.appendChild(n),{region:n,created:!0})}function rr(e,n,t){let r=t.variant||"info",i=r==="error";if(n.setAttribute("data-variant",r),n.setAttribute("role",i?"alert":"status"),n.setAttribute("aria-live",i?"assertive":"polite"),n.setAttribute("aria-atomic","true"),t.id!=null&&n.setAttribute("data-toast-id",String(t.id)),n.replaceChildren(),t.title){let s=e.createElement("div");s.className="hc-toast__title",s.textContent=String(t.title),n.appendChild(s)}let a=e.createElement("div");a.className="hc-toast__body",a.textContent=String(t.message??""),n.appendChild(a);let o=t.action;if(o&&o.label&&o.event){let s=e.createElement("button");s.className="hc-toast__action",s.type="button",s.textContent=String(o.label),n.appendChild(s),n._hcAction={id:t.id??null,event:String(o.event),action:o}}else n._hcAction=null}function Jr(e,n){let t=e.createElement("div");return t.className="hc-toast",rr(e,t,n),t}function Re(e){e._hcTimer&&(clearTimeout(e._hcTimer),e._hcTimer=null),e.remove()}function Qr(e){let n=parseInt(e.getAttribute("data-limit")??"",10);if(!(!Number.isFinite(n)||n<=0))for(;e.children.length>n&&e.firstElementChild;)Re(e.firstElementChild)}function ei(e){let n=0,t=0,r=1,i=!1;function a(c){c.button!=null&&c.button!==0||c.target.closest?.(".hc-toast__action")||(i=!0,n=c.clientX,t=0,r=e.offsetWidth||1,e.style.transition="none",e.setPointerCapture?.(c.pointerId))}function o(c){i&&(t=c.clientX-n,e.style.translate=`${t}px`,e.style.opacity=String(Math.max(0,1-Math.abs(t)/r)))}function s(c){if(i)if(i=!1,e.releasePointerCapture?.(c.pointerId),e.style.transition="",Math.abs(t)>r*.4){let l=t<0?-1:1;e.style.translate=`${l*(r+40)}px`,e.style.opacity="0",e.addEventListener("transitionend",()=>Re(e),{once:!0}),setTimeout(()=>Re(e),220)}else e.style.translate="",e.style.opacity=""}e.addEventListener("pointerdown",a),e.addEventListener("pointermove",o),e.addEventListener("pointerup",s),e.addEventListener("pointercancel",s)}function ti(e){e.addEventListener("click",n=>{let t=n.target.closest?.(".hc-toast__action");if(!t||!e.contains(t)||!e._hcAction)return;let{event:r,id:i,action:a}=e._hcAction;e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:{id:i,action:a,toast:e}})),Re(e)})}function ni(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ie])return e[Ie];let n=null;function t(i){let a=i&&i.detail;if(!a||!a.message)return;let{region:o,created:s}=Zr(e);s&&(n=o);let c=null;a.id!=null&&(c=[...o.querySelectorAll(".hc-toast")].find(f=>f.getAttribute("data-toast-id")===String(a.id))),c?(c._hcTimer&&(clearTimeout(c._hcTimer),c._hcTimer=null),rr(e,c,a)):(c=Jr(e,a),o.appendChild(c),Qr(o),ei(c),ti(c));let l=Number.isFinite(a.duration)?Number(a.duration):jr;l>0&&(c._hcTimer=setTimeout(()=>Re(c),l))}e.body.addEventListener("hc:toast",t);let r=()=>{e[Ie]===r&&(e.body.removeEventListener("hc:toast",t),n&&n.isConnected&&n.remove(),n=null,delete e[Ie])};return e[Ie]=r,r}var Ke="__hcCloseDialogUninstall";function ir(e){let n=e.target;if(!n||typeof n.matches!="function"||!n.closest("[data-hc-close-dialog-on-success]")||(e.detail||{}).successful!==!0)return;let i=n.closest("[data-hc-close-dialog-on-success]").closest("dialog");i&&typeof i.close=="function"&&i.close()}function ri(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ke])return e[Ke];e.body.addEventListener("htmx:afterRequest",ir);let n=()=>{e[Ke]===n&&(e.body.removeEventListener("htmx:afterRequest",ir),delete e[Ke])};return e[Ke]=n,n}var Fe="__hcClosePopoverUninstall";function or(e){let n=e.target;if(!n||typeof n.matches!="function")return;let t=n.closest("[data-hc-close-popover-on-success]");if(!t||(e.detail||{}).successful!==!0)return;let i=t.closest("[popover]");i&&typeof i.hidePopover=="function"&&i.hidePopover()}function ii(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Fe])return e[Fe];e.body.addEventListener("htmx:afterRequest",or);let n=()=>{e[Fe]===n&&(e.body.removeEventListener("htmx:afterRequest",or),delete e[Fe])};return e[Fe]=n,n}var Be="__hcRemoteDialogUninstall";function ar(e){let n=e.target;if(!n||typeof n.matches!="function"||!n.matches("[data-hc-remote-dialog-root]"))return;let t=n.querySelector("dialog");t&&typeof t.showModal=="function"&&!t.open&&t.showModal()}function oi(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Be])return e[Be];e.body.addEventListener("htmx:afterSwap",ar);let n=()=>{e[Be]===n&&(e.body.removeEventListener("htmx:afterSwap",ar),delete e[Be])};return e[Be]=n,n}var $e="__hcTabsUninstall";function Ct(e){return e.querySelector(':scope > [role="tablist"]')}function Tt(e){return Array.from(e.querySelectorAll(':scope > [role="tab"]'))}function ai(e){return Array.from(e.querySelectorAll(':scope > [role="tabpanel"]'))}function Ue(e){return!(e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")}function ur(e){return e.getAttribute("data-overflow")==="scroll"}function si(e,n){return e.getAttribute("data-orientation")==="vertical"||n!=null&&n.getAttribute("aria-orientation")==="vertical"}function sr(e,n){let t=e.createElement("button");return t.type="button",t.className="hc-tabs__scroll",t.dataset.dir=n,t.setAttribute("aria-hidden","true"),t.tabIndex=-1,t.hidden=!0,t}function ci(e,n){if(!ur(e))return null;let t=e.ownerDocument,r=t.defaultView,i=sr(t,"start"),a=sr(t,"end");e.append(i,a);let o=()=>r?r.getComputedStyle(n).direction==="rtl":!1;function s(){let m=n.offsetHeight;m&&(i.style.blockSize=`${m}px`,a.style.blockSize=`${m}px`);let S=n.scrollWidth-n.clientWidth,T=Math.abs(n.scrollLeft),y=S>1;i.hidden=!y||T<=1,a.hidden=!y||T>=S-1}function c(m){if(typeof n.scrollBy!="function")return;let S=Math.max(120,n.clientWidth*.8),T=(m?1:-1)*(o()?-1:1);n.scrollBy({left:T*S,behavior:"smooth"})}let l=()=>c(!1),f=()=>c(!0);i.addEventListener("click",l),a.addEventListener("click",f),n.addEventListener("scroll",s,{passive:!0});let b=null;typeof ResizeObserver<"u"&&(b=new ResizeObserver(s),b.observe(n));let h=null;typeof MutationObserver<"u"&&(h=new MutationObserver(s),h.observe(n,{childList:!0})),s();let A=n.querySelector(':scope > [role="tab"][aria-selected="true"]');return A&&typeof A.scrollIntoView=="function"&&A.scrollIntoView({inline:"nearest",block:"nearest",behavior:"instant"}),()=>{i.remove(),a.remove(),n.removeEventListener("scroll",s),b?.disconnect(),h?.disconnect()}}function kt(e,n,{focus:t=!0}={}){let r=Ct(e);if(!r)return;let i=Tt(r),a=ai(e);for(let o of i){let s=o===n;o.setAttribute("aria-selected",String(s)),o.setAttribute("tabindex",s?"0":"-1")}for(let o of a)i.find(l=>l.getAttribute("aria-controls")===o.id)===n?(o.removeAttribute("hidden"),o.dispatchEvent(new CustomEvent("hc:tabactivated",{bubbles:!0}))):o.setAttribute("hidden","until-found");t?n.focus():ur(e)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView({inline:"nearest",block:"nearest"})}function cr(e,n,t){let r=Ct(e),i=Tt(r).filter(Ue);if(i.length===0)return;let a=i.indexOf(n);if(a===-1)return;let o=i.length;i[(a+t+o)%o].focus()}function lr(e,n){let t=Ct(e),r=Tt(t).filter(Ue);r.length!==0&&(n==="first"?r[0]:r[r.length-1]).focus()}function Zt(e,n){if(n.has(e))return;let t=Ct(e);if(!t)return;let r=e.getAttribute("data-activation")==="automatic";e.getAttribute("data-orientation")==="vertical"&&t.setAttribute("aria-orientation","vertical");function i(l){let f=l.target.closest('[role="tab"]');!f||!t.contains(f)||!Ue(f)||(l.preventDefault(),kt(e,f))}function a(l){let f=l.target.closest('[role="tab"]');if(!f||!t.contains(f))return;let b=si(e,t),h=l.key;!b&&getComputedStyle(t).direction==="rtl"&&(h==="ArrowRight"?h="ArrowLeft":h==="ArrowLeft"&&(h="ArrowRight"));let A=b?"ArrowDown":"ArrowRight",m=b?"ArrowUp":"ArrowLeft";switch(h){case A:l.preventDefault(),cr(e,f,1);break;case m:l.preventDefault(),cr(e,f,-1);break;case"Home":l.preventDefault(),lr(e,"first");break;case"End":l.preventDefault(),lr(e,"last");break;case"Enter":case" ":if(!Ue(f))return;l.preventDefault(),kt(e,f);break;default:break}}function o(l){if(!r)return;let f=l.target.closest('[role="tab"]');!f||!t.contains(f)||!Ue(f)||kt(e,f,{focus:!1})}function s(l){let f=l.target.closest('[role="tabpanel"]');if(!f||f.parentElement!==e)return;let b=Tt(t).find(h=>h.getAttribute("aria-controls")===f.id);b&&kt(e,b,{focus:!1})}let c=ci(e,t);e.addEventListener("click",i),e.addEventListener("keydown",a),e.addEventListener("focusin",o),e.addEventListener("beforematch",s),n.set(e,()=>{e.removeEventListener("click",i),e.removeEventListener("keydown",a),e.removeEventListener("focusin",o),e.removeEventListener("beforematch",s),c?.()})}function li(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[$e])return e[$e];let n=new Map;for(let i of e.querySelectorAll(".hc-tabs"))Zt(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-tabs")&&Zt(o,n),o.querySelectorAll?.(".hc-tabs").forEach(s=>Zt(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[$e]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[$e]}};return e[$e]=r,r}var se='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]';function Ee(e){return Array.from(e.querySelectorAll(se)).filter(n=>n.closest(".hc-menu")===e)}function V(e){return!(e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")}function ui(e){return e.closest('[role="group"]')??e.closest(".hc-menu")}function Jt(e,n){let t=Ee(e).filter(V);if(t.length===0)return;let r=t.length;t[(n%r+r)%r].focus()}function ge(e){Jt(e,0)}function Qt(e){let n=Ee(e).filter(V).length;n>0&&Jt(e,n-1)}function fr(e,n,t){let r=Ee(e).filter(V);if(r.length===0)return;let i=r.indexOf(n),a=i===-1?t>0?-1:0:i;Jt(e,a+t)}function fi(e,n,t){let r=Ee(e).filter(V);if(r.length===0)return;let i=r.indexOf(n),a=t.toLowerCase();for(let o=1;o<=r.length;o++){let s=(i+o+r.length)%r.length;if(r[s].textContent.trim().toLowerCase().startsWith(a)){r[s].focus();return}}}function dr(e,n){let t=e.ownerDocument.activeElement;switch(n.key){case"ArrowDown":return n.preventDefault(),fr(e,t,1),!0;case"ArrowUp":return n.preventDefault(),fr(e,t,-1),!0;case"Home":return n.preventDefault(),ge(e),!0;case"End":return n.preventDefault(),Qt(e),!0;case"Tab":return n.preventDefault(),e.hidePopover(),!0;default:return n.key.length===1&&/\S/.test(n.key)&&!n.ctrlKey&&!n.metaKey?(fi(e,t,n.key),!0):!1}}function Mt(e,n,t={}){let r=n.getAttribute("role"),i;if(r==="menuitemcheckbox")i=n.getAttribute("aria-checked")!=="true",n.setAttribute("aria-checked",String(i));else if(r==="menuitemradio"){i=!0;let a=ui(n);if(a){let o=n.closest(".hc-menu");for(let s of a.querySelectorAll('[role="menuitemradio"]'))s.closest(".hc-menu")===o&&s.setAttribute("aria-checked",s===n?"true":"false")}else n.setAttribute("aria-checked","true")}return e.dispatchEvent(new CustomEvent("hc:menuselect",{bubbles:!0,detail:{item:n,menu:e,checked:i,...t}})),{role:r,checked:i}}function j(){try{return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("anchor-name","--x")}catch{return!1}}var Dt=(e,n,t)=>Math.max(n,Math.min(e,t)),di={top:"block-start",bottom:"block-end",left:"inline-start",right:"inline-end"};function Le(e,n={}){let t=di[e.getAttribute("data-side")]??n.side??"block-end",r=e.getAttribute("data-align"),i=["start","center","end"].includes(r)?r:n.align??"start";return{side:t,align:i}}function hi(e,n,t={}){let{side:r="block-end",align:i="start",gap:a=4,matchWidth:o=!1}=t,s=n.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e.ownerDocument.defaultView,f=l?.innerWidth??0,b=l?.innerHeight??0,h=l?l.getComputedStyle(n).direction==="rtl":!1;if(r==="inline-end"||r==="inline-start"){let S=r==="inline-end"!==h,T;S?(T=s.right+a,T+c.width>f&&s.left-c.width-a>=0&&(T=s.left-c.width-a)):(T=s.left-c.width-a,T<0&&s.right+c.width+a<=f&&(T=s.right+a));let y;i==="center"?y=s.top+(s.height-c.height)/2:i==="end"?(y=s.bottom-c.height,y<0&&s.top+c.height<=b&&(y=s.top)):(y=s.top,y+c.height>b&&s.bottom-c.height>=0&&(y=s.bottom-c.height)),y=Dt(y,a,Math.max(a,b-c.height-a)),T=Dt(T,a,Math.max(a,f-c.width-a)),e.style.position="fixed",e.style.top=`${y}px`,e.style.left=`${T}px`,e.style.insetInlineStart="auto",e.style.insetBlockStart="auto",e.style.margin="0",o&&(e.style.minWidth=`${s.width}px`);return}let A;r==="block-start"?(A=s.top-c.height-a,A<0&&s.bottom+c.height+a<=b&&(A=s.bottom+a)):(A=s.bottom+a,A+c.height>b&&s.top-c.height-a>=0&&(A=s.top-c.height-a));let m;i==="center"?m=s.left+(s.width-c.width)/2:i!=="end"!==h?(m=s.left,m+c.width>f&&s.right-c.width>=0&&(m=s.right-c.width)):(m=s.right-c.width,m<0&&s.left+c.width<=f&&(m=s.left)),A=Dt(A,a,Math.max(a,b-c.height-a)),m=Dt(m,a,Math.max(a,f-c.width-a)),e.style.position="fixed",e.style.top=`${A}px`,e.style.left=`${m}px`,e.style.insetInlineStart="auto",e.style.insetBlockStart="auto",e.style.margin="0",o&&(e.style.minWidth=`${s.width}px`)}var pi=["position","top","left","inset-inline-start","inset-block-start","margin","min-width"];function Z(e,n,t={}){let r=e.ownerDocument.defaultView,i=()=>hi(e,n,t);i(),r?.addEventListener("scroll",i,!0),r?.addEventListener("resize",i);let a=!1;return()=>{if(!a){a=!0,r?.removeEventListener("scroll",i,!0),r?.removeEventListener("resize",i);for(let o of pi)e.style.removeProperty(o)}}}var nn="data-hc-submenu",mi=0;function hr(e){let n=e.getAttribute?.(nn);return n?e.ownerDocument.getElementById(n):null}function de(e){return e!=null&&hr(e)!=null}function qt(e){try{return e.matches(":popover-open")}catch{return!1}}function en(e,{focus:n=!1}={}){let t=e.__hcSubmenu;!t||typeof t.showPopover!="function"||(qt(t)||t.showPopover(),n&&ge(t))}function tn(e,{focusParent:n=!1}={}){e&&(qt(e)&&typeof e.hidePopover=="function"&&e.hidePopover(),n&&e.__hcSubmenuParent&&e.__hcSubmenuParent.focus())}function bi(e){let n=[];for(let t of e.querySelectorAll(`[${nn}]`)){if(t.closest(".hc-menu")!==e)continue;let r=t.__hcSubmenu;r&&qt(r)&&n.push(r)}return n}function vi(e,n){let t=hr(e);if(!t)return;t.id||(t.id=`hc-submenu-${mi+=1}`),t.hasAttribute("popover")||t.setAttribute("popover","auto"),t.getAttribute("role")||t.setAttribute("role","menu"),t.setAttribute("data-submenu",""),e.setAttribute("aria-haspopup","menu"),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-controls",t.id),e.__hcSubmenu=t,t.__hcSubmenuParent=e;let r=j(),i=`--hc-submenu-${t.id}`;r&&(e.style.setProperty("anchor-name",i),t.style.setProperty("position-anchor",i));let a=null;function o(c){e.setAttribute("aria-expanded",String(c.newState==="open"))}function s(c){r||(c.newState==="open"?a=Z(t,e,{side:"inline-end",gap:2}):(a?.(),a=null))}t.addEventListener("toggle",o),t.addEventListener("beforetoggle",s),n.push(()=>{t.removeEventListener("toggle",o),t.removeEventListener("beforetoggle",s),a?.(),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls"),t.removeAttribute("data-submenu"),r&&(e.style.removeProperty("anchor-name"),t.style.removeProperty("position-anchor")),delete e.__hcSubmenu,delete t.__hcSubmenuParent})}function Ot(e){let n=[];for(let a of e.querySelectorAll(`[${nn}]`))vi(a,n);if(n.length===0)return()=>{};function t(a){let o=a.target.closest?.(se);if(!o||!e.contains(o))return;let s=o.closest(".hc-menu");if(s){for(let c of bi(s))c.__hcSubmenuParent!==o&&tn(c);de(o)&&V(o)&&en(o)}}function r(a){let o=a.target.closest?.(se);if(!o||!e.contains(o)||!de(o)||!V(o))return;a.preventDefault();let s=o.__hcSubmenu;qt(s)?tn(s,{focusParent:!0}):en(o,{focus:!0})}e.addEventListener("pointerover",t),e.addEventListener("click",r);let i=!1;return()=>{if(!i){i=!0,e.removeEventListener("pointerover",t),e.removeEventListener("click",r);for(let a of n)a()}}}function Pt(e,n){let t=n.target.closest?.(se)??null,r=(t??n.target).closest?.(".hc-menu")??e,i=r.ownerDocument.defaultView?r.ownerDocument.defaultView.getComputedStyle(r).direction==="rtl":!1,a=i?"ArrowLeft":"ArrowRight",o=i?"ArrowRight":"ArrowLeft";if(t&&de(t)&&V(t)&&n.key===a){n.preventDefault(),en(t,{focus:!0});return}if(n.key===o&&r!==e&&r.__hcSubmenuParent){n.preventDefault(),tn(r,{focusParent:!0});return}if(n.key==="Tab"){n.preventDefault(),e.hidePopover?.();return}dr(r,n)}var Ye="__hcMenuUninstall";function gi(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):String(e).replace(/[^\w-]/g,n=>`\\${n}`)}function yi(e){return e.id?e.ownerDocument.querySelector(`[popovertarget="${gi(e.id)}"]`):null}function rn(e,n){if(n.has(e)||!e.hasAttribute("popover"))return;let t=yi(e);if(!t)return;t.setAttribute("aria-haspopup","menu"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id);let r=`--hc-menu-${e.id}`,i=j();i&&(t.style.setProperty("anchor-name",r),e.style.setProperty("position-anchor",r));let a=null;function o(A){let m=A.newState==="open";t.setAttribute("aria-expanded",String(m))}let s=null,c=Ee(e).find(V);c&&!e.querySelector("[autofocus]")&&(c.setAttribute("autofocus",""),s=c);function l(A){i||(A.newState==="open"?a=Z(e,t,{side:"block-end"}):(a?.(),a=null))}function f(A){e.matches(":popover-open")&&Pt(e,A)}function b(A){let m=A.target.closest(se);if(!m||!e.contains(m)||!V(m)||de(m))return;let S=m.closest(".hc-menu")||e,{role:T}=Mt(S,m,{trigger:t});T==="menuitem"&&e.hidePopover()}let h=Ot(e);e.addEventListener("toggle",o),e.addEventListener("beforetoggle",l),e.addEventListener("keydown",f),e.addEventListener("click",b),n.set(e,()=>{e.removeEventListener("toggle",o),e.removeEventListener("beforetoggle",l),e.removeEventListener("keydown",f),e.removeEventListener("click",b),h(),a?.(),a=null,t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls"),i&&(t.style.removeProperty("anchor-name"),e.style.removeProperty("position-anchor")),s&&s.removeAttribute("autofocus")})}function Ai(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ye])return e[Ye];let n=new Map;for(let i of e.querySelectorAll(".hc-menu"))rn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-menu")&&rn(o,n),o.querySelectorAll?.(".hc-menu").forEach(s=>rn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[Ye]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[Ye]}};return e[Ye]=r,r}var ze="__hcMenubarUninstall",on='.hc-menubar[role="menubar"]';function pr(e){let n=e.ownerDocument.defaultView;return n?n.getComputedStyle(e).direction==="rtl":!1}function ye(e){return Array.from(e.querySelectorAll('[role="menuitem"]')).filter(n=>n.closest(".hc-menu")==null&&n.closest('[role="menubar"]')===e)}function cn(e){let n=e.getAttribute("popovertarget")||e.getAttribute("aria-controls");return n?e.ownerDocument.getElementById(n):null}function He(e,n){let t=ye(e),r=t.filter(V),i=n&&r.includes(n)?n:null;i||(i=r.find(a=>a.getAttribute("tabindex")==="0")??r[0]??null);for(let a of t)a.setAttribute("tabindex",a===i?"0":"-1")}function mr(e,n,t){let r=ye(e).filter(V),i=r.indexOf(n);if(i===-1)return;let a=r[(i+t+r.length)%r.length];a.focus(),He(e,a)}function br(e,n){let t=ye(e).filter(V);if(!t.length)return;let r=n==="first"?t[0]:t[t.length-1];r.focus(),He(e,r)}function an(e,n){let t=cn(e);if(!(!t||typeof t.showPopover!="function")){try{t.showPopover()}catch{}n==="last"?Qt(t):ge(t)}}function sn(e,n){if(n.has(e))return;let t=[];He(e,null);function r(o){let s=o.target.closest?.('[role="menuitem"]');if(!s||!ye(e).includes(s))return;let c=pr(e),l=c?"ArrowLeft":"ArrowRight",f=c?"ArrowRight":"ArrowLeft";switch(o.key){case l:o.preventDefault(),mr(e,s,1);break;case f:o.preventDefault(),mr(e,s,-1);break;case"Home":o.preventDefault(),br(e,"first");break;case"End":o.preventDefault(),br(e,"last");break;case"ArrowDown":o.preventDefault(),an(s,"first");break;case"ArrowUp":o.preventDefault(),an(s,"last");break;default:break}}function i(o){let s=o.target.closest?.('[role="menuitem"]');s&&ye(e).includes(s)&&He(e,s)}e.addEventListener("keydown",r),e.addEventListener("focusin",i),t.push(()=>{e.removeEventListener("keydown",r),e.removeEventListener("focusin",i)});function a(o,s){let c=ye(e).filter(V),l=c.indexOf(o);if(l===-1)return;let f=c[(l+s+c.length)%c.length],b=cn(o);if(b&&typeof b.hidePopover=="function")try{b.hidePopover()}catch{}He(e,f),an(f,"first")}for(let o of ye(e)){let s=cn(o);if(!s)continue;let c=l=>{let f=l.target.closest?.(se);if((f??l.target).closest?.(".hc-menu")!==s)return;let h=pr(s),A=h?"ArrowLeft":"ArrowRight",m=h?"ArrowRight":"ArrowLeft";if(l.key===A){if(f&&de(f))return;l.preventDefault(),a(o,1)}else l.key===m&&(l.preventDefault(),a(o,-1))};s.addEventListener("keydown",c),t.push(()=>s.removeEventListener("keydown",c))}n.set(e,()=>{for(let o of t)o()})}function wi(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ze])return e[ze];let n=new Map;for(let i of e.querySelectorAll(on))sn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(on)&&sn(o,n),o.querySelectorAll?.(on).forEach(s=>sn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ze]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ze]}};return e[ze]=r,r}var Ve="__hcNavmenuUninstall",Ei=100,Li=150,vr='a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])',Si=0;function ln(e){try{if(e.matches(":popover-open"))return!0}catch{}return e.hasAttribute("open")}function xi(e){let n=e.getAttribute("aria-controls");if(n){let r=e.ownerDocument.getElementById(n);if(r)return r}let t=e.nextElementSibling;return t&&t.matches?.(".hc-navmenu__panel, [data-hc-navmenu-panel]")?t:null}function un(e,n){if(n.has(e))return;let t=Array.from(e.querySelectorAll("[data-hc-navmenu-trigger]")).filter(p=>p.closest(".hc-navmenu")===e);if(t.length===0)return;let r=j(),i=[],a=[],o=new WeakMap,s=new WeakMap,c=null,l=null,f=null,b=!1,h=p=>i.find(v=>v.trigger===p)||null;function A(){l&&clearTimeout(l),f&&clearTimeout(f),l=null,f=null}function m(p){if(ln(p.panel)&&typeof p.panel.hidePopover=="function")try{p.panel.hidePopover()}catch{}}function S(p){if(A(),!ln(p.panel)){if(c&&c!==p.trigger){let v=h(c);v&&m(v)}if(typeof p.panel.showPopover=="function")try{p.panel.showPopover()}catch{}}}function T(){let p=e.ownerDocument.activeElement;for(let v of i){let q=s.get(v.trigger);if(q&&(q.th||q.ph)||v.trigger===p||v.panel.contains(p))return!0}return!1}function y(){clearTimeout(f),f=setTimeout(()=>{if(!T()&&c){let p=h(c);p&&m(p)}},Li)}function N(p){clearTimeout(l),l=setTimeout(()=>S(p),Ei)}for(let p of t){let v=xi(p);if(!v)continue;v.id||(v.id=`hc-navmenu-panel-${Si+=1}`),v.hasAttribute("popover")||v.setAttribute("popover","auto"),p.setAttribute("aria-haspopup","true"),p.setAttribute("aria-expanded","false"),p.setAttribute("aria-controls",v.id);let q=`--hc-navmenu-${v.id}`;r&&(p.style.setProperty("anchor-name",q),v.style.setProperty("position-anchor",q));let k={trigger:p,panel:v,anchorName:q};i.push(k),s.set(p,{th:!1,ph:!1});let L=ie=>{let le=ie.newState==="open";if(p.setAttribute("aria-expanded",String(le)),le)c=p,!r&&!o.has(v)&&o.set(v,Z(v,p,{side:"block-end",align:"start",gap:4}));else{let he=o.get(v);he&&(he(),o.delete(v)),c===p&&(c=null)}};v.addEventListener("toggle",L);let O=()=>{s.get(p).th=!0,N(k)},x=()=>{s.get(p).th=!1,y()},C=()=>{b||S(k)},F=()=>y(),w=()=>{s.get(p).ph=!0,A()},I=()=>{s.get(p).ph=!1,y()},H=()=>y();p.addEventListener("mouseenter",O),p.addEventListener("mouseleave",x),p.addEventListener("focus",C),p.addEventListener("blur",F),v.addEventListener("mouseenter",w),v.addEventListener("mouseleave",I),v.addEventListener("focusout",H),a.push(()=>{v.removeEventListener("toggle",L),p.removeEventListener("mouseenter",O),p.removeEventListener("mouseleave",x),p.removeEventListener("focus",C),p.removeEventListener("blur",F),v.removeEventListener("mouseenter",w),v.removeEventListener("mouseleave",I),v.removeEventListener("focusout",H);let ie=o.get(v);ie&&(ie(),o.delete(v)),p.removeAttribute("aria-haspopup"),p.removeAttribute("aria-expanded"),r&&(p.style.removeProperty("anchor-name"),v.style.removeProperty("position-anchor"))})}function _(p){let v=p.target.closest?.("[data-hc-navmenu-trigger]");if(!v||v.closest(".hc-navmenu")!==e)return;let q=h(v);q&&(p.preventDefault(),ln(q.panel)?m(q):S(q))}function D(p){if(p.key==="Escape"&&c){let k=h(c),L=c;k&&(b=!0,m(k),L.focus(),p.preventDefault(),setTimeout(()=>{b=!1},0));return}let v=p.target.closest?.("[data-hc-navmenu-trigger]");if(!v||v.closest(".hc-navmenu")!==e)return;let q=h(v);if(q){if(p.key==="ArrowDown")p.preventDefault(),S(q),q.panel.querySelector(vr)?.focus();else if(p.key==="ArrowUp"){p.preventDefault(),S(q);let k=q.panel.querySelectorAll(vr);k[k.length-1]?.focus()}}}e.addEventListener("click",_),e.addEventListener("keydown",D),a.push(()=>{A(),e.removeEventListener("click",_),e.removeEventListener("keydown",D)}),n.set(e,()=>{for(let p of a)p()})}function _i(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ve])return e[Ve];let n=new Map;for(let i of e.querySelectorAll(".hc-navmenu"))un(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-navmenu")&&un(o,n),o.querySelectorAll?.(".hc-navmenu").forEach(s=>un(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[Ve]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[Ve]}};return e[Ve]=r,r}var We="__hcTooltipUninstall",ki=300,Ci=100;function Ti(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):String(e).replace(/[^\w-]/g,n=>`\\${n}`)}function Mi(e){return e.id?Array.from(e.ownerDocument.querySelectorAll(`[aria-describedby~="${Ti(e.id)}"]`)):[]}function fn(e,n){if(n.has(e)||!e.id)return;let t=Mi(e);if(t.length===0)return;e.hasAttribute("popover")||e.setAttribute("popover","manual"),e.hasAttribute("role")||e.setAttribute("role","tooltip");let r=j(),i=`--hc-tooltip-${e.id}`,a=null,o=null,s=null;function c(){a&&clearTimeout(a),o&&clearTimeout(o),a=null,o=null}function l(m){c(),!e.matches(":popover-open")&&(r&&(m.style.setProperty("anchor-name",i),e.style.setProperty("position-anchor",i)),e.showPopover(),r||(s=Z(e,m,Le(e,{side:"block-start",align:"center"}))))}function f(){c(),s?.(),s=null,e.matches(":popover-open")&&e.hidePopover()}function b(m){c(),a=setTimeout(()=>l(m),ki)}function h(){c(),o=setTimeout(f,Ci)}let A=new Map;for(let m of t){let S=()=>b(m),T=()=>h(),y=()=>l(m),N=()=>f(),_=D=>{D.key==="Escape"&&e.matches(":popover-open")&&(D.stopPropagation(),f())};m.addEventListener("mouseenter",S),m.addEventListener("mouseleave",T),m.addEventListener("focus",y),m.addEventListener("blur",N),m.addEventListener("keydown",_),A.set(m,{onMouseEnter:S,onMouseLeave:T,onFocus:y,onBlur:N,onKeydown:_})}n.set(e,()=>{c(),e.matches(":popover-open")&&e.hidePopover();for(let[m,S]of A)m.removeEventListener("mouseenter",S.onMouseEnter),m.removeEventListener("mouseleave",S.onMouseLeave),m.removeEventListener("focus",S.onFocus),m.removeEventListener("blur",S.onBlur),m.removeEventListener("keydown",S.onKeydown),r&&m.style.removeProperty("anchor-name");r&&e.style.removeProperty("position-anchor")})}function Di(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[We])return e[We];let n=new Map;for(let i of e.querySelectorAll(".hc-tooltip"))fn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-tooltip")&&fn(o,n),o.querySelectorAll?.(".hc-tooltip").forEach(s=>fn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[We]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[We]}};return e[We]=r,r}var Xe="__hcPopoverUninstall",dn=".hc-popover[data-side]";function qi(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):String(e).replace(/[^\w-]/g,n=>`\\${n}`)}function Oi(e){return e.id?e.ownerDocument.querySelector(`[popovertarget="${qi(e.id)}"]`):null}function hn(e,n){if(n.has(e)||!e.hasAttribute("popover"))return;let t=Oi(e);if(!t)return;t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id);let r=`--hc-popover-${e.id}`,i=j();i&&(t.style.setProperty("anchor-name",r),e.style.setProperty("position-anchor",r));let a=null;function o(c){t.setAttribute("aria-expanded",String(c.newState==="open"))}function s(c){i||(c.newState==="open"?a=Z(e,t,{...Le(e,{side:"block-end",align:"center"}),gap:8}):(a?.(),a=null))}e.addEventListener("toggle",o),e.addEventListener("beforetoggle",s),n.set(e,()=>{e.removeEventListener("toggle",o),e.removeEventListener("beforetoggle",s),a?.(),a=null,t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls"),i&&(t.style.removeProperty("anchor-name"),e.style.removeProperty("position-anchor"))})}function Pi(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Xe])return e[Xe];let n=new Map;for(let i of e.querySelectorAll(dn))hn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(dn)&&hn(o,n),o.querySelectorAll?.(dn).forEach(s=>hn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[Xe]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[Xe]}};return e[Xe]=r,r}var Ge="__hcSliderUninstall";function Ni(e){let n=Number(e.min)||0,t=Number(e.max)||100;if(t===n)return 0;let r=Number(e.value);return Math.max(0,Math.min(100,(r-n)/(t-n)*100))}function gr(e){e.style.setProperty("--hc-slider-value",String(Ni(e)))}function pn(e,n){if(n.has(e))return;gr(e);let t=()=>gr(e);e.addEventListener("input",t),n.set(e,()=>{e.removeEventListener("input",t),e.style.removeProperty("--hc-slider-value")})}function Ii(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ge])return e[Ge];let n=new Map;for(let i of e.querySelectorAll(".hc-slider"))pn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-slider")&&pn(o,n),o.querySelectorAll?.(".hc-slider").forEach(s=>pn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[Ge]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[Ge]}};return e[Ge]=r,r}var je="__hcComboboxUninstall",Ri=120;function Ki(e){return e.querySelector('[role="combobox"]')}function Fi(e){return e.querySelector('[role="listbox"]')}function Se(e){return Array.from(e.querySelectorAll(':scope > [role="option"]'))}function Nt(e){return Se(e).filter(n=>!n.hasAttribute("hidden")&&n.getAttribute("aria-disabled")!=="true")}function Qe(e){return e.dataset.label??(e.textContent??"").trim()}function Bi(e){return(e.dataset.search??Qe(e)).toLowerCase()}function bn(e){for(let n of Se(e))n.removeAttribute("data-active")}function Ze(e,n,t){bn(n),t?(t.setAttribute("data-active","true"),t.id||(t.id=`hc-combobox-opt-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("aria-activedescendant",t.id),t.scrollIntoView?.({block:"nearest"})):e.removeAttribute("aria-activedescendant")}function $i(e,n){let t=e.querySelector(":scope > .hc-combobox__create");return n?(t||(t=e.ownerDocument.createElement("li"),t.className="hc-combobox__option hc-combobox__create",t.setAttribute("role","option")),t.dataset.value=n,t.textContent=$("combobox.create",{value:n}),e.appendChild(t),t):(t&&t.remove(),null)}function Ui(e,n){let t=e.value.trim(),r=t.toLowerCase(),i=null,a=0,o=!1;for(let l of Se(n)){if(l.classList.contains("hc-combobox__create"))continue;r!==""&&Qe(l).toLowerCase()===r&&(o=!0),r===""||Bi(l).includes(r)?(l.removeAttribute("hidden"),i||(i=l),a+=1):l.setAttribute("hidden","")}let s=n.closest(".hc-combobox")?.hasAttribute("data-allow-create"),c=$i(n,s&&t!==""&&!o?t:null);return Je(n,a===0&&!c),i??c}function Je(e,n){let t=e.querySelector(".hc-combobox__empty");n?t||(t=e.ownerDocument.createElement("li"),t.className="hc-combobox__empty",t.setAttribute("role","presentation"),t.textContent=e.getAttribute("data-hc-empty")||$("combobox.empty"),e.appendChild(t)):t&&t.remove()}function It(e,n,t,r){let i=e.querySelector("."+n);t?(i||(i=e.ownerDocument.createElement("li"),i.className=n,i.setAttribute("role","presentation"),e.appendChild(i)),i.textContent=r):i&&i.remove()}function yr(e,n){let t=e.value.trim().toLowerCase();for(let r of Se(n)){let i=Qe(r).toLowerCase();t!==""&&i===t?r.setAttribute("aria-selected","true"):r.removeAttribute("aria-selected")}}function mn(e,n){if(n.has(e))return;let t=Ki(e),r=Fi(e);if(!t||!r)return;r.hasAttribute("popover")||r.setAttribute("popover","manual"),t.hasAttribute("role")||t.setAttribute("role","combobox"),t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","listbox"),t.hasAttribute("aria-autocomplete")||t.setAttribute("aria-autocomplete","list"),!t.hasAttribute("aria-controls")&&r.id&&t.setAttribute("aria-controls",r.id),t.setAttribute("aria-expanded","false");let i=e.hasAttribute("data-remote"),a=j(),o=`--hc-combobox-${r.id||Math.random().toString(36).slice(2,9)}`;a&&(t.style.setProperty("anchor-name",o),r.style.setProperty("position-anchor",o));let s=null,c=null;function l(){if(r.matches(":popover-open"))return;r.showPopover(),t.setAttribute("aria-expanded","true"),a||(c=Z(r,t,{side:"block-end",matchWidth:!0}));let x=Se(r).find(C=>C.getAttribute("aria-selected")==="true");Ze(t,r,x??Nt(r)[0]??null)}function f(){r.matches(":popover-open")&&(r.hidePopover(),c?.(),c=null,t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),bn(r))}function b(x){if(!x||x.getAttribute("aria-disabled")==="true")return;let C=x.classList.contains("hc-combobox__create"),F=C?x.dataset.value??"":x.getAttribute("data-value")??Qe(x),w=C?x.dataset.value??"":Qe(x);t.value=w,yr(t,r),t.dispatchEvent(new CustomEvent("hc:comboboxselect",{bubbles:!0,detail:{value:F,label:w,option:x,input:t,created:C}})),f()}function h(x){let C=Nt(r);if(C.length===0)return;let F=r.querySelector('[data-active="true"]'),w=F?C.indexOf(F):-1,I=C[Math.max(0,Math.min(C.length-1,w+x))]??C[x>0?0:C.length-1];Ze(t,r,I)}function A(x){let C=Nt(r);C.length!==0&&Ze(t,r,x==="first"?C[0]:C[C.length-1])}function m(){s&&clearTimeout(s),l()}function S(){s&&clearTimeout(s),s=setTimeout(f,Ri)}function T(){let x=Se(r).length,C=x===0&&r.getAttribute("aria-busy")!=="true"&&!r.hasAttribute("data-error");Je(r,C),x>0&&Ze(t,r,Nt(r)[0]??null)}function y(x){x?(r.setAttribute("aria-busy","true"),N(!1),Je(r,!1),It(r,"hc-combobox__loading",!0,r.getAttribute("data-hc-loading")||$("combobox.loading")),r.matches(":popover-open")||l()):(r.removeAttribute("aria-busy"),It(r,"hc-combobox__loading",!1))}function N(x){x?(r.setAttribute("data-error",""),Je(r,!1),It(r,"hc-combobox__error",!0,r.getAttribute("data-hc-error")||$("combobox.error")),r.matches(":popover-open")||l()):(r.removeAttribute("data-error"),It(r,"hc-combobox__error",!1))}function _(){y(!0)}function D(x){y(!1);let C=x&&x.detail;!!(C&&(C.failed||C.xhr&&C.xhr.status>=400))?N(!0):(N(!1),T())}function p(){y(!1),N(!0)}function v(){if(i){r.matches(":popover-open")||l();return}let x=Ui(t,r);r.matches(":popover-open")||l(),Ze(t,r,x)}function q(x){switch(x.key){case"ArrowDown":x.preventDefault(),r.matches(":popover-open")?h(1):l();break;case"ArrowUp":x.preventDefault(),r.matches(":popover-open")?h(-1):l();break;case"Home":r.matches(":popover-open")&&(x.preventDefault(),A("first"));break;case"End":r.matches(":popover-open")&&(x.preventDefault(),A("last"));break;case"Enter":{if(!r.matches(":popover-open"))return;let C=r.querySelector('[data-active="true"]');C&&(x.preventDefault(),b(C));break}case"Escape":r.matches(":popover-open")&&(x.preventDefault(),f());break;case"Tab":f();break;default:break}}function k(x){let C=x.target.closest('[role="option"]');C&&r.contains(C)&&(s&&clearTimeout(s),b(C),t.focus())}function L(x){x.preventDefault()}t.addEventListener("focus",m),t.addEventListener("blur",S),t.addEventListener("input",v),t.addEventListener("keydown",q),r.addEventListener("click",k),r.addEventListener("mousedown",L);let O=null;i&&(t.addEventListener("htmx:beforeRequest",_),t.addEventListener("htmx:afterRequest",D),t.addEventListener("htmx:responseError",p),typeof MutationObserver<"u"&&(O=new MutationObserver(()=>{r.getAttribute("aria-busy")!=="true"&&T()}),O.observe(r,{childList:!0}))),yr(t,r),n.set(e,()=>{s&&clearTimeout(s),r.matches(":popover-open")&&r.hidePopover(),t.removeEventListener("focus",m),t.removeEventListener("blur",S),t.removeEventListener("input",v),t.removeEventListener("keydown",q),r.removeEventListener("click",k),r.removeEventListener("mousedown",L),i&&(t.removeEventListener("htmx:beforeRequest",_),t.removeEventListener("htmx:afterRequest",D),t.removeEventListener("htmx:responseError",p),O?.disconnect()),t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-autocomplete"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-activedescendant"),a&&(t.style.removeProperty("anchor-name"),r.style.removeProperty("position-anchor")),bn(r),Je(r,!1)})}function Yi(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[je])return e[je];let n=new Map;for(let i of e.querySelectorAll(".hc-combobox"))mn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-combobox")&&mn(o,n),o.querySelectorAll?.(".hc-combobox").forEach(s=>mn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[je]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[je]}};return e[je]=r,r}var et="__hcMulticomboboxUninstall",zi=120;function Hi(e){return e.querySelector('[role="combobox"]')}function Vi(e){return e.querySelector('[role="listbox"]')}function Wi(e){return e.querySelector(".hc-multicombobox__tags")}function Xi(e){let n=e.querySelector(".hc-multicombobox__hidden");return n||(n=e.ownerDocument.createElement("span"),n.className="hc-multicombobox__hidden",n.hidden=!0,e.appendChild(n)),n}function xe(e){return Array.from(e.querySelectorAll(':scope > [role="option"]'))}function vn(e){return xe(e).filter(n=>!n.hasAttribute("hidden")&&n.getAttribute("aria-disabled")!=="true")}function Ft(e){return e.dataset.label??(e.textContent??"").trim()}function Kt(e){return e.getAttribute("data-value")??Ft(e)}function Gi(e){return(e.dataset.search??Ft(e)).toLowerCase()}function ji(e,n){return xe(e).find(t=>Kt(t)===n)??null}function An(e){for(let n of xe(e))n.removeAttribute("data-active")}function Rt(e,n,t){An(n),t?(t.setAttribute("data-active","true"),t.id||(t.id=`hc-multicombobox-opt-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("aria-activedescendant",t.id),t.scrollIntoView?.({block:"nearest"})):e.removeAttribute("aria-activedescendant")}function Zi(e,n){let t=e.querySelector(":scope > .hc-multicombobox__create");return n?(t||(t=e.ownerDocument.createElement("li"),t.className="hc-multicombobox__option hc-multicombobox__create",t.setAttribute("role","option")),t.dataset.value=n,t.textContent=$("multicombobox.create",{value:n}),e.appendChild(t),t):(t&&t.remove(),null)}function gn(e,n){let t=e.value.trim(),r=t.toLowerCase(),i=null,a=0,o=!1;for(let l of xe(n)){if(l.classList.contains("hc-multicombobox__create"))continue;r!==""&&Ft(l).toLowerCase()===r&&(o=!0),r===""||Gi(l).includes(r)?(l.removeAttribute("hidden"),i||(i=l),a+=1):l.setAttribute("hidden","")}let s=n.closest(".hc-multicombobox")?.hasAttribute("data-allow-create"),c=Zi(n,s&&t!==""&&!o?t:null);return Ar(n,a===0&&!c),i??c}function Ar(e,n){let t=e.querySelector(".hc-multicombobox__empty");n?t||(t=e.ownerDocument.createElement("li"),t.className="hc-multicombobox__empty",t.setAttribute("role","presentation"),t.textContent=e.getAttribute("data-hc-empty")||$("multicombobox.empty"),e.appendChild(t)):t&&t.remove()}function Ji(e,n,t,r){let i=e.createElement("span");i.className="hc-multicombobox__tag",i.dataset.value=n,i.textContent=t;let a=e.createElement("button");return a.type="button",a.className="hc-multicombobox__tag-remove",a.setAttribute("aria-label",$("multicombobox.remove",{label:t})),a.textContent="\xD7",a.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),r(n)}),i.appendChild(a),i}function Qi(e,n,t){let r=e.createElement("input");return r.type="hidden",r.name=n,r.value=t,r}function yn(e,n){if(n.has(e))return;let t=Hi(e),r=Vi(e),i=Wi(e);if(!t||!r||!i)return;r.hasAttribute("popover")||r.setAttribute("popover","manual"),r.setAttribute("aria-multiselectable","true"),t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","listbox"),t.hasAttribute("aria-autocomplete")||t.setAttribute("aria-autocomplete","list"),!t.hasAttribute("aria-controls")&&r.id&&t.setAttribute("aria-controls",r.id),t.setAttribute("aria-expanded","false");let a=j(),o=`--hc-multicombobox-${r.id||Math.random().toString(36).slice(2,9)}`;a&&(t.style.setProperty("anchor-name",o),r.style.setProperty("position-anchor",o));let s=e.getAttribute("data-name"),c=s?Xi(e):null,l=new Set;for(let w of xe(r))w.getAttribute("aria-selected")==="true"&&l.add(Kt(w));function f(){i.replaceChildren();for(let w of l){let I=ji(r,w),H=I?Ft(I):w;i.appendChild(Ji(e.ownerDocument,w,H,S))}}function b(){if(c){c.replaceChildren();for(let w of l)c.appendChild(Qi(e.ownerDocument,s,w))}}function h(){for(let w of xe(r))l.has(Kt(w))?w.setAttribute("aria-selected","true"):w.removeAttribute("aria-selected")}function A(w,I){t.dispatchEvent(new CustomEvent("hc:multicomboboxchange",{bubbles:!0,detail:{values:Array.from(l),added:w?Array.from(w):[],removed:I?Array.from(I):[],input:t}}))}function m(w){l.has(w)||(l.add(w),h(),f(),b(),A([w],[]))}function S(w){l.has(w)&&(l.delete(w),h(),f(),b(),A([],[w]))}function T(w){if(!w||w.getAttribute("aria-disabled")==="true")return;if(w.classList.contains("hc-multicombobox__create")){let H=w.dataset.value;t.value="",gn(t,r),m(H);return}let I=Kt(w);l.has(I)?S(I):m(I),t.value="",gn(t,r)}let y=null,N=null;function _(){r.matches(":popover-open")||(r.showPopover(),t.setAttribute("aria-expanded","true"),a||(N=Z(r,t,{side:"block-end",matchWidth:!0})),Rt(t,r,vn(r)[0]??null))}function D(){r.matches(":popover-open")&&(r.hidePopover(),N?.(),N=null,t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),An(r))}function p(w){let I=vn(r);if(I.length===0)return;let H=r.querySelector('[data-active="true"]'),ie=H?I.indexOf(H):-1,le=I[Math.max(0,Math.min(I.length-1,ie+w))]??I[w>0?0:I.length-1];Rt(t,r,le)}function v(w){let I=vn(r);I.length!==0&&Rt(t,r,w==="first"?I[0]:I[I.length-1])}function q(){y&&clearTimeout(y),_()}function k(){y&&clearTimeout(y),y=setTimeout(D,zi)}function L(){let w=gn(t,r);r.matches(":popover-open")||_(),Rt(t,r,w)}function O(w){w.target.closest(".hc-multicombobox__tag-remove")||w.target!==t&&t.focus()}function x(w){switch(w.key){case"ArrowDown":w.preventDefault(),r.matches(":popover-open")?p(1):_();break;case"ArrowUp":w.preventDefault(),r.matches(":popover-open")?p(-1):_();break;case"Home":r.matches(":popover-open")&&(w.preventDefault(),v("first"));break;case"End":r.matches(":popover-open")&&(w.preventDefault(),v("last"));break;case"Enter":{if(!r.matches(":popover-open"))return;let I=r.querySelector('[data-active="true"]');I&&(w.preventDefault(),T(I));break}case"Backspace":if(t.value===""&&l.size>0){w.preventDefault();let I=Array.from(l).pop();S(I)}break;case"Escape":r.matches(":popover-open")&&(w.preventDefault(),D());break;case"Tab":D();break;default:break}}function C(w){let I=w.target.closest('[role="option"]');I&&r.contains(I)&&(y&&clearTimeout(y),T(I),t.focus())}function F(w){w.preventDefault()}t.addEventListener("focus",q),t.addEventListener("blur",k),t.addEventListener("input",L),t.addEventListener("keydown",x),e.addEventListener("click",O),r.addEventListener("click",C),r.addEventListener("mousedown",F),f(),b(),n.set(e,()=>{y&&clearTimeout(y),r.matches(":popover-open")&&r.hidePopover(),t.removeEventListener("focus",q),t.removeEventListener("blur",k),t.removeEventListener("input",L),t.removeEventListener("keydown",x),e.removeEventListener("click",O),r.removeEventListener("click",C),r.removeEventListener("mousedown",F),t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-autocomplete"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-activedescendant"),r.removeAttribute("aria-multiselectable"),a&&(t.style.removeProperty("anchor-name"),r.style.removeProperty("position-anchor")),i.replaceChildren(),c&&c.replaceChildren(),An(r),Ar(r,!1)})}function eo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[et])return e[et];let n=new Map;for(let i of e.querySelectorAll(".hc-multicombobox"))yn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-multicombobox")&&yn(o,n),o.querySelectorAll?.(".hc-multicombobox").forEach(s=>yn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[et]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[et]}};return e[et]=r,r}var tt="__hcDrawerUninstall",En={right:{axis:"x",sign:1,off:"100% 0"},left:{axis:"x",sign:-1,off:"-100% 0"},top:{axis:"y",sign:-1,off:"0 -100%"},bottom:{axis:"y",sign:1,off:"0 100%"}};function to(e){return En[e.getAttribute("data-side")]||En.right}function no({delta:e,size:n,velocity:t,threshold:r=.4,flick:i=.5}){return e>n*r||t>i}function wn(e,n){if(n.has(e))return;let t=!1;function r(y){if(t){t=!1;return}y.target===e&&e.close()}let i=En.right,a=0,o=0,s=0,c=0,l=1,f=0,b=!1;function h(y){return!y.closest?.('.hc-drawer__body, button, a[href], input, select, textarea, [contenteditable="true"]')}function A(y){if(y.button!=null&&y.button!==0||y.target===e||!e.open||!h(y.target))return;i=to(e);let N=i.axis==="x";l=(N?e.offsetWidth:e.offsetHeight)||1,a=N?y.clientX:y.clientY,o=a,s=y.timeStamp,f=0,c=0,b=!0,e.style.transition="none",e.setPointerCapture?.(y.pointerId)}function m(y){if(!b)return;let N=i.axis==="x",_=N?y.clientX:y.clientY;c=Math.max(0,(_-a)*i.sign);let D=y.timeStamp-s;D>=8&&(f=(_-o)*i.sign/D,o=_,s=y.timeStamp);let p=i.sign*c;e.style.translate=N?`${p}px 0`:`0 ${p}px`}function S(y){if(b=!1,e.style.transition="",y){e.style.translate=i.off;let N=()=>{e.style.transition="",e.style.translate="",e.open&&e.close()};e.addEventListener("transitionend",N,{once:!0}),setTimeout(N,360)}else e.style.translate=""}function T(y){b&&(e.releasePointerCapture?.(y.pointerId),t=!0,S(no({delta:c,size:l,velocity:f})))}e.addEventListener("click",r),e.addEventListener("pointerdown",A),e.addEventListener("pointermove",m),e.addEventListener("pointerup",T),e.addEventListener("pointercancel",T),n.set(e,()=>{e.removeEventListener("click",r),e.removeEventListener("pointerdown",A),e.removeEventListener("pointermove",m),e.removeEventListener("pointerup",T),e.removeEventListener("pointercancel",T)})}function ro(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[tt])return e[tt];let n=new Map;for(let i of e.querySelectorAll(".hc-drawer"))wn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-drawer")&&wn(o,n),o.querySelectorAll?.(".hc-drawer").forEach(s=>wn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[tt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[tt]}};return e[tt]=r,r}var nt="__hcHoverCardUninstall",io=500,oo=200;function ao(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):String(e).replace(/[^\w-]/g,n=>`\\${n}`)}function so(e){return e.id?Array.from(e.ownerDocument.querySelectorAll(`[aria-describedby~="${ao(e.id)}"]`)):[]}function Ln(e,n){if(n.has(e)||!e.id)return;let t=so(e);if(t.length===0)return;e.hasAttribute("popover")||e.setAttribute("popover","manual");let r=j(),i=`--hc-hovercard-${e.id}`,a=null,o=null,s=null,c=!1,l=null,f=new WeakMap;function b(v,q,k){let L=f.get(v)??{hover:!1,focus:!1};L[q]=k,f.set(v,L)}function h(){for(let v of t){let q=f.get(v);if(q&&(q.hover||q.focus))return v}return null}function A(){a&&clearTimeout(a),o&&clearTimeout(o),a=null,o=null}function m(v){A(),s=v,!e.matches(":popover-open")&&(r&&(v.style.setProperty("anchor-name",i),e.style.setProperty("position-anchor",i)),e.showPopover(),r||(l=Z(e,v,{...Le(e,{side:"block-end",align:"center"}),gap:6})))}function S(){A(),s=null,l?.(),l=null,e.matches(":popover-open")&&e.hidePopover()}function T(){A();let v=h();if(v||c){if(e.matches(":popover-open"))return;let q=v??s??t[0];a=setTimeout(()=>m(q),io)}else o=setTimeout(S,oo)}function y(v){A(),m(v)}function N(){c=!0,T()}function _(){c=!1,T()}function D(v){v.key==="Escape"&&e.matches(":popover-open")&&(v.stopPropagation(),S())}e.addEventListener("mouseenter",N),e.addEventListener("mouseleave",_),e.addEventListener("keydown",D);let p=new Map;for(let v of t){let q=()=>{b(v,"hover",!0),T()},k=()=>{b(v,"hover",!1),T()},L=()=>{b(v,"focus",!0),y(v)},O=()=>{b(v,"focus",!1),T()},x=C=>{C.key==="Escape"&&e.matches(":popover-open")&&(C.stopPropagation(),S())};v.addEventListener("mouseenter",q),v.addEventListener("mouseleave",k),v.addEventListener("focus",L),v.addEventListener("blur",O),v.addEventListener("keydown",x),p.set(v,{onMouseEnter:q,onMouseLeave:k,onFocus:L,onBlur:O,onKeydown:x})}n.set(e,()=>{A(),e.matches(":popover-open")&&e.hidePopover(),e.removeEventListener("mouseenter",N),e.removeEventListener("mouseleave",_),e.removeEventListener("keydown",D);for(let[v,q]of p)v.removeEventListener("mouseenter",q.onMouseEnter),v.removeEventListener("mouseleave",q.onMouseLeave),v.removeEventListener("focus",q.onFocus),v.removeEventListener("blur",q.onBlur),v.removeEventListener("keydown",q.onKeydown),r&&v.style.removeProperty("anchor-name");r&&e.style.removeProperty("position-anchor")})}function co(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[nt])return e[nt];let n=new Map;for(let i of e.querySelectorAll(".hc-hovercard"))Ln(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-hovercard")&&Ln(o,n),o.querySelectorAll?.(".hc-hovercard").forEach(s=>Ln(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[nt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[nt]}};return e[nt]=r,r}var rt="__hcToggleGroupUninstall";function _e(e){return e.getAttribute("data-type")==="multiple"?"multiple":"single"}function ke(e){return Array.from(e.querySelectorAll(":scope > .hc-toggle"))}function it(e){return!(e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")}function Bt(e,n){return n==="single"?e.getAttribute("aria-checked")==="true":e.getAttribute("aria-pressed")==="true"}function xn(e){return e.getAttribute("data-value")}function Ut(e,n){let t=_e(e),r=ke(e),i=r.filter(it),a=n&&it(n)?n:null;!a&&t==="single"&&(a=i.find(o=>Bt(o,"single"))),a||(a=i[0]??null);for(let o of r)o.setAttribute("tabindex",o===a?"0":"-1")}function lo(e){let n=e.querySelector(":scope > .hc-toggle-group__hidden");return n||(n=e.ownerDocument.createElement("span"),n.className="hc-toggle-group__hidden",n.hidden=!0,e.appendChild(n)),n}function Lr(e){let n=e.getAttribute("data-name");if(!n)return;let t=_e(e),r=e.ownerDocument,i=lo(e),a=ke(e).filter(s=>Bt(s,t)).map(xn).filter(s=>s!=null),o=t==="single"?a.slice(0,1):a;i.replaceChildren();for(let s of o){let c=r.createElement("input");c.type="hidden",c.name=n,c.value=s,i.appendChild(c)}}function uo(e,n){let t=_e(e),r=t==="single"?{type:t,value:xn(e.querySelector('[aria-checked="true"]')),item:n,group:e}:{type:t,values:ke(e).filter(i=>Bt(i,"multiple")).map(xn).filter(i=>i!=null),item:n,pressed:n?Bt(n,"multiple"):void 0,group:e};e.dispatchEvent(new CustomEvent("hc:togglegroupchange",{bubbles:!0,detail:r}))}function _n(e,n){if(n.getAttribute("aria-checked")==="true")return!1;for(let t of ke(e))t.setAttribute("aria-checked",String(t===n));return!0}function fo(e){let n=e.getAttribute("aria-pressed")!=="true";return e.setAttribute("aria-pressed",String(n)),!0}function $t(e,n,t){Ut(e,n),t&&(Lr(e),uo(e,n))}function wr(e,n,t){let r=ke(e).filter(it);if(r.length===0)return;let i=r.indexOf(n);if(i===-1)return;let a=r[(i+t+r.length)%r.length];a.focus(),_e(e)==="single"?$t(e,a,_n(e,a)):Ut(e,a)}function Er(e,n){let t=ke(e).filter(it);if(t.length===0)return;let r=n==="first"?t[0]:t[t.length-1];r.focus(),_e(e)==="single"?$t(e,r,_n(e,r)):Ut(e,r)}function Sn(e,n){if(n.has(e))return;Ut(e,null),Lr(e);function t(i){let a=i.target.closest(".hc-toggle");!a||a.parentElement!==e||!it(a)||(_e(e)==="single"?$t(e,a,_n(e,a)):$t(e,a,fo(a)))}function r(i){let a=i.target.closest(".hc-toggle");if(!a||a.parentElement!==e)return;let o=i.key;switch(getComputedStyle(e).direction==="rtl"&&(o==="ArrowRight"?o="ArrowLeft":o==="ArrowLeft"&&(o="ArrowRight")),o){case"ArrowRight":case"ArrowDown":i.preventDefault(),wr(e,a,1);break;case"ArrowLeft":case"ArrowUp":i.preventDefault(),wr(e,a,-1);break;case"Home":i.preventDefault(),Er(e,"first");break;case"End":i.preventDefault(),Er(e,"last");break;default:break}}e.addEventListener("click",t),e.addEventListener("keydown",r),n.set(e,()=>{e.removeEventListener("click",t),e.removeEventListener("keydown",r)})}function ho(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[rt])return e[rt];let n=new Map;for(let i of e.querySelectorAll(".hc-toggle-group"))Sn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-toggle-group")&&Sn(o,n),o.querySelectorAll?.(".hc-toggle-group").forEach(s=>Sn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[rt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[rt]}};return e[rt]=r,r}var ot="__hcCarouselUninstall";function Sr(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function kn(e,n){if(n.has(e))return;let t=e.querySelector(".hc-carousel__viewport");if(!t)return;let r=Array.from(t.querySelectorAll(":scope > .hc-carousel__slide"));if(r.length===0)return;let i=e.ownerDocument||document,a=e.querySelector("[data-hc-carousel-prev]"),o=e.querySelector("[data-hc-carousel-next]"),s=e.querySelector("[data-hc-carousel-dots]"),c=[],l=0;r.forEach((_,D)=>{_.hasAttribute("role")||_.setAttribute("role","group"),_.setAttribute("aria-roledescription","slide"),_.hasAttribute("aria-label")||_.setAttribute("aria-label",`${D+1} of ${r.length}`)}),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("role")||t.setAttribute("role","group"),t.setAttribute("aria-roledescription","carousel"),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&t.setAttribute("aria-label",e.getAttribute("aria-label")||"Carousel");let f=[];if(s){let _=s.querySelectorAll("[data-hc-carousel-dot]");_.length?f=Array.from(_):f=r.map((D,p)=>{let v=i.createElement("button");return v.type="button",v.className="hc-carousel__dot",v.setAttribute("data-hc-carousel-dot",""),v.setAttribute("aria-label",`Go to slide ${p+1}`),s.appendChild(v),v})}function b(_){let D=Math.max(0,Math.min(r.length-1,_)),p=r[D],v=Sr()?"auto":"smooth";typeof p.scrollIntoView=="function"?p.scrollIntoView({behavior:v,inline:"start",block:"nearest"}):t.scrollLeft=p.offsetLeft-t.offsetLeft}function h(_){l=_,r.forEach((D,p)=>D.toggleAttribute("data-active",p===_)),f.forEach((D,p)=>{p===_?D.setAttribute("aria-current","true"):D.removeAttribute("aria-current")}),a&&(a.disabled=_<=0),o&&(o.disabled=_>=r.length-1),e.dispatchEvent(new CustomEvent("hc:carouselchange",{bubbles:!0,detail:{index:_}}))}h(0);let A=null;typeof IntersectionObserver<"u"&&(A=new IntersectionObserver(_=>{let D=null;for(let p of _)p.isIntersecting&&(!D||p.intersectionRatio>D.intersectionRatio)&&(D=p);if(D){let p=r.indexOf(D.target);p!==-1&&p!==l&&h(p)}},{root:t,threshold:.6}),r.forEach(_=>A.observe(_)));let m=()=>b(l-1),S=()=>b(l+1);a&&(a.addEventListener("click",m),c.push(()=>a.removeEventListener("click",m))),o&&(o.addEventListener("click",S),c.push(()=>o.removeEventListener("click",S))),f.forEach((_,D)=>{let p=()=>b(D);_.addEventListener("click",p),c.push(()=>_.removeEventListener("click",p))});let T=_=>{_.key==="ArrowRight"?(_.preventDefault(),b(l+1)):_.key==="ArrowLeft"&&(_.preventDefault(),b(l-1))};t.addEventListener("keydown",T),c.push(()=>t.removeEventListener("keydown",T));let y=parseInt(e.getAttribute("data-autoplay"),10);if(Number.isFinite(y)&&y>0&&!Sr()){let _=null,D=()=>b(l>=r.length-1?0:l+1),p=()=>{_==null&&(_=setInterval(D,y))},v=()=>{_!=null&&(clearInterval(_),_=null)};p(),e.addEventListener("pointerenter",v),e.addEventListener("pointerleave",p),e.addEventListener("focusin",v),e.addEventListener("focusout",p),c.push(()=>{v(),e.removeEventListener("pointerenter",v),e.removeEventListener("pointerleave",p),e.removeEventListener("focusin",v),e.removeEventListener("focusout",p)})}n.set(e,()=>{A&&A.disconnect();for(let _ of c)_()})}function po(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ot])return e[ot];let n=new Map;for(let i of e.querySelectorAll(".hc-carousel"))kn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-carousel")&&kn(o,n),o.querySelectorAll?.(".hc-carousel").forEach(s=>kn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ot]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ot]}};return e[ot]=r,r}var at="__hcToolbarUninstall",Cn='.hc-toolbar[role="toolbar"]',Mn="button, a[href], input, select, textarea";function mo(e){return e.getAttribute("aria-orientation")!=="vertical"}function bo(e){return getComputedStyle(e).direction==="rtl"}function xr(e){let n=e.tagName;if(n==="TEXTAREA"||n==="SELECT")return!0;if(n==="INPUT"){let t=(e.getAttribute("type")||"text").toLowerCase();return!["button","submit","reset","checkbox","radio","color","file","image"].includes(t)}return!1}function Yt(e){return!e.hasAttribute("disabled")&&e.getAttribute("aria-disabled")!=="true"&&!e.hidden&&e.getAttribute("aria-hidden")!=="true"}function Cr(e){return[...e.querySelectorAll(Mn)].filter(n=>n.closest(".hc-toolbar")===e)}function Tr(e){return Cr(e).filter(Yt)}function st(e,n){let t=Cr(e),r=t.filter(Yt),i=n&&r.includes(n)?n:null;i||(i=r.find(a=>a.getAttribute("tabindex")==="0")??r[0]??null);for(let a of t)a.setAttribute("tabindex",a===i?"0":"-1")}function _r(e,n,t){let r=Tr(e),i=r.indexOf(n);if(i===-1)return;let a=r[(i+t+r.length)%r.length];a.focus(),st(e,a)}function kr(e,n){let t=Tr(e);if(t.length===0)return;let r=n==="first"?t[0]:t[t.length-1];r.focus(),st(e,r)}function Tn(e,n){if(n.has(e))return;st(e,null);function t(a){let o=a.target.closest(Mn);if(!o||o.closest(".hc-toolbar")!==e)return;let s=mo(e),c=a.key;s&&bo(e)&&(c==="ArrowRight"?c="ArrowLeft":c==="ArrowLeft"&&(c="ArrowRight"));let l=s?"ArrowRight":"ArrowDown",f=s?"ArrowLeft":"ArrowUp";switch(c){case l:if(xr(o))return;a.preventDefault(),_r(e,o,1);break;case f:if(xr(o))return;a.preventDefault(),_r(e,o,-1);break;case"Home":a.preventDefault(),kr(e,"first");break;case"End":a.preventDefault(),kr(e,"last");break;default:break}}function r(a){let o=a.target.closest?.(Mn);!o||o.closest(".hc-toolbar")!==e||!Yt(o)||st(e,o)}e.addEventListener("keydown",t),e.addEventListener("focusin",r);let i=null;typeof MutationObserver<"u"&&(i=new MutationObserver(()=>{let a=e.ownerDocument.activeElement,o=a&&a.closest?.(".hc-toolbar")===e&&Yt(a)?a:null;st(e,o)}),i.observe(e,{childList:!0,subtree:!0})),n.set(e,()=>{e.removeEventListener("keydown",t),e.removeEventListener("focusin",r),i&&i.disconnect()})}function vo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[at])return e[at];let n=new Map;for(let i of e.querySelectorAll(Cn))Tn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(Cn)&&Tn(o,n),o.querySelectorAll?.(Cn).forEach(s=>Tn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[at]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[at]}};return e[at]=r,r}var ct="__hcAvatarUninstall";function go(e){return e.querySelector(":scope > .hc-avatar__image")}function yo(e){let n=e.getAttribute("src");return n!=null&&n.trim()!==""}function Ao(e){return yo(e)?e.complete?e.naturalWidth>0?"loaded":"error":null:"error"}function Ce(e,n){e.dataset.state!==n&&(e.dataset.state=n,e.dispatchEvent(new CustomEvent("hc:avatarstatechange",{bubbles:!0,detail:{state:n}})))}function Dn(e,n){if(n.has(e))return;let t=go(e);if(!t)return;let r=null,i=()=>{r!=null&&(clearTimeout(r),r=null)};function a(){i(),Ce(e,"loaded")}function o(){i(),Ce(e,"error")}let s=Ao(t);if(s==="loaded"||s==="error")Ce(e,s);else{let c=Math.max(0,parseInt(e.getAttribute("data-delay"),10)||0);c>0?(Ce(e,"pending"),r=setTimeout(()=>{r=null,e.dataset.state==="pending"&&Ce(e,"loading")},c)):Ce(e,"loading"),t.addEventListener("load",a),t.addEventListener("error",o)}n.set(e,()=>{i(),t.removeEventListener("load",a),t.removeEventListener("error",o)})}function wo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ct])return e[ct];let n=new Map;for(let i of e.querySelectorAll(".hc-avatar"))Dn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-avatar")&&Dn(o,n),o.querySelectorAll?.(".hc-avatar").forEach(s=>Dn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ct]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ct]}};return e[ct]=r,r}var lt="__hcPasswordToggleUninstall",qn="[data-hc-password-toggle]";function Eo(e){let n=e.ownerDocument||document,t=e.getAttribute("aria-controls");if(t){let i=n.getElementById(t);if(i)return i}let r=e.closest(".hc-input-group");return r?r.querySelector("input"):null}function Mr(e,n){let t=n.type==="text";e.setAttribute("aria-pressed",String(t));let r=e.getAttribute("data-hc-label-show")||"Show password",i=e.getAttribute("data-hc-label-hide")||"Hide password";e.setAttribute("aria-label",t?i:r)}function On(e,n){if(n.has(e))return;let t=Eo(e);if(!t)return;e.getAttribute("type")==null&&e.setAttribute("type","button"),Mr(e,t);let r=()=>{t.type=t.type==="password"?"text":"password",Mr(e,t)};e.addEventListener("click",r),n.set(e,()=>e.removeEventListener("click",r))}function Lo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[lt])return e[lt];let n=new Map;for(let i of e.querySelectorAll(qn))On(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(qn)&&On(o,n),o.querySelectorAll?.(qn).forEach(s=>On(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[lt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[lt]}};return e[lt]=r,r}var ut="__hcContextMenuUninstall";function So(e){let n=e.getAttribute("data-hc-context-menu");return n?e.ownerDocument.getElementById(n):null}function xo(e,n,t){let r=e.ownerDocument.defaultView,i=r?.innerWidth??0,a=r?.innerHeight??0,o=e.getBoundingClientRect(),s=n,c=t;i&&s+o.width>i&&(s=Math.max(0,i-o.width)),a&&c+o.height>a&&(c=Math.max(0,a-o.height)),e.style.setProperty("inset-block-start",`${c}px`),e.style.setProperty("inset-inline-start",`${s}px`)}function Dr(e,n,t){typeof e.showPopover=="function"&&(e.style.setProperty("position","fixed"),e.style.setProperty("margin","0"),e.style.setProperty("position-area","none"),e.style.setProperty("inset-block-start",`${t}px`),e.style.setProperty("inset-inline-start",`${n}px`),e.matches(":popover-open")||e.showPopover(),xo(e,n,t),ge(e))}function Pn(e,n){if(n.has(e))return;let t=So(e);if(!t)return;t.hasAttribute("popover")||t.setAttribute("popover","auto");let r=null;function i(l){l.preventDefault(),r=l.target,Dr(t,l.clientX,l.clientY)}function a(l){if(l.key==="F10"&&l.shiftKey){l.preventDefault(),r=l.target;let f=l.target.getBoundingClientRect?l.target.getBoundingClientRect():e.getBoundingClientRect();Dr(t,f.left,f.bottom)}}function o(l){t.matches(":popover-open")&&Pt(t,l)}function s(l){let f=l.target.closest(se);if(!f||!t.contains(f)||!V(f)||de(f))return;let b=f.closest(".hc-menu")||t,{role:h}=Mt(b,f,{contextTarget:r});h==="menuitem"&&t.hidePopover()}let c=Ot(t);e.addEventListener("contextmenu",i),e.addEventListener("keydown",a),t.addEventListener("keydown",o),t.addEventListener("click",s),n.set(e,()=>{e.removeEventListener("contextmenu",i),e.removeEventListener("keydown",a),t.removeEventListener("keydown",o),t.removeEventListener("click",s),c()})}function _o(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ut])return e[ut];let n=new Map;for(let i of e.querySelectorAll("[data-hc-context-menu]"))Pn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.("[data-hc-context-menu]")&&Pn(o,n),o.querySelectorAll?.("[data-hc-context-menu]").forEach(s=>Pn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ut]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ut]}};return e[ut]=r,r}var ft="__hcCommandUninstall";function ko(e,n){let t=e.trim().toLowerCase();if(t==="")return 0;let r=n.toLowerCase(),i=0,a=0,o=0,s=-2;for(let c=0;c<n.length&&i<t.length;c+=1){if(r[c]!==t[i])continue;let l=1;if(s===c-1?(o+=1,l+=o*4):o=0,c===0)l+=10;else{let f=n[c-1];f===" "||f==="-"||f==="_"||f==="/"||f==="."?l+=8:/[a-z]/.test(f)&&/[A-Z]/.test(n[c])&&(l+=6)}a+=l,s=c,i+=1}return i===t.length?a:-1/0}function Co(e){return e.querySelector('[role="combobox"]')}function To(e){return e.querySelector('[role="listbox"]')}function Te(e){return Array.from(e.querySelectorAll('[role="option"]'))}function Nn(e){return Array.from(e.querySelectorAll('[role="group"]'))}function Rn(e){return e.getAttribute("aria-disabled")!=="true"}function qr(e){let n=e.querySelector(".hc-command__shortcut"),t=e.textContent??"";return n&&(t=t.replace(n.textContent??"","")),t.trim()}function dt(e){return Te(e).filter(n=>!n.hasAttribute("hidden")&&Rn(n))}function In(e,n){if(n.has(e))return;let t=Co(e),r=To(e);if(!t||!r)return;let i=e.ownerDocument,a=e.closest("dialog");t.hasAttribute("role")||t.setAttribute("role","combobox"),t.hasAttribute("aria-autocomplete")||t.setAttribute("aria-autocomplete","list"),t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","true"),r.id||(r.id=`hc-command-list-${Math.random().toString(36).slice(2,9)}`),t.hasAttribute("aria-controls")||t.setAttribute("aria-controls",r.id);let o=e.querySelector(".hc-command__empty"),s=new WeakMap;Te(e).forEach((k,L)=>s.set(k,L));let c=new WeakMap;Nn(e).forEach((k,L)=>c.set(k,L));let l=!1;function f(){for(let k of Te(e))k.removeAttribute("data-active");t.removeAttribute("aria-activedescendant")}function b(k){for(let L of Te(e))L.removeAttribute("data-active");if(!k){t.removeAttribute("aria-activedescendant");return}k.setAttribute("data-active","true"),k.id||(k.id=`hc-command-item-${Math.random().toString(36).slice(2,9)}`),t.setAttribute("aria-activedescendant",k.id),k.scrollIntoView?.({block:"nearest"})}function h(k){let L=new Map;for(let x of Te(e)){let C=x.parentElement;C&&(L.has(C)||L.set(C,[]),L.get(C).push(x))}for(let[x,C]of L){let F=C.map(w=>({el:w,ord:s.get(w)??0,s:k?k(w):0}));F.sort((w,I)=>I.s-w.s||w.ord-I.ord);for(let w of F)x.append(w.el)}let O=Nn(e);if(O.length){let x=O.map(C=>{let F=[...C.querySelectorAll('[role="option"]')],w=k?Math.max(-1e9,...F.map(k)):0;return{g:C,ord:c.get(C)??0,s:w}});x.sort((C,F)=>F.s-C.s||C.ord-F.ord);for(let C of x)r.append(C.g)}}function A(){let k=t.value.trim(),L=k!==""&&e.getAttribute("data-filter")!=="substring",O=k.toLowerCase(),x=0,C=new Map;for(let F of Te(e)){let w=qr(F),I,H=0;k===""?I=!0:L?(H=ko(k,w),I=H>-1/0):I=w.toLowerCase().includes(O),C.set(F,H),F.toggleAttribute("hidden",!I),I&&(x+=1)}L?(h(F=>{let w=C.get(F);return Number.isFinite(w)?w:-1e9}),l=!0):l&&(h(null),l=!1);for(let F of Nn(e)){let w=F.querySelector('[role="option"]:not([hidden])');F.toggleAttribute("hidden",!w)}return o&&o.toggleAttribute("hidden",x>0),x}function m(k){let L=dt(e);if(L.length===0)return;let O=r.querySelector('[data-active="true"]'),x=O?L.indexOf(O):-1,C=L.length;b(L[((x+k)%C+C)%C])}function S(k){let L=dt(e);L.length!==0&&b(k==="first"?L[0]:L[L.length-1])}function T(k){if(!k||!Rn(k))return;let L=k.getAttribute("data-value")??qr(k);e.dispatchEvent(new CustomEvent("hc:commandselect",{bubbles:!0,detail:{item:k,value:L,command:e}})),a&&a.open?a.close():t.focus()}function y(){t.value="",A(),b(dt(e)[0]??null)}function N(){A(),b(dt(e)[0]??null)}function _(k){switch(k.key){case"ArrowDown":k.preventDefault(),m(1);break;case"ArrowUp":k.preventDefault(),m(-1);break;case"Home":k.preventDefault(),S("first");break;case"End":k.preventDefault(),S("last");break;case"Enter":{let L=r.querySelector('[data-active="true"]');L&&(k.preventDefault(),T(L));break}default:break}}function D(k){let L=k.target.closest('[role="option"]');L&&r.contains(L)&&Rn(L)&&T(L)}let p=a?.getAttribute("data-hotkey")??e.getAttribute("data-hotkey");function v(k){!p||!a||!(k.metaKey||k.ctrlKey)||k.altKey||k.key.toLowerCase()===p.toLowerCase()&&(k.preventDefault(),a.open?a.close():(a.showModal(),y(),t.focus()))}function q(){y()}t.addEventListener("input",N),t.addEventListener("keydown",_),r.addEventListener("click",D),p&&a&&(i.addEventListener("keydown",v),a.addEventListener("close",q)),A(),b(dt(e)[0]??null),n.set(e,()=>{t.removeEventListener("input",N),t.removeEventListener("keydown",_),r.removeEventListener("click",D),p&&a&&(i.removeEventListener("keydown",v),a.removeEventListener("close",q)),t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-autocomplete"),f()})}function Mo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ft])return e[ft];let n=new Map;for(let i of e.querySelectorAll(".hc-command"))In(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-command")&&In(o,n),o.querySelectorAll?.(".hc-command").forEach(s=>In(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ft]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ft]}};return e[ft]=r,r}var ht="__hcCalendarUninstall",Or=e=>String(e).padStart(2,"0"),Vt=(e,n,t)=>`${e}-${Or(n+1)}-${Or(t)}`;function ce(e){let[n,t,r]=e.split("-").map(Number);return{y:n,m0:t-1,d:r}}function Ht({y:e,m0:n,d:t}){return new Date(e,n,t)}function Nr(e){return Vt(e.getFullYear(),e.getMonth(),e.getDate())}function Me(e,n){let{y:t,m0:r,d:i}=ce(e);return Nr(new Date(t,r,i+n))}function zt(e,n){let{y:t,m0:r,d:i}=ce(e),a=new Date(t,r+n,1),o=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return Vt(a.getFullYear(),a.getMonth(),Math.min(i,o))}function Pr(e,n){let t=Ht(ce(e)).getDay();return Me(e,-(((t-n)%7+7)%7))}function Kn(e,n,t){return!(n&&e<n||t&&e>t)}function Fn(e,n,t){return n&&e<n?n:t&&e>t?t:e}function Bn(){let e=new Date;return Vt(e.getFullYear(),e.getMonth(),e.getDate())}function Q(e,n,t={},r){let i=e.createElement(n);for(let[a,o]of Object.entries(t))o===!0?i.setAttribute(a,""):o!=null&&o!==!1&&i.setAttribute(a,String(o));return r!=null&&(i.textContent=r),i}function $n(e,n){if(n.has(e))return;let t=e.ownerDocument,r=Math.max(0,Math.min(6,Number(e.getAttribute("data-first-day"))||0)),i=e.getAttribute("data-locale")||t.documentElement.getAttribute("lang")||void 0,a=e.getAttribute("data-min")||null,o=e.getAttribute("data-max")||null,s=e.getAttribute("data-name"),c=e.getAttribute("data-target"),l=e.getAttribute("aria-label")||$("calendar.label"),f=e.getAttribute("data-mode")==="range"?"range":"single",b=e.getAttribute("data-value");if(!b&&c){let g=null;try{g=t.querySelector(c)}catch{}g&&g.value&&(b=g.value)}let h={selected:null,start:null,end:null,focused:null};if(f==="range"){let g=e.getAttribute("data-start")||null,P=e.getAttribute("data-end")||null;if(!g&&b){let R=b.split("/");g=R[0]||null,P=R[1]||null}g&&P&&P<g&&([g,P]=[P,g]),h.start=g||null,h.end=P||null,h.focused=h.start||Fn(Bn(),a,o)}else h.selected=b||null,h.focused=h.selected||Fn(Bn(),a,o);let A=Bn(),m=e.getAttribute("data-nav")==="select",S=new Intl.DateTimeFormat(i,{year:"numeric",month:"long"}),T=new Intl.DateTimeFormat(i,{month:"long"}),y=new Intl.DateTimeFormat(i,{year:"numeric",month:"long",day:"numeric",weekday:"long"}),N=new Intl.DateTimeFormat(i,{weekday:"short"}),_=new Intl.DateTimeFormat(i,{weekday:"long"});function D(g){let P=`hc-calendar__value${g}`,R=e.querySelector(`:scope > input.${P}`);return R||(R=t.createElement("input"),R.type="hidden",R.className=P,e.appendChild(R)),R}function p(){if(s)if(f==="range"){let g=D("-start");g.name=`${s}-start`,g.value=h.start||"";let P=D("-end");P.name=`${s}-end`,P.value=h.end||""}else{let g=D("");g.name=s,g.value=h.selected||""}}function v(){return e.querySelectorAll(".hc-calendar__day")}function q(){for(let g of v())g.removeAttribute("data-range-preview"),g.removeAttribute("data-range-preview-end")}function k(g){if(q(),f!=="range"||!h.start||h.end||!g||g===h.start)return;let P=h.start<g?h.start:g,R=h.start<g?g:h.start;for(let z of v()){let ee=z.getAttribute("data-date");ee>=P&&ee<=R&&z.setAttribute("data-range-preview",""),ee===g&&z.setAttribute("data-range-preview-end","")}}function L(g,P){let R=Q(t,"div",{class:"hc-calendar__monthnav"}),z=Q(t,"select",{class:"hc-calendar__month-select","aria-label":$("calendar.month")});for(let X=0;X<12;X+=1){let J=t.createElement("option");J.value=String(X),J.textContent=T.format(new Date(2020,X,1)),X===P&&(J.selected=!0),z.appendChild(J)}let ee=Q(t,"select",{class:"hc-calendar__year-select","aria-label":$("calendar.year")}),oe=Math.min(a?ce(a).y:g-10,g),pe=Math.max(o?ce(o).y:g+10,g);for(let X=oe;X<=pe;X+=1){let J=t.createElement("option");J.value=String(X),J.textContent=String(X),X===g&&(J.selected=!0),ee.appendChild(J)}return R.append(z,ee),R}function O(){let{y:g,m0:P}=ce(h.focused),R=[...e.querySelectorAll(':scope > input[type="hidden"]')];e.replaceChildren();let z=Q(t,"div",{class:"hc-calendar__header"}),ee=m?L(g,P):Q(t,"span",{class:"hc-calendar__title","aria-live":"polite"},S.format(new Date(g,P,1)));z.append(Q(t,"button",{class:"hc-calendar__nav",type:"button","data-hc-calendar-prev":!0,"aria-label":$("calendar.prevMonth")},"\u2039"),ee,Q(t,"button",{class:"hc-calendar__nav",type:"button","data-hc-calendar-next":!0,"aria-label":$("calendar.nextMonth")},"\u203A"));let oe=Q(t,"table",{class:"hc-calendar__grid",role:"grid","aria-label":l}),pe=Q(t,"thead"),X=Q(t,"tr",{role:"row"});for(let te=0;te<7;te++){let G=(r+te)%7,me=new Date(2023,0,1+G);X.append(Q(t,"th",{scope:"col",abbr:_.format(me)},N.format(me)))}pe.append(X),oe.append(pe);let J=Q(t,"tbody"),qe=((new Date(g,P,1).getDay()-r)%7+7)%7,ue=new Date(g,P,1-qe);for(let te=0;te<6;te++){let G=Q(t,"tr",{role:"row"});for(let me=0;me<7;me++){let W=Nr(ue),Lt=ue.getMonth()!==P,St=!Kn(W,a,o),ne=Q(t,"td",{class:"hc-calendar__day",role:"gridcell","data-date":W,"aria-label":y.format(ue),tabindex:W===h.focused?"0":"-1"},String(ue.getDate()));if(Lt&&ne.setAttribute("data-outside",""),W===A&&ne.setAttribute("data-today",""),f==="range"){let{start:ve,end:fe}=h;ve&&fe&&W>=ve&&W<=fe&&ne.setAttribute("data-in-range",""),ve&&W===ve&&(ne.setAttribute("data-range-start",""),ne.setAttribute("aria-selected","true")),fe&&W===fe&&(ne.setAttribute("data-range-end",""),ne.setAttribute("aria-selected","true"))}else W===h.selected&&ne.setAttribute("aria-selected","true");St&&ne.setAttribute("aria-disabled","true"),G.append(ne),ue.setDate(ue.getDate()+1)}J.append(G)}oe.append(J),e.append(z,oe);for(let te of R)e.append(te);p(),f==="range"&&k(h.focused)}function x(g){e.querySelector(`.hc-calendar__day[data-date="${g}"]`)?.focus()}function C(g,{focus:P=!0}={}){h.focused=g,O(),P&&x(g)}function F(g){if(!c)return;let P=null;try{P=t.querySelector(c)}catch{}P&&("value"in P&&(P.value=g),P.dispatchEvent(new CustomEvent("input",{bubbles:!0})),P.dispatchEvent(new CustomEvent("change",{bubbles:!0})));let R=e.closest("[popover]");if(R&&typeof R.hidePopover=="function")try{R.hidePopover()}catch{}}function w(g){Kn(g,a,o)&&(h.selected=g,h.focused=g,e.setAttribute("data-value",g),O(),x(g),e.dispatchEvent(new CustomEvent("hc:calendarchange",{bubbles:!0,detail:{value:g,date:Ht(ce(g))}})),F(g))}function I(){e.dispatchEvent(new CustomEvent("hc:calendarrangechange",{bubbles:!0,detail:{start:h.start,end:h.end,startDate:h.start?Ht(ce(h.start)):null,endDate:h.end?Ht(ce(h.end)):null}}))}function H(g){Kn(g,a,o)&&(!h.start||h.start&&h.end?(h.start=g,h.end=null):g<h.start?(h.end=h.start,h.start=g):h.end=g,h.focused=g,e.setAttribute("data-value",h.end?`${h.start}/${h.end}`:h.start),O(),x(g),I(),h.start&&h.end&&F(`${h.start}/${h.end}`))}function ie(g){f==="range"?H(g):w(g)}function le(g){if(g.target.closest("[data-hc-calendar-prev]")){h.focused=zt(h.focused,-1),O(),e.querySelector("[data-hc-calendar-prev]")?.focus();return}if(g.target.closest("[data-hc-calendar-next]")){h.focused=zt(h.focused,1),O(),e.querySelector("[data-hc-calendar-next]")?.focus();return}let P=g.target.closest(".hc-calendar__day");P&&P.getAttribute("aria-disabled")!=="true"&&ie(P.getAttribute("data-date"))}function he(g){if(f!=="range"||!h.start||h.end)return;let P=g.target.closest?.(".hc-calendar__day");P&&P.getAttribute("aria-disabled")!=="true"&&k(P.getAttribute("data-date"))}function Et(){f==="range"&&k(h.focused)}function De(g){let P=g.target.classList?.contains?.("hc-calendar__month-select"),R=g.target.classList?.contains?.("hc-calendar__year-select");if(!P&&!R)return;let{y:z,m0:ee}=ce(h.focused),oe=P?Number(g.target.value):ee,pe=R?Number(g.target.value):z;h.focused=Fn(Vt(pe,oe,1),a,o),O(),e.querySelector(P?".hc-calendar__month-select":".hc-calendar__year-select")?.focus()}function we(g){if(!g.target.closest(".hc-calendar__day"))return;let R=h.focused,z=g.key;switch(getComputedStyle(e).direction==="rtl"&&(z==="ArrowRight"?z="ArrowLeft":z==="ArrowLeft"&&(z="ArrowRight")),z){case"ArrowLeft":g.preventDefault(),C(Me(R,-1));break;case"ArrowRight":g.preventDefault(),C(Me(R,1));break;case"ArrowUp":g.preventDefault(),C(Me(R,-7));break;case"ArrowDown":g.preventDefault(),C(Me(R,7));break;case"Home":g.preventDefault(),C(Pr(R,r));break;case"End":g.preventDefault(),C(Me(Pr(R,r),6));break;case"PageUp":g.preventDefault(),C(zt(R,g.shiftKey?-12:-1));break;case"PageDown":g.preventDefault(),C(zt(R,g.shiftKey?12:1));break;case"Enter":case" ":g.preventDefault(),ie(R);break;default:break}}e.addEventListener("click",le),e.addEventListener("keydown",we),m&&e.addEventListener("change",De),f==="range"&&(e.addEventListener("pointerover",he),e.addEventListener("pointerleave",Et)),O(),n.set(e,()=>{e.removeEventListener("click",le),e.removeEventListener("keydown",we),e.removeEventListener("change",De),e.removeEventListener("pointerover",he),e.removeEventListener("pointerleave",Et)})}function Do(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ht])return e[ht];let n=new Map;for(let i of e.querySelectorAll(".hc-calendar"))$n(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-calendar")&&$n(o,n),o.querySelectorAll?.(".hc-calendar").forEach(s=>$n(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ht]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ht]}};return e[ht]=r,r}var pt="__hcInputOtpUninstall";function qo(e){let n=e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e;try{return new RegExp(`[${n}]`,"u")}catch{return/[0-9]/u}}function Oo(e,n){if(!e)return new Set;let t=e.split(/[\s,-]+/).filter(Boolean).map(Number);if(t.length<2||t.some(a=>!Number.isInteger(a)||a<=0))return new Set;if(t.reduce((a,o)=>a+o,0)!==n)return new Set;let r=new Set,i=0;for(let a=0;a<t.length-1;a+=1)i+=t[a],r.add(i);return r}function Un(e,n){if(n.has(e))return;let t=e.querySelector(".hc-inputotp__input")||e.querySelector("input");if(!t)return;let r=e.ownerDocument,i=Math.max(1,Number(e.getAttribute("data-length"))||6),a=qo(e.getAttribute("data-pattern")||"[0-9]");t.setAttribute("maxlength",String(i)),t.hasAttribute("inputmode")||t.setAttribute("inputmode","numeric"),t.hasAttribute("autocomplete")||t.setAttribute("autocomplete","one-time-code"),t.hasAttribute("type")||t.setAttribute("type","text");let o=[];function s(){for(let S of e.querySelectorAll(".hc-inputotp__slot, .hc-inputotp__separator"))S.remove();o.length=0;let m=Oo(e.getAttribute("data-groups"),i);for(let S=0;S<i;S++){let T=r.createElement("div");if(T.className="hc-inputotp__slot",T.setAttribute("aria-hidden","true"),e.appendChild(T),o.push(T),m.has(S+1)){let y=r.createElement("span");y.className="hc-inputotp__separator",y.setAttribute("aria-hidden","true"),e.appendChild(y)}}}function c(m){return Array.from(m).filter(S=>a.test(S)).join("").slice(0,i)}function l(){let m=t.value,S=r.activeElement===t,T=t.selectionStart??m.length,y=Math.min(T,i-1);for(let N=0;N<i;N++){let _=o[N];_.textContent=m[N]??"",_.toggleAttribute("data-empty",!m[N]),_.toggleAttribute("data-active",S&&N===y)}}function f(){let m=c(t.value);if(m!==t.value){t.value=m;try{t.setSelectionRange(m.length,m.length)}catch{}}l(),e.dispatchEvent(new CustomEvent("hc:otpchange",{bubbles:!0,detail:{value:t.value,input:t}})),t.value.length===i&&e.dispatchEvent(new CustomEvent("hc:otpcomplete",{bubbles:!0,detail:{value:t.value,input:t}}))}function b(){l()}function h(m){for(let S=0;S<o.length;S+=1){let T=o[S].getBoundingClientRect();if(m>=T.left&&m<=T.right)return S}return-1}function A(m){let S=h(m.clientX);if(S!==-1){let T=Math.min(S,t.value.length);t.focus();try{t.setSelectionRange(T,T)}catch{}}l()}t.addEventListener("input",f),t.addEventListener("focus",b),t.addEventListener("blur",b),t.addEventListener("keyup",b),e.addEventListener("click",A),s(),t.value&&(t.value=c(t.value)),l(),n.set(e,()=>{t.removeEventListener("input",f),t.removeEventListener("focus",b),t.removeEventListener("blur",b),t.removeEventListener("keyup",b),e.removeEventListener("click",A);for(let m of e.querySelectorAll(".hc-inputotp__slot, .hc-inputotp__separator"))m.remove()})}function Po(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[pt])return e[pt];let n=new Map;for(let i of e.querySelectorAll(".hc-inputotp"))Un(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-inputotp")&&Un(o,n),o.querySelectorAll?.(".hc-inputotp").forEach(s=>Un(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[pt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[pt]}};return e[pt]=r,r}var mt="__hcSplitterUninstall";function No(e){try{let n=localStorage.getItem(e),t=n==null?NaN:Number(n);return Number.isFinite(t)?t:null}catch{return null}}function Io(e,n){try{localStorage.setItem(e,String(n))}catch{}}function Yn(e,n){if(n.has(e))return;let t=e.querySelectorAll(":scope > .hc-splitter__panel"),r=e.querySelector(":scope > .hc-splitter__handle");if(t.length<2||!r)return;let i=t[0],a=e.getAttribute("data-orientation")==="vertical"?"vertical":"horizontal",o=e.hasAttribute("data-min")?Number(e.getAttribute("data-min")):10,s=e.hasAttribute("data-max")?Number(e.getAttribute("data-max")):90,c=e.hasAttribute("data-step")?Number(e.getAttribute("data-step")):5,l=e.hasAttribute("data-collapsible"),f=e.getAttribute("data-persist"),b=e.hasAttribute("data-value")?Number(e.getAttribute("data-value")):50,h=b;if(f){let L=No(f);L!=null&&(h=L)}let A=h>0?h:b;i.id||(i.id=`hc-splitter-panel-${Math.random().toString(36).slice(2,9)}`),r.hasAttribute("role")||r.setAttribute("role","separator"),r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.setAttribute("aria-orientation",a==="horizontal"?"vertical":"horizontal"),r.setAttribute("aria-controls",i.id),r.setAttribute("aria-valuemin",String(o)),r.setAttribute("aria-valuemax",String(s)),!r.hasAttribute("aria-label")&&!r.hasAttribute("aria-labelledby")&&r.setAttribute("aria-label",$("splitter.resize"));function m(L){return Math.min(s,Math.max(o,L))}function S(L,{dispatch:O=!0}={}){h=L;let x=L<=0;e.style.setProperty("--hc-splitter-pos",`${Math.max(0,L)}%`),r.setAttribute("aria-valuenow",String(Math.round(m(L)))),e.toggleAttribute("data-collapsed",x),f&&O&&Io(f,Math.round(L)),O&&e.dispatchEvent(new CustomEvent("hc:splitterchange",{bubbles:!0,detail:{value:L,collapsed:x,orientation:a,handle:r,primary:i}}))}function T(L,O){S(m(L),O)}function y(){h<=0?S(m(A>0?A:b)):(A=h,S(0))}S(h<=0?0:m(h),{dispatch:!1});let N=e.ownerDocument,_=!1;function D(L){_=!0,L.preventDefault()}function p(L){if(!_)return;let O=e.getBoundingClientRect(),x=h;a==="horizontal"?O.width&&(x=(L.clientX-O.left)/O.width*100):O.height&&(x=(L.clientY-O.top)/O.height*100),T(x)}function v(){_=!1}function q(){l&&y()}function k(L){if(l&&L.key==="Enter"){L.preventDefault(),y();return}let O=a==="horizontal"&&getComputedStyle(e).direction==="rtl",x=a==="horizontal"?O?"ArrowLeft":"ArrowRight":"ArrowDown",C=a==="horizontal"?O?"ArrowRight":"ArrowLeft":"ArrowUp";switch(L.key){case x:L.preventDefault(),T(h+c);break;case C:L.preventDefault(),T(h-c);break;case"Home":L.preventDefault(),T(o);break;case"End":L.preventDefault(),T(s);break;default:break}}r.addEventListener("pointerdown",D),r.addEventListener("keydown",k),l&&r.addEventListener("dblclick",q),N.addEventListener("pointermove",p),N.addEventListener("pointerup",v),n.set(e,()=>{r.removeEventListener("pointerdown",D),r.removeEventListener("keydown",k),r.removeEventListener("dblclick",q),N.removeEventListener("pointermove",p),N.removeEventListener("pointerup",v)})}function Ro(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[mt])return e[mt];let n=new Map;for(let i of e.querySelectorAll(".hc-splitter"))Yn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-splitter")&&Yn(o,n),o.querySelectorAll?.(".hc-splitter").forEach(s=>Yn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[mt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[mt]}};return e[mt]=r,r}var bt="__hcShellUninstall";function Ko(e){try{return localStorage.getItem(e)}catch{return null}}function Fo(e,n){try{localStorage.setItem(e,n)}catch{}}var Bo=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Ir=0;function zn(e,n){if(n.has(e))return;let t=e.querySelector("[data-hc-shell-toggle]"),r=e.querySelector(".hc-shell__sidebar");if(!r)return;r.id||(Ir+=1,r.id=`hc-shell-sidebar-${Ir}`),r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1");let i=()=>{},a=null;if(t){let h=function(y){if(!f())return;if(y.key==="Escape"){y.preventDefault(),i();return}if(y.key!=="Tab")return;let N=b();if(N.length===0){y.preventDefault(),r.focus();return}let _=N[0],D=N[N.length-1],p=document.activeElement;y.shiftKey&&(p===_||!r.contains(p))?(y.preventDefault(),D.focus()):!y.shiftKey&&p===D&&(y.preventDefault(),_.focus())},A=function(y){f()&&(r.contains(y.target)||t.contains(y.target)||i())},m=function(y){y.target.closest("a[href], [data-hc-shell-close]")&&i()},S=function(){if(f())return;l=document.activeElement,e.setAttribute("data-sidebar","open"),t.setAttribute("aria-expanded","true"),document.addEventListener("keydown",h,!0),document.addEventListener("click",A,!0),(b()[0]??r).focus()},T=function(y){y.preventDefault(),f()?i():S()};t.setAttribute("aria-controls",r.id),t.setAttribute("aria-expanded","false"),!t.hasAttribute("aria-label")&&!t.textContent.trim()&&t.setAttribute("aria-label",$("shell.toggleNav"));let l=null,f=()=>e.getAttribute("data-sidebar")==="open",b=()=>[...r.querySelectorAll(Bo)];i=()=>{f()&&(e.removeAttribute("data-sidebar"),t.setAttribute("aria-expanded","false"),document.removeEventListener("keydown",h,!0),document.removeEventListener("click",A,!0),l&&typeof l.focus=="function"&&l.focus(),l=null)},t.addEventListener("click",T),r.addEventListener("click",m),a=()=>{i(),t.removeEventListener("click",T),r.removeEventListener("click",m)}}let o=null;if(r.hasAttribute("data-collapsible")){let l=e.querySelector("[data-hc-shell-collapse]"),f=r.getAttribute("data-persist"),b=()=>e.hasAttribute("data-sidebar-collapsed"),h=(A,{persist:m=!0}={})=>{e.toggleAttribute("data-sidebar-collapsed",A),l&&l.setAttribute("aria-expanded",String(!A)),m&&f&&Fo(f,A?"1":"0")};if(f){let A=Ko(f);(A==="1"||A==="0")&&h(A==="1",{persist:!1})}if(l){l.hasAttribute("aria-controls")||l.setAttribute("aria-controls",r.id),l.setAttribute("aria-expanded",String(!b())),!l.hasAttribute("aria-label")&&!l.textContent.trim()&&l.setAttribute("aria-label",$("shell.collapseNav"));let A=m=>{m.preventDefault(),h(!b())};l.addEventListener("click",A),o=()=>l.removeEventListener("click",A)}}let s=null,c=null;typeof window<"u"&&typeof window.matchMedia=="function"&&(s=window.matchMedia("(min-width: 60rem)"),c=l=>{l.matches&&i()},s.addEventListener?.("change",c)),n.set(e,()=>{a?.(),s&&c&&s.removeEventListener?.("change",c),o?.()})}function $o(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[bt])return e[bt];let n=new Map;for(let i of e.querySelectorAll(".hc-shell"))zn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-shell")&&zn(o,n),o.querySelectorAll?.(".hc-shell").forEach(s=>zn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[bt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[bt]}};return e[bt]=r,r}var vt="__hcDatagridUninstall",Uo="input, button, select, textarea, a[href]",Rr=0;function re(e,n){return[...e.querySelectorAll(n)].filter(t=>t.closest(".hc-datagrid")===e)}function Xt(e){return re(e,".hc-datagrid__body > .hc-datagrid__row, .hc-datagrid__record > .hc-datagrid__row")}function Hn(e){let n=re(e,".hc-datagrid__record");return n.length?n:Xt(e)}function Kr(e,n){let t=re(n,".hc-datagrid__record").length?".hc-datagrid__record":".hc-datagrid__row",r=e.closest(t);return r&&r.closest(".hc-datagrid")===n?r:null}function Yo(e){return e.matches(".hc-datagrid__row")?[e]:[...e.querySelectorAll(":scope > .hc-datagrid__row")]}function Vn(e,n){e.toggleAttribute("data-selected",n);for(let t of Yo(e))t.setAttribute("aria-selected",n?"true":"false")}function zo(e){return[...e.children].filter(n=>n.classList.contains("hc-datagrid__cell"))}function Wt(e){let n=re(e,".hc-datagrid__head > tr"),t=0;n.forEach((s,c)=>{let l=s.getBoundingClientRect().height;c===0&&e.style.setProperty("--hc-datagrid-head-1-h",`${l}px`),c===1&&e.style.setProperty("--hc-datagrid-head-2-h",`${l}px`),t+=l});let r=Xt(e)[0],i=[],a=0;if(r)for(let s of[...r.children].filter(c=>c.hasAttribute("data-frozen")))i.push(a),a+=s.getBoundingClientRect().width;for(let s of re(e,".hc-datagrid__head > tr, .hc-datagrid__body > tr, .hc-datagrid__record > tr"))[...s.children].filter(l=>l.hasAttribute("data-frozen")).forEach((l,f)=>{i[f]!=null&&l.style.setProperty("--hc-datagrid-left",`${i[f]}px`)});let o=e.querySelector(".hc-datagrid__scroll");o&&(o.style.scrollPaddingTop=`${t}px`,o.style.scrollPaddingLeft=`${a}px`)}function Wn(e,n){if(n.has(e))return;let t=e.querySelector(".hc-datagrid__table");if(!t)return;let r=[],i={r:0,c:0},a=()=>re(e,'.hc-datagrid__head input[type="checkbox"]')[0]??null;function o(){let u=Hn(e),d=u.length,E=u.filter(M=>M.hasAttribute("data-selected")).length;e.dispatchEvent(new CustomEvent("hc:datagridselectionchange",{bubbles:!0,detail:{selected:E,total:d}}))}function s(){t.setAttribute("role","grid");for(let u of re(e,".hc-datagrid__head > tr, .hc-datagrid__row"))u.setAttribute("role","row");for(let u of re(e,".hc-datagrid__headcell"))u.getAttribute("role")||u.setAttribute("role","columnheader");r.flat().forEach(u=>{u.setAttribute("role",u.tagName==="TH"?"rowheader":"gridcell"),u.tabIndex=-1,u.querySelectorAll(Uo).forEach(d=>{d.tabIndex=-1})})}function c(){r=Xt(e).map(zo),s(),m();let u=r[i.r]?.[i.c]??r[0]?.[0];if(u){u.tabIndex=0;let d=_(u);d&&(i=d)}}let l=40,f=new Map,b=[];function h(u){return re(e,`.hc-datagrid__cell[data-col="${u}"], .hc-datagrid__headcell[data-col="${u}"]`)}function A(u,d){for(let E of h(u))E.style.inlineSize=d,E.style.maxInlineSize=d,E.setAttribute("data-resized","")}function m(){for(let[u,d]of f)A(u,d)}function S(u,d){let E=Math.max(l,Math.round(d)),M=`${E}px`;f.set(u,M),A(u,M);let K=re(e,`.hc-datagrid__headcell[data-resizable][data-col="${u}"] > .hc-datagrid__resizer`)[0];K&&K.setAttribute("aria-valuenow",String(E)),Wt(e)}function T(u,d){e.dispatchEvent(new CustomEvent("hc:datagridcolumnresize",{bubbles:!0,detail:{col:u,width:Math.max(l,Math.round(d))}}))}function y(u,d){let E=d.dataset.col,M=0,K=0,B=!1;function Y(ae){B=!0,M=ae.clientX,K=d.getBoundingClientRect().width,u.setPointerCapture?.(ae.pointerId),ae.preventDefault()}function U(ae){B&&S(E,K+(ae.clientX-M))}function Oe(ae){B&&(B=!1,u.releasePointerCapture?.(ae.pointerId),T(E,d.getBoundingClientRect().width))}function er(ae){let tr=ae.shiftKey?32:8,nr=d.getBoundingClientRect().width,_t;if(ae.key==="ArrowRight")_t=nr+tr;else if(ae.key==="ArrowLeft")_t=nr-tr;else return;ae.preventDefault(),S(E,_t),T(E,_t)}u.addEventListener("pointerdown",Y),u.addEventListener("pointermove",U),u.addEventListener("pointerup",Oe),u.addEventListener("keydown",er),b.push(()=>{u.removeEventListener("pointerdown",Y),u.removeEventListener("pointermove",U),u.removeEventListener("pointerup",Oe),u.removeEventListener("keydown",er),u.remove()})}function N(){for(let u of re(e,".hc-datagrid__headcell[data-resizable]")){if(!u.dataset.col||u.querySelector(":scope > .hc-datagrid__resizer"))continue;let d=e.ownerDocument.createElement("span");d.className="hc-datagrid__resizer",d.setAttribute("role","separator"),d.setAttribute("aria-orientation","vertical"),d.tabIndex=0,d.setAttribute("aria-label",`Resize ${u.textContent.trim()||"column"}`),d.setAttribute("aria-valuemin",String(l)),d.setAttribute("aria-valuenow",String(Math.round(u.getBoundingClientRect().width))),u.appendChild(d),y(d,u)}}function _(u){for(let d=0;d<r.length;d+=1){let E=r[d].indexOf(u);if(E!==-1)return{r:d,c:E}}return null}function D(){let u=e.querySelector(".hc-datagrid__scroll"),d=r[0]?.[0],E=d?d.getBoundingClientRect().height:0,M=u?u.clientHeight:0;return E?Math.max(1,Math.floor(M/E)-1):10}function p(u,d,E=!0){if(!r.length)return;let M=Math.max(0,Math.min(u,r.length-1)),K=Math.max(0,Math.min(d,(r[M]?.length??1)-1)),B=r[i.r]?.[i.c];B&&(B.tabIndex=-1,B.removeAttribute("data-active")),i={r:M,c:K};let Y=r[M]?.[K];if(!Y)return;Y.tabIndex=0,Y.setAttribute("data-active","");let U=Y.closest(".hc-datagrid__record");if(U){for(let Oe of e.querySelectorAll(".hc-datagrid__record[data-current]"))Oe!==U&&Oe.removeAttribute("data-current");U.setAttribute("data-current","")}E&&Y.focus(),Y.scrollIntoView?.({block:"nearest",inline:"nearest"})}function v(u){let d=Xt(e)[u];if(!d)return;let E=Kr(d,e)??d,M=E.querySelector('input[type="checkbox"]');M?(M.checked=!M.checked,M.dispatchEvent(new Event("change",{bubbles:!0}))):(Vn(E,!E.hasAttribute("data-selected")),o())}function q(u){if(g||!O(u)||u.target.closest(".hc-datagrid__head")||!r.length)return;let{r:d,c:E}=i,M=r[d]?.[E],K=M?.querySelector?.("[data-hc-datagrid-toggle]");if(K&&u.key==="Enter"){u.preventDefault();let U=K.closest(".hc-datagrid__record");U&&he(U,!U.hasAttribute("data-expanded"));return}let B=M?.hasAttribute("data-editable")&&we.has(M.dataset.col);if(B&&(u.key==="Enter"||u.key==="F2")){u.preventDefault(),qe(M);return}if(B&&u.key.length===1&&u.key!==" "&&!u.ctrlKey&&!u.metaKey&&!u.altKey){u.preventDefault(),qe(M,u.key);return}let Y=u.key;switch(getComputedStyle(e).direction==="rtl"&&(Y==="ArrowRight"?Y="ArrowLeft":Y==="ArrowLeft"&&(Y="ArrowRight")),Y){case"ArrowDown":p(d+1,E);break;case"ArrowUp":p(d-1,E);break;case"ArrowRight":p(d,E+1);break;case"ArrowLeft":p(d,E-1);break;case"Home":p(u.ctrlKey?0:d,0);break;case"End":u.ctrlKey?p(r.length-1,1/0):p(d,1/0);break;case"PageDown":p(d+D(),E);break;case"PageUp":p(d-D(),E);break;case" ":case"Spacebar":if(u.target.classList.contains("hc-datagrid__cell"))v(d);else return;break;default:return}u.preventDefault()}function k(u){if(!O(u))return;let d=u.target.closest?.(".hc-datagrid__cell");if(!d||!e.contains(d))return;let E=_(d);E&&(E.r!==i.r||E.c!==i.c?p(E.r,E.c,!1):d.setAttribute("data-active",""))}function L(u){if(!O(u))return;let d=u.target;if(!(!(d instanceof HTMLInputElement)||d.type!=="checkbox")){if(d===a())for(let E of Hn(e)){let M=E.querySelector('input[type="checkbox"]');M&&(M.checked=d.checked),Vn(E,d.checked)}else{let E=Kr(d,e);E&&Vn(E,d.checked);let M=a();if(M){let K=Hn(e).map(Y=>Y.querySelector('input[type="checkbox"]')).filter(Boolean),B=K.filter(Y=>Y.checked).length;M.checked=B>0&&B===K.length,M.indeterminate=B>0&&B<K.length}}o()}}function O(u){return u.target.closest?.(".hc-datagrid")===e}function x(){return re(e,".hc-datagrid__headcell[data-sortable]")}function C(){for(let u of x())u.hasAttribute("tabindex")||(u.tabIndex=0),u.hasAttribute("aria-sort")||u.setAttribute("aria-sort","none")}function F(u){let d=u.getAttribute("aria-sort")||"none",E=d==="none"?"ascending":d==="ascending"?"descending":"none";for(let B of x())B!==u&&B.setAttribute("aria-sort","none");u.setAttribute("aria-sort",E);let M=u.dataset.col||(u.textContent||"").trim(),K=E==="ascending"?"asc":E==="descending"?"desc":null;e.dispatchEvent(new CustomEvent("hc:datagridsort",{bubbles:!0,detail:{col:M,direction:K}}))}function w(u){if(u.target.closest(".hc-datagrid__resizer"))return null;let d=u.target.closest(".hc-datagrid__headcell[data-sortable]");return d&&d.closest(".hc-datagrid")===e?d:null}function I(u){let d=w(u);d&&F(d)}function H(u){if(u.key!=="Enter"&&u.key!==" ")return;let d=w(u);d&&(u.preventDefault(),F(d))}function ie(u){return u.querySelector(":scope > .hc-datagrid__detail-row")}function le(u,d){if(d.dataset.loaded="",d.setAttribute("aria-busy","true"),typeof MutationObserver<"u"){let E=new MutationObserver(()=>{d.removeAttribute("aria-busy"),E.disconnect()});E.observe(d,{childList:!0})}d.dispatchEvent(new CustomEvent("hc:datagriddetailload",{bubbles:!0,detail:{record:u}}))}function he(u,d){let E=ie(u),M=E?.querySelector(".hc-datagrid__detail"),K=u.querySelector("[data-hc-datagrid-toggle]");u.toggleAttribute("data-expanded",d),E&&(E.hidden=!d),K&&K.setAttribute("aria-expanded",d?"true":"false"),d&&M&&M.hasAttribute("data-lazy")&&M.dataset.loaded==null&&le(u,M),e.dispatchEvent(new CustomEvent(d?"hc:datagridexpand":"hc:datagridcollapse",{bubbles:!0,detail:{record:u}}))}function Et(){for(let u of re(e,".hc-datagrid__record")){let d=u.querySelector("[data-hc-datagrid-toggle]"),E=ie(u);if(!d||!E)continue;let M=E.querySelector(".hc-datagrid__detail");M&&(M.id||(Rr+=1,M.id=`hc-datagrid-detail-${Rr}`),E.setAttribute("role","row"),M.setAttribute("role","gridcell"),d.setAttribute("aria-controls",M.id));let K=u.hasAttribute("data-expanded");d.setAttribute("aria-expanded",K?"true":"false"),E.hidden=!K}}function De(u){if(!O(u))return;let d=u.target.closest("[data-hc-datagrid-toggle]");if(!d||!e.contains(d))return;let E=d.closest(".hc-datagrid__record");E&&he(E,!E.hasAttribute("data-expanded"))}let we=new Map;for(let u of e.querySelectorAll("template[data-datagrid-editor]"))u.dataset.col&&we.set(u.dataset.col,u);let g=null,P=null;function R(u){return u.matches("input, select, textarea")?u:u.querySelector("input, select, textarea")}function z(u){if(P)return P;let d=R(u);return d?d.tagName==="SELECT"?{value:d.value,label:d.selectedOptions[0]?.textContent?.trim()??d.value}:{value:d.value,label:d.value}:{value:"",label:""}}function ee(u){if(!g)return;let d=g;g=null,d.removeAttribute("data-editing");let E=d.__hcOldValue,M=null;if(u)d.innerHTML=d.__hcOldHTML;else{let{value:K,label:B}=z(d.firstElementChild??d);d.textContent=B,K!=null&&K!==""&&(d.dataset.value=K),K!==E&&(M={cell:d,col:d.dataset.col,value:K,label:B,oldValue:E})}delete d.__hcOldValue,delete d.__hcOldHTML,P=null,d.tabIndex=0,d.focus(),M&&e.dispatchEvent(new CustomEvent("hc:datagridedit",{bubbles:!0,detail:M}))}let oe=()=>ee(!1),pe=()=>ee(!0);function X(u){u.key==="Escape"?(u.preventDefault(),u.stopPropagation(),pe()):u.key==="Enter"&&!u.shiftKey&&(u.target.closest(".hc-combobox")||(u.preventDefault(),u.stopPropagation(),oe()))}function J(u){P={value:u.detail.value,label:u.detail.label},oe()}function Jn(){setTimeout(()=>{g&&!g.contains(document.activeElement)&&oe()},0)}function qe(u,d){if(!u||!u.hasAttribute("data-editable"))return;let E=we.get(u.dataset.col);if(!E)return;W(),g&&oe();let M=u.textContent.trim(),K=u.dataset.value??M;u.__hcOldValue=K,u.__hcOldHTML=u.innerHTML;let B=E.content.firstElementChild.cloneNode(!0),Y=B.classList?.contains("hc-combobox");u.setAttribute("data-editing",""),u.replaceChildren(B),g=u,P=null;let U=R(B);U&&(U.tagName==="SELECT"?U.value=K:Y?U.value=M:U.value=d??M),B.addEventListener("keydown",X),B.addEventListener("focusout",Jn),Y&&B.addEventListener("hc:comboboxselect",J),(U??B).focus(),d!=null&&U&&U.tagName==="INPUT"&&(U.value=d,U.setSelectionRange?.(U.value.length,U.value.length))}function ue(u){if(!O(u))return;let d=u.target.closest?.(".hc-datagrid__cell");if(!d||!e.contains(d))return;let E=_(d);E&&(p(E.r,E.c,!1),qe(d))}let te=e.querySelector(".hc-datagrid__scroll"),G=e.ownerDocument.createElement("div");G.className="hc-datagrid__tooltip",G.setAttribute("role","tooltip"),G.hidden=!0,e.appendChild(G);function me(u){G.textContent=u.textContent.trim(),G.hidden=!1;let d=u.getBoundingClientRect(),E=G.getBoundingClientRect(),M=e.ownerDocument.documentElement,K=M.clientWidth||0,B=M.clientHeight||0,Y=d.left;Y+E.width>K-4&&(Y=Math.max(4,K-E.width-4));let U=d.bottom+4;U+E.height>B-4&&(U=Math.max(4,d.top-E.height-4)),G.style.left=`${Y}px`,G.style.top=`${U}px`}function W(){G.hidden=!0}function Lt(u){return u&&e.contains(u)&&u.scrollWidth>u.clientWidth+1}function St(u){if(!O(u))return;let d=u.target.closest?.(".hc-datagrid__truncate");Lt(d)&&me(d)}function ne(u){u.target.closest?.(".hc-datagrid__truncate")&&W()}function ve(u){if(!O(u))return;let E=u.target.closest?.(".hc-datagrid__cell")?.querySelector?.(":scope > .hc-datagrid__truncate")??null;Lt(E)?me(E):W()}c(),Wt(e),Et(),N(),C(),t.addEventListener("keydown",q),t.addEventListener("keydown",H),t.addEventListener("change",L),t.addEventListener("focusin",k),t.addEventListener("dblclick",ue),t.addEventListener("click",De),t.addEventListener("click",I),e.addEventListener("pointerover",St),e.addEventListener("pointerout",ne),e.addEventListener("focusin",ve),e.addEventListener("focusout",W),te&&te.addEventListener("scroll",W,{passive:!0});let fe=null;typeof ResizeObserver<"u"&&(fe=new ResizeObserver(()=>Wt(e)),fe.observe(e));let xt=null,Qn=e.querySelector(".hc-datagrid__body");Qn&&typeof MutationObserver<"u"&&(xt=new MutationObserver(()=>{c(),Wt(e)}),xt.observe(Qn,{childList:!0})),n.set(e,()=>{t.removeEventListener("keydown",q),t.removeEventListener("keydown",H),t.removeEventListener("change",L),t.removeEventListener("focusin",k),t.removeEventListener("dblclick",ue),t.removeEventListener("click",De),t.removeEventListener("click",I),e.removeEventListener("pointerover",St),e.removeEventListener("pointerout",ne),e.removeEventListener("focusin",ve),e.removeEventListener("focusout",W),te&&te.removeEventListener("scroll",W),G.remove();for(let u of b)u();fe&&fe.disconnect(),xt&&xt.disconnect()})}function Ho(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[vt])return e[vt];let n=new Map;for(let i of e.querySelectorAll(".hc-datagrid"))Wn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-datagrid")&&Wn(o,n),o.querySelectorAll?.(".hc-datagrid").forEach(s=>Wn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[vt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[vt]}};return e[vt]=r,r}var Vo=0;function Ae(e){return e?.closest?.(".hc-field")??null}function Xn(e,n){let t=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean);t.includes(n)||(t.push(n),e.setAttribute("aria-describedby",t.join(" ")))}function Fr(e,n){let t=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean).filter(r=>r!==n);t.length?e.setAttribute("aria-describedby",t.join(" ")):e.removeAttribute("aria-describedby")}function Gt(e,n){let t=e.querySelector(".hc-field__error");return t||(t=e.ownerDocument.createElement("p"),t.className="hc-field__error",t.setAttribute("aria-live","polite"),e.appendChild(t)),t.id||(t.id=`hc-field-error-${Vo+=1}`),Xn(n,t.id),t}var gt="__hcValidationUninstall";function Gn(e){return e&&typeof e.willValidate=="boolean"&&e.willValidate&&typeof e.checkValidity=="function"&&Ae(e)!=null}function Wo(e){let n=Ae(e);if(!n)return;e.dataset.hcValidated="",e.setAttribute("aria-invalid","true"),n.setAttribute("data-invalid","true");let t=Gt(n,e);t.textContent=e.validationMessage,delete e.dataset.hcServerInvalid,t.removeAttribute("data-hc-server-error")}function Br(e){let n=Ae(e);if(!n)return;e.removeAttribute("aria-invalid"),n.removeAttribute("data-invalid");let t=n.querySelector(".hc-field__error");t&&(t.textContent="")}function Xo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[gt])return e[gt];function n(a){let o=a.target;Gn(o)&&(a.preventDefault(),Wo(o))}function t(a){let o=a.target;Gn(o)&&o.dataset.hcServerInvalid==null&&o.checkValidity()&&Br(o)}function r(a){let o=a.target;Gn(o)&&o.dataset.hcServerInvalid==null&&o.dataset.hcValidated!=null&&o.checkValidity()&&Br(o)}e.addEventListener("invalid",n,!0),e.addEventListener("blur",t,!0),e.addEventListener("input",r),e.addEventListener("change",r);let i=()=>{e[gt]===i&&(e.removeEventListener("invalid",n,!0),e.removeEventListener("blur",t,!0),e.removeEventListener("input",r),e.removeEventListener("change",r),delete e[gt])};return e[gt]=i,i}var yt="__hcThemeToggleUninstall";function Go(e){try{return localStorage.getItem(e)}catch{return null}}function jo(e,n){try{localStorage.setItem(e,n)}catch{}}function Zo(){return typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches}function Jo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[yt])return e[yt];let n=e.documentElement,t=()=>n.getAttribute("data-theme")??(Zo()?"dark":"light");function r(f){for(let b of f.childNodes)if(b.nodeType===3&&b.textContent.trim()||b.nodeType===1&&!b.hasAttribute("aria-hidden")&&b.textContent.trim())return!0;return!1}function i(){let f=t();for(let b of e.querySelectorAll("[data-hc-theme-toggle]"))b.setAttribute("aria-pressed",String(f==="dark")),!b.hasAttribute("aria-label")&&!r(b)&&b.setAttribute("aria-label",$("themeToggle.label"))}function a(f,b){n.setAttribute("data-theme",f),b&&jo(b,f),i()}function o(f){let b=f.target?.closest?.("[data-hc-theme-toggle]");if(!b)return;let h=t()==="dark"?"light":"dark";a(h,b.getAttribute("data-persist")),b.dispatchEvent(new CustomEvent("hc:themechange",{bubbles:!0,detail:{theme:h}}))}function s(){i()}let c=e.querySelector("[data-hc-theme-toggle][data-persist]");if(c){let f=Go(c.getAttribute("data-persist"));(f==="light"||f==="dark")&&n.setAttribute("data-theme",f)}i(),e.addEventListener("click",o),e.addEventListener("htmx:afterSwap",s);let l=()=>{e[yt]===l&&(e.removeEventListener("click",o),e.removeEventListener("htmx:afterSwap",s),delete e[yt])};return e[yt]=l,l}var At="__hcFieldErrorsUninstall";function Qo(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}function ea(e,n){let t=e.getAttribute("data-hc-field-errors");return t?(n.nodeType===9?n:n.ownerDocument).querySelector(t):e.closest("form")}function ta(e,n){let t;return e.elements&&typeof e.elements.namedItem=="function"?t=e.elements.namedItem(n):t=e.querySelector(`[name="${Qo(n)}"]`),t&&t.tagName==null&&typeof t.length=="number"&&(t=t[0]??null),t??null}function na(e){let n=e.getAttribute("data-message-key"),t={field:e.getAttribute("data-field")??"",code:e.getAttribute("data-code")??""};if(n&&jt(n))return $(n,t);let r=e.textContent.trim();return r||$("fieldErrors.unknown",t)}var ra=0;function ia(e,n){let t=e.ownerDocument,r=Ae(e),i;r?(i=Gt(r,e),r.setAttribute("data-invalid","true")):(i=t.createElement("p"),i.className="hc-field__error",i.setAttribute("aria-live","polite"),i.setAttribute("data-hc-server-error-owned",""),i.id=`hc-server-error-${ra+=1}`,e.insertAdjacentElement("afterend",i),Xn(e,i.id)),i.textContent="",n.forEach((a,o)=>{o>0&&i.appendChild(t.createElement("br")),i.appendChild(t.createTextNode(a))}),i.setAttribute("data-hc-server-error",""),e.setAttribute("aria-invalid","true"),e.dataset.hcServerInvalid=""}function Ur(e){for(let n of e.querySelectorAll("[data-hc-server-invalid]"))Yr(n)}function Yr(e){delete e.dataset.hcServerInvalid,e.removeAttribute("aria-invalid");let n=Ae(e);n&&n.removeAttribute("data-invalid");let t=e.ownerDocument,r=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean);for(let i of r){let a=t.getElementById(i);!a||!a.hasAttribute("data-hc-server-error")||(a.hasAttribute("data-hc-server-error-owned")?(Fr(e,i),a.remove()):(a.textContent="",a.removeAttribute("data-hc-server-error")))}}function $r(e,n){if(e.dataset.distributed!=null)return;let t=ea(e,n);if(!t){e.dataset.distributed="none";return}Ur(t);let r=e.querySelectorAll(".hc-alert__error[data-field]"),i=new Map,a=0,o=0;for(let s of r){o+=1;let c=ta(t,s.getAttribute("data-field"));c&&(i.has(c)||i.set(c,[]),i.get(c).push(na(s)),s.setAttribute("data-distributed","true"),a+=1)}for(let[s,c]of i)ia(s,c);if(e.dataset.distributed=a===0?"none":a===o?"all":"partial",e.getAttribute("data-focus")!=="none"){let s=i.keys().next().value;try{s?.focus?.()}catch{}}}function jn(e,n){if(!(!e||typeof e.querySelectorAll!="function")){typeof e.matches=="function"&&e.matches("[data-hc-field-errors]")&&$r(e,n);for(let t of e.querySelectorAll("[data-hc-field-errors]"))$r(t,n)}}function oa(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[At])return e[At];function n(s){jn(s.target,e)}function t(s){let c=s.target;c?.dataset?.hcServerInvalid!=null&&Yr(c)}function r(s){let c=s.target;c&&typeof c.querySelectorAll=="function"&&Ur(c)}e.addEventListener("htmx:afterSwap",n),e.addEventListener("htmx:oobAfterSwap",n),e.addEventListener("input",t),e.addEventListener("change",t),e.addEventListener("submit",r,!0),e.addEventListener("reset",r,!0);let i=new MutationObserver(s=>{for(let c of s)for(let l of c.addedNodes)l.nodeType===1&&jn(l,e)}),a=e.nodeType===9?e.documentElement:e;i.observe(a,{childList:!0,subtree:!0}),jn(a,e);let o=()=>{e[At]===o&&(e.removeEventListener("htmx:afterSwap",n),e.removeEventListener("htmx:oobAfterSwap",n),e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("submit",r,!0),e.removeEventListener("reset",r,!0),i.disconnect(),delete e[At])};return e[At]=o,o}var wt="__hcChartUninstall";function aa(e){return e&&e.plot?e.plot:typeof globalThis<"u"&&globalThis.Plot?globalThis.Plot:null}function sa(e){let n=(e.getAttribute("data-hc-chart")||"bar").toLowerCase();return n==="line"||n==="area"?n:"bar"}function ca(e,n){let t=(e.getAttribute("data-mark")||"").toLowerCase();return t==="bar"||t==="line"||t==="area"?t:n}function zr(e){let n=String(e).replace(/[^0-9.+-]/g,"");if(n===""||n==="+"||n==="-"||n===".")return null;let t=Number.parseFloat(n);return Number.isFinite(t)?t:null}function la(e,n){let t=String(e).trim();if(n==="number")return zr(t);if(n==="date"){let r=new Date(t);return Number.isNaN(r.getTime())?t:r}return t}function ua(e,n){let t=n.tHead&&n.tHead.rows[0],r=n.tBodies&&n.tBodies[0];if(!t||!r)return null;let i=(e.getAttribute("data-x-type")||"category").toLowerCase(),a=sa(e),o=[...t.cells],s=(o[0]?o[0].textContent:"").trim(),c=o.slice(1).map(f=>({name:f.textContent.trim(),mark:ca(f,a)}));if(!c.length)return null;let l=[];for(let f of r.rows){let b=[...f.cells];if(!b.length)continue;let h=la(b[0].textContent,i);c.forEach((A,m)=>{let S=b[m+1];S&&l.push({x:h,series:A.name,mark:A.mark,value:zr(S.textContent)})})}return l.length?{xName:s,xType:i,series:c,rows:l}:null}function fa(e,n){let t=s=>n.filter(c=>c.mark===s&&c.value!=null),r=[e.ruleY([0])],i=t("area");i.length&&(r.push(e.areaY(i,{x:"x",y:"value",z:"series",fill:"series",fillOpacity:.2,curve:"monotone-x"})),r.push(e.lineY(i,{x:"x",y:"value",z:"series",stroke:"series",curve:"monotone-x"})));let a=t("bar");a.length&&r.push(e.barY(a,{x:"x",y:"value",fill:"series"}));let o=t("line");return o.length&&(r.push(e.lineY(o,{x:"x",y:"value",z:"series",stroke:"series",curve:"monotone-x"})),r.push(e.dot(o,{x:"x",y:"value",z:"series",fill:"series",r:2.5}))),r}function Zn(e,n=16){let t=String(e||"").trim().match(/^(-?[\d.]+)(px|rem|em)?$/);if(!t)return null;let r=Number.parseFloat(t[1]);return Number.isFinite(r)?t[2]==="rem"||t[2]==="em"?r*n:r:null}function da(e){if(typeof getComputedStyle!="function")return null;let n=getComputedStyle(e),t=[];for(let r=1;r<=6;r+=1){let i=n.getPropertyValue(`--hc-chart-series-${r}`).trim();i&&t.push(i)}return t.length?t:null}function ha(e){if(e==="date")return"utc";if(e==="number")return"linear"}function pa(e,n,t){if(n.has(e))return;let r=aa(t);if(!r)return;let i=e.querySelector("table");if(!i)return;let a=ua(e,i);if(!a)return;let o=typeof getComputedStyle=="function"?getComputedStyle(e):null,s=Zn(e.getAttribute("data-width"))||e.clientWidth||640,c=Zn(e.getAttribute("data-height"))||o&&Zn(o.getPropertyValue("--hc-chart-height"))||320,l=new Set(a.rows.map(S=>S.series)).size,f=e.getAttribute("data-legend")!=="false"&&l>1,b=da(e),h=e.getAttribute("data-title")||(i.caption?i.caption.textContent.trim():void 0),A=a.xType==="category"?[...new Set(a.rows.map(S=>S.x))]:void 0,m=r.plot({width:s,height:c,className:"hc-chart__plot",style:{background:"transparent",color:"inherit",fontFamily:"inherit"},title:h||void 0,x:{label:a.xName||void 0,type:ha(a.xType),domain:A},y:{label:e.getAttribute("data-y-label")||void 0,grid:!0},color:b?{range:b,legend:f}:{legend:f},marks:fa(r,a.rows)});m.classList.add("hc-chart__plot"),m.setAttribute("aria-hidden","true"),i.classList.add("hc-sr-only"),e.appendChild(m),e.setAttribute("data-state","rendered"),n.add(e)}function ma(e=typeof document<"u"?document:null,n={}){if(!e)return()=>{};if(e[wt])return e[wt];let t=new WeakSet,r=s=>{(s&&s.querySelectorAll?s.querySelectorAll("[data-hc-chart]"):[]).forEach(l=>pa(l,t,n))};r(e);let i=e.body||e,a=s=>{let c=s&&s.target;c&&c.querySelectorAll&&r(c)};i.addEventListener("htmx:load",a);let o=()=>{e[wt]===o&&(i.removeEventListener("htmx:load",a),delete e[wt])};return e[wt]=o,o}var xs="0.1.0";export{Pe as DEFAULT_MESSAGES,Wr as getMessages,jt as hasMessage,wo as installAvatar,Do as installCalendar,po as installCarousel,ma as installChart,ri as installCloseDialog,ii as installClosePopover,Yi as installCombobox,Mo as installCommand,Gr as installConfirm,_o as installContextMenu,Ho as installDatagrid,ro as installDrawer,oa as installFieldErrors,co as installHovercard,Po as installInputOtp,Ai as installMenu,wi as installMenubar,eo as installMulticombobox,_i as installNavmenu,Lo as installPasswordToggle,Pi as installPopover,oi as installRemoteDialog,$o as installShell,Ii as installSlider,Ro as installSplitter,li as installTabs,Jo as installThemeToggle,ni as installToast,ho as installToggleGroup,vo as installToolbar,Di as installTooltip,Xo as installValidation,Vr as resetMessages,Hr as setMessages,xs as version};
|
|
1
|
+
var Pe=Object.freeze({"combobox.empty":"No matches","combobox.loading":"Loading\u2026","combobox.error":"Couldn\u2019t load options","combobox.create":"Create \u201C{value}\u201D","multicombobox.empty":"No matches","multicombobox.create":"Add \u201C{value}\u201D","multicombobox.remove":"Remove {label}","calendar.label":"Calendar","calendar.prevMonth":"Previous month","calendar.nextMonth":"Next month","calendar.month":"Month","calendar.year":"Year","confirm.message":"Continue?","confirm.title":"Confirm","confirm.confirm":"Confirm","confirm.cancel":"Cancel","fieldErrors.unknown":"Invalid value","shell.toggleNav":"Toggle navigation","shell.collapseNav":"Collapse sidebar","splitter.resize":"Resize panels","themeToggle.label":"Switch color theme","toast.label":"Notifications"}),or=Symbol.for("hypermedia-components.i18n"),me=globalThis[or]||(globalThis[or]={messages:{...Pe}});function Xr(e){let n=me.messages;return me.messages={...me.messages,...e||{}},()=>{me.messages=n}}function jr(){me.messages={...Pe}}function Gr(){return{...me.messages}}function Zt(e){return me.messages[e]!=null||Pe[e]!=null}function $(e,n){let t=me.messages[e];return t==null&&(t=Pe[e]),t==null&&(t=e),n&&(t=t.replace(/\{(\w+)\}/g,(r,i)=>Object.prototype.hasOwnProperty.call(n,i)?String(n[i]):r)),t}var Ne="__hcConfirmUninstall";function Jr(e){let n=e.createElement("dialog");return n.className="hc-dialog hc-confirm-dialog",n.setAttribute("aria-labelledby","hc-confirm-title"),n.setAttribute("aria-describedby","hc-confirm-message"),n.innerHTML=['<header class="hc-dialog__header">',' <h2 class="hc-dialog__title" id="hc-confirm-title">Confirm</h2>',"</header>",'<div class="hc-dialog__body" id="hc-confirm-message"></div>','<footer class="hc-dialog__footer">',' <button class="hc-button" type="button" data-hc-confirm-cancel>Cancel</button>',' <button class="hc-button" type="button" data-variant="primary" data-hc-confirm-ok>Confirm</button>',"</footer>"].join(`
|
|
2
|
+
`),n}function Zr(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ne])return e[Ne];let n=null,t=null;function r(){if(!n||!n.isConnected){n=Jr(e);let o=n.querySelector("[data-hc-confirm-cancel]"),s=n.querySelector("[data-hc-confirm-ok]");o.addEventListener("click",()=>n.close("cancel")),s.addEventListener("click",()=>n.close("confirm")),n.addEventListener("close",()=>{let c=t,l=n.returnValue;t=null,c&&l==="confirm"&&c.dispatchEvent(new CustomEvent("hc:confirmed",{bubbles:!0}))}),e.body.appendChild(n)}return n}function i(o){let s=o.target.closest("[data-hc-confirm]");if(!s)return;o.preventDefault(),o.stopPropagation();let c=r(),l=s.getAttribute("data-hc-confirm")||$("confirm.message"),f=s.getAttribute("data-hc-confirm-title")||$("confirm.title"),m=s.getAttribute("data-hc-confirm-label")||$("confirm.confirm"),h=s.getAttribute("data-hc-cancel-label")||$("confirm.cancel"),A=s.getAttribute("data-hc-confirm-variant")||s.getAttribute("data-variant")||"primary";c.querySelector("#hc-confirm-title").textContent=f,c.querySelector("#hc-confirm-message").textContent=l;let b=c.querySelector("[data-hc-confirm-ok]");b.textContent=m,b.setAttribute("data-variant",A),c.querySelector("[data-hc-confirm-cancel]").textContent=h,t=s,c.returnValue="",c.showModal(),c.querySelector("[data-hc-confirm-cancel]").focus()}e.addEventListener("click",i,!0);let a=()=>{e[Ne]===a&&(e.removeEventListener("click",i,!0),n&&n.isConnected&&n.remove(),n=null,t=null,delete e[Ne])};return e[Ne]=a,a}var Qr=4500,Ie="__hcToastUninstall";function ei(e){let n=e.querySelector("[data-hc-toast-region]");return n?{region:n,created:!1}:(n=e.createElement("div"),n.className="hc-toast-region",n.setAttribute("data-hc-toast-region",""),n.setAttribute("role","region"),n.setAttribute("aria-label",$("toast.label")),e.body.appendChild(n),{region:n,created:!0})}function ar(e,n,t){let r=t.variant||"info",i=r==="error";if(n.setAttribute("data-variant",r),n.setAttribute("role",i?"alert":"status"),n.setAttribute("aria-live",i?"assertive":"polite"),n.setAttribute("aria-atomic","true"),t.id!=null&&n.setAttribute("data-toast-id",String(t.id)),n.replaceChildren(),t.title){let s=e.createElement("div");s.className="hc-toast__title",s.textContent=String(t.title),n.appendChild(s)}let a=e.createElement("div");a.className="hc-toast__body",a.textContent=String(t.message??""),n.appendChild(a);let o=t.action;if(o&&o.label&&o.event){let s=e.createElement("button");s.className="hc-toast__action",s.type="button",s.textContent=String(o.label),n.appendChild(s),n._hcAction={id:t.id??null,event:String(o.event),action:o}}else n._hcAction=null}function ti(e,n){let t=e.createElement("div");return t.className="hc-toast",ar(e,t,n),t}function Re(e){e._hcTimer&&(clearTimeout(e._hcTimer),e._hcTimer=null),e.remove()}function ni(e){let n=parseInt(e.getAttribute("data-limit")??"",10);if(!(!Number.isFinite(n)||n<=0))for(;e.children.length>n&&e.firstElementChild;)Re(e.firstElementChild)}function ri(e){let n=0,t=0,r=1,i=!1;function a(c){c.button!=null&&c.button!==0||c.target.closest?.(".hc-toast__action")||(i=!0,n=c.clientX,t=0,r=e.offsetWidth||1,e.style.transition="none",e.setPointerCapture?.(c.pointerId))}function o(c){i&&(t=c.clientX-n,e.style.translate=`${t}px`,e.style.opacity=String(Math.max(0,1-Math.abs(t)/r)))}function s(c){if(i)if(i=!1,e.releasePointerCapture?.(c.pointerId),e.style.transition="",Math.abs(t)>r*.4){let l=t<0?-1:1;e.style.translate=`${l*(r+40)}px`,e.style.opacity="0",e.addEventListener("transitionend",()=>Re(e),{once:!0}),setTimeout(()=>Re(e),220)}else e.style.translate="",e.style.opacity=""}e.addEventListener("pointerdown",a),e.addEventListener("pointermove",o),e.addEventListener("pointerup",s),e.addEventListener("pointercancel",s)}function ii(e){e.addEventListener("click",n=>{let t=n.target.closest?.(".hc-toast__action");if(!t||!e.contains(t)||!e._hcAction)return;let{event:r,id:i,action:a}=e._hcAction;e.dispatchEvent(new CustomEvent(r,{bubbles:!0,detail:{id:i,action:a,toast:e}})),Re(e)})}function oi(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ie])return e[Ie];let n=null;function t(i){let a=i&&i.detail;if(!a||!a.message)return;let{region:o,created:s}=ei(e);s&&(n=o);let c=null;a.id!=null&&(c=[...o.querySelectorAll(".hc-toast")].find(f=>f.getAttribute("data-toast-id")===String(a.id))),c?(c._hcTimer&&(clearTimeout(c._hcTimer),c._hcTimer=null),ar(e,c,a)):(c=ti(e,a),o.appendChild(c),ni(o),ri(c),ii(c));let l=Number.isFinite(a.duration)?Number(a.duration):Qr;l>0&&(c._hcTimer=setTimeout(()=>Re(c),l))}e.body.addEventListener("hc:toast",t);let r=()=>{e[Ie]===r&&(e.body.removeEventListener("hc:toast",t),n&&n.isConnected&&n.remove(),n=null,delete e[Ie])};return e[Ie]=r,r}var Ke="__hcCloseDialogUninstall";function sr(e){let n=e.target;if(!n||typeof n.matches!="function"||!n.closest("[data-hc-close-dialog-on-success]")||(e.detail||{}).successful!==!0)return;let i=n.closest("[data-hc-close-dialog-on-success]").closest("dialog");i&&typeof i.close=="function"&&i.close()}function ai(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ke])return e[Ke];e.body.addEventListener("htmx:afterRequest",sr);let n=()=>{e[Ke]===n&&(e.body.removeEventListener("htmx:afterRequest",sr),delete e[Ke])};return e[Ke]=n,n}var Fe="__hcClosePopoverUninstall";function cr(e){let n=e.target;if(!n||typeof n.matches!="function")return;let t=n.closest("[data-hc-close-popover-on-success]");if(!t||(e.detail||{}).successful!==!0)return;let i=t.closest("[popover]");i&&typeof i.hidePopover=="function"&&i.hidePopover()}function si(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Fe])return e[Fe];e.body.addEventListener("htmx:afterRequest",cr);let n=()=>{e[Fe]===n&&(e.body.removeEventListener("htmx:afterRequest",cr),delete e[Fe])};return e[Fe]=n,n}var Be="__hcRemoteDialogUninstall";function lr(e){let n=e.target;if(!n||typeof n.matches!="function"||!n.matches("[data-hc-remote-dialog-root]"))return;let t=n.querySelector("dialog");t&&typeof t.showModal=="function"&&!t.open&&t.showModal()}function ci(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Be])return e[Be];e.body.addEventListener("htmx:afterSwap",lr);let n=()=>{e[Be]===n&&(e.body.removeEventListener("htmx:afterSwap",lr),delete e[Be])};return e[Be]=n,n}var $e="__hcTabsUninstall";function Tt(e){return e.querySelector(':scope > [role="tablist"]')}function Mt(e){return Array.from(e.querySelectorAll(':scope > [role="tab"]'))}function li(e){return Array.from(e.querySelectorAll(':scope > [role="tabpanel"]'))}function Ue(e){return!(e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")}function hr(e){return e.getAttribute("data-overflow")==="scroll"}function ui(e,n){return e.getAttribute("data-orientation")==="vertical"||n!=null&&n.getAttribute("aria-orientation")==="vertical"}function ur(e,n){let t=e.createElement("button");return t.type="button",t.className="hc-tabs__scroll",t.dataset.dir=n,t.setAttribute("aria-hidden","true"),t.tabIndex=-1,t.hidden=!0,t}function fi(e,n){if(!hr(e))return null;let t=e.ownerDocument,r=t.defaultView,i=ur(t,"start"),a=ur(t,"end");e.append(i,a);let o=()=>r?r.getComputedStyle(n).direction==="rtl":!1;function s(){let b=n.offsetHeight;b&&(i.style.blockSize=`${b}px`,a.style.blockSize=`${b}px`);let S=n.scrollWidth-n.clientWidth,T=Math.abs(n.scrollLeft),y=S>1;i.hidden=!y||T<=1,a.hidden=!y||T>=S-1}function c(b){if(typeof n.scrollBy!="function")return;let S=Math.max(120,n.clientWidth*.8),T=(b?1:-1)*(o()?-1:1);n.scrollBy({left:T*S,behavior:"smooth"})}let l=()=>c(!1),f=()=>c(!0);i.addEventListener("click",l),a.addEventListener("click",f),n.addEventListener("scroll",s,{passive:!0});let m=null;typeof ResizeObserver<"u"&&(m=new ResizeObserver(s),m.observe(n));let h=null;typeof MutationObserver<"u"&&(h=new MutationObserver(s),h.observe(n,{childList:!0})),s();let A=n.querySelector(':scope > [role="tab"][aria-selected="true"]');return A&&typeof A.scrollIntoView=="function"&&A.scrollIntoView({inline:"nearest",block:"nearest",behavior:"instant"}),()=>{i.remove(),a.remove(),n.removeEventListener("scroll",s),m?.disconnect(),h?.disconnect()}}function Ct(e,n,{focus:t=!0}={}){let r=Tt(e);if(!r)return;let i=Mt(r),a=li(e);for(let o of i){let s=o===n;o.setAttribute("aria-selected",String(s)),o.setAttribute("tabindex",s?"0":"-1")}for(let o of a)i.find(l=>l.getAttribute("aria-controls")===o.id)===n?(o.removeAttribute("hidden"),o.dispatchEvent(new CustomEvent("hc:tabactivated",{bubbles:!0}))):o.setAttribute("hidden","until-found");t?n.focus():hr(e)&&typeof n.scrollIntoView=="function"&&n.scrollIntoView({inline:"nearest",block:"nearest"})}function fr(e,n,t){let r=Tt(e),i=Mt(r).filter(Ue);if(i.length===0)return;let a=i.indexOf(n);if(a===-1)return;let o=i.length;i[(a+t+o)%o].focus()}function dr(e,n){let t=Tt(e),r=Mt(t).filter(Ue);r.length!==0&&(n==="first"?r[0]:r[r.length-1]).focus()}function Qt(e,n){if(n.has(e))return;let t=Tt(e);if(!t)return;let r=e.getAttribute("data-activation")==="automatic";e.getAttribute("data-orientation")==="vertical"&&t.setAttribute("aria-orientation","vertical");function i(l){let f=l.target.closest('[role="tab"]');!f||!t.contains(f)||!Ue(f)||(l.preventDefault(),Ct(e,f))}function a(l){let f=l.target.closest('[role="tab"]');if(!f||!t.contains(f))return;let m=ui(e,t),h=l.key;!m&&getComputedStyle(t).direction==="rtl"&&(h==="ArrowRight"?h="ArrowLeft":h==="ArrowLeft"&&(h="ArrowRight"));let A=m?"ArrowDown":"ArrowRight",b=m?"ArrowUp":"ArrowLeft";switch(h){case A:l.preventDefault(),fr(e,f,1);break;case b:l.preventDefault(),fr(e,f,-1);break;case"Home":l.preventDefault(),dr(e,"first");break;case"End":l.preventDefault(),dr(e,"last");break;case"Enter":case" ":if(!Ue(f))return;l.preventDefault(),Ct(e,f);break;default:break}}function o(l){if(!r)return;let f=l.target.closest('[role="tab"]');!f||!t.contains(f)||!Ue(f)||Ct(e,f,{focus:!1})}function s(l){let f=l.target.closest('[role="tabpanel"]');if(!f||f.parentElement!==e)return;let m=Mt(t).find(h=>h.getAttribute("aria-controls")===f.id);m&&Ct(e,m,{focus:!1})}let c=fi(e,t);e.addEventListener("click",i),e.addEventListener("keydown",a),e.addEventListener("focusin",o),e.addEventListener("beforematch",s),n.set(e,()=>{e.removeEventListener("click",i),e.removeEventListener("keydown",a),e.removeEventListener("focusin",o),e.removeEventListener("beforematch",s),c?.()})}function di(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[$e])return e[$e];let n=new Map;for(let i of e.querySelectorAll(".hc-tabs"))Qt(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-tabs")&&Qt(o,n),o.querySelectorAll?.(".hc-tabs").forEach(s=>Qt(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[$e]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[$e]}};return e[$e]=r,r}var se='[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"]';function Ee(e){return Array.from(e.querySelectorAll(se)).filter(n=>n.closest(".hc-menu")===e)}function V(e){return!(e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")}function hi(e){return e.closest('[role="group"]')??e.closest(".hc-menu")}function en(e,n){let t=Ee(e).filter(V);if(t.length===0)return;let r=t.length;t[(n%r+r)%r].focus()}function ye(e){en(e,0)}function tn(e){let n=Ee(e).filter(V).length;n>0&&en(e,n-1)}function pr(e,n,t){let r=Ee(e).filter(V);if(r.length===0)return;let i=r.indexOf(n),a=i===-1?t>0?-1:0:i;en(e,a+t)}function pi(e,n,t){let r=Ee(e).filter(V);if(r.length===0)return;let i=r.indexOf(n),a=t.toLowerCase();for(let o=1;o<=r.length;o++){let s=(i+o+r.length)%r.length;if(r[s].textContent.trim().toLowerCase().startsWith(a)){r[s].focus();return}}}function mr(e,n){let t=e.ownerDocument.activeElement;switch(n.key){case"ArrowDown":return n.preventDefault(),pr(e,t,1),!0;case"ArrowUp":return n.preventDefault(),pr(e,t,-1),!0;case"Home":return n.preventDefault(),ye(e),!0;case"End":return n.preventDefault(),tn(e),!0;case"Tab":return n.preventDefault(),e.hidePopover(),!0;default:return n.key.length===1&&/\S/.test(n.key)&&!n.ctrlKey&&!n.metaKey?(pi(e,t,n.key),!0):!1}}function Dt(e,n,t={}){let r=n.getAttribute("role"),i;if(r==="menuitemcheckbox")i=n.getAttribute("aria-checked")!=="true",n.setAttribute("aria-checked",String(i));else if(r==="menuitemradio"){i=!0;let a=hi(n);if(a){let o=n.closest(".hc-menu");for(let s of a.querySelectorAll('[role="menuitemradio"]'))s.closest(".hc-menu")===o&&s.setAttribute("aria-checked",s===n?"true":"false")}else n.setAttribute("aria-checked","true")}return e.dispatchEvent(new CustomEvent("hc:menuselect",{bubbles:!0,detail:{item:n,menu:e,checked:i,...t}})),{role:r,checked:i}}function j(){try{return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("anchor-name","--x")}catch{return!1}}var qt=(e,n,t)=>Math.max(n,Math.min(e,t)),mi={top:"block-start",bottom:"block-end",left:"inline-start",right:"inline-end"};function Le(e,n={}){let t=mi[e.getAttribute("data-side")]??n.side??"block-end",r=e.getAttribute("data-align"),i=["start","center","end"].includes(r)?r:n.align??"start";return{side:t,align:i}}function bi(e,n,t={}){let{side:r="block-end",align:i="start",gap:a=4,matchWidth:o=!1}=t,s=n.getBoundingClientRect(),c=e.getBoundingClientRect(),l=e.ownerDocument.defaultView,f=l?.innerWidth??0,m=l?.innerHeight??0,h=l?l.getComputedStyle(n).direction==="rtl":!1;if(r==="inline-end"||r==="inline-start"){let S=r==="inline-end"!==h,T;S?(T=s.right+a,T+c.width>f&&s.left-c.width-a>=0&&(T=s.left-c.width-a)):(T=s.left-c.width-a,T<0&&s.right+c.width+a<=f&&(T=s.right+a));let y;i==="center"?y=s.top+(s.height-c.height)/2:i==="end"?(y=s.bottom-c.height,y<0&&s.top+c.height<=m&&(y=s.top)):(y=s.top,y+c.height>m&&s.bottom-c.height>=0&&(y=s.bottom-c.height)),y=qt(y,a,Math.max(a,m-c.height-a)),T=qt(T,a,Math.max(a,f-c.width-a)),e.style.position="fixed",e.style.top=`${y}px`,e.style.left=`${T}px`,e.style.insetInlineStart="auto",e.style.insetBlockStart="auto",e.style.margin="0",o&&(e.style.minWidth=`${s.width}px`);return}let A;r==="block-start"?(A=s.top-c.height-a,A<0&&s.bottom+c.height+a<=m&&(A=s.bottom+a)):(A=s.bottom+a,A+c.height>m&&s.top-c.height-a>=0&&(A=s.top-c.height-a));let b;i==="center"?b=s.left+(s.width-c.width)/2:i!=="end"!==h?(b=s.left,b+c.width>f&&s.right-c.width>=0&&(b=s.right-c.width)):(b=s.right-c.width,b<0&&s.left+c.width<=f&&(b=s.left)),A=qt(A,a,Math.max(a,m-c.height-a)),b=qt(b,a,Math.max(a,f-c.width-a)),e.style.position="fixed",e.style.top=`${A}px`,e.style.left=`${b}px`,e.style.insetInlineStart="auto",e.style.insetBlockStart="auto",e.style.margin="0",o&&(e.style.minWidth=`${s.width}px`)}var vi=["position","top","left","inset-inline-start","inset-block-start","margin","min-width"];function G(e,n,t={}){let r=e.ownerDocument.defaultView,i=()=>bi(e,n,t);i(),r?.addEventListener("scroll",i,!0),r?.addEventListener("resize",i);let a=!1;return()=>{if(!a){a=!0,r?.removeEventListener("scroll",i,!0),r?.removeEventListener("resize",i);for(let o of vi)e.style.removeProperty(o)}}}var on="data-hc-submenu",gi=0;function br(e){let n=e.getAttribute?.(on);return n?e.ownerDocument.getElementById(n):null}function pe(e){return e!=null&&br(e)!=null}function Ot(e){try{return e.matches(":popover-open")}catch{return!1}}function nn(e,{focus:n=!1}={}){let t=e.__hcSubmenu;!t||typeof t.showPopover!="function"||(Ot(t)||t.showPopover(),n&&ye(t))}function rn(e,{focusParent:n=!1}={}){e&&(Ot(e)&&typeof e.hidePopover=="function"&&e.hidePopover(),n&&e.__hcSubmenuParent&&e.__hcSubmenuParent.focus())}function yi(e){let n=[];for(let t of e.querySelectorAll(`[${on}]`)){if(t.closest(".hc-menu")!==e)continue;let r=t.__hcSubmenu;r&&Ot(r)&&n.push(r)}return n}function Ai(e,n){let t=br(e);if(!t)return;t.id||(t.id=`hc-submenu-${gi+=1}`),t.hasAttribute("popover")||t.setAttribute("popover","auto"),t.getAttribute("role")||t.setAttribute("role","menu"),t.setAttribute("data-submenu",""),e.setAttribute("aria-haspopup","menu"),e.setAttribute("aria-expanded","false"),e.setAttribute("aria-controls",t.id),e.__hcSubmenu=t,t.__hcSubmenuParent=e;let r=j(),i=`--hc-submenu-${t.id}`;r&&(e.style.setProperty("anchor-name",i),t.style.setProperty("position-anchor",i));let a=null;function o(c){e.setAttribute("aria-expanded",String(c.newState==="open"))}function s(c){r||(c.newState==="open"?a=G(t,e,{side:"inline-end",gap:2}):(a?.(),a=null))}t.addEventListener("toggle",o),t.addEventListener("beforetoggle",s),n.push(()=>{t.removeEventListener("toggle",o),t.removeEventListener("beforetoggle",s),a?.(),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls"),t.removeAttribute("data-submenu"),r&&(e.style.removeProperty("anchor-name"),t.style.removeProperty("position-anchor")),delete e.__hcSubmenu,delete t.__hcSubmenuParent})}function Pt(e){let n=[];for(let a of e.querySelectorAll(`[${on}]`))Ai(a,n);if(n.length===0)return()=>{};function t(a){let o=a.target.closest?.(se);if(!o||!e.contains(o))return;let s=o.closest(".hc-menu");if(s){for(let c of yi(s))c.__hcSubmenuParent!==o&&rn(c);pe(o)&&V(o)&&nn(o)}}function r(a){let o=a.target.closest?.(se);if(!o||!e.contains(o)||!pe(o)||!V(o))return;a.preventDefault();let s=o.__hcSubmenu;Ot(s)?rn(s,{focusParent:!0}):nn(o,{focus:!0})}e.addEventListener("pointerover",t),e.addEventListener("click",r);let i=!1;return()=>{if(!i){i=!0,e.removeEventListener("pointerover",t),e.removeEventListener("click",r);for(let a of n)a()}}}function Nt(e,n){let t=n.target.closest?.(se)??null,r=(t??n.target).closest?.(".hc-menu")??e,i=r.ownerDocument.defaultView?r.ownerDocument.defaultView.getComputedStyle(r).direction==="rtl":!1,a=i?"ArrowLeft":"ArrowRight",o=i?"ArrowRight":"ArrowLeft";if(t&&pe(t)&&V(t)&&n.key===a){n.preventDefault(),nn(t,{focus:!0});return}if(n.key===o&&r!==e&&r.__hcSubmenuParent){n.preventDefault(),rn(r,{focusParent:!0});return}if(n.key==="Tab"){n.preventDefault(),e.hidePopover?.();return}mr(r,n)}var Ye="__hcMenuUninstall";function wi(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):String(e).replace(/[^\w-]/g,n=>`\\${n}`)}function Ei(e){return e.id?e.ownerDocument.querySelector(`[popovertarget="${wi(e.id)}"]`):null}function an(e,n){if(n.has(e)||!e.hasAttribute("popover"))return;let t=Ei(e);if(!t)return;t.setAttribute("aria-haspopup","menu"),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id);let r=`--hc-menu-${e.id}`,i=j();i&&(t.style.setProperty("anchor-name",r),e.style.setProperty("position-anchor",r));let a=null;function o(A){let b=A.newState==="open";t.setAttribute("aria-expanded",String(b))}let s=null,c=Ee(e).find(V);c&&!e.querySelector("[autofocus]")&&(c.setAttribute("autofocus",""),s=c);function l(A){i||(A.newState==="open"?a=G(e,t,{side:"block-end"}):(a?.(),a=null))}function f(A){e.matches(":popover-open")&&Nt(e,A)}function m(A){let b=A.target.closest(se);if(!b||!e.contains(b)||!V(b)||pe(b))return;let S=b.closest(".hc-menu")||e,{role:T}=Dt(S,b,{trigger:t});T==="menuitem"&&e.hidePopover()}let h=Pt(e);e.addEventListener("toggle",o),e.addEventListener("beforetoggle",l),e.addEventListener("keydown",f),e.addEventListener("click",m),n.set(e,()=>{e.removeEventListener("toggle",o),e.removeEventListener("beforetoggle",l),e.removeEventListener("keydown",f),e.removeEventListener("click",m),h(),a?.(),a=null,t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls"),i&&(t.style.removeProperty("anchor-name"),e.style.removeProperty("position-anchor")),s&&s.removeAttribute("autofocus")})}function Li(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ye])return e[Ye];let n=new Map;for(let i of e.querySelectorAll(".hc-menu"))an(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-menu")&&an(o,n),o.querySelectorAll?.(".hc-menu").forEach(s=>an(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[Ye]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[Ye]}};return e[Ye]=r,r}var He="__hcMenubarUninstall",sn='.hc-menubar[role="menubar"]';function vr(e){let n=e.ownerDocument.defaultView;return n?n.getComputedStyle(e).direction==="rtl":!1}function Ae(e){return Array.from(e.querySelectorAll('[role="menuitem"]')).filter(n=>n.closest(".hc-menu")==null&&n.closest('[role="menubar"]')===e)}function un(e){let n=e.getAttribute("popovertarget")||e.getAttribute("aria-controls");return n?e.ownerDocument.getElementById(n):null}function ze(e,n){let t=Ae(e),r=t.filter(V),i=n&&r.includes(n)?n:null;i||(i=r.find(a=>a.getAttribute("tabindex")==="0")??r[0]??null);for(let a of t)a.setAttribute("tabindex",a===i?"0":"-1")}function gr(e,n,t){let r=Ae(e).filter(V),i=r.indexOf(n);if(i===-1)return;let a=r[(i+t+r.length)%r.length];a.focus(),ze(e,a)}function yr(e,n){let t=Ae(e).filter(V);if(!t.length)return;let r=n==="first"?t[0]:t[t.length-1];r.focus(),ze(e,r)}function cn(e,n){let t=un(e);if(!(!t||typeof t.showPopover!="function")){try{t.showPopover()}catch{}n==="last"?tn(t):ye(t)}}function ln(e,n){if(n.has(e))return;let t=[];ze(e,null);function r(o){let s=o.target.closest?.('[role="menuitem"]');if(!s||!Ae(e).includes(s))return;let c=vr(e),l=c?"ArrowLeft":"ArrowRight",f=c?"ArrowRight":"ArrowLeft";switch(o.key){case l:o.preventDefault(),gr(e,s,1);break;case f:o.preventDefault(),gr(e,s,-1);break;case"Home":o.preventDefault(),yr(e,"first");break;case"End":o.preventDefault(),yr(e,"last");break;case"ArrowDown":o.preventDefault(),cn(s,"first");break;case"ArrowUp":o.preventDefault(),cn(s,"last");break;default:break}}function i(o){let s=o.target.closest?.('[role="menuitem"]');s&&Ae(e).includes(s)&&ze(e,s)}e.addEventListener("keydown",r),e.addEventListener("focusin",i),t.push(()=>{e.removeEventListener("keydown",r),e.removeEventListener("focusin",i)});function a(o,s){let c=Ae(e).filter(V),l=c.indexOf(o);if(l===-1)return;let f=c[(l+s+c.length)%c.length],m=un(o);if(m&&typeof m.hidePopover=="function")try{m.hidePopover()}catch{}ze(e,f),cn(f,"first")}for(let o of Ae(e)){let s=un(o);if(!s)continue;let c=l=>{let f=l.target.closest?.(se);if((f??l.target).closest?.(".hc-menu")!==s)return;let h=vr(s),A=h?"ArrowLeft":"ArrowRight",b=h?"ArrowRight":"ArrowLeft";if(l.key===A){if(f&&pe(f))return;l.preventDefault(),a(o,1)}else l.key===b&&(l.preventDefault(),a(o,-1))};s.addEventListener("keydown",c),t.push(()=>s.removeEventListener("keydown",c))}n.set(e,()=>{for(let o of t)o()})}function Si(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[He])return e[He];let n=new Map;for(let i of e.querySelectorAll(sn))ln(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(sn)&&ln(o,n),o.querySelectorAll?.(sn).forEach(s=>ln(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[He]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[He]}};return e[He]=r,r}var Ve="__hcNavmenuUninstall",xi=100,_i=150,Ar='a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])',ki=0;function fn(e){try{if(e.matches(":popover-open"))return!0}catch{}return e.hasAttribute("open")}function Ci(e){let n=e.getAttribute("aria-controls");if(n){let r=e.ownerDocument.getElementById(n);if(r)return r}let t=e.nextElementSibling;return t&&t.matches?.(".hc-navmenu__panel, [data-hc-navmenu-panel]")?t:null}function dn(e,n){if(n.has(e))return;let t=Array.from(e.querySelectorAll("[data-hc-navmenu-trigger]")).filter(p=>p.closest(".hc-navmenu")===e);if(t.length===0)return;let r=j(),i=[],a=[],o=new WeakMap,s=new WeakMap,c=null,l=null,f=null,m=!1,h=p=>i.find(v=>v.trigger===p)||null;function A(){l&&clearTimeout(l),f&&clearTimeout(f),l=null,f=null}function b(p){if(fn(p.panel)&&typeof p.panel.hidePopover=="function")try{p.panel.hidePopover()}catch{}}function S(p){if(A(),!fn(p.panel)){if(c&&c!==p.trigger){let v=h(c);v&&b(v)}if(typeof p.panel.showPopover=="function")try{p.panel.showPopover()}catch{}}}function T(){let p=e.ownerDocument.activeElement;for(let v of i){let O=s.get(v.trigger);if(O&&(O.th||O.ph)||v.trigger===p||v.panel.contains(p))return!0}return!1}function y(){clearTimeout(f),f=setTimeout(()=>{if(!T()&&c){let p=h(c);p&&b(p)}},_i)}function P(p){clearTimeout(l),l=setTimeout(()=>S(p),xi)}for(let p of t){let v=Ci(p);if(!v)continue;v.id||(v.id=`hc-navmenu-panel-${ki+=1}`),v.hasAttribute("popover")||v.setAttribute("popover","auto"),p.setAttribute("aria-haspopup","true"),p.setAttribute("aria-expanded","false"),p.setAttribute("aria-controls",v.id);let O=`--hc-navmenu-${v.id}`;r&&(p.style.setProperty("anchor-name",O),v.style.setProperty("position-anchor",O));let k={trigger:p,panel:v,anchorName:O};i.push(k),s.set(p,{th:!1,ph:!1});let L=te=>{let ce=te.newState==="open";if(p.setAttribute("aria-expanded",String(ce)),ce)c=p,!r&&!o.has(v)&&o.set(v,G(v,p,{side:"block-end",align:"start",gap:4}));else{let be=o.get(v);be&&(be(),o.delete(v)),c===p&&(c=null)}};v.addEventListener("toggle",L);let I=()=>{s.get(p).th=!0,P(k)},w=()=>{s.get(p).th=!1,y()},C=()=>{m||S(k)},B=()=>y(),E=()=>{s.get(p).ph=!0,A()},N=()=>{s.get(p).ph=!1,y()},z=()=>y();p.addEventListener("mouseenter",I),p.addEventListener("mouseleave",w),p.addEventListener("focus",C),p.addEventListener("blur",B),v.addEventListener("mouseenter",E),v.addEventListener("mouseleave",N),v.addEventListener("focusout",z),a.push(()=>{v.removeEventListener("toggle",L),p.removeEventListener("mouseenter",I),p.removeEventListener("mouseleave",w),p.removeEventListener("focus",C),p.removeEventListener("blur",B),v.removeEventListener("mouseenter",E),v.removeEventListener("mouseleave",N),v.removeEventListener("focusout",z);let te=o.get(v);te&&(te(),o.delete(v)),p.removeAttribute("aria-haspopup"),p.removeAttribute("aria-expanded"),r&&(p.style.removeProperty("anchor-name"),v.style.removeProperty("position-anchor"))})}function _(p){let v=p.target.closest?.("[data-hc-navmenu-trigger]");if(!v||v.closest(".hc-navmenu")!==e)return;let O=h(v);O&&(p.preventDefault(),fn(O.panel)?b(O):S(O))}function D(p){if(p.key==="Escape"&&c){let k=h(c),L=c;k&&(m=!0,b(k),L.focus(),p.preventDefault(),setTimeout(()=>{m=!1},0));return}let v=p.target.closest?.("[data-hc-navmenu-trigger]");if(!v||v.closest(".hc-navmenu")!==e)return;let O=h(v);if(O){if(p.key==="ArrowDown")p.preventDefault(),S(O),O.panel.querySelector(Ar)?.focus();else if(p.key==="ArrowUp"){p.preventDefault(),S(O);let k=O.panel.querySelectorAll(Ar);k[k.length-1]?.focus()}}}e.addEventListener("click",_),e.addEventListener("keydown",D),a.push(()=>{A(),e.removeEventListener("click",_),e.removeEventListener("keydown",D)}),n.set(e,()=>{for(let p of a)p()})}function Ti(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ve])return e[Ve];let n=new Map;for(let i of e.querySelectorAll(".hc-navmenu"))dn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-navmenu")&&dn(o,n),o.querySelectorAll?.(".hc-navmenu").forEach(s=>dn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[Ve]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[Ve]}};return e[Ve]=r,r}var We="__hcTooltipUninstall",Mi=300,Di=100;function qi(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):String(e).replace(/[^\w-]/g,n=>`\\${n}`)}function Oi(e){return e.id?Array.from(e.ownerDocument.querySelectorAll(`[aria-describedby~="${qi(e.id)}"]`)):[]}function hn(e,n){if(n.has(e)||!e.id)return;let t=Oi(e);if(t.length===0)return;e.hasAttribute("popover")||e.setAttribute("popover","manual"),e.hasAttribute("role")||e.setAttribute("role","tooltip");let r=j(),i=`--hc-tooltip-${e.id}`,a=null,o=null,s=null;function c(){a&&clearTimeout(a),o&&clearTimeout(o),a=null,o=null}function l(b){c(),!e.matches(":popover-open")&&(r&&(b.style.setProperty("anchor-name",i),e.style.setProperty("position-anchor",i)),e.showPopover(),r||(s=G(e,b,Le(e,{side:"block-start",align:"center"}))))}function f(){c(),s?.(),s=null,e.matches(":popover-open")&&e.hidePopover()}function m(b){c(),a=setTimeout(()=>l(b),Mi)}function h(){c(),o=setTimeout(f,Di)}let A=new Map;for(let b of t){let S=()=>m(b),T=()=>h(),y=()=>l(b),P=()=>f(),_=D=>{D.key==="Escape"&&e.matches(":popover-open")&&(D.stopPropagation(),f())};b.addEventListener("mouseenter",S),b.addEventListener("mouseleave",T),b.addEventListener("focus",y),b.addEventListener("blur",P),b.addEventListener("keydown",_),A.set(b,{onMouseEnter:S,onMouseLeave:T,onFocus:y,onBlur:P,onKeydown:_})}n.set(e,()=>{c(),e.matches(":popover-open")&&e.hidePopover();for(let[b,S]of A)b.removeEventListener("mouseenter",S.onMouseEnter),b.removeEventListener("mouseleave",S.onMouseLeave),b.removeEventListener("focus",S.onFocus),b.removeEventListener("blur",S.onBlur),b.removeEventListener("keydown",S.onKeydown),r&&b.style.removeProperty("anchor-name");r&&e.style.removeProperty("position-anchor")})}function Pi(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[We])return e[We];let n=new Map;for(let i of e.querySelectorAll(".hc-tooltip"))hn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-tooltip")&&hn(o,n),o.querySelectorAll?.(".hc-tooltip").forEach(s=>hn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[We]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[We]}};return e[We]=r,r}var Xe="__hcPopoverUninstall",pn=".hc-popover[data-side]";function Ni(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):String(e).replace(/[^\w-]/g,n=>`\\${n}`)}function Ii(e){return e.id?e.ownerDocument.querySelector(`[popovertarget="${Ni(e.id)}"]`):null}function mn(e,n){if(n.has(e)||!e.hasAttribute("popover"))return;let t=Ii(e);if(!t)return;t.setAttribute("aria-expanded","false"),t.setAttribute("aria-controls",e.id);let r=`--hc-popover-${e.id}`,i=j();i&&(t.style.setProperty("anchor-name",r),e.style.setProperty("position-anchor",r));let a=null;function o(c){t.setAttribute("aria-expanded",String(c.newState==="open"))}function s(c){i||(c.newState==="open"?a=G(e,t,{...Le(e,{side:"block-end",align:"center"}),gap:8}):(a?.(),a=null))}e.addEventListener("toggle",o),e.addEventListener("beforetoggle",s),n.set(e,()=>{e.removeEventListener("toggle",o),e.removeEventListener("beforetoggle",s),a?.(),a=null,t.removeAttribute("aria-expanded"),t.removeAttribute("aria-controls"),i&&(t.style.removeProperty("anchor-name"),e.style.removeProperty("position-anchor"))})}function Ri(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Xe])return e[Xe];let n=new Map;for(let i of e.querySelectorAll(pn))mn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(pn)&&mn(o,n),o.querySelectorAll?.(pn).forEach(s=>mn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[Xe]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[Xe]}};return e[Xe]=r,r}var je="__hcSliderUninstall";function Ki(e){let n=Number(e.min)||0,t=Number(e.max)||100;if(t===n)return 0;let r=Number(e.value);return Math.max(0,Math.min(100,(r-n)/(t-n)*100))}function wr(e){e.style.setProperty("--hc-slider-value",String(Ki(e)))}function bn(e,n){if(n.has(e))return;wr(e);let t=()=>wr(e);e.addEventListener("input",t),n.set(e,()=>{e.removeEventListener("input",t),e.style.removeProperty("--hc-slider-value")})}function Fi(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[je])return e[je];let n=new Map;for(let i of e.querySelectorAll(".hc-slider"))bn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-slider")&&bn(o,n),o.querySelectorAll?.(".hc-slider").forEach(s=>bn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[je]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[je]}};return e[je]=r,r}var Ge="__hcComboboxUninstall",Bi=120;function $i(e){return e.querySelector('[role="combobox"]')}function Ui(e){return e.querySelector('[role="listbox"]')}function Se(e){return Array.from(e.querySelectorAll(':scope > [role="option"]'))}function It(e){return Se(e).filter(n=>!n.hasAttribute("hidden")&&n.getAttribute("aria-disabled")!=="true")}function Qe(e){return e.dataset.label??(e.textContent??"").trim()}function Yi(e){return(e.dataset.search??Qe(e)).toLowerCase()}function gn(e){for(let n of Se(e))n.removeAttribute("data-active")}function Je(e,n,t){gn(n),t?(t.setAttribute("data-active","true"),t.id||(t.id=`hc-combobox-opt-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("aria-activedescendant",t.id),t.scrollIntoView?.({block:"nearest"})):e.removeAttribute("aria-activedescendant")}function Hi(e,n){let t=e.querySelector(":scope > .hc-combobox__create");return n?(t||(t=e.ownerDocument.createElement("li"),t.className="hc-combobox__option hc-combobox__create",t.setAttribute("role","option")),t.dataset.value=n,t.textContent=$("combobox.create",{value:n}),e.appendChild(t),t):(t&&t.remove(),null)}function zi(e,n){let t=e.value.trim(),r=t.toLowerCase(),i=null,a=0,o=!1;for(let l of Se(n)){if(l.classList.contains("hc-combobox__create"))continue;r!==""&&Qe(l).toLowerCase()===r&&(o=!0),r===""||Yi(l).includes(r)?(l.removeAttribute("hidden"),i||(i=l),a+=1):l.setAttribute("hidden","")}let s=n.closest(".hc-combobox")?.hasAttribute("data-allow-create"),c=Hi(n,s&&t!==""&&!o?t:null);return Ze(n,a===0&&!c),i??c}function Ze(e,n){let t=e.querySelector(".hc-combobox__empty");n?t||(t=e.ownerDocument.createElement("li"),t.className="hc-combobox__empty",t.setAttribute("role","presentation"),t.textContent=e.getAttribute("data-hc-empty")||$("combobox.empty"),e.appendChild(t)):t&&t.remove()}function Rt(e,n,t,r){let i=e.querySelector("."+n);t?(i||(i=e.ownerDocument.createElement("li"),i.className=n,i.setAttribute("role","presentation"),e.appendChild(i)),i.textContent=r):i&&i.remove()}function Er(e,n){let t=e.value.trim().toLowerCase();for(let r of Se(n)){let i=Qe(r).toLowerCase();t!==""&&i===t?r.setAttribute("aria-selected","true"):r.removeAttribute("aria-selected")}}function vn(e,n){if(n.has(e))return;let t=$i(e),r=Ui(e);if(!t||!r)return;r.hasAttribute("popover")||r.setAttribute("popover","manual"),t.hasAttribute("role")||t.setAttribute("role","combobox"),t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","listbox"),t.hasAttribute("aria-autocomplete")||t.setAttribute("aria-autocomplete","list"),!t.hasAttribute("aria-controls")&&r.id&&t.setAttribute("aria-controls",r.id),t.setAttribute("aria-expanded","false");let i=e.hasAttribute("data-remote"),a=j(),o=`--hc-combobox-${r.id||Math.random().toString(36).slice(2,9)}`;a&&(t.style.setProperty("anchor-name",o),r.style.setProperty("position-anchor",o));let s=null,c=null;function l(){if(r.matches(":popover-open"))return;r.showPopover(),t.setAttribute("aria-expanded","true"),a||(c=G(r,t,{side:"block-end",matchWidth:!0}));let w=Se(r).find(C=>C.getAttribute("aria-selected")==="true");Je(t,r,w??It(r)[0]??null)}function f(){r.matches(":popover-open")&&(r.hidePopover(),c?.(),c=null,t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),gn(r))}function m(w){if(!w||w.getAttribute("aria-disabled")==="true")return;let C=w.classList.contains("hc-combobox__create"),B=C?w.dataset.value??"":w.getAttribute("data-value")??Qe(w),E=C?w.dataset.value??"":Qe(w);t.value=E,Er(t,r),t.dispatchEvent(new CustomEvent("hc:comboboxselect",{bubbles:!0,detail:{value:B,label:E,option:w,input:t,created:C}})),f()}function h(w){let C=It(r);if(C.length===0)return;let B=r.querySelector('[data-active="true"]'),E=B?C.indexOf(B):-1,N=C[Math.max(0,Math.min(C.length-1,E+w))]??C[w>0?0:C.length-1];Je(t,r,N)}function A(w){let C=It(r);C.length!==0&&Je(t,r,w==="first"?C[0]:C[C.length-1])}function b(){s&&clearTimeout(s),l()}function S(){s&&clearTimeout(s),s=setTimeout(f,Bi)}function T(){let w=Se(r).length,C=w===0&&r.getAttribute("aria-busy")!=="true"&&!r.hasAttribute("data-error");Ze(r,C),w>0&&Je(t,r,It(r)[0]??null)}function y(w){w?(r.setAttribute("aria-busy","true"),P(!1),Ze(r,!1),Rt(r,"hc-combobox__loading",!0,r.getAttribute("data-hc-loading")||$("combobox.loading")),r.matches(":popover-open")||l()):(r.removeAttribute("aria-busy"),Rt(r,"hc-combobox__loading",!1))}function P(w){w?(r.setAttribute("data-error",""),Ze(r,!1),Rt(r,"hc-combobox__error",!0,r.getAttribute("data-hc-error")||$("combobox.error")),r.matches(":popover-open")||l()):(r.removeAttribute("data-error"),Rt(r,"hc-combobox__error",!1))}function _(){y(!0)}function D(w){y(!1);let C=w&&w.detail;!!(C&&(C.failed||C.xhr&&C.xhr.status>=400))?P(!0):(P(!1),T())}function p(){y(!1),P(!0)}function v(){if(i){r.matches(":popover-open")||l();return}let w=zi(t,r);r.matches(":popover-open")||l(),Je(t,r,w)}function O(w){switch(w.key){case"ArrowDown":w.preventDefault(),r.matches(":popover-open")?h(1):l();break;case"ArrowUp":w.preventDefault(),r.matches(":popover-open")?h(-1):l();break;case"Home":r.matches(":popover-open")&&(w.preventDefault(),A("first"));break;case"End":r.matches(":popover-open")&&(w.preventDefault(),A("last"));break;case"Enter":{if(!r.matches(":popover-open"))return;let C=r.querySelector('[data-active="true"]');C&&(w.preventDefault(),m(C));break}case"Escape":r.matches(":popover-open")&&(w.preventDefault(),f());break;case"Tab":f();break;default:break}}function k(w){let C=w.target.closest('[role="option"]');C&&r.contains(C)&&(s&&clearTimeout(s),m(C),t.focus())}function L(w){w.preventDefault()}t.addEventListener("focus",b),t.addEventListener("blur",S),t.addEventListener("input",v),t.addEventListener("keydown",O),r.addEventListener("click",k),r.addEventListener("mousedown",L);let I=null;i&&(t.addEventListener("htmx:beforeRequest",_),t.addEventListener("htmx:afterRequest",D),t.addEventListener("htmx:responseError",p),typeof MutationObserver<"u"&&(I=new MutationObserver(()=>{r.getAttribute("aria-busy")!=="true"&&T()}),I.observe(r,{childList:!0}))),Er(t,r),n.set(e,()=>{s&&clearTimeout(s),r.matches(":popover-open")&&r.hidePopover(),t.removeEventListener("focus",b),t.removeEventListener("blur",S),t.removeEventListener("input",v),t.removeEventListener("keydown",O),r.removeEventListener("click",k),r.removeEventListener("mousedown",L),i&&(t.removeEventListener("htmx:beforeRequest",_),t.removeEventListener("htmx:afterRequest",D),t.removeEventListener("htmx:responseError",p),I?.disconnect()),t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-autocomplete"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-activedescendant"),a&&(t.style.removeProperty("anchor-name"),r.style.removeProperty("position-anchor")),gn(r),Ze(r,!1)})}function Vi(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[Ge])return e[Ge];let n=new Map;for(let i of e.querySelectorAll(".hc-combobox"))vn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-combobox")&&vn(o,n),o.querySelectorAll?.(".hc-combobox").forEach(s=>vn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[Ge]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[Ge]}};return e[Ge]=r,r}var et="__hcMulticomboboxUninstall",Wi=120;function Xi(e){return e.querySelector('[role="combobox"]')}function ji(e){return e.querySelector('[role="listbox"]')}function Gi(e){return e.querySelector(".hc-multicombobox__tags")}function Ji(e){let n=e.querySelector(".hc-multicombobox__hidden");return n||(n=e.ownerDocument.createElement("span"),n.className="hc-multicombobox__hidden",n.hidden=!0,e.appendChild(n)),n}function xe(e){return Array.from(e.querySelectorAll(':scope > [role="option"]'))}function yn(e){return xe(e).filter(n=>!n.hasAttribute("hidden")&&n.getAttribute("aria-disabled")!=="true")}function Bt(e){return e.dataset.label??(e.textContent??"").trim()}function Ft(e){return e.getAttribute("data-value")??Bt(e)}function Zi(e){return(e.dataset.search??Bt(e)).toLowerCase()}function Qi(e,n){return xe(e).find(t=>Ft(t)===n)??null}function En(e){for(let n of xe(e))n.removeAttribute("data-active")}function Kt(e,n,t){En(n),t?(t.setAttribute("data-active","true"),t.id||(t.id=`hc-multicombobox-opt-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("aria-activedescendant",t.id),t.scrollIntoView?.({block:"nearest"})):e.removeAttribute("aria-activedescendant")}function eo(e,n){let t=e.querySelector(":scope > .hc-multicombobox__create");return n?(t||(t=e.ownerDocument.createElement("li"),t.className="hc-multicombobox__option hc-multicombobox__create",t.setAttribute("role","option")),t.dataset.value=n,t.textContent=$("multicombobox.create",{value:n}),e.appendChild(t),t):(t&&t.remove(),null)}function An(e,n){let t=e.value.trim(),r=t.toLowerCase(),i=null,a=0,o=!1;for(let l of xe(n)){if(l.classList.contains("hc-multicombobox__create"))continue;r!==""&&Bt(l).toLowerCase()===r&&(o=!0),r===""||Zi(l).includes(r)?(l.removeAttribute("hidden"),i||(i=l),a+=1):l.setAttribute("hidden","")}let s=n.closest(".hc-multicombobox")?.hasAttribute("data-allow-create"),c=eo(n,s&&t!==""&&!o?t:null);return Lr(n,a===0&&!c),i??c}function Lr(e,n){let t=e.querySelector(".hc-multicombobox__empty");n?t||(t=e.ownerDocument.createElement("li"),t.className="hc-multicombobox__empty",t.setAttribute("role","presentation"),t.textContent=e.getAttribute("data-hc-empty")||$("multicombobox.empty"),e.appendChild(t)):t&&t.remove()}function to(e,n,t,r){let i=e.createElement("span");i.className="hc-multicombobox__tag",i.dataset.value=n,i.textContent=t;let a=e.createElement("button");return a.type="button",a.className="hc-multicombobox__tag-remove",a.setAttribute("aria-label",$("multicombobox.remove",{label:t})),a.textContent="\xD7",a.addEventListener("click",o=>{o.preventDefault(),o.stopPropagation(),r(n)}),i.appendChild(a),i}function no(e,n,t){let r=e.createElement("input");return r.type="hidden",r.name=n,r.value=t,r}function wn(e,n){if(n.has(e))return;let t=Xi(e),r=ji(e),i=Gi(e);if(!t||!r||!i)return;r.hasAttribute("popover")||r.setAttribute("popover","manual"),r.setAttribute("aria-multiselectable","true"),t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","listbox"),t.hasAttribute("aria-autocomplete")||t.setAttribute("aria-autocomplete","list"),!t.hasAttribute("aria-controls")&&r.id&&t.setAttribute("aria-controls",r.id),t.setAttribute("aria-expanded","false");let a=j(),o=`--hc-multicombobox-${r.id||Math.random().toString(36).slice(2,9)}`;a&&(t.style.setProperty("anchor-name",o),r.style.setProperty("position-anchor",o));let s=e.getAttribute("data-name"),c=s?Ji(e):null,l=new Set;for(let E of xe(r))E.getAttribute("aria-selected")==="true"&&l.add(Ft(E));function f(){i.replaceChildren();for(let E of l){let N=Qi(r,E),z=N?Bt(N):E;i.appendChild(to(e.ownerDocument,E,z,S))}}function m(){if(c){c.replaceChildren();for(let E of l)c.appendChild(no(e.ownerDocument,s,E))}}function h(){for(let E of xe(r))l.has(Ft(E))?E.setAttribute("aria-selected","true"):E.removeAttribute("aria-selected")}function A(E,N){t.dispatchEvent(new CustomEvent("hc:multicomboboxchange",{bubbles:!0,detail:{values:Array.from(l),added:E?Array.from(E):[],removed:N?Array.from(N):[],input:t}}))}function b(E){l.has(E)||(l.add(E),h(),f(),m(),A([E],[]))}function S(E){l.has(E)&&(l.delete(E),h(),f(),m(),A([],[E]))}function T(E){if(!E||E.getAttribute("aria-disabled")==="true")return;if(E.classList.contains("hc-multicombobox__create")){let z=E.dataset.value;t.value="",An(t,r),b(z);return}let N=Ft(E);l.has(N)?S(N):b(N),t.value="",An(t,r)}let y=null,P=null;function _(){r.matches(":popover-open")||(r.showPopover(),t.setAttribute("aria-expanded","true"),a||(P=G(r,t,{side:"block-end",matchWidth:!0})),Kt(t,r,yn(r)[0]??null))}function D(){r.matches(":popover-open")&&(r.hidePopover(),P?.(),P=null,t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),En(r))}function p(E){let N=yn(r);if(N.length===0)return;let z=r.querySelector('[data-active="true"]'),te=z?N.indexOf(z):-1,ce=N[Math.max(0,Math.min(N.length-1,te+E))]??N[E>0?0:N.length-1];Kt(t,r,ce)}function v(E){let N=yn(r);N.length!==0&&Kt(t,r,E==="first"?N[0]:N[N.length-1])}function O(){y&&clearTimeout(y),_()}function k(){y&&clearTimeout(y),y=setTimeout(D,Wi)}function L(){let E=An(t,r);r.matches(":popover-open")||_(),Kt(t,r,E)}function I(E){E.target.closest(".hc-multicombobox__tag-remove")||E.target!==t&&t.focus()}function w(E){switch(E.key){case"ArrowDown":E.preventDefault(),r.matches(":popover-open")?p(1):_();break;case"ArrowUp":E.preventDefault(),r.matches(":popover-open")?p(-1):_();break;case"Home":r.matches(":popover-open")&&(E.preventDefault(),v("first"));break;case"End":r.matches(":popover-open")&&(E.preventDefault(),v("last"));break;case"Enter":{if(!r.matches(":popover-open"))return;let N=r.querySelector('[data-active="true"]');N&&(E.preventDefault(),T(N));break}case"Backspace":if(t.value===""&&l.size>0){E.preventDefault();let N=Array.from(l).pop();S(N)}break;case"Escape":r.matches(":popover-open")&&(E.preventDefault(),D());break;case"Tab":D();break;default:break}}function C(E){let N=E.target.closest('[role="option"]');N&&r.contains(N)&&(y&&clearTimeout(y),T(N),t.focus())}function B(E){E.preventDefault()}t.addEventListener("focus",O),t.addEventListener("blur",k),t.addEventListener("input",L),t.addEventListener("keydown",w),e.addEventListener("click",I),r.addEventListener("click",C),r.addEventListener("mousedown",B),f(),m(),n.set(e,()=>{y&&clearTimeout(y),r.matches(":popover-open")&&r.hidePopover(),t.removeEventListener("focus",O),t.removeEventListener("blur",k),t.removeEventListener("input",L),t.removeEventListener("keydown",w),e.removeEventListener("click",I),r.removeEventListener("click",C),r.removeEventListener("mousedown",B),t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-autocomplete"),t.removeAttribute("aria-expanded"),t.removeAttribute("aria-activedescendant"),r.removeAttribute("aria-multiselectable"),a&&(t.style.removeProperty("anchor-name"),r.style.removeProperty("position-anchor")),i.replaceChildren(),c&&c.replaceChildren(),En(r),Lr(r,!1)})}function ro(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[et])return e[et];let n=new Map;for(let i of e.querySelectorAll(".hc-multicombobox"))wn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-multicombobox")&&wn(o,n),o.querySelectorAll?.(".hc-multicombobox").forEach(s=>wn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[et]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[et]}};return e[et]=r,r}var tt="__hcDrawerUninstall",Sn={right:{axis:"x",sign:1,off:"100% 0"},left:{axis:"x",sign:-1,off:"-100% 0"},top:{axis:"y",sign:-1,off:"0 -100%"},bottom:{axis:"y",sign:1,off:"0 100%"}};function io(e){return Sn[e.getAttribute("data-side")]||Sn.right}function oo({delta:e,size:n,velocity:t,threshold:r=.4,flick:i=.5}){return e>n*r||t>i}function Ln(e,n){if(n.has(e))return;let t=!1;function r(y){if(t){t=!1;return}y.target===e&&e.close()}let i=Sn.right,a=0,o=0,s=0,c=0,l=1,f=0,m=!1;function h(y){return!y.closest?.('.hc-drawer__body, button, a[href], input, select, textarea, [contenteditable="true"]')}function A(y){if(y.button!=null&&y.button!==0||y.target===e||!e.open||!h(y.target))return;i=io(e);let P=i.axis==="x";l=(P?e.offsetWidth:e.offsetHeight)||1,a=P?y.clientX:y.clientY,o=a,s=y.timeStamp,f=0,c=0,m=!0,e.style.transition="none",e.setPointerCapture?.(y.pointerId)}function b(y){if(!m)return;let P=i.axis==="x",_=P?y.clientX:y.clientY;c=Math.max(0,(_-a)*i.sign);let D=y.timeStamp-s;D>=8&&(f=(_-o)*i.sign/D,o=_,s=y.timeStamp);let p=i.sign*c;e.style.translate=P?`${p}px 0`:`0 ${p}px`}function S(y){if(m=!1,e.style.transition="",y){e.style.translate=i.off;let P=()=>{e.style.transition="",e.style.translate="",e.open&&e.close()};e.addEventListener("transitionend",P,{once:!0}),setTimeout(P,360)}else e.style.translate=""}function T(y){m&&(e.releasePointerCapture?.(y.pointerId),t=!0,S(oo({delta:c,size:l,velocity:f})))}e.addEventListener("click",r),e.addEventListener("pointerdown",A),e.addEventListener("pointermove",b),e.addEventListener("pointerup",T),e.addEventListener("pointercancel",T),n.set(e,()=>{e.removeEventListener("click",r),e.removeEventListener("pointerdown",A),e.removeEventListener("pointermove",b),e.removeEventListener("pointerup",T),e.removeEventListener("pointercancel",T)})}function ao(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[tt])return e[tt];let n=new Map;for(let i of e.querySelectorAll(".hc-drawer"))Ln(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-drawer")&&Ln(o,n),o.querySelectorAll?.(".hc-drawer").forEach(s=>Ln(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[tt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[tt]}};return e[tt]=r,r}var nt="__hcHoverCardUninstall",so=500,co=200;function lo(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):String(e).replace(/[^\w-]/g,n=>`\\${n}`)}function uo(e){return e.id?Array.from(e.ownerDocument.querySelectorAll(`[aria-describedby~="${lo(e.id)}"]`)):[]}function xn(e,n){if(n.has(e)||!e.id)return;let t=uo(e);if(t.length===0)return;e.hasAttribute("popover")||e.setAttribute("popover","manual");let r=j(),i=`--hc-hovercard-${e.id}`,a=null,o=null,s=null,c=!1,l=null,f=new WeakMap;function m(v,O,k){let L=f.get(v)??{hover:!1,focus:!1};L[O]=k,f.set(v,L)}function h(){for(let v of t){let O=f.get(v);if(O&&(O.hover||O.focus))return v}return null}function A(){a&&clearTimeout(a),o&&clearTimeout(o),a=null,o=null}function b(v){A(),s=v,!e.matches(":popover-open")&&(r&&(v.style.setProperty("anchor-name",i),e.style.setProperty("position-anchor",i)),e.showPopover(),r||(l=G(e,v,{...Le(e,{side:"block-end",align:"center"}),gap:6})))}function S(){A(),s=null,l?.(),l=null,e.matches(":popover-open")&&e.hidePopover()}function T(){A();let v=h();if(v||c){if(e.matches(":popover-open"))return;let O=v??s??t[0];a=setTimeout(()=>b(O),so)}else o=setTimeout(S,co)}function y(v){A(),b(v)}function P(){c=!0,T()}function _(){c=!1,T()}function D(v){v.key==="Escape"&&e.matches(":popover-open")&&(v.stopPropagation(),S())}e.addEventListener("mouseenter",P),e.addEventListener("mouseleave",_),e.addEventListener("keydown",D);let p=new Map;for(let v of t){let O=()=>{m(v,"hover",!0),T()},k=()=>{m(v,"hover",!1),T()},L=()=>{m(v,"focus",!0),y(v)},I=()=>{m(v,"focus",!1),T()},w=C=>{C.key==="Escape"&&e.matches(":popover-open")&&(C.stopPropagation(),S())};v.addEventListener("mouseenter",O),v.addEventListener("mouseleave",k),v.addEventListener("focus",L),v.addEventListener("blur",I),v.addEventListener("keydown",w),p.set(v,{onMouseEnter:O,onMouseLeave:k,onFocus:L,onBlur:I,onKeydown:w})}n.set(e,()=>{A(),e.matches(":popover-open")&&e.hidePopover(),e.removeEventListener("mouseenter",P),e.removeEventListener("mouseleave",_),e.removeEventListener("keydown",D);for(let[v,O]of p)v.removeEventListener("mouseenter",O.onMouseEnter),v.removeEventListener("mouseleave",O.onMouseLeave),v.removeEventListener("focus",O.onFocus),v.removeEventListener("blur",O.onBlur),v.removeEventListener("keydown",O.onKeydown),r&&v.style.removeProperty("anchor-name");r&&e.style.removeProperty("position-anchor")})}function fo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[nt])return e[nt];let n=new Map;for(let i of e.querySelectorAll(".hc-hovercard"))xn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-hovercard")&&xn(o,n),o.querySelectorAll?.(".hc-hovercard").forEach(s=>xn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[nt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[nt]}};return e[nt]=r,r}var rt="__hcToggleGroupUninstall";function _e(e){return e.getAttribute("data-type")==="multiple"?"multiple":"single"}function ke(e){return Array.from(e.querySelectorAll(":scope > .hc-toggle"))}function it(e){return!(e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true")}function $t(e,n){return n==="single"?e.getAttribute("aria-checked")==="true":e.getAttribute("aria-pressed")==="true"}function kn(e){return e.getAttribute("data-value")}function Yt(e,n){let t=_e(e),r=ke(e),i=r.filter(it),a=n&&it(n)?n:null;!a&&t==="single"&&(a=i.find(o=>$t(o,"single"))),a||(a=i[0]??null);for(let o of r)o.setAttribute("tabindex",o===a?"0":"-1")}function ho(e){let n=e.querySelector(":scope > .hc-toggle-group__hidden");return n||(n=e.ownerDocument.createElement("span"),n.className="hc-toggle-group__hidden",n.hidden=!0,e.appendChild(n)),n}function _r(e){let n=e.getAttribute("data-name");if(!n)return;let t=_e(e),r=e.ownerDocument,i=ho(e),a=ke(e).filter(s=>$t(s,t)).map(kn).filter(s=>s!=null),o=t==="single"?a.slice(0,1):a;i.replaceChildren();for(let s of o){let c=r.createElement("input");c.type="hidden",c.name=n,c.value=s,i.appendChild(c)}}function po(e,n){let t=_e(e),r=t==="single"?{type:t,value:kn(e.querySelector('[aria-checked="true"]')),item:n,group:e}:{type:t,values:ke(e).filter(i=>$t(i,"multiple")).map(kn).filter(i=>i!=null),item:n,pressed:n?$t(n,"multiple"):void 0,group:e};e.dispatchEvent(new CustomEvent("hc:togglegroupchange",{bubbles:!0,detail:r}))}function Cn(e,n){if(n.getAttribute("aria-checked")==="true")return!1;for(let t of ke(e))t.setAttribute("aria-checked",String(t===n));return!0}function mo(e){let n=e.getAttribute("aria-pressed")!=="true";return e.setAttribute("aria-pressed",String(n)),!0}function Ut(e,n,t){Yt(e,n),t&&(_r(e),po(e,n))}function Sr(e,n,t){let r=ke(e).filter(it);if(r.length===0)return;let i=r.indexOf(n);if(i===-1)return;let a=r[(i+t+r.length)%r.length];a.focus(),_e(e)==="single"?Ut(e,a,Cn(e,a)):Yt(e,a)}function xr(e,n){let t=ke(e).filter(it);if(t.length===0)return;let r=n==="first"?t[0]:t[t.length-1];r.focus(),_e(e)==="single"?Ut(e,r,Cn(e,r)):Yt(e,r)}function _n(e,n){if(n.has(e))return;Yt(e,null),_r(e);function t(i){let a=i.target.closest(".hc-toggle");!a||a.parentElement!==e||!it(a)||(_e(e)==="single"?Ut(e,a,Cn(e,a)):Ut(e,a,mo(a)))}function r(i){let a=i.target.closest(".hc-toggle");if(!a||a.parentElement!==e)return;let o=i.key;switch(getComputedStyle(e).direction==="rtl"&&(o==="ArrowRight"?o="ArrowLeft":o==="ArrowLeft"&&(o="ArrowRight")),o){case"ArrowRight":case"ArrowDown":i.preventDefault(),Sr(e,a,1);break;case"ArrowLeft":case"ArrowUp":i.preventDefault(),Sr(e,a,-1);break;case"Home":i.preventDefault(),xr(e,"first");break;case"End":i.preventDefault(),xr(e,"last");break;default:break}}e.addEventListener("click",t),e.addEventListener("keydown",r),n.set(e,()=>{e.removeEventListener("click",t),e.removeEventListener("keydown",r)})}function bo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[rt])return e[rt];let n=new Map;for(let i of e.querySelectorAll(".hc-toggle-group"))_n(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-toggle-group")&&_n(o,n),o.querySelectorAll?.(".hc-toggle-group").forEach(s=>_n(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[rt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[rt]}};return e[rt]=r,r}var ot="__hcCarouselUninstall";function kr(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Tn(e,n){if(n.has(e))return;let t=e.querySelector(".hc-carousel__viewport");if(!t)return;let r=Array.from(t.querySelectorAll(":scope > .hc-carousel__slide"));if(r.length===0)return;let i=e.ownerDocument||document,a=e.querySelector("[data-hc-carousel-prev]"),o=e.querySelector("[data-hc-carousel-next]"),s=e.querySelector("[data-hc-carousel-dots]"),c=[],l=0;r.forEach((_,D)=>{_.hasAttribute("role")||_.setAttribute("role","group"),_.setAttribute("aria-roledescription","slide"),_.hasAttribute("aria-label")||_.setAttribute("aria-label",`${D+1} of ${r.length}`)}),t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("role")||t.setAttribute("role","group"),t.setAttribute("aria-roledescription","carousel"),!t.hasAttribute("aria-label")&&!t.hasAttribute("aria-labelledby")&&t.setAttribute("aria-label",e.getAttribute("aria-label")||"Carousel");let f=[];if(s){let _=s.querySelectorAll("[data-hc-carousel-dot]");_.length?f=Array.from(_):f=r.map((D,p)=>{let v=i.createElement("button");return v.type="button",v.className="hc-carousel__dot",v.setAttribute("data-hc-carousel-dot",""),v.setAttribute("aria-label",`Go to slide ${p+1}`),s.appendChild(v),v})}function m(_){let D=Math.max(0,Math.min(r.length-1,_)),p=r[D],v=kr()?"auto":"smooth";typeof p.scrollIntoView=="function"?p.scrollIntoView({behavior:v,inline:"start",block:"nearest"}):t.scrollLeft=p.offsetLeft-t.offsetLeft}function h(_){l=_,r.forEach((D,p)=>D.toggleAttribute("data-active",p===_)),f.forEach((D,p)=>{p===_?D.setAttribute("aria-current","true"):D.removeAttribute("aria-current")}),a&&(a.disabled=_<=0),o&&(o.disabled=_>=r.length-1),e.dispatchEvent(new CustomEvent("hc:carouselchange",{bubbles:!0,detail:{index:_}}))}h(0);let A=null;typeof IntersectionObserver<"u"&&(A=new IntersectionObserver(_=>{let D=null;for(let p of _)p.isIntersecting&&(!D||p.intersectionRatio>D.intersectionRatio)&&(D=p);if(D){let p=r.indexOf(D.target);p!==-1&&p!==l&&h(p)}},{root:t,threshold:.6}),r.forEach(_=>A.observe(_)));let b=()=>m(l-1),S=()=>m(l+1);a&&(a.addEventListener("click",b),c.push(()=>a.removeEventListener("click",b))),o&&(o.addEventListener("click",S),c.push(()=>o.removeEventListener("click",S))),f.forEach((_,D)=>{let p=()=>m(D);_.addEventListener("click",p),c.push(()=>_.removeEventListener("click",p))});let T=_=>{_.key==="ArrowRight"?(_.preventDefault(),m(l+1)):_.key==="ArrowLeft"&&(_.preventDefault(),m(l-1))};t.addEventListener("keydown",T),c.push(()=>t.removeEventListener("keydown",T));let y=parseInt(e.getAttribute("data-autoplay"),10);if(Number.isFinite(y)&&y>0&&!kr()){let _=null,D=()=>m(l>=r.length-1?0:l+1),p=()=>{_==null&&(_=setInterval(D,y))},v=()=>{_!=null&&(clearInterval(_),_=null)};p(),e.addEventListener("pointerenter",v),e.addEventListener("pointerleave",p),e.addEventListener("focusin",v),e.addEventListener("focusout",p),c.push(()=>{v(),e.removeEventListener("pointerenter",v),e.removeEventListener("pointerleave",p),e.removeEventListener("focusin",v),e.removeEventListener("focusout",p)})}n.set(e,()=>{A&&A.disconnect();for(let _ of c)_()})}function vo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ot])return e[ot];let n=new Map;for(let i of e.querySelectorAll(".hc-carousel"))Tn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-carousel")&&Tn(o,n),o.querySelectorAll?.(".hc-carousel").forEach(s=>Tn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ot]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ot]}};return e[ot]=r,r}var at="__hcToolbarUninstall",Mn='.hc-toolbar[role="toolbar"]',qn="button, a[href], input, select, textarea";function go(e){return e.getAttribute("aria-orientation")!=="vertical"}function yo(e){return getComputedStyle(e).direction==="rtl"}function Cr(e){let n=e.tagName;if(n==="TEXTAREA"||n==="SELECT")return!0;if(n==="INPUT"){let t=(e.getAttribute("type")||"text").toLowerCase();return!["button","submit","reset","checkbox","radio","color","file","image"].includes(t)}return!1}function Ht(e){return!e.hasAttribute("disabled")&&e.getAttribute("aria-disabled")!=="true"&&!e.hidden&&e.getAttribute("aria-hidden")!=="true"}function Dr(e){return[...e.querySelectorAll(qn)].filter(n=>n.closest(".hc-toolbar")===e)}function qr(e){return Dr(e).filter(Ht)}function st(e,n){let t=Dr(e),r=t.filter(Ht),i=n&&r.includes(n)?n:null;i||(i=r.find(a=>a.getAttribute("tabindex")==="0")??r[0]??null);for(let a of t)a.setAttribute("tabindex",a===i?"0":"-1")}function Tr(e,n,t){let r=qr(e),i=r.indexOf(n);if(i===-1)return;let a=r[(i+t+r.length)%r.length];a.focus(),st(e,a)}function Mr(e,n){let t=qr(e);if(t.length===0)return;let r=n==="first"?t[0]:t[t.length-1];r.focus(),st(e,r)}function Dn(e,n){if(n.has(e))return;st(e,null);function t(a){let o=a.target.closest(qn);if(!o||o.closest(".hc-toolbar")!==e)return;let s=go(e),c=a.key;s&&yo(e)&&(c==="ArrowRight"?c="ArrowLeft":c==="ArrowLeft"&&(c="ArrowRight"));let l=s?"ArrowRight":"ArrowDown",f=s?"ArrowLeft":"ArrowUp";switch(c){case l:if(Cr(o))return;a.preventDefault(),Tr(e,o,1);break;case f:if(Cr(o))return;a.preventDefault(),Tr(e,o,-1);break;case"Home":a.preventDefault(),Mr(e,"first");break;case"End":a.preventDefault(),Mr(e,"last");break;default:break}}function r(a){let o=a.target.closest?.(qn);!o||o.closest(".hc-toolbar")!==e||!Ht(o)||st(e,o)}e.addEventListener("keydown",t),e.addEventListener("focusin",r);let i=null;typeof MutationObserver<"u"&&(i=new MutationObserver(()=>{let a=e.ownerDocument.activeElement,o=a&&a.closest?.(".hc-toolbar")===e&&Ht(a)?a:null;st(e,o)}),i.observe(e,{childList:!0,subtree:!0})),n.set(e,()=>{e.removeEventListener("keydown",t),e.removeEventListener("focusin",r),i&&i.disconnect()})}function Ao(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[at])return e[at];let n=new Map;for(let i of e.querySelectorAll(Mn))Dn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(Mn)&&Dn(o,n),o.querySelectorAll?.(Mn).forEach(s=>Dn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[at]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[at]}};return e[at]=r,r}var ct="__hcAvatarUninstall";function wo(e){return e.querySelector(":scope > .hc-avatar__image")}function Eo(e){let n=e.getAttribute("src");return n!=null&&n.trim()!==""}function Lo(e){return Eo(e)?e.complete?e.naturalWidth>0?"loaded":"error":null:"error"}function Ce(e,n){e.dataset.state!==n&&(e.dataset.state=n,e.dispatchEvent(new CustomEvent("hc:avatarstatechange",{bubbles:!0,detail:{state:n}})))}function On(e,n){if(n.has(e))return;let t=wo(e);if(!t)return;let r=null,i=()=>{r!=null&&(clearTimeout(r),r=null)};function a(){i(),Ce(e,"loaded")}function o(){i(),Ce(e,"error")}let s=Lo(t);if(s==="loaded"||s==="error")Ce(e,s);else{let c=Math.max(0,parseInt(e.getAttribute("data-delay"),10)||0);c>0?(Ce(e,"pending"),r=setTimeout(()=>{r=null,e.dataset.state==="pending"&&Ce(e,"loading")},c)):Ce(e,"loading"),t.addEventListener("load",a),t.addEventListener("error",o)}n.set(e,()=>{i(),t.removeEventListener("load",a),t.removeEventListener("error",o)})}function So(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ct])return e[ct];let n=new Map;for(let i of e.querySelectorAll(".hc-avatar"))On(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-avatar")&&On(o,n),o.querySelectorAll?.(".hc-avatar").forEach(s=>On(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ct]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ct]}};return e[ct]=r,r}var lt="__hcPasswordToggleUninstall",Pn="[data-hc-password-toggle]";function xo(e){let n=e.ownerDocument||document,t=e.getAttribute("aria-controls");if(t){let i=n.getElementById(t);if(i)return i}let r=e.closest(".hc-input-group");return r?r.querySelector("input"):null}function Or(e,n){let t=n.type==="text";e.setAttribute("aria-pressed",String(t));let r=e.getAttribute("data-hc-label-show")||"Show password",i=e.getAttribute("data-hc-label-hide")||"Hide password";e.setAttribute("aria-label",t?i:r)}function Nn(e,n){if(n.has(e))return;let t=xo(e);if(!t)return;e.getAttribute("type")==null&&e.setAttribute("type","button"),Or(e,t);let r=()=>{t.type=t.type==="password"?"text":"password",Or(e,t)};e.addEventListener("click",r),n.set(e,()=>e.removeEventListener("click",r))}function _o(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[lt])return e[lt];let n=new Map;for(let i of e.querySelectorAll(Pn))Nn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(Pn)&&Nn(o,n),o.querySelectorAll?.(Pn).forEach(s=>Nn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[lt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[lt]}};return e[lt]=r,r}var ut="__hcContextMenuUninstall";function ko(e){let n=e.getAttribute("data-hc-context-menu");return n?e.ownerDocument.getElementById(n):null}function Co(e,n,t){let r=e.ownerDocument.defaultView,i=r?.innerWidth??0,a=r?.innerHeight??0,o=e.getBoundingClientRect(),s=n,c=t;i&&s+o.width>i&&(s=Math.max(0,i-o.width)),a&&c+o.height>a&&(c=Math.max(0,a-o.height)),e.style.setProperty("inset-block-start",`${c}px`),e.style.setProperty("inset-inline-start",`${s}px`)}function Pr(e,n,t){typeof e.showPopover=="function"&&(e.style.setProperty("position","fixed"),e.style.setProperty("margin","0"),e.style.setProperty("position-area","none"),e.style.setProperty("inset-block-start",`${t}px`),e.style.setProperty("inset-inline-start",`${n}px`),e.matches(":popover-open")||e.showPopover(),Co(e,n,t),ye(e))}function In(e,n){if(n.has(e))return;let t=ko(e);if(!t)return;t.hasAttribute("popover")||t.setAttribute("popover","auto");let r=null;function i(l){l.preventDefault(),r=l.target,Pr(t,l.clientX,l.clientY)}function a(l){if(l.key==="F10"&&l.shiftKey){l.preventDefault(),r=l.target;let f=l.target.getBoundingClientRect?l.target.getBoundingClientRect():e.getBoundingClientRect();Pr(t,f.left,f.bottom)}}function o(l){t.matches(":popover-open")&&Nt(t,l)}function s(l){let f=l.target.closest(se);if(!f||!t.contains(f)||!V(f)||pe(f))return;let m=f.closest(".hc-menu")||t,{role:h}=Dt(m,f,{contextTarget:r});h==="menuitem"&&t.hidePopover()}let c=Pt(t);e.addEventListener("contextmenu",i),e.addEventListener("keydown",a),t.addEventListener("keydown",o),t.addEventListener("click",s),n.set(e,()=>{e.removeEventListener("contextmenu",i),e.removeEventListener("keydown",a),t.removeEventListener("keydown",o),t.removeEventListener("click",s),c()})}function To(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ut])return e[ut];let n=new Map;for(let i of e.querySelectorAll("[data-hc-context-menu]"))In(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.("[data-hc-context-menu]")&&In(o,n),o.querySelectorAll?.("[data-hc-context-menu]").forEach(s=>In(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ut]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ut]}};return e[ut]=r,r}var ft="__hcCommandUninstall";function Mo(e,n){let t=e.trim().toLowerCase();if(t==="")return 0;let r=n.toLowerCase(),i=0,a=0,o=0,s=-2;for(let c=0;c<n.length&&i<t.length;c+=1){if(r[c]!==t[i])continue;let l=1;if(s===c-1?(o+=1,l+=o*4):o=0,c===0)l+=10;else{let f=n[c-1];f===" "||f==="-"||f==="_"||f==="/"||f==="."?l+=8:/[a-z]/.test(f)&&/[A-Z]/.test(n[c])&&(l+=6)}a+=l,s=c,i+=1}return i===t.length?a:-1/0}function Do(e){return e.querySelector('[role="combobox"]')}function qo(e){return e.querySelector('[role="listbox"]')}function Te(e){return Array.from(e.querySelectorAll('[role="option"]'))}function Rn(e){return Array.from(e.querySelectorAll('[role="group"]'))}function Fn(e){return e.getAttribute("aria-disabled")!=="true"}function Nr(e){let n=e.querySelector(".hc-command__shortcut"),t=e.textContent??"";return n&&(t=t.replace(n.textContent??"","")),t.trim()}function dt(e){return Te(e).filter(n=>!n.hasAttribute("hidden")&&Fn(n))}function Kn(e,n){if(n.has(e))return;let t=Do(e),r=qo(e);if(!t||!r)return;let i=e.ownerDocument,a=e.closest("dialog");t.hasAttribute("role")||t.setAttribute("role","combobox"),t.hasAttribute("aria-autocomplete")||t.setAttribute("aria-autocomplete","list"),t.hasAttribute("aria-haspopup")||t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-expanded","true"),r.id||(r.id=`hc-command-list-${Math.random().toString(36).slice(2,9)}`),t.hasAttribute("aria-controls")||t.setAttribute("aria-controls",r.id);let o=e.querySelector(".hc-command__empty"),s=new WeakMap;Te(e).forEach((k,L)=>s.set(k,L));let c=new WeakMap;Rn(e).forEach((k,L)=>c.set(k,L));let l=!1;function f(){for(let k of Te(e))k.removeAttribute("data-active");t.removeAttribute("aria-activedescendant")}function m(k){for(let L of Te(e))L.removeAttribute("data-active");if(!k){t.removeAttribute("aria-activedescendant");return}k.setAttribute("data-active","true"),k.id||(k.id=`hc-command-item-${Math.random().toString(36).slice(2,9)}`),t.setAttribute("aria-activedescendant",k.id),k.scrollIntoView?.({block:"nearest"})}function h(k){let L=new Map;for(let w of Te(e)){let C=w.parentElement;C&&(L.has(C)||L.set(C,[]),L.get(C).push(w))}for(let[w,C]of L){let B=C.map(E=>({el:E,ord:s.get(E)??0,s:k?k(E):0}));B.sort((E,N)=>N.s-E.s||E.ord-N.ord);for(let E of B)w.append(E.el)}let I=Rn(e);if(I.length){let w=I.map(C=>{let B=[...C.querySelectorAll('[role="option"]')],E=k?Math.max(-1e9,...B.map(k)):0;return{g:C,ord:c.get(C)??0,s:E}});w.sort((C,B)=>B.s-C.s||C.ord-B.ord);for(let C of w)r.append(C.g)}}function A(){let k=t.value.trim(),L=k!==""&&e.getAttribute("data-filter")!=="substring",I=k.toLowerCase(),w=0,C=new Map;for(let B of Te(e)){let E=Nr(B),N,z=0;k===""?N=!0:L?(z=Mo(k,E),N=z>-1/0):N=E.toLowerCase().includes(I),C.set(B,z),B.toggleAttribute("hidden",!N),N&&(w+=1)}L?(h(B=>{let E=C.get(B);return Number.isFinite(E)?E:-1e9}),l=!0):l&&(h(null),l=!1);for(let B of Rn(e)){let E=B.querySelector('[role="option"]:not([hidden])');B.toggleAttribute("hidden",!E)}return o&&o.toggleAttribute("hidden",w>0),w}function b(k){let L=dt(e);if(L.length===0)return;let I=r.querySelector('[data-active="true"]'),w=I?L.indexOf(I):-1,C=L.length;m(L[((w+k)%C+C)%C])}function S(k){let L=dt(e);L.length!==0&&m(k==="first"?L[0]:L[L.length-1])}function T(k){if(!k||!Fn(k))return;let L=k.getAttribute("data-value")??Nr(k);e.dispatchEvent(new CustomEvent("hc:commandselect",{bubbles:!0,detail:{item:k,value:L,command:e}})),a&&a.open?a.close():t.focus()}function y(){t.value="",A(),m(dt(e)[0]??null)}function P(){A(),m(dt(e)[0]??null)}function _(k){switch(k.key){case"ArrowDown":k.preventDefault(),b(1);break;case"ArrowUp":k.preventDefault(),b(-1);break;case"Home":k.preventDefault(),S("first");break;case"End":k.preventDefault(),S("last");break;case"Enter":{let L=r.querySelector('[data-active="true"]');L&&(k.preventDefault(),T(L));break}default:break}}function D(k){let L=k.target.closest('[role="option"]');L&&r.contains(L)&&Fn(L)&&T(L)}let p=a?.getAttribute("data-hotkey")??e.getAttribute("data-hotkey");function v(k){!p||!a||!(k.metaKey||k.ctrlKey)||k.altKey||k.key.toLowerCase()===p.toLowerCase()&&(k.preventDefault(),a.open?a.close():(a.showModal(),y(),t.focus()))}function O(){y()}t.addEventListener("input",P),t.addEventListener("keydown",_),r.addEventListener("click",D),p&&a&&(i.addEventListener("keydown",v),a.addEventListener("close",O)),A(),m(dt(e)[0]??null),n.set(e,()=>{t.removeEventListener("input",P),t.removeEventListener("keydown",_),r.removeEventListener("click",D),p&&a&&(i.removeEventListener("keydown",v),a.removeEventListener("close",O)),t.removeAttribute("aria-activedescendant"),t.removeAttribute("aria-haspopup"),t.removeAttribute("aria-autocomplete"),f()})}function Oo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ft])return e[ft];let n=new Map;for(let i of e.querySelectorAll(".hc-command"))Kn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-command")&&Kn(o,n),o.querySelectorAll?.(".hc-command").forEach(s=>Kn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ft]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ft]}};return e[ft]=r,r}var ht="__hcCalendarUninstall",Ir=e=>String(e).padStart(2,"0"),Wt=(e,n,t)=>`${e}-${Ir(n+1)}-${Ir(t)}`;function fe(e){let[n,t,r]=e.split("-").map(Number);return{y:n,m0:t-1,d:r}}function Vt({y:e,m0:n,d:t}){return new Date(e,n,t)}function Kr(e){return Wt(e.getFullYear(),e.getMonth(),e.getDate())}function Me(e,n){let{y:t,m0:r,d:i}=fe(e);return Kr(new Date(t,r,i+n))}function zt(e,n){let{y:t,m0:r,d:i}=fe(e),a=new Date(t,r+n,1),o=new Date(a.getFullYear(),a.getMonth()+1,0).getDate();return Wt(a.getFullYear(),a.getMonth(),Math.min(i,o))}function Rr(e,n){let t=Vt(fe(e)).getDay();return Me(e,-(((t-n)%7+7)%7))}function Bn(e,n,t){return!(n&&e<n||t&&e>t)}function $n(e,n,t){return n&&e<n?n:t&&e>t?t:e}function Un(){let e=new Date;return Wt(e.getFullYear(),e.getMonth(),e.getDate())}function Z(e,n,t={},r){let i=e.createElement(n);for(let[a,o]of Object.entries(t))o===!0?i.setAttribute(a,""):o!=null&&o!==!1&&i.setAttribute(a,String(o));return r!=null&&(i.textContent=r),i}function Yn(e,n){if(n.has(e))return;let t=e.ownerDocument,r=Math.max(0,Math.min(6,Number(e.getAttribute("data-first-day"))||0)),i=e.getAttribute("data-locale")||t.documentElement.getAttribute("lang")||void 0,a=e.getAttribute("data-min")||null,o=e.getAttribute("data-max")||null,s=e.getAttribute("data-name"),c=e.getAttribute("data-target"),l=e.getAttribute("aria-label")||$("calendar.label"),f=e.getAttribute("data-mode")==="range"?"range":"single",m=e.getAttribute("data-value");if(!m&&c){let g=null;try{g=t.querySelector(c)}catch{}g&&g.value&&(m=g.value)}let h={selected:null,start:null,end:null,focused:null};if(f==="range"){let g=e.getAttribute("data-start")||null,q=e.getAttribute("data-end")||null;if(!g&&m){let R=m.split("/");g=R[0]||null,q=R[1]||null}g&&q&&q<g&&([g,q]=[q,g]),h.start=g||null,h.end=q||null,h.focused=h.start||$n(Un(),a,o)}else h.selected=m||null,h.focused=h.selected||$n(Un(),a,o);let A=Un(),b=e.getAttribute("data-nav")==="select",S=new Intl.DateTimeFormat(i,{year:"numeric",month:"long"}),T=new Intl.DateTimeFormat(i,{month:"long"}),y=new Intl.DateTimeFormat(i,{year:"numeric",month:"long",day:"numeric",weekday:"long"}),P=new Intl.DateTimeFormat(i,{weekday:"short"}),_=new Intl.DateTimeFormat(i,{weekday:"long"});function D(g){let q=`hc-calendar__value${g}`,R=e.querySelector(`:scope > input.${q}`);return R||(R=t.createElement("input"),R.type="hidden",R.className=q,e.appendChild(R)),R}function p(){if(s)if(f==="range"){let g=D("-start");g.name=`${s}-start`,g.value=h.start||"";let q=D("-end");q.name=`${s}-end`,q.value=h.end||""}else{let g=D("");g.name=s,g.value=h.selected||""}}function v(){return e.querySelectorAll(".hc-calendar__day")}function O(){for(let g of v())g.removeAttribute("data-range-preview"),g.removeAttribute("data-range-preview-end")}function k(g){if(O(),f!=="range"||!h.start||h.end||!g||g===h.start)return;let q=h.start<g?h.start:g,R=h.start<g?g:h.start;for(let H of v()){let ne=H.getAttribute("data-date");ne>=q&&ne<=R&&H.setAttribute("data-range-preview",""),ne===g&&H.setAttribute("data-range-preview-end","")}}function L(g,q){let R=Z(t,"div",{class:"hc-calendar__monthnav"}),H=Z(t,"select",{class:"hc-calendar__month-select","aria-label":$("calendar.month")});for(let X=0;X<12;X+=1){let J=t.createElement("option");J.value=String(X),J.textContent=T.format(new Date(2020,X,1)),X===q&&(J.selected=!0),H.appendChild(J)}let ne=Z(t,"select",{class:"hc-calendar__year-select","aria-label":$("calendar.year")}),le=Math.min(a?fe(a).y:g-10,g),oe=Math.max(o?fe(o).y:g+10,g);for(let X=le;X<=oe;X+=1){let J=t.createElement("option");J.value=String(X),J.textContent=String(X),X===g&&(J.selected=!0),ne.appendChild(J)}return R.append(H,ne),R}function I(){let{y:g,m0:q}=fe(h.focused),R=[...e.querySelectorAll(':scope > input[type="hidden"]')];e.replaceChildren();let H=Z(t,"div",{class:"hc-calendar__header"}),ne=b?L(g,q):Z(t,"span",{class:"hc-calendar__title","aria-live":"polite"},S.format(new Date(g,q,1)));H.append(Z(t,"button",{class:"hc-calendar__nav",type:"button","data-hc-calendar-prev":!0,"aria-label":$("calendar.prevMonth")},"\u2039"),ne,Z(t,"button",{class:"hc-calendar__nav",type:"button","data-hc-calendar-next":!0,"aria-label":$("calendar.nextMonth")},"\u203A"));let le=Z(t,"table",{class:"hc-calendar__grid",role:"grid","aria-label":l}),oe=Z(t,"thead"),X=Z(t,"tr",{role:"row"});for(let ae=0;ae<7;ae++){let de=(r+ae)%7,W=new Date(2023,0,1+de);X.append(Z(t,"th",{scope:"col",abbr:_.format(W)},P.format(W)))}oe.append(X),le.append(oe);let J=Z(t,"tbody"),Jt=((new Date(g,q,1).getDay()-r)%7+7)%7,ue=new Date(g,q,1-Jt);for(let ae=0;ae<6;ae++){let de=Z(t,"tr",{role:"row"});for(let W=0;W<7;W++){let re=Kr(ue),he=ue.getMonth()!==q,St=!Bn(re,a,o),Q=Z(t,"td",{class:"hc-calendar__day",role:"gridcell","data-date":re,"aria-label":y.format(ue),tabindex:re===h.focused?"0":"-1"},String(ue.getDate()));if(he&&Q.setAttribute("data-outside",""),re===A&&Q.setAttribute("data-today",""),f==="range"){let{start:ve,end:ge}=h;ve&&ge&&re>=ve&&re<=ge&&Q.setAttribute("data-in-range",""),ve&&re===ve&&(Q.setAttribute("data-range-start",""),Q.setAttribute("aria-selected","true")),ge&&re===ge&&(Q.setAttribute("data-range-end",""),Q.setAttribute("aria-selected","true"))}else re===h.selected&&Q.setAttribute("aria-selected","true");St&&Q.setAttribute("aria-disabled","true"),de.append(Q),ue.setDate(ue.getDate()+1)}J.append(de)}le.append(J),e.append(H,le);for(let ae of R)e.append(ae);p(),f==="range"&&k(h.focused)}function w(g){e.querySelector(`.hc-calendar__day[data-date="${g}"]`)?.focus()}function C(g,{focus:q=!0}={}){h.focused=g,I(),q&&w(g)}function B(g){if(!c)return;let q=null;try{q=t.querySelector(c)}catch{}q&&("value"in q&&(q.value=g),q.dispatchEvent(new CustomEvent("input",{bubbles:!0})),q.dispatchEvent(new CustomEvent("change",{bubbles:!0})));let R=e.closest("[popover]");if(R&&typeof R.hidePopover=="function")try{R.hidePopover()}catch{}}function E(g){Bn(g,a,o)&&(h.selected=g,h.focused=g,e.setAttribute("data-value",g),I(),w(g),e.dispatchEvent(new CustomEvent("hc:calendarchange",{bubbles:!0,detail:{value:g,date:Vt(fe(g))}})),B(g))}function N(){e.dispatchEvent(new CustomEvent("hc:calendarrangechange",{bubbles:!0,detail:{start:h.start,end:h.end,startDate:h.start?Vt(fe(h.start)):null,endDate:h.end?Vt(fe(h.end)):null}}))}function z(g){Bn(g,a,o)&&(!h.start||h.start&&h.end?(h.start=g,h.end=null):g<h.start?(h.end=h.start,h.start=g):h.end=g,h.focused=g,e.setAttribute("data-value",h.end?`${h.start}/${h.end}`:h.start),I(),w(g),N(),h.start&&h.end&&B(`${h.start}/${h.end}`))}function te(g){f==="range"?z(g):E(g)}function ce(g){if(g.target.closest("[data-hc-calendar-prev]")){h.focused=zt(h.focused,-1),I(),e.querySelector("[data-hc-calendar-prev]")?.focus();return}if(g.target.closest("[data-hc-calendar-next]")){h.focused=zt(h.focused,1),I(),e.querySelector("[data-hc-calendar-next]")?.focus();return}let q=g.target.closest(".hc-calendar__day");q&&q.getAttribute("aria-disabled")!=="true"&&te(q.getAttribute("data-date"))}function be(g){if(f!=="range"||!h.start||h.end)return;let q=g.target.closest?.(".hc-calendar__day");q&&q.getAttribute("aria-disabled")!=="true"&&k(q.getAttribute("data-date"))}function De(){f==="range"&&k(h.focused)}function Lt(g){let q=g.target.classList?.contains?.("hc-calendar__month-select"),R=g.target.classList?.contains?.("hc-calendar__year-select");if(!q&&!R)return;let{y:H,m0:ne}=fe(h.focused),le=q?Number(g.target.value):ne,oe=R?Number(g.target.value):H;h.focused=$n(Wt(oe,le,1),a,o),I(),e.querySelector(q?".hc-calendar__month-select":".hc-calendar__year-select")?.focus()}function qe(g){if(!g.target.closest(".hc-calendar__day"))return;let R=h.focused,H=g.key;switch(getComputedStyle(e).direction==="rtl"&&(H==="ArrowRight"?H="ArrowLeft":H==="ArrowLeft"&&(H="ArrowRight")),H){case"ArrowLeft":g.preventDefault(),C(Me(R,-1));break;case"ArrowRight":g.preventDefault(),C(Me(R,1));break;case"ArrowUp":g.preventDefault(),C(Me(R,-7));break;case"ArrowDown":g.preventDefault(),C(Me(R,7));break;case"Home":g.preventDefault(),C(Rr(R,r));break;case"End":g.preventDefault(),C(Me(Rr(R,r),6));break;case"PageUp":g.preventDefault(),C(zt(R,g.shiftKey?-12:-1));break;case"PageDown":g.preventDefault(),C(zt(R,g.shiftKey?12:1));break;case"Enter":case" ":g.preventDefault(),te(R);break;default:break}}e.addEventListener("click",ce),e.addEventListener("keydown",qe),b&&e.addEventListener("change",Lt),f==="range"&&(e.addEventListener("pointerover",be),e.addEventListener("pointerleave",De)),I(),n.set(e,()=>{e.removeEventListener("click",ce),e.removeEventListener("keydown",qe),e.removeEventListener("change",Lt),e.removeEventListener("pointerover",be),e.removeEventListener("pointerleave",De)})}function Po(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[ht])return e[ht];let n=new Map;for(let i of e.querySelectorAll(".hc-calendar"))Yn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-calendar")&&Yn(o,n),o.querySelectorAll?.(".hc-calendar").forEach(s=>Yn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[ht]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[ht]}};return e[ht]=r,r}var pt="__hcInputOtpUninstall";function No(e){let n=e.startsWith("[")&&e.endsWith("]")?e.slice(1,-1):e;try{return new RegExp(`[${n}]`,"u")}catch{return/[0-9]/u}}function Io(e,n){if(!e)return new Set;let t=e.split(/[\s,-]+/).filter(Boolean).map(Number);if(t.length<2||t.some(a=>!Number.isInteger(a)||a<=0))return new Set;if(t.reduce((a,o)=>a+o,0)!==n)return new Set;let r=new Set,i=0;for(let a=0;a<t.length-1;a+=1)i+=t[a],r.add(i);return r}function Hn(e,n){if(n.has(e))return;let t=e.querySelector(".hc-inputotp__input")||e.querySelector("input");if(!t)return;let r=e.ownerDocument,i=Math.max(1,Number(e.getAttribute("data-length"))||6),a=No(e.getAttribute("data-pattern")||"[0-9]");t.setAttribute("maxlength",String(i)),t.hasAttribute("inputmode")||t.setAttribute("inputmode","numeric"),t.hasAttribute("autocomplete")||t.setAttribute("autocomplete","one-time-code"),t.hasAttribute("type")||t.setAttribute("type","text");let o=[];function s(){for(let S of e.querySelectorAll(".hc-inputotp__slot, .hc-inputotp__separator"))S.remove();o.length=0;let b=Io(e.getAttribute("data-groups"),i);for(let S=0;S<i;S++){let T=r.createElement("div");if(T.className="hc-inputotp__slot",T.setAttribute("aria-hidden","true"),e.appendChild(T),o.push(T),b.has(S+1)){let y=r.createElement("span");y.className="hc-inputotp__separator",y.setAttribute("aria-hidden","true"),e.appendChild(y)}}}function c(b){return Array.from(b).filter(S=>a.test(S)).join("").slice(0,i)}function l(){let b=t.value,S=r.activeElement===t,T=t.selectionStart??b.length,y=Math.min(T,i-1);for(let P=0;P<i;P++){let _=o[P];_.textContent=b[P]??"",_.toggleAttribute("data-empty",!b[P]),_.toggleAttribute("data-active",S&&P===y)}}function f(){let b=c(t.value);if(b!==t.value){t.value=b;try{t.setSelectionRange(b.length,b.length)}catch{}}l(),e.dispatchEvent(new CustomEvent("hc:otpchange",{bubbles:!0,detail:{value:t.value,input:t}})),t.value.length===i&&e.dispatchEvent(new CustomEvent("hc:otpcomplete",{bubbles:!0,detail:{value:t.value,input:t}}))}function m(){l()}function h(b){for(let S=0;S<o.length;S+=1){let T=o[S].getBoundingClientRect();if(b>=T.left&&b<=T.right)return S}return-1}function A(b){let S=h(b.clientX);if(S!==-1){let T=Math.min(S,t.value.length);t.focus();try{t.setSelectionRange(T,T)}catch{}}l()}t.addEventListener("input",f),t.addEventListener("focus",m),t.addEventListener("blur",m),t.addEventListener("keyup",m),e.addEventListener("click",A),s(),t.value&&(t.value=c(t.value)),l(),n.set(e,()=>{t.removeEventListener("input",f),t.removeEventListener("focus",m),t.removeEventListener("blur",m),t.removeEventListener("keyup",m),e.removeEventListener("click",A);for(let b of e.querySelectorAll(".hc-inputotp__slot, .hc-inputotp__separator"))b.remove()})}function Ro(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[pt])return e[pt];let n=new Map;for(let i of e.querySelectorAll(".hc-inputotp"))Hn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-inputotp")&&Hn(o,n),o.querySelectorAll?.(".hc-inputotp").forEach(s=>Hn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[pt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[pt]}};return e[pt]=r,r}var mt="__hcSplitterUninstall";function Ko(e){try{let n=localStorage.getItem(e),t=n==null?NaN:Number(n);return Number.isFinite(t)?t:null}catch{return null}}function Fo(e,n){try{localStorage.setItem(e,String(n))}catch{}}function zn(e,n){if(n.has(e))return;let t=e.querySelectorAll(":scope > .hc-splitter__panel"),r=e.querySelector(":scope > .hc-splitter__handle");if(t.length<2||!r)return;let i=t[0],a=e.getAttribute("data-orientation")==="vertical"?"vertical":"horizontal",o=e.hasAttribute("data-min")?Number(e.getAttribute("data-min")):10,s=e.hasAttribute("data-max")?Number(e.getAttribute("data-max")):90,c=e.hasAttribute("data-step")?Number(e.getAttribute("data-step")):5,l=e.hasAttribute("data-collapsible"),f=e.getAttribute("data-persist"),m=e.hasAttribute("data-value")?Number(e.getAttribute("data-value")):50,h=m;if(f){let L=Ko(f);L!=null&&(h=L)}let A=h>0?h:m;i.id||(i.id=`hc-splitter-panel-${Math.random().toString(36).slice(2,9)}`),r.hasAttribute("role")||r.setAttribute("role","separator"),r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.setAttribute("aria-orientation",a==="horizontal"?"vertical":"horizontal"),r.setAttribute("aria-controls",i.id),r.setAttribute("aria-valuemin",String(o)),r.setAttribute("aria-valuemax",String(s)),!r.hasAttribute("aria-label")&&!r.hasAttribute("aria-labelledby")&&r.setAttribute("aria-label",$("splitter.resize"));function b(L){return Math.min(s,Math.max(o,L))}function S(L,{dispatch:I=!0}={}){h=L;let w=L<=0;e.style.setProperty("--hc-splitter-pos",`${Math.max(0,L)}%`),r.setAttribute("aria-valuenow",String(Math.round(b(L)))),e.toggleAttribute("data-collapsed",w),f&&I&&Fo(f,Math.round(L)),I&&e.dispatchEvent(new CustomEvent("hc:splitterchange",{bubbles:!0,detail:{value:L,collapsed:w,orientation:a,handle:r,primary:i}}))}function T(L,I){S(b(L),I)}function y(){h<=0?S(b(A>0?A:m)):(A=h,S(0))}S(h<=0?0:b(h),{dispatch:!1});let P=e.ownerDocument,_=!1;function D(L){_=!0,L.preventDefault()}function p(L){if(!_)return;let I=e.getBoundingClientRect(),w=h;a==="horizontal"?I.width&&(w=(L.clientX-I.left)/I.width*100):I.height&&(w=(L.clientY-I.top)/I.height*100),T(w)}function v(){_=!1}function O(){l&&y()}function k(L){if(l&&L.key==="Enter"){L.preventDefault(),y();return}let I=a==="horizontal"&&getComputedStyle(e).direction==="rtl",w=a==="horizontal"?I?"ArrowLeft":"ArrowRight":"ArrowDown",C=a==="horizontal"?I?"ArrowRight":"ArrowLeft":"ArrowUp";switch(L.key){case w:L.preventDefault(),T(h+c);break;case C:L.preventDefault(),T(h-c);break;case"Home":L.preventDefault(),T(o);break;case"End":L.preventDefault(),T(s);break;default:break}}r.addEventListener("pointerdown",D),r.addEventListener("keydown",k),l&&r.addEventListener("dblclick",O),P.addEventListener("pointermove",p),P.addEventListener("pointerup",v),n.set(e,()=>{r.removeEventListener("pointerdown",D),r.removeEventListener("keydown",k),r.removeEventListener("dblclick",O),P.removeEventListener("pointermove",p),P.removeEventListener("pointerup",v)})}function Bo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[mt])return e[mt];let n=new Map;for(let i of e.querySelectorAll(".hc-splitter"))zn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-splitter")&&zn(o,n),o.querySelectorAll?.(".hc-splitter").forEach(s=>zn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[mt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[mt]}};return e[mt]=r,r}var bt="__hcShellUninstall";function $o(e){try{return localStorage.getItem(e)}catch{return null}}function Uo(e,n){try{localStorage.setItem(e,n)}catch{}}var Yo=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(","),Fr=0;function Vn(e,n){if(n.has(e))return;let t=e.querySelector("[data-hc-shell-toggle]"),r=e.querySelector(".hc-shell__sidebar");if(!r)return;r.id||(Fr+=1,r.id=`hc-shell-sidebar-${Fr}`),r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1");let i=()=>{},a=null;if(t){let h=function(y){if(!f())return;if(y.key==="Escape"){y.preventDefault(),i();return}if(y.key!=="Tab")return;let P=m();if(P.length===0){y.preventDefault(),r.focus();return}let _=P[0],D=P[P.length-1],p=document.activeElement;y.shiftKey&&(p===_||!r.contains(p))?(y.preventDefault(),D.focus()):!y.shiftKey&&p===D&&(y.preventDefault(),_.focus())},A=function(y){f()&&(r.contains(y.target)||t.contains(y.target)||i())},b=function(y){y.target.closest("a[href], [data-hc-shell-close]")&&i()},S=function(){if(f())return;l=document.activeElement,e.setAttribute("data-sidebar","open"),t.setAttribute("aria-expanded","true"),document.addEventListener("keydown",h,!0),document.addEventListener("click",A,!0),(m()[0]??r).focus()},T=function(y){y.preventDefault(),f()?i():S()};t.setAttribute("aria-controls",r.id),t.setAttribute("aria-expanded","false"),!t.hasAttribute("aria-label")&&!t.textContent.trim()&&t.setAttribute("aria-label",$("shell.toggleNav"));let l=null,f=()=>e.getAttribute("data-sidebar")==="open",m=()=>[...r.querySelectorAll(Yo)];i=()=>{f()&&(e.removeAttribute("data-sidebar"),t.setAttribute("aria-expanded","false"),document.removeEventListener("keydown",h,!0),document.removeEventListener("click",A,!0),l&&typeof l.focus=="function"&&l.focus(),l=null)},t.addEventListener("click",T),r.addEventListener("click",b),a=()=>{i(),t.removeEventListener("click",T),r.removeEventListener("click",b)}}let o=null;if(r.hasAttribute("data-collapsible")){let l=e.querySelector("[data-hc-shell-collapse]"),f=r.getAttribute("data-persist"),m=()=>e.hasAttribute("data-sidebar-collapsed"),h=(A,{persist:b=!0}={})=>{e.toggleAttribute("data-sidebar-collapsed",A),l&&l.setAttribute("aria-expanded",String(!A)),b&&f&&Uo(f,A?"1":"0")};if(f){let A=$o(f);(A==="1"||A==="0")&&h(A==="1",{persist:!1})}if(l){l.hasAttribute("aria-controls")||l.setAttribute("aria-controls",r.id),l.setAttribute("aria-expanded",String(!m())),!l.hasAttribute("aria-label")&&!l.textContent.trim()&&l.setAttribute("aria-label",$("shell.collapseNav"));let A=b=>{b.preventDefault(),h(!m())};l.addEventListener("click",A),o=()=>l.removeEventListener("click",A)}}let s=null,c=null;typeof window<"u"&&typeof window.matchMedia=="function"&&(s=window.matchMedia("(min-width: 60rem)"),c=l=>{l.matches&&i()},s.addEventListener?.("change",c)),n.set(e,()=>{a?.(),s&&c&&s.removeEventListener?.("change",c),o?.()})}function Ho(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[bt])return e[bt];let n=new Map;for(let i of e.querySelectorAll(".hc-shell"))Vn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-shell")&&Vn(o,n),o.querySelectorAll?.(".hc-shell").forEach(s=>Vn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[bt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[bt]}};return e[bt]=r,r}var vt="__hcDatagridUninstall",zo="input, button, select, textarea, a[href]",Br=0;function ee(e,n){return[...e.querySelectorAll(n)].filter(t=>t.closest(".hc-datagrid")===e)}function jt(e){return ee(e,".hc-datagrid__body > .hc-datagrid__row, .hc-datagrid__record > .hc-datagrid__row")}function Wn(e){let n=ee(e,".hc-datagrid__record");return n.length?n:jt(e)}function $r(e,n){let t=ee(n,".hc-datagrid__record").length?".hc-datagrid__record":".hc-datagrid__row",r=e.closest(t);return r&&r.closest(".hc-datagrid")===n?r:null}function Vo(e){return e.matches(".hc-datagrid__row")?[e]:[...e.querySelectorAll(":scope > .hc-datagrid__row")]}function Xn(e,n){e.toggleAttribute("data-selected",n);for(let t of Vo(e))t.setAttribute("aria-selected",n?"true":"false")}function Wo(e){return[...e.children].filter(n=>n.classList.contains("hc-datagrid__cell"))}function Xo(e){let n=jt(e),t=n.map(()=>[]);return n.forEach((r,i)=>{let a=0;for(let o of Wo(r)){for(;t[i][a]!==void 0;)a+=1;let s=o.colSpan||1,c=o.rowSpan===0?n.length-i:o.rowSpan||1;for(let l=0;l<c;l+=1){let f=n[i+l];if(!f||f.parentNode!==r.parentNode)break;for(let m=0;m<s;m+=1)t[i+l][a+m]=o}a+=s}}),t}function Xt(e){let n=ee(e,".hc-datagrid__head > tr"),t=0;n.forEach((s,c)=>{let l=s.getBoundingClientRect().height;c===0&&e.style.setProperty("--hc-datagrid-head-1-h",`${l}px`),c===1&&e.style.setProperty("--hc-datagrid-head-2-h",`${l}px`),t+=l});let r=jt(e)[0],i=[],a=0;if(r)for(let s of[...r.children].filter(c=>c.hasAttribute("data-frozen")))i.push(a),a+=s.getBoundingClientRect().width;for(let s of ee(e,".hc-datagrid__head > tr, .hc-datagrid__body > tr, .hc-datagrid__record > tr"))[...s.children].filter(l=>l.hasAttribute("data-frozen")).forEach((l,f)=>{i[f]!=null&&l.style.setProperty("--hc-datagrid-left",`${i[f]}px`)});let o=e.querySelector(".hc-datagrid__scroll");o&&(o.style.scrollPaddingTop=`${t}px`,o.style.scrollPaddingLeft=`${a}px`)}function jn(e,n){if(n.has(e))return;let t=e.querySelector(".hc-datagrid__table");if(!t)return;let r=[],i={r:0,c:0},a=()=>ee(e,'.hc-datagrid__head input[type="checkbox"]')[0]??null;function o(){let u=Wn(e),d=u.length,x=u.filter(M=>M.hasAttribute("data-selected")).length;e.dispatchEvent(new CustomEvent("hc:datagridselectionchange",{bubbles:!0,detail:{selected:x,total:d}}))}function s(){t.setAttribute("role","grid");for(let u of ee(e,".hc-datagrid__head > tr, .hc-datagrid__row"))u.setAttribute("role","row");for(let u of ee(e,".hc-datagrid__headcell"))u.getAttribute("role")||u.setAttribute("role","columnheader");new Set(r.flat()).forEach(u=>{u.setAttribute("role",u.tagName==="TH"?"rowheader":"gridcell"),u.tabIndex=-1,u.querySelectorAll(zo).forEach(d=>{d.tabIndex=-1})})}function c(){r=Xo(e),s(),b();let u=r[i.r]?.[i.c];if(!u){u=r[0]?.[0];let d=u&&_(u);d&&(i=d)}u&&(u.tabIndex=0)}let l=40,f=new Map,m=[];function h(u){return ee(e,`.hc-datagrid__cell[data-col="${u}"], .hc-datagrid__headcell[data-col="${u}"]`)}function A(u,d){for(let x of h(u))x.style.inlineSize=d,x.style.maxInlineSize=d,x.setAttribute("data-resized","")}function b(){for(let[u,d]of f)A(u,d)}function S(u,d){let x=Math.max(l,Math.round(d)),M=`${x}px`;f.set(u,M),A(u,M);let K=ee(e,`.hc-datagrid__headcell[data-resizable][data-col="${u}"] > .hc-datagrid__resizer`)[0];K&&K.setAttribute("aria-valuenow",String(x)),Xt(e)}function T(u,d){e.dispatchEvent(new CustomEvent("hc:datagridcolumnresize",{bubbles:!0,detail:{col:u,width:Math.max(l,Math.round(d))}}))}function y(u,d){let x=d.dataset.col,M=0,K=0,F=!1;function U(ie){F=!0,M=ie.clientX,K=d.getBoundingClientRect().width,u.setPointerCapture?.(ie.pointerId),ie.preventDefault()}function Y(ie){F&&S(x,K+(ie.clientX-M))}function Oe(ie){F&&(F=!1,u.releasePointerCapture?.(ie.pointerId),T(x,d.getBoundingClientRect().width))}function nr(ie){let rr=ie.shiftKey?32:8,ir=d.getBoundingClientRect().width,kt;if(ie.key==="ArrowRight")kt=ir+rr;else if(ie.key==="ArrowLeft")kt=ir-rr;else return;ie.preventDefault(),S(x,kt),T(x,kt)}u.addEventListener("pointerdown",U),u.addEventListener("pointermove",Y),u.addEventListener("pointerup",Oe),u.addEventListener("keydown",nr),m.push(()=>{u.removeEventListener("pointerdown",U),u.removeEventListener("pointermove",Y),u.removeEventListener("pointerup",Oe),u.removeEventListener("keydown",nr),u.remove()})}function P(){for(let u of ee(e,".hc-datagrid__headcell[data-resizable]")){if(!u.dataset.col||u.querySelector(":scope > .hc-datagrid__resizer"))continue;let d=e.ownerDocument.createElement("span");d.className="hc-datagrid__resizer",d.setAttribute("role","separator"),d.setAttribute("aria-orientation","vertical"),d.tabIndex=0,d.setAttribute("aria-label",`Resize ${u.textContent.trim()||"column"}`),d.setAttribute("aria-valuemin",String(l)),d.setAttribute("aria-valuenow",String(Math.round(u.getBoundingClientRect().width))),u.appendChild(d),y(d,u)}}function _(u){for(let d=0;d<r.length;d+=1){let x=r[d].indexOf(u);if(x!==-1)return{r:d,c:x}}return null}function D(){let u=e.querySelector(".hc-datagrid__scroll"),d=r[0]?.[0],x=d?d.getBoundingClientRect().height:0,M=u?u.clientHeight:0;return x?Math.max(1,Math.floor(M/x)-1):10}function p(u,d,x=!0){if(!r.length)return;let M=Math.max(0,Math.min(u,r.length-1)),K=Math.max(0,Math.min(d,(r[M]?.length??1)-1)),F=r[i.r]?.[i.c];F&&(F.tabIndex=-1,F.removeAttribute("data-active")),i={r:M,c:K};let U=r[M]?.[K];if(!U)return;U.tabIndex=0,U.setAttribute("data-active","");let Y=U.closest(".hc-datagrid__record");if(Y){for(let Oe of e.querySelectorAll(".hc-datagrid__record[data-current]"))Oe!==Y&&Oe.removeAttribute("data-current");Y.setAttribute("data-current","")}x&&U.focus(),U.scrollIntoView?.({block:"nearest",inline:"nearest"})}function v(u,d){let{r:x,c:M}=i,K=r[x]?.[M],F=x+u,U=M+d;for(;K&&r[F]?.[U]===K;)F+=u,U+=d;p(F,U)}function O(u){let d=jt(e)[u];if(!d)return;let x=$r(d,e)??d,M=x.querySelector('input[type="checkbox"]');M?(M.checked=!M.checked,M.dispatchEvent(new Event("change",{bubbles:!0}))):(Xn(x,!x.hasAttribute("data-selected")),o())}function k(u){if(q||!w(u)||u.target.closest(".hc-datagrid__head")||!r.length)return;let{r:d,c:x}=i,M=r[d]?.[x],K=M?.querySelector?.("[data-hc-datagrid-toggle]");if(K&&u.key==="Enter"){u.preventDefault();let Y=K.closest(".hc-datagrid__record");Y&&De(Y,!Y.hasAttribute("data-expanded"));return}let F=M?.hasAttribute("data-editable")&&g.has(M.dataset.col);if(F&&(u.key==="Enter"||u.key==="F2")){u.preventDefault(),ue(M);return}if(F&&u.key.length===1&&u.key!==" "&&!u.ctrlKey&&!u.metaKey&&!u.altKey){u.preventDefault(),ue(M,u.key);return}let U=u.key;switch(getComputedStyle(e).direction==="rtl"&&(U==="ArrowRight"?U="ArrowLeft":U==="ArrowLeft"&&(U="ArrowRight")),U){case"ArrowDown":v(1,0);break;case"ArrowUp":v(-1,0);break;case"ArrowRight":v(0,1);break;case"ArrowLeft":v(0,-1);break;case"Home":p(u.ctrlKey?0:d,0);break;case"End":u.ctrlKey?p(r.length-1,1/0):p(d,1/0);break;case"PageDown":p(d+D(),x);break;case"PageUp":p(d-D(),x);break;case" ":case"Spacebar":if(u.target.classList.contains("hc-datagrid__cell"))O(d);else return;break;default:return}u.preventDefault()}function L(u){if(!w(u))return;let d=u.target.closest?.(".hc-datagrid__cell");if(!d||!e.contains(d))return;let x=_(d);x&&(r[i.r]?.[i.c]!==d?p(x.r,x.c,!1):d.setAttribute("data-active",""))}function I(u){if(!w(u))return;let d=u.target;if(!(!(d instanceof HTMLInputElement)||d.type!=="checkbox")){if(d===a())for(let x of Wn(e)){let M=x.querySelector('input[type="checkbox"]');M&&(M.checked=d.checked),Xn(x,d.checked)}else{let x=$r(d,e);x&&Xn(x,d.checked);let M=a();if(M){let K=Wn(e).map(U=>U.querySelector('input[type="checkbox"]')).filter(Boolean),F=K.filter(U=>U.checked).length;M.checked=F>0&&F===K.length,M.indeterminate=F>0&&F<K.length}}o()}}function w(u){return u.target.closest?.(".hc-datagrid")===e}function C(){return ee(e,".hc-datagrid__headcell[data-sortable]")}function B(){for(let u of C())u.hasAttribute("tabindex")||(u.tabIndex=0),u.hasAttribute("aria-sort")||u.setAttribute("aria-sort","none")}function E(u){let d=u.getAttribute("aria-sort")||"none",x=d==="none"?"ascending":d==="ascending"?"descending":"none";for(let F of C())F!==u&&F.setAttribute("aria-sort","none");u.setAttribute("aria-sort",x);let M=u.dataset.col||(u.textContent||"").trim(),K=x==="ascending"?"asc":x==="descending"?"desc":null;e.dispatchEvent(new CustomEvent("hc:datagridsort",{bubbles:!0,detail:{col:M,direction:K}}))}function N(u){if(u.target.closest(".hc-datagrid__resizer"))return null;let d=u.target.closest(".hc-datagrid__headcell[data-sortable]");return d&&d.closest(".hc-datagrid")===e?d:null}function z(u){let d=N(u);d&&E(d)}function te(u){if(u.key!=="Enter"&&u.key!==" ")return;let d=N(u);d&&(u.preventDefault(),E(d))}function ce(u){return u.querySelector(":scope > .hc-datagrid__detail-row")}function be(u,d){if(d.dataset.loaded="",d.setAttribute("aria-busy","true"),typeof MutationObserver<"u"){let x=new MutationObserver(()=>{d.removeAttribute("aria-busy"),x.disconnect()});x.observe(d,{childList:!0})}d.dispatchEvent(new CustomEvent("hc:datagriddetailload",{bubbles:!0,detail:{record:u}}))}function De(u,d){let x=ce(u),M=x?.querySelector(".hc-datagrid__detail"),K=u.querySelector("[data-hc-datagrid-toggle]");u.toggleAttribute("data-expanded",d),x&&(x.hidden=!d),K&&K.setAttribute("aria-expanded",d?"true":"false"),d&&M&&M.hasAttribute("data-lazy")&&M.dataset.loaded==null&&be(u,M),e.dispatchEvent(new CustomEvent(d?"hc:datagridexpand":"hc:datagridcollapse",{bubbles:!0,detail:{record:u}}))}function Lt(){for(let u of ee(e,".hc-datagrid__record")){let d=u.querySelector("[data-hc-datagrid-toggle]"),x=ce(u);if(!d||!x)continue;let M=x.querySelector(".hc-datagrid__detail");M&&(M.id||(Br+=1,M.id=`hc-datagrid-detail-${Br}`),x.setAttribute("role","row"),M.setAttribute("role","gridcell"),d.setAttribute("aria-controls",M.id));let K=u.hasAttribute("data-expanded");d.setAttribute("aria-expanded",K?"true":"false"),x.hidden=!K}}function qe(u){if(!w(u))return;let d=u.target.closest("[data-hc-datagrid-toggle]");if(!d||!e.contains(d))return;let x=d.closest(".hc-datagrid__record");x&&De(x,!x.hasAttribute("data-expanded"))}let g=new Map;for(let u of e.querySelectorAll("template[data-datagrid-editor]"))u.dataset.col&&g.set(u.dataset.col,u);let q=null,R=null;function H(u){return u.matches("input, select, textarea")?u:u.querySelector("input, select, textarea")}function ne(u){if(R)return R;let d=H(u);return d?d.tagName==="SELECT"?{value:d.value,label:d.selectedOptions[0]?.textContent?.trim()??d.value}:{value:d.value,label:d.value}:{value:"",label:""}}function le(u){if(!q)return;let d=q;q=null,d.removeAttribute("data-editing");let x=d.__hcOldValue,M=null;if(u)d.innerHTML=d.__hcOldHTML;else{let{value:K,label:F}=ne(d.firstElementChild??d);d.textContent=F,K!=null&&K!==""&&(d.dataset.value=K),K!==x&&(M={cell:d,col:d.dataset.col,value:K,label:F,oldValue:x})}delete d.__hcOldValue,delete d.__hcOldHTML,R=null,d.tabIndex=0,d.focus(),M&&e.dispatchEvent(new CustomEvent("hc:datagridedit",{bubbles:!0,detail:M}))}let oe=()=>le(!1),X=()=>le(!0);function J(u){u.key==="Escape"?(u.preventDefault(),u.stopPropagation(),X()):u.key==="Enter"&&!u.shiftKey&&(u.target.closest(".hc-combobox")||(u.preventDefault(),u.stopPropagation(),oe()))}function er(u){R={value:u.detail.value,label:u.detail.label},oe()}function Jt(){setTimeout(()=>{q&&!q.contains(document.activeElement)&&oe()},0)}function ue(u,d){if(!u||!u.hasAttribute("data-editable"))return;let x=g.get(u.dataset.col);if(!x)return;he(),q&&oe();let M=u.textContent.trim(),K=u.dataset.value??M;u.__hcOldValue=K,u.__hcOldHTML=u.innerHTML;let F=x.content.firstElementChild.cloneNode(!0),U=F.classList?.contains("hc-combobox");u.setAttribute("data-editing",""),u.replaceChildren(F),q=u,R=null;let Y=H(F);Y&&(Y.tagName==="SELECT"?Y.value=K:U?Y.value=M:Y.value=d??M),F.addEventListener("keydown",J),F.addEventListener("focusout",Jt),U&&F.addEventListener("hc:comboboxselect",er),(Y??F).focus(),d!=null&&Y&&Y.tagName==="INPUT"&&(Y.value=d,Y.setSelectionRange?.(Y.value.length,Y.value.length))}function ae(u){if(!w(u))return;let d=u.target.closest?.(".hc-datagrid__cell");if(!d||!e.contains(d))return;let x=_(d);x&&(p(x.r,x.c,!1),ue(d))}let de=e.querySelector(".hc-datagrid__scroll"),W=e.ownerDocument.createElement("div");W.className="hc-datagrid__tooltip",W.setAttribute("role","tooltip"),W.hidden=!0,e.appendChild(W);function re(u){W.textContent=u.textContent.trim(),W.hidden=!1;let d=u.getBoundingClientRect(),x=W.getBoundingClientRect(),M=e.ownerDocument.documentElement,K=M.clientWidth||0,F=M.clientHeight||0,U=d.left;U+x.width>K-4&&(U=Math.max(4,K-x.width-4));let Y=d.bottom+4;Y+x.height>F-4&&(Y=Math.max(4,d.top-x.height-4)),W.style.left=`${U}px`,W.style.top=`${Y}px`}function he(){W.hidden=!0}function St(u){return u&&e.contains(u)&&u.scrollWidth>u.clientWidth+1}function Q(u){if(!w(u))return;let d=u.target.closest?.(".hc-datagrid__truncate");St(d)&&re(d)}function ve(u){u.target.closest?.(".hc-datagrid__truncate")&&he()}function ge(u){if(!w(u))return;let x=u.target.closest?.(".hc-datagrid__cell")?.querySelector?.(":scope > .hc-datagrid__truncate")??null;St(x)?re(x):he()}c(),Xt(e),Lt(),P(),B(),t.addEventListener("keydown",k),t.addEventListener("keydown",te),t.addEventListener("change",I),t.addEventListener("focusin",L),t.addEventListener("dblclick",ae),t.addEventListener("click",qe),t.addEventListener("click",z),e.addEventListener("pointerover",Q),e.addEventListener("pointerout",ve),e.addEventListener("focusin",ge),e.addEventListener("focusout",he),de&&de.addEventListener("scroll",he,{passive:!0});let xt=null;typeof ResizeObserver<"u"&&(xt=new ResizeObserver(()=>Xt(e)),xt.observe(e));let _t=null,tr=e.querySelector(".hc-datagrid__body");tr&&typeof MutationObserver<"u"&&(_t=new MutationObserver(()=>{c(),Xt(e)}),_t.observe(tr,{childList:!0})),n.set(e,()=>{t.removeEventListener("keydown",k),t.removeEventListener("keydown",te),t.removeEventListener("change",I),t.removeEventListener("focusin",L),t.removeEventListener("dblclick",ae),t.removeEventListener("click",qe),t.removeEventListener("click",z),e.removeEventListener("pointerover",Q),e.removeEventListener("pointerout",ve),e.removeEventListener("focusin",ge),e.removeEventListener("focusout",he),de&&de.removeEventListener("scroll",he),W.remove();for(let u of m)u();xt&&xt.disconnect(),_t&&_t.disconnect()})}function jo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[vt])return e[vt];let n=new Map;for(let i of e.querySelectorAll(".hc-datagrid"))jn(i,n);let t=null;typeof MutationObserver<"u"&&(t=new MutationObserver(i=>{for(let a of i)for(let o of a.addedNodes)o.nodeType===1&&(o.matches?.(".hc-datagrid")&&jn(o,n),o.querySelectorAll?.(".hc-datagrid").forEach(s=>jn(s,n)))}),t.observe(e.body??e,{childList:!0,subtree:!0}));let r=()=>{if(e[vt]===r){t&&t.disconnect();for(let i of n.values())i();n.clear(),delete e[vt]}};return e[vt]=r,r}var Go=0;function we(e){return e?.closest?.(".hc-field")??null}function Gn(e,n){let t=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean);t.includes(n)||(t.push(n),e.setAttribute("aria-describedby",t.join(" ")))}function Ur(e,n){let t=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean).filter(r=>r!==n);t.length?e.setAttribute("aria-describedby",t.join(" ")):e.removeAttribute("aria-describedby")}function Gt(e,n){let t=e.querySelector(".hc-field__error");return t||(t=e.ownerDocument.createElement("p"),t.className="hc-field__error",t.setAttribute("aria-live","polite"),e.appendChild(t)),t.id||(t.id=`hc-field-error-${Go+=1}`),Gn(n,t.id),t}var gt="__hcValidationUninstall";function Jn(e){return e&&typeof e.willValidate=="boolean"&&e.willValidate&&typeof e.checkValidity=="function"&&we(e)!=null}function Jo(e){let n=we(e);if(!n)return;e.dataset.hcValidated="",e.setAttribute("aria-invalid","true"),n.setAttribute("data-invalid","true");let t=Gt(n,e);t.textContent=e.validationMessage,delete e.dataset.hcServerInvalid,t.removeAttribute("data-hc-server-error")}function Yr(e){let n=we(e);if(!n)return;e.removeAttribute("aria-invalid"),n.removeAttribute("data-invalid");let t=n.querySelector(".hc-field__error");t&&(t.textContent="")}function Zo(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[gt])return e[gt];function n(a){let o=a.target;Jn(o)&&(a.preventDefault(),Jo(o))}function t(a){let o=a.target;Jn(o)&&o.dataset.hcServerInvalid==null&&o.checkValidity()&&Yr(o)}function r(a){let o=a.target;Jn(o)&&o.dataset.hcServerInvalid==null&&o.dataset.hcValidated!=null&&o.checkValidity()&&Yr(o)}e.addEventListener("invalid",n,!0),e.addEventListener("blur",t,!0),e.addEventListener("input",r),e.addEventListener("change",r);let i=()=>{e[gt]===i&&(e.removeEventListener("invalid",n,!0),e.removeEventListener("blur",t,!0),e.removeEventListener("input",r),e.removeEventListener("change",r),delete e[gt])};return e[gt]=i,i}var yt="__hcThemeToggleUninstall";function Qo(e){try{return localStorage.getItem(e)}catch{return null}}function ea(e,n){try{localStorage.setItem(e,n)}catch{}}function ta(){return typeof matchMedia=="function"&&matchMedia("(prefers-color-scheme: dark)").matches}function na(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[yt])return e[yt];let n=e.documentElement,t=()=>n.getAttribute("data-theme")??(ta()?"dark":"light");function r(f){for(let m of f.childNodes)if(m.nodeType===3&&m.textContent.trim()||m.nodeType===1&&!m.hasAttribute("aria-hidden")&&m.textContent.trim())return!0;return!1}function i(){let f=t();for(let m of e.querySelectorAll("[data-hc-theme-toggle]"))m.setAttribute("aria-pressed",String(f==="dark")),!m.hasAttribute("aria-label")&&!r(m)&&m.setAttribute("aria-label",$("themeToggle.label"))}function a(f,m){n.setAttribute("data-theme",f),m&&ea(m,f),i()}function o(f){let m=f.target?.closest?.("[data-hc-theme-toggle]");if(!m)return;let h=t()==="dark"?"light":"dark";a(h,m.getAttribute("data-persist")),m.dispatchEvent(new CustomEvent("hc:themechange",{bubbles:!0,detail:{theme:h}}))}function s(){i()}let c=e.querySelector("[data-hc-theme-toggle][data-persist]");if(c){let f=Qo(c.getAttribute("data-persist"));(f==="light"||f==="dark")&&n.setAttribute("data-theme",f)}i(),e.addEventListener("click",o),e.addEventListener("htmx:afterSwap",s);let l=()=>{e[yt]===l&&(e.removeEventListener("click",o),e.removeEventListener("htmx:afterSwap",s),delete e[yt])};return e[yt]=l,l}var At="__hcFieldErrorsUninstall";function ra(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}function ia(e,n){let t=e.getAttribute("data-hc-field-errors");return t?(n.nodeType===9?n:n.ownerDocument).querySelector(t):e.closest("form")}function oa(e,n){let t;if(e.elements&&typeof e.elements.namedItem=="function"?t=e.elements.namedItem(n):t=e.querySelectorAll(`[name="${ra(n)}"]`),t&&t.tagName==null&&typeof t.length=="number"){let r=Array.from(t);t=r.find(i=>i.type!=="hidden")??r[0]}return t??null}function aa(e){let n=e.getAttribute("data-message-key"),t={field:e.getAttribute("data-field")??"",code:e.getAttribute("data-code")??""},r=e.getAttribute("data-message-params");if(r)try{let a=JSON.parse(r);a&&typeof a=="object"&&!Array.isArray(a)&&Object.assign(t,a)}catch{}if(n&&Zt(n))return $(n,t);let i=e.textContent.trim();return i||$("fieldErrors.unknown",t)}var sa=0;function ca(e,n){let t=e.ownerDocument,r=we(e),i;r?(i=Gt(r,e),r.setAttribute("data-invalid","true")):(i=t.createElement("p"),i.className="hc-field__error",i.setAttribute("aria-live","polite"),i.setAttribute("data-hc-server-error-owned",""),i.id=`hc-server-error-${sa+=1}`,e.insertAdjacentElement("afterend",i),Gn(e,i.id)),i.textContent="",n.forEach((a,o)=>{o>0&&i.appendChild(t.createElement("br")),i.appendChild(t.createTextNode(a))}),i.setAttribute("data-hc-server-error",""),e.setAttribute("aria-invalid","true"),e.dataset.hcServerInvalid=""}function zr(e){for(let n of e.querySelectorAll("[data-hc-server-invalid]"))Vr(n)}function Vr(e){delete e.dataset.hcServerInvalid,e.removeAttribute("aria-invalid");let n=we(e);n&&n.removeAttribute("data-invalid");let t=e.ownerDocument,r=(e.getAttribute("aria-describedby")??"").split(/\s+/).filter(Boolean);for(let i of r){let a=t.getElementById(i);!a||!a.hasAttribute("data-hc-server-error")||(a.hasAttribute("data-hc-server-error-owned")?(Ur(e,i),a.remove()):(a.textContent="",a.removeAttribute("data-hc-server-error")))}}function Hr(e,n){if(e.dataset.distributed!=null)return;let t=ia(e,n);if(!t){e.dataset.distributed="none";return}zr(t);let r=e.querySelectorAll(".hc-alert__error[data-field]"),i=new Map,a=0,o=0;for(let s of r){o+=1;let c=oa(t,s.getAttribute("data-field"));c&&(i.has(c)||i.set(c,[]),i.get(c).push(aa(s)),s.setAttribute("data-distributed","true"),a+=1)}for(let[s,c]of i)ca(s,c);if(e.dataset.distributed=a===0?"none":a===o?"all":"partial",e.getAttribute("data-focus")!=="none"){let s=i.keys().next().value;try{s?.focus?.()}catch{}}}function Zn(e,n){if(!(!e||typeof e.querySelectorAll!="function")){typeof e.matches=="function"&&e.matches("[data-hc-field-errors]")&&Hr(e,n);for(let t of e.querySelectorAll("[data-hc-field-errors]"))Hr(t,n)}}function la(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[At])return e[At];function n(s){Zn(s.target,e)}function t(s){let c=s.target;c?.dataset?.hcServerInvalid!=null&&Vr(c)}function r(s){let c=s.target;c&&typeof c.querySelectorAll=="function"&&zr(c)}e.addEventListener("htmx:afterSwap",n),e.addEventListener("htmx:oobAfterSwap",n),e.addEventListener("input",t),e.addEventListener("change",t),e.addEventListener("submit",r,!0),e.addEventListener("reset",r,!0);let i=new MutationObserver(s=>{for(let c of s)for(let l of c.addedNodes)l.nodeType===1&&Zn(l,e)}),a=e.nodeType===9?e.documentElement:e;i.observe(a,{childList:!0,subtree:!0}),Zn(a,e);let o=()=>{e[At]===o&&(e.removeEventListener("htmx:afterSwap",n),e.removeEventListener("htmx:oobAfterSwap",n),e.removeEventListener("input",t),e.removeEventListener("change",t),e.removeEventListener("submit",r,!0),e.removeEventListener("reset",r,!0),i.disconnect(),delete e[At])};return e[At]=o,o}var wt="__hcCsrfHeaderUninstall",ua="X-CSRF-Token";function fa(e=typeof document<"u"?document:null){if(!e)return()=>{};if(e[wt])return e[wt];function n(r){let i=r?.detail?.headers;if(!i||typeof i!="object")return;let o=(e.nodeType===9?e:e.ownerDocument).querySelector('meta[name="csrf-token"]'),s=o?.getAttribute("content");if(!s)return;let c=o.getAttribute("data-header")||ua;c in i||(i[c]=s)}e.addEventListener("htmx:configRequest",n);let t=()=>{e[wt]===t&&(e.removeEventListener("htmx:configRequest",n),delete e[wt])};return e[wt]=t,t}var Et="__hcChartUninstall";function da(e){return e&&e.plot?e.plot:typeof globalThis<"u"&&globalThis.Plot?globalThis.Plot:null}function ha(e){let n=(e.getAttribute("data-hc-chart")||"bar").toLowerCase();return n==="line"||n==="area"?n:"bar"}function pa(e,n){let t=(e.getAttribute("data-mark")||"").toLowerCase();return t==="bar"||t==="line"||t==="area"?t:n}function Wr(e){let n=String(e).replace(/[^0-9.+-]/g,"");if(n===""||n==="+"||n==="-"||n===".")return null;let t=Number.parseFloat(n);return Number.isFinite(t)?t:null}function ma(e,n){let t=String(e).trim();if(n==="number")return Wr(t);if(n==="date"){let r=new Date(t);return Number.isNaN(r.getTime())?t:r}return t}function ba(e,n){let t=n.tHead&&n.tHead.rows[0],r=n.tBodies&&n.tBodies[0];if(!t||!r)return null;let i=(e.getAttribute("data-x-type")||"category").toLowerCase(),a=ha(e),o=[...t.cells],s=(o[0]?o[0].textContent:"").trim(),c=o.slice(1).map(f=>({name:f.textContent.trim(),mark:pa(f,a)}));if(!c.length)return null;let l=[];for(let f of r.rows){let m=[...f.cells];if(!m.length)continue;let h=ma(m[0].textContent,i);c.forEach((A,b)=>{let S=m[b+1];S&&l.push({x:h,series:A.name,mark:A.mark,value:Wr(S.textContent)})})}return l.length?{xName:s,xType:i,series:c,rows:l}:null}function va(e,n){let t=s=>n.filter(c=>c.mark===s&&c.value!=null),r=[e.ruleY([0])],i=t("area");i.length&&(r.push(e.areaY(i,{x:"x",y:"value",z:"series",fill:"series",fillOpacity:.2,curve:"monotone-x"})),r.push(e.lineY(i,{x:"x",y:"value",z:"series",stroke:"series",curve:"monotone-x"})));let a=t("bar");a.length&&r.push(e.barY(a,{x:"x",y:"value",fill:"series"}));let o=t("line");return o.length&&(r.push(e.lineY(o,{x:"x",y:"value",z:"series",stroke:"series",curve:"monotone-x"})),r.push(e.dot(o,{x:"x",y:"value",z:"series",fill:"series",r:2.5}))),r}function Qn(e,n=16){let t=String(e||"").trim().match(/^(-?[\d.]+)(px|rem|em)?$/);if(!t)return null;let r=Number.parseFloat(t[1]);return Number.isFinite(r)?t[2]==="rem"||t[2]==="em"?r*n:r:null}function ga(e){if(typeof getComputedStyle!="function")return null;let n=getComputedStyle(e),t=[];for(let r=1;r<=6;r+=1){let i=n.getPropertyValue(`--hc-chart-series-${r}`).trim();i&&t.push(i)}return t.length?t:null}function ya(e){if(e==="date")return"utc";if(e==="number")return"linear"}function Aa(e,n,t){if(n.has(e))return;let r=da(t);if(!r)return;let i=e.querySelector("table");if(!i)return;let a=ba(e,i);if(!a)return;let o=typeof getComputedStyle=="function"?getComputedStyle(e):null,s=Qn(e.getAttribute("data-width"))||e.clientWidth||640,c=Qn(e.getAttribute("data-height"))||o&&Qn(o.getPropertyValue("--hc-chart-height"))||320,l=new Set(a.rows.map(S=>S.series)).size,f=e.getAttribute("data-legend")!=="false"&&l>1,m=ga(e),h=e.getAttribute("data-title")||(i.caption?i.caption.textContent.trim():void 0),A=a.xType==="category"?[...new Set(a.rows.map(S=>S.x))]:void 0,b=r.plot({width:s,height:c,className:"hc-chart__plot",style:{background:"transparent",color:"inherit",fontFamily:"inherit"},title:h||void 0,x:{label:a.xName||void 0,type:ya(a.xType),domain:A},y:{label:e.getAttribute("data-y-label")||void 0,grid:!0},color:m?{range:m,legend:f}:{legend:f},marks:va(r,a.rows)});b.classList.add("hc-chart__plot"),b.setAttribute("aria-hidden","true"),i.classList.add("hc-sr-only"),e.appendChild(b),e.setAttribute("data-state","rendered"),n.add(e)}function wa(e=typeof document<"u"?document:null,n={}){if(!e)return()=>{};if(e[Et])return e[Et];let t=new WeakSet,r=s=>{(s&&s.querySelectorAll?s.querySelectorAll("[data-hc-chart]"):[]).forEach(l=>Aa(l,t,n))};r(e);let i=e.body||e,a=s=>{let c=s&&s.target;c&&c.querySelectorAll&&r(c)};i.addEventListener("htmx:load",a);let o=()=>{e[Et]===o&&(i.removeEventListener("htmx:load",a),delete e[Et])};return e[Et]=o,o}var qs="0.1.2";export{Pe as DEFAULT_MESSAGES,Gr as getMessages,Zt as hasMessage,So as installAvatar,Po as installCalendar,vo as installCarousel,wa as installChart,ai as installCloseDialog,si as installClosePopover,Vi as installCombobox,Oo as installCommand,Zr as installConfirm,To as installContextMenu,fa as installCsrfHeader,jo as installDatagrid,ao as installDrawer,la as installFieldErrors,fo as installHovercard,Ro as installInputOtp,Li as installMenu,Si as installMenubar,ro as installMulticombobox,Ti as installNavmenu,_o as installPasswordToggle,Ri as installPopover,ci as installRemoteDialog,Ho as installShell,Fi as installSlider,Bo as installSplitter,di as installTabs,na as installThemeToggle,oi as installToast,bo as installToggleGroup,Ao as installToolbar,Pi as installTooltip,Zo as installValidation,jr as resetMessages,Xr as setMessages,qs as version};
|