@solid-design-system/components 2.4.3 → 2.4.4
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/components/es/input.js +1 -1
- package/dist/components/es/select.js +3 -3
- package/dist/components/umd/solid-components.js +2 -2
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/input/input.js +1 -1
- package/dist/package/components/select/select.js +2 -2
- package/dist/versioned-components/es/accordion-group.js +1 -1
- package/dist/versioned-components/es/accordion.js +1 -1
- package/dist/versioned-components/es/badge.js +1 -1
- package/dist/versioned-components/es/brandshape.js +1 -1
- package/dist/versioned-components/es/button.js +1 -1
- package/dist/versioned-components/es/carousel-item.js +1 -1
- package/dist/versioned-components/es/carousel.js +3 -3
- package/dist/versioned-components/es/checkbox-group.js +1 -1
- package/dist/versioned-components/es/checkbox.js +1 -1
- package/dist/versioned-components/es/dialog.js +1 -1
- package/dist/versioned-components/es/divider.js +1 -1
- package/dist/versioned-components/es/drawer.js +1 -1
- package/dist/versioned-components/es/dropdown.js +1 -1
- package/dist/versioned-components/es/form.js +1 -1
- package/dist/versioned-components/es/header.js +1 -1
- package/dist/versioned-components/es/icon.js +1 -1
- package/dist/versioned-components/es/include.js +1 -1
- package/dist/versioned-components/es/input.js +1 -1
- package/dist/versioned-components/es/link.js +1 -1
- package/dist/versioned-components/es/navigation-item.js +1 -1
- package/dist/versioned-components/es/notification.js +1 -1
- package/dist/versioned-components/es/option.js +1 -1
- package/dist/versioned-components/es/popup.js +1 -1
- package/dist/versioned-components/es/radio-button.js +1 -1
- package/dist/versioned-components/es/radio-group.js +1 -1
- package/dist/versioned-components/es/radio.js +1 -1
- package/dist/versioned-components/es/select.js +3 -3
- package/dist/versioned-components/es/spinner.js +1 -1
- package/dist/versioned-components/es/switch.js +1 -1
- package/dist/versioned-components/es/tag.js +1 -1
- package/dist/versioned-components/es/teaser-media.js +1 -1
- package/dist/versioned-components/es/teaser.js +1 -1
- package/dist/versioned-components/es/textarea.js +1 -1
- package/dist/versioned-components/es/tooltip.js +2 -2
- package/dist/versioned-components/es/video.js +1 -1
- package/dist/versioned-package/_components/button-group/button-group.d.ts +1 -1
- package/dist/versioned-package/_components/button-group/button-group.js +11 -11
- package/dist/versioned-package/components/accordion/accordion.d.ts +1 -1
- package/dist/versioned-package/components/accordion/accordion.js +2 -2
- package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist/versioned-package/components/accordion-group/accordion-group.js +3 -3
- package/dist/versioned-package/components/badge/badge.d.ts +1 -1
- package/dist/versioned-package/components/badge/badge.js +1 -1
- package/dist/versioned-package/components/brandshape/brandshape.d.ts +1 -1
- package/dist/versioned-package/components/brandshape/brandshape.js +1 -1
- package/dist/versioned-package/components/button/button.d.ts +1 -1
- package/dist/versioned-package/components/button/button.js +4 -4
- package/dist/versioned-package/components/carousel/carousel.d.ts +1 -1
- package/dist/versioned-package/components/carousel/carousel.js +6 -6
- package/dist/versioned-package/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist/versioned-package/components/carousel-item/carousel-item.js +1 -1
- package/dist/versioned-package/components/checkbox/checkbox.d.ts +1 -1
- package/dist/versioned-package/components/checkbox/checkbox.js +4 -4
- package/dist/versioned-package/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist/versioned-package/components/checkbox-group/checkbox-group.js +5 -5
- package/dist/versioned-package/components/dialog/dialog.d.ts +1 -1
- package/dist/versioned-package/components/dialog/dialog.js +2 -2
- package/dist/versioned-package/components/divider/divider.d.ts +1 -1
- package/dist/versioned-package/components/divider/divider.js +2 -2
- package/dist/versioned-package/components/drawer/drawer.d.ts +1 -1
- package/dist/versioned-package/components/drawer/drawer.js +2 -2
- package/dist/versioned-package/components/dropdown/dropdown.d.ts +1 -1
- package/dist/versioned-package/components/dropdown/dropdown.js +8 -8
- package/dist/versioned-package/components/header/header.d.ts +1 -1
- package/dist/versioned-package/components/header/header.js +4 -4
- package/dist/versioned-package/components/icon/icon.d.ts +1 -1
- package/dist/versioned-package/components/icon/icon.js +1 -1
- package/dist/versioned-package/components/include/include.d.ts +1 -1
- package/dist/versioned-package/components/include/include.js +1 -1
- package/dist/versioned-package/components/input/input.d.ts +1 -1
- package/dist/versioned-package/components/input/input.js +4 -4
- package/dist/versioned-package/components/link/link.d.ts +1 -1
- package/dist/versioned-package/components/link/link.js +2 -2
- package/dist/versioned-package/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist/versioned-package/components/navigation-item/navigation-item.js +3 -3
- package/dist/versioned-package/components/notification/notification.d.ts +1 -1
- package/dist/versioned-package/components/notification/notification.js +5 -5
- package/dist/versioned-package/components/option/option.d.ts +1 -1
- package/dist/versioned-package/components/option/option.js +2 -2
- package/dist/versioned-package/components/popup/popup.d.ts +1 -1
- package/dist/versioned-package/components/popup/popup.js +1 -1
- package/dist/versioned-package/components/radio/radio.d.ts +1 -1
- package/dist/versioned-package/components/radio/radio.js +2 -2
- package/dist/versioned-package/components/radio-button/radio-button.d.ts +1 -1
- package/dist/versioned-package/components/radio-button/radio-button.js +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.d.ts +2 -2
- package/dist/versioned-package/components/radio-group/radio-group.js +15 -15
- package/dist/versioned-package/components/select/select.d.ts +4 -4
- package/dist/versioned-package/components/select/select.js +29 -29
- package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
- package/dist/versioned-package/components/spinner/spinner.js +1 -1
- package/dist/versioned-package/components/switch/switch.d.ts +1 -1
- package/dist/versioned-package/components/switch/switch.js +2 -2
- package/dist/versioned-package/components/tag/tag.d.ts +1 -1
- package/dist/versioned-package/components/tag/tag.js +2 -2
- package/dist/versioned-package/components/teaser/teaser.js +1 -1
- package/dist/versioned-package/components/teaser-media/teaser-media.js +1 -1
- package/dist/versioned-package/components/textarea/textarea.d.ts +1 -1
- package/dist/versioned-package/components/textarea/textarea.js +3 -3
- package/dist/versioned-package/components/tooltip/tooltip.d.ts +1 -1
- package/dist/versioned-package/components/tooltip/tooltip.js +5 -5
- package/dist/versioned-package/components/video/video.d.ts +1 -1
- package/dist/versioned-package/components/video/video.js +2 -2
- package/dist/versioned-package/internal/form.js +3 -3
- package/dist/versioned-package/styles/headline/headline.css.js +1 -1
- package/dist/versioned-styles/solid-styles.css +1 -1
- package/dist/vscode.html-custom-data.json +34 -34
- package/dist/web-types.json +35 -35
- package/package.json +1 -1
|
@@ -91,13 +91,13 @@ let Et=class extends Z{constructor(){super(...arguments),this.renderOptions={hos
|
|
|
91
91
|
* @license
|
|
92
92
|
* Copyright 2020 Google LLC
|
|
93
93
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
94
|
-
*/})(t),e}});var Vi=Object.defineProperty,Ii=Object.getOwnPropertyDescriptor,ji=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ii(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Vi(e,i,s),s};let Fi=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.title="",this.name="",this.size="lg",this.disabled=!1,this.checked=!1,this.indeterminate=!1,this.defaultChecked=!1,this.form="",this.required=!1,this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return ut`<label part="base" class="${xe("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed",{sm:"text-sm",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ni(this.value)}" .indeterminate="${Bi(this.indeterminate)}" .checked="${Bi(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${xe("relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4\n peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\n peer-focus-visible:outline-primary",{sm:"mt-[2px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}">${this.checked?ut`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-icon>`:""} ${!this.checked&&this.indeterminate?ut`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${xe("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};Fi.styles=[oe.styles,A`:host{display:block}:host(:focus-visible){outline-width:0}:host([required]) #label::after{content:' *'}`],ji([Vt('input[type="checkbox"]')],Fi.prototype,"input",2),ji([Vt("#invalid-message")],Fi.prototype,"invalidMessage",2),ji([Dt()],Fi.prototype,"title",2),ji([Dt()],Fi.prototype,"name",2),ji([Dt()],Fi.prototype,"value",2),ji([Dt({reflect:!0})],Fi.prototype,"size",2),ji([Dt({type:Boolean,reflect:!0})],Fi.prototype,"disabled",2),ji([Dt({type:Boolean,reflect:!0})],Fi.prototype,"checked",2),ji([Dt({type:Boolean,reflect:!0})],Fi.prototype,"indeterminate",2),ji([Di("checked")],Fi.prototype,"defaultChecked",2),ji([Dt({reflect:!0})],Fi.prototype,"form",2),ji([Dt({type:Boolean,reflect:!0})],Fi.prototype,"required",2),ji([Lt()],Fi.prototype,"showInvalidStyle",2),ji([Gt("disabled",{waitUntilFirstUpdate:!0})],Fi.prototype,"handleDisabledChange",1),ji([Gt(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],Fi.prototype,"handleStateChange",1),Fi=ji([At("sd-checkbox")],Fi);const Ui=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Fi}},Symbol.toStringTag,{value:"Module"})),Ri=new Set;function Hi(t){if(Ri.add(t),!document.body.classList.contains("sd-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${t}px`)}}function Ni(t){Ri.delete(t),0===Ri.size&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function qi(t,e,i="vertical",o="smooth"){const r=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),s=r.top+e.scrollTop,a=r.left+e.scrollLeft,n=e.scrollLeft,l=e.scrollLeft+e.offsetWidth,d=e.scrollTop,h=e.scrollTop+e.offsetHeight;("horizontal"===i||"both"===i)&&(a<n?e.scrollTo({left:a,behavior:o}):a+t.clientWidth>l&&e.scrollTo({left:a-e.offsetWidth+t.clientWidth,behavior:o})),("vertical"===i||"both"===i)&&(s<d?e.scrollTo({top:s,behavior:o}):s+t.clientHeight>h&&e.scrollTo({top:s-e.offsetHeight+t.clientHeight,behavior:o}))}function Ki(t){const e=t.tagName.toLowerCase();return!("-1"===t.getAttribute("tabindex")||t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")||"input"===e&&"radio"===t.getAttribute("type")&&!t.hasAttribute("checked")||null===t.offsetParent||"hidden"===window.getComputedStyle(t).visibility)&&(!!(("audio"===e||"video"===e)&&t.hasAttribute("controls")||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(e))}function Zi(t){const e=[];return function t(i){i instanceof HTMLElement&&(e.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&t(i.shadowRoot)),[...i.children].forEach((e=>t(e)))}(t),{start:e.find((t=>Ki(t)))??null,end:e.reverse().find((t=>Ki(t)))??null}}let Wi=[];class Yi{constructor(t){this.tabDirection="forward",this.element=t,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Wi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Wi=Wi.filter((t=>t!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Wi[Wi.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:t,end:e}=Zi(this.element),i="forward"===this.tabDirection?t:e;"function"==typeof(null==i?void 0:i.focus)&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(t){"Tab"===t.key&&t.shiftKey&&(this.tabDirection="backward",requestAnimationFrame((()=>this.checkFocus())))}handleKeyUp(){this.tabDirection="forward"}}var Xi=Object.defineProperty,Gi=Object.getOwnPropertyDescriptor,Ji=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Gi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Xi(e,i,s),s};let Qi=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"footer"),this.localize=new C(this),this.open=!1,this.headline="",this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Yi(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Hi(this))}disconnectedCallback(){super.disconnectedCallback(),Ni(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=fe(this,"dialog.denyClose",{dir:this.localize.dir()});he(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Hi(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([ue(this.dialog),ue(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=fe(this,"dialog.show",{dir:this.localize.dir()}),i=fe(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([he(this.panel,e.keyframes,e.options),he(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([ue(this.dialog),ue(this.overlay)]);const t=fe(this,"dialog.hide",{dir:this.localize.dir()}),e=fe(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([he(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),he(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Ni(this);const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}render(){return ut`<div part="base" class="${xe("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${xe("flex flex-col z-20 bg-white focus:outline-none py-4 sm:py-8 relative gap-6",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?ut`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>`:ut`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":ut`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${xe("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon name="system/close" library="global-resources" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};Qi.styles=[Jt,P(".sd-headline{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));display:flex;font-size:var(--sd-font-size-3xl,2rem);font-weight:700;gap:var(--sd-spacing-4,1rem);line-height:var(--sd-line-height-tight,120%)}@media (min-width:640px){.sd-headline{font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));flex-shrink:0;font-size:3rem}@media (min-width:640px){.sd-headline sd-icon{margin-top:var(--sd-spacing-2,.5rem)}}.sd-headline--size-3xl{font-size:var(--sd-font-size-2xl,1.75rem)}@media (min-width:640px){.sd-headline--size-3xl{font-size:var(--sd-font-size-3xl,2rem)}}.sd-headline--size-3xl sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline--size-3xl sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base,.sd-headline--size-lg,.sd-headline--size-xl{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));gap:var(--sd-spacing-2,.5rem)}.sd-headline--size-base sd-icon,.sd-headline--size-lg sd-icon,.sd-headline--size-xl sd-icon{font-size:2rem}.sd-headline--size-xl{font-size:var(--sd-font-size-xl,1.5rem)}.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}@media (min-width:640px){.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}}.sd-headline--size-base,.sd-headline--size-lg{line-height:var(--sd-line-height-normal,150%)}.sd-headline--size-lg{font-size:var(--sd-font-size-lg,1.25rem)}.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}@media (min-width:640px){.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));font-size:var(--sd-font-size-base,1rem)}.sd-headline--size-base sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}.sd-headline--size-base mark{color:inherit}.sd-headline--inverted,.sd-headline--inverted sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.sd-headline--inline{display:inline}.sd-headline--inline sd-icon{margin-right:var(--sd-spacing-2,.5rem);margin-top:calc(var(--sd-spacing-1, .25rem)*-1);vertical-align:middle}.sd-headline--inline.sd-headline--size-base sd-icon,.sd-headline--inline.sd-headline--size-lg sd-icon,.sd-headline--inline.sd-headline--size-xl sd-icon{margin-right:var(--sd-spacing-0-5,.125rem)}"),oe.styles,A`:host{--width:662px}[part=panel]{width:var(--width);max-height:80vh}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],Ji([Vt('[part="base"]')],Qi.prototype,"dialog",2),Ji([Vt('[part="panel"]')],Qi.prototype,"panel",2),Ji([Vt('[part="overlay"]')],Qi.prototype,"overlay",2),Ji([Dt({type:Boolean,reflect:!0})],Qi.prototype,"open",2),Ji([Dt({reflect:!0})],Qi.prototype,"headline",2),Ji([Dt({attribute:"no-close-button",type:Boolean,reflect:!0})],Qi.prototype,"noCloseButton",2),Ji([Gt("open",{waitUntilFirstUpdate:!0})],Qi.prototype,"handleOpenChange",1),Qi=Ji([At("sd-dialog")],Qi),ye("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ye("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),ye("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),ye("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),ye("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const to=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Qi}},Symbol.toStringTag,{value:"Module"}));var eo=Object.defineProperty,io=Object.getOwnPropertyDescriptor,oo=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?io(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&eo(e,i,s),s};let ro=class extends oe{constructor(){super(...arguments),this.orientation="horizontal",this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return ut`<hr part="main" class="${xe(this.inverted?"border-primary-400":"border-neutral-400","horizontal"===this.orientation?"border-t w-full":" border-l h-full")}">`}};ro.styles=[Jt,oe.styles,A`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],oo([Dt({reflect:!0})],ro.prototype,"orientation",2),oo([Dt({type:Boolean,reflect:!0})],ro.prototype,"inverted",2),ro=oo([At("sd-divider")],ro);const so=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ro}},Symbol.toStringTag,{value:"Module"}));function ao(t){return t.charAt(0).toUpperCase()+t.slice(1)}var no=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,ho=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?lo(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&no(e,i,s),s};let co=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"footer"),this.localize=new C(this),this.modal=new Yi(this),this.open=!1,this.label="",this.placement="end",this.contained=!1,this.noHeader=!1,this.handleDocumentKeyDown=t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),Hi(this)))}disconnectedCallback(){super.disconnectedCallback(),Ni(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=fe(this,"drawer.denyClose",{dir:this.localize.dir()});he(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||(this.modal.activate(),Hi(this));const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([ue(this.drawer),ue(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=fe(this,`drawer.show${ao(this.placement)}`,{dir:this.localize.dir()}),i=fe(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([he(this.panel,e.keyframes,e.options),he(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),Ni(this)),await Promise.all([ue(this.drawer),ue(this.overlay)]);const t=fe(this,`drawer.hide${ao(this.placement)}`,{dir:this.localize.dir()}),e=fe(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([he(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),he(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),Hi(this)),this.open&&this.contained&&(this.modal.deactivate(),Ni(this))}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}render(){return ut`<div part="base" class="${xe("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}"><div part="overlay" class="${xe("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${xe("absolute flex flex-col z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.label}" aria-labelledby="${ni(this.noHeader?void 0:"title")}" tabindex="0">${this.noHeader?"":ut`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon name="close" library="system"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4"><slot></slot></div><footer part="footer" class="${xe(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></div>`}};co.styles=[oe.styles,Jt,A`:host{--width:25rem;display:contents}:host([contained]){z-index:initial}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],ho([Vt("[part=base]")],co.prototype,"drawer",2),ho([Vt("[part=panel]")],co.prototype,"panel",2),ho([Vt("[part=overlay]")],co.prototype,"overlay",2),ho([Dt({type:Boolean,reflect:!0})],co.prototype,"open",2),ho([Dt({attribute:"label",reflect:!0})],co.prototype,"label",2),ho([Dt({reflect:!0})],co.prototype,"placement",2),ho([Dt({type:Boolean,reflect:!0})],co.prototype,"contained",2),ho([Dt({attribute:"no-header",type:Boolean})],co.prototype,"noHeader",2),ho([Gt("open",{waitUntilFirstUpdate:!0})],co.prototype,"handleOpenChange",1),ho([Gt("contained",{waitUntilFirstUpdate:!0})],co.prototype,"handleNoModalChange",1),co=ho([At("sd-drawer")],co),ye("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),ye("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),ye("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),ye("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),ye("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),ye("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),ye("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const po=Object.freeze(Object.defineProperty({__proto__:null,get default(){return co}},Symbol.toStringTag,{value:"Module"})),uo=Math.min,go=Math.max,mo=Math.round,bo=Math.floor,vo=t=>({x:t,y:t}),yo={left:"right",right:"left",bottom:"top",top:"bottom"},fo={start:"end",end:"start"};function wo(t,e,i){return go(t,uo(e,i))}function xo(t,e){return"function"==typeof t?t(e):t}function ko(t){return t.split("-")[0]}function Co(t){return t.split("-")[1]}function $o(t){return"x"===t?"y":"x"}function So(t){return"y"===t?"height":"width"}function _o(t){return["top","bottom"].includes(ko(t))?"y":"x"}function zo(t){return $o(_o(t))}function Oo(t){return t.replace(/start|end/g,(t=>fo[t]))}function Eo(t){return t.replace(/left|right|bottom|top/g,(t=>yo[t]))}function Po(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function Ao(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function To(t,e,i){let{reference:o,floating:r}=t;const s=_o(e),a=zo(e),n=So(a),l=ko(e),d="y"===s,h=o.x+o.width/2-r.width/2,c=o.y+o.height/2-r.height/2,p=o[n]/2-r[n]/2;let u;switch(l){case"top":u={x:h,y:o.y-r.height};break;case"bottom":u={x:h,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:c};break;case"left":u={x:o.x-r.width,y:c};break;default:u={x:o.x,y:o.y}}switch(Co(e)){case"start":u[a]-=p*(i&&d?-1:1);break;case"end":u[a]+=p*(i&&d?-1:1)}return u}async function Mo(t,e){var i;void 0===e&&(e={});const{x:o,y:r,platform:s,rects:a,elements:n,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:c="floating",altBoundary:p=!1,padding:u=0}=xo(e,t),g=Po(u),m=n[p?"floating"===c?"reference":"floating":c],b=Ao(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(m)))||i?m:m.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(n.floating)),boundary:d,rootBoundary:h,strategy:l})),v="floating"===c?{...a.floating,x:o,y:r}:a.reference,y=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n.floating)),f=await(null==s.isElement?void 0:s.isElement(y))&&await(null==s.getScale?void 0:s.getScale(y))||{x:1,y:1},w=Ao(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:l}):v);return{top:(b.top-w.top+g.top)/f.y,bottom:(w.bottom-b.bottom+g.bottom)/f.y,left:(b.left-w.left+g.left)/f.x,right:(w.right-b.right+g.right)/f.x}}const Do=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:o}=e,r=await async function(t,e){const{placement:i,platform:o,elements:r}=t,s=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=ko(i),n=Co(i),l="y"===_o(i),d=["left","top"].includes(a)?-1:1,h=s&&l?-1:1,c=xo(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:g}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return n&&"number"==typeof g&&(u="end"===n?-1*g:g),l?{x:u*h,y:p*d}:{x:p*d,y:u*h}}(e,t);return{x:i+r.x,y:o+r.y,data:r}}}},Lo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:i,rects:o,platform:r,elements:s}=e,{apply:a=(()=>{}),...n}=xo(t,e),l=await Mo(e,n),d=ko(i),h=Co(i),c="y"===_o(i),{width:p,height:u}=o.floating;let g,m;"top"===d||"bottom"===d?(g=d,m=h===(await(null==r.isRTL?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(m=d,g="end"===h?"top":"bottom");const b=u-l[g],v=p-l[m],y=!e.middlewareData.shift;let f=b,w=v;if(c){const t=p-l.left-l.right;w=h||y?uo(v,t):t}else{const t=u-l.top-l.bottom;f=h||y?uo(b,t):t}if(y&&!h){const t=go(l.left,0),e=go(l.right,0),i=go(l.top,0),o=go(l.bottom,0);c?w=p-2*(0!==t||0!==e?t+e:go(l.left,l.right)):f=u-2*(0!==i||0!==o?i+o:go(l.top,l.bottom))}await a({...e,availableWidth:w,availableHeight:f});const x=await r.getDimensions(s.floating);return p!==x.width||u!==x.height?{reset:{rects:!0}}:{}}}};function Bo(t){return jo(t)?(t.nodeName||"").toLowerCase():"#document"}function Vo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Io(t){var e;return null==(e=(jo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function jo(t){return t instanceof Node||t instanceof Vo(t).Node}function Fo(t){return t instanceof Element||t instanceof Vo(t).Element}function Uo(t){return t instanceof HTMLElement||t instanceof Vo(t).HTMLElement}function Ro(t){return!(typeof ShadowRoot>"u")&&(t instanceof ShadowRoot||t instanceof Vo(t).ShadowRoot)}function Ho(t){const{overflow:e,overflowX:i,overflowY:o,display:r}=Wo(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(r)}function No(t){return["table","td","th"].includes(Bo(t))}function qo(t){const e=Ko(),i=Wo(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function Ko(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Zo(t){return["html","body","#document"].includes(Bo(t))}function Wo(t){return Vo(t).getComputedStyle(t)}function Yo(t){return Fo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Xo(t){if("html"===Bo(t))return t;const e=t.assignedSlot||t.parentNode||Ro(t)&&t.host||Io(t);return Ro(e)?e.host:e}function Go(t){const e=Xo(t);return Zo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Uo(e)&&Ho(e)?e:Go(e)}function Jo(t,e,i){var o;void 0===e&&(e=[]),void 0===i&&(i=!0);const r=Go(t),s=r===(null==(o=t.ownerDocument)?void 0:o.body),a=Vo(r);return s?e.concat(a,a.visualViewport||[],Ho(r)?r:[],a.frameElement&&i?Jo(a.frameElement):[]):e.concat(r,Jo(r,[],i))}function Qo(t){const e=Wo(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Uo(t),s=r?t.offsetWidth:i,a=r?t.offsetHeight:o,n=mo(i)!==s||mo(o)!==a;return n&&(i=s,o=a),{width:i,height:o,$:n}}function tr(t){return Fo(t)?t:t.contextElement}function er(t){const e=tr(t);if(!Uo(e))return vo(1);const i=e.getBoundingClientRect(),{width:o,height:r,$:s}=Qo(e);let a=(s?mo(i.width):i.width)/o,n=(s?mo(i.height):i.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!n||!Number.isFinite(n))&&(n=1),{x:a,y:n}}const ir=vo(0);function or(t){const e=Vo(t);return Ko()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ir}function rr(t,e,i,o){void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),s=tr(t);let a=vo(1);e&&(o?Fo(o)&&(a=er(o)):a=er(t));const n=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Vo(t))&&e}(s,i,o)?or(s):vo(0);let l=(r.left+n.x)/a.x,d=(r.top+n.y)/a.y,h=r.width/a.x,c=r.height/a.y;if(s){const t=Vo(s),e=o&&Fo(o)?Vo(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=er(i),e=i.getBoundingClientRect(),o=Wo(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,d*=t.y,h*=t.x,c*=t.y,l+=r,d+=s,i=Vo(i).frameElement}}return Ao({width:h,height:c,x:l,y:d})}function sr(t){return rr(Io(t)).left+Yo(t).scrollLeft}function ar(t,e,i){let o;if("viewport"===e)o=function(t,e){const i=Vo(t),o=Io(t),r=i.visualViewport;let s=o.clientWidth,a=o.clientHeight,n=0,l=0;if(r){s=r.width,a=r.height;const t=Ko();(!t||t&&"fixed"===e)&&(n=r.offsetLeft,l=r.offsetTop)}return{width:s,height:a,x:n,y:l}}(t,i);else if("document"===e)o=function(t){const e=Io(t),i=Yo(t),o=t.ownerDocument.body,r=go(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=go(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-i.scrollLeft+sr(t);const n=-i.scrollTop;return"rtl"===Wo(o).direction&&(a+=go(e.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:n}}(Io(t));else if(Fo(e))o=function(t,e){const i=rr(t,!0,"fixed"===e),o=i.top+t.clientTop,r=i.left+t.clientLeft,s=Uo(t)?er(t):vo(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:r*s.x,y:o*s.y}}(e,i);else{const i=or(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return Ao(o)}function nr(t,e){const i=Xo(t);return!(i===e||!Fo(i)||Zo(i))&&("fixed"===Wo(i).position||nr(i,e))}function lr(t,e){const i=e.get(t);if(i)return i;let o=Jo(t,[],!1).filter((t=>Fo(t)&&"body"!==Bo(t))),r=null;const s="fixed"===Wo(t).position;let a=s?Xo(t):t;for(;Fo(a)&&!Zo(a);){const e=Wo(a),i=qo(a);!i&&"fixed"===e.position&&(r=null),(s?!i&&!r:!i&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Ho(a)&&!i&&nr(t,a))?o=o.filter((t=>t!==a)):r=e,a=Xo(a)}return e.set(t,o),o}function dr(t,e,i){const o=Uo(e),r=Io(e),s="fixed"===i,a=rr(t,!0,s,e);let n={scrollLeft:0,scrollTop:0};const l=vo(0);if(o||!o&&!s)if(("body"!==Bo(e)||Ho(r))&&(n=Yo(e)),o){const t=rr(e,!0,s,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=sr(r));return{x:a.left+n.scrollLeft-l.x,y:a.top+n.scrollTop-l.y,width:a.width,height:a.height}}function hr(t,e){return Uo(t)&&"fixed"!==Wo(t).position?e?e(t):t.offsetParent:null}function cr(t,e){const i=Vo(t);if(!Uo(t))return i;let o=hr(t,e);for(;o&&No(o)&&"static"===Wo(o).position;)o=hr(o,e);return o&&("html"===Bo(o)||"body"===Bo(o)&&"static"===Wo(o).position&&!qo(o))?i:o||function(t){let e=Xo(t);for(;Uo(e)&&!Zo(e);){if(qo(e))return e;e=Xo(e)}return null}(t)||i}const pr={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:o}=t;const r=Uo(i),s=Io(i);if(i===s)return e;let a={scrollLeft:0,scrollTop:0},n=vo(1);const l=vo(0);if((r||!r&&"fixed"!==o)&&(("body"!==Bo(i)||Ho(s))&&(a=Yo(i)),Uo(i))){const t=rr(i);n=er(i),l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{width:e.width*n.x,height:e.height*n.y,x:e.x*n.x-a.scrollLeft*n.x+l.x,y:e.y*n.y-a.scrollTop*n.y+l.y}},getDocumentElement:Io,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:o,strategy:r}=t;const s=[..."clippingAncestors"===i?lr(e,this._c):[].concat(i),o],a=s[0],n=s.reduce(((t,i)=>{const o=ar(e,i,r);return t.top=go(o.top,t.top),t.right=uo(o.right,t.right),t.bottom=uo(o.bottom,t.bottom),t.left=go(o.left,t.left),t}),ar(e,a,r));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:cr,getElementRects:async function(t){let{reference:e,floating:i,strategy:o}=t;const r=this.getOffsetParent||cr,s=this.getDimensions;return{reference:dr(e,await r(i),o),floating:{x:0,y:0,...await s(i)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Qo(t)},getScale:er,isElement:Fo,isRTL:function(t){return"rtl"===Wo(t).direction}};var ur=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,mr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?gr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ur(e,i,s),s};let br=class extends oe{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver((t=>this.handleCurrentPlacementChange(t))),this.mutationObserver.observe(this,{attributes:!0})}handleCurrentPlacementChange(t){return t.forEach((t=>{if("data-current-placement"===t.attributeName){const t=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:t})}}))}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=function(t,e,i,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,d=tr(t),h=r||s?[...d?Jo(d):[],...Jo(e)]:[];h.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:!0}),s&&t.addEventListener("resize",i)}));const c=d&&n?function(t,e){let i,o=null;const r=Io(t);function s(){clearTimeout(i),o&&o.disconnect(),o=null}return function a(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),s();const{left:d,top:h,width:c,height:p}=t.getBoundingClientRect();if(n||e(),!c||!p)return;const u={rootMargin:-bo(h)+"px "+-bo(r.clientWidth-(d+c))+"px "+-bo(r.clientHeight-(h+p))+"px "+-bo(d)+"px",threshold:go(0,uo(1,l))||1};let g=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!g)return a();e?a(!1,e):i=setTimeout((()=>{a(!1,1e-7)}),100)}g=!1}try{o=new IntersectionObserver(m,{...u,root:r.ownerDocument})}catch{o=new IntersectionObserver(m,u)}o.observe(t)}(!0),s}(d,i):null;let p=-1,u=null;a&&(u=new ResizeObserver((t=>{let[o]=t;o&&o.target===d&&u&&(u.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{u&&u.observe(e)}))),i()})),d&&!l&&u.observe(d),u.observe(e));let g,m=l?rr(t):null;return l&&function e(){const o=rr(t);m&&(o.x!==m.x||o.y!==m.y||o.width!==m.width||o.height!==m.height)&&i(),m=o,g=requestAnimationFrame(e)}(),i(),()=>{h.forEach((t=>{r&&t.removeEventListener("scroll",i),s&&t.removeEventListener("resize",i)})),c&&c(),u&&u.disconnect(),u=null,l&&cancelAnimationFrame(g)}}(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[Do({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Lo({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,i="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=i?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:n,platform:l,elements:d}=e,{mainAxis:h=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=xo(t,e);if(null!=(i=s.arrow)&&i.alignmentOffset)return{};const v=ko(r),y=ko(n)===n,f=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=p||(y||!m?[Eo(n)]:function(t){const e=Eo(t);return[Oo(t),e,Oo(e)]}(n));!p&&"none"!==g&&w.push(...function(t,e,i,o){const r=Co(t);let s=function(t,e,i){const o=["left","right"],r=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return i?e?r:o:e?o:r;case"left":case"right":return e?s:a;default:return[]}}(ko(t),"start"===i,o);return r&&(s=s.map((t=>t+"-"+r)),e&&(s=s.concat(s.map(Oo)))),s}(n,m,g,f));const x=[n,...w],k=await Mo(e,b),C=[];let $=(null==(o=s.flip)?void 0:o.overflows)||[];if(h&&C.push(k[v]),c){const t=function(t,e,i){void 0===i&&(i=!1);const o=Co(t),r=zo(t),s=So(r);let a="x"===r?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Eo(a)),[a,Eo(a)]}(r,a,f);C.push(k[t[0]],k[t[1]])}if($=[...$,{placement:r,overflows:C}],!C.every((t=>t<=0))){var S,_;const t=((null==(S=s.flip)?void 0:S.index)||0)+1,e=x[t];if(e)return{data:{index:t,overflows:$},reset:{placement:e}};let i=null==(_=$.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:_.placement;if(!i)switch(u){case"bestFit":{var z;const t=null==(z=$.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:z[0];t&&(i=t);break}case"initialPlacement":i=n}if(r!==i)return{reset:{placement:i}}}return{}}}}({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:o,placement:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:n={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=xo(t,e),d={x:i,y:o},h=await Mo(e,l),c=_o(ko(r)),p=$o(c);let u=d[p],g=d[c];if(s){const t="y"===p?"bottom":"right";u=wo(u+h["y"===p?"top":"left"],u,u-h[t])}if(a){const t="y"===c?"bottom":"right";g=wo(g+h["y"===c?"top":"left"],g,g-h[t])}const m=n.fn({...e,[p]:u,[c]:g});return{...m,data:{x:m.x-i,y:m.y-o}}}}}({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Lo({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push((t=>({name:"arrow",options:t,async fn(e){const{x:i,y:o,placement:r,rects:s,platform:a,elements:n,middlewareData:l}=e,{element:d,padding:h=0}=xo(t,e)||{};if(null==d)return{};const c=Po(h),p={x:i,y:o},u=zo(r),g=So(u),m=await a.getDimensions(d),b="y"===u,v=b?"top":"left",y=b?"bottom":"right",f=b?"clientHeight":"clientWidth",w=s.reference[g]+s.reference[u]-p[u]-s.floating[g],x=p[u]-s.reference[u],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(d));let C=k?k[f]:0;(!C||!await(null==a.isElement?void 0:a.isElement(k)))&&(C=n.floating[f]||s.floating[g]);const $=w/2-x/2,S=C/2-m[g]/2-1,_=uo(c[v],S),z=uo(c[y],S),O=_,E=C-m[g]-z,P=C/2-m[g]/2+$,A=wo(O,P,E),T=!l.arrow&&null!=Co(r)&&P!=A&&s.reference[g]/2-(P<O?_:z)-m[g]/2<0,M=T?P<O?P-O:P-E:0;return{[u]:p[u]+M,data:{[u]:A,centerOffset:P-A-M,...T&&{alignmentOffset:M}},reset:T}}}))({element:this.arrowEl,padding:this.arrowPadding})),((t,e,i)=>{const o=new Map,r={platform:pr,...i},s={...r.platform,_c:o};return(async(t,e,i)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=i,n=s.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let d=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:c}=To(d,o,l),p=o,u={},g=0;for(let i=0;i<n.length;i++){const{name:s,fn:m}=n[i],{x:b,y:v,data:y,reset:f}=await m({x:h,y:c,initialPlacement:o,placement:p,strategy:r,middlewareData:u,rects:d,platform:a,elements:{reference:t,floating:e}});h=b??h,c=v??c,u={...u,[s]:{...u[s],...y}},f&&g<=50&&(g++,"object"==typeof f&&(f.placement&&(p=f.placement),f.rects&&(d=!0===f.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):f.rects),({x:h,y:c}=To(d,p,l))),i=-1)}return{x:h,y:c,placement:p,strategy:r,middlewareData:u}})(t,e,{...r,platform:s})})(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then((({x:t,y:e,middlewareData:i,placement:o})=>{const r="rtl"===getComputedStyle(this).direction,s={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=i.arrow.x,e=i.arrow.y;let o="",a="",n="",l="";if("start"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",a=r?i:"",l=r?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";a=r?"":i,l=r?i:"",n="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",o="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",o="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:o,right:a,bottom:n,left:l,[s]:"calc(var(--arrow-size-diagonal) * -1)"})}})),this.emit("sd-reposition")}render(){return ut`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${xe("isolate","fixed"!==this.strategy?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?ut`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};br.styles=[oe.styles,Jt,A`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],mr([Vt('[part="popup"]')],br.prototype,"popup",2),mr([Vt('[part="arrow"]')],br.prototype,"arrowEl",2),mr([Dt()],br.prototype,"anchor",2),mr([Dt({type:Boolean,reflect:!0})],br.prototype,"active",2),mr([Dt({reflect:!0})],br.prototype,"placement",2),mr([Dt({reflect:!0})],br.prototype,"strategy",2),mr([Dt({type:Number})],br.prototype,"distance",2),mr([Dt({type:Number})],br.prototype,"skidding",2),mr([Dt({type:Boolean})],br.prototype,"arrow",2),mr([Dt({attribute:"arrow-placement"})],br.prototype,"arrowPlacement",2),mr([Dt({attribute:"arrow-padding",type:Number})],br.prototype,"arrowPadding",2),mr([Dt({type:Boolean})],br.prototype,"flip",2),mr([Dt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],br.prototype,"flipFallbackPlacements",2),mr([Dt({attribute:"flip-fallback-strategy"})],br.prototype,"flipFallbackStrategy",2),mr([Dt({type:Object})],br.prototype,"flipBoundary",2),mr([Dt({attribute:"flip-padding",type:Number})],br.prototype,"flipPadding",2),mr([Dt({type:Boolean})],br.prototype,"shift",2),mr([Dt({type:Object})],br.prototype,"shiftBoundary",2),mr([Dt({attribute:"shift-padding",type:Number})],br.prototype,"shiftPadding",2),mr([Dt({attribute:"auto-size"})],br.prototype,"autoSize",2),mr([Dt()],br.prototype,"sync",2),mr([Dt({type:Object})],br.prototype,"autoSizeBoundary",2),mr([Dt({attribute:"auto-size-padding",type:Number})],br.prototype,"autoSizePadding",2),br=mr([At("sd-popup")],br);const vr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return br}},Symbol.toStringTag,{value:"Module"}));var yr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,wr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?fr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&yr(e,i,s),s};let xr=class extends oe{constructor(){super(...arguments),this.localize=new C(this),this.open=!1,this.rounded=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.skidding=0,this.noAutoSize=!1,this.noFlip=!1,this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(null==t?void 0:t.focus)&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"sd-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){var e;if("Tab"===t.key){if(this.open&&"sd-menu-item"===(null==(e=document.activeElement)?void 0:e.tagName.toLowerCase()))return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{var t,e,i,o,r,s,a,n,l,d,h,c;const p=(null==(r=null==(o=null==(i=null==(e=null==(t=document.activeElement)?void 0:t.shadowRoot)?void 0:e.activeElement)?void 0:i.shadowRoot)?void 0:o.activeElement)?void 0:r.getRootNode())instanceof ShadowRoot?null==(l=null==(n=null==(a=null==(s=document.activeElement)?void 0:s.shadowRoot)?void 0:a.activeElement)?void 0:n.shadowRoot)?void 0:l.activeElement:(null==(d=this.containingElement)?void 0:d.getRootNode())instanceof ShadowRoot?null==(c=null==(h=document.activeElement)?void 0:h.shadowRoot)?void 0:c.activeElement:document.activeElement;(!this.containingElement||(null==p?void 0:p.closest(this.containingElement.tagName.toLowerCase()))!==this.containingElement)&&this.hide()}))}}handleDocumentMouseDown(t){const e=t.composedPath();this.containingElement&&!e.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(t){qi(t.target,this.panel)}handlePanelSelect(t){const e=t.target;!this.stayOpenOnSelect&&"sd-menu"===e.tagName.toLowerCase()&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if([" ","Enter"].includes(t.key))return t.preventDefault(),void this.handleTriggerClick();const e=this.getMenu();if(e){const i=e.defaultSlot.assignedElements({flatten:!0}),o=i[0],r=i[i.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),i.length>0&&requestAnimationFrame((()=>{("ArrowDown"===t.key||"Home"===t.key)&&(e.setCurrentItem(o),o.focus()),("ArrowUp"===t.key||"End"===t.key)&&(e.setCurrentItem(r),r.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>Zi(t).start));let e;if(t){switch(t.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":e=t.button;break;default:e=t}e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await ue(this),this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:e}=fe(this,"dropdown.show",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await ue(this);const{keyframes:t,options:e}=fe(this,"dropdown.hide",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return ut`<sd-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${xe("shadow bg-white",this.open?"block pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};xr.styles=[oe.styles,Jt,A`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`],wr([Vt("#dropdown")],xr.prototype,"popup",2),wr([Vt("[part=trigger]")],xr.prototype,"trigger",2),wr([Vt("[part=panel]")],xr.prototype,"panel",2),wr([Dt({type:Boolean,reflect:!0})],xr.prototype,"open",2),wr([Dt({type:Boolean,reflect:!0})],xr.prototype,"rounded",2),wr([Dt({reflect:!0})],xr.prototype,"placement",2),wr([Dt({type:Boolean,reflect:!0})],xr.prototype,"disabled",2),wr([Dt({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],xr.prototype,"stayOpenOnSelect",2),wr([Dt({attribute:!1})],xr.prototype,"containingElement",2),wr([Dt({type:Number})],xr.prototype,"distance",2),wr([Dt({type:Number})],xr.prototype,"skidding",2),wr([Dt({type:Boolean,reflect:!0,attribute:"no-auto-size"})],xr.prototype,"noAutoSize",2),wr([Dt({type:Boolean,reflect:!0,attribute:"no-flip"})],xr.prototype,"noFlip",2),wr([Dt({type:Boolean})],xr.prototype,"hoist",2),wr([Gt("open",{waitUntilFirstUpdate:!0})],xr.prototype,"handleOpenChange",1),xr=wr([At("sd-dropdown")],xr),ye("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),ye("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const kr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return xr}},Symbol.toStringTag,{value:"Module"}));var Cr=Object.defineProperty,$r=Object.getOwnPropertyDescriptor,Sr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?$r(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Cr(e,i,s),s};let _r=class extends oe{constructor(){super(...arguments),this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var t;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),null==(t=this.resizeObserver)||t.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(t){super.updated(t),t.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver((()=>{this.onResize()})),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return ut`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(t){t.target.assignedElements().length>0&&(this.refHeaderElement=t.currentTarget,this.setCalculatedHeightProperty())}};_r.styles=[oe.styles,Jt,A`:host{display:block}:host([fixed]){position:fixed;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header::after{content:'';position:absolute;left:var(--sd-spacing-0,0);right:var(--sd-spacing-0,0);top:100%;height:var(--sd-spacing-2,.5rem);background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}`],Sr([Dt({reflect:!0,type:Boolean})],_r.prototype,"fixed",2),Sr([yi(100)],_r.prototype,"onResize",1),_r=Sr([At("sd-header")],_r);const zr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return _r}},Symbol.toStringTag,{value:"Module"}));var Or=Object.defineProperty,Er=Object.getOwnPropertyDescriptor,Pr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Er(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Or(e,i,s),s};let Ar=class extends oe{constructor(){super(...arguments),this.mode="cors",this.allowScripts=!1}executeScript(t){const e=document.createElement("script");[...t.attributes].forEach((t=>e.setAttribute(t.name,t.value))),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{const t=this.src,e=await Ft(t,this.mode);if(t!==this.src)return;if(!e.ok)return void this.emit("sd-error",{detail:{status:e.status}});this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach((t=>this.executeScript(t))),this.emit("sd-load")}catch{this.emit("sd-error",{detail:{status:-1}})}}render(){return ut`<slot></slot>`}};Ar.styles=[Jt,A`:host{display:block}`],Pr([Dt()],Ar.prototype,"src",2),Pr([Dt()],Ar.prototype,"mode",2),Pr([Dt({attribute:"allow-scripts",type:Boolean})],Ar.prototype,"allowScripts",2),Pr([Gt("src")],Ar.prototype,"handleSrcChange",1),Ar=Pr([At("sd-include")],Ar);const Tr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ar}},Symbol.toStringTag,{value:"Module"}));var Mr=Object.defineProperty,Dr=Object.getOwnPropertyDescriptor,Lr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Dr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Mr(e,i,s),s};const Br=!(null==(i=navigator.userAgentData)?void 0:i.brands.some((t=>t.brand.includes("Chromium"))))&&navigator.userAgent.includes("Firefox");let Vr=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this),this.hasSlotController=new ei(this,"help-text","label","left","right","message","placeholder"),this.localize=new C(this),this.hasFocus=!1,this.showValidStyle=!1,this.showInvalidStyle=!1,this.type="text",this.size="lg",this.value="",this.defaultValue="",this.placeholder="",this.label="",this.helpText="",this.clearable=!1,this.disabled=!1,this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.name="",this.title="",this.required=!1,this.styleOnValid=!1,this.spellcheck=!0}get valueAsDate(){var t;return(null==(t=this.input)?void 0:t.valueAsDate)??null}set valueAsDate(t){const e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t;return(null==(t=this.input)?void 0:t.valueAsNumber)??parseFloat(this.value)}set valueAsNumber(t){const e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(t){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleKeyDown(t){const e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;"Enter"===t.key&&!e&&setTimeout((()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,i="none"){this.input.setSelectionRange(t,e,i)}setRangeText(t,e,i,o){this.input.setRangeText(t,e,i,o),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var t;return null==(t=this.input)?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=this.hasSlotController.test("help-text"),i=(this.hasSlotController.test("description"),this.hasSlotController.test("left")),o=this.hasSlotController.test("right"),r=!!this.label||!!t,s=!!this.helpText||!!e,a=this.clearable&&!this.readonly&&("number"==typeof this.value||this.value.length>0),n=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",l="sm"===this.size?"text-sm":"text-base",d={disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[n],h={disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n],c=this.disabled?"text-neutral-500":"text-primary",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],u={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return ut`<div part="form-control" class="${xe(this.disabled&&"pointer-events-none")}"><label part="form-control-label" id="label" class="${xe("mb-2",r?"inline-block":"hidden",l)}" for="input" aria-hidden="${r?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full"><div part="border" class="${xe("absolute w-full h-full pointer-events-none border rounded-default",h)}"></div><div part="base" class="${xe("px-4 flex flex-row items-center rounded-default transition-all bg-white","lg"===this.size?"py-2":"py-1",this.disabled||this.readonly?"":"hover:bg-neutral-200",this.readonly&&"bg-neutral-100",d)}">${i?ut`<slot name="left" part="left" class="${xe("inline-flex","sm"===this.size?"mr-1":"mr-2",c,u)}"></slot>`:""} <input part="input" id="input" class="${xe("min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700","sm"===this.size?"h-6":"h-8",l)}" type="${"password"===this.type&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${ni(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ni(this.placeholder)}" minlength="${ni(this.minlength)}" maxlength="${ni(this.maxlength)}" min="${ni(this.min)}" max="${ni(this.max)}" step="${ni(this.step)}" .value="${Bi(this.value)}" autocapitalize="${ni("password"===this.type?"off":this.autocapitalize)}" autocomplete="${ni("password"===this.type?"off":this.autocomplete)}" autocorrect="${ni("password"===this.type?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${ni(this.pattern)}" enterkeyhint="${ni(this.enterkeyhint)}" inputmode="${ni(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${a?ut`<button part="clear-button" class="${xe("flex justify-center ",p)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${xe("text-neutral-500",u)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&"password"===this.type?ut`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?ut`<slot name="show-password-icon"><sd-icon class="${xe(c,p,u)}" library="system" name="eye"></sd-icon></slot>`:ut`<slot name="hide-password-icon"><sd-icon class="${xe(c,p,u)}" library="system" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${"date"!==this.type&&"datetime-local"!==this.type||Br?"":ut`<sd-icon class="${xe(c,p,u)}" library="system" name="calendar"></sd-icon>`} ${"time"===this.type?ut`<sd-icon class="${xe(c,p,u)}" library="system" name="clock"></sd-icon>`:""} ${this.showInvalidStyle?ut`<sd-icon part="invalid-icon" class="${xe("text-error",p,u)}" library="system" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?ut`<sd-icon class="${xe("text-success",p,u)}" library="system" name="confirm" part="valid-icon"></sd-icon>`:""} ${o?ut`<slot name="right" part="right" class="${xe("inline-flex",c,p,u)}"></slot>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${xe("text-sm text-neutral-700",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};Vr.styles=[Jt,oe.styles,A`:host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) #label::after{content:' *'}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}`],Lr([Vt("#input")],Vr.prototype,"input",2),Lr([Vt("#invalid-message")],Vr.prototype,"invalidMessage",2),Lr([Lt()],Vr.prototype,"hasFocus",2),Lr([Lt()],Vr.prototype,"showValidStyle",2),Lr([Lt()],Vr.prototype,"showInvalidStyle",2),Lr([Dt({reflect:!0})],Vr.prototype,"type",2),Lr([Dt({reflect:!0})],Vr.prototype,"size",2),Lr([Dt()],Vr.prototype,"inputmode",2),Lr([Dt()],Vr.prototype,"value",2),Lr([Di()],Vr.prototype,"defaultValue",2),Lr([Dt()],Vr.prototype,"placeholder",2),Lr([Dt()],Vr.prototype,"label",2),Lr([Dt({attribute:"help-text"})],Vr.prototype,"helpText",2),Lr([Dt({type:Boolean})],Vr.prototype,"clearable",2),Lr([Dt({type:Boolean,reflect:!0})],Vr.prototype,"disabled",2),Lr([Dt({type:Boolean,reflect:!0})],Vr.prototype,"readonly",2),Lr([Dt({attribute:"password-toggle",type:Boolean})],Vr.prototype,"passwordToggle",2),Lr([Dt({attribute:"password-visible",type:Boolean})],Vr.prototype,"passwordVisible",2),Lr([Dt({attribute:"no-spin-buttons",type:Boolean})],Vr.prototype,"noSpinButtons",2),Lr([Dt({type:Number})],Vr.prototype,"minlength",2),Lr([Dt({type:Number})],Vr.prototype,"maxlength",2),Lr([Dt({type:Number})],Vr.prototype,"min",2),Lr([Dt({type:Number})],Vr.prototype,"max",2),Lr([Dt({reflect:!0})],Vr.prototype,"form",2),Lr([Dt()],Vr.prototype,"name",2),Lr([Dt()],Vr.prototype,"title",2),Lr([Dt({type:Boolean,reflect:!0})],Vr.prototype,"required",2),Lr([Dt()],Vr.prototype,"pattern",2),Lr([Dt()],Vr.prototype,"step",2),Lr([Dt()],Vr.prototype,"autocapitalize",2),Lr([Dt()],Vr.prototype,"autocorrect",2),Lr([Dt()],Vr.prototype,"autocomplete",2),Lr([Dt({type:Boolean})],Vr.prototype,"autofocus",2),Lr([Dt()],Vr.prototype,"enterkeyhint",2),Lr([Dt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Vr.prototype,"styleOnValid",2),Lr([Dt({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],Vr.prototype,"spellcheck",2),Lr([Gt("disabled",{waitUntilFirstUpdate:!0})],Vr.prototype,"handleDisabledChange",1),Lr([Gt("step",{waitUntilFirstUpdate:!0})],Vr.prototype,"handleStepChange",1),Lr([Gt("value",{waitUntilFirstUpdate:!0})],Vr.prototype,"handleValueChange",1),Vr=Lr([At("sd-input")],Vr);const Ir=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Vr}},Symbol.toStringTag,{value:"Module"}));var jr=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,Ur=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Fr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&jr(e,i,s),s};let Rr=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"[default]","icon-left","icon-right"),this.size="inherit",this.inverted=!1,this.standalone=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return ut`<a part="base" class="${xe("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${ni(this.href||void 0)}" target="${ni(this.target||void 0)}" download="${ni(this.download||void 0)}" rel="${ni(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${xe("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${xe("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Rr.styles=[oe.styles,A`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],Ur([Vt("a")],Rr.prototype,"button",2),Ur([Dt({reflect:!0})],Rr.prototype,"size",2),Ur([Dt({type:Boolean,reflect:!0})],Rr.prototype,"inverted",2),Ur([Dt({type:Boolean,reflect:!0})],Rr.prototype,"standalone",2),Ur([Dt()],Rr.prototype,"href",2),Ur([Dt()],Rr.prototype,"target",2),Ur([Dt()],Rr.prototype,"download",2),Rr=Ur([At("sd-link")],Rr);const Hr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Rr}},Symbol.toStringTag,{value:"Module"}));var Nr=Object.defineProperty,qr=Object.getOwnPropertyDescriptor,Kr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?qr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Nr(e,i,s),s};let Zr=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"[default]","description","children"),this.href="",this.current=!1,this.disabled=!1,this.size="base",this.vertical=!1,this.chevron=!1,this.indented=!1,this.relaxed=!1,this.divider=!1,this.open=!1}isButton(){return!this.href&&!this.hasSlotController.test("children")}isLink(){return!!this.href}isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}render(){const t=this.isLink(),e=this.isButton(),i=this.isAccordion(),o=(this.hasSlotController.test("[default]"),this.hasSlotController.test("main"),this.hasSlotController.test("description")),r=this.hasSlotController.test("children"),s=t?ri`a`:i?ri`summary`:ri`button`,a=this.vertical?"pb-3":"pb-2",n=ai`<${s} part="base" class="${xe("hover:bg-neutral-200 group transition-all min-h-[48px] cursor-pointer relative focus-visible:focus-outline",{base:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",i?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-[1px]",this.vertical?"px-8":"px-4")}" aria-controls="${ni(i?"navigation-item-details":void 0)}" aria-current="${ni(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${ni(e?this.disabled:void 0)}" href="${ni(this.href||void 0)}" target="${ni(t?this.target:void 0)}" download="${ni(t?this.download:void 0)}" rel="${ni(t&&this.target?"noreferrer noopener":void 0)}" role="${t?"link":"button"}" tabindex="${this.disabled?"-1":"0"}" @click="${i?this.handleClickSummary:e?this.handleClickButton:void 0}"><div part="current-indicator" class="${xe("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-8px)] top-1 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${xe("relative pt-3 inline-flex justify-between items-center",i?"grow":"w-full",o?"pb-1":a,this.calculatePaddingX())}">${this.divider&&this.vertical?ai`<sd-divider part="divider" class="${xe("w-full transition-all absolute -top-[1px] left-0",this.calculatePaddingX())}"></sd-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline"></slot></span>${(this.chevron||r)&&this.vertical?ai`<sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${xe("h-6 w-6 ml-2 transition-all",i?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${o&&this.vertical?ai`<slot name="description" part="description" class="${xe("inline-block text-sm text-left text-black",i?"grow":"w-full",a,this.calculatePaddingX())}"></slot>`:""}</${s}>`;return i?ai`<details part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${n}<slot name="children"></slot></details>`:ai`${n}`}};Zr.styles=[Jt,oe.styles,A`:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],Kr([Dt({reflect:!0})],Zr.prototype,"href",2),Kr([Dt()],Zr.prototype,"target",2),Kr([Dt()],Zr.prototype,"download",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"current",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"disabled",2),Kr([Dt({reflect:!0})],Zr.prototype,"size",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"vertical",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"chevron",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"indented",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"relaxed",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"divider",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"open",2),Zr=Kr([At("sd-navigation-item")],Zr);const Wr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Zr}},Symbol.toStringTag,{value:"Module"}));var Yr=Object.defineProperty,Xr=Object.getOwnPropertyDescriptor,Gr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Xr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Yr(e,i,s),s};const Jr=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--top-right"}),Qr=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--bottom-center"});let ts=class extends oe{constructor(){super(...arguments),this.localize=new C(this),this.open=!1,this.closable=!1,this.variant="info",this.toastStack="top-right",this.duration=1/0,this.durationIndicator=!1,this.remainingDuration=this.duration,this.startTime=Date.now()}firstUpdated(){this.base.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>{this.hide()}),this.remainingDuration))}handleCloseClick(){this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await ue(this.base),this.base.hidden=!1;const{keyframes:t,options:e}=fe(this,"notification.show",{dir:this.localize.dir()});await he(this.base,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await ue(this.base);const{keyframes:t,options:e}=fe(this,"notification.hide",{dir:this.localize.dir()});await he(this.base,t,e),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}async toast(){return new Promise((t=>{const e="bottom-center"===this.toastStack?Qr:Jr;null===e.parentElement&&document.body.append(e),e.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sd-after-hide",(()=>{e.removeChild(this),t(),null===e.querySelector("sd-notification")&&e.remove()}),{once:!0})}))}render(){return ut`<div part="base" class="${xe("w-full overflow-hidden flex items-stretch relative m-2")}" role="alert" id="notification" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}"><slot name="icon" part="icon" class="${xe("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="system" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${xe("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot part="message" class="block w-full pl-3 py-2" aria-live="polite"></slot>${this.closable?ut`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" label="${this.localize.term("close")}" @click="${this.handleCloseClick}"><sd-icon name="close" library="system" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?ut`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${xe("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute bg-neutral-400"></div>`:""}</div>`}};ts.styles=[Jt,oe.styles,A`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],Gr([Vt('[part~="base"]')],ts.prototype,"base",2),Gr([Dt({type:Boolean,reflect:!0})],ts.prototype,"open",2),Gr([Dt({type:Boolean,reflect:!0})],ts.prototype,"closable",2),Gr([Dt({reflect:!0})],ts.prototype,"variant",2),Gr([Dt({reflect:!0,attribute:"toast-stack"})],ts.prototype,"toastStack",2),Gr([Dt({type:Number})],ts.prototype,"duration",2),Gr([Dt({type:Boolean,reflect:!0,attribute:"duration-indicator"})],ts.prototype,"durationIndicator",2),Gr([Gt("open",{waitUntilFirstUpdate:!0})],ts.prototype,"handleOpenChange",1),Gr([Gt("duration")],ts.prototype,"handleDurationChange",1),ts=Gr([At("sd-notification")],ts),ye("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ye("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});const es=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ts}},Symbol.toStringTag,{value:"Module"}));var is=Object.defineProperty,os=Object.getOwnPropertyDescriptor,rs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?os(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&is(e,i,s),s};let ss=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"default","left","right"),this.localize=new C(this),this.current=!1,this.selected=!1,this.hasHover=!1,this.size="lg",this.checkbox=!1,this.disabled=!1,this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){const t=this.getTextLabel();typeof this.cachedTextLabel>"u"?this.cachedTextLabel=t:t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){return(this.textContent??"").trim()}render(){this.hasSlotController.test("default");const t=this.hasSlotController.test("left"),e=this.hasSlotController.test("right");return ut`<div part="base" class="${xe("px-4 flex items-center w-full transition-all text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${xe("absolute w-full left-0 top-0 pointer-events-none transition-all duration-150 border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?ut`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${xe("relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?ut`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-icon>`:""}</span>`:""} ${t?ut`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${e?ut`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};ss.styles=[Jt,oe.styles,A`:host{position:relative;display:block;width:100%;outline:2px solid transparent!important;outline-offset:2px!important}`],rs([Vt('[part="base"]')],ss.prototype,"defaultSlot",2),rs([Lt()],ss.prototype,"current",2),rs([Lt()],ss.prototype,"selected",2),rs([Lt()],ss.prototype,"hasHover",2),rs([Dt({reflect:!0})],ss.prototype,"size",2),rs([Dt({type:Boolean,reflect:!0})],ss.prototype,"checkbox",2),rs([Dt({type:Boolean,reflect:!0})],ss.prototype,"disabled",2),rs([Dt({reflect:!0})],ss.prototype,"value",2),rs([Gt("disabled")],ss.prototype,"handleDisabledChange",1),rs([Gt("selected")],ss.prototype,"handleSelectedChange",1),rs([Gt("value")],ss.prototype,"handleValueChange",1),ss=rs([At("sd-option")],ss);const as=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ss}},Symbol.toStringTag,{value:"Module"}));var ns=Object.defineProperty,ls=Object.getOwnPropertyDescriptor,ds=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ls(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ns(e,i,s),s};let hs=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"[default]","icon"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="lg"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){const t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),i=`${this.size}-${t?"label":"no-label"}`;return ut`<div part="base" role="presentation" class="relative"><button part="${"button"+(this.checked?" button--checked":"")}" role="radio" aria-checked="${this.checked}" class="${xe("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline","sm"===this.size?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",t&&"px-4",this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",i)}" aria-disabled="${this.disabled}" type="button" value="${ni(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${xe(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?ut`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};hs.styles=[oe.styles,Jt,A`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;position:absolute;inset:var(--sd-spacing-0,0);z-index:-10;opacity:var(--sd-opacity-0,0);outline-style:dotted;outline-width:1px;outline-color:rgb(var(--sd-color-error,204 25 55) / 1)}.lg-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{height:var(--sd-spacing-12,3rem);width:var(--sd-spacing-12,3rem)}.md-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{height:var(--sd-spacing-10,2.5rem);width:var(--sd-spacing-10,2.5rem)}.sm-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{height:var(--sd-spacing-8,2rem);width:var(--sd-spacing-8,2rem)}:host(.sd-button-group__button--first:not(.sd-button-group__button--last)) button{border-top-right-radius:var(--sd-border-radius-none,0);border-bottom-right-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button--last:not(.sd-button-group__button--first)) button{border-top-left-radius:var(--sd-border-radius-none,0);border-bottom-left-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:-1px}:host(.sd-button-group__button--hover){z-index:10}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:20}`],ds([Vt(".button")],hs.prototype,"input",2),ds([Vt(".hidden-input")],hs.prototype,"hiddenInput",2),ds([Lt()],hs.prototype,"hasFocus",2),ds([Dt({type:Boolean,reflect:!0})],hs.prototype,"checked",2),ds([Dt()],hs.prototype,"value",2),ds([Dt({type:Boolean,reflect:!0})],hs.prototype,"disabled",2),ds([Dt({reflect:!0})],hs.prototype,"size",2),ds([Gt("disabled",{waitUntilFirstUpdate:!0})],hs.prototype,"handleDisabledChange",1),hs=ds([At("sd-radio-button")],hs);const cs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return hs}},Symbol.toStringTag,{value:"Module"})),ps=A`${Jt}:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`;var us=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,ms=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?gs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&us(e,i,s),s};let bs=class extends oe{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=vs(t.target);null==e||e.classList.add("sd-button-group__button--focus")}handleBlur(t){const e=vs(t.target);null==e||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){const e=vs(t.target);null==e||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){const e=vs(t.target);null==e||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const i=t.indexOf(e),o=vs(e);null!==o&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",0===i),o.classList.toggle("sd-button-group__button--inner",i>0&&i<t.length-1),o.classList.toggle("sd-button-group__button--last",i===t.length-1),o.classList.toggle("sd-button-group__button--radio","sd-radio-button"===o.tagName.toLowerCase()))}))}render(){return ut`<slot part="base" class="button-group" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};function vs(t){const e="sd-button, sd-radio-button";return t.closest(e)??t.querySelector(e)}bs.styles=ps,ms([Vt("slot")],bs.prototype,"defaultSlot",2),ms([Lt()],bs.prototype,"disableRole",2),ms([Dt()],bs.prototype,"label",2),bs=ms([At("sd-button-group")],bs);var ys=Object.defineProperty,fs=Object.getOwnPropertyDescriptor,ws=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?fs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ys(e,i,s),s};let xs=class extends oe{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.size="lg",this.invalid=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return ut`<span part="base" class="${xe("sd-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"hover:cursor-not-allowed",{sm:"small-size text-sm",lg:"text-base"}[this.size])}"><span part="${this.checked?"control--checked":"control--unchecked"}" class="${xe("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",this.disabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?ut`<span part="checked" class="${xe("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",this.disabled?"bg-neutral-500":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${xe("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};xs.styles=[oe.styles,A`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:rgb(var(--sd-color-primary,0 53 142) / 1)}`],ws([Lt()],xs.prototype,"checked",2),ws([Lt()],xs.prototype,"hasFocus",2),ws([Dt({reflect:!0})],xs.prototype,"size",2),ws([Dt({type:Boolean,reflect:!0})],xs.prototype,"invalid",2),ws([Dt({type:Boolean,reflect:!0})],xs.prototype,"disabled",2),ws([Dt()],xs.prototype,"value",2),ws([Gt("checked")],xs.prototype,"handleCheckedChange",1),ws([Gt("disabled",{waitUntilFirstUpdate:!0})],xs.prototype,"handleDisabledChange",1),xs=ws([At("sd-radio")],xs);const ks=Object.freeze(Object.defineProperty({__proto__:null,get default(){return xs}},Symbol.toStringTag,{value:"Module"}));var Cs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,Ss=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?$s(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Cs(e,i,s),s};let _s=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this),this.hasSlotController=new ei(this,"label","error-text"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.showInvalidStyle=!1,this.label="",this.boldLabel=!1,this.name="option",this.value="",this.size="lg",this.form="",this.required=!1,this.orientation="vertical"}get validity(){const t=this.required&&!this.value;return""!==this.customValidityMessage?ti:t?Qe:Je}get validationMessage(){const t=this.required&&!this.value;return""!==this.customValidityMessage?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){const e=t.target.closest("sd-radio, sd-radio-button"),i=this.getAllRadios(),o=this.value;e.disabled||(this.value=e.value,i.forEach((t=>t.checked=t===e)),this.value!==o&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;const e=this.getAllRadios().filter((t=>!t.disabled)),i=e.find((t=>t.checked))??e[0],o=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,r=this.value;let s=e.indexOf(i)+o;s<0&&(s=e.length-1),s>e.length-1&&(s=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=e[s].value,e[s].checked=!0,this.hasButtonGroup?e[s].shadowRoot.querySelector("button").focus():(e[s].tabIndex=0,e[s].focus()),this.value!==r&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){const t=this.getAllRadios(),e=t.find((t=>t.checked))||t[0];e&&e.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var t,e;const i=this.getAllRadios();if(await Promise.all(i.map((async t=>{await t.updateComplete,t.checked=t.value===this.value,t.size=this.size,t instanceof xs&&(t.invalid=this.showInvalidStyle)}))),this.hasButtonGroup=i.some((t=>"sd-radio-button"===t.tagName.toLowerCase())),!i.some((t=>t.checked)))if(this.hasButtonGroup){const e=null==(t=i[0].shadowRoot)?void 0:t.querySelector("button");e&&(e.tabIndex=0)}else i[0].tabIndex=0;if(this.hasButtonGroup){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("sd-button-group");t&&(t.disableRole=!0)}}syncRadios(){customElements.get("sd-radio")&&customElements.get("sd-radio-button")?this.syncRadioElements():(customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then((()=>this.syncRadios())),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then((()=>this.syncRadios())))}updateCheckedRadio(){this.getAllRadios().forEach((t=>t.checked=t.value===this.value)),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){const t=this.required&&!this.value,e=""!==this.customValidityMessage;return!t&&!e||(this.formControlController.emitInvalidEvent(),!1)}getForm(){return this.formControlController.getForm()}reportValidity(){const t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout((()=>this.validationInput.hidden=!0),1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=!!this.label||!!t,i=ut`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return ut`<fieldset part="form-control" class="${xe("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",lg:"text-base"}[this.size])}" role="radiogroup" aria-labelledby="label" aria-errormessage="error-text"><label part="form-control-label" id="label" class="${xe("mb-2 p-0 leading-normal text-black text-left",!e&&"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${xe("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?ut`<sd-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${i}</sd-button-group>`:i}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};_s.dependencies={"sd-button-group":bs},_s.styles=[Jt,oe.styles,A`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label::after{content:' *'}`],Ss([Vt("slot:not([name])")],_s.prototype,"defaultSlot",2),Ss([Vt("#validation-input")],_s.prototype,"validationInput",2),Ss([Vt("#invalid-message")],_s.prototype,"invalidMessage",2),Ss([Lt()],_s.prototype,"hasButtonGroup",2),Ss([Lt()],_s.prototype,"defaultValue",2),Ss([Lt()],_s.prototype,"showInvalidStyle",2),Ss([Dt()],_s.prototype,"label",2),Ss([Dt({type:Boolean,reflect:!0})],_s.prototype,"boldLabel",2),Ss([Dt()],_s.prototype,"name",2),Ss([Dt({reflect:!0})],_s.prototype,"value",2),Ss([Dt({reflect:!0})],_s.prototype,"size",2),Ss([Dt({reflect:!0})],_s.prototype,"form",2),Ss([Dt({type:Boolean,reflect:!0})],_s.prototype,"required",2),Ss([Dt({reflect:!0})],_s.prototype,"orientation",2),Ss([Gt("size",{waitUntilFirstUpdate:!0})],_s.prototype,"handleSizeChange",1),Ss([Gt("showInvalidStyle",{waitUntilFirstUpdate:!0})],_s.prototype,"handleInvalidChange",1),Ss([Gt("value")],_s.prototype,"handleValueChange",1),_s=Ss([At("sd-radio-group")],_s);const zs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return _s}},Symbol.toStringTag,{value:"Module"}));var Os=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,Ps=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Es(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Os(e,i,s),s};let As=class extends oe{constructor(){super(...arguments),this.size="lg",this.selected=!1,this.removable=!1,this.disabled=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemoveClick(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}render(){const t=this.isLink(),e=t?ri`a`:ri`button`;return ai`<${e} part="base" type="${ni(t?void 0:"button")}" href="${ni(t?this.href:void 0)}" rel="${ni(t&&this.target?"noreferrer noopener":void 0)}" target="${ni(t?this.target:void 0)}" download="${ni(t?this.download:void 0)}" ?disabled="${ni(t?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${xe("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":"border-primary text-primary hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500 disabled:border-neutral-500 disabled:text-neutral-500",this.disabled&&!t&&"cursor-not-allowed")}"><slot part="content"></slot>${this.removable?ai`<slot part="removable-indicator" name="removable-indicator" @click="${this.handleRemoveClick}" class="${xe({lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-icon library="system" name="close" label="remove"></sd-icon></slot>`:""}</${e}>`}};As.styles=[oe.styles,A`:host{display:inline-block}`],Ps([Vt("a, button")],As.prototype,"tag",2),Ps([Dt({reflect:!0})],As.prototype,"size",2),Ps([Dt({type:Boolean,reflect:!0})],As.prototype,"selected",2),Ps([Dt({type:Boolean,reflect:!0})],As.prototype,"removable",2),Ps([Dt({type:Boolean,reflect:!0})],As.prototype,"disabled",2),Ps([Dt()],As.prototype,"href",2),Ps([Dt()],As.prototype,"target",2),Ps([Dt()],As.prototype,"download",2),As=Ps([At("sd-tag")],As);const Ts=Object.freeze(Object.defineProperty({__proto__:null,get default(){return As}},Symbol.toStringTag,{value:"Module"}));var Ms=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Ls=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ds(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ms(e,i,s),s};let Bs=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this,{assumeInteractionOn:["sd-blur","sd-input"]}),this.hasSlotController=new ei(this,"help-text","label"),this.localize=new C(this),this.typeToSelectString="",this.hasHover=!1,this.displayLabel="",this.hasFocus=!1,this.selectedOptions=[],this.showValidStyle=!1,this.showInvalidStyle=!1,this.defaultValue="",this.open=!1,this.size="lg",this.label="",this.placeholder=this.localize.term("selectDefaultPlaceholder"),this.helpText="",this.placement="bottom",this.currentPlacement=this.placement,this.clearable=!1,this.disabled=!1,this.multiple=!1,this.useTags=!1,this.maxOptionsVisible=3,this.form="",this.name="",this.value="",this.required=!1,this.styleOnValid=!1,this.hoist=!1,this.getTag=t=>ut`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
94
|
+
*/})(t),e}});var Vi=Object.defineProperty,Ii=Object.getOwnPropertyDescriptor,ji=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ii(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Vi(e,i,s),s};let Fi=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.title="",this.name="",this.size="lg",this.disabled=!1,this.checked=!1,this.indeterminate=!1,this.defaultChecked=!1,this.form="",this.required=!1,this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return ut`<label part="base" class="${xe("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed",{sm:"text-sm",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ni(this.value)}" .indeterminate="${Bi(this.indeterminate)}" .checked="${Bi(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${xe("relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4\n peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\n peer-focus-visible:outline-primary",{sm:"mt-[2px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}">${this.checked?ut`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-icon>`:""} ${!this.checked&&this.indeterminate?ut`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="system" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${xe("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};Fi.styles=[oe.styles,A`:host{display:block}:host(:focus-visible){outline-width:0}:host([required]) #label::after{content:' *'}`],ji([Vt('input[type="checkbox"]')],Fi.prototype,"input",2),ji([Vt("#invalid-message")],Fi.prototype,"invalidMessage",2),ji([Dt()],Fi.prototype,"title",2),ji([Dt()],Fi.prototype,"name",2),ji([Dt()],Fi.prototype,"value",2),ji([Dt({reflect:!0})],Fi.prototype,"size",2),ji([Dt({type:Boolean,reflect:!0})],Fi.prototype,"disabled",2),ji([Dt({type:Boolean,reflect:!0})],Fi.prototype,"checked",2),ji([Dt({type:Boolean,reflect:!0})],Fi.prototype,"indeterminate",2),ji([Di("checked")],Fi.prototype,"defaultChecked",2),ji([Dt({reflect:!0})],Fi.prototype,"form",2),ji([Dt({type:Boolean,reflect:!0})],Fi.prototype,"required",2),ji([Lt()],Fi.prototype,"showInvalidStyle",2),ji([Gt("disabled",{waitUntilFirstUpdate:!0})],Fi.prototype,"handleDisabledChange",1),ji([Gt(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],Fi.prototype,"handleStateChange",1),Fi=ji([At("sd-checkbox")],Fi);const Ui=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Fi}},Symbol.toStringTag,{value:"Module"})),Ri=new Set;function Hi(t){if(Ri.add(t),!document.body.classList.contains("sd-scroll-lock")){const t=function(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${t}px`)}}function Ni(t){Ri.delete(t),0===Ri.size&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function qi(t,e,i="vertical",o="smooth"){const r=function(t,e){return{top:Math.round(t.getBoundingClientRect().top-e.getBoundingClientRect().top),left:Math.round(t.getBoundingClientRect().left-e.getBoundingClientRect().left)}}(t,e),s=r.top+e.scrollTop,a=r.left+e.scrollLeft,n=e.scrollLeft,l=e.scrollLeft+e.offsetWidth,d=e.scrollTop,h=e.scrollTop+e.offsetHeight;("horizontal"===i||"both"===i)&&(a<n?e.scrollTo({left:a,behavior:o}):a+t.clientWidth>l&&e.scrollTo({left:a-e.offsetWidth+t.clientWidth,behavior:o})),("vertical"===i||"both"===i)&&(s<d?e.scrollTo({top:s,behavior:o}):s+t.clientHeight>h&&e.scrollTo({top:s-e.offsetHeight+t.clientHeight,behavior:o}))}function Ki(t){const e=t.tagName.toLowerCase();return!("-1"===t.getAttribute("tabindex")||t.hasAttribute("disabled")||t.hasAttribute("aria-disabled")&&"false"!==t.getAttribute("aria-disabled")||"input"===e&&"radio"===t.getAttribute("type")&&!t.hasAttribute("checked")||null===t.offsetParent||"hidden"===window.getComputedStyle(t).visibility)&&(!!(("audio"===e||"video"===e)&&t.hasAttribute("controls")||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable")&&"false"!==t.getAttribute("contenteditable"))||["button","input","select","textarea","a","audio","video","summary"].includes(e))}function Zi(t){const e=[];return function t(i){i instanceof HTMLElement&&(e.push(i),null!==i.shadowRoot&&"open"===i.shadowRoot.mode&&t(i.shadowRoot)),[...i.children].forEach((e=>t(e)))}(t),{start:e.find((t=>Ki(t)))??null,end:e.reverse().find((t=>Ki(t)))??null}}let Wi=[];class Yi{constructor(t){this.tabDirection="forward",this.element=t,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){Wi.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){Wi=Wi.filter((t=>t!==this.element)),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return Wi[Wi.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){const{start:t,end:e}=Zi(this.element),i="forward"===this.tabDirection?t:e;"function"==typeof(null==i?void 0:i.focus)&&i.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(t){"Tab"===t.key&&t.shiftKey&&(this.tabDirection="backward",requestAnimationFrame((()=>this.checkFocus())))}handleKeyUp(){this.tabDirection="forward"}}var Xi=Object.defineProperty,Gi=Object.getOwnPropertyDescriptor,Ji=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Gi(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Xi(e,i,s),s};let Qi=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"footer"),this.localize=new C(this),this.open=!1,this.headline="",this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Yi(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Hi(this))}disconnectedCallback(){super.disconnectedCallback(),Ni(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=fe(this,"dialog.denyClose",{dir:this.localize.dir()});he(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),Hi(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([ue(this.dialog),ue(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=fe(this,"dialog.show",{dir:this.localize.dir()}),i=fe(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([he(this.panel,e.keyframes,e.options),he(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([ue(this.dialog),ue(this.overlay)]);const t=fe(this,"dialog.hide",{dir:this.localize.dir()}),e=fe(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([he(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),he(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Ni(this);const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}render(){return ut`<div part="base" class="${xe("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${xe("flex flex-col z-20 bg-white focus:outline-none py-4 sm:py-8 relative gap-6",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.headline}" aria-labelledby="title" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?ut`<h4 class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</h4>`:ut`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":ut`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${xe("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon name="system/close" library="global-resources" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};Qi.styles=[Jt,P(".sd-headline{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));display:flex;font-size:var(--sd-font-size-3xl,2rem);font-weight:700;gap:var(--sd-spacing-4,1rem);line-height:var(--sd-line-height-tight,120%)}@media (min-width:640px){.sd-headline{font-size:var(--sd-font-size-4xl,2.5rem)}}.sd-headline sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-text-opacity));flex-shrink:0;font-size:3rem}@media (min-width:640px){.sd-headline sd-icon{margin-top:var(--sd-spacing-2,.5rem)}}.sd-headline--size-3xl{font-size:var(--sd-font-size-2xl,1.75rem)}@media (min-width:640px){.sd-headline--size-3xl{font-size:var(--sd-font-size-3xl,2rem)}}.sd-headline--size-3xl sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}@media (min-width:640px){.sd-headline--size-3xl sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base,.sd-headline--size-lg,.sd-headline--size-xl{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));gap:var(--sd-spacing-2,.5rem)}.sd-headline--size-base sd-icon,.sd-headline--size-lg sd-icon,.sd-headline--size-xl sd-icon{font-size:2rem}.sd-headline--size-xl{font-size:var(--sd-font-size-xl,1.5rem)}.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}@media (min-width:640px){.sd-headline--size-xl sd-icon{margin-top:var(--sd-spacing-0-5,.125rem)}}.sd-headline--size-base,.sd-headline--size-lg{line-height:var(--sd-line-height-normal,150%)}.sd-headline--size-lg{font-size:var(--sd-font-size-lg,1.25rem)}.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}@media (min-width:640px){.sd-headline--size-lg sd-icon{margin-top:var(--sd-spacing-0,0)}}.sd-headline--size-base{--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity));font-size:var(--sd-font-size-base,1rem)}.sd-headline--size-base sd-icon{margin-top:calc(var(--sd-spacing-1, .25rem)*-1)}.sd-headline--size-base mark{color:inherit}.sd-headline--inverted,.sd-headline--inverted sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-white,255 255 255)/var(--tw-text-opacity))}.sd-headline--inline{display:inline}.sd-headline--inline sd-icon{margin-right:var(--sd-spacing-2,.5rem);margin-top:calc(var(--sd-spacing-1, .25rem)*-1);vertical-align:middle}.sd-headline--inline.sd-headline--size-base sd-icon,.sd-headline--inline.sd-headline--size-lg sd-icon,.sd-headline--inline.sd-headline--size-xl sd-icon{margin-right:var(--sd-spacing-0-5,.125rem)}"),oe.styles,A`:host{--width:662px}[part=panel]{width:var(--width);max-height:80vh}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=footer]{width:100%}}`],Ji([Vt('[part="base"]')],Qi.prototype,"dialog",2),Ji([Vt('[part="panel"]')],Qi.prototype,"panel",2),Ji([Vt('[part="overlay"]')],Qi.prototype,"overlay",2),Ji([Dt({type:Boolean,reflect:!0})],Qi.prototype,"open",2),Ji([Dt({reflect:!0})],Qi.prototype,"headline",2),Ji([Dt({attribute:"no-close-button",type:Boolean,reflect:!0})],Qi.prototype,"noCloseButton",2),Ji([Gt("open",{waitUntilFirstUpdate:!0})],Qi.prototype,"handleOpenChange",1),Qi=Ji([At("sd-dialog")],Qi),ye("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ye("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),ye("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),ye("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),ye("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const to=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Qi}},Symbol.toStringTag,{value:"Module"}));var eo=Object.defineProperty,io=Object.getOwnPropertyDescriptor,oo=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?io(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&eo(e,i,s),s};let ro=class extends oe{constructor(){super(...arguments),this.orientation="horizontal",this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return ut`<hr part="main" class="${xe(this.inverted?"border-primary-400":"border-neutral-400","horizontal"===this.orientation?"border-t w-full":" border-l h-full")}">`}};ro.styles=[Jt,oe.styles,A`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],oo([Dt({reflect:!0})],ro.prototype,"orientation",2),oo([Dt({type:Boolean,reflect:!0})],ro.prototype,"inverted",2),ro=oo([At("sd-divider")],ro);const so=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ro}},Symbol.toStringTag,{value:"Module"}));function ao(t){return t.charAt(0).toUpperCase()+t.slice(1)}var no=Object.defineProperty,lo=Object.getOwnPropertyDescriptor,ho=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?lo(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&no(e,i,s),s};let co=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"footer"),this.localize=new C(this),this.modal=new Yi(this),this.open=!1,this.label="",this.placement="end",this.contained=!1,this.noHeader=!1,this.handleDocumentKeyDown=t=>{this.open&&"Escape"===t.key&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),Hi(this)))}disconnectedCallback(){super.disconnectedCallback(),Ni(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const t=fe(this,"drawer.denyClose",{dir:this.localize.dir()});he(this.panel,t.keyframes,t.options)}else this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.contained||(this.modal.activate(),Hi(this));const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([ue(this.drawer),ue(this.overlay)]),this.drawer.hidden=!1,requestAnimationFrame((()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")}));const e=fe(this,`drawer.show${ao(this.placement)}`,{dir:this.localize.dir()}),i=fe(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([he(this.panel,e.keyframes,e.options),he(this.overlay,i.keyframes,i.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),Ni(this)),await Promise.all([ue(this.drawer),ue(this.overlay)]);const t=fe(this,`drawer.hide${ao(this.placement)}`,{dir:this.localize.dir()}),e=fe(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([he(this.overlay,e.keyframes,e.options).then((()=>{this.overlay.hidden=!0})),he(this.panel,t.keyframes,t.options).then((()=>{this.panel.hidden=!0}))]),this.drawer.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1;const i=this.originalTrigger;"function"==typeof(null==i?void 0:i.focus)&&setTimeout((()=>i.focus())),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),Hi(this)),this.open&&this.contained&&(this.modal.deactivate(),Ni(this))}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}render(){return ut`<div part="base" class="${xe("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}"><div part="overlay" class="${xe("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${xe("absolute flex flex-col z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${this.label}" aria-labelledby="${ni(this.noHeader?void 0:"title")}" tabindex="0">${this.noHeader?"":ut`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:56px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ml-4 absolute top-2 right-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon name="close" library="system"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4"><slot></slot></div><footer part="footer" class="${xe(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></div>`}};co.styles=[oe.styles,Jt,A`:host{--width:25rem;display:contents}:host([contained]){z-index:initial}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],ho([Vt("[part=base]")],co.prototype,"drawer",2),ho([Vt("[part=panel]")],co.prototype,"panel",2),ho([Vt("[part=overlay]")],co.prototype,"overlay",2),ho([Dt({type:Boolean,reflect:!0})],co.prototype,"open",2),ho([Dt({attribute:"label",reflect:!0})],co.prototype,"label",2),ho([Dt({reflect:!0})],co.prototype,"placement",2),ho([Dt({type:Boolean,reflect:!0})],co.prototype,"contained",2),ho([Dt({attribute:"no-header",type:Boolean})],co.prototype,"noHeader",2),ho([Gt("open",{waitUntilFirstUpdate:!0})],co.prototype,"handleOpenChange",1),ho([Gt("contained",{waitUntilFirstUpdate:!0})],co.prototype,"handleNoModalChange",1),co=ho([At("sd-drawer")],co),ye("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),ye("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:250,easing:"ease"}}),ye("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:250,easing:"ease"}}),ye("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:250,easing:"ease"}}),ye("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:250}}),ye("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),ye("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});const po=Object.freeze(Object.defineProperty({__proto__:null,get default(){return co}},Symbol.toStringTag,{value:"Module"})),uo=Math.min,go=Math.max,mo=Math.round,bo=Math.floor,vo=t=>({x:t,y:t}),yo={left:"right",right:"left",bottom:"top",top:"bottom"},fo={start:"end",end:"start"};function wo(t,e,i){return go(t,uo(e,i))}function xo(t,e){return"function"==typeof t?t(e):t}function ko(t){return t.split("-")[0]}function Co(t){return t.split("-")[1]}function $o(t){return"x"===t?"y":"x"}function So(t){return"y"===t?"height":"width"}function _o(t){return["top","bottom"].includes(ko(t))?"y":"x"}function zo(t){return $o(_o(t))}function Oo(t){return t.replace(/start|end/g,(t=>fo[t]))}function Eo(t){return t.replace(/left|right|bottom|top/g,(t=>yo[t]))}function Po(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function Ao(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function To(t,e,i){let{reference:o,floating:r}=t;const s=_o(e),a=zo(e),n=So(a),l=ko(e),d="y"===s,h=o.x+o.width/2-r.width/2,c=o.y+o.height/2-r.height/2,p=o[n]/2-r[n]/2;let u;switch(l){case"top":u={x:h,y:o.y-r.height};break;case"bottom":u={x:h,y:o.y+o.height};break;case"right":u={x:o.x+o.width,y:c};break;case"left":u={x:o.x-r.width,y:c};break;default:u={x:o.x,y:o.y}}switch(Co(e)){case"start":u[a]-=p*(i&&d?-1:1);break;case"end":u[a]+=p*(i&&d?-1:1)}return u}async function Mo(t,e){var i;void 0===e&&(e={});const{x:o,y:r,platform:s,rects:a,elements:n,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:c="floating",altBoundary:p=!1,padding:u=0}=xo(e,t),g=Po(u),m=n[p?"floating"===c?"reference":"floating":c],b=Ao(await s.getClippingRect({element:null==(i=await(null==s.isElement?void 0:s.isElement(m)))||i?m:m.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(n.floating)),boundary:d,rootBoundary:h,strategy:l})),v="floating"===c?{...a.floating,x:o,y:r}:a.reference,y=await(null==s.getOffsetParent?void 0:s.getOffsetParent(n.floating)),f=await(null==s.isElement?void 0:s.isElement(y))&&await(null==s.getScale?void 0:s.getScale(y))||{x:1,y:1},w=Ao(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:y,strategy:l}):v);return{top:(b.top-w.top+g.top)/f.y,bottom:(w.bottom-b.bottom+g.bottom)/f.y,left:(b.left-w.left+g.left)/f.x,right:(w.right-b.right+g.right)/f.x}}const Do=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:i,y:o}=e,r=await async function(t,e){const{placement:i,platform:o,elements:r}=t,s=await(null==o.isRTL?void 0:o.isRTL(r.floating)),a=ko(i),n=Co(i),l="y"===_o(i),d=["left","top"].includes(a)?-1:1,h=s&&l?-1:1,c=xo(e,t);let{mainAxis:p,crossAxis:u,alignmentAxis:g}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...c};return n&&"number"==typeof g&&(u="end"===n?-1*g:g),l?{x:u*h,y:p*d}:{x:p*d,y:u*h}}(e,t);return{x:i+r.x,y:o+r.y,data:r}}}},Lo=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:i,rects:o,platform:r,elements:s}=e,{apply:a=(()=>{}),...n}=xo(t,e),l=await Mo(e,n),d=ko(i),h=Co(i),c="y"===_o(i),{width:p,height:u}=o.floating;let g,m;"top"===d||"bottom"===d?(g=d,m=h===(await(null==r.isRTL?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(m=d,g="end"===h?"top":"bottom");const b=u-l[g],v=p-l[m],y=!e.middlewareData.shift;let f=b,w=v;if(c){const t=p-l.left-l.right;w=h||y?uo(v,t):t}else{const t=u-l.top-l.bottom;f=h||y?uo(b,t):t}if(y&&!h){const t=go(l.left,0),e=go(l.right,0),i=go(l.top,0),o=go(l.bottom,0);c?w=p-2*(0!==t||0!==e?t+e:go(l.left,l.right)):f=u-2*(0!==i||0!==o?i+o:go(l.top,l.bottom))}await a({...e,availableWidth:w,availableHeight:f});const x=await r.getDimensions(s.floating);return p!==x.width||u!==x.height?{reset:{rects:!0}}:{}}}};function Bo(t){return jo(t)?(t.nodeName||"").toLowerCase():"#document"}function Vo(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Io(t){var e;return null==(e=(jo(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function jo(t){return t instanceof Node||t instanceof Vo(t).Node}function Fo(t){return t instanceof Element||t instanceof Vo(t).Element}function Uo(t){return t instanceof HTMLElement||t instanceof Vo(t).HTMLElement}function Ro(t){return!(typeof ShadowRoot>"u")&&(t instanceof ShadowRoot||t instanceof Vo(t).ShadowRoot)}function Ho(t){const{overflow:e,overflowX:i,overflowY:o,display:r}=Wo(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+i)&&!["inline","contents"].includes(r)}function No(t){return["table","td","th"].includes(Bo(t))}function qo(t){const e=Ko(),i=Wo(t);return"none"!==i.transform||"none"!==i.perspective||!!i.containerType&&"normal"!==i.containerType||!e&&!!i.backdropFilter&&"none"!==i.backdropFilter||!e&&!!i.filter&&"none"!==i.filter||["transform","perspective","filter"].some((t=>(i.willChange||"").includes(t)))||["paint","layout","strict","content"].some((t=>(i.contain||"").includes(t)))}function Ko(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Zo(t){return["html","body","#document"].includes(Bo(t))}function Wo(t){return Vo(t).getComputedStyle(t)}function Yo(t){return Fo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Xo(t){if("html"===Bo(t))return t;const e=t.assignedSlot||t.parentNode||Ro(t)&&t.host||Io(t);return Ro(e)?e.host:e}function Go(t){const e=Xo(t);return Zo(e)?t.ownerDocument?t.ownerDocument.body:t.body:Uo(e)&&Ho(e)?e:Go(e)}function Jo(t,e,i){var o;void 0===e&&(e=[]),void 0===i&&(i=!0);const r=Go(t),s=r===(null==(o=t.ownerDocument)?void 0:o.body),a=Vo(r);return s?e.concat(a,a.visualViewport||[],Ho(r)?r:[],a.frameElement&&i?Jo(a.frameElement):[]):e.concat(r,Jo(r,[],i))}function Qo(t){const e=Wo(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=Uo(t),s=r?t.offsetWidth:i,a=r?t.offsetHeight:o,n=mo(i)!==s||mo(o)!==a;return n&&(i=s,o=a),{width:i,height:o,$:n}}function tr(t){return Fo(t)?t:t.contextElement}function er(t){const e=tr(t);if(!Uo(e))return vo(1);const i=e.getBoundingClientRect(),{width:o,height:r,$:s}=Qo(e);let a=(s?mo(i.width):i.width)/o,n=(s?mo(i.height):i.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!n||!Number.isFinite(n))&&(n=1),{x:a,y:n}}const ir=vo(0);function or(t){const e=Vo(t);return Ko()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:ir}function rr(t,e,i,o){void 0===e&&(e=!1),void 0===i&&(i=!1);const r=t.getBoundingClientRect(),s=tr(t);let a=vo(1);e&&(o?Fo(o)&&(a=er(o)):a=er(t));const n=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Vo(t))&&e}(s,i,o)?or(s):vo(0);let l=(r.left+n.x)/a.x,d=(r.top+n.y)/a.y,h=r.width/a.x,c=r.height/a.y;if(s){const t=Vo(s),e=o&&Fo(o)?Vo(o):o;let i=t.frameElement;for(;i&&o&&e!==t;){const t=er(i),e=i.getBoundingClientRect(),o=Wo(i),r=e.left+(i.clientLeft+parseFloat(o.paddingLeft))*t.x,s=e.top+(i.clientTop+parseFloat(o.paddingTop))*t.y;l*=t.x,d*=t.y,h*=t.x,c*=t.y,l+=r,d+=s,i=Vo(i).frameElement}}return Ao({width:h,height:c,x:l,y:d})}function sr(t){return rr(Io(t)).left+Yo(t).scrollLeft}function ar(t,e,i){let o;if("viewport"===e)o=function(t,e){const i=Vo(t),o=Io(t),r=i.visualViewport;let s=o.clientWidth,a=o.clientHeight,n=0,l=0;if(r){s=r.width,a=r.height;const t=Ko();(!t||t&&"fixed"===e)&&(n=r.offsetLeft,l=r.offsetTop)}return{width:s,height:a,x:n,y:l}}(t,i);else if("document"===e)o=function(t){const e=Io(t),i=Yo(t),o=t.ownerDocument.body,r=go(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=go(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let a=-i.scrollLeft+sr(t);const n=-i.scrollTop;return"rtl"===Wo(o).direction&&(a+=go(e.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:n}}(Io(t));else if(Fo(e))o=function(t,e){const i=rr(t,!0,"fixed"===e),o=i.top+t.clientTop,r=i.left+t.clientLeft,s=Uo(t)?er(t):vo(1);return{width:t.clientWidth*s.x,height:t.clientHeight*s.y,x:r*s.x,y:o*s.y}}(e,i);else{const i=or(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return Ao(o)}function nr(t,e){const i=Xo(t);return!(i===e||!Fo(i)||Zo(i))&&("fixed"===Wo(i).position||nr(i,e))}function lr(t,e){const i=e.get(t);if(i)return i;let o=Jo(t,[],!1).filter((t=>Fo(t)&&"body"!==Bo(t))),r=null;const s="fixed"===Wo(t).position;let a=s?Xo(t):t;for(;Fo(a)&&!Zo(a);){const e=Wo(a),i=qo(a);!i&&"fixed"===e.position&&(r=null),(s?!i&&!r:!i&&"static"===e.position&&r&&["absolute","fixed"].includes(r.position)||Ho(a)&&!i&&nr(t,a))?o=o.filter((t=>t!==a)):r=e,a=Xo(a)}return e.set(t,o),o}function dr(t,e,i){const o=Uo(e),r=Io(e),s="fixed"===i,a=rr(t,!0,s,e);let n={scrollLeft:0,scrollTop:0};const l=vo(0);if(o||!o&&!s)if(("body"!==Bo(e)||Ho(r))&&(n=Yo(e)),o){const t=rr(e,!0,s,e);l.x=t.x+e.clientLeft,l.y=t.y+e.clientTop}else r&&(l.x=sr(r));return{x:a.left+n.scrollLeft-l.x,y:a.top+n.scrollTop-l.y,width:a.width,height:a.height}}function hr(t,e){return Uo(t)&&"fixed"!==Wo(t).position?e?e(t):t.offsetParent:null}function cr(t,e){const i=Vo(t);if(!Uo(t))return i;let o=hr(t,e);for(;o&&No(o)&&"static"===Wo(o).position;)o=hr(o,e);return o&&("html"===Bo(o)||"body"===Bo(o)&&"static"===Wo(o).position&&!qo(o))?i:o||function(t){let e=Xo(t);for(;Uo(e)&&!Zo(e);){if(qo(e))return e;e=Xo(e)}return null}(t)||i}const pr={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:i,strategy:o}=t;const r=Uo(i),s=Io(i);if(i===s)return e;let a={scrollLeft:0,scrollTop:0},n=vo(1);const l=vo(0);if((r||!r&&"fixed"!==o)&&(("body"!==Bo(i)||Ho(s))&&(a=Yo(i)),Uo(i))){const t=rr(i);n=er(i),l.x=t.x+i.clientLeft,l.y=t.y+i.clientTop}return{width:e.width*n.x,height:e.height*n.y,x:e.x*n.x-a.scrollLeft*n.x+l.x,y:e.y*n.y-a.scrollTop*n.y+l.y}},getDocumentElement:Io,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:o,strategy:r}=t;const s=[..."clippingAncestors"===i?lr(e,this._c):[].concat(i),o],a=s[0],n=s.reduce(((t,i)=>{const o=ar(e,i,r);return t.top=go(o.top,t.top),t.right=uo(o.right,t.right),t.bottom=uo(o.bottom,t.bottom),t.left=go(o.left,t.left),t}),ar(e,a,r));return{width:n.right-n.left,height:n.bottom-n.top,x:n.left,y:n.top}},getOffsetParent:cr,getElementRects:async function(t){let{reference:e,floating:i,strategy:o}=t;const r=this.getOffsetParent||cr,s=this.getDimensions;return{reference:dr(e,await r(i),o),floating:{x:0,y:0,...await s(i)}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){return Qo(t)},getScale:er,isElement:Fo,isRTL:function(t){return"rtl"===Wo(t).direction}};var ur=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,mr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?gr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ur(e,i,s),s};let br=class extends oe{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver((t=>this.handleCurrentPlacementChange(t))),this.mutationObserver.observe(this,{attributes:!0})}handleCurrentPlacementChange(t){return t.forEach((t=>{if("data-current-placement"===t.attributeName){const t=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:t})}}))}async handleAnchorChange(){if(await this.stop(),this.anchor&&"string"==typeof this.anchor){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=function(t,e,i,o){void 0===o&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:n="function"==typeof IntersectionObserver,animationFrame:l=!1}=o,d=tr(t),h=r||s?[...d?Jo(d):[],...Jo(e)]:[];h.forEach((t=>{r&&t.addEventListener("scroll",i,{passive:!0}),s&&t.addEventListener("resize",i)}));const c=d&&n?function(t,e){let i,o=null;const r=Io(t);function s(){clearTimeout(i),o&&o.disconnect(),o=null}return function a(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),s();const{left:d,top:h,width:c,height:p}=t.getBoundingClientRect();if(n||e(),!c||!p)return;const u={rootMargin:-bo(h)+"px "+-bo(r.clientWidth-(d+c))+"px "+-bo(r.clientHeight-(h+p))+"px "+-bo(d)+"px",threshold:go(0,uo(1,l))||1};let g=!0;function m(t){const e=t[0].intersectionRatio;if(e!==l){if(!g)return a();e?a(!1,e):i=setTimeout((()=>{a(!1,1e-7)}),100)}g=!1}try{o=new IntersectionObserver(m,{...u,root:r.ownerDocument})}catch{o=new IntersectionObserver(m,u)}o.observe(t)}(!0),s}(d,i):null;let p=-1,u=null;a&&(u=new ResizeObserver((t=>{let[o]=t;o&&o.target===d&&u&&(u.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{u&&u.observe(e)}))),i()})),d&&!l&&u.observe(d),u.observe(e));let g,m=l?rr(t):null;return l&&function e(){const o=rr(t);m&&(o.x!==m.x||o.y!==m.y||o.width!==m.width||o.height!==m.height)&&i(),m=o,g=requestAnimationFrame(e)}(),i(),()=>{h.forEach((t=>{r&&t.removeEventListener("scroll",i),s&&t.removeEventListener("resize",i)})),c&&c(),u&&u.disconnect(),u=null,l&&cancelAnimationFrame(g)}}(this.anchorEl,this.popup,(()=>{this.reposition()})))}async stop(){return new Promise((t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame((()=>t()))):t()}))}reposition(){if(!this.active||!this.anchorEl)return;const t=[Do({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Lo({apply:({rects:t})=>{const e="width"===this.sync||"both"===this.sync,i="height"===this.sync||"both"===this.sync;this.popup.style.width=e?`${t.reference.width}px`:"",this.popup.style.height=i?`${t.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:n,platform:l,elements:d}=e,{mainAxis:h=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:u="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=xo(t,e);if(null!=(i=s.arrow)&&i.alignmentOffset)return{};const v=ko(r),y=ko(n)===n,f=await(null==l.isRTL?void 0:l.isRTL(d.floating)),w=p||(y||!m?[Eo(n)]:function(t){const e=Eo(t);return[Oo(t),e,Oo(e)]}(n));!p&&"none"!==g&&w.push(...function(t,e,i,o){const r=Co(t);let s=function(t,e,i){const o=["left","right"],r=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return i?e?r:o:e?o:r;case"left":case"right":return e?s:a;default:return[]}}(ko(t),"start"===i,o);return r&&(s=s.map((t=>t+"-"+r)),e&&(s=s.concat(s.map(Oo)))),s}(n,m,g,f));const x=[n,...w],k=await Mo(e,b),C=[];let $=(null==(o=s.flip)?void 0:o.overflows)||[];if(h&&C.push(k[v]),c){const t=function(t,e,i){void 0===i&&(i=!1);const o=Co(t),r=zo(t),s=So(r);let a="x"===r?o===(i?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Eo(a)),[a,Eo(a)]}(r,a,f);C.push(k[t[0]],k[t[1]])}if($=[...$,{placement:r,overflows:C}],!C.every((t=>t<=0))){var S,_;const t=((null==(S=s.flip)?void 0:S.index)||0)+1,e=x[t];if(e)return{data:{index:t,overflows:$},reset:{placement:e}};let i=null==(_=$.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:_.placement;if(!i)switch(u){case"bestFit":{var z;const t=null==(z=$.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:z[0];t&&(i=t);break}case"initialPlacement":i=n}if(r!==i)return{reset:{placement:i}}}return{}}}}({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:"best-fit"===this.flipFallbackStrategy?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:o,placement:r}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:n={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...l}=xo(t,e),d={x:i,y:o},h=await Mo(e,l),c=_o(ko(r)),p=$o(c);let u=d[p],g=d[c];if(s){const t="y"===p?"bottom":"right";u=wo(u+h["y"===p?"top":"left"],u,u-h[t])}if(a){const t="y"===c?"bottom":"right";g=wo(g+h["y"===c?"top":"left"],g,g-h[t])}const m=n.fn({...e,[p]:u,[c]:g});return{...m,data:{x:m.x-i,y:m.y-o}}}}}({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Lo({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:t,availableHeight:e})=>{"vertical"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-height",`${e}px`):this.style.removeProperty("--auto-size-available-height"),"horizontal"===this.autoSize||"both"===this.autoSize?this.style.setProperty("--auto-size-available-width",`${t}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push((t=>({name:"arrow",options:t,async fn(e){const{x:i,y:o,placement:r,rects:s,platform:a,elements:n,middlewareData:l}=e,{element:d,padding:h=0}=xo(t,e)||{};if(null==d)return{};const c=Po(h),p={x:i,y:o},u=zo(r),g=So(u),m=await a.getDimensions(d),b="y"===u,v=b?"top":"left",y=b?"bottom":"right",f=b?"clientHeight":"clientWidth",w=s.reference[g]+s.reference[u]-p[u]-s.floating[g],x=p[u]-s.reference[u],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(d));let C=k?k[f]:0;(!C||!await(null==a.isElement?void 0:a.isElement(k)))&&(C=n.floating[f]||s.floating[g]);const $=w/2-x/2,S=C/2-m[g]/2-1,_=uo(c[v],S),z=uo(c[y],S),O=_,E=C-m[g]-z,P=C/2-m[g]/2+$,A=wo(O,P,E),T=!l.arrow&&null!=Co(r)&&P!=A&&s.reference[g]/2-(P<O?_:z)-m[g]/2<0,M=T?P<O?P-O:P-E:0;return{[u]:p[u]+M,data:{[u]:A,centerOffset:P-A-M,...T&&{alignmentOffset:M}},reset:T}}}))({element:this.arrowEl,padding:this.arrowPadding})),((t,e,i)=>{const o=new Map,r={platform:pr,...i},s={...r.platform,_c:o};return(async(t,e,i)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=i,n=s.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(e));let d=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:h,y:c}=To(d,o,l),p=o,u={},g=0;for(let i=0;i<n.length;i++){const{name:s,fn:m}=n[i],{x:b,y:v,data:y,reset:f}=await m({x:h,y:c,initialPlacement:o,placement:p,strategy:r,middlewareData:u,rects:d,platform:a,elements:{reference:t,floating:e}});h=b??h,c=v??c,u={...u,[s]:{...u[s],...y}},f&&g<=50&&(g++,"object"==typeof f&&(f.placement&&(p=f.placement),f.rects&&(d=!0===f.rects?await a.getElementRects({reference:t,floating:e,strategy:r}):f.rects),({x:h,y:c}=To(d,p,l))),i=-1)}return{x:h,y:c,placement:p,strategy:r,middlewareData:u}})(t,e,{...r,platform:s})})(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then((({x:t,y:e,middlewareData:i,placement:o})=>{const r="rtl"===getComputedStyle(this).direction,s={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]];if(this.setAttribute("data-current-placement",o),Object.assign(this.popup.style,{left:`${t}px`,top:`${e}px`}),this.arrow){const t=i.arrow.x,e=i.arrow.y;let o="",a="",n="",l="";if("start"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";o="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",a=r?i:"",l=r?"":i}else if("end"===this.arrowPlacement){const i="number"==typeof t?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";a=r?"":i,l=r?i:"",n="number"==typeof e?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else"center"===this.arrowPlacement?(l="number"==typeof t?"calc(50% - var(--arrow-size-diagonal))":"",o="number"==typeof e?"calc(50% - var(--arrow-size-diagonal))":""):(l="number"==typeof t?`${t}px`:"",o="number"==typeof e?`${e}px`:"");Object.assign(this.arrowEl.style,{top:o,right:a,bottom:n,left:l,[s]:"calc(var(--arrow-size-diagonal) * -1)"})}})),this.emit("sd-reposition")}render(){return ut`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${xe("isolate","fixed"!==this.strategy?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?ut`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};br.styles=[oe.styles,Jt,A`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size) * 0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-width:var(--auto-size-available-width,none);max-height:var(--auto-size-available-height,none)}[part=arrow]{width:calc(var(--arrow-size-diagonal) * 2);height:calc(var(--arrow-size-diagonal) * 2);background:var(--arrow-color)}`],mr([Vt('[part="popup"]')],br.prototype,"popup",2),mr([Vt('[part="arrow"]')],br.prototype,"arrowEl",2),mr([Dt()],br.prototype,"anchor",2),mr([Dt({type:Boolean,reflect:!0})],br.prototype,"active",2),mr([Dt({reflect:!0})],br.prototype,"placement",2),mr([Dt({reflect:!0})],br.prototype,"strategy",2),mr([Dt({type:Number})],br.prototype,"distance",2),mr([Dt({type:Number})],br.prototype,"skidding",2),mr([Dt({type:Boolean})],br.prototype,"arrow",2),mr([Dt({attribute:"arrow-placement"})],br.prototype,"arrowPlacement",2),mr([Dt({attribute:"arrow-padding",type:Number})],br.prototype,"arrowPadding",2),mr([Dt({type:Boolean})],br.prototype,"flip",2),mr([Dt({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map((t=>t.trim())).filter((t=>""!==t)),toAttribute:t=>t.join(" ")}})],br.prototype,"flipFallbackPlacements",2),mr([Dt({attribute:"flip-fallback-strategy"})],br.prototype,"flipFallbackStrategy",2),mr([Dt({type:Object})],br.prototype,"flipBoundary",2),mr([Dt({attribute:"flip-padding",type:Number})],br.prototype,"flipPadding",2),mr([Dt({type:Boolean})],br.prototype,"shift",2),mr([Dt({type:Object})],br.prototype,"shiftBoundary",2),mr([Dt({attribute:"shift-padding",type:Number})],br.prototype,"shiftPadding",2),mr([Dt({attribute:"auto-size"})],br.prototype,"autoSize",2),mr([Dt()],br.prototype,"sync",2),mr([Dt({type:Object})],br.prototype,"autoSizeBoundary",2),mr([Dt({attribute:"auto-size-padding",type:Number})],br.prototype,"autoSizePadding",2),br=mr([At("sd-popup")],br);const vr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return br}},Symbol.toStringTag,{value:"Module"}));var yr=Object.defineProperty,fr=Object.getOwnPropertyDescriptor,wr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?fr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&yr(e,i,s),s};let xr=class extends oe{constructor(){super(...arguments),this.localize=new C(this),this.open=!1,this.rounded=!1,this.placement="bottom-start",this.disabled=!1,this.stayOpenOnSelect=!1,this.distance=0,this.skidding=0,this.noAutoSize=!1,this.noFlip=!1,this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}focusOnTrigger(){const t=this.trigger.assignedElements({flatten:!0})[0];"function"==typeof(null==t?void 0:t.focus)&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find((t=>"sd-menu"===t.tagName.toLowerCase()))}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){var e;if("Tab"===t.key){if(this.open&&"sd-menu-item"===(null==(e=document.activeElement)?void 0:e.tagName.toLowerCase()))return t.preventDefault(),this.hide(),void this.focusOnTrigger();setTimeout((()=>{var t,e,i,o,r,s,a,n,l,d,h,c;const p=(null==(r=null==(o=null==(i=null==(e=null==(t=document.activeElement)?void 0:t.shadowRoot)?void 0:e.activeElement)?void 0:i.shadowRoot)?void 0:o.activeElement)?void 0:r.getRootNode())instanceof ShadowRoot?null==(l=null==(n=null==(a=null==(s=document.activeElement)?void 0:s.shadowRoot)?void 0:a.activeElement)?void 0:n.shadowRoot)?void 0:l.activeElement:(null==(d=this.containingElement)?void 0:d.getRootNode())instanceof ShadowRoot?null==(c=null==(h=document.activeElement)?void 0:h.shadowRoot)?void 0:c.activeElement:document.activeElement;(!this.containingElement||(null==p?void 0:p.closest(this.containingElement.tagName.toLowerCase()))!==this.containingElement)&&this.hide()}))}}handleDocumentMouseDown(t){const e=t.composedPath();this.containingElement&&!e.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(t){qi(t.target,this.panel)}handlePanelSelect(t){const e=t.target;!this.stayOpenOnSelect&&"sd-menu"===e.tagName.toLowerCase()&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(t){if("Escape"===t.key&&this.open)return t.stopPropagation(),this.focusOnTrigger(),void this.hide();if([" ","Enter"].includes(t.key))return t.preventDefault(),void this.handleTriggerClick();const e=this.getMenu();if(e){const i=e.defaultSlot.assignedElements({flatten:!0}),o=i[0],r=i[i.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),i.length>0&&requestAnimationFrame((()=>{("ArrowDown"===t.key||"Home"===t.key)&&(e.setCurrentItem(o),o.focus()),("ArrowUp"===t.key||"End"===t.key)&&(e.setCurrentItem(r),r.focus())})))}}handleTriggerKeyUp(t){" "===t.key&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}updateAccessibleTrigger(){const t=this.trigger.assignedElements({flatten:!0}).find((t=>Zi(t).start));let e;if(t){switch(t.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":e=t.button;break;default:e=t}e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded",this.open?"true":"false")}}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled)this.open=!1;else if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await ue(this),this.panel.hidden=!1,this.popup.active=!0;const{keyframes:t,options:e}=fe(this,"dropdown.show",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await ue(this);const{keyframes:t,options:e}=fe(this,"dropdown.hide",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return ut`<sd-popup part="base" id="dropdown" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10" ?active="${this.open}"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${xe("shadow bg-white",this.open?"block pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};xr.styles=[oe.styles,Jt,A`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`],wr([Vt("#dropdown")],xr.prototype,"popup",2),wr([Vt("[part=trigger]")],xr.prototype,"trigger",2),wr([Vt("[part=panel]")],xr.prototype,"panel",2),wr([Dt({type:Boolean,reflect:!0})],xr.prototype,"open",2),wr([Dt({type:Boolean,reflect:!0})],xr.prototype,"rounded",2),wr([Dt({reflect:!0})],xr.prototype,"placement",2),wr([Dt({type:Boolean,reflect:!0})],xr.prototype,"disabled",2),wr([Dt({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],xr.prototype,"stayOpenOnSelect",2),wr([Dt({attribute:!1})],xr.prototype,"containingElement",2),wr([Dt({type:Number})],xr.prototype,"distance",2),wr([Dt({type:Number})],xr.prototype,"skidding",2),wr([Dt({type:Boolean,reflect:!0,attribute:"no-auto-size"})],xr.prototype,"noAutoSize",2),wr([Dt({type:Boolean,reflect:!0,attribute:"no-flip"})],xr.prototype,"noFlip",2),wr([Dt({type:Boolean})],xr.prototype,"hoist",2),wr([Gt("open",{waitUntilFirstUpdate:!0})],xr.prototype,"handleOpenChange",1),xr=wr([At("sd-dropdown")],xr),ye("dropdown.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),ye("dropdown.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const kr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return xr}},Symbol.toStringTag,{value:"Module"}));var Cr=Object.defineProperty,$r=Object.getOwnPropertyDescriptor,Sr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?$r(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Cr(e,i,s),s};let _r=class extends oe{constructor(){super(...arguments),this.fixed=!1}connectedCallback(){super.connectedCallback(),this.setCalculatedHeightProperty=this.setCalculatedHeightProperty.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this)}firstUpdated(){this.toggleHeightCalculation()}toggleHeightCalculation(){var t;this.fixed?(this.setCalculatedHeightProperty(),this.addResizeObserver()):(this.setCalculatedHeightProperty(),null==(t=this.resizeObserver)||t.disconnect(),this.resizeObserver=void 0)}disconnectedCallback(){super.disconnectedCallback()}updated(t){super.updated(t),t.has("fixed")&&this.toggleHeightCalculation()}onResize(){this.fixed&&this.setCalculatedHeightProperty()}addResizeObserver(){this.resizeObserver=new ResizeObserver((()=>{this.onResize()})),this.refHeaderElement&&this.resizeObserver.observe(this.refHeaderElement)}setCalculatedHeightProperty(){this.fixed&&this.refHeaderElement?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.refHeaderElement.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return ut`<header class="w-full bg-white relative" role="banner" @slotchange="${this.handleSlotChange}"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}handleSlotChange(t){t.target.assignedElements().length>0&&(this.refHeaderElement=t.currentTarget,this.setCalculatedHeightProperty())}};_r.styles=[oe.styles,Jt,A`:host{display:block}:host([fixed]){position:fixed;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header::after{content:'';position:absolute;left:var(--sd-spacing-0,0);right:var(--sd-spacing-0,0);top:100%;height:var(--sd-spacing-2,.5rem);background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%))}[part=main]{width:var(--sd-header-inner-width);max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px)}`],Sr([Dt({reflect:!0,type:Boolean})],_r.prototype,"fixed",2),Sr([yi(100)],_r.prototype,"onResize",1),_r=Sr([At("sd-header")],_r);const zr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return _r}},Symbol.toStringTag,{value:"Module"}));var Or=Object.defineProperty,Er=Object.getOwnPropertyDescriptor,Pr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Er(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Or(e,i,s),s};let Ar=class extends oe{constructor(){super(...arguments),this.mode="cors",this.allowScripts=!1}executeScript(t){const e=document.createElement("script");[...t.attributes].forEach((t=>e.setAttribute(t.name,t.value))),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{const t=this.src,e=await Ft(t,this.mode);if(t!==this.src)return;if(!e.ok)return void this.emit("sd-error",{detail:{status:e.status}});this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach((t=>this.executeScript(t))),this.emit("sd-load")}catch{this.emit("sd-error",{detail:{status:-1}})}}render(){return ut`<slot></slot>`}};Ar.styles=[Jt,A`:host{display:block}`],Pr([Dt()],Ar.prototype,"src",2),Pr([Dt()],Ar.prototype,"mode",2),Pr([Dt({attribute:"allow-scripts",type:Boolean})],Ar.prototype,"allowScripts",2),Pr([Gt("src")],Ar.prototype,"handleSrcChange",1),Ar=Pr([At("sd-include")],Ar);const Tr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ar}},Symbol.toStringTag,{value:"Module"}));var Mr=Object.defineProperty,Dr=Object.getOwnPropertyDescriptor,Lr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Dr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Mr(e,i,s),s};const Br=!(null==(i=navigator.userAgentData)?void 0:i.brands.some((t=>t.brand.includes("Chromium"))))&&navigator.userAgent.includes("Firefox");let Vr=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this),this.hasSlotController=new ei(this,"help-text","label","left","right","message","placeholder"),this.localize=new C(this),this.hasFocus=!1,this.showValidStyle=!1,this.showInvalidStyle=!1,this.type="text",this.size="lg",this.value="",this.defaultValue="",this.placeholder="",this.label="",this.helpText="",this.clearable=!1,this.disabled=!1,this.readonly=!1,this.passwordToggle=!1,this.passwordVisible=!1,this.noSpinButtons=!1,this.form="",this.name="",this.title="",this.required=!1,this.styleOnValid=!1,this.spellcheck=!0}get valueAsDate(){var t;return(null==(t=this.input)?void 0:t.valueAsDate)??null}set valueAsDate(t){const e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t;return(null==(t=this.input)?void 0:t.valueAsNumber)??parseFloat(this.value)}set valueAsNumber(t){const e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(t){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleKeyDown(t){const e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;"Enter"===t.key&&!e&&setTimeout((()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()}))}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,i="none"){this.input.setSelectionRange(t,e,i)}setRangeText(t,e,i,o){this.input.setRangeText(t,e,i,o),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var t;return null==(t=this.input)?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=this.hasSlotController.test("help-text"),i=(this.hasSlotController.test("description"),this.hasSlotController.test("left")),o=this.hasSlotController.test("right"),r=!!this.label||!!t,s=!!this.helpText||!!e,a=this.clearable&&!this.readonly&&("number"==typeof this.value||this.value.length>0),n=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",l="sm"===this.size?"text-sm":"text-base",d={disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[n],h={disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n],c=this.disabled?"text-neutral-500":"text-primary",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],u={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return ut`<div part="form-control" class="${xe(this.disabled&&"pointer-events-none")}"><label part="form-control-label" id="label" class="${xe("mb-2",r?"inline-block":"hidden",l)}" for="input" aria-hidden="${r?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="relative w-full"><div part="border" class="${xe("absolute w-full h-full pointer-events-none border rounded-default",h)}"></div><div part="base" class="${xe("px-4 flex flex-row items-center rounded-default transition-all bg-white","lg"===this.size?"py-2":"py-1",this.disabled||this.readonly?"":"hover:bg-neutral-200",this.readonly&&"bg-neutral-100",d)}">${i?ut`<slot name="left" part="left" class="${xe("inline-flex","sm"===this.size?"mr-1":"mr-2",c,u)}"></slot>`:""} <input part="input" id="input" class="${xe("min-w-0 flex-grow focus:outline-none bg-transparent placeholder-neutral-700","sm"===this.size?"h-6":"h-8",l)}" type="${"password"===this.type&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${ni(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ni(this.placeholder)}" minlength="${ni(this.minlength)}" maxlength="${ni(this.maxlength)}" min="${ni(this.min)}" max="${ni(this.max)}" step="${ni(this.step)}" .value="${Bi(this.value)}" autocapitalize="${ni("password"===this.type?"off":this.autocapitalize)}" autocomplete="${ni("password"===this.type?"off":this.autocomplete)}" autocorrect="${ni("password"===this.type?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${ni(this.pattern)}" enterkeyhint="${ni(this.enterkeyhint)}" inputmode="${ni(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${a?ut`<button part="clear-button" class="${xe("flex justify-center ",p)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${xe("text-neutral-500",u)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&"password"===this.type?ut`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="flex items-center" type="button" @click="${this.handlePasswordToggle}" tabindex="-1">${this.passwordVisible?ut`<slot name="show-password-icon"><sd-icon class="${xe(c,p,u)}" library="system" name="eye"></sd-icon></slot>`:ut`<slot name="hide-password-icon"><sd-icon class="${xe(c,p,u)}" library="system" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${"date"!==this.type&&"datetime-local"!==this.type||Br?"":ut`<sd-icon class="${xe(c,p,u)}" library="system" name="calendar"></sd-icon>`} ${"time"===this.type?ut`<sd-icon class="${xe(c,p,u)}" library="system" name="clock"></sd-icon>`:""} ${this.showInvalidStyle?ut`<sd-icon part="invalid-icon" class="${xe("text-error",p,u)}" library="system" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?ut`<sd-icon class="${xe("text-success flex-shrink-0",p,u)}" library="system" name="confirm" part="valid-icon"></sd-icon>`:""} ${o?ut`<slot name="right" part="right" class="${xe("inline-flex",c,p,u)}"></slot>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${xe("text-sm text-neutral-700",s?"block":"hidden")}" aria-hidden="${!s}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};Vr.styles=[Jt,oe.styles,A`:host{position:relative;box-sizing:border-box;display:inline-block;width:100%;text-align:left}:host([vertical]){display:block}:host([required]) #label::after{content:' *'}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}`],Lr([Vt("#input")],Vr.prototype,"input",2),Lr([Vt("#invalid-message")],Vr.prototype,"invalidMessage",2),Lr([Lt()],Vr.prototype,"hasFocus",2),Lr([Lt()],Vr.prototype,"showValidStyle",2),Lr([Lt()],Vr.prototype,"showInvalidStyle",2),Lr([Dt({reflect:!0})],Vr.prototype,"type",2),Lr([Dt({reflect:!0})],Vr.prototype,"size",2),Lr([Dt()],Vr.prototype,"inputmode",2),Lr([Dt()],Vr.prototype,"value",2),Lr([Di()],Vr.prototype,"defaultValue",2),Lr([Dt()],Vr.prototype,"placeholder",2),Lr([Dt()],Vr.prototype,"label",2),Lr([Dt({attribute:"help-text"})],Vr.prototype,"helpText",2),Lr([Dt({type:Boolean})],Vr.prototype,"clearable",2),Lr([Dt({type:Boolean,reflect:!0})],Vr.prototype,"disabled",2),Lr([Dt({type:Boolean,reflect:!0})],Vr.prototype,"readonly",2),Lr([Dt({attribute:"password-toggle",type:Boolean})],Vr.prototype,"passwordToggle",2),Lr([Dt({attribute:"password-visible",type:Boolean})],Vr.prototype,"passwordVisible",2),Lr([Dt({attribute:"no-spin-buttons",type:Boolean})],Vr.prototype,"noSpinButtons",2),Lr([Dt({type:Number})],Vr.prototype,"minlength",2),Lr([Dt({type:Number})],Vr.prototype,"maxlength",2),Lr([Dt({type:Number})],Vr.prototype,"min",2),Lr([Dt({type:Number})],Vr.prototype,"max",2),Lr([Dt({reflect:!0})],Vr.prototype,"form",2),Lr([Dt()],Vr.prototype,"name",2),Lr([Dt()],Vr.prototype,"title",2),Lr([Dt({type:Boolean,reflect:!0})],Vr.prototype,"required",2),Lr([Dt()],Vr.prototype,"pattern",2),Lr([Dt()],Vr.prototype,"step",2),Lr([Dt()],Vr.prototype,"autocapitalize",2),Lr([Dt()],Vr.prototype,"autocorrect",2),Lr([Dt()],Vr.prototype,"autocomplete",2),Lr([Dt({type:Boolean})],Vr.prototype,"autofocus",2),Lr([Dt()],Vr.prototype,"enterkeyhint",2),Lr([Dt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Vr.prototype,"styleOnValid",2),Lr([Dt({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],Vr.prototype,"spellcheck",2),Lr([Gt("disabled",{waitUntilFirstUpdate:!0})],Vr.prototype,"handleDisabledChange",1),Lr([Gt("step",{waitUntilFirstUpdate:!0})],Vr.prototype,"handleStepChange",1),Lr([Gt("value",{waitUntilFirstUpdate:!0})],Vr.prototype,"handleValueChange",1),Vr=Lr([At("sd-input")],Vr);const Ir=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Vr}},Symbol.toStringTag,{value:"Module"}));var jr=Object.defineProperty,Fr=Object.getOwnPropertyDescriptor,Ur=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Fr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&jr(e,i,s),s};let Rr=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"[default]","icon-left","icon-right"),this.size="inherit",this.inverted=!1,this.standalone=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return ut`<a part="base" class="${xe("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${ni(this.href||void 0)}" target="${ni(this.target||void 0)}" download="${ni(this.download||void 0)}" rel="${ni(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${xe("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${xe("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};Rr.styles=[oe.styles,A`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],Ur([Vt("a")],Rr.prototype,"button",2),Ur([Dt({reflect:!0})],Rr.prototype,"size",2),Ur([Dt({type:Boolean,reflect:!0})],Rr.prototype,"inverted",2),Ur([Dt({type:Boolean,reflect:!0})],Rr.prototype,"standalone",2),Ur([Dt()],Rr.prototype,"href",2),Ur([Dt()],Rr.prototype,"target",2),Ur([Dt()],Rr.prototype,"download",2),Rr=Ur([At("sd-link")],Rr);const Hr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Rr}},Symbol.toStringTag,{value:"Module"}));var Nr=Object.defineProperty,qr=Object.getOwnPropertyDescriptor,Kr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?qr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Nr(e,i,s),s};let Zr=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"[default]","description","children"),this.href="",this.current=!1,this.disabled=!1,this.size="base",this.vertical=!1,this.chevron=!1,this.indented=!1,this.relaxed=!1,this.divider=!1,this.open=!1}isButton(){return!this.href&&!this.hasSlotController.test("children")}isLink(){return!!this.href}isAccordion(){return!this.href&&this.hasSlotController.test("children")}handleClickButton(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}handleClickSummary(t){t.preventDefault(),t.stopPropagation(),this.disabled||(this.open?this.hideDetails():this.showDetails())}hideDetails(){this.open=!1,this.emit("sd-hide",{cancelable:!0})}showDetails(){this.open=!0,this.emit("sd-show",{cancelable:!0})}calculatePaddingX(){return this.relaxed&&this.indented?"pl-8 pr-4":this.relaxed?"px-4":this.indented?"pl-4":""}render(){const t=this.isLink(),e=this.isButton(),i=this.isAccordion(),o=(this.hasSlotController.test("[default]"),this.hasSlotController.test("main"),this.hasSlotController.test("description")),r=this.hasSlotController.test("children"),s=t?ri`a`:i?ri`summary`:ri`button`,a=this.vertical?"pb-3":"pb-2",n=ai`<${s} part="base" class="${xe("hover:bg-neutral-200 group transition-all min-h-[48px] cursor-pointer relative focus-visible:focus-outline",{base:"text-base",lg:"text-lg",sm:"text-[14px]"}[this.size],this.disabled?"text-neutral-500 pointer-events-none":"text-primary",i?"flex flex-col":"inline-block w-full",this.divider&&this.vertical&&"mt-[1px]",this.vertical?"px-8":"px-4")}" aria-controls="${ni(i?"navigation-item-details":void 0)}" aria-current="${ni(this.current?"page":void 0)}" aria-disabled="${this.disabled}" ?disabled="${ni(e?this.disabled:void 0)}" href="${ni(this.href||void 0)}" target="${ni(t?this.target:void 0)}" download="${ni(t?this.download:void 0)}" rel="${ni(t&&this.target?"noreferrer noopener":void 0)}" role="${t?"link":"button"}" tabindex="${this.disabled?"-1":"0"}" @click="${i?this.handleClickSummary:e?this.handleClickButton:void 0}"><div part="current-indicator" class="${xe("absolute left-0 pointer-events-none transition-all duration-150",this.vertical?"w-1 h-[calc(100%-8px)] top-1 group-hover:h-full group-hover:top-0":"h-1 w-full bottom-0",this.current?"bg-accent":"bg-transparent",this.disabled&&"bg-neutral-500")}"></div><span part="content-area" class="${xe("relative pt-3 inline-flex justify-between items-center",i?"grow":"w-full",o?"pb-1":a,this.calculatePaddingX())}">${this.divider&&this.vertical?ai`<sd-divider part="divider" class="${xe("w-full transition-all absolute -top-[1px] left-0",this.calculatePaddingX())}"></sd-divider>`:""} <span part="content-container" class="inline-flex items-center flex-auto"><slot part="content" class="inline"></slot></span>${(this.chevron||r)&&this.vertical?ai`<sd-icon name="chevron-down" part="chevron" library="system" color="currentColor" class="${xe("h-6 w-6 ml-2 transition-all",i?this.open?"rotate-180":"rotate-0":"rotate-[270deg]")}"></sd-icon>`:""} </span>${o&&this.vertical?ai`<slot name="description" part="description" class="${xe("inline-block text-sm text-left text-black",i?"grow":"w-full",a,this.calculatePaddingX())}"></slot>`:""}</${s}>`;return i?ai`<details part="details" id="navigation-item-details" ?open="${this.open}" class="relative flex">${n}<slot name="children"></slot></details>`:ai`${n}`}};Zr.styles=[Jt,oe.styles,A`:host{position:relative;box-sizing:border-box;display:inline-block}:host([vertical]){display:block}details summary::-webkit-details-marker{display:none}`],Kr([Dt({reflect:!0})],Zr.prototype,"href",2),Kr([Dt()],Zr.prototype,"target",2),Kr([Dt()],Zr.prototype,"download",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"current",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"disabled",2),Kr([Dt({reflect:!0})],Zr.prototype,"size",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"vertical",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"chevron",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"indented",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"relaxed",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"divider",2),Kr([Dt({type:Boolean,reflect:!0})],Zr.prototype,"open",2),Zr=Kr([At("sd-navigation-item")],Zr);const Wr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Zr}},Symbol.toStringTag,{value:"Module"}));var Yr=Object.defineProperty,Xr=Object.getOwnPropertyDescriptor,Gr=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Xr(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Yr(e,i,s),s};const Jr=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--top-right"}),Qr=Object.assign(document.createElement("div"),{className:"sd-toast-stack sd-toast-stack--bottom-center"});let ts=class extends oe{constructor(){super(...arguments),this.localize=new C(this),this.open=!1,this.closable=!1,this.variant="info",this.toastStack="top-right",this.duration=1/0,this.durationIndicator=!1,this.remainingDuration=this.duration,this.startTime=Date.now()}firstUpdated(){this.base.hidden=!this.open}startAutoHide(){clearTimeout(this.autoHideTimeout),this.startTime=Date.now(),this.remainingDuration=this.duration,this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>this.hide()),this.duration))}onHover(){clearTimeout(this.autoHideTimeout),this.duration<1/0&&(this.remainingDuration-=Date.now()-this.startTime)}onHoverEnd(){this.startTime=Date.now(),clearTimeout(this.autoHideTimeout),this.open&&this.duration<1/0&&(this.autoHideTimeout=window.setTimeout((()=>{this.hide()}),this.remainingDuration))}handleCloseClick(){this.hide()}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.duration<1/0&&this.startAutoHide(),await ue(this.base),this.base.hidden=!1;const{keyframes:t,options:e}=fe(this,"notification.show",{dir:this.localize.dir()});await he(this.base,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),clearTimeout(this.autoHideTimeout),await ue(this.base);const{keyframes:t,options:e}=fe(this,"notification.hide",{dir:this.localize.dir()});await he(this.base,t,e),this.base.hidden=!0,this.emit("sd-after-hide")}}handleDurationChange(){this.startAutoHide()}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}async toast(){return new Promise((t=>{const e="bottom-center"===this.toastStack?Qr:Jr;null===e.parentElement&&document.body.append(e),e.appendChild(this),requestAnimationFrame((()=>{this.clientWidth,this.show()})),this.addEventListener("sd-after-hide",(()=>{e.removeChild(this),t(),null===e.querySelector("sd-notification")&&e.remove()}),{once:!0})}))}render(){return ut`<div part="base" class="${xe("w-full overflow-hidden flex items-stretch relative m-2")}" role="alert" id="notification" aria-hidden="${this.open?"false":"true"}" @mouseenter="${this.onHover}" @mouseleave="${this.onHoverEnd}"><slot name="icon" part="icon" class="${xe("min-w-min flex items-center px-3 justify-center",{info:"bg-info",success:"bg-success",warning:"bg-warning",error:"bg-error"}[this.variant])}"><sd-icon name="${{info:"info-circle",success:"confirm-circle",warning:"exclamation-circle",error:"warning"}[this.variant]||""}" library="system" class="h-6 w-6 text-white"></sd-icon></slot><div part="content" class="${xe("h-full w-full p-1 gap-2 flex items-center justify-stretch bg-white","border-solid border-[1px] border-l-0 border-neutral-400")}"><slot part="message" class="block w-full pl-3 py-2" aria-live="polite"></slot>${this.closable?ut`<sd-button size="md" variant="tertiary" part="close-button" class="ml-auto flex flex-[0_0_auto] items-stretch" label="${this.localize.term("close")}" @click="${this.handleCloseClick}"><sd-icon name="close" library="system" color="currentColor"></sd-icon></sd-button>`:""}</div>${this.durationIndicator?ut`<div part="duration-indicator__elapsed" id="duration-indicator__elapsed" style="${`animation-duration: ${this.duration}ms`}" class="${xe("absolute w-0 h-[2px] bottom-0 bg-primary z-10 animate-grow")}"></div><div part="duration-indicator__total" class="w-full h-[2px] bottom-0 absolute bg-neutral-400"></div>`:""}</div>`}};ts.styles=[Jt,oe.styles,A`:host{display:contents}#notification:hover #duration-indicator__elapsed{animation-play-state:paused!important}`],Gr([Vt('[part~="base"]')],ts.prototype,"base",2),Gr([Dt({type:Boolean,reflect:!0})],ts.prototype,"open",2),Gr([Dt({type:Boolean,reflect:!0})],ts.prototype,"closable",2),Gr([Dt({reflect:!0})],ts.prototype,"variant",2),Gr([Dt({reflect:!0,attribute:"toast-stack"})],ts.prototype,"toastStack",2),Gr([Dt({type:Number})],ts.prototype,"duration",2),Gr([Dt({type:Boolean,reflect:!0,attribute:"duration-indicator"})],ts.prototype,"durationIndicator",2),Gr([Gt("open",{waitUntilFirstUpdate:!0})],ts.prototype,"handleOpenChange",1),Gr([Gt("duration")],ts.prototype,"handleDurationChange",1),ts=Gr([At("sd-notification")],ts),ye("notification.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),ye("notification.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});const es=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ts}},Symbol.toStringTag,{value:"Module"}));var is=Object.defineProperty,os=Object.getOwnPropertyDescriptor,rs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?os(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&is(e,i,s),s};let ss=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"default","left","right"),this.localize=new C(this),this.current=!1,this.selected=!1,this.hasHover=!1,this.size="lg",this.checkbox=!1,this.disabled=!1,this.value=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){const t=this.getTextLabel();typeof this.cachedTextLabel>"u"?this.cachedTextLabel=t:t!==this.cachedTextLabel&&(this.cachedTextLabel=t,this.emit("slotchange",{bubbles:!0,composed:!1,cancelable:!1}))}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){return(this.textContent??"").trim()}render(){this.hasSlotController.test("default");const t=this.hasSlotController.test("left"),e=this.hasSlotController.test("right");return ut`<div part="base" class="${xe("px-4 flex items-center w-full transition-all text-left text-base relative text-black",{sm:"text-sm py-1",md:"text-base py-2",lg:"text-base py-3"}[this.size],this.disabled?"text-neutral-500 cursor-not-allowed":"cursor-pointer",this.hasHover&&!this.disabled?"bg-neutral-200":"",this.current&&"bg-neutral-200")}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><span class="${xe("absolute w-full left-0 top-0 pointer-events-none transition-all duration-150 border-l-4 h-[calc(100%-8px)]",this.selected&&!this.checkbox?"border-accent":"border-transparent",this.disabled&&"border-neutral-500 top-1",!this.disabled&&this.hasHover?"h-full top-0":"top-1")}"></span> ${this.checkbox?ut`<span id="control" part="control ${this.selected?" control--checked":"control--unchecked"}" class="${xe("relative flex flex-initial items-center justify-center border rounded-sm h-4 w-4 mr-2",this.disabled?"border-neutral-500":this.selected?"bg-accent border-accent":"border-neutral-800")}">${this.selected?ut`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="system" name="status-hook"></sd-icon>`:""}</span>`:""} ${t?ut`<slot name="left" part="left" class="inline-flex mr-2"></slot>`:""}<slot part="label" class="inline-block flex-grow" @slotchange="${this.handleDefaultSlotChange}"></slot>${e?ut`<slot name="right" part="right" class="inline-flex ml-2"></slot>`:""}</div>`}};ss.styles=[Jt,oe.styles,A`:host{position:relative;display:block;width:100%;outline:2px solid transparent!important;outline-offset:2px!important}`],rs([Vt('[part="base"]')],ss.prototype,"defaultSlot",2),rs([Lt()],ss.prototype,"current",2),rs([Lt()],ss.prototype,"selected",2),rs([Lt()],ss.prototype,"hasHover",2),rs([Dt({reflect:!0})],ss.prototype,"size",2),rs([Dt({type:Boolean,reflect:!0})],ss.prototype,"checkbox",2),rs([Dt({type:Boolean,reflect:!0})],ss.prototype,"disabled",2),rs([Dt({reflect:!0})],ss.prototype,"value",2),rs([Gt("disabled")],ss.prototype,"handleDisabledChange",1),rs([Gt("selected")],ss.prototype,"handleSelectedChange",1),rs([Gt("value")],ss.prototype,"handleValueChange",1),ss=rs([At("sd-option")],ss);const as=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ss}},Symbol.toStringTag,{value:"Module"}));var ns=Object.defineProperty,ls=Object.getOwnPropertyDescriptor,ds=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ls(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ns(e,i,s),s};let hs=class extends oe{constructor(){super(...arguments),this.hasSlotController=new ei(this,"[default]","icon"),this.hasFocus=!1,this.checked=!1,this.disabled=!1,this.size="lg"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","presentation")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(t){if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.checked=!0}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}focus(t){this.input.focus(t)}blur(){this.input.blur()}render(){const t=this.hasSlotController.test("[default]"),e=this.hasSlotController.test("icon"),i=`${this.size}-${t?"label":"no-label"}`;return ut`<div part="base" role="presentation" class="relative"><button part="${"button"+(this.checked?" button--checked":"")}" role="radio" aria-checked="${this.checked}" class="${xe("relative text-center border rounded-default transition-all ease-in-out duration-100 items-center justify-center focus-visible:focus-outline","sm"===this.size?"text-sm":"text-base",this.checked&&!this.disabled?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500":this.disabled&&!this.checked?"border-neutral-500 text-neutral-500 hover:cursor-not-allowed":this.disabled&&this.checked?"bg-neutral-500 text-white hover:cursor-not-allowed":"bg-transparent text-primary border-primary hover:bg-primary-100 hover:border-primary-500 hover:text-primary-500 cursor-pointer",t&&"px-4",this.hasFocus&&"focused-class",t&&"button--has-label",e&&"button--has-icon flex gap-2",i)}" aria-disabled="${this.disabled}" type="button" value="${ni(this.value)}" tabindex="${this.checked?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon" part="icon" class="${xe(e&&"inline-flex relative items-center",{sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size])}" ?hidden="${!e}"></slot>${t?ut`<slot part="label" class="button__label inline-flex relative items-center whitespace-nowrap"></slot>`:null}</button></div>`}};hs.styles=[oe.styles,Jt,A`:host{display:block;width:-moz-min-content;width:min-content}.hidden-input{all:unset;position:absolute;inset:var(--sd-spacing-0,0);z-index:-10;opacity:var(--sd-opacity-0,0);outline-style:dotted;outline-width:1px;outline-color:rgb(var(--sd-color-error,204 25 55) / 1)}.lg-label{height:var(--sd-spacing-12,3rem)}.lg-no-label{height:var(--sd-spacing-12,3rem);width:var(--sd-spacing-12,3rem)}.md-label{height:var(--sd-spacing-10,2.5rem)}.md-no-label{height:var(--sd-spacing-10,2.5rem);width:var(--sd-spacing-10,2.5rem)}.sm-label{height:var(--sd-spacing-8,2rem)}.sm-no-label{height:var(--sd-spacing-8,2rem);width:var(--sd-spacing-8,2rem)}:host(.sd-button-group__button--first:not(.sd-button-group__button--last)) button{border-top-right-radius:var(--sd-border-radius-none,0);border-bottom-right-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button--inner) button{border-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button--last:not(.sd-button-group__button--first)) button{border-top-left-radius:var(--sd-border-radius-none,0);border-bottom-left-radius:var(--sd-border-radius-none,0)}:host(.sd-button-group__button:not(.sd-button-group__button--first)){margin-inline-start:-1px}:host(.sd-button-group__button--hover){z-index:10}:host(.sd-button-group__button--focus),:host(.sd-button-group__button[checked]){z-index:20}`],ds([Vt(".button")],hs.prototype,"input",2),ds([Vt(".hidden-input")],hs.prototype,"hiddenInput",2),ds([Lt()],hs.prototype,"hasFocus",2),ds([Dt({type:Boolean,reflect:!0})],hs.prototype,"checked",2),ds([Dt()],hs.prototype,"value",2),ds([Dt({type:Boolean,reflect:!0})],hs.prototype,"disabled",2),ds([Dt({reflect:!0})],hs.prototype,"size",2),ds([Gt("disabled",{waitUntilFirstUpdate:!0})],hs.prototype,"handleDisabledChange",1),hs=ds([At("sd-radio-button")],hs);const cs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return hs}},Symbol.toStringTag,{value:"Module"})),ps=A`${Jt}:host{display:inline-block}.button-group{display:flex;flex-wrap:nowrap}`;var us=Object.defineProperty,gs=Object.getOwnPropertyDescriptor,ms=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?gs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&us(e,i,s),s};let bs=class extends oe{constructor(){super(...arguments),this.disableRole=!1,this.label=""}handleFocus(t){const e=vs(t.target);null==e||e.classList.add("sd-button-group__button--focus")}handleBlur(t){const e=vs(t.target);null==e||e.classList.remove("sd-button-group__button--focus")}handleMouseOver(t){const e=vs(t.target);null==e||e.classList.add("sd-button-group__button--hover")}handleMouseOut(t){const e=vs(t.target);null==e||e.classList.remove("sd-button-group__button--hover")}handleSlotChange(){const t=[...this.defaultSlot.assignedElements({flatten:!0})];t.forEach((e=>{const i=t.indexOf(e),o=vs(e);null!==o&&(o.classList.add("sd-button-group__button"),o.classList.toggle("sd-button-group__button--first",0===i),o.classList.toggle("sd-button-group__button--inner",i>0&&i<t.length-1),o.classList.toggle("sd-button-group__button--last",i===t.length-1),o.classList.toggle("sd-button-group__button--radio","sd-radio-button"===o.tagName.toLowerCase()))}))}render(){return ut`<slot part="base" class="button-group" role="${this.disableRole?"presentation":"group"}" aria-label="${this.label}" @focusout="${this.handleBlur}" @focusin="${this.handleFocus}" @mouseover="${this.handleMouseOver}" @mouseout="${this.handleMouseOut}" @slotchange="${this.handleSlotChange}"></slot>`}};function vs(t){const e="sd-button, sd-radio-button";return t.closest(e)??t.querySelector(e)}bs.styles=ps,ms([Vt("slot")],bs.prototype,"defaultSlot",2),ms([Lt()],bs.prototype,"disableRole",2),ms([Dt()],bs.prototype,"label",2),bs=ms([At("sd-button-group")],bs);var ys=Object.defineProperty,fs=Object.getOwnPropertyDescriptor,ws=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?fs(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ys(e,i,s),s};let xs=class extends oe{constructor(){super(...arguments),this.checked=!1,this.hasFocus=!1,this.size="lg",this.invalid=!1,this.disabled=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.setInitialAttributes(),this.addEventListeners()}disconnectedCallback(){this.removeEventListeners()}addEventListeners(){this.addEventListener("blur",this.handleBlur),this.addEventListener("click",this.handleClick),this.addEventListener("focus",this.handleFocus)}removeEventListeners(){this.removeEventListener("blur",this.handleBlur),this.removeEventListener("click",this.handleClick),this.removeEventListener("focus",this.handleFocus)}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleClick(){this.disabled||(this.checked=!0)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}setInitialAttributes(){this.setAttribute("role","radio"),this.setAttribute("tabindex","-1"),this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleCheckedChange(){this.setAttribute("aria-checked",this.checked?"true":"false"),this.setAttribute("tabindex",this.checked?"0":"-1")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}render(){return ut`<span part="base" class="${xe("sd-radio group inline-flex items-start items-center text-base leading-normal text-black cursor-pointer align-middle",this.disabled&&"hover:cursor-not-allowed",{sm:"small-size text-sm",lg:"text-base"}[this.size])}"><span part="${this.checked?"control--checked":"control--unchecked"}" class="${xe("flex-initial shrink-0 relative inline-flex items-center justify-center border rounded-full bg-white h-4 w-4",this.disabled?"border-neutral-500":this.invalid?"border-error hover:border-error-400 group-hover:border-error-400":this.checked?"border-accent hover:border-accent-550 group-hover:border-accent-550":"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200")}">${this.checked?ut`<span part="checked" class="${xe("rounded-full inline-flex text-white border bg-accent h-2.5 w-2.5",this.disabled?"bg-neutral-500":this.invalid?"bg-error hover:bg-error-400 group-hover:bg-error-400":this.checked?"bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"bg-neutral-800")}"></span>`:""}</span><slot part="label" class="${xe("ml-2 select-none inline-block",this.disabled?"text-neutral-500":this.invalid?"text-error":"text-black")}"></slot></span>`}};xs.styles=[oe.styles,A`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host(:focus-visible) [part=control--checked],:host(:focus-visible) [part=control--unchecked]{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:rgb(var(--sd-color-primary,0 53 142) / 1)}`],ws([Lt()],xs.prototype,"checked",2),ws([Lt()],xs.prototype,"hasFocus",2),ws([Dt({reflect:!0})],xs.prototype,"size",2),ws([Dt({type:Boolean,reflect:!0})],xs.prototype,"invalid",2),ws([Dt({type:Boolean,reflect:!0})],xs.prototype,"disabled",2),ws([Dt()],xs.prototype,"value",2),ws([Gt("checked")],xs.prototype,"handleCheckedChange",1),ws([Gt("disabled",{waitUntilFirstUpdate:!0})],xs.prototype,"handleDisabledChange",1),xs=ws([At("sd-radio")],xs);const ks=Object.freeze(Object.defineProperty({__proto__:null,get default(){return xs}},Symbol.toStringTag,{value:"Module"}));var Cs=Object.defineProperty,$s=Object.getOwnPropertyDescriptor,Ss=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?$s(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Cs(e,i,s),s};let _s=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this),this.hasSlotController=new ei(this,"label","error-text"),this.customValidityMessage="",this.hasButtonGroup=!1,this.defaultValue="",this.showInvalidStyle=!1,this.label="",this.boldLabel=!1,this.name="option",this.value="",this.size="lg",this.form="",this.required=!1,this.orientation="vertical"}get validity(){const t=this.required&&!this.value;return""!==this.customValidityMessage?ti:t?Qe:Je}get validationMessage(){const t=this.required&&!this.value;return""!==this.customValidityMessage?this.customValidityMessage:t?this.validationInput.validationMessage:""}connectedCallback(){super.connectedCallback(),this.defaultValue=this.value}firstUpdated(){this.formControlController.updateValidity()}getAllRadios(){return[...this.querySelectorAll("sd-radio, sd-radio-button")]}handleRadioClick(t){const e=t.target.closest("sd-radio, sd-radio-button"),i=this.getAllRadios(),o=this.value;e.disabled||(this.value=e.value,i.forEach((t=>t.checked=t===e)),this.value!==o&&(this.emit("sd-change"),this.emit("sd-input")))}handleKeyDown(t){if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(t.key))return;const e=this.getAllRadios().filter((t=>!t.disabled)),i=e.find((t=>t.checked))??e[0],o=" "===t.key?0:["ArrowUp","ArrowLeft"].includes(t.key)?-1:1,r=this.value;let s=e.indexOf(i)+o;s<0&&(s=e.length-1),s>e.length-1&&(s=0),this.getAllRadios().forEach((t=>{t.checked=!1,this.hasButtonGroup||(t.tabIndex=-1)})),this.value=e[s].value,e[s].checked=!0,this.hasButtonGroup?e[s].shadowRoot.querySelector("button").focus():(e[s].tabIndex=0,e[s].focus()),this.value!==r&&(this.emit("sd-change"),this.emit("sd-input")),t.preventDefault()}focus(){const t=this.getAllRadios(),e=t.find((t=>t.checked))||t[0];e&&e.focus()}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}async syncRadioElements(){var t,e;const i=this.getAllRadios();if(await Promise.all(i.map((async t=>{await t.updateComplete,t.checked=t.value===this.value,t.size=this.size,t instanceof xs&&(t.invalid=this.showInvalidStyle)}))),this.hasButtonGroup=i.some((t=>"sd-radio-button"===t.tagName.toLowerCase())),!i.some((t=>t.checked)))if(this.hasButtonGroup){const e=null==(t=i[0].shadowRoot)?void 0:t.querySelector("button");e&&(e.tabIndex=0)}else i[0].tabIndex=0;if(this.hasButtonGroup){const t=null==(e=this.shadowRoot)?void 0:e.querySelector("sd-button-group");t&&(t.disableRole=!0)}}syncRadios(){customElements.get("sd-radio")&&customElements.get("sd-radio-button")?this.syncRadioElements():(customElements.get("sd-radio")?this.syncRadioElements():customElements.whenDefined("sd-radio").then((()=>this.syncRadios())),customElements.get("sd-radio-button")?this.syncRadioElements():customElements.whenDefined("sd-radio-button").then((()=>this.syncRadios())))}updateCheckedRadio(){this.getAllRadios().forEach((t=>t.checked=t.value===this.value)),this.formControlController.setValidity(this.validity.valid)}handleSizeChange(){this.syncRadios()}handleInvalidChange(){this.syncRadios()}handleValueChange(){this.hasUpdated&&(this.updateCheckedRadio(),this.reportValidity())}checkValidity(){const t=this.required&&!this.value,e=""!==this.customValidityMessage;return!t&&!e||(this.formControlController.emitInvalidEvent(),!1)}getForm(){return this.formControlController.getForm()}reportValidity(){const t=this.validity.valid;return this.formControlController.setValidity(t),this.validationInput.hidden=!0,clearTimeout(this.validationTimeout),this.formControlController.fakeUserInteraction(),t||(this.validationInput.hidden=!1,this.validationInput.reportValidity(),this.validationTimeout=setTimeout((()=>this.validationInput.hidden=!0),1e4)),t}setCustomValidity(t=""){this.customValidityMessage=t,this.validationInput.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=!!this.label||!!t,i=ut`<slot @slotchange="${this.syncRadios}" @click="${this.handleRadioClick}" @keydown="${this.handleKeyDown}"></slot>`;return ut`<fieldset part="form-control" class="${xe("border-0 p-0 m-0 flex flex-col",{sm:"text-sm",lg:"text-base"}[this.size])}" role="radiogroup" aria-labelledby="label" aria-errormessage="error-text"><label part="form-control-label" id="label" class="${xe("mb-2 p-0 leading-normal text-black text-left",!e&&"hidden",this.boldLabel&&"font-bold")}" @click="${this.focus}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${xe("flex",{vertical:"flex-col",horizontal:"flex-row"}[this.orientation])}"><div class="sr-only"><label><input id="validation-input" type="text" ?required="${this.required}" tabindex="-1" hidden @invalid="${this.handleInvalid}"></label></div>${this.hasButtonGroup?ut`<sd-button-group part="button-group" exportparts="base:button-group__base" role="presentation">${i}</sd-button-group>`:i}</div></fieldset>${this.formControlController.renderInvalidMessage()}`}};_s.dependencies={"sd-button-group":bs},_s.styles=[Jt,oe.styles,A`:host{display:block}:host([orientation=vertical]) ::slotted(sd-radio){margin-bottom:var(--sd-spacing-2,.5rem);display:flex}:host([orientation=vertical]) ::slotted(sd-radio:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-radio){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-radio:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([required]) #label::after{content:' *'}`],Ss([Vt("slot:not([name])")],_s.prototype,"defaultSlot",2),Ss([Vt("#validation-input")],_s.prototype,"validationInput",2),Ss([Vt("#invalid-message")],_s.prototype,"invalidMessage",2),Ss([Lt()],_s.prototype,"hasButtonGroup",2),Ss([Lt()],_s.prototype,"defaultValue",2),Ss([Lt()],_s.prototype,"showInvalidStyle",2),Ss([Dt()],_s.prototype,"label",2),Ss([Dt({type:Boolean,reflect:!0})],_s.prototype,"boldLabel",2),Ss([Dt()],_s.prototype,"name",2),Ss([Dt({reflect:!0})],_s.prototype,"value",2),Ss([Dt({reflect:!0})],_s.prototype,"size",2),Ss([Dt({reflect:!0})],_s.prototype,"form",2),Ss([Dt({type:Boolean,reflect:!0})],_s.prototype,"required",2),Ss([Dt({reflect:!0})],_s.prototype,"orientation",2),Ss([Gt("size",{waitUntilFirstUpdate:!0})],_s.prototype,"handleSizeChange",1),Ss([Gt("showInvalidStyle",{waitUntilFirstUpdate:!0})],_s.prototype,"handleInvalidChange",1),Ss([Gt("value")],_s.prototype,"handleValueChange",1),_s=Ss([At("sd-radio-group")],_s);const zs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return _s}},Symbol.toStringTag,{value:"Module"}));var Os=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,Ps=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Es(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Os(e,i,s),s};let As=class extends oe{constructor(){super(...arguments),this.size="lg",this.selected=!1,this.removable=!1,this.disabled=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemoveClick(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}render(){const t=this.isLink(),e=t?ri`a`:ri`button`;return ai`<${e} part="base" type="${ni(t?void 0:"button")}" href="${ni(t?this.href:void 0)}" rel="${ni(t&&this.target?"noreferrer noopener":void 0)}" target="${ni(t?this.target:void 0)}" download="${ni(t?this.download:void 0)}" ?disabled="${ni(t?void 0:this.disabled)}" aria-disabled="${this.disabled?"true":"false"}" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${xe("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":"border-primary text-primary hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500 disabled:border-neutral-500 disabled:text-neutral-500",this.disabled&&!t&&"cursor-not-allowed")}"><slot part="content"></slot>${this.removable?ai`<slot part="removable-indicator" name="removable-indicator" @click="${this.handleRemoveClick}" class="${xe({lg:"text-base",sm:"text-[12px]"}[this.size])}"><sd-icon library="system" name="close" label="remove"></sd-icon></slot>`:""}</${e}>`}};As.styles=[oe.styles,A`:host{display:inline-block}`],Ps([Vt("a, button")],As.prototype,"tag",2),Ps([Dt({reflect:!0})],As.prototype,"size",2),Ps([Dt({type:Boolean,reflect:!0})],As.prototype,"selected",2),Ps([Dt({type:Boolean,reflect:!0})],As.prototype,"removable",2),Ps([Dt({type:Boolean,reflect:!0})],As.prototype,"disabled",2),Ps([Dt()],As.prototype,"href",2),Ps([Dt()],As.prototype,"target",2),Ps([Dt()],As.prototype,"download",2),As=Ps([At("sd-tag")],As);const Ts=Object.freeze(Object.defineProperty({__proto__:null,get default(){return As}},Symbol.toStringTag,{value:"Module"}));var Ms=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Ls=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ds(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ms(e,i,s),s};let Bs=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this,{assumeInteractionOn:["sd-blur","sd-input"]}),this.hasSlotController=new ei(this,"help-text","label"),this.localize=new C(this),this.typeToSelectString="",this.hasHover=!1,this.displayLabel="",this.hasFocus=!1,this.selectedOptions=[],this.showValidStyle=!1,this.showInvalidStyle=!1,this.defaultValue="",this.open=!1,this.size="lg",this.label="",this.placeholder=this.localize.term("selectDefaultPlaceholder"),this.helpText="",this.placement="bottom",this.currentPlacement=this.placement,this.clearable=!1,this.disabled=!1,this.multiple=!1,this.useTags=!1,this.maxOptionsVisible=3,this.form="",this.name="",this.value="",this.required=!1,this.styleOnValid=!1,this.hoist=!1,this.getTag=t=>ut`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
95
95
|
base:tag__base,
|
|
96
96
|
content:tag__content,
|
|
97
97
|
removable-indicator:tag__removable-indicator,
|
|
98
98
|
" size="${"sm"===this.size?"sm":"lg"}" removable @sd-remove="${e=>this.handleTagRemove(e,t)}">${t.getTextLabel()}</sd-tag>`,this.handleDocumentFocusIn=t=>{const e=t.composedPath();this&&!e.includes(this)&&this.hide()},this.handleDocumentKeyDown=t=>{const e=t.target,i=null!==e.closest(".select__clear"),o=null!==e.closest("sd-icon-button");if(!i&&!o){if("Escape"===t.key&&this.open&&(t.preventDefault(),t.stopPropagation(),this.hide(),this.displayInput.focus({preventScroll:!0})),"Enter"===t.key||" "===t.key&&""===this.typeToSelectString)return t.preventDefault(),t.stopImmediatePropagation(),this.open?void(this.currentOption&&!this.currentOption.disabled&&(this.multiple?this.toggleOptionSelection(this.currentOption):this.setSelectedOptions(this.currentOption),this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))):void this.show();if(["ArrowUp","ArrowDown","Home","End"].includes(t.key)){const e=this.getAllOptions(),i=e.indexOf(this.currentOption);let o=Math.max(0,i);if(t.preventDefault(),!this.open&&(this.show(),this.currentOption))return;"ArrowDown"===t.key?(o=i+1,o>e.length-1&&(o=0)):"ArrowUp"===t.key?(o=i-1,o<0&&(o=e.length-1)):"Home"===t.key?o=0:"End"===t.key&&(o=e.length-1),this.setCurrentOption(e[o])}if(1===t.key.length||"Backspace"===t.key){const e=this.getAllOptions();if(t.metaKey||t.ctrlKey||t.altKey)return;if(!this.open){if("Backspace"===t.key)return;this.show()}t.stopPropagation(),t.preventDefault(),clearTimeout(this.typeToSelectTimeout),this.typeToSelectTimeout=window.setTimeout((()=>this.typeToSelectString=""),1e3),"Backspace"===t.key?this.typeToSelectString=this.typeToSelectString.slice(0,-1):this.typeToSelectString+=t.key.toLowerCase();for(const t of e)if(t.getTextLabel().toLowerCase().startsWith(this.typeToSelectString)){this.setCurrentOption(t);break}}}},this.handleDocumentMouseDown=t=>{const e=t.composedPath();this&&!e.includes(this)&&this.hide()}}get validity(){return this.valueInput.validity}get validationMessage(){return this.valueInput.validationMessage}connectedCallback(){super.connectedCallback(),this.applySizeToOptions(),this.open=!1}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}handleFocus(){this.hasFocus=!0,this.displayInput.setSelectionRange(0,0),this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleLabelClick(){this.displayInput.focus()}handleComboboxMouseDown(t){const e=t.composedPath().some((t=>t instanceof HTMLSlotElement&&"removable-indicator"===t.name));this.disabled||e||(t.preventDefault(),this.displayInput.focus({preventScroll:!0}),this.open=!this.open)}handleComboboxKeyDown(t){t.stopPropagation(),this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),""!==this.value&&(this.setSelectedOptions([]),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then((()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")})))}handleClearMouseDown(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){const e=t.target.closest("sd-option"),i=this.value;e&&!e.disabled&&(this.multiple?this.toggleOptionSelection(e):this.setSelectedOptions(e),this.updateComplete.then((()=>this.displayInput.focus({preventScroll:!0}))),this.value!==i&&this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}handleDefaultSlotChange(){const t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value],i=[];customElements.get("sd-option")?(t.forEach((t=>{this.multiple&&(t.checkbox=!0),i.push(t.value)})),this.setSelectedOptions(t.filter((t=>e.includes(t.value))))):customElements.whenDefined("sd-option").then((()=>this.handleDefaultSlotChange()))}handleTagRemove(t,e){t.stopPropagation(),this.disabled||(this.toggleOptionSelection(e,!1),this.updateComplete.then((()=>{this.emit("sd-input"),this.emit("sd-change")})))}getAllOptions(){return[...this.querySelectorAll("sd-option")]}getFirstOption(){return this.querySelector("sd-option")}setCurrentOption(t){this.getAllOptions().forEach((t=>{t.current=!1,t.tabIndex=-1})),t&&(this.currentOption=t,t.current=!0,t.tabIndex=0,t.focus())}setSelectedOptions(t){const e=this.getAllOptions(),i=Array.isArray(t)?t:[t];e.forEach((t=>t.selected=!1)),i.length&&i.forEach((t=>t.selected=!0)),this.selectionChanged()}toggleOptionSelection(t,e){t.selected=!0===e||!1===e?e:!t.selected,this.selectionChanged()}selectionChanged(){var t,e;this.selectedOptions=this.getAllOptions().filter((t=>t.selected)),this.multiple?(this.value=this.selectedOptions.map((t=>t.value)),this.useTags||0===this.value.length?this.displayLabel="":this.displayLabel=this.localize.term("numOptionsSelected",this.selectedOptions.length)):(this.value=(null==(t=this.selectedOptions[0])?void 0:t.value)??"",this.displayLabel=(null==(e=this.selectedOptions[0])?void 0:e.getTextLabel())??""),this.updateComplete.then((()=>{this.formControlController.updateValidity()}))}get tags(){return this.selectedOptions.map(((t,e)=>{if(e<this.maxOptionsVisible||this.maxOptionsVisible<=0){const i=this.getTag(t,e);return ut`<div @sd-remove="${e=>this.handleTagRemove(e,t)}">${"string"==typeof i?Wt(i):i}</div>`}return e===this.maxOptionsVisible?ut`<sd-tag size="${"sm"===this.size?"sm":"lg"}" ?disabled="${this.disabled}">+${this.selectedOptions.length-e}</sd-tag>`:ut``}))}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleCurrentPlacement(t){const e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){const t=this.getAllOptions();customElements.get("sd-option")&&t.forEach((t=>{t.checkbox=this.multiple}))}handleDisabledChange(){this.disabled&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&!this.disabled){this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await ue(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame((()=>{this.setCurrentOption(this.currentOption)}));const{keyframes:t,options:e}=fe(this,"select.show",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.currentOption&&qi(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await ue(this);const{keyframes:t,options:e}=fe(this,"select.hide",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach((t=>{t.size=this.size}))}handleValueChange(){const t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter((t=>e.includes(t.value))))}async show(){if(!this.open&&!this.disabled)return this.open=!0,we(this,"sd-after-show");this.open=!1}async hide(){if(this.open&&!this.disabled)return this.open=!1,we(this,"sd-after-hide");this.open=!1}checkValidity(){var t;return null==(t=this.valueInput)?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}render(){this.hasSlotController.test("[default]");const t=this.hasSlotController.test("label"),e=(this.hasSlotController.test("clear-icon"),this.hasSlotController.test("expand-icon"),this.hasSlotController.test("help-text")),i=!!this.label||!!t,o=!!this.helpText||!!e,r=this.clearable&&!this.disabled&&this.value.length>0,s=this.disabled?"disabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",a=this.disabled?"cursor-not-allowed":"cursor-pointer",n={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],l={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return ut`<div part="form-control" class="${xe("relative text-left",a,"sm"===this.size?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${i&&"inline-block mb-2"}" aria-hidden="${i?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${xe("relative w-full bg-white",{disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[s])}"><div part="border" class="${xe("absolute top-0 w-full h-full pointer-events-none border rounded-default",this.hasHover&&"bg-neutral-200",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[s],this.open&&("bottom"===this.currentPlacement?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${xe("inline-flex relative w-full","bottom"===this.currentPlacement?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
99
99
|
popup:popup__content,
|
|
100
|
-
"><div part="combobox" class="${xe("relative w-full px-4 flex flex-row items-center rounded-default",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${xe("appearance-none outline-none flex-grow bg-transparent",a,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?ut`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""} <input class="${xe("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",a)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${r?ut`<button part="clear-button" class="${xe("select__clear flex justify-center",n)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${xe("text-neutral-500",l)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?ut`<sd-icon part="invalid-icon" class="${xe("text-error",n,l)}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?ut`<sd-icon part="valid-icon" class="${xe("text-success",n,l)}" library="system" name="confirm"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${xe("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",l)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${xe("bg-white px-2 py-3 relative","bottom"===this.currentPlacement?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};Bs.dependencies={"sd-icon":le,"sd-popup":br,"sd-tag":As},Bs.styles=[Jt,oe.styles,A`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}`],Ls([It({selector:"sd-option"})],Bs.prototype,"_optionsInDefaultSlot",2),Ls([Vt("sd-popup")],Bs.prototype,"popup",2),Ls([Vt('[part="combobox"]')],Bs.prototype,"combobox",2),Ls([Vt('[part="display-input"]')],Bs.prototype,"displayInput",2),Ls([Vt(".value-input")],Bs.prototype,"valueInput",2),Ls([Vt('[part="listbox"]')],Bs.prototype,"listbox",2),Ls([Vt("#invalid-message")],Bs.prototype,"invalidMessage",2),Ls([Lt()],Bs.prototype,"hasHover",2),Ls([Lt()],Bs.prototype,"displayLabel",2),Ls([Lt()],Bs.prototype,"hasFocus",2),Ls([Lt()],Bs.prototype,"currentOption",2),Ls([Lt()],Bs.prototype,"selectedOptions",2),Ls([Lt()],Bs.prototype,"showValidStyle",2),Ls([Lt()],Bs.prototype,"showInvalidStyle",2),Ls([Di()],Bs.prototype,"defaultValue",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"open",2),Ls([Dt({reflect:!0})],Bs.prototype,"size",2),Ls([Dt()],Bs.prototype,"label",2),Ls([Dt()],Bs.prototype,"placeholder",2),Ls([Dt({attribute:"help-text"})],Bs.prototype,"helpText",2),Ls([Dt({reflect:!0})],Bs.prototype,"placement",2),Ls([Lt()],Bs.prototype,"currentPlacement",2),Ls([Dt({type:Boolean})],Bs.prototype,"clearable",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"disabled",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"multiple",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"useTags",2),Ls([Dt({attribute:"max-options-visible",type:Number})],Bs.prototype,"maxOptionsVisible",2),Ls([Dt({reflect:!0})],Bs.prototype,"form",2),Ls([Dt()],Bs.prototype,"name",2),Ls([Dt({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],Bs.prototype,"value",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"required",2),Ls([Dt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Bs.prototype,"styleOnValid",2),Ls([Dt({type:Boolean})],Bs.prototype,"hoist",2),Ls([Dt()],Bs.prototype,"getTag",2),Ls([Gt("useTags",{waitUntilFirstUpdate:!0})],Bs.prototype,"handleUseTagsChange",1),Ls([Gt("disabled",{waitUntilFirstUpdate:!0})],Bs.prototype,"handleDisabledChange",1),Ls([Gt("open",{waitUntilFirstUpdate:!0})],Bs.prototype,"handleOpenChange",1),Ls([Gt("size",{waitUntilFirstUpdate:!0})],Bs.prototype,"applySizeToOptions",1),Ls([Gt("value",{waitUntilFirstUpdate:!0})],Bs.prototype,"handleValueChange",1),Bs=Ls([At("sd-select")],Bs),ye("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),ye("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const Vs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Bs}},Symbol.toStringTag,{value:"Module"}));var Is=Object.defineProperty,js=Object.getOwnPropertyDescriptor,Fs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?js(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Is(e,i,s),s};let Us=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.showInvalidStyle=!1,this.title="",this.name="",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){return ut`<label part="base" class="${xe("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ni(this.value)}" .checked="${Bi(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"}" class="${xe("relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100\n peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\n peer-focus-visible:outline-primary",this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${xe("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${xe("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};Us.styles=[oe.styles,A`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label::after{content:' *'}`],Fs([Vt("input")],Us.prototype,"input",2),Fs([Vt("#invalid-message")],Us.prototype,"invalidMessage",2),Fs([Lt()],Us.prototype,"showInvalidStyle",2),Fs([Dt()],Us.prototype,"title",2),Fs([Dt()],Us.prototype,"name",2),Fs([Dt()],Us.prototype,"value",2),Fs([Dt({type:Boolean,reflect:!0})],Us.prototype,"disabled",2),Fs([Dt({type:Boolean,reflect:!0})],Us.prototype,"checked",2),Fs([Di("checked")],Us.prototype,"defaultChecked",2),Fs([Dt({reflect:!0})],Us.prototype,"form",2),Fs([Dt({type:Boolean,reflect:!0})],Us.prototype,"required",2),Fs([Gt("disabled",{waitUntilFirstUpdate:!0})],Us.prototype,"handleDisabledChange",1),Fs([Gt(["checked"],{waitUntilFirstUpdate:!0})],Us.prototype,"handleStateChange",1),Us=Fs([At("sd-switch")],Us);const Rs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Us}},Symbol.toStringTag,{value:"Module"}));var Hs=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor,qs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ns(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Hs(e,i,s),s};let Ks=class extends oe{constructor(){super(...arguments),this.variant="white",this.hasSlotController=new ei(this,"[default]","media","meta","headline","expandable")}render(){const t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return ut`<div class="relative flex flex-col group" part="base"><div class="${xe("mb-4",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${xe("flex-1","gradient-white"===this.variant&&"bg-gradient-to-t from-white/[.8] to-60%","gradient-dark"===this.variant&&"bg-gradient-to-t from-primary-800/[.6] to-60%")}"></div><div class="${xe({white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"bg-neutral-100/[.8] group-hover:bg-neutral-100/90",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"bg-primary-100/[.8] group-hover:bg-primary-100/90","gradient-white":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/[.6] text-white"}[this.variant])}"><div class="flex-col text-left p-4" part="content"><div part="meta" class="${xe("gap-2 mb-4",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="text-lg font-bold m-0"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div class="${xe("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable"><slot name="expandable"></slot></div><div part="main" class="${xe(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div></div>`}};Ks.styles=[oe.styles,A`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){margin:var(--sd-spacing-0,0)!important;font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700}`],qs([Dt({reflect:!0})],Ks.prototype,"variant",2),qs([Vt('[part="base"]')],Ks.prototype,"teaserMedia",2),Ks=qs([At("sd-teaser-media")],Ks);const Zs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ks}},Symbol.toStringTag,{value:"Module"}));var Ws=Object.defineProperty,Ys=Object.getOwnPropertyDescriptor,Xs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ys(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ws(e,i,s),s};let Gs=class extends oe{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new ei(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),0===this.breakpoint?this._orientation="horizontal":9999===this.breakpoint?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updateOrientation())),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){const t="white border-neutral-400"===this.variant||this.inset,e=this.hasSlotController.test("[default]"),i=this.hasSlotController.test("media"),o=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),ut`<div class="${xe("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],"vertical"===this._orientation&&"flex-col","horizontal"===this._orientation&&"flex-row gap-8","horizontal"===this._orientation&&t&&"py-8 px-10")}" part="base"><div style="${"horizontal"===this._orientation?"width: var(--distribution-media, 100%);":""}" class="${xe(!t&&"vertical"===this._orientation&&"mb-4",!i&&"hidden","white border-neutral-400"===this.variant&&"vertical"===this._orientation&&"mx-[-1px] mt-[-1px]")}" part="media"><slot name="media"></slot></div><div style="${"horizontal"===this._orientation?"width: var(--distribution-content, 100%); "+(t?"width: var(--distribution-content, calc(100% - 2rem));":""):""}" class="${xe("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&t&&"m-4")}" part="content"><div part="meta" class="${xe("gap-2 mb-4",!o&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="${xe("text-lg font-bold m-0","primary"===this.variant?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="main" class="${xe(!e&&"hidden")}"><slot></slot></div></div></div>`}};Gs.styles=[oe.styles,A`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){margin:var(--sd-spacing-0,0)!important;font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700}`],Xs([Dt({reflect:!0})],Gs.prototype,"variant",2),Xs([Dt({reflect:!0,type:Number})],Gs.prototype,"breakpoint",2),Xs([Dt({type:Boolean,reflect:!0})],Gs.prototype,"inset",2),Xs([Vt('[part="base"]')],Gs.prototype,"teaser",2),Xs([Lt()],Gs.prototype,"_orientation",2),Gs=Xs([At("sd-teaser")],Gs);const Js=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Gs}},Symbol.toStringTag,{value:"Module"}));var Qs=Object.defineProperty,ta=Object.getOwnPropertyDescriptor,ea=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ta(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Qs(e,i,s),s};let ia=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this),this.hasSlotController=new ei(this,"help-text","label"),this.hasFocus=!1,this.showValidStyle=!1,this.showInvalidStyle=!1,this.title="",this.name="",this.value="",this.size="lg",this.label="",this.helpText="",this.placeholder="",this.rows=4,this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.styleOnValid=!1,this.spellcheck=!0,this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.setTextareaHeight()}))}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){return t?("number"==typeof t.top&&(this.textarea.scrollTop=t.top),void("number"==typeof t.left&&(this.textarea.scrollLeft=t.left))):{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,i="none"){this.textarea.setSelectionRange(t,e,i)}setRangeText(t,e,i,o){this.textarea.setRangeText(t,e,i,o),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return null==(t=this.textarea)?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=this.hasSlotController.test("help-text"),i=!!this.label||!!t,o=!!this.helpText||!!e,r=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",s="sm"===this.size?"text-sm":"text-base",a={sm:"text-base ml-1",md:"text-lg ml-2",lg:"text-xl ml-2"}[this.size];return ut`<div part="form-control" class="text-left"><label part="form-control-label" id="label" class="${xe("mb-2",i?"inline-block":"hidden",s)}" for="input" aria-hidden="${i?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${xe("relative w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${xe("absolute w-full h-full pointer-events-none border rounded-default",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[r])}"></div><div part="base" class="${xe("textarea px-4 flex items-top rounded-default bg-white group",{sm:"textarea-sm py-1",md:"textarea-md py-1",lg:"textarea-lg py-2"}[this.size],{disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[r],this.disabled||this.readonly?"":"hover:bg-neutral-200",this.readonly&&"bg-neutral-100")}"><textarea part="textarea" id="input" class="${xe("flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",this.disabled&&"cursor-not-allowed",s)}" title="${this.title}" name="${ni(this.name)}" .value="${Bi(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ni(this.placeholder)}" minlength="${ni(this.minlength)}" maxlength="${ni(this.maxlength)}" rows="${ni(this.rows)}" autocapitalize="${ni(this.autocapitalize)}" autocorrect="${ni(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ni(this.spellcheck)}" enterkeyhint="${ni(this.enterkeyhint)}" inputmode="${ni(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?ut`<sd-icon class="${xe("text-error absolute right-4 bg-white group-hover:bg-neutral-200",a)}" library="system" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?ut`<sd-icon class="${xe("text-success absolute right-4 bg-white group-hover:bg-neutral-200",a)}" library="system" name="confirm" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${xe("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${o?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};ia.styles=[Jt,oe.styles,A`:host{display:block}:host([required]) #label::after{content:' *'}.no-scrollbar::-webkit-scrollbar{display:none}`],ea([Vt("#input")],ia.prototype,"textarea",2),ea([Vt("#invalid-message")],ia.prototype,"invalidMessage",2),ea([Lt()],ia.prototype,"hasFocus",2),ea([Lt()],ia.prototype,"showValidStyle",2),ea([Lt()],ia.prototype,"showInvalidStyle",2),ea([Dt()],ia.prototype,"title",2),ea([Dt()],ia.prototype,"name",2),ea([Dt()],ia.prototype,"value",2),ea([Dt({reflect:!0})],ia.prototype,"size",2),ea([Dt()],ia.prototype,"label",2),ea([Dt({attribute:"help-text"})],ia.prototype,"helpText",2),ea([Dt()],ia.prototype,"placeholder",2),ea([Dt({type:Number})],ia.prototype,"rows",2),ea([Dt({type:Boolean,reflect:!0})],ia.prototype,"disabled",2),ea([Dt({type:Boolean,reflect:!0})],ia.prototype,"readonly",2),ea([Dt({reflect:!0})],ia.prototype,"form",2),ea([Dt({type:Boolean,reflect:!0})],ia.prototype,"required",2),ea([Dt({type:Number})],ia.prototype,"minlength",2),ea([Dt({type:Number})],ia.prototype,"maxlength",2),ea([Dt()],ia.prototype,"autocapitalize",2),ea([Dt()],ia.prototype,"autocorrect",2),ea([Dt()],ia.prototype,"autocomplete",2),ea([Dt({type:Boolean})],ia.prototype,"autofocus",2),ea([Dt()],ia.prototype,"enterkeyhint",2),ea([Dt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],ia.prototype,"styleOnValid",2),ea([Dt({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],ia.prototype,"spellcheck",2),ea([Dt()],ia.prototype,"inputmode",2),ea([Di()],ia.prototype,"defaultValue",2),ea([Gt("disabled",{waitUntilFirstUpdate:!0})],ia.prototype,"handleDisabledChange",1),ea([Gt("rows",{waitUntilFirstUpdate:!0})],ia.prototype,"handleRowsChange",1),ea([Gt("value",{waitUntilFirstUpdate:!0})],ia.prototype,"handleValueChange",1),ia=ea([At("sd-textarea")],ia);const oa=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ia}},Symbol.toStringTag,{value:"Module"}));var ra=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,aa=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?sa(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ra(e,i,s),s};let na=class extends oe{constructor(){super(...arguments),this.localize=new C(this),this.content="",this.placement="top",this.size="lg",this.disabled=!1,this.open=!1,this.trigger="click focus",this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then((()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}))}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.show()}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){const t=ce(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}}handleMouseOut(){if(this.hasTrigger("hover")){const t=ce(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await ue(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:t,options:e}=fe(this,"tooltip.show",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await ue(this.body);const{keyframes:t,options:e}=fe(this,"tooltip.hide",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}render(){const t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return ut`<sd-popup part="base" exportparts="
|
|
100
|
+
"><div part="combobox" class="${xe("relative w-full px-4 flex flex-row items-center rounded-default",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @mouseenter="${this.handleMouseEnter}" @mouseleave="${this.handleMouseLeave}"><input name="${this.name}" form="${this.form}" part="display-input" class="${xe("appearance-none outline-none flex-grow bg-transparent w-full",a,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" placeholder="${this.placeholder}" .disabled="${this.disabled}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled?"true":"false"}" aria-describedby="help-text" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${this.multiple&&this.useTags?ut`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""} <input class="${xe("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",a)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${r?ut`<button part="clear-button" class="${xe("select__clear flex justify-center",n)}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${xe("text-neutral-500",l)}" library="system" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?ut`<sd-icon part="invalid-icon" class="${xe("text-error",n,l)}" library="system" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?ut`<sd-icon part="valid-icon" class="${xe("text-success flex-shrink-0",n,l)}" library="system" name="confirm"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${xe("inline-flex ml-2 transition-all",this.open?"rotate-180":"rotate-0",l)}"><sd-icon name="chevron-down" part="chevron" library="system" color="currentColor"></sd-icon></slot></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${xe("bg-white px-2 py-3 relative","bottom"===this.currentPlacement?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700" part="form-control-help-text" id="help-text" aria-hidden="${o?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};Bs.dependencies={"sd-icon":le,"sd-popup":br,"sd-tag":As},Bs.styles=[Jt,oe.styles,A`:host{position:relative;display:block;width:100%}:host([required]) #label::after{content:' *'}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900);overflow-y:scroll}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249) / var(--tw-bg-opacity))}`],Ls([It({selector:"sd-option"})],Bs.prototype,"_optionsInDefaultSlot",2),Ls([Vt("sd-popup")],Bs.prototype,"popup",2),Ls([Vt('[part="combobox"]')],Bs.prototype,"combobox",2),Ls([Vt('[part="display-input"]')],Bs.prototype,"displayInput",2),Ls([Vt(".value-input")],Bs.prototype,"valueInput",2),Ls([Vt('[part="listbox"]')],Bs.prototype,"listbox",2),Ls([Vt("#invalid-message")],Bs.prototype,"invalidMessage",2),Ls([Lt()],Bs.prototype,"hasHover",2),Ls([Lt()],Bs.prototype,"displayLabel",2),Ls([Lt()],Bs.prototype,"hasFocus",2),Ls([Lt()],Bs.prototype,"currentOption",2),Ls([Lt()],Bs.prototype,"selectedOptions",2),Ls([Lt()],Bs.prototype,"showValidStyle",2),Ls([Lt()],Bs.prototype,"showInvalidStyle",2),Ls([Di()],Bs.prototype,"defaultValue",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"open",2),Ls([Dt({reflect:!0})],Bs.prototype,"size",2),Ls([Dt()],Bs.prototype,"label",2),Ls([Dt()],Bs.prototype,"placeholder",2),Ls([Dt({attribute:"help-text"})],Bs.prototype,"helpText",2),Ls([Dt({reflect:!0})],Bs.prototype,"placement",2),Ls([Lt()],Bs.prototype,"currentPlacement",2),Ls([Dt({type:Boolean})],Bs.prototype,"clearable",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"disabled",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"multiple",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"useTags",2),Ls([Dt({attribute:"max-options-visible",type:Number})],Bs.prototype,"maxOptionsVisible",2),Ls([Dt({reflect:!0})],Bs.prototype,"form",2),Ls([Dt()],Bs.prototype,"name",2),Ls([Dt({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],Bs.prototype,"value",2),Ls([Dt({type:Boolean,reflect:!0})],Bs.prototype,"required",2),Ls([Dt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],Bs.prototype,"styleOnValid",2),Ls([Dt({type:Boolean})],Bs.prototype,"hoist",2),Ls([Dt()],Bs.prototype,"getTag",2),Ls([Gt("useTags",{waitUntilFirstUpdate:!0})],Bs.prototype,"handleUseTagsChange",1),Ls([Gt("disabled",{waitUntilFirstUpdate:!0})],Bs.prototype,"handleDisabledChange",1),Ls([Gt("open",{waitUntilFirstUpdate:!0})],Bs.prototype,"handleOpenChange",1),Ls([Gt("size",{waitUntilFirstUpdate:!0})],Bs.prototype,"applySizeToOptions",1),Ls([Gt("value",{waitUntilFirstUpdate:!0})],Bs.prototype,"handleValueChange",1),Bs=Ls([At("sd-select")],Bs),ye("select.show",{keyframes:[{opacity:0,scale:.9},{opacity:1,scale:1}],options:{duration:100,easing:"ease"}}),ye("select.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.9}],options:{duration:100,easing:"ease"}});const Vs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Bs}},Symbol.toStringTag,{value:"Module"}));var Is=Object.defineProperty,js=Object.getOwnPropertyDescriptor,Fs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?js(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Is(e,i,s),s};let Us=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e}),this.showInvalidStyle=!1,this.title="",this.name="",this.disabled=!1,this.checked=!1,this.defaultChecked=!1,this.form="",this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){return ut`<label part="base" class="${xe("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${ni(this.value)}" .checked="${Bi(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"}" class="${xe("relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100\n peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2\n peer-focus-visible:outline-primary",this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?"border-error bg-error hover:bg-error-400":this.checked?"border-accent bg-accent hover:bg-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${xe("w-2.5 h-2.5 rounded-full transition-transform ease-in-out duration-200",this.disabled&&this.checked?"bg-white":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?"bg-white -translate-x-2":this.checked?"translate-x-2 bg-white":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${xe("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};Us.styles=[oe.styles,A`:host{display:block}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label::after{content:' *'}`],Fs([Vt("input")],Us.prototype,"input",2),Fs([Vt("#invalid-message")],Us.prototype,"invalidMessage",2),Fs([Lt()],Us.prototype,"showInvalidStyle",2),Fs([Dt()],Us.prototype,"title",2),Fs([Dt()],Us.prototype,"name",2),Fs([Dt()],Us.prototype,"value",2),Fs([Dt({type:Boolean,reflect:!0})],Us.prototype,"disabled",2),Fs([Dt({type:Boolean,reflect:!0})],Us.prototype,"checked",2),Fs([Di("checked")],Us.prototype,"defaultChecked",2),Fs([Dt({reflect:!0})],Us.prototype,"form",2),Fs([Dt({type:Boolean,reflect:!0})],Us.prototype,"required",2),Fs([Gt("disabled",{waitUntilFirstUpdate:!0})],Us.prototype,"handleDisabledChange",1),Fs([Gt(["checked"],{waitUntilFirstUpdate:!0})],Us.prototype,"handleStateChange",1),Us=Fs([At("sd-switch")],Us);const Rs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Us}},Symbol.toStringTag,{value:"Module"}));var Hs=Object.defineProperty,Ns=Object.getOwnPropertyDescriptor,qs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ns(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Hs(e,i,s),s};let Ks=class extends oe{constructor(){super(...arguments),this.variant="white",this.hasSlotController=new ei(this,"[default]","media","meta","headline","expandable")}render(){const t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return ut`<div class="relative flex flex-col group" part="base"><div class="${xe("mb-4",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${xe("flex-1","gradient-white"===this.variant&&"bg-gradient-to-t from-white/[.8] to-60%","gradient-dark"===this.variant&&"bg-gradient-to-t from-primary-800/[.6] to-60%")}"></div><div class="${xe({white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"bg-neutral-100/[.8] group-hover:bg-neutral-100/90",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"bg-primary-100/[.8] group-hover:bg-primary-100/90","gradient-white":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/[.6] text-white"}[this.variant])}"><div class="flex-col text-left p-4" part="content"><div part="meta" class="${xe("gap-2 mb-4",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="text-lg font-bold m-0"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div class="${xe("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable"><slot name="expandable"></slot></div><div part="main" class="${xe(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div></div>`}};Ks.styles=[oe.styles,A`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){margin:var(--sd-spacing-0,0)!important;font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700}`],qs([Dt({reflect:!0})],Ks.prototype,"variant",2),qs([Vt('[part="base"]')],Ks.prototype,"teaserMedia",2),Ks=qs([At("sd-teaser-media")],Ks);const Zs=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Ks}},Symbol.toStringTag,{value:"Module"}));var Ws=Object.defineProperty,Ys=Object.getOwnPropertyDescriptor,Xs=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?Ys(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Ws(e,i,s),s};let Gs=class extends oe{constructor(){super(...arguments),this.variant="white",this.breakpoint=448,this.inset=!1,this.hasSlotController=new ei(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),0===this.breakpoint?this._orientation="horizontal":9999===this.breakpoint?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((()=>this.updateOrientation())),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){const t="white border-neutral-400"===this.variant||this.inset,e=this.hasSlotController.test("[default]"),i=this.hasSlotController.test("media"),o=this.hasSlotController.test("meta");return this.hasSlotController.test("headline"),ut`<div class="${xe("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],"vertical"===this._orientation&&"flex-col","horizontal"===this._orientation&&"flex-row gap-8","horizontal"===this._orientation&&t&&"py-8 px-10")}" part="base"><div style="${"horizontal"===this._orientation?"width: var(--distribution-media, 100%);":""}" class="${xe(!t&&"vertical"===this._orientation&&"mb-4",!i&&"hidden","white border-neutral-400"===this.variant&&"vertical"===this._orientation&&"mx-[-1px] mt-[-1px]")}" part="media"><slot name="media"></slot></div><div style="${"horizontal"===this._orientation?"width: var(--distribution-content, 100%); "+(t?"width: var(--distribution-content, calc(100% - 2rem));":""):""}" class="${xe("flex flex-col text-left","horizontal"===this._orientation&&"flex flex-col","vertical"===this._orientation&&t&&"m-4")}" part="content"><div part="meta" class="${xe("gap-2 mb-4",!o&&"hidden")}"><slot name="meta"></slot></div><div part="headline" class="${xe("text-lg font-bold m-0","primary"===this.variant?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="main" class="${xe(!e&&"hidden")}"><slot></slot></div></div></div>`}};Gs.styles=[oe.styles,A`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){margin:var(--sd-spacing-0,0)!important;font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700}`],Xs([Dt({reflect:!0})],Gs.prototype,"variant",2),Xs([Dt({reflect:!0,type:Number})],Gs.prototype,"breakpoint",2),Xs([Dt({type:Boolean,reflect:!0})],Gs.prototype,"inset",2),Xs([Vt('[part="base"]')],Gs.prototype,"teaser",2),Xs([Lt()],Gs.prototype,"_orientation",2),Gs=Xs([At("sd-teaser")],Gs);const Js=Object.freeze(Object.defineProperty({__proto__:null,get default(){return Gs}},Symbol.toStringTag,{value:"Module"}));var Qs=Object.defineProperty,ta=Object.getOwnPropertyDescriptor,ea=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ta(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&Qs(e,i,s),s};let ia=class extends oe{constructor(){super(...arguments),this.formControlController=new Ge(this),this.hasSlotController=new ei(this,"help-text","label"),this.hasFocus=!1,this.showValidStyle=!1,this.showInvalidStyle=!1,this.title="",this.name="",this.value="",this.size="lg",this.label="",this.helpText="",this.placeholder="",this.rows=4,this.disabled=!1,this.readonly=!1,this.form="",this.required=!1,this.styleOnValid=!1,this.spellcheck=!0,this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.setTextareaHeight()}))}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){return t?("number"==typeof t.top&&(this.textarea.scrollTop=t.top),void("number"==typeof t.left&&(this.textarea.scrollLeft=t.left))):{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,i="none"){this.textarea.setSelectionRange(t,e,i)}setRangeText(t,e,i,o){this.textarea.setRangeText(t,e,i,o),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return null==(t=this.textarea)?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){const t=this.hasSlotController.test("label"),e=this.hasSlotController.test("help-text"),i=!!this.label||!!t,o=!!this.helpText||!!e,r=this.disabled?"disabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",s="sm"===this.size?"text-sm":"text-base",a={sm:"text-base ml-1",md:"text-lg ml-2",lg:"text-xl ml-2"}[this.size];return ut`<div part="form-control" class="text-left"><label part="form-control-label" id="label" class="${xe("mb-2",i?"inline-block":"hidden",s)}" for="input" aria-hidden="${i?"false":"true"}"><slot name="label">${this.label}</slot></label><div part="form-control-input" class="${xe("relative w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${xe("absolute w-full h-full pointer-events-none border rounded-default",{disabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[r])}"></div><div part="base" class="${xe("textarea px-4 flex items-top rounded-default bg-white group",{sm:"textarea-sm py-1",md:"textarea-md py-1",lg:"textarea-lg py-2"}[this.size],{disabled:"text-neutral-500",readonly:"text-black",activeInvalid:"text-error",activeValid:"text-success",active:"text-black",invalid:"text-error",valid:"text-success",default:"text-black"}[r],this.disabled||this.readonly?"":"hover:bg-neutral-200",this.readonly&&"bg-neutral-100")}"><textarea part="textarea" id="input" class="${xe("flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none",this.disabled&&"cursor-not-allowed",s)}" title="${this.title}" name="${ni(this.name)}" .value="${Bi(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${ni(this.placeholder)}" minlength="${ni(this.minlength)}" maxlength="${ni(this.maxlength)}" rows="${ni(this.rows)}" autocapitalize="${ni(this.autocapitalize)}" autocorrect="${ni(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${ni(this.spellcheck)}" enterkeyhint="${ni(this.enterkeyhint)}" inputmode="${ni(this.inputmode)}" aria-describedby="help-text" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?ut`<sd-icon class="${xe("text-error absolute right-4 bg-white group-hover:bg-neutral-200",a)}" library="system" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?ut`<sd-icon class="${xe("text-success absolute right-4 bg-white group-hover:bg-neutral-200",a)}" library="system" name="confirm" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${xe("text-sm text-neutral-700",o?"block":"hidden")}" aria-hidden="${o?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};ia.styles=[Jt,oe.styles,A`:host{display:block}:host([required]) #label::after{content:' *'}.no-scrollbar::-webkit-scrollbar{display:none}`],ea([Vt("#input")],ia.prototype,"textarea",2),ea([Vt("#invalid-message")],ia.prototype,"invalidMessage",2),ea([Lt()],ia.prototype,"hasFocus",2),ea([Lt()],ia.prototype,"showValidStyle",2),ea([Lt()],ia.prototype,"showInvalidStyle",2),ea([Dt()],ia.prototype,"title",2),ea([Dt()],ia.prototype,"name",2),ea([Dt()],ia.prototype,"value",2),ea([Dt({reflect:!0})],ia.prototype,"size",2),ea([Dt()],ia.prototype,"label",2),ea([Dt({attribute:"help-text"})],ia.prototype,"helpText",2),ea([Dt()],ia.prototype,"placeholder",2),ea([Dt({type:Number})],ia.prototype,"rows",2),ea([Dt({type:Boolean,reflect:!0})],ia.prototype,"disabled",2),ea([Dt({type:Boolean,reflect:!0})],ia.prototype,"readonly",2),ea([Dt({reflect:!0})],ia.prototype,"form",2),ea([Dt({type:Boolean,reflect:!0})],ia.prototype,"required",2),ea([Dt({type:Number})],ia.prototype,"minlength",2),ea([Dt({type:Number})],ia.prototype,"maxlength",2),ea([Dt()],ia.prototype,"autocapitalize",2),ea([Dt()],ia.prototype,"autocorrect",2),ea([Dt()],ia.prototype,"autocomplete",2),ea([Dt({type:Boolean})],ia.prototype,"autofocus",2),ea([Dt()],ia.prototype,"enterkeyhint",2),ea([Dt({type:Boolean,reflect:!0,attribute:"style-on-valid"})],ia.prototype,"styleOnValid",2),ea([Dt({type:Boolean,converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],ia.prototype,"spellcheck",2),ea([Dt()],ia.prototype,"inputmode",2),ea([Di()],ia.prototype,"defaultValue",2),ea([Gt("disabled",{waitUntilFirstUpdate:!0})],ia.prototype,"handleDisabledChange",1),ea([Gt("rows",{waitUntilFirstUpdate:!0})],ia.prototype,"handleRowsChange",1),ea([Gt("value",{waitUntilFirstUpdate:!0})],ia.prototype,"handleValueChange",1),ia=ea([At("sd-textarea")],ia);const oa=Object.freeze(Object.defineProperty({__proto__:null,get default(){return ia}},Symbol.toStringTag,{value:"Module"}));var ra=Object.defineProperty,sa=Object.getOwnPropertyDescriptor,aa=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?sa(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&ra(e,i,s),s};let na=class extends oe{constructor(){super(...arguments),this.localize=new C(this),this.content="",this.placement="top",this.size="lg",this.disabled=!1,this.open=!1,this.trigger="click focus",this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.updateComplete.then((()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}))}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut)}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.show()}handleKeyDown(t){this.open&&"Escape"===t.key&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){const t=ce(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.show()),t)}}handleMouseOut(){if(this.hasTrigger("hover")){const t=ce(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout((()=>this.hide()),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await ue(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:t,options:e}=fe(this,"tooltip.show",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await ue(this.body);const{keyframes:t,options:e}=fe(this,"tooltip.hide",{dir:this.localize.dir()});await he(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,we(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,we(this,"sd-after-hide")}render(){const t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return ut`<sd-popup part="base" exportparts="
|
|
101
101
|
popup:base__popup,
|
|
102
102
|
arrow:base__arrow
|
|
103
103
|
" class="${xe(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[t?"start":e?"end":"default"]*("sm"===this.size?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0"><slot slot="anchor" aria-describedby="tooltip" class="${xe("lg"===this.size?"text-xl":"text-base")}"><button class="flex sd-interactive rounded-full"><sd-icon library="system" name="info-circle" class="${xe(this.disabled&&"sd-interactive--disabled")}"></sd-icon></button></slot><slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="Tooltip" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-popup>`}};na.styles=[oe.styles,P(Ci),A`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-popup{--arrow-color:rgb(var(--sd-color-primary, 0 53 142) / 1);--arrow-size:10px}sd-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(81 81 81 / 75%));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup::part(arrow){--tw-shadow:var(--sd-shadow, 0px 1px 3px 0px rgb(81 81 81 / 75%));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup[placement^=top]::part(popup){transform-origin:bottom}sd-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){overflow:auto;max-width:var(--auto-size-available-width)!important;max-height:var(--auto-size-available-height)!important}`],aa([Vt("slot:not([name])")],na.prototype,"defaultSlot",2),aa([Vt("#tooltip")],na.prototype,"body",2),aa([Vt("sd-popup")],na.prototype,"popup",2),aa([Dt()],na.prototype,"content",2),aa([Dt({reflect:!0})],na.prototype,"placement",2),aa([Dt()],na.prototype,"size",2),aa([Dt({type:Boolean,reflect:!0})],na.prototype,"disabled",2),aa([Dt({type:Boolean,reflect:!0})],na.prototype,"open",2),aa([Dt()],na.prototype,"trigger",2),aa([Dt({type:Boolean})],na.prototype,"hoist",2),aa([Gt("open",{waitUntilFirstUpdate:!0})],na.prototype,"handleOpenChange",1),aa([Gt(["content","hoist","placement"])],na.prototype,"handleOptionsChange",1),aa([Gt("disabled")],na.prototype,"handleDisabledChange",1),na=aa([At("sd-tooltip")],na),ye("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),ye("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}});const la=Object.freeze(Object.defineProperty({__proto__:null,get default(){return na}},Symbol.toStringTag,{value:"Module"}));var da=Object.defineProperty,ha=Object.getOwnPropertyDescriptor,ca=(t,e,i,o)=>{for(var r,s=o>1?void 0:o?ha(e,i):e,a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o?r(e,i,s):r(s))||s);return o&&s&&da(e,i,s),s};let pa=class extends oe{constructor(){super(...arguments),this.playing=!1,this.overlay=!1,this.isBelowBreakpoint=!1,this.hasSlotController=new ei(this,"[default]","play-icon","poster")}get poster(){const t=this.shadowRoot.querySelector("slot[name=poster]");return(null==t?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}fadeoutPoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0")}hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.display="none")}play(){this.emit("sd-play"),this.playing=!0,this.fadeoutPoster()}handleKeydown(t){t instanceof KeyboardEvent&&("Enter"===t.key||" "===t.key)&&(this.play(),setTimeout((()=>{var t;null==(t=this.querySelector("video"))||t.focus()})))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((()=>this.handleButtonResize())),this.updateComplete.then((()=>{this.resizeObserver.observe(this.hostEl)}))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return ut`<div part="base" aria-label="Video Player" class="cursor-pointer"><button part="play-button" aria-label="Play video" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${xe(this.playing&&"pointer-events-none","w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${xe(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition")}"><slot name="play-icon" part="play-icon" class="${xe(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-icon id="default-play-icon" library="system" name="start"></sd-icon></slot></div></button> ${this.hasSlotController.test("poster")?ut`<slot name="poster" role="presentation" @transitionend="${this.hidePoster}"></slot>`:null}<div part="overlay" id="overlay" role="presentation" class="${xe(this.overlay&&!this.playing?"opacity-100":"opacity-0","bg-[rgba(0,0,0,0.65)] w-full h-full absolute top-0 left-0 pointer-events-none z-20 play-pause-transition")}"></div><slot></slot></div>`}};pa.styles=[oe.styles,A`:host{position:relative;display:inline-block;overflow:hidden}.play-pause-transition,::slotted([slot=poster]){transition-property:opacity;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1)}::slotted([slot=poster]){position:absolute;left:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);z-index:10;width:100%}#default-play-icon,::slotted([slot=play-icon]){position:absolute;left:50%;top:50%;--tw-translate-x:-50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}`],ca([Vt("[part=base]")],pa.prototype,"hostEl",2),ca([Dt({type:Boolean,reflect:!0})],pa.prototype,"playing",2),ca([Dt({type:Boolean,reflect:!0})],pa.prototype,"overlay",2),ca([Dt({type:Boolean})],pa.prototype,"isBelowBreakpoint",2),pa=ca([At("sd-video")],pa);const ua=Object.freeze(Object.defineProperty({__proto__:null,get default(){return pa}},Symbol.toStringTag,{value:"Module"}));t.LocalizeController=C,t.registerIconLibrary=c,t.unregisterIconLibrary=p,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})},"object"==typeof exports&&typeof module<"u"?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=typeof globalThis<"u"?globalThis:t||self)["Solid Components"]={});
|