@rededor/cura 2.0.0-alpha.16 → 2.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/assets/assets/{cura-assets.zip → Cura Assets.zip} +0 -0
  2. package/dist/assets/assets/icons/iconset-default-list.ts +1 -1
  3. package/dist/assets/assets/icons/iconset-default-tmp.svg +78 -2
  4. package/dist/assets/assets/icons/iconset-default.svg +1 -1
  5. package/dist/cjs/cura-accordion_22.cjs.entry.js +2 -2
  6. package/dist/cjs/cura-icons-view.cjs.entry.js +1 -1
  7. package/dist/collection/assets/icons/iconset-default-list.js +1 -1
  8. package/dist/collection/assets/icons/iconset-default-tmp.svg +78 -2
  9. package/dist/collection/assets/icons/iconset-default.svg +1 -1
  10. package/dist/collection/assets-raw/icons/default/airCond.svg +3 -0
  11. package/dist/collection/assets-raw/icons/default/backspaceDelete.svg +3 -0
  12. package/dist/collection/assets-raw/icons/default/bathroom.svg +3 -0
  13. package/dist/collection/assets-raw/icons/default/bed.svg +3 -0
  14. package/dist/collection/assets-raw/icons/default/blinds.svg +3 -0
  15. package/dist/collection/assets-raw/icons/default/clean.svg +3 -0
  16. package/dist/collection/assets-raw/icons/default/docs.svg +4 -0
  17. package/dist/collection/assets-raw/icons/default/door.svg +3 -0
  18. package/dist/collection/assets-raw/icons/default/keyboardArrows.svg +3 -0
  19. package/dist/collection/assets-raw/icons/default/keyboardNum.svg +10 -0
  20. package/dist/collection/assets-raw/icons/default/lampSmart.svg +3 -0
  21. package/dist/collection/assets-raw/icons/default/mobileRotate2.svg +1 -1
  22. package/dist/collection/assets-raw/icons/default/nutrition.svg +3 -0
  23. package/dist/collection/assets-raw/icons/default/pause.svg +3 -0
  24. package/dist/collection/assets-raw/icons/default/sink.svg +3 -0
  25. package/dist/collection/assets-raw/icons/default/stop.svg +1 -1
  26. package/dist/collection/assets-raw/icons/default/tv.svg +3 -0
  27. package/dist/collection/assets-raw/icons/default/userChecklist.svg +3 -0
  28. package/dist/collection/assets-raw/icons/default/window.svg +3 -0
  29. package/dist/collection/components/cura-calendar/cura-calendar.css +1 -2
  30. package/dist/collection/components/forms/cura-select/cura-select.css +128 -0
  31. package/dist/components/cura-calendar.js +1 -1
  32. package/dist/components/cura-icons-view.js +1 -1
  33. package/dist/components/cura-input-date.js +1 -1
  34. package/dist/components/cura-select.js +1 -1
  35. package/dist/components/{p-BHVSbubb.js → p-CvyVDrFO.js} +1 -1
  36. package/dist/components/p-DsdtwUUz.js +1 -0
  37. package/dist/cura/cura.esm.js +1 -1
  38. package/dist/cura/p-0dda7b42.entry.js +1 -0
  39. package/dist/cura/p-cc5d2e34.entry.js +1 -0
  40. package/dist/esm/cura-accordion_22.entry.js +2 -2
  41. package/dist/esm/cura-icons-view.entry.js +1 -1
  42. package/package.json +4 -2
  43. package/dist/components/p-D4hCuriT.js +0 -1
  44. package/dist/cura/p-a305e17a.entry.js +0 -1
  45. package/dist/cura/p-c987ddde.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,h as e,H as i,g as r,c as n}from"./p-BxFVLGIR.js";import{l as a}from"./p-BSI2FkNn.js";import{r as o,t as s,_ as u,i as h,a as l}from"./p-964stZ3D.js";import{a as c,r as d,c as p,b as f,f as b}from"./p-CUmwazb8.js";import{i as g}from"./p-sjLA93YY.js";import{l as m}from"./p-CHcd-uKK.js";import"./p-BTIDzOyO.js";import"./p-DfJS7YqS.js";const v=class{constructor(e){t(this,e),this.color="primary",this.colorMode="dark",this.iconSize=20,this.labelIcon="",this.openIcon="down",this.closeIcon="up",this.iconColor="",this.behavior="default",this.level=3,this.mutationObserverCallback=t=>{var e;for(const i of t){if("attributes"===i.type&&"opened"===i.attributeName&&(null===(e=i.target)||void 0===e?void 0:e.opened)){if("default"!==this.behavior)continue;this.host.querySelectorAll("cura-accordion-item").forEach((t=>{t!=i.target&&(t.opened=!1)}))}if("childList"===i.type){const t=Array.from(i.addedNodes||[]);for(let e of t)this.setChildProperties(e)}}},this.mutationObserver=new MutationObserver(this.mutationObserverCallback),this.styles={}}handleChangeColor(){this.setColors()}connectedCallback(){const t=window.CuraAPI.theme.fonts.getWeights();this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing(),this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor("neutral-base"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-color"]=window.CuraAPI.theme.fonts.getColor(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-regular"]=t.regular,this.setColors()}componentDidLoad(){this.host.querySelectorAll("cura-accordion-item").forEach((t=>{this.setChildProperties(t)})),this.mutationObserver.observe(this.host,{childList:!0,subtree:!1,attributes:!1})}disconnectedCallback(){this.mutationObserver.disconnect()}setChildProperties(t){t.colorMode=this.colorMode,t.iconColor=this.iconColor||this.color,t.iconSize=this.iconSize,this.labelIcon&&(t.labelIcon=this.labelIcon),t.openIcon=this.openIcon,t.closeIcon=this.closeIcon,t.level=this.level}setColors(){this.styles=Object.assign(Object.assign({},this.styles),{"--acc-color":window.CuraAPI.theme.colors.getColor("neutral-black"),"--acc-color-hover":window.CuraAPI.theme.colors.getColor(`${this.color}-base`),"--acc-color-icon":window.CuraAPI.theme.colors.getColor(`${this.iconColor||this.color}-base`),"--acc-color-icon-hover":window.CuraAPI.theme.colors.getColor(`${this.iconColor||this.color}-darker`),"--acc-color-inverted":window.CuraAPI.theme.colors.getColor("neutral-white"),"--acc-color-hover-inverted":window.CuraAPI.theme.colors.getColor(`${this.color}-lighter`),"--acc-color-icon-inverted":window.CuraAPI.theme.colors.getColor("neutral-white"),"--acc-color-icon-hover-inverted":window.CuraAPI.theme.colors.getColor(`${this.iconColor||this.color}-lighter`)})}render(){return e(i,{key:"58c69f7911698dae68dacaeb4cd226d61e09fe17",style:this.styles},e("slot",{key:"d808861eb471bfd7c356fb942121d20d547abfcb",name:"accordion-item"}))}get host(){return r(this)}static get watchers(){return{color:[{handleChangeColor:0}]}}};v.style=":host{display:block;color:var(--font-color);font-size:var(--font-size);font-size:var(--font-size);font-family:var(--font-family);font-weight:var(--font-weight-regular)}";const w=class{constructor(e){t(this,e),this.label="",this.iconSize=20,this.labelIcon="",this.openIcon="down",this.closeIcon="up",this.iconColor="",this.colorMode="dark",this.level=3,this.opened=!1,this.styles={}}getClasses(){const t={"accordion-item":!0};return t.active=this.opened,t.inverted="light"===this.colorMode,t}accordionItemClick(t){this.opened=!this.opened}renderIcon(){return this.labelIcon?e("cura-icon",{name:this.labelIcon,size:this.iconSize,color:"neutral-black"}):""}render(){return e(i,{key:"3dd53ab4a597b1726045ec4d3ed066c6c30050d0",slot:"accordion-item"},e("div",{key:"209291c7c9b587ac546e8b9e40b7d94a11a2489e",class:this.getClasses(),style:this.styles},e("div",{key:"9c2de1103c7f30bc9d2cb0a86fc660c98b94be84",class:"label",onClick:t=>this.accordionItemClick(t)},e("div",{key:"052a8be2c00edf3907e49970120d9b65937ab031",class:"label-container"},e("div",{key:"da543cdbcb0c0d5f691c3d2fcabfbfc9ec46f506",class:"label-content"},this.renderIcon(),e("cura-heading",{key:"f587de080f2c1779ffacf0b557827c24edf5e1ee",size:"small",level:this.level,weight:"bold","margin-block":"0",color:"neutral-black"},this.label)),e("cura-icon",{key:"611b48e32dfd7056a563aab56401feb3c8febee2",name:this.opened?this.closeIcon:this.openIcon,size:this.iconSize,color:"neutral-black"}))),e("div",{key:"e1d5e606f3e9415570a2a5c2ba3d96264d430bd0",class:"content"},e("div",{key:"62b76ef21093a4d051120e2502936049a186c36a",class:"content-wrapper"},e("slot",{key:"646b3d0163edf473c1a2e824f251f4db85b2fc18"})))))}};w.style=':host{display:block}:host .accordion-item{width:100%}:host .accordion-item::after{content:"";display:block;border-top:solid 1px var(--neutral-base);width:100%}:host .accordion-item:hover:not(.active)::after{content:"";display:block;border-top:solid 1px var(--acc-color-icon-hover);width:100%}:host .accordion-item .label{display:flex;flex-direction:column}:host .accordion-item .label .label-container{display:flex;flex-grow:1;justify-content:space-between;align-items:center;gap:calc(var(--cura-spacing-base) * 3px);padding:calc(var(--cura-spacing-base) * 3px);word-break:break-word;cursor:pointer;font-size:1.14em;font-weight:var(--font-weight-regular)}:host .accordion-item .label .label-container .label-content{display:flex;justify-content:center;align-items:center;gap:calc(var(--cura-spacing-base) * 3px)}:host .accordion-item .label .label-container .label-content cura-icon{--color:var(--acc-color) !important}:host .accordion-item .label .label-container .label-content cura-heading{--color-body:var(--acc-color) !important}:host .accordion-item .label .label-container cura-icon{--color:var(--acc-color-icon) !important;margin-right:4px}:host .accordion-item .label .label-container:hover cura-heading{--color-body:var(--acc-color-hover) !important}:host .accordion-item .label .label-container:hover cura-icon{--color:var(--acc-color-icon-hover) !important}:host .accordion-item .content{font-size:1em;overflow:hidden;max-height:0;transition:max-height 0.25s ease}:host .accordion-item .content .content-wrapper{padding:calc(var(--cura-spacing-base) * 3px)}:host .accordion-item.inverted:hover:not(.active)::after{content:"";display:block;border-top:solid 1px var(--acc-color-icon-hover-inverted);width:100%}:host .accordion-item.inverted .label .label-container cura-heading{--color-body:var(--acc-color-inverted) !important}:host .accordion-item.inverted .label .label-container cura-icon{--color:var(--acc-color-icon-inverted) !important}:host .accordion-item.inverted .label .label-container:hover cura-heading{--color-body:var(--acc-color-hover-inverted) !important}:host .accordion-item.inverted .label .label-container:hover cura-icon{--color:var(--acc-color-icon-hover-inverted) !important}:host .accordion-item.active .content{max-height:200vh;overflow-y:auto;transition:max-height 0.5s ease 0.14s}@media (min-width: 769px) and (max-width: 992px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}@media (min-width: 993px){:host .accordion-item .label .label-container{font-size:1.29em}:host .accordion-item .content{font-size:1.14em}}';const x={80:{border:2.5},40:{border:2.25},32:{border:2},24:{border:1.75}},y=class{constructor(e){t(this,e),this.size="80",this.backgroundColor="neutral-purewhite",this.borderRadius="50%",this.border=!1,this.type="default",this.styles={}}sizeHandler(t){this.styles=Object.assign(Object.assign({},this.styles),{"--size":`${t}px`})}getClasses(){const t={conteiner:!0};return t.floating=this.floating,t}connectedCallback(){this.assetsPath=window.CuraAPI.localAssetsPath,this.sizeHandler(this.size)}hostCSSProperties(){const t=x[this.size];return{"--background-color":window.CuraAPI.theme.colors.getColor(this.backgroundColor),"--border-color":window.CuraAPI.theme.colors.getColor(this.borderColor),"--border-radius":`${this.borderRadius}`,"--border":this.border?`${t.border}px`:"0"}}onSrcError(){this.imageSrc=this.imageSrcDefault||`${this.assetsPath}/images/avatar/patient-default.svg`}render(){return e(i,{key:"51683368cca9bff9bdf3a8e835990c89df3cd4be",style:this.hostCSSProperties(),role:"img"},e("div",{key:"84196bf4ed6914904f14f8ec0d07b40ceace5ebf",class:this.getClasses(),style:this.styles},e("img",{key:"8968215d670f9cd5a042dd66e6dc15a75d07c68e",src:this.imageSrc||this.imageSrcDefault||`${this.assetsPath}/images/avatar/patient-default.svg`,onError:()=>this.onSrcError()})))}get host(){return r(this)}static get watchers(){return{size:[{sizeHandler:0}]}}};y.style=":host{display:inline-flex}:host .conteiner{display:flex;box-sizing:border-box;justify-content:center;align-items:center;width:var(--size);height:var(--size);border:var(--border) solid var(--border-color);border-radius:var(--border-radius);background:var(--background-color);overflow:hidden}:host .conteiner.floating{box-shadow:0px 4px 8px 0px rgba(38, 38, 38, 0.16)}:host .conteiner img{outline:none;object-fit:contain;width:100%;height:100%}";const k=class{constructor(e){t(this,e),this.distance=0,this.label="km",this.styles={},this.displayDistance=0,this.isThousandRounded=!1,this.theme=window.CuraAPI.theme}formatDistance(){const t=this.distance%1!=0?parseFloat(this.distance.toFixed(1)):this.distance;this.isThousandRounded=Math.abs(t)>=1e3,this.displayDistance=this.isThousandRounded?parseFloat((t/1e3).toFixed(1)):t}connectedCallback(){this.setCssProperties(),this.formatDistance()}render(){return e(i,{key:"cdc206deecbed2e069befda5d21ddcaf03049afc"},e("div",{key:"d22d2b5b97964281e8588fbc17a66f3fddcd875e",class:"container",style:this.styles},e("cura-label",{key:"0d54ab1ad403ba23a57fb78a422ed8c577cd627e",size:"xsmall",weight:"bold",color:"neutral-black"},this.displayDistance,this.isThousandRounded?"K":""),e("cura-label",{key:"d4929a67484bbfd6d6f3edce82414951ea4778c8",size:"xsmall",weight:"bold",color:"neutral-dark"},this.label)))}setCssProperties(){this.styles={"--neutral-pale":this.theme.colors.getColor("neutral-pale"),"--base-spacing":this.theme.spacing.getSpacing()}}static get watchers(){return{distance:[{formatDistance:0}]}}};k.style=":host .container{display:flex;flex-direction:column;justify-content:center;align-items:center;width:calc(var(--cura-spacing-base) * 10px);height:calc(var(--cura-spacing-base) * 10px);border-radius:calc(var(--cura-spacing-base) * 1px);background:var(--neutral-pale)}";const A=class{constructor(e){t(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.type="button",this.size="large",this.disabled=!1,this.isLoading=!1,this.iconset="default",this.iconPosition="left",this.iconOnly=!1,this.target="_self",this.color="accent",this.background="light",this.fontColor="dark",this.textAlign="left",this.justify=!1,this.styles={},this.hovered=!1}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing(),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium,this.styles["--text-align"]=this.textAlign,this.setColors()}setColors(){[{name:"--color-base-neutral-purewhite",theme:"light"===this.background?`${this.color}-base`:"neutral-pale"},{name:"--color-base-color-light",theme:"light"===this.background?`${this.color}-base`:`${this.color}-lighter`},{name:"--color-dark-color-light",theme:"light"===this.background?`${this.color}-dark`:`${this.color}-light`},{name:"--color-dark-color-base",theme:"light"===this.background?`${this.color}-dark`:`${this.color}-base`},{name:"--neutral-pale-neutral-black",theme:"light"===this.background?"neutral-pale":"neutral-black"}].forEach((t=>this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))),this.styles=Object.assign({},this.styles)}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}getClasses(){var t,e;const i={};return i[`${null===(t=this.size)||void 0===t?void 0:t.toLowerCase()}`]=!0,i[`icon-${null===(e=this.iconPosition)||void 0===e?void 0:e.toLowerCase()}`]=!0,i["icon-only"]=this.iconOnly,i.disabled=this.disabled,i.isLoading=this.isLoading,i.justify=this.justify,i}getIcon(){return this.iconName?e("cura-icon",{name:this.iconName,iconset:this.iconset,size:"large"===this.size?20:16,color:this.getSymbolColor()}):""}getSymbolColor(){return this.disabled?"neutral-dark":"light"===this.fontColor?"neutral-white":"neutral-black"}handleClick(t){this.disabled||this.isLoading?t.preventDefault():this.href||("submit"===this.type&&this.internals.form&&this.internals.form.submit(),"reset"===this.type&&this.internals.form&&this.internals.form.reset())}render(){const t=this.getSymbolColor(),r=a[this.size]||a.default;return e(i,{key:"7f9528e42c3c38a3aed09ac8bbe669aabde4c0d9",role:this.href?"link":this.type,"aria-disabled":this.disabled},this.href?e("a",{href:this.disabled?"":this.href,target:this.target,class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},e("span",{class:"button-container"},this.getIcon(),e("cura-label",{class:"label",size:r,lineHeight:"normal",color:t},e("slot",null))),e("cura-loader-circle",{size:this.size,color:t})):e("button",{class:this.getClasses(),style:this.styles,disabled:this.disabled||null,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave(),type:this.type},e("span",{class:"button-container"},this.getIcon(),e("cura-label",{class:"label",size:r,lineHeight:"normal",color:t},e("slot",null))),e("cura-loader-circle",{size:this.size,color:t})))}static get formAssociated(){return!0}static get watchers(){return{background:[{setColors:0}],color:[{setColors:0}]}}};A.style=':host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--color-base-neutral-purewhite);box-sizing:border-box;border:none}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button::before,:host a::before{content:"";width:100%;height:100%;position:absolute;left:0px;top:0px;box-sizing:border-box;border:2px solid transparent;border-radius:var(--border-radius)}:host button:not(.disabled):not(.isLoading)::before,:host a:not(.disabled):not(.isLoading)::before{border:2px solid var(--color-base-color-light)}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background:var(--color-base-color-light);box-shadow:0px 4px 8px 0px rgba(38, 38, 38, 0.16)}:host button:not(.disabled):not(.isLoading):hover::before,:host a:not(.disabled):not(.isLoading):hover::before{border-color:var(--color-dark-color-base)}:host button:not(.isLoading):not(.disabled):active,:host a:not(.isLoading):not(.disabled):active{background-color:var(--color-dark-color-light)}:host button:not(.isLoading):not(.disabled):active::before,:host a:not(.isLoading):not(.disabled):active::before{border-color:var(--color-dark-color-light)}:host button:hover,:host a:hover{box-shadow:0 4px 8px 0 rgba(38, 38, 38, 0.16)}:host button.medium:hover,:host a.medium:hover{box-shadow:0 3px 6px 0 rgba(38, 38, 38, 0.16)}:host button.small:hover,:host a.small:hover{box-shadow:0 2px 5px 0 rgba(38, 38, 38, 0.16)}:host button:active,:host button.disabled:hover,:host button.isLoading:hover,:host a:active,:host a.disabled:hover,:host a.isLoading:hover{box-shadow:none !important}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, "left")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-pale-neutral-black)}:host button.icon-only,:host a.icon-only{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--cura-spacing-base) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--cura-spacing-base) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}';const C=class{constructor(e){t(this,e),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.type="button",this.size="large",this.disabled=!1,this.isLoading=!1,this.iconset="default",this.iconPosition="left",this.iconOnly=!1,this.target="_self",this.color="primary",this.fontColor="dark",this.textAlign="left",this.justify=!1,this.hovered=!1,this.styles={}}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing(),this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor("neutral-white"),this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor("neutral-base"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium,this.styles["--text-align"]=this.textAlign}getClasses(){const t={};return t[`${this.size.toLowerCase()}`]=!0,t[`icon-${this.iconPosition.toLowerCase()}`]=!0,t["icon-only"]=this.iconOnly,t.disabled=this.disabled,t.isLoading=this.isLoading,t.justify=this.justify,t}getIcon(){return this.iconName?e("cura-icon",{name:this.iconName,iconset:this.iconset,size:"large"===this.size?20:16,color:this.getSymbolColor()}):null}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}getSymbolColor(){return this.disabled?"neutral-dark":this.hovered&&!this.isLoading?"light"===this.fontColor?`${this.color}-light`:`${this.color}-darker`:"light"===this.fontColor?"neutral-white":`${this.color}-dark`}handleClick(t){this.disabled||this.isLoading?t.preventDefault():this.href||("submit"===this.type&&this.internals.form&&this.internals.form.submit(),"reset"===this.type&&this.internals.form&&this.internals.form.reset())}render(){const t=this.getSymbolColor(),r=a[this.size]||a.default;return e(i,{key:"b10c4c589085d0e4d5d1c8311ec039d42060674c",role:this.href?"link":this.type,"aria-disabled":this.disabled},this.href?e("a",{href:this.disabled?"":this.href,target:this.target,class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},e("span",{class:"button-container"},this.getIcon(),e("cura-label",{size:r,lineHeight:"normal",color:t},e("slot",null))),e("cura-loader-circle",{size:this.size,color:t})):e("button",{class:this.getClasses(),style:this.styles,disabled:this.disabled||null,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave(),type:this.type},e("span",{class:"button-container"},this.getIcon(),e("cura-label",{size:r,lineHeight:"normal",color:t},e("slot",null))),e("cura-loader-circle",{size:this.size,color:t})))}static get formAssociated(){return!0}static get watchers(){return{fontColor:[{getSymbolColor:0}],color:[{getSymbolColor:0}]}}};function D(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function z(t,e){o(2,arguments);var i=s(t),r=D(e);return isNaN(r)?new Date(NaN):r?(i.setDate(i.getDate()+r),i):i}function E(t,e){o(2,arguments);var i=s(t),r=D(e);if(isNaN(r))return new Date(NaN);if(!r)return i;var n=i.getDate(),a=new Date(i.getTime());return a.setMonth(i.getMonth()+r+1,0),n>=a.getDate()?a:(i.setFullYear(a.getFullYear(),a.getMonth(),n),i)}C.style=':host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;border:none}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);min-height:calc(var(--cura-spacing-base) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px);min-height:calc(var(--cura-spacing-base) * 10px)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px);min-height:calc(var(--cura-spacing-base) * 8px)}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, "left")}:host button.icon-left cura-icon,:host a.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 3px)}:host button.icon-right cura-icon,:host a.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 3px)}:host button.medium.icon-left cura-icon,:host button.small.icon-left cura-icon,:host a.medium.icon-left cura-icon,:host a.small.icon-left cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.medium.icon-right cura-icon,:host button.small.icon-right cura-icon,:host a.medium.icon-right cura-icon,:host a.small.icon-right cura-icon{margin-left:calc(var(--cura-spacing-base) * 2px)}:host button.disabled,:host a.disabled{cursor:not-allowed}:host button.icon-only,:host a.icon-only{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.icon-only cura-label,:host a.icon-only cura-label{display:none}:host button.icon-only cura-icon,:host a.icon-only cura-icon{margin-left:0 !important;margin-right:0 !important}:host button.icon-only.medium,:host a.icon-only.medium{padding:calc(var(--cura-spacing-base) * 3px)}:host button.icon-only.small,:host a.icon-only.small{padding:calc(var(--cura-spacing-base) * 2px)}:host button cura-loader-circle,:host a cura-loader-circle{position:absolute;display:none}:host button.isLoading,:host a.isLoading{cursor:wait}:host button.isLoading .button-container,:host a.isLoading .button-container{opacity:0}:host button.isLoading cura-loader-circle,:host a.isLoading cura-loader-circle{display:block}';var F={};function M(){return F}function B(t,e){var i,r,n,a,u,h,l,c;o(1,arguments);var d=M(),p=D(null!==(i=null!==(r=null!==(n=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(u=e.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=s(t),b=f.getDay(),g=(b<p?7:0)+b-p;return f.setDate(f.getDate()-g),f.setHours(0,0,0,0),f}function S(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function T(t){o(1,arguments);var e=s(t);return e.setHours(0,0,0,0),e}function j(t,e){return o(2,arguments),z(t,7*D(e))}var _=6e4,L=36e5;function O(t,e){o(2,arguments);var i=T(t),r=T(e);return i.getTime()===r.getTime()}function P(t){if(o(1,arguments),!function(t){return o(1,arguments),t instanceof Date||"object"===u(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=s(t);return!isNaN(Number(e))}function I(t){o(1,arguments);var e=s(t),i=e.getMonth();return e.setFullYear(e.getFullYear(),i+1,0),e.setHours(23,59,59,999),e}function R(t,e){o(1,arguments);var i=t||{},r=s(i.start),n=s(i.end).getTime();if(!(r.getTime()<=n))throw new RangeError("Invalid interval");var a=[],u=r;u.setHours(0,0,0,0);var h=Number(1);if(h<1||isNaN(h))throw new RangeError("`options.step` must be a number greater than 1");for(;u.getTime()<=n;)a.push(s(u)),u.setDate(u.getDate()+h),u.setHours(0,0,0,0);return a}function N(t){o(1,arguments);var e=s(t);return e.setDate(1),e.setHours(0,0,0,0),e}function q(t){o(1,arguments);var e=s(t),i=new Date(0);return i.setFullYear(e.getFullYear(),0,1),i.setHours(0,0,0,0),i}function $(t,e){var i,r,n,a,u,h,l,c;o(1,arguments);var d=M(),p=D(null!==(i=null!==(r=null!==(n=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(u=e.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=s(t),b=f.getDay(),g=6+(b<p?-7:0)-(b-p);return f.setDate(f.getDate()+g),f.setHours(23,59,59,999),f}function V(t,e){return o(2,arguments),function(t,e){o(2,arguments);var i=s(t).getTime(),r=D(e);return new Date(i+r)}(t,-D(e))}function W(t){o(1,arguments);var e=s(t),i=e.getUTCDay(),r=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function H(t){o(1,arguments);var e=s(t),i=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(i+1,0,4),r.setUTCHours(0,0,0,0);var n=W(r),a=new Date(0);a.setUTCFullYear(i,0,4),a.setUTCHours(0,0,0,0);var u=W(a);return e.getTime()>=n.getTime()?i+1:e.getTime()>=u.getTime()?i:i-1}function Y(t){o(1,arguments);var e=s(t),i=W(e).getTime()-function(t){o(1,arguments);var e=H(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),W(i)}(e).getTime();return Math.round(i/6048e5)+1}function Q(t,e){var i,r,n,a,u,h,l,c;o(1,arguments);var d=M(),p=D(null!==(i=null!==(r=null!==(n=null!==(a=null==e?void 0:e.weekStartsOn)&&void 0!==a?a:null==e||null===(u=e.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:d.weekStartsOn)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==i?i:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=s(t),b=f.getUTCDay(),g=(b<p?7:0)+b-p;return f.setUTCDate(f.getUTCDate()-g),f.setUTCHours(0,0,0,0),f}function X(t,e){var i,r,n,a,u,h,l,c;o(1,arguments);var d=s(t),p=d.getUTCFullYear(),f=M(),b=D(null!==(i=null!==(r=null!==(n=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(u=e.locale)||void 0===u||null===(h=u.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==n?n:f.firstWeekContainsDate)&&void 0!==r?r:null===(l=f.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==i?i:1);if(!(b>=1&&b<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(p+1,0,b),g.setUTCHours(0,0,0,0);var m=Q(g,e),v=new Date(0);v.setUTCFullYear(p,0,b),v.setUTCHours(0,0,0,0);var w=Q(v,e);return d.getTime()>=m.getTime()?p+1:d.getTime()>=w.getTime()?p:p-1}function G(t,e){o(1,arguments);var i=s(t),r=Q(i,e).getTime()-function(t,e){var i,r,n,a,s,u,h,l;o(1,arguments);var c=M(),d=D(null!==(i=null!==(r=null!==(n=null!==(a=null==e?void 0:e.firstWeekContainsDate)&&void 0!==a?a:null==e||null===(s=e.locale)||void 0===s||null===(u=s.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==n?n:c.firstWeekContainsDate)&&void 0!==r?r:null===(h=c.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1),p=X(t,e),f=new Date(0);return f.setUTCFullYear(p,0,d),f.setUTCHours(0,0,0,0),Q(f,e)}(i,e).getTime();return Math.round(r/6048e5)+1}function U(t,e){for(var i=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return i+r}var Z={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});default:return i.era(r,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var r=t.getUTCFullYear();return i.ordinalNumber(r>0?r:1-r,{unit:"year"})}return function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return U("yy"===e?r%100:r,e.length)}(t,e)},Y:function(t,e,i,r){var n=X(t,r),a=n>0?n:1-n;return"YY"===e?U(a%100,2):"Yo"===e?i.ordinalNumber(a,{unit:"year"}):U(a,e.length)},R:function(t,e){return U(H(t),e.length)},u:function(t,e){return U(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return U(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return U(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):U(i+1,2)}(t,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return U(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){var n=G(t,r);return"wo"===e?i.ordinalNumber(n,{unit:"week"}):U(n,e.length)},I:function(t,e,i){var r=Y(t);return"Io"===e?i.ordinalNumber(r,{unit:"week"}):U(r,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return U(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var r=function(t){o(1,arguments);var e=s(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((i-r)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(r,{unit:"dayOfYear"}):U(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){var n=t.getUTCDay(),a=(n-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return U(a,2);case"eo":return i.ordinalNumber(a,{unit:"day"});case"eee":return i.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(n,{width:"short",context:"formatting"});default:return i.day(n,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){var n=t.getUTCDay(),a=(n-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return U(a,e.length);case"co":return i.ordinalNumber(a,{unit:"day"});case"ccc":return i.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(n,{width:"narrow",context:"standalone"});case"cccccc":return i.day(n,{width:"short",context:"standalone"});default:return i.day(n,{width:"wide",context:"standalone"})}},i:function(t,e,i){var r=t.getUTCDay(),n=0===r?7:r;switch(e){case"i":return String(n);case"ii":return U(n,e.length);case"io":return i.ordinalNumber(n,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,i){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,i){var r,n=t.getUTCHours();switch(r=12===n?"noon":0===n?"midnight":n/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){var r,n=t.getUTCHours();switch(r=n>=17?"evening":n>=12?"afternoon":n>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return function(t,e){return U(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return U(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(r,{unit:"hour"}):U(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?i.ordinalNumber(r,{unit:"hour"}):U(r,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return U(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return U(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,r=t.getUTCMilliseconds();return U(Math.floor(r*Math.pow(10,i-3)),e.length)}(t,e)},X:function(t,e,i,r){var n=(r._originalDate||t).getTimezoneOffset();if(0===n)return"Z";switch(e){case"X":return J(n);case"XXXX":case"XX":return tt(n);default:return tt(n,":")}},x:function(t,e,i,r){var n=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return J(n);case"xxxx":case"xx":return tt(n);default:return tt(n,":")}},O:function(t,e,i,r){var n=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+K(n,":");default:return"GMT"+tt(n,":")}},z:function(t,e,i,r){var n=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+K(n,":");default:return"GMT"+tt(n,":")}},t:function(t,e,i,r){return U(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,r){return U((r._originalDate||t).getTime(),e.length)}};function K(t,e){var i=t>0?"-":"+",r=Math.abs(t),n=Math.floor(r/60),a=r%60;if(0===a)return i+String(n);var o=e;return i+String(n)+o+U(a,2)}function J(t,e){return t%60==0?(t>0?"-":"+")+U(Math.abs(t)/60,2):tt(t,e)}function tt(t,e){var i=e||"",r=t>0?"-":"+",n=Math.abs(t);return r+U(Math.floor(n/60),2)+i+U(n%60,2)}var et=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},it=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},rt={p:it,P:function(t,e){var i,r=t.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return et(t,e);switch(n){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",et(n,e)).replace("{{time}}",it(a,e))}},nt=["D","DD"],at=["YY","YYYY"];function ot(t){return-1!==nt.indexOf(t)}function st(t){return-1!==at.indexOf(t)}function ut(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ht={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},lt=function(t,e,i){var r,n=ht[t];return r="string"==typeof n?n:1===e?n.one:n.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r};function ct(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var dt={date:ct({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ct({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ct({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},pt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ft=function(t){return pt[t]};function bt(t){return function(e,i){var r;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var n=t.defaultFormattingWidth||t.defaultWidth,a=null!=i&&i.width?String(i.width):n;r=t.formattingValues[a]||t.formattingValues[n]}else{var o=t.defaultWidth,s=null!=i&&i.width?String(i.width):t.defaultWidth;r=t.values[s]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}var gt={ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:bt({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:bt({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:bt({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:bt({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:bt({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function mt(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.width,n=e.match(r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth]);if(!n)return null;var a,o=n[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(o))return e}(s):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(o))return e}(s);return a=t.valueCallback?t.valueCallback(u):u,{value:a=i.valueCallback?i.valueCallback(a):a,rest:e.slice(o.length)}}}function vt(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var n=r[0],a=e.match(t.parsePattern);if(!a)return null;var o=t.valueCallback?t.valueCallback(a[0]):a[0];return{value:o=i.valueCallback?i.valueCallback(o):o,rest:e.slice(n.length)}}}var wt={ordinalNumber:vt({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:mt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:mt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:mt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:mt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:mt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},xt={code:"en-US",formatDistance:lt,formatLong:dt,formatRelative:ft,localize:gt,match:wt,options:{weekStartsOn:0,firstWeekContainsDate:1}},yt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,At=/^'([^]*?)'?$/,Ct=/''/g,Dt=/[a-zA-Z]/;function zt(t,e,i){var r,n,a,u,h,l,c,d,p,f,b,g,m,v,w,x,y,k;o(2,arguments);var A=String(e),C=M(),z=null!==(r=null!==(n=null==i?void 0:i.locale)&&void 0!==n?n:C.locale)&&void 0!==r?r:xt,E=D(null!==(a=null!==(u=null!==(h=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(c=i.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==h?h:C.firstWeekContainsDate)&&void 0!==u?u:null===(p=C.locale)||void 0===p||null===(f=p.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==a?a:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var F=D(null!==(b=null!==(g=null!==(m=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(w=i.locale)||void 0===w||null===(x=w.options)||void 0===x?void 0:x.weekStartsOn)&&void 0!==m?m:C.weekStartsOn)&&void 0!==g?g:null===(y=C.locale)||void 0===y||null===(k=y.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==b?b:0);if(!(F>=0&&F<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!z.localize)throw new RangeError("locale must contain localize property");if(!z.formatLong)throw new RangeError("locale must contain formatLong property");var B=s(t);if(!P(B))throw new RangeError("Invalid time value");var T=V(B,S(B)),j={firstWeekContainsDate:E,weekStartsOn:F,locale:z,_originalDate:B};return A.match(kt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,rt[e])(t,z.formatLong):t})).join("").match(yt).map((function(r){if("''"===r)return"'";var n,a,o=r[0];if("'"===o)return(a=(n=r).match(At))?a[1].replace(Ct,"'"):n;var s=Z[o];if(s)return null!=i&&i.useAdditionalWeekYearTokens||!st(r)||ut(r,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!ot(r)||ut(r,e,String(t)),s(T,r,z.localize,j);if(o.match(Dt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+o+"`");return r})).join("")}function Et(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Ft(t){return o(1,arguments),s(t).getMonth()}function Mt(t){return o(1,arguments),s(t).getFullYear()}function Bt(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=Array(e);i<e;i++)r[i]=t[i];return r}function St(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return Bt(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Bt(t,e):void 0}}(t))||e){i&&(t=i);var r=0,n=function(){};return{s:n,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==i.return||i.return()}finally{if(s)throw a}}}}function Tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}function _t(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jt(t,e)}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function Ot(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ot=function(){return!!t})()}function Pt(t){var e=Ot();return function(){var i,r=Lt(t);if(e){var n=Lt(this).constructor;i=Reflect.construct(r,arguments,n)}else i=r.apply(this,arguments);return function(t,e){if(e&&("object"==u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Tt(t)}(this,i)}}function It(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rt(t){var e=function(t){if("object"!=u(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=u(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==u(e)?e:e+""}function Nt(t,e){return e&&function(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,Rt(r.key),r)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function qt(t,e,i){return(e=Rt(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var $t=function(){function t(){It(this,t),qt(this,"priority",void 0),qt(this,"subPriority",0)}return Nt(t,[{key:"validate",value:function(){return!0}}]),t}(),Vt=function(){_t(e,$t);var t=Pt(e);function e(i,r,n,a,o){var s;return It(this,e),(s=t.call(this)).value=i,s.validateValue=r,s.setValue=n,s.priority=a,o&&(s.subPriority=o),s}return Nt(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Wt=function(){_t(e,$t);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",10),qt(Tt(i),"subPriority",-1),i}return Nt(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Ht=function(){function t(){It(this,t),qt(this,"incompatibleTokens",void 0),qt(this,"priority",void 0),qt(this,"subPriority",void 0)}return Nt(t,[{key:"run",value:function(t,e,i,r){var n=this.parse(t,e,i,r);return n?{setter:new Vt(n.value,this.validate,this.set,this.priority,this.subPriority),rest:n.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Yt=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",140),qt(Tt(i),"incompatibleTokens",["R","u","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Qt=/^(1[0-2]|0?\d)/,Xt=/^(3[0-1]|[0-2]?\d)/,Gt=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ut=/^(5[0-3]|[0-4]?\d)/,Zt=/^(2[0-3]|[0-1]?\d)/,Kt=/^(2[0-4]|[0-1]?\d)/,Jt=/^(1[0-1]|0?\d)/,te=/^(1[0-2]|0?\d)/,ee=/^[0-5]?\d/,ie=/^[0-5]?\d/,re=/^\d/,ne=/^\d{1,2}/,ae=/^\d{1,3}/,oe=/^\d{1,4}/,se=/^-?\d+/,ue=/^-?\d/,he=/^-?\d{1,2}/,le=/^-?\d{1,3}/,ce=/^-?\d{1,4}/,de=/^([+-])(\d{2})(\d{2})?|Z/,pe=/^([+-])(\d{2})(\d{2})|Z/,fe=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,be=/^([+-])(\d{2}):(\d{2})|Z/,ge=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function me(t,e){return t?{value:e(t.value),rest:t.rest}:t}function ve(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function we(t,e){var i=e.match(t);if(!i)return null;if("Z"===i[0])return{value:0,rest:e.slice(1)};var r="+"===i[1]?1:-1,n=i[2]?parseInt(i[2],10):0,a=i[3]?parseInt(i[3],10):0,o=i[5]?parseInt(i[5],10):0;return{value:r*(n*L+a*_+1e3*o),rest:e.slice(i[0].length)}}function xe(t){return ve(se,t)}function ye(t,e){switch(t){case 1:return ve(re,e);case 2:return ve(ne,e);case 3:return ve(ae,e);case 4:return ve(oe,e);default:return ve(new RegExp("^\\d{1,"+t+"}"),e)}}function ke(t,e){switch(t){case 1:return ve(ue,e);case 2:return ve(he,e);case 3:return ve(le,e);case 4:return ve(ce,e);default:return ve(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Ae(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function Ce(t,e){var i,r=e>0,n=r?e:1-e;if(n<=50)i=t||100;else{var a=n+50;i=t+100*Math.floor(a/100)-(t>=a%100?100:0)}return r?i:1-i}function De(t){return t%400==0||t%4==0&&t%100!=0}var ze=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",130),qt(Tt(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){var r=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return me(ye(4,t),r);case"yo":return me(i.ordinalNumber(t,{unit:"year"}),r);default:return me(ye(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var r=t.getUTCFullYear();if(i.isTwoDigitYear){var n=Ce(i.year,r);return t.setUTCFullYear(n,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ee=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",130),qt(Tt(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){var r=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return me(ye(4,t),r);case"Yo":return me(i.ordinalNumber(t,{unit:"year"}),r);default:return me(ye(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,r){var n=X(t,r);if(i.isTwoDigitYear){var a=Ce(i.year,n);return t.setUTCFullYear(a,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Q(t,r)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Q(t,r)}}]),e}(),Fe=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",130),qt(Tt(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e){return ke("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var r=new Date(0);return r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0),W(r)}}]),e}(),Me=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",130),qt(Tt(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e){return ke("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Be=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",120),qt(Tt(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return ye(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Se=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",120),qt(Tt(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return ye(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Te=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),qt(Tt(i),"priority",110),i}return Nt(e,[{key:"parse",value:function(t,e,i){var r=function(t){return t-1};switch(e){case"M":return me(ve(Qt,t),r);case"MM":return me(ye(2,t),r);case"Mo":return me(i.ordinalNumber(t,{unit:"month"}),r);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),je=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",110),qt(Tt(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){var r=function(t){return t-1};switch(e){case"L":return me(ve(Qt,t),r);case"LL":return me(ye(2,t),r);case"Lo":return me(i.ordinalNumber(t,{unit:"month"}),r);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),_e=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",100),qt(Tt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return ve(Ut,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,r){return Q(function(t,e,i){o(2,arguments);var r=s(t),n=D(e),a=G(r,i)-n;return r.setUTCDate(r.getUTCDate()-7*a),r}(t,i,r),r)}}]),e}(),Le=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",100),qt(Tt(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return ve(Ut,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return W(function(t,e){o(2,arguments);var i=s(t),r=D(e),n=Y(i)-r;return i.setUTCDate(i.getUTCDate()-7*n),i}(t,i))}}]),e}(),Oe=[31,28,31,30,31,30,31,31,30,31,30,31],Pe=[31,29,31,30,31,30,31,31,30,31,30,31],Ie=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",90),qt(Tt(i),"subPriority",1),qt(Tt(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return ve(Xt,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){var i=De(t.getUTCFullYear()),r=t.getUTCMonth();return i?e>=1&&e<=Pe[r]:e>=1&&e<=Oe[r]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Re=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",90),qt(Tt(i),"subpriority",1),qt(Tt(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return ve(Gt,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return De(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ne(t,e,i){var r,n,a,u,h,l,c,d;o(2,arguments);var p=M(),f=D(null!==(r=null!==(n=null!==(a=null!==(u=null==i?void 0:i.weekStartsOn)&&void 0!==u?u:null==i||null===(h=i.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==a?a:p.weekStartsOn)&&void 0!==n?n:null===(c=p.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==r?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var b=s(t),g=D(e),m=((g%7+7)%7<f?7:0)+g-b.getUTCDay();return b.setUTCDate(b.getUTCDate()+m),b}var qe=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",90),qt(Tt(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=Ne(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),$e=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",90),qt(Tt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i,r){var n=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return me(ye(e.length,t),n);case"eo":return me(i.ordinalNumber(t,{unit:"day"}),n);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=Ne(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),Ve=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",90),qt(Tt(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i,r){var n=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return me(ye(e.length,t),n);case"co":return me(i.ordinalNumber(t,{unit:"day"}),n);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,r){return(t=Ne(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),We=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",90),qt(Tt(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){var r=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return ye(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return me(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return me(i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return me(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);default:return me(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){o(2,arguments);var i=D(e);i%7==0&&(i-=7);var r=s(t),n=((i%7+7)%7<1?7:0)+i-r.getUTCDay();return r.setUTCDate(r.getUTCDate()+n),r}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),He=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",80),qt(Tt(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Ae(i),0,0,0),t}}]),e}(),Ye=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",80),qt(Tt(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Ae(i),0,0,0),t}}]),e}(),Qe=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",80),qt(Tt(i),"incompatibleTokens",["a","b","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Ae(i),0,0,0),t}}]),e}(),Xe=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",70),qt(Tt(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return ve(te,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:r||12!==i?i:0,0,0,0),t}}]),e}(),Ge=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",70),qt(Tt(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return ve(Zt,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Ue=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",70),qt(Tt(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return ve(Jt,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:i,0,0,0),t}}]),e}(),Ze=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",70),qt(Tt(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return ve(Kt,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Ke=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",60),qt(Tt(i),"incompatibleTokens",["t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return ve(ee,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Je=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",50),qt(Tt(i),"incompatibleTokens",["t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return ve(ie,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return ye(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),ti=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",30),qt(Tt(i),"incompatibleTokens",["t","T"]),i}return Nt(e,[{key:"parse",value:function(t,e){return me(ye(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),ei=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",10),qt(Tt(i),"incompatibleTokens",["t","T","x"]),i}return Nt(e,[{key:"parse",value:function(t,e){switch(e){case"X":return we(de,t);case"XX":return we(pe,t);case"XXXX":return we(fe,t);case"XXXXX":return we(ge,t);default:return we(be,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),ii=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",10),qt(Tt(i),"incompatibleTokens",["t","T","X"]),i}return Nt(e,[{key:"parse",value:function(t,e){switch(e){case"x":return we(de,t);case"xx":return we(pe,t);case"xxxx":return we(fe,t);case"xxxxx":return we(ge,t);default:return we(be,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),ri=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",40),qt(Tt(i),"incompatibleTokens","*"),i}return Nt(e,[{key:"parse",value:function(t){return xe(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),ni=function(){_t(e,Ht);var t=Pt(e);function e(){var i;It(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return qt(Tt(i=t.call.apply(t,[this].concat(n))),"priority",20),qt(Tt(i),"incompatibleTokens","*"),i}return Nt(e,[{key:"parse",value:function(t){return xe(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),ai={G:new Yt,y:new ze,Y:new Ee,R:new Fe,u:new Me,Q:new Be,q:new Se,M:new Te,L:new je,w:new _e,I:new Le,d:new Ie,D:new Re,E:new qe,e:new $e,c:new Ve,i:new We,a:new He,b:new Ye,B:new Qe,h:new Xe,H:new Ge,K:new Ue,k:new Ze,m:new Ke,s:new Je,S:new ti,X:new ei,x:new ii,t:new ri,T:new ni},oi=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,si=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ui=/^'([^]*?)'?$/,hi=/''/g,li=/\S/,ci=/[a-zA-Z]/;function di(t,e){return o(2,arguments),z(t,-D(e))}function pi(t,e){o(1,arguments);var i=D(2);if(2!==i&&1!==i&&0!==i)throw new RangeError("additionalDigits must be 0, 1 or 2");if("string"!=typeof t&&"[object String]"!==Object.prototype.toString.call(t))return new Date(NaN);var r,n=function(t){var e,i={},r=t.split(fi.dateTimeDelimiter);if(r.length>2)return i;if(/:/.test(r[0])?e=r[0]:(i.date=r[0],e=r[1],fi.timeZoneDelimiter.test(i.date)&&(i.date=t.split(fi.timeZoneDelimiter)[0],e=t.substr(i.date.length,t.length))),e){var n=fi.timezone.exec(e);n?(i.time=e.replace(n[1],""),i.timezone=n[1]):i.time=e}return i}(t);if(n.date){var a=function(t,e){var i=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(i);if(!r)return{year:NaN,restDateString:""};var n=r[1]?parseInt(r[1]):null,a=r[2]?parseInt(r[2]):null;return{year:null===a?n:100*a,restDateString:t.slice((r[1]||r[2]).length)}}(n.date,i);r=function(t,e){if(null===e)return new Date(NaN);var i=t.match(bi);if(!i)return new Date(NaN);var r=!!i[4],n=vi(i[1]),a=vi(i[2])-1,o=vi(i[3]),s=vi(i[4]),u=vi(i[5])-1;if(r)return function(t,e,i){return e>=1&&e<=53&&i>=0&&i<=6}(0,s,u)?function(t,e,i){var r=new Date(0);r.setUTCFullYear(t,0,4);var n=7*(e-1)+i+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+n),r}(e,s,u):new Date(NaN);var h=new Date(0);return function(t,e,i){return e>=0&&e<=11&&i>=1&&i<=(xi[e]||(yi(t)?29:28))}(e,a,o)&&function(t,e){return e>=1&&e<=(yi(t)?366:365)}(e,n)?(h.setUTCFullYear(e,a,Math.max(n,o)),h):new Date(NaN)}(a.restDateString,a.year)}if(!r||isNaN(r.getTime()))return new Date(NaN);var s,u=r.getTime(),h=0;if(n.time&&(h=function(t){var e=t.match(gi);if(!e)return NaN;var i=wi(e[1]),r=wi(e[2]),n=wi(e[3]);return function(t,e,i){return 24===t?0===e&&0===i:i>=0&&i<60&&e>=0&&e<60&&t>=0&&t<25}(i,r,n)?i*L+r*_+1e3*n:NaN}(n.time),isNaN(h)))return new Date(NaN);if(!n.timezone){var l=new Date(u+h),c=new Date(0);return c.setFullYear(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),c.setHours(l.getUTCHours(),l.getUTCMinutes(),l.getUTCSeconds(),l.getUTCMilliseconds()),c}return s=function(t){if("Z"===t)return 0;var e=t.match(mi);if(!e)return 0;var i="+"===e[1]?-1:1,r=parseInt(e[2]),n=e[3]&&parseInt(e[3])||0;return function(t,e){return e>=0&&e<=59}(0,n)?i*(r*L+n*_):NaN}(n.timezone),isNaN(s)?new Date(NaN):new Date(u+h+s)}var fi={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},bi=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,gi=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,mi=/^([+-])(\d{2})(?::?(\d{2}))?$/;function vi(t){return t?parseInt(t):1}function wi(t){return t&&parseFloat(t.replace(",","."))||0}var xi=[31,null,31,30,31,30,31,31,30,31,30,31];function yi(t){return t%400==0||t%4==0&&t%100!=0}function ki(t,e){return o(2,arguments),E(t,-D(e))}var Ai={code:"en-AU",formatDistance:lt,formatLong:{date:ct({formats:{full:"EEEE, d MMMM yyyy",long:"d MMMM yyyy",medium:"d MMM yyyy",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ct({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ct({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:ft,localize:gt,match:wt,options:{weekStartsOn:1,firstWeekContainsDate:4}},Ci={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 mês",other:"cerca de {{count}} meses"},xMonths:{one:"1 mês",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},Di={date:ct({formats:{full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},defaultWidth:"full"}),time:ct({formats:{full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},defaultWidth:"full"}),dateTime:ct({formats:{full:"{{date}} 'às' {{time}}",long:"{{date}} 'às' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},zi={lastWeek:function(t){var e=t.getUTCDay();return"'"+(0===e||6===e?"último":"última")+"' eeee 'às' p"},yesterday:"'ontem às' p",today:"'hoje às' p",tomorrow:"'amanhã às' p",nextWeek:"eeee 'às' p",other:"P"},Ei={code:"pt-BR",formatDistance:function(t,e,i){var r,n=Ci[t];return r="string"==typeof n?n:1===e?n.one:n.other.replace("{{count}}",String(e)),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"em "+r:"há "+r:r},formatLong:Di,formatRelative:function(t,e){var i=zi[t];return"function"==typeof i?i(e):i},localize:{ordinalNumber:function(t,e){var i=Number(t);return"week"===(null==e?void 0:e.unit)?i+"ª":i+"º"},era:bt({values:{narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},defaultWidth:"wide"}),quarter:bt({values:{narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:bt({values:{narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},defaultWidth:"wide"}),day:bt({values:{narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","terça","quarta","quinta","sexta","sábado"],wide:["domingo","segunda-feira","terça-feira","quarta-feira","quinta-feira","sexta-feira","sábado"]},defaultWidth:"wide"}),dayPeriod:bt({values:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manhã",afternoon:"tarde",evening:"tarde",night:"noite"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manhã",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:vt({matchPattern:/^(\d+)[ºªo]?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:mt({matchPatterns:{narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},defaultParseWidth:"any"}),quarter:mt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:mt({matchPatterns:{narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},defaultParseWidth:"any"}),day:mt({matchPatterns:{narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},defaultMatchWidth:"wide",parsePatterns:{short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},defaultParseWidth:"any"}),dayPeriod:mt({matchPatterns:{narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};const Fi=class{constructor(i){t(this,i),this.onchangeday=n(this,"onchangeday"),this.changeDateInView=n(this,"changeDateInView"),this.isDisabled=!1,this.isLoading=!1,this.period=null,this.width="268px",this.minWidth="268px",this.maxWidth="400px",this.mode="single",this.dateFormat="yyyy-MM-dd",this.locale="pt-BR",this.type="dropdown",this.disable=[],this.enable=[],this.defaultDate=[],this.showToday=!0,this.customDates=[],this.limitRange=null,this.collapsed=null,this.selectLabelColorMode="light",this.selectedDates=[],this.rangeStart=null,this.defaultDates=[],this.currentDate=new Date,this.selectMonth="",this.selectYear="",this.styles={},this.theme=window.CuraAPI.theme,this.weights=this.theme.fonts.getWeights(),this.optionsLocale={"pt-BR":Ei,"en-US":Ai},this.handlePrevMonth=()=>{this.isDisabled||(this.collapsed?this.updateCurrentWeek("prev"):this.updateCurrentMonth("prev"))},this.handleNextMonth=()=>{this.isDisabled||(this.collapsed?this.updateCurrentWeek("next"):this.updateCurrentMonth("next"))},this.renderItemWeekDays=(t,i)=>e("cura-label",{class:"day",size:"xsmall",color:this.isDisabled?"neutral-medium":"neutral-black",weight:"bold",key:i},"sab"===t?"SÁB":t.toLocaleUpperCase()),this.getDisabledClassModifier=()=>this.isDisabled?" --disabled":""}connectedCallback(){this.setFontProperties(),this.initializeDefaultDates(),[{name:"--primary-base",theme:"primary-base"},{name:"--primary-lighter",theme:"primary-lighter"},{name:"--primary-light",theme:"primary-light"},{name:"--neutral-black",theme:"neutral-black"},{name:"--primary-darker",theme:"primary-darker"},{name:"--neutral-dark",theme:"neutral-dark"},{name:"--neutral-light",theme:"neutral-light"},{name:"--neutral-white",theme:"neutral-white"},{name:"--select-label",theme:"dark"===this.selectLabelColorMode?"neutral-black":"neutral-white"}].forEach((t=>this.styles=Object.assign(Object.assign({},this.styles),{[t.name]:this.theme.colors.getColor(t.theme)})))}setFontProperties(){this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-color"]=window.CuraAPI.theme.fonts.getColor(),this.styles["--font-weight-medium"]=this.weights.medium,this.styles["--font-weight-bold"]=this.weights.bold,this.styles["--font-weight-regular"]=this.weights.regular}initializeDefaultDates(){if("string"==typeof this.defaultDate){const t=JSON.parse(this.defaultDate||"[]");this.defaultDate="string"==typeof t?[t]:t}this.defaultDates=this.expandDateRanges(this.defaultDate),this.defaultDate[0]&&(this.currentDate=function(t,e,i,r){var n,a,h,l,c,d,p,f,b;o(3,arguments);var g=String(t),m=String(e),v=M(),w=null!==(n=v.locale)&&void 0!==n?n:xt;if(!w.match)throw new RangeError("locale must contain match property");var x=D(null!==(a=null!==(h=v.firstWeekContainsDate)&&void 0!==h?h:null===(l=v.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==a?a:1);if(!(x>=1&&x<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=D(null!==(d=null!==(p=v.weekStartsOn)&&void 0!==p?p:null===(f=v.locale)||void 0===f||null===(b=f.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==d?d:0);if(!(y>=0&&y<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===m)return""===g?s(i):new Date(NaN);var k,A={firstWeekContainsDate:x,weekStartsOn:y,locale:w},C=[new Wt],z=m.match(si).map((function(t){var e=t[0];return e in rt?(0,rt[e])(t,w.formatLong):t})).join("").match(oi),E=[],F=St(z);try{var B=function(){var e=k.value;st(e)&&ut(e,m,t),ot(e)&&ut(e,m,t);var i=e[0],r=ai[i];if(r){var n=r.incompatibleTokens;if(Array.isArray(n)){var a=E.find((function(t){return n.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&E.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));E.push({token:i,fullToken:e});var o=r.run(g,e,w.match,A);if(!o)return{v:new Date(NaN)};C.push(o.setter),g=o.rest}else{if(i.match(ci))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(ui)[1].replace(hi,"'")),0!==g.indexOf(e))return{v:new Date(NaN)};g=g.slice(e.length)}};for(F.s();!(k=F.n()).done;){var T=B();if("object"===u(T))return T.v}}catch(t){F.e(t)}finally{F.f()}if(g.length>0&&li.test(g))return new Date(NaN);var j=C.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return C.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),_=s(i);if(isNaN(_.getTime()))return new Date(NaN);var L,O=V(_,S(_)),P={},I=St(j);try{for(I.s();!(L=I.n()).done;){var R=L.value;if(!R.validate(O,A))return new Date(NaN);var N=R.set(O,P,A);Array.isArray(N)?(O=N[0],Et(P,N[1])):O=N}}catch(t){I.e(t)}finally{I.f()}return O}(this.defaultDate[0],this.dateFormat,new Date))}determineLocale(){return this.optionsLocale[this.locale]||this.locale}isDateInValidPeriod(t){return null===this.period||this.period.includes(zt(t,this.dateFormat))}isDateSelected(t){return this.isDateInList(this.selectedDates,t)}isDateInDefaultSelection(t){return this.isDateInList(this.defaultDates,t)}isDateInDisabledPeriod(t){const e=new Date;return e.setHours(0,0,0,0),this.disablePassDates?h(t,e):this.disableFutureDates?l(t,e):null!==this.disable&&this.isDateInList(this.expandDateRanges(this.disable),t)}isDateInEnabledPeriod(t){return!0}isDateInList(t,e){return t.some((t=>O(t,e)))}removeDateFromSelection(t,e){return t.filter((t=>!O(t,e)))}updateCurrentMonth(t){let e=this.currentDate;"prev"===t&&(e=ki(this.currentDate,1)),"next"===t&&(e=E(this.currentDate,1)),this.currentDate=e,this.sendEventChangeDateInView(Boolean(this.collapsed),e)}onMonthDropdownChange(t){const{months:e}=this.fetchMonthNames(),i=t.detail;this.selectMonth=i;const r=new Date(Mt(this.currentDate),e.indexOf(i),1);this.currentDate=r,this.sendEventChangeDateInView(Boolean(this.collapsed),r)}onYearDropdownChange(t){const e=t.detail;this.selectYear=e;const i=new Date(e,Ft(this.currentDate),1);this.currentDate=i,this.sendEventChangeDateInView(Boolean(this.collapsed),i)}expandDateRanges(t){return t&&Array.isArray(t)?t.flatMap((t=>{if("string"==typeof t)return P(pi(t))?[pi(t)]:[];const e=pi(t.from),i=pi(t.to);return P(e)&&P(i)&&e<=i?R({start:e,end:i}):[]})):[]}selectSingleDate(t){this.defaultDate=[],this.selectedDates=[t]}selectMultiplesDate(t){if(!this.isDateSelected(t)||!this.isDateInDefaultSelection(t))return this.selectedDates=[...this.selectedDates,t];this.selectedDates=this.removeDateFromSelection(this.selectedDates,t),this.defaultDates=this.removeDateFromSelection(this.defaultDates,t)}selectDateRange(t){this.defaultDates=[];const e=R({start:h(this.rangeStart,t)?this.rangeStart:t,end:l(this.rangeStart,t)?this.rangeStart:t});if(!this.rangeStart||2===this.selectedDates.length)return this.rangeStart=t,void(this.selectedDates=[t]);(null===this.limitRange||e.length<=this.limitRange)&&(this.selectedDates=e,this.rangeStart=null)}onDateClick(t){this.isDisabled||this.isDateInValidPeriod(t)&&!this.isDateInDisabledPeriod(t)&&this.isDateInEnabledPeriod(t)&&({single:this.selectSingleDate.bind(this),multiple:this.selectMultiplesDate.bind(this),range:this.selectDateRange.bind(this)}[this.mode](t),this.onchangeday.emit({days:[...this.defaultDates,...this.selectedDates].filter((t=>this.isDateInValidPeriod(t)))}))}fetchWeekDays(){return R({start:B(new Date(2021,0,3),{locale:this.determineLocale()}),end:$(new Date(2021,0,3),{locale:this.determineLocale()})}).map((t=>zt(t,"EEEEEE",{locale:this.determineLocale()})))}showNotColapsedCalendar(){this.collapsed?this.fetchDaysOfWeek():this.fetchDaysOfMonth(),this.collapsed=!1}showColapsedCalendar(){return this.collapsed=!0,this.fetchDaysOfWeek()}fetchDaysOfWeek(t){return R({start:B(t||this.currentDate),end:$(t||this.currentDate)}).slice(0,7)}updateCurrentWeek(t){let e=this.currentDate;"prev"===t&&(e=function(t,e){return o(2,arguments),j(t,-D(e))}(this.currentDate,1)),"next"===t&&(e=j(this.currentDate,1)),this.currentDate=e,this.sendEventChangeDateInView(Boolean(this.collapsed),e)}fetchDaysOfMonth(t){const e=N(t||this.currentDate),i=I(t||this.currentDate),r=R({start:e,end:i}),n=function(t){return o(1,arguments),s(t).getDay()}(e),a=I(ki(e,1)),u=[...n>0?R({start:di(a,n-1),end:a}):[],...r];if(u.length>=35)return u.slice(0,35);const h=35-u.length,l=N(E(i,1)),c=R({start:l,end:z(l,h-1)});return[...u,...c]}fetchMonthNames(){const t=Mt(this.currentDate),e=this.determineLocale(),i=function(t){o(1,arguments);var e=t||{},i=s(e.start),r=s(e.end).getTime(),n=[];if(!(i.getTime()<=r))throw new RangeError("Invalid interval");var a=i;for(a.setHours(0,0,0,0),a.setDate(1);a.getTime()<=r;)n.push(s(a)),a.setMonth(a.getMonth()+1);return n}({start:q(new Date(t,0,1)),end:new Date(t,11,31)}).map((t=>zt(t,"MMMM",{locale:e})));return{months:i.map((t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()))}}fetchYearList(){const t=Mt(new Date);return Array.from({length:100},((e,i)=>t-i))}determinePrevButtonColor(){return h(new Date(Mt(this.currentDate),Ft(this.currentDate)-1,1),N(new Date))&&"primary-base"}getDateStatus(t){const[e,i]=[this.selectedDates[0],this.selectedDates[this.selectedDates.length-1]],[r,n]=[this.defaultDates[0],this.defaultDates[this.defaultDates.length-1]],a=this.selectedDates.length>1,o=this.defaultDates.length>1,s=this.isDateSelected(t)&&O(t,e),u=this.isDateInDefaultSelection(t)&&O(t,r),h=this.isDateSelected(t)&&O(t,i),l=this.isDateInDefaultSelection(t)&&O(t,n),c=s||u,d=h||l,p=this.expandDateRanges([{from:null==e?void 0:e.toISOString(),to:null==i?void 0:i.toISOString()}]),f=this.expandDateRanges([{from:null==r?void 0:r.toISOString(),to:null==n?void 0:n.toISOString()}]),b=a&&this.isDateInList(p,t),g=o&&this.isDateInList(f,t),m=this.isDateInValidPeriod(t);return{isStart:c,isEnd:d,isValid:m,isInvalid:!m||this.isDateInDisabledPeriod(t)||!this.isDateInEnabledPeriod(t),isSelected:this.isDateSelected(t),isRange:"range"===this.mode&&(a||o),isDefault:"range"!==this.mode&&this.isDateInDefaultSelection(t),isInterval:(b||g)&&!c&&!d}}getClasses(t){const e={date:!0};if(null===t)return e;const i=this.getDateStatus(t);return e.today=!0===this.showToday&&function(t){return o(1,arguments),O(t,Date.now())}(t),e.valid=i.isValid,e.invalid=i.isInvalid,e.selected=i.isSelected,e.range=i.isRange,e["default-dates"]=i.isDefault,e.start=i.isStart,e.interval=i.isInterval,e.end=i.isEnd,e}getHostCSSProperties(){return{"--width":this.width,"--min-width":this.minWidth,"--max-width":this.maxWidth,"--color-neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite")}}sendEventChangeDateInView(t,e){const i={datesInView:t?this.fetchDaysOfWeek(e):this.fetchDaysOfMonth(e),monthDays:this.fetchDaysOfMonth(e)};this.changeDateInView.emit(i)}watchDefaultDatesArray(){this.selectedDates=this.customDates}handleDefaultDateChange(t){if(this.selectedDates=[],"string"==typeof t){const e=JSON.parse(t||"[]");t="string"==typeof e?[e]:e}this.defaultDates=this.expandDateRanges(t)}watchCollapse(t){this.sendEventChangeDateInView(t,this.currentDate)}render(){const{months:t}=this.fetchMonthNames();return e(i,{key:"ce5e455df204f6d7a8a3a34eba8198d33e1dd798",style:this.getHostCSSProperties()},e("div",{key:"b09f8c9ae06a38f0c04022a3c76ca89aed67f694",class:`calendar ${this.floating?"floating":""} ${this.embedded?"embedded":""} ${this.getDisabledClassModifier()}`,style:this.styles},e("header",{key:"c70bc378b8427424d4128f98b6f39f3a43d18e8b",class:"header"},e("div",{key:"cdda360107fd69b8a32e7773dfcb9f94bc63b517",class:`month-year ${"dropdown"===this.type&&"dropdown"}`},e("cura-icon",{key:"a19af085d074aa74ba3a51712ed62228a4244911",class:`icon ${"dropdown"===this.type&&"dropdown"}`,name:"left",disabled:this.isDisabled,color:this.determinePrevButtonColor(),onClick:this.handlePrevMonth}),"dropdown"===this.type?e("div",{class:"select"},e("cura-select",{disabled:this.isDisabled,size:"small",class:"drop-month",mode:"transparent",value:t[Ft(this.currentDate)],onSelected:t=>this.onMonthDropdownChange(t)},t.map(((t,i)=>e("cura-select-option",{size:"xsmall",key:i,value:t},t)))),e("cura-select",{disabled:this.isDisabled,size:"small",class:"drop-year",mode:"transparent",value:Mt(this.currentDate).toString(),onSelected:t=>this.onYearDropdownChange(t)},this.fetchYearList().map(((t,i)=>e("cura-select-option",{key:i,value:t.toString()},t.toString()))))):e("cura-label",{color:this.isDisabled?"neutral-dark":"neutral-black",size:"small"},t[Ft(this.currentDate)].slice(0,3),", ",Mt(this.currentDate)),e("cura-icon",{key:"0e9917d69adf95a5f4566d1269738d8ea4a11036",class:`icon ${"dropdown"===this.type&&"dropdown"}`,name:"right",disabled:this.isDisabled,color:"primary-base",onClick:this.handleNextMonth}))),e("span",{key:"f5249c9c7ebeae18af57c43bbd988aa7c21b7b04",class:"days-of-week"},this.fetchWeekDays().map(this.renderItemWeekDays)),e("div",{key:"2465a9c40856462242a80f1fda2abf7dc2648012",class:"dates"},this.collapsed?this.fetchDaysOfWeek().map(((t,i)=>e("div",{key:i,class:this.getClasses(t),onClick:()=>this.onDateClick(t)},t?zt(t,"d"):""))):this.fetchDaysOfMonth().map(((t,i)=>e("div",{key:i,class:this.getClasses(t),onClick:()=>this.onDateClick(t)},t?zt(t,"d"):"")))),null!==this.collapsed?e("div",{class:"collapsed-container"},this.collapsed?e("cura-button-transparent",{disabled:this.isDisabled,onClick:()=>this.showNotColapsedCalendar(),size:"small",color:"primary",fontColor:"dark",iconName:"plusCircle"},"Veja mais datas"):e("cura-button-transparent",{onClick:()=>this.showColapsedCalendar(),size:"small",color:"primary",fontColor:"dark",iconName:"minusCircle"},"Veja menos datas")):null,this.isLoading&&e("div",{key:"fba41e2fd1b743d534f763e690b8eaf8f741f2f4",class:"loading-container"},e("cura-loader-circle",{key:"9780c689a48c0c6ef2804ba6e9864338dd6a21a9",color:"primary",size:"large"}),e("slot",{key:"c0e9eee4818991d9fd6ac8322aa183cf574abb65",name:"loadingMessage"}))))}static get watchers(){return{defaultDate:[{initializeDefaultDates:0},{handleDefaultDateChange:0}],customDates:[{watchDefaultDatesArray:0}],collapsed:[{watchCollapse:0}]}}};Fi.style=':host{display:block;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);margin:0 auto}:host .calendar{display:flex;flex-direction:column;gap:5px;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);border-radius:4px;overflow:hidden;background:var(--color-neutral-purewhite);font-family:var(--font-family);position:relative}:host .calendar.embedded{border:2px solid var(--neutral-light);padding:0px 12px 12px 12px}:host .calendar.floating{box-shadow:0 4px 8px var(--neutral-light)}:host .header{position:relative;padding:12px 0}:host .header::after{content:"";position:absolute;bottom:0;left:2px;right:2px;border-bottom:2px dotted var(--neutral-light)}:host .month-year{display:flex;padding:12px 8px;justify-content:space-between;align-self:stretch}:host .month-year.dropdown{padding:0%}:host .select{display:flex;padding:7px 10px 0px;justify-content:center;align-items:center;gap:6px;flex:1 0 0}:host .drop-month{display:flex;max-width:118px;padding:0px;align-items:flex-start;gap:0px;flex:1 0 0}:host .drop-year{display:flex;min-width:80px;max-width:85px;padding:0px;align-items:flex-start;gap:0px;flex:1 0 0}:host .days-of-week{display:flex;height:30px;padding:4px;justify-content:center;align-items:center;gap:4px;flex-shrink:0}:host .day{flex:1;text-align:center}:host .dates{display:flex;flex-wrap:wrap;align-items:center;align-self:stretch;gap:0}:host .icon{cursor:pointer;position:relative;overflow:hidden;border-radius:50%}:host .icon.dropdown{margin-top:10px}:host .icon::before{content:"";position:absolute;border-radius:50%;top:50%;left:50%;width:20px;height:20px;background:var(--primary-base);transform:translate(-50%, -50%) scale(0);transition:transform 0.2s ease}:host .icon:active::before{transform:translate(-50%, -50%) scale(1)}:host .icon:active{transform:scale(1)}:host .collapsed-container{text-align:center;position:relative;display:flex;align-items:center;justify-content:center;padding-top:10px}:host .collapsed-container::before{content:"";position:absolute;bottom:0;top:0;left:2px;right:2px;border-top:2px dotted var(--neutral-light)}:host .date{display:flex;justify-content:center;align-items:center;height:auto;width:14.2857142857%;aspect-ratio:1;font-size:14px;cursor:pointer;position:relative;box-sizing:border-box;text-align:center;flex-shrink:0}:host .date.today{border:2px solid var(--primary-darker);border-radius:50%;color:var(--primary-darker)}:host .date.selected{color:var(--select-label) !important;background:var(--primary-base);border-radius:50%}:host .date.default-dates{color:var(--select-label) !important;background:var(--primary-base);border-radius:50%;border:none}:host .date.invalid{color:var(--neutral-dark) !important;cursor:not-allowed}:host .date.invalid:hover{background:none;box-shadow:none}:host .date.valid{color:var(--primary-darker);font-weight:var(--font-weight-bold)}:host .date.range.start{border-radius:50% 0 0 50%;color:var(--select-label) !important;background:var(--primary-base)}:host .date.range.interval{border-radius:0;background:var(--primary-lighter);color:var(--neutral-black) !important}:host .date.range.interval.today{border:none}:host .date.range.end{border-radius:0 50% 50% 0;color:var(--select-label) !important;background:var(--primary-base)}@media (min-width: 992px){:host .date:hover{background:var(--primary-lighter);border-radius:50%;color:var(--neutral-white)}}:host select,:host input{width:60px;font-size:16px;box-shadow:0 2px 2px var(--neutral-black);padding:5px;border-radius:4px;border:1px solid #ccc;background:#f7f7f7}:host .--disabled .icon::before{display:none}:host .--disabled .date{cursor:initial}@media (min-width: 992px){:host .--disabled .date:hover{color:var(--neutral-dark);cursor:initial;background:none;box-shadow:none}}:host .--disabled .default-dates{background-color:transparent;color:var(--neutral-dark) !important}:host .--disabled .today{border:2px solid var(--neutral-dark);color:var(--neutral-dark);cursor:initial}:host .--disabled .valid{color:var(--neutral-dark);font-weight:initial}:host .loading-container{align-items:center;background-color:var(--color-neutral-purewhite);display:flex;flex-direction:column;gap:12px;height:100%;justify-content:center;position:absolute;width:calc(100% - 12px)}';const Mi=class{constructor(e){t(this,e),this.hasPadding=!0,this.hasShadow=!1,this.type="solid",this.colorMode="light",this.target="_self",this.styles={}}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.styles["--base-spacing"]=window.CuraAPI.theme.spacing.getSpacing(),this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor("neutral-white"),this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor("neutral-base"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--neutral-black"]=window.CuraAPI.theme.colors.getColor("neutral-black"),this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor("neutral-black",.16),this.styles["--primary-lighter"]=window.CuraAPI.theme.colors.getColor("primary-lighter"),this.styles["--primary-base"]=window.CuraAPI.theme.colors.getColor("primary-base"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium}getClasses(){const t={};return t[this.type]=!0,t.cardLink=this.href,t[this.colorMode]=!0,t.hasPadding=this.hasPadding,t.hasShadow=this.hasShadow,t}render(){return e(i,{key:"73f399ec63b8a0933a22c4a6d605dbb4bc8bf2c3",role:this.href?"link":"div"},this.href?e("a",{class:this.getClasses(),target:this.target,style:this.styles,href:this.href},e("slot",null)):e("div",{class:this.getClasses(),style:this.styles},e("slot",null)))}};Mi.style=":host{display:block;box-sizing:border-box;font-size:var(--font-size);font-family:var(--font-family)}:host ::slotted(*){display:flex;align-items:center;justify-content:center;font-size:var(--font-size);font-family:var(--font-family)}a{display:block;text-decoration:none !important;color:inherit}.solid{background-color:var(--neutral-purewhite);border:2px solid var(--neutral-base);border-radius:12px;overflow:hidden;padding:0px;box-shadow:none}.solid ::slotted(*){border-radius:0}.solid.hasPadding{padding:20px}.solid.hasPadding ::slotted(*){border-radius:4px !important}.solid.hasShadow{border:2px solid var(--neutral-base);box-shadow:0px 1px 4px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}.solid.cardLink{background-color:var(--neutral-purewhite);border:2px solid var(--primary-base);border-radius:12px;padding:0px;box-shadow:none;cursor:pointer}.solid.cardLink ::slotted(*){border-radius:0px}.solid.cardLink:hover{border:2px solid var(--primary-lighter) !important}.solid.cardLink.hasPadding{padding:20px}.solid.cardLink.hasPadding ::slotted(*){border-radius:4px !important}.solid.cardLink.hasPadding:hover{border:2px solid var(--primary-lighter) !important}.solid.cardLink.hasShadow{border:2px solid var(--primary-base);box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16))}.solid.cardLink:not(.hasPadding).hasShadow ::slotted(*){border-radius:12px !important}.solid.cardLink.dark{background-color:var(--neutral-purewhite);border:2px solid var(--neutral-purewhite)}.solid.cardLink.dark:hover{border:2px solid var(--primary-lighter)}.transparent{background-color:transparent;border:0;border-radius:12px;padding:0px;overflow:hidden}.transparent ::slotted(*){border-radius:12px}.transparent.hasPadding{padding:20px}.transparent.hasPadding ::slotted(*){border-radius:4px}.transparent.cardLink{background-color:transparent;border:2px solid var(--primary-base);overflow:hidden;border-radius:12px;padding:0px;box-shadow:none}.transparent.cardLink ::slotted(*){border-radius:0px !important}.transparent.cardLink:hover{border:2px solid var(--primary-lighter) !important}.transparent.cardLink.light{background-color:var(--neutral-purewhite);border:2px solid var(--primary-base)}.transparent.cardLink.light ::slotted(*){border-radius:12px !important}.transparent.cardLink.light:hover{border-color:var(--primary-lighter) !important}.transparent.cardLink.dark{background-color:transparent;border:2px solid var(--neutral-purewhite)}.transparent.cardLink.dark:hover{border:0}.transparent.cardLink.hasPadding{padding:20px}.transparent.cardLink.hasPadding ::slotted(*){border-radius:4px !important}";class Bi{constructor(t,e){this._stopPropagationEvent=t=>{this.scrollableElement.scrollHeight<=this.scrollableElement.clientHeight&&t.preventDefault(),t.stopPropagation()},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()},t&&e?(this.hostElement=t,this.scrollableElement=e):console.error("Componentes host ou scrollable não foram informados corretamente ou não existem.")}disableScroll(){this.scrollPosition=window.scrollY,window.scrollTo({top:0,behavior:"instant"}),c(),this._addEvents()}enableScroll(){d(),window.scrollTo({top:this.scrollPosition,behavior:"instant"}),this._removeEvents()}_addEvents(){this.hostElement.addEventListener("wheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("mousewheel",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("touchmove",this._preventEvent,{passive:!1}),this.hostElement.addEventListener("scroll",this._preventEvent,{passive:!1}),this.scrollableElement.addEventListener("wheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("mousewheel",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("touchmove",this._stopPropagationEvent,{passive:!1}),this.scrollableElement.addEventListener("scroll",this._stopPropagationEvent,{passive:!1})}_removeEvents(){this.hostElement.removeEventListener("wheel",this._preventEvent),this.hostElement.removeEventListener("mousewheel",this._preventEvent),this.hostElement.removeEventListener("touchmove",this._preventEvent),this.hostElement.removeEventListener("scroll",this._preventEvent),this.scrollableElement.removeEventListener("wheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("mousewheel",this._stopPropagationEvent),this.scrollableElement.removeEventListener("touchmove",this._stopPropagationEvent),this.scrollableElement.removeEventListener("scroll",this._stopPropagationEvent)}}const Si=class{constructor(e){t(this,e),this.termchange=n(this,"termchange"),this.optionselect=n(this,"optionselect"),this.size="large",this.status="default",this.disabled=!1,this.required=!1,this.placeholder="",this.label="",this.icon="search",this.maxheight="400px",this.value="",this.searchdelay=400,this.searchminchars=3,this.styles={},this.zoomState=!1,this.isOnFocus=!1,this.resizeTimeoutMs=66,this.focusTimeoutMs=500,this.blurTimeoutMs=300,this.highlightedIndex=-1,this.dropdownItems=[],this.dropdownSelectableItems=[],this.handleSlotChange=()=>{this.getSlotElements()},this.handleWindowResize=()=>{this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((()=>{this.isMobile=p(),this.setZoomHeight()}),this.resizeTimeoutMs)},this.handleVisualViewportChange=()=>{this.zoomState&&(this.viewportTimeout&&clearTimeout(this.viewportTimeout),this.viewportTimeout=setTimeout((()=>this.setZoomHeight()),this.resizeTimeoutMs))},this.handleFocus=()=>{this.focusTimeout&&clearTimeout(this.focusTimeout),this.focusTimeout=setTimeout((()=>{this.isOnFocus=!0,this.clearHighlight(),this.isMobile&&!this.zoomState&&this.enterZoom(),this.zoomState&&this.setZoomHeight(),setTimeout((()=>{var t;null===(t=this.selectedOptionElement)||void 0===t||t.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"})}),10)}),this.focusTimeoutMs)},this.handleBlur=()=>{this.blurTimeout&&clearTimeout(this.blurTimeout),this.blurTimeout=setTimeout((()=>{this.zoomState&&setTimeout((()=>this.setZoomHeight()),f?500:100),this.isOnFocus=!1}),this.blurTimeoutMs)},this.handleFocusout=()=>{this.zoomState&&this.setZoomHeight()},this.handleBackClick=()=>{this.exitZoom()},this.handleOptionActionClick=t=>{this.getInputElement().setFocus(),this._preventEvent(t)},this.handleInputClear=t=>{this.setValue(""),this.clearSelectedOptions(),this._preventEvent(t)},this.handleSelectOption=t=>{this._selectOption(t.detail),this._preventEvent(t)},this.handleInputValueChange=t=>{this.setValue(t.detail),this.selectedOptionElement&&t.detail!==this.selectedOptionElement.value&&this.clearSelectedOptions(),this._preventEvent(t)},this.handleDropdownMouseOver=()=>{(this.highlightedElement||this.highlightedIndex>=0)&&this.clearHighlight()},this.handleKeyDown=t=>{"ArrowDown"===t.key&&this.moveHighlight("next"),"ArrowUp"===t.key&&this.moveHighlight("prev"),"Enter"===t.key&&this.selectHighlight()},this.getInputElement=()=>{var t;return null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector("cura-input-text")},this._preventEvent=t=>{t.preventDefault(),t.stopPropagation()}}async setFocus(){this.getInputElement().setFocus()}async selectOption(t){this._selectOption(t)}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights(),this.breakpoints=window.CuraAPI.theme.breakpoints.get(),this.styles["--info"]=window.CuraAPI.theme.colors.getColor("info-base"),this.styles["--purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor("neutral-black",.16),this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark"),this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter"),this.styles["--primary"]=window.CuraAPI.theme.colors.getColor("primary"),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-weight-medium"]=this.weights.medium,null===window||void 0===window||window.addEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.addEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.addEventListener("resize",this.handleVisualViewportChange),window.visualViewport.addEventListener("scroll",this.handleVisualViewportChange)),this.isMobile=p()}componentDidLoad(){var t;this.dropdownElement=null===(t=this.host.shadowRoot)||void 0===t?void 0:t.querySelector(".dropdown-container"),this.host.addEventListener("actionclick",this.handleOptionActionClick),this.host.addEventListener("selectoption",this.handleSelectOption),this.scrollBehavior=new Bi(this.host,this.dropdownElement),setTimeout((()=>this.getSlotElements()),10)}disconnectedCallback(){this.removeAllListeners()}removeAllListeners(){null===window||void 0===window||window.removeEventListener("resize",this.handleWindowResize),null===window||void 0===window||window.removeEventListener("orientationchange",this.handleWindowResize),(null===window||void 0===window?void 0:window.visualViewport)&&(window.visualViewport.removeEventListener("resize",this.handleVisualViewportChange),window.visualViewport.removeEventListener("scroll",this.handleVisualViewportChange)),this.host.removeEventListener("actionclick",this.handleOptionActionClick),this.host.removeEventListener("selectoption",this.handleSelectOption)}moveHighlight(t){if(!this.dropdownSelectableItems.length)return;let e="next"===t?this.highlightedIndex+1:this.highlightedIndex-1;if(e<0)return void this.clearHighlight();const i=this.dropdownSelectableItems.length-1;e>i&&(e=i),this.highlightedElement&&(this.highlightedElement.highlighted=!1),this.highlightedIndex=e,this.highlightedElement=this.dropdownSelectableItems[e],this.highlightedElement.selected?this.moveHighlight(t):(this.highlightedElement.highlighted=!0,this.highlightedElement.scrollIntoView({behavior:"instant",block:"nearest",inline:"nearest"}))}clearHighlight(){this.highlightedElement&&(this.highlightedElement.highlighted=!1,this.highlightedElement=null),this.highlightedIndex=-1}selectHighlight(){this.highlightedElement&&(this._selectOption(this.highlightedElement.optionid),this.clearHighlight(),this.getInputElement().blur())}setValue(t){this.value!==t&&(this.value=t,this.valueTimeout&&clearTimeout(this.valueTimeout),this.valueTimeout=setTimeout((()=>{var t;const e=null!==(t=this.value)&&void 0!==t?t:"";this.termchange.emit(""===e||e.length<this.searchminchars?"":e)}),this.searchdelay||300))}_selectOption(t){if(!t)return this.clearSelectedOptions(),void this.setValue("");const e=this.dropdownSelectableItems.find((e=>e.optionid===t));e&&!e.selected&&(this.clearSelectedOptions(),this.selectedOptionElement=e,this.selectedOptionElement.selected=!0,this.setValue(this.selectedOptionElement.value),this.optionselect.emit(this.selectedOptionElement.optionid),this.zoomState&&setTimeout((()=>this.exitZoom()),this.blurTimeoutMs))}clearSelectedOptions(){this.dropdownSelectableItems.forEach((t=>{t.selected&&(t.selected=!1)})),this.selectedOptionElement=null}getSlotElements(){const t=[],e=[];let i=!1;this.dropdownElement&&this.dropdownElement.querySelector("slot").assignedElements().forEach((r=>{t.push(r),"cura-dropdown-search-option"===r.localName&&r.selectable&&e.push(r),"cura-dropdown-search-not-found"===r.localName&&(i=!0)})),this.dropdownSelectableItems=e,this.dropdownItems=t,this.status=i?"error":"default"}enterZoom(){this.scrollBehavior.disableScroll(),this.setZoomHeight(),this.zoomState=!0}exitZoom(){this.scrollBehavior.enableScroll(),this.setZoomHeight(),setTimeout((()=>{this.zoomState=!1}),300)}setZoomHeight(){if(null===window||void 0===window?void 0:window.visualViewport){const t=`${window.visualViewport.height}px`,e=`${window.visualViewport.offsetTop}px`;return void(this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":e}))}const t=window?`${window.innerHeight}px`:"100vh";this.styles=Object.assign(Object.assign({},this.styles),{"--height":t,"--top-offset":"0px"})}getClasses(){return{"component-container":!0,mobile:this.isMobile,zoom:this.zoomState,"dropdown-visible":this.isOnFocus&&this.dropdownItems.length>0&&!this.zoomState,error:"error"===this.status}}getHostCSSProperties(){return{"--max-height":this.maxheight||"400px"}}render(){return e(i,{key:"4eebe0e03eb20a9c056158e9bb7dafad6c5d7e36",style:this.getHostCSSProperties(),role:"search","aria-label":this.label,"aria-required":this.required,"aria-disabled":this.disabled,"aria-expanded":this.zoomState},e("div",{key:"c74a9785e747c23f853beabce244d9d79be963f6",class:this.getClasses(),style:this.styles},e("div",{key:"8e0e1b8ad5929f7a65d970da37af8da526ea1ec6",class:"component-controls"},this.isMobile&&this.zoomState?e("cura-button-transparent",{fontColor:"dark",onClick:()=>this.handleBackClick(),iconName:"arrowLeft",size:"large",iconOnly:!0,color:"primary",id:"button-back"}):"",e("cura-input-text",{key:"d6b1e0284f7f8bbd0293ca8c7e11de7e4d390729",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:this.zoomState?"transparent":"default",required:this.required,iconName:this.icon||"search",value:this.value,status:this.status,onValueChange:t=>this.handleInputValueChange(t),onInput:t=>this._preventEvent(t),onFocus:()=>this.handleFocus(),onClick:t=>this._preventEvent(t),onBlur:()=>this.handleBlur(),onFocusout:()=>this.handleFocusout(),onInputClear:t=>this.handleInputClear(t),placeholder:this.placeholder,size:this.size,onKeyDown:t=>this.handleKeyDown(t)},e("slot",{key:"3626dc325181c193081af56996804453c9dee9f5",name:"helperText"}))),e("div",{key:"c0b979983b567e35a15e756d24cecf0a0102e2bc",class:"dropdown-container",onMouseOver:()=>this.handleDropdownMouseOver()},e("slot",{key:"56fc0ae14345c88eaf214a12f6ebf545fc040aea",onSlotchange:()=>this.handleSlotChange()}))))}get host(){return r(this)}};Si.style=":host{display:block;box-sizing:border-box;position:relative}:host .component-controls{display:flex;align-items:center;justify-content:center;gap:calc(var(--cura-spacing-base) * 1px)}:host .component-controls #button-back{padding:0 0 0 calc(var(--cura-spacing-base) * 3px);width:max-content}:host .component-container{box-sizing:border-box;width:100%;position:relative;display:grid;grid-template-columns:1fr;grid-template-rows:min-content 1fr}:host .component-container.zoom{position:fixed;top:var(--top-offset, 0);left:0;width:100vw;background:var(--purewhite);height:var(--height);z-index:9999;overscroll-behavior:contain}:host .component-container.zoom .component-controls{border-bottom:2px solid var(--primary);padding:calc(var(--cura-spacing-base) * 3px) 0}:host .component-container.zoom.error .component-controls{border-bottom:2px solid var(--error-dark);background-color:var(--error-lighter)}:host .component-container .dropdown-container{box-sizing:border-box;width:100%;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;padding:calc(var(--cura-spacing-base) * 3px);overscroll-behavior:contain}:host .component-container:not(.zoom) .dropdown-container{box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));position:absolute;bottom:0;left:0;transform:translateY(100%);max-height:var(--max-height);background-color:var(--purewhite);border-radius:0px 0px calc(var(--cura-spacing-base) * 1px) calc(var(--cura-spacing-base) * 1px);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);border-right:2px solid var(--neutral-light);display:none;z-index:9997}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-field){border-radius:4px 4px 0px 0px}:host .component-container:not(.zoom).dropdown-visible ::part(cura-input-text-helper){height:0px;overflow:hidden;margin-top:0px}:host .component-container:not(.zoom).dropdown-visible .dropdown-container{display:block}";const Ti=class{constructor(e){t(this,e),this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.styles={"--neutral-light":this.theme.colors.getColor("neutral-light")}}render(){return e(i,{key:"d80c4ebc3e7edee04eb7e3b405cc11ea1cb65111"},e("div",{key:"af087ac20e0e2075acb87b64573734e16bdd7b62",class:"component-container",style:this.styles},e("cura-heading",{key:"f48f5ca2cd5fdb7b2862ae20e51b3963461db945",size:"xsmall",weight:"bold",color:"neutral-dark",marginBlock:"0",lineHeight:"1em"},e("slot",{key:"13030d0abe5ac052fa3c3a7e04694ecfd7a3ab23"}))))}};Ti.style=":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);padding:calc(var(--cura-spacing-base) * 3px) 0}:host(:last-child) .component-container{border-bottom:none !important}";const ji=class{constructor(e){t(this,e),this.actionclick=n(this,"actionclick"),this.selectoption=n(this,"selectoption"),this.selectable=!0,this.selected=!1,this.highlighted=!1,this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.styles={"--neutral-light":this.theme.colors.getColor("neutral-light"),"--neutral-white":this.theme.colors.getColor("neutral-white"),"--neutral-dark":this.theme.colors.getColor("neutral-dark"),"--neutral-black":this.theme.colors.getColor("neutral-black"),"--primary-lighter-50":this.theme.colors.getColor("primary-lighter",.5),"--primary-light":this.theme.colors.getColor("primary-light"),"--primary":this.theme.colors.getColor("primary-base")}}handleSelect(){this.selectable?this.selectoption.emit(this.optionid):this.actionclick.emit()}handleActionsClick(){this.actionclick.emit()}getClasses(){return{"component-container":!0,selected:this.selected,highlighted:this.highlighted,"not-selectable":!this.selectable}}render(){return e(i,{key:"e01c513f3c2cf8ad1b4b118f2b59d5228a052112"},e("div",{key:"b59ae795fc8905929ed91fc2e18e465b0d1632f0",class:this.getClasses(),style:this.styles},e("div",{key:"f3d163ac57e5c6cbc15f4b7d822273afa1279816",class:"selectable-container",onClick:()=>this.handleSelect()},e("slot",{key:"ed9427e3251354825ee9652f653f9597ccf79383",name:"image"}),e("div",{key:"a78dcf1bfd71e42542b9f7bdb7fb43e3acc628ba",class:"content"},e("slot",{key:"7ad2f91f434cf69b5f45674e887d29fe4188cd9e"}))),e("div",{key:"7f9cac5875885a80505b7455de49c090aca7848c",class:"actions-container",onClick:()=>this.handleActionsClick()},e("slot",{key:"12496150bea58f08dc7c5a868d866f67903e545c",name:"actions"}))))}};ji.style=":host{display:block;box-sizing:border-box}:host .component-container{box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;min-height:calc(var(--cura-spacing-base) * 10px);padding:0 calc(var(--cura-spacing-base) * 1px);border-bottom:1px solid var(--neutral-light);transition:background-color 0.15s linear}:host .component-container:not(.selected):not(.not-selectable):has(.selectable-container:hover),:host .component-container:not(.selected):not(.not-selectable).highlighted{background-color:var(--neutral-white)}:host .selectable-container{flex:1;display:flex;align-items:center;justify-content:flex-start;padding:calc(var(--cura-spacing-base) * 3px) 0;min-height:calc(var(--cura-spacing-base) * 10px);min-width:0;gap:calc(var(--cura-spacing-base) * 1px);cursor:pointer}:host .selectable-container .content{flex:1;align-items:center;justify-content:flex-end;padding-right:calc(var(--cura-spacing-base) * 1px);min-width:0}:host .selectable-container ::slotted(cura-icon){--color:var(--neutral-dark) !important;margin:0 10px}:host .selectable-container ::slotted(cura-avatar){margin:0 calc(var(--cura-spacing-base) * 1px)}:host .selectable-container ::slotted(cura-heading),:host .selectable-container ::slotted(cura-paragraph){--margin-block:0 !important;--color-spot:var(--primary) !important}:host .selectable-container ::slotted(cura-heading){--color-body:var(--neutral-black) !important}:host .selectable-container ::slotted(cura-paragraph){--color-body:var(--neutral-dark) !important}:host .selected{background-color:var(--primary-lighter-50);border-bottom-color:var(--primary-light)}:host .selected .selectable-container{cursor:default}:host .selected .selectable-container ::slotted(cura-icon){--color:var(--primary) !important}:host .selected .selectable-container ::slotted(cura-heading){--color-body:var(--primary) !important}:host .actions-container{display:flex}:host .actions-container ::slotted(*){padding-left:calc(var(--cura-spacing-base) * 1px)}:host .not-selectable .selectable-container{cursor:default}:host(:last-child) .component-container{border-bottom:none !important}";const _i=class{constructor(e){t(this,e),this.level=1,this.size="medium",this.weight="regular",this.spotColor="accent-dark",this.marginBlock="1.25em",this.lineHeight="130%",this.textOverflow="none",this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.setFontProperties()}getClasses(){const t={"textoverflow-single":"single"===this.textOverflow};return t[this.size.toLowerCase()]=!0,t[`${this.weight.toLowerCase()}-weight`]=!0,t}setFontProperties(){this.weights=this.theme.fonts.getWeights(),this.fontSizeBase=this.theme.fonts.getSize(),this.styles={"--font-family":window.CuraAPI.theme.fonts.getFamily("heading"),"--font-weight-regular":this.weights.regular,"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold,"--font-weight-black":this.weights.black}}hostCSSProperties(){const t=this.color?this.theme.colors.getColor(this.color):this.theme.fonts.getColor();return{"--margin-block":this.marginBlock,"--font-size-base":this.fontSizeBase,"--line-height":this.lineHeight,"--color-body":t||this.theme.colors.getColor("neutral-darker"),"--color-spot":this.theme.colors.getColor(`${this.spotColor}`)}}getHeadingTag(){const t={1:e("h1",{style:this.styles,class:this.getClasses()},e("slot",null)),2:e("h2",{style:this.styles,class:this.getClasses()},e("slot",null)),3:e("h3",{style:this.styles,class:this.getClasses()},e("slot",null)),4:e("h4",{style:this.styles,class:this.getClasses()},e("slot",null)),5:e("h5",{style:this.styles,class:this.getClasses()},e("slot",null)),6:e("h6",{style:this.styles,class:this.getClasses()},e("slot",null)),default:e("h1",{style:this.styles,class:this.getClasses()},e("slot",null))};return t[`${this.level}`]||t.default}render(){return e(i,{key:"611cbd1aff08cda4926fc82ba821c86c5df3e954",style:this.hostCSSProperties(),role:"heading","aria-level":this.level},this.getHeadingTag())}get host(){return r(this)}};_i.style=":host{display:block;font-size:var(--font-size-base)}:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-family:var(--font-family);font-size:1.714em;font-weight:var(--font-weight-regular);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0px}:host h1.bold-weight,:host h2.bold-weight,:host h3.bold-weight,:host h4.bold-weight,:host h5.bold-weight,:host h6.bold-weight{font-weight:var(--font-weight-medium)}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.071em;letter-spacing:-0.58px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.214em;line-height:calc(var(--line-height) + 20%)}:host h1.small.bold-weight,:host h1.small ::slotted(b),:host h1.small ::slotted(strong),:host h2.small.bold-weight,:host h2.small ::slotted(b),:host h2.small ::slotted(strong),:host h3.small.bold-weight,:host h3.small ::slotted(b),:host h3.small ::slotted(strong),:host h4.small.bold-weight,:host h4.small ::slotted(b),:host h4.small ::slotted(strong),:host h5.small.bold-weight,:host h5.small ::slotted(b),:host h5.small ::slotted(strong),:host h6.small.bold-weight,:host h6.small ::slotted(b),:host h6.small ::slotted(strong){font-weight:var(--font-weight-bold)}:host h1.xsmall,:host h2.xsmall,:host h3.xsmall,:host h4.xsmall,:host h5.xsmall,:host h6.xsmall{font-size:0.8571428571em;font-weight:var(--font-weight-medium);letter-spacing:0.6px}:host h1.xsmall.bold-weight,:host h1.xsmall ::slotted(b),:host h1.xsmall ::slotted(strong),:host h2.xsmall.bold-weight,:host h2.xsmall ::slotted(b),:host h2.xsmall ::slotted(strong),:host h3.xsmall.bold-weight,:host h3.xsmall ::slotted(b),:host h3.xsmall ::slotted(strong),:host h4.xsmall.bold-weight,:host h4.xsmall ::slotted(b),:host h4.xsmall ::slotted(strong),:host h5.xsmall.bold-weight,:host h5.xsmall ::slotted(b),:host h5.xsmall ::slotted(strong),:host h6.xsmall.bold-weight,:host h6.xsmall ::slotted(b),:host h6.xsmall ::slotted(strong){font-weight:var(--font-weight-bold)}:host h1.textoverflow-single,:host h2.textoverflow-single,:host h3.textoverflow-single,:host h4.textoverflow-single,:host h5.textoverflow-single,:host h6.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}:host h1 ::slotted(b),:host h1 ::slotted(strong),:host h2 ::slotted(b),:host h2 ::slotted(strong),:host h3 ::slotted(b),:host h3 ::slotted(strong),:host h4 ::slotted(b),:host h4 ::slotted(strong),:host h5 ::slotted(b),:host h5 ::slotted(strong),:host h6 ::slotted(b),:host h6 ::slotted(strong){font-weight:var(--font-weight-medium)}:host h1 ::slotted(a),:host h2 ::slotted(a),:host h3 ::slotted(a),:host h4 ::slotted(a),:host h5 ::slotted(a),:host h6 ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-spot);text-underline-offset:10%;cursor:pointer}:host h1 ::slotted(u),:host h2 ::slotted(u),:host h3 ::slotted(u),:host h4 ::slotted(u),:host h5 ::slotted(u),:host h6 ::slotted(u){text-underline-offset:10%}:host h1 ::slotted(abbr),:host h2 ::slotted(abbr),:host h3 ::slotted(abbr),:host h4 ::slotted(abbr),:host h5 ::slotted(abbr),:host h6 ::slotted(abbr){color:var(--color-spot);text-decoration:underline dashed 1px var(--color-spot);text-underline-offset:10%;cursor:default}:host h1 ::slotted(i),:host h2 ::slotted(i),:host h3 ::slotted(i),:host h4 ::slotted(i),:host h5 ::slotted(i),:host h6 ::slotted(i){font-weight:var(--font-weight-medium)}:host h1 ::slotted(em),:host h2 ::slotted(em),:host h3 ::slotted(em),:host h4 ::slotted(em),:host h5 ::slotted(em),:host h6 ::slotted(em){color:var(--color-spot);font-weight:var(--font-weight-bold);font-style:normal}@media (min-width: 769px) and (max-width: 1920px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2em}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.357em;letter-spacing:-0.66px}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.357em}:host h1.xsmall,:host h2.xsmall,:host h3.xsmall,:host h4.xsmall,:host h5.xsmall,:host h6.xsmall{font-size:0.8571428571em;line-height:calc(var(--line-height) + 3%);letter-spacing:0.72px}}@media (min-width: 1921px){:host h1,:host h2,:host h3,:host h4,:host h5,:host h6{font-size:2.5em;line-height:calc(var(--line-height) + 5%);letter-spacing:-0.82px}:host h1.large,:host h2.large,:host h3.large,:host h4.large,:host h5.large,:host h6.large{font-size:2.929em}:host h1.small,:host h2.small,:host h3.small,:host h4.small,:host h5.small,:host h6.small{font-size:1.714em;line-height:calc(var(--line-height) + 30%);letter-spacing:0%}:host h1.xsmall,:host h2.xsmall,:host h3.xsmall,:host h4.xsmall,:host h5.xsmall,:host h6.xsmall{font-size:1em;line-height:calc(var(--line-height) + 12.857%);letter-spacing:0.28px}}";const Li=class{constructor(e){t(this,e),this.name="",this.color="neutral-base",this.iconset="default",this.disabled=!1}sizeHandler(t){var e;this.setHostProperty("--size",g[`${t}`]?`${g[t].size}px`:`${g.default.size}px`),this.setHostProperty("--stroke",g[e=g[`${t}`]?t:"default"].stroke*(g.default.size/g[e].size)+"px")}colorHandler(){this.setHostProperty("--color",window.CuraAPI.theme.colors.getColor(this.disabled?"neutral-light":this.color||"neutral"))}connectedCallback(){this.assetsPath=window.CuraAPI.localAssetsPath,this.sizeHandler(this.size),this.colorHandler()}setHostProperty(t,e){this.host.style.setProperty(t,e)}render(){return e(i,{key:"b383f07f146a8f4760317a8bfc42a16c06f8d323",role:"img"},e("svg",{key:"d1d3e98cd7afbf729989463a123030b95ea84221",version:"1.1",viewBox:"0 0 24 24",preserveAspectRatio:"xMidYMid meet",xmlns:"http://www.w3.org/2000/svg"},e("use",{key:"bb6c8175923161b9d603a969bc1a7ca651e19256",xlinkHref:`${this.assetsPath}/icons/iconset-${this.iconset}.svg#${this.name}`})))}get host(){return r(this)}static get watchers(){return{size:[{sizeHandler:0}],color:[{colorHandler:0}],disabled:[{colorHandler:0}]}}};function Oi(t){return"string"==typeof t||t instanceof String}function Pi(t){var e;return"object"==typeof t&&null!=t&&"Object"===(null==t||null==(e=t.constructor)?void 0:e.name)}function Ii(t,e){return Array.isArray(e)?Ii(t,((t,i)=>e.includes(i))):Object.entries(t).reduce(((t,i)=>{let[r,n]=i;return e(n,r)&&(t[r]=n),t}),{})}Li.style=":host{width:var(--size);height:var(--size);display:inline-block}:host svg{display:inline-block;stroke:var(--color);width:var(--size);height:var(--size);stroke-width:var(--stroke);fill:none}";const Ri="NONE",Ni="LEFT",qi="FORCE_LEFT",$i="RIGHT",Vi="FORCE_RIGHT";function Wi(t){return t.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function Hi(t,e){if(e===t)return!0;const i=Array.isArray(e),r=Array.isArray(t);let n;if(i&&r){if(e.length!=t.length)return!1;for(n=0;n<e.length;n++)if(!Hi(e[n],t[n]))return!1;return!0}if(i!=r)return!1;if(e&&t&&"object"==typeof e&&"object"==typeof t){const i=e instanceof Date,r=t instanceof Date;if(i&&r)return e.getTime()==t.getTime();if(i!=r)return!1;const a=e instanceof RegExp,o=t instanceof RegExp;if(a&&o)return e.toString()==t.toString();if(a!=o)return!1;const s=Object.keys(e);for(n=0;n<s.length;n++)if(!Object.prototype.hasOwnProperty.call(t,s[n]))return!1;for(n=0;n<s.length;n++)if(!Hi(t[s[n]],e[s[n]]))return!1;return!0}return!(!e||!t||"function"!=typeof e||"function"!=typeof t)&&e.toString()===t.toString()}class Yi{constructor(t){for(Object.assign(this,t);this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos);)--this.oldSelection.start;if(this.insertedCount)for(;this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end);)this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end?++this.oldSelection.end:++this.cursorPos}get startChangePos(){return Math.min(this.cursorPos,this.oldSelection.start)}get insertedCount(){return this.cursorPos-this.startChangePos}get inserted(){return this.value.substr(this.startChangePos,this.insertedCount)}get removedCount(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)}get removed(){return this.oldValue.substr(this.startChangePos,this.removedCount)}get head(){return this.value.substring(0,this.startChangePos)}get tail(){return this.value.substring(this.startChangePos+this.insertedCount)}get removeDirection(){return!this.removedCount||this.insertedCount?Ri:this.oldSelection.end!==this.cursorPos&&this.oldSelection.start!==this.cursorPos||this.oldSelection.end!==this.oldSelection.start?Ni:$i}}function Qi(t,e){return new Qi.InputMask(t,e)}function Xi(t){if(null==t)throw new Error("mask property should be defined");return t instanceof RegExp?Qi.MaskedRegExp:Oi(t)?Qi.MaskedPattern:t===Date?Qi.MaskedDate:t===Number?Qi.MaskedNumber:Array.isArray(t)||t===Array?Qi.MaskedDynamic:Qi.Masked&&t.prototype instanceof Qi.Masked?t:Qi.Masked&&t instanceof Qi.Masked?t.constructor:t instanceof Function?Qi.MaskedFunction:(console.warn("Mask not found for mask",t),Qi.Masked)}function Gi(t){if(!t)throw new Error("Options in not defined");if(Qi.Masked){if(t.prototype instanceof Qi.Masked)return{mask:t};const{mask:e,...i}=t instanceof Qi.Masked?{mask:t}:Pi(t)&&t.mask instanceof Qi.Masked?t:{};if(e){const t=e.mask;return{...Ii(e,((t,e)=>!e.startsWith("_"))),mask:e.constructor,_mask:t,...i}}}return Pi(t)?{...t}:{mask:t}}function Ui(t){if(Qi.Masked&&t instanceof Qi.Masked)return t;const e=Gi(t),i=Xi(e.mask);if(!i)throw new Error("Masked class is not found for provided mask "+e.mask+", appropriate module needs to be imported manually before creating mask.");return e.mask===i&&delete e.mask,e._mask&&(e.mask=e._mask,delete e._mask),new i(e)}Qi.createMask=Ui;class Zi{get selectionStart(){let t;try{t=this._unsafeSelectionStart}catch{}return null!=t?t:this.value.length}get selectionEnd(){let t;try{t=this._unsafeSelectionEnd}catch{}return null!=t?t:this.value.length}select(t,e){if(null!=t&&null!=e&&(t!==this.selectionStart||e!==this.selectionEnd))try{this._unsafeSelect(t,e)}catch{}}get isActive(){return!1}}Qi.MaskElement=Zi;class Ki extends Zi{constructor(t){super(),this.input=t,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var t,e,i;return null!=(t=null==(e=(i=this.input).getRootNode)?void 0:e.call(i))?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(t){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",t.drop),this.input.addEventListener("click",t.click),this.input.addEventListener("focus",t.focus),this.input.addEventListener("blur",t.commit),this._handlers=t}_onKeydown(t){return this._handlers.redo&&(90===t.keyCode&&t.shiftKey&&(t.metaKey||t.ctrlKey)||89===t.keyCode&&t.ctrlKey)?(t.preventDefault(),this._handlers.redo(t)):this._handlers.undo&&90===t.keyCode&&(t.metaKey||t.ctrlKey)?(t.preventDefault(),this._handlers.undo(t)):void(t.isComposing||this._handlers.selectionChange(t))}_onBeforeinput(t){return"historyUndo"===t.inputType&&this._handlers.undo?(t.preventDefault(),this._handlers.undo(t)):"historyRedo"===t.inputType&&this._handlers.redo?(t.preventDefault(),this._handlers.redo(t)):void 0}_onCompositionEnd(t){this._handlers.input(t)}_onInput(t){t.isComposing||this._handlers.input(t)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}Qi.HTMLMaskElement=Ki;class Ji extends Ki{constructor(t){super(t),this.input=t}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(t,e){this.input.setSelectionRange(t,e)}get value(){return this.input.value}set value(t){this.input.value=t}}Qi.HTMLMaskElement=Ki;class tr extends Ki{get _unsafeSelectionStart(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),i=e&&e.anchorOffset,r=e&&e.focusOffset;return null==r||null==i||i<r?i:r}get _unsafeSelectionEnd(){const t=this.rootElement,e=t.getSelection&&t.getSelection(),i=e&&e.anchorOffset,r=e&&e.focusOffset;return null==r||null==i||i>r?i:r}_unsafeSelect(t,e){if(!this.rootElement.createRange)return;const i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,t),i.setEnd(this.input.lastChild||this.input,e);const r=this.rootElement,n=r.getSelection&&r.getSelection();n&&(n.removeAllRanges(),n.addRange(i))}get value(){return this.input.textContent||""}set value(t){this.input.textContent=t}}Qi.HTMLContenteditableMaskElement=tr;class er{constructor(){this.states=[],this.currentIndex=0}get currentState(){return this.states[this.currentIndex]}get isEmpty(){return 0===this.states.length}push(t){this.currentIndex<this.states.length-1&&(this.states.length=this.currentIndex+1),this.states.push(t),this.states.length>er.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(t){return this.currentIndex=Math.min(Math.max(this.currentIndex+t,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}er.MAX_LENGTH=100,Qi.InputMask=class{constructor(t,e){this.el=t instanceof Zi?t:t.isContentEditable&&"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName?new tr(t):new Ji(t),this.masked=Ui(e),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new er,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this.updateValue(),this._onChange()}maskEquals(t){var e;return null==t||(null==(e=this.masked)?void 0:e.maskEquals(t))}get mask(){return this.masked.mask}set mask(t){if(this.maskEquals(t))return;if(!(t instanceof Qi.Masked)&&this.masked.constructor===Xi(t))return void this.masked.updateOptions({mask:t});const e=t instanceof Qi.Masked?t:Ui({mask:t});e.unmaskedValue=this.masked.unmaskedValue,this.masked=e}get value(){return this._value}set value(t){this.value!==t&&(this.masked.value=t,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(t){this.unmaskedValue!==t&&(this.masked.unmaskedValue=t,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(t){this.rawInputValue!==t&&(this.masked.rawInputValue=t,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(t){this.masked.typedValueEquals(t)||(this.masked.typedValue=t,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(t,e){const i=this._listeners[t];i&&i.forEach((t=>t(e)))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(t){this.el&&this.el.isActive&&(this.el.select(t,t),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(t){const e=this.masked.unmaskedValue,i=this.masked.value,r=this.masked.rawInputValue,n=this.displayValue,a=this.unmaskedValue!==e||this.value!==i||this._rawInputValue!==r;this._unmaskedValue=e,this._value=i,this._rawInputValue=r,this.el.value!==n&&(this.el.value=n),"auto"===t?this.alignCursor():null!=t&&(this.cursorPos=t),a&&this._fireChangeEvents(),this._historyChanging||!a&&!this.history.isEmpty||this.history.push({unmaskedValue:e,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(t){const{mask:e,...i}=t,r=!this.maskEquals(e),n=this.masked.optionsIsChanged(i);r&&(this.mask=e),n&&this.masked.updateOptions(i),(r||n)&&this.updateControl()}updateCursor(t){null!=t&&(this.cursorPos=t,this._delayUpdateCursor(t))}_delayUpdateCursor(t){this._abortUpdateCursor(),this._changingCursorPos=t,this._cursorChanging=setTimeout((()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())}),10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,Ni))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(t,e){return this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e),this}off(t,e){if(!this._listeners[t])return this;if(!e)return delete this._listeners[t],this;const i=this._listeners[t].indexOf(e);return i>=0&&this._listeners[t].splice(i,1),this}_onInput(t){this._inputEvent=t,this._abortUpdateCursor();const e=new Yi({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),i=this.masked.rawInputValue,r=this.masked.splice(e.startChangePos,e.removed.length,e.inserted,e.removeDirection,{input:!0,raw:!0}).offset,n=i===this.masked.rawInputValue?e.removeDirection:Ri;let a=this.masked.nearestInputPos(e.startChangePos+r,n);n!==Ri&&(a=this.masked.nearestInputPos(a,Ri)),this.updateControl(a),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(t){t.preventDefault(),t.stopPropagation()}_onFocus(t){this.alignCursorFriendly()}_onClick(t){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(t){t&&(this._historyChanging=!0,this.unmaskedValue=t.unmaskedValue,this.el.select(t.selection.start,t.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}};class ir{static normalize(t){return Array.isArray(t)?t:[t,new ir]}constructor(t){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},t)}aggregate(t){return this.inserted+=t.inserted,this.rawInserted+=t.rawInserted,this.tailShift+=t.tailShift,this.skip=this.skip||t.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(t){return this.inserted===t.inserted&&this.tailShift===t.tailShift&&this.rawInserted===t.rawInserted&&this.skip===t.skip}}Qi.ChangeDetails=ir;class rr{constructor(t,e,i){void 0===t&&(t=""),void 0===e&&(e=0),this.value=t,this.from=e,this.stop=i}toString(){return this.value}extend(t){this.value+=String(t)}appendTo(t){return t.append(this.toString(),{tail:!0}).aggregate(t._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(t){Object.assign(this,t)}unshift(t){if(!this.value.length||null!=t&&this.from>=t)return"";const e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";const t=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),t}}class nr{constructor(t){this._value="",this._update({...nr.DEFAULTS,...t}),this._initialized=!0}updateOptions(t){this.optionsIsChanged(t)&&this.withValueRefresh(this._update.bind(this,t))}_update(t){Object.assign(this,t)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value}reset(){this._value=""}get value(){return this._value}set value(t){this.resolve(t,{input:!0})}resolve(t,e){void 0===e&&(e={input:!0}),this.reset(),this.append(t,e,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(t){this.resolve(t,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(t){this.format?this.value=this.format(t,this):this.unmaskedValue=String(t)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(t){this.resolve(t,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(t,e){return t}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),Math.min(this.displayValue.length,e-t)}extractInput(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this.displayValue.slice(t,e)}extractTail(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),new rr(this.extractInput(t,e),t)}appendTail(t){return Oi(t)&&(t=new rr(String(t))),t.appendTo(this)}_appendCharRaw(t,e){return t?(this._value+=t,new ir({inserted:t,rawInserted:t})):new ir}_appendChar(t,e,i){void 0===e&&(e={});const r=this.state;let n;if([t,n]=this.doPrepareChar(t,e),t&&(n=n.aggregate(this._appendCharRaw(t,e)),!n.rawInserted&&"pad"===this.autofix)){const i=this.state;this.state=r;let a=this.pad(e);const o=this._appendCharRaw(t,e);a=a.aggregate(o),o.rawInserted||a.equals(n)?n=a:this.state=i}if(n.inserted){let t,a=!1!==this.doValidate(e);if(a&&null!=i){const e=this.state;if(!0===this.overwrite){t=i.state;for(let t=0;t<n.rawInserted.length;++t)i.unshift(this.displayValue.length-n.tailShift)}let r=this.appendTail(i);if(a=r.rawInserted.length===i.toString().length,!(a&&r.inserted||"shift"!==this.overwrite)){this.state=e,t=i.state;for(let t=0;t<n.rawInserted.length;++t)i.shift();r=this.appendTail(i),a=r.rawInserted.length===i.toString().length}a&&r.inserted&&(this.state=e)}a||(n=new ir,this.state=r,i&&t&&(i.state=t))}return n}_appendPlaceholder(){return new ir}_appendEager(){return new ir}append(t,e,i){if(!Oi(t))throw new Error("value should be string");const r=Oi(i)?new rr(String(i)):i;let n;null!=e&&e.tail&&(e._beforeTailState=this.state),[t,n]=this.doPrepare(t,e);for(let i=0;i<t.length;++i){const a=this._appendChar(t[i],e,r);if(!a.rawInserted&&!this.doSkipInvalid(t[i],e,r))break;n.aggregate(a)}return(!0===this.eager||"append"===this.eager)&&null!=e&&e.input&&t&&n.aggregate(this._appendEager()),null!=r&&(n.tailShift+=this.appendTail(r).tailShift),n}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),this._value=this.displayValue.slice(0,t)+this.displayValue.slice(e),new ir}withValueRefresh(t){if(this._refreshing||!this._initialized)return t();this._refreshing=!0;const e=this.rawInputValue,i=this.value,r=t();return this.rawInputValue=e,this.value&&this.value!==i&&0===i.indexOf(this.value)&&(this.append(i.slice(this.displayValue.length),{},""),this.doCommit()),delete this._refreshing,r}runIsolated(t){if(this._isolated||!this._initialized)return t(this);this._isolated=!0;const e=this.state,i=t(this);return this.state=e,delete this._isolated,i}doSkipInvalid(t,e,i){return Boolean(this.skipInvalid)}doPrepare(t,e){return void 0===e&&(e={}),ir.normalize(this.prepare?this.prepare(t,this,e):t)}doPrepareChar(t,e){return void 0===e&&(e={}),ir.normalize(this.prepareChar?this.prepareChar(t,this,e):t)}doValidate(t){return(!this.validate||this.validate(this.value,this,t))&&(!this.parent||this.parent.doValidate(t))}doCommit(){this.commit&&this.commit(this.value,this)}splice(t,e,i,r,n){void 0===i&&(i=""),void 0===r&&(r=Ri),void 0===n&&(n={input:!0});const a=t+e,o=this.extractTail(a),s=!0===this.eager||"remove"===this.eager;let u;s&&(r=function(t){switch(t){case Ni:return qi;case $i:return Vi;default:return t}}(r),u=this.extractInput(0,a,{raw:!0}));let h=t;const l=new ir;if(r!==Ri&&(h=this.nearestInputPos(t,e>1&&0!==t&&!s?Ri:r),l.tailShift=h-t),l.aggregate(this.remove(h)),s&&r!==Ri&&u===this.rawInputValue)if(r===qi){let t;for(;u===this.rawInputValue&&(t=this.displayValue.length);)l.aggregate(new ir({tailShift:-1})).aggregate(this.remove(t-1))}else r===Vi&&o.unshift();return l.aggregate(this.append(i,n,o))}maskEquals(t){return this.mask===t}optionsIsChanged(t){return!Hi(this,t)}typedValueEquals(t){const e=this.typedValue;return t===e||nr.EMPTY_VALUES.includes(t)&&nr.EMPTY_VALUES.includes(e)||!!this.format&&this.format(t,this)===this.format(this.typedValue,this)}pad(t){return new ir}}nr.DEFAULTS={skipInvalid:!0},nr.EMPTY_VALUES=[void 0,null,""],Qi.Masked=nr;class ar{constructor(t,e){void 0===t&&(t=[]),void 0===e&&(e=0),this.chunks=t,this.from=e}toString(){return this.chunks.map(String).join("")}extend(t){if(!String(t))return;t=Oi(t)?new rr(String(t)):t;const e=this.chunks[this.chunks.length-1],i=e&&(e.stop===t.stop||null==t.stop)&&t.from===e.from+e.toString().length;if(t instanceof rr)i?e.extend(t.toString()):this.chunks.push(t);else if(t instanceof ar){if(null==t.stop){let e;for(;t.chunks.length&&null==t.chunks[0].stop;)e=t.chunks.shift(),e.from+=t.from,this.extend(e)}t.toString()&&(t.stop=t.blockIndex,this.chunks.push(t))}}appendTo(t){if(!(t instanceof Qi.MaskedPattern))return new rr(this.toString()).appendTo(t);const e=new ir;for(let i=0;i<this.chunks.length;++i){const r=this.chunks[i],n=t._mapPosToBlock(t.displayValue.length),a=r.stop;let o;if(null!=a&&(!n||n.index<=a)&&((r instanceof ar||t._stops.indexOf(a)>=0)&&e.aggregate(t._appendPlaceholder(a)),o=r instanceof ar&&t._blocks[a]),o){const i=o.appendTail(r);e.aggregate(i);const n=r.toString().slice(i.rawInserted.length);n&&e.aggregate(t.append(n,{tail:!0}))}else e.aggregate(t.append(r.toString(),{tail:!0}))}return e}get state(){return{chunks:this.chunks.map((t=>t.state)),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(t){const{chunks:e,...i}=t;Object.assign(this,i),this.chunks=e.map((t=>{const e="chunks"in t?new ar:new rr;return e.state=t,e}))}unshift(t){if(!this.chunks.length||null!=t&&this.from>=t)return"";const e=null!=t?t-this.from:t;let i=0;for(;i<this.chunks.length;){const t=this.chunks[i],r=t.unshift(e);if(t.toString()){if(!r)break;++i}else this.chunks.splice(i,1);if(r)return r}return""}shift(){if(!this.chunks.length)return"";let t=this.chunks.length-1;for(;0<=t;){const e=this.chunks[t],i=e.shift();if(e.toString()){if(!i)break;--t}else this.chunks.splice(t,1);if(i)return i}return""}}class or{constructor(t,e){this.masked=t,this._log=[];const{offset:i,index:r}=t._mapPosToBlock(e)||(e<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0});this.offset=i,this.index=r,this.ok=!1}get block(){return this.masked._blocks[this.index]}get pos(){return this.masked._blockStartPos(this.index)+this.offset}get state(){return{index:this.index,offset:this.offset,ok:this.ok}}set state(t){Object.assign(this,t)}pushState(){this._log.push(this.state)}popState(){const t=this._log.pop();return t&&(this.state=t),t}bindBlock(){this.block||(this.index<0&&(this.index=0,this.offset=0),this.index>=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(t){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(e=this.block)?void 0:e.displayValue.length)||0){var e;if(t())return this.ok=!0}return this.ok=!1}_pushRight(t){for(this.pushState(),this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0)if(t())return this.ok=!0;return this.ok=!1}pushLeftBeforeFilled(){return this._pushLeft((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,qi),0!==this.offset||void 0}))}pushLeftBeforeInput(){return this._pushLeft((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Ni),!0}))}pushLeftBeforeRequired(){return this._pushLeft((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Ni),!0}))}pushRightBeforeFilled(){return this._pushRight((()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,Vi),this.offset!==this.block.value.length||void 0}))}pushRightBeforeInput(){return this._pushRight((()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,Ri),!0}))}pushRightBeforeRequired(){return this._pushRight((()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,Ri),!0}))}}class sr{constructor(t){Object.assign(this,t),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._value=this._value.slice(0,t)+this._value.slice(e),this._value||(this._isRawInput=!1),new ir}nearestInputPos(t,e){void 0===e&&(e=Ri);const i=this._value.length;switch(e){case Ni:case qi:return 0;default:return i}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),this._isRawInput?e-t:0}extractInput(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=this._value.length),void 0===i&&(i={}),i.raw&&this._isRawInput&&this._value.slice(t,e)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new ir;const i=this.char===t&&(this.isUnmasking||e.input||e.raw)&&(!e.raw||!(!0===this.eager||"append"===this.eager))&&!e.tail,r=new ir({inserted:this.char,rawInserted:i?this.char:""});return this._value=this.char,this._isRawInput=i&&(e.raw||e.input),r}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const t=new ir;return this.isFilled||(this._value=t.inserted=this.char),t}extractTail(){return new rr("")}appendTail(t){return Oi(t)&&(t=new rr(String(t))),t.appendTo(this)}append(t,e,i){const r=this._appendChar(t[0],e);return null!=i&&(r.tailShift+=this.appendTail(i).tailShift),r}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(t){this._value=t._value,this._isRawInput=Boolean(t._rawInputValue)}pad(t){return this._appendPlaceholder()}}class ur{constructor(t){const{parent:e,isOptional:i,placeholderChar:r,displayChar:n,lazy:a,eager:o,...s}=t;this.masked=Ui(s),Object.assign(this,{parent:e,isOptional:i,placeholderChar:r,displayChar:n,lazy:a,eager:o})}reset(){this.isFilled=!1,this.masked.reset()}remove(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),0===t&&e>=1?(this.isFilled=!1,this.masked.remove(t,e)):new ir}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(t,e){if(void 0===e&&(e={}),this.isFilled)return new ir;const i=this.masked.state;let r=this.masked._appendChar(t,this.currentMaskFlags(e));return r.inserted&&!1===this.doValidate(e)&&(r=new ir,this.masked.state=i),r.inserted||this.isOptional||this.lazy||e.input||(r.inserted=this.placeholderChar),r.skip=!r.inserted&&!this.isOptional,this.isFilled=Boolean(r.inserted),r}append(t,e,i){return this.masked.append(t,this.currentMaskFlags(e),i)}_appendPlaceholder(){return this.isFilled||this.isOptional?new ir:(this.isFilled=!0,new ir({inserted:this.placeholderChar}))}_appendEager(){return new ir}extractTail(t,e){return this.masked.extractTail(t,e)}appendTail(t){return this.masked.appendTail(t)}extractInput(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.masked.extractInput(t,e,i)}nearestInputPos(t,e){void 0===e&&(e=Ri);const i=this.value.length,r=Math.min(Math.max(t,0),i);switch(e){case Ni:case qi:return this.isComplete?r:0;case $i:case Vi:return this.isComplete?r:i;default:return r}}totalInputPositions(t,e){return void 0===t&&(t=0),void 0===e&&(e=this.value.length),this.value.slice(t,e).length}doValidate(t){return this.masked.doValidate(this.currentMaskFlags(t))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(t)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(t){this.masked.state=t.masked,this.isFilled=t.isFilled}currentMaskFlags(t){var e;return{...t,_beforeTailState:(null==t||null==(e=t._beforeTailState)?void 0:e.masked)||(null==t?void 0:t._beforeTailState)}}pad(t){return new ir}}ur.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./},Qi.MaskedRegExp=class extends nr{updateOptions(t){super.updateOptions(t)}_update(t){const e=t.mask;e&&(t.validate=t=>t.search(e)>=0),super._update(t)}};class hr extends nr{constructor(t){super({...hr.DEFAULTS,...t,definitions:Object.assign({},ur.DEFAULT_DEFINITIONS,null==t?void 0:t.definitions)})}updateOptions(t){super.updateOptions(t)}_update(t){t.definitions=Object.assign({},this.definitions,t.definitions),super._update(t),this._rebuildMask()}_rebuildMask(){const t=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const e=this.mask;if(!e||!t)return;let i=!1,r=!1;for(let n=0;n<e.length;++n){if(this.blocks){const t=e.slice(n),i=Object.keys(this.blocks).filter((e=>0===t.indexOf(e)));i.sort(((t,e)=>e.length-t.length));const r=i[0];if(r){const{expose:t,repeat:e,...i}=Gi(this.blocks[r]),a={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...i,repeat:e,parent:this},o=null!=e?new Qi.RepeatBlock(a):Ui(a);o&&(this._blocks.push(o),t&&(this.exposeBlock=o),this._maskedBlocks[r]||(this._maskedBlocks[r]=[]),this._maskedBlocks[r].push(this._blocks.length-1)),n+=r.length-1;continue}}let a=e[n],o=a in t;if(a===hr.STOP_CHAR){this._stops.push(this._blocks.length);continue}if("{"===a||"}"===a){i=!i;continue}if("["===a||"]"===a){r=!r;continue}if(a===hr.ESCAPE_CHAR){if(++n,a=e[n],!a)break;o=!1}const s=o?new ur({isOptional:r,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...Gi(t[a]),parent:this}):new sr({char:a,eager:this.eager,isUnmasking:i});this._blocks.push(s)}}get state(){return{...super.state,_blocks:this._blocks.map((t=>t.state))}}set state(t){if(!t)return void this.reset();const{_blocks:e,...i}=t;this._blocks.forEach(((t,i)=>t.state=e[i])),super.state=i}reset(){super.reset(),this._blocks.forEach((t=>t.reset()))}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((t=>t.isComplete))}get isFilled(){return this._blocks.every((t=>t.isFilled))}get isFixed(){return this._blocks.every((t=>t.isFixed))}get isOptional(){return this._blocks.every((t=>t.isOptional))}doCommit(){this._blocks.forEach((t=>t.doCommit())),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce(((t,e)=>t+e.unmaskedValue),"")}set unmaskedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t,this.appendTail(e),this.doCommit()}else super.unmaskedValue=t}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce(((t,e)=>t+e.value),"")}set value(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t,this.appendTail(e),this.doCommit()}else super.value=t}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(t){if(this.exposeBlock){const e=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t,this.appendTail(e),this.doCommit()}else super.typedValue=t}get displayValue(){return this._blocks.reduce(((t,e)=>t+e.displayValue),"")}appendTail(t){return super.appendTail(t).aggregate(this._appendPlaceholder())}_appendEager(){var t;const e=new ir;let i=null==(t=this._mapPosToBlock(this.displayValue.length))?void 0:t.index;if(null==i)return e;this._blocks[i].isFilled&&++i;for(let t=i;t<this._blocks.length;++t){const i=this._blocks[t]._appendEager();if(!i.inserted)break;e.aggregate(i)}return e}_appendCharRaw(t,e){void 0===e&&(e={});const i=this._mapPosToBlock(this.displayValue.length),r=new ir;if(!i)return r;for(let a,o=i.index;a=this._blocks[o];++o){var n;const i=a._appendChar(t,{...e,_beforeTailState:null==(n=e._beforeTailState)||null==(n=n._blocks)?void 0:n[o]});if(r.aggregate(i),i.consumed)break}return r}extractTail(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const i=new ar;return t===e||this._forEachBlocksInRange(t,e,((t,e,r,n)=>{const a=t.extractTail(r,n);a.stop=this._findStopBefore(e),a.from=this._blockStartPos(e),a instanceof ar&&(a.blockIndex=e),i.extend(a)})),i}extractInput(t,e,i){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),void 0===i&&(i={}),t===e)return"";let r="";return this._forEachBlocksInRange(t,e,((t,e,n,a)=>{r+=t.extractInput(n,a,i)})),r}_findStopBefore(t){let e;for(let i=0;i<this._stops.length;++i){const r=this._stops[i];if(!(r<=t))break;e=r}return e}_appendPlaceholder(t){const e=new ir;if(this.lazy&&null==t)return e;const i=this._mapPosToBlock(this.displayValue.length);return i?(this._blocks.slice(i.index,null!=t?t:this._blocks.length).forEach((i=>{var r;i.lazy&&null==t||e.aggregate(i._appendPlaceholder(null==(r=i._blocks)?void 0:r.length))})),e):e}_mapPosToBlock(t){let e="";for(let i=0;i<this._blocks.length;++i){const r=e.length;if(e+=this._blocks[i].displayValue,t<=e.length)return{index:i,offset:t-r}}}_blockStartPos(t){return this._blocks.slice(0,t).reduce(((t,e)=>t+e.displayValue.length),0)}_forEachBlocksInRange(t,e,i){void 0===e&&(e=this.displayValue.length);const r=this._mapPosToBlock(t);if(r){const t=this._mapPosToBlock(e),n=t&&r.index===t.index;if(i(this._blocks[r.index],r.index,r.offset,t&&n?t.offset:this._blocks[r.index].displayValue.length),t&&!n){for(let e=r.index+1;e<t.index;++e)i(this._blocks[e],e,0,this._blocks[e].displayValue.length);i(this._blocks[t.index],t.index,0,t.offset)}}}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const i=super.remove(t,e);return this._forEachBlocksInRange(t,e,((t,e,r,n)=>{i.aggregate(t.remove(r,n))})),i}nearestInputPos(t,e){if(void 0===e&&(e=Ri),!this._blocks.length)return 0;const i=new or(this,t);if(e===Ri)return i.pushRightBeforeInput()?i.pos:(i.popState(),i.pushLeftBeforeInput()?i.pos:this.displayValue.length);if(e===Ni||e===qi){if(e===Ni){if(i.pushRightBeforeFilled(),i.ok&&i.pos===t)return t;i.popState()}if(i.pushLeftBeforeInput(),i.pushLeftBeforeRequired(),i.pushLeftBeforeFilled(),e===Ni){if(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.ok&&i.pos<=t)return i.pos;if(i.popState(),i.ok&&i.pos<=t)return i.pos;i.popState()}return i.ok?i.pos:e===qi?0:(i.popState(),i.ok?i.pos:(i.popState(),i.ok?i.pos:0))}return e===$i||e===Vi?(i.pushRightBeforeInput(),i.pushRightBeforeRequired(),i.pushRightBeforeFilled()?i.pos:e===Vi?this.displayValue.length:(i.popState(),i.ok?i.pos:(i.popState(),i.ok?i.pos:this.nearestInputPos(t,Ni)))):t}totalInputPositions(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);let i=0;return this._forEachBlocksInRange(t,e,((t,e,r,n)=>{i+=t.totalInputPositions(r,n)})),i}maskedBlock(t){return this.maskedBlocks(t)[0]}maskedBlocks(t){const e=this._maskedBlocks[t];return e?e.map((t=>this._blocks[t])):[]}pad(t){const e=new ir;return this._forEachBlocksInRange(0,this.displayValue.length,(i=>e.aggregate(i.pad(t)))),e}}hr.DEFAULTS={...nr.DEFAULTS,lazy:!0,placeholderChar:"_"},hr.STOP_CHAR="`",hr.ESCAPE_CHAR="\\",hr.InputDefinition=ur,hr.FixedDefinition=sr,Qi.MaskedPattern=hr;class lr extends hr{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){const{to:e=this.to||0,from:i=this.from||0,maxLength:r=this.maxLength||0,autofix:n=this.autofix,...a}=t;this.to=e,this.from=i,this.maxLength=Math.max(String(e).length,r),this.autofix=n;const o=String(this.from).padStart(this.maxLength,"0"),s=String(this.to).padStart(this.maxLength,"0");let u=0;for(;u<s.length&&s[u]===o[u];)++u;a.mask=s.slice(0,u).replace(/0/g,"\\0")+"0".repeat(this.maxLength-u),super._update(a)}get isComplete(){return super.isComplete&&Boolean(this.value)}boundaries(t){let e="",i="";const[,r,n]=t.match(/^(\D*)(\d*)(\D*)/)||[];return n&&(e="0".repeat(r.length)+n,i="9".repeat(r.length)+n),e=e.padEnd(this.maxLength,"0"),i=i.padEnd(this.maxLength,"9"),[e,i]}doPrepareChar(t,e){let i;return void 0===e&&(e={}),[t,i]=super.doPrepareChar(t.replace(/\D/g,""),e),t||(i.skip=!this.isComplete),[t,i]}_appendCharRaw(t,e){if(void 0===e&&(e={}),!this.autofix||this.value.length+1>this.maxLength)return super._appendCharRaw(t,e);const i=String(this.from).padStart(this.maxLength,"0"),r=String(this.to).padStart(this.maxLength,"0"),[n,a]=this.boundaries(this.value+t);return Number(a)<this.from?super._appendCharRaw(i[this.value.length],e):Number(n)>this.to?!e.tail&&"pad"===this.autofix&&this.value.length+1<this.maxLength?super._appendCharRaw(i[this.value.length],e).aggregate(this._appendCharRaw(t,e)):super._appendCharRaw(r[this.value.length],e):super._appendCharRaw(t,e)}doValidate(t){const e=this.value;if(-1===e.search(/[^0]/)&&e.length<=this._matchFrom)return!0;const[i,r]=this.boundaries(e);return this.from<=Number(r)&&Number(i)<=this.to&&super.doValidate(t)}pad(t){const e=new ir;if(this.value.length===this.maxLength)return e;const i=this.value,r=this.maxLength-this.value.length;if(r){this.reset();for(let i=0;i<r;++i)e.aggregate(super._appendCharRaw("0",t));i.split("").forEach((t=>this._appendCharRaw(t)))}return e}}Qi.MaskedRange=lr;class cr extends hr{static extractPatternOptions(t){const{mask:e,pattern:i,...r}=t;return{...r,mask:Oi(e)?e:i}}constructor(t){super(cr.extractPatternOptions({...cr.DEFAULTS,...t}))}updateOptions(t){super.updateOptions(t)}_update(t){const{mask:e,pattern:i,blocks:r,...n}={...cr.DEFAULTS,...t},a=Object.assign({},cr.GET_DEFAULT_BLOCKS());t.min&&(a.Y.from=t.min.getFullYear()),t.max&&(a.Y.to=t.max.getFullYear()),t.min&&t.max&&a.Y.from===a.Y.to&&(a.m.from=t.min.getMonth()+1,a.m.to=t.max.getMonth()+1,a.m.from===a.m.to&&(a.d.from=t.min.getDate(),a.d.to=t.max.getDate())),Object.assign(a,this.blocks,r),super._update({...n,mask:Oi(e)?e:i,blocks:a})}doValidate(t){const e=this.date;return super.doValidate(t)&&(!this.isComplete||this.isDateExist(this.value)&&null!=e&&(null==this.min||this.min<=e)&&(null==this.max||e<=this.max))}isDateExist(t){return this.format(this.parse(t,this),this).indexOf(t)>=0}get date(){return this.typedValue}set date(t){this.typedValue=t}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(t){super.typedValue=t}maskEquals(t){return t===Date||super.maskEquals(t)}optionsIsChanged(t){return super.optionsIsChanged(cr.extractPatternOptions(t))}}cr.GET_DEFAULT_BLOCKS=()=>({d:{mask:lr,from:1,to:31,maxLength:2},m:{mask:lr,from:1,to:12,maxLength:2},Y:{mask:lr,from:1900,to:9999}}),cr.DEFAULTS={...hr.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:t=>t?[String(t.getDate()).padStart(2,"0"),String(t.getMonth()+1).padStart(2,"0"),t.getFullYear()].join("."):"",parse:t=>{const[e,i,r]=t.split(".").map(Number);return new Date(r,i-1,e)}},Qi.MaskedDate=cr;class dr extends nr{constructor(t){super({...dr.DEFAULTS,...t}),this.currentMask=void 0}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),"mask"in t&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(t.mask)?t.mask.map((t=>{const{expose:e,...i}=Gi(t),r=Ui({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...i});return e&&(this.exposeMask=r),r})):[])}_appendCharRaw(t,e){void 0===e&&(e={});const i=this._applyDispatch(t,e);return this.currentMask&&i.aggregate(this.currentMask._appendChar(t,this.currentMaskFlags(e))),i}_applyDispatch(t,e,i){void 0===t&&(t=""),void 0===e&&(e={}),void 0===i&&(i="");const r=e.tail&&null!=e._beforeTailState?e._beforeTailState._value:this.value,n=this.rawInputValue,a=e.tail&&null!=e._beforeTailState?e._beforeTailState._rawInputValue:n,o=n.slice(a.length),s=this.currentMask,u=new ir,h=null==s?void 0:s.state;return this.currentMask=this.doDispatch(t,{...e},i),this.currentMask&&(this.currentMask!==s?(this.currentMask.reset(),a&&(this.currentMask.append(a,{raw:!0}),u.tailShift=this.currentMask.value.length-r.length),o&&(u.tailShift+=this.currentMask.append(o,{raw:!0,tail:!0}).tailShift)):h&&(this.currentMask.state=h)),u}_appendPlaceholder(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendPlaceholder()),t}_appendEager(){const t=this._applyDispatch();return this.currentMask&&t.aggregate(this.currentMask._appendEager()),t}appendTail(t){const e=new ir;return t&&e.aggregate(this._applyDispatch("",{},t)),e.aggregate(this.currentMask?this.currentMask.appendTail(t):super.appendTail(t))}currentMaskFlags(t){var e,i;return{...t,_beforeTailState:(null==(e=t._beforeTailState)?void 0:e.currentMaskRef)===this.currentMask&&(null==(i=t._beforeTailState)?void 0:i.currentMask)||t._beforeTailState}}doDispatch(t,e,i){return void 0===e&&(e={}),void 0===i&&(i=""),this.dispatch(t,this,e,i)}doValidate(t){return super.doValidate(t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))}doPrepare(t,e){void 0===e&&(e={});let[i,r]=super.doPrepare(t,e);if(this.currentMask){let t;[i,t]=super.doPrepare(i,this.currentMaskFlags(e)),r=r.aggregate(t)}return[i,r]}doPrepareChar(t,e){void 0===e&&(e={});let[i,r]=super.doPrepareChar(t,e);if(this.currentMask){let t;[i,t]=super.doPrepareChar(i,this.currentMaskFlags(e)),r=r.aggregate(t)}return[i,r]}reset(){var t;null==(t=this.currentMask)||t.reset(),this.compiledMasks.forEach((t=>t.reset()))}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(t){this.exposeMask?(this.exposeMask.value=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=t}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(t){this.exposeMask?(this.exposeMask.unmaskedValue=t,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=t}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(t){if(this.exposeMask)return this.exposeMask.typedValue=t,this.currentMask=this.exposeMask,void this._applyDispatch();let e=String(t);this.currentMask&&(this.currentMask.typedValue=t,e=this.currentMask.unmaskedValue),this.unmaskedValue=e}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isComplete)}get isFilled(){var t;return Boolean(null==(t=this.currentMask)?void 0:t.isFilled)}remove(t,e){const i=new ir;return this.currentMask&&i.aggregate(this.currentMask.remove(t,e)).aggregate(this._applyDispatch()),i}get state(){var t;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((t=>t.state)),currentMaskRef:this.currentMask,currentMask:null==(t=this.currentMask)?void 0:t.state}}set state(t){const{compiledMasks:e,currentMaskRef:i,currentMask:r,...n}=t;e&&this.compiledMasks.forEach(((t,i)=>t.state=e[i])),null!=i&&(this.currentMask=i,this.currentMask.state=r),super.state=n}extractInput(t,e,i){return this.currentMask?this.currentMask.extractInput(t,e,i):""}extractTail(t,e){return this.currentMask?this.currentMask.extractTail(t,e):super.extractTail(t,e)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(t,e){return this.currentMask?this.currentMask.nearestInputPos(t,e):super.nearestInputPos(t,e)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(t){this._overwrite=t}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(t){this._eager=t}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(t){this._skipInvalid=t}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(t){this._autofix=t}maskEquals(t){return Array.isArray(t)?this.compiledMasks.every(((e,i)=>{if(!t[i])return;const{mask:r,...n}=t[i];return Hi(e,n)&&e.maskEquals(r)})):super.maskEquals(t)}typedValueEquals(t){var e;return Boolean(null==(e=this.currentMask)?void 0:e.typedValueEquals(t))}}dr.DEFAULTS={...nr.DEFAULTS,dispatch:(t,e,i,r)=>{if(!e.compiledMasks.length)return;const n=e.rawInputValue,a=e.compiledMasks.map(((a,o)=>{const s=e.currentMask===a,u=s?a.displayValue.length:a.nearestInputPos(a.displayValue.length,qi);return a.rawInputValue!==n?(a.reset(),a.append(n,{raw:!0})):s||a.remove(u),a.append(t,e.currentMaskFlags(i)),a.appendTail(r),{index:o,weight:a.rawInputValue.length,totalInputPositions:a.totalInputPositions(0,Math.max(u,a.nearestInputPos(a.displayValue.length,qi)))}}));return a.sort(((t,e)=>e.weight-t.weight||e.totalInputPositions-t.totalInputPositions)),e.compiledMasks[a[0].index]}},Qi.MaskedDynamic=dr;class pr extends hr{constructor(t){super({...pr.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){const{enum:e,...i}=t;if(e){const t=e.map((t=>t.length)),r=Math.min(...t),n=Math.max(...t)-r;i.mask="*".repeat(r),n&&(i.mask+="["+"*".repeat(n)+"]"),this.enum=e}super._update(i)}_appendCharRaw(t,e){void 0===e&&(e={});const i=Math.min(this.nearestInputPos(0,Vi),this.value.length),r=this.enum.filter((e=>this.matchValue(e,this.unmaskedValue+t,i)));if(r.length){1===r.length&&this._forEachBlocksInRange(0,this.value.length,((t,i)=>{const n=r[0][i];i>=this.value.length||n===t.value||(t.reset(),t._appendChar(n,e))}));const t=super._appendCharRaw(r[0][this.value.length],e);return 1===r.length&&r[0].slice(this.unmaskedValue.length).split("").forEach((e=>t.aggregate(super._appendCharRaw(e)))),t}return new ir({skip:!this.isComplete})}extractTail(t,e){return void 0===t&&(t=0),new rr("",t)}remove(t,e){if(void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),t===e)return new ir;const i=Math.min(super.nearestInputPos(0,Vi),this.value.length);let r;for(r=t;r>=0&&!(this.enum.filter((t=>this.matchValue(t,this.value.slice(i,r),i))).length>1);--r);const n=super.remove(r,e);return n.tailShift+=r-t,n}get isComplete(){return this.enum.indexOf(this.value)>=0}}var fr;pr.DEFAULTS={...hr.DEFAULTS,matchValue:(t,e,i)=>t.indexOf(e,i)===i},Qi.MaskedEnum=pr,Qi.MaskedFunction=class extends nr{updateOptions(t){super.updateOptions(t)}_update(t){super._update({...t,validate:t.mask})}};class br extends nr{constructor(t){super({...br.DEFAULTS,...t})}updateOptions(t){super.updateOptions(t)}_update(t){super._update(t),this._updateRegExps()}_updateRegExps(){const t="^"+(this.allowNegative?"[+|\\-]?":""),e=(this.scale?"("+Wi(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(t+"\\d*"+e),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(Wi).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(Wi(this.thousandsSeparator),"g")}_removeThousandsSeparators(t){return t.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(t){const e=t.split(this.radix);return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),e.join(this.radix)}doPrepareChar(t,e){void 0===e&&(e={});const[i,r]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(e.input&&e.raw||!e.input&&!e.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),e);return t&&!i&&(r.skip=!0),!i||this.allowPositive||this.value||"-"===i||r.aggregate(this._appendChar("-")),[i,r]}_separatorsCount(t,e){void 0===e&&(e=!1);let i=0;for(let r=0;r<t;++r)this._value.indexOf(this.thousandsSeparator,r)===r&&(++i,e&&(t+=this.thousandsSeparator.length));return i}_separatorsCountFromSlice(t){return void 0===t&&(t=this._value),this._separatorsCount(this._removeThousandsSeparators(t).length,!0)}extractInput(t,e,i){return void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e),this._removeThousandsSeparators(super.extractInput(t,e,i))}_appendCharRaw(t,e){void 0===e&&(e={});const i=this._separatorsCountFromSlice(e.tail&&e._beforeTailState?e._beforeTailState._value:this._value);this._value=this._removeThousandsSeparators(this.value);const r=this._value;this._value+=t;let n,a=!isNaN(this.number),o=!1;if(a){let t;null!=this.min&&this.min<0&&this.number<this.min&&(t=this.min),null!=this.max&&this.max>0&&this.number>this.max&&(t=this.max),null!=t&&(this.autofix?(this._value=this.format(t,this).replace(br.UNMASKED_RADIX,this.radix),o||(o=r===this._value&&!e.tail)):a=!1),a&&(a=Boolean(this._value.match(this._numberRegExp)))}a?n=new ir({inserted:this._value.slice(r.length),rawInserted:o?"":t,skip:o}):(this._value=r,n=new ir),this._value=this._insertThousandsSeparators(this._value);const s=this._separatorsCountFromSlice(e.tail&&e._beforeTailState?e._beforeTailState._value:this._value);return n.tailShift+=(s-i)*this.thousandsSeparator.length,n}_findSeparatorAround(t){if(this.thousandsSeparator){const e=this.value.indexOf(this.thousandsSeparator,t-this.thousandsSeparator.length+1);if(e<=t)return e}return-1}_adjustRangeWithSeparators(t,e){const i=this._findSeparatorAround(t);i>=0&&(t=i);const r=this._findSeparatorAround(e);return r>=0&&(e=r+this.thousandsSeparator.length),[t,e]}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length),[t,e]=this._adjustRangeWithSeparators(t,e);const i=this.value.slice(0,t),r=this.value.slice(e),n=this._separatorsCount(i.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(i+r));const a=this._separatorsCountFromSlice(i);return new ir({tailShift:(a-n)*this.thousandsSeparator.length})}nearestInputPos(t,e){if(!this.thousandsSeparator)return t;switch(e){case Ri:case Ni:case qi:{const i=this._findSeparatorAround(t-1);if(i>=0){const r=i+this.thousandsSeparator.length;if(t<r||this.value.length<=r||e===qi)return i}break}case $i:case Vi:{const e=this._findSeparatorAround(t);if(e>=0)return e+this.thousandsSeparator.length}}return t}doCommit(){if(this.value){const t=this.number;let e=t;null!=this.min&&(e=Math.max(e,this.min)),null!=this.max&&(e=Math.min(e,this.max)),e!==t&&(this.unmaskedValue=this.format(e,this));let i=this.value;this.normalizeZeros&&(i=this._normalizeZeros(i)),this.padFractionalZeros&&this.scale>0&&(i=this._padFractionalZeros(i)),this._value=i}super.doCommit()}_normalizeZeros(t){const e=this._removeThousandsSeparators(t).split(this.radix);return e[0]=e[0].replace(/^(\D*)(0*)(\d*)/,((t,e,i,r)=>e+r)),t.length&&!/\d$/.test(e[0])&&(e[0]=e[0]+"0"),e.length>1&&(e[1]=e[1].replace(/0*$/,""),e[1].length||(e.length=1)),this._insertThousandsSeparators(e.join(this.radix))}_padFractionalZeros(t){if(!t)return t;const e=t.split(this.radix);return e.length<2&&e.push(""),e[1]=e[1].padEnd(this.scale,"0"),e.join(this.radix)}doSkipInvalid(t,e,i){void 0===e&&(e={});const r=0===this.scale&&t!==this.thousandsSeparator&&(t===this.radix||t===br.UNMASKED_RADIX||this.mapToRadix.includes(t));return super.doSkipInvalid(t,e,i)&&!r}get unmaskedValue(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,br.UNMASKED_RADIX)}set unmaskedValue(t){super.unmaskedValue=t}get typedValue(){return this.parse(this.unmaskedValue,this)}set typedValue(t){this.rawInputValue=this.format(t,this).replace(br.UNMASKED_RADIX,this.radix)}get number(){return this.typedValue}set number(t){this.typedValue=t}get allowNegative(){return null!=this.min&&this.min<0||null!=this.max&&this.max<0}get allowPositive(){return null!=this.min&&this.min>0||null!=this.max&&this.max>0}typedValueEquals(t){return(super.typedValueEquals(t)||br.EMPTY_VALUES.includes(t)&&br.EMPTY_VALUES.includes(this.typedValue))&&!(0===t&&""===this.value)}}fr=br,br.UNMASKED_RADIX=".",br.EMPTY_VALUES=[...nr.EMPTY_VALUES,0],br.DEFAULTS={...nr.DEFAULTS,mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[fr.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:!0,padFractionalZeros:!1,parse:Number,format:t=>t.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},Qi.MaskedNumber=br;const gr={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function mr(t,e,i){void 0===e&&(e=gr.MASKED),void 0===i&&(i=gr.MASKED);const r=Ui(t);return t=>r.runIsolated((r=>(r[e]=t,r[i])))}Qi.PIPE_TYPE=gr,Qi.createPipe=mr,Qi.pipe=function(t,e,i,r){return mr(e,i,r)(t)},Qi.RepeatBlock=class extends hr{get repeatFrom(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?t:0}get repeatTo(){var t;return null!=(t=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?t:1/0}constructor(t){super(t)}updateOptions(t){super.updateOptions(t)}_update(t){var e,i,r;const{repeat:n,...a}=Gi(t);this._blockOpts=Object.assign({},this._blockOpts,a);const o=Ui(this._blockOpts);this.repeat=null!=(e=null!=(i=null!=n?n:o.repeat)?i:this.repeat)?e:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(r=this._blocks)?void 0:r.length)||0,this.repeatFrom)),blocks:{m:o},eager:o.eager,overwrite:o.overwrite,skipInvalid:o.skipInvalid,lazy:o.lazy,placeholderChar:o.placeholderChar,displayChar:o.displayChar})}_allocateBlock(t){return t<this._blocks.length?this._blocks[t]:this.repeatTo===1/0||this._blocks.length<this.repeatTo?(this._blocks.push(Ui(this._blockOpts)),this.mask+="m",this._blocks[this._blocks.length-1]):void 0}_appendCharRaw(t,e){void 0===e&&(e={});const i=new ir;for(let s,u,h=null!=(r=null==(n=this._mapPosToBlock(this.displayValue.length))?void 0:n.index)?r:Math.max(this._blocks.length-1,0);s=null!=(a=this._blocks[h])?a:u=!u&&this._allocateBlock(h);++h){var r,n,a,o;const l=s._appendChar(t,{...e,_beforeTailState:null==(o=e._beforeTailState)||null==(o=o._blocks)?void 0:o[h]});if(l.skip&&u){this._blocks.pop(),this.mask=this.mask.slice(1);break}if(i.aggregate(l),l.consumed)break}return i}_trimEmptyTail(t,e){var i,r;void 0===t&&(t=0);const n=Math.max((null==(i=this._mapPosToBlock(t))?void 0:i.index)||0,this.repeatFrom,0);let a;null!=e&&(a=null==(r=this._mapPosToBlock(e))?void 0:r.index),null==a&&(a=this._blocks.length-1);let o=0;for(let t=a;n<=t&&!this._blocks[t].unmaskedValue;--t,++o);o&&(this._blocks.splice(a-o+1,o),this.mask=this.mask.slice(o))}reset(){super.reset(),this._trimEmptyTail()}remove(t,e){void 0===t&&(t=0),void 0===e&&(e=this.displayValue.length);const i=super.remove(t,e);return this._trimEmptyTail(t,e),i}totalInputPositions(t,e){return void 0===t&&(t=0),null==e&&this.repeatTo===1/0?1/0:super.totalInputPositions(t,e)}get state(){return super.state}set state(t){this._blocks.length=t._blocks.length,this.mask=this.mask.slice(0,this._blocks.length),super.state=t}};try{globalThis.IMask=Qi}catch{}const vr={cpf_cnpj:{mask:[{mask:"000.000.000-00"},{mask:"00.000.000/0000-00"}],placeholderChar:"_"},cpf:{mask:"000.000.000-00",placeholderChar:"_"},cnpj:{mask:"00.000.000/0000-00",placeholderChar:"_"},phone:{mask:"(00) 00000-0000",blocks:{"(00)":{mask:"(00)",maxLength:2,placeholderChar:""},"00000":{mask:"00000",maxLength:5,placeholderChar:"_"},"-":{mask:"-"},"0000":{mask:"0000",maxLength:4,placeholderChar:"_"}},placeholderChar:"_"},date:{mask:"00/00/0000"},dateRange:{mask:"00/00/0000 - 00/00/0000"}},wr=class{constructor(e){t(this,e),this.valueChange=n(this,"valueChange"),this.inputClear=n(this,"inputClear"),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.mode="default",this.status="default",this.size="medium",this.type="text",this.inputMode="text",this.label="",this.name="",this.placeholder=null,this.value="",this.iconName="",this.disabled=!1,this.required=!1,this.enableSelectionMode=!1,this.readOnly=!1,this.isLoading=!1,this.isHovered=!1,this.isFocused=!1,this.styles={},this.clearIcon=!0,this.hideErrorIcon=!1,this.autocomplete="on"}async setFocus(){const t=p()&&f()?1e3:200;let e=b(this.host);setTimeout((()=>{this.inputRef.focus(),e&&e.remove()}),t)}formStateRestoreCallback(t){var e;this.value=t.value,this.applyValueToMask(),null===(e=this.internals)||void 0===e||e.setFormValue(this.value)}formAssociatedCallback(t){t.ariaLabel=this.label}formResetCallback(){var t,e;this.handleClearInput(),null===(t=this.internals)||void 0===t||t.setValidity({}),null===(e=this.internals)||void 0===e||e.setFormValue("")}formDisabledCallback(t){this.disabled=t}connectedCallback(){this.styles["--primary-base"]=window.CuraAPI.theme.colors.getColor("primary-base"),this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite"),this.styles["--neutral-white"]=window.CuraAPI.theme.colors.getColor("neutral-white"),this.styles["--neutral-black"]=window.CuraAPI.theme.colors.getColor("neutral-black"),this.styles["--neutral-medium"]=window.CuraAPI.theme.colors.getColor("neutral-medium"),this.styles["--neutral-base"]=window.CuraAPI.theme.colors.getColor("neutral-base"),this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark"),this.styles["--success-dark"]=window.CuraAPI.theme.colors.getColor("success-dark"),this.styles["--success-darker"]=window.CuraAPI.theme.colors.getColor("success-darker"),this.styles["--success-lighter"]=window.CuraAPI.theme.colors.getColor("success-lighter"),this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter"),this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark"),this.styles["--error-darker"]=window.CuraAPI.theme.colors.getColor("error-darker"),this.styles["--error-base"]=window.CuraAPI.theme.colors.getColor("error-base"),this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor("info-base"),this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily(),this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize(),this.styles["--font-color"]=window.CuraAPI.theme.fonts.getColor(),this.weights=window.CuraAPI.theme.fonts.getWeights(),this.breakpoints=window.CuraAPI.theme.breakpoints.get(),this.styles["--font-weight-medium"]=this.weights.medium,this.styles["--font-weight-bold"]=this.weights.bold,this.styles["--font-weight-regular"]=this.weights.regular}getClasses(){return{[this.size.toLowerCase()]:"default"===this.mode,disabled:this.disabled,isLoading:this.isLoading,isFocused:this.isFocused&&!this.disabled&&!this.readOnly&&!this.isLoading,isHovered:this.isHovered,[this.status]:!0,transparent:"transparent"===this.mode,selection:this.enableSelectionMode}}getLabelColor(){return this.disabled?"neutral-medium":this.isLoading&&"transparent"===this.mode&&!this.isHovered?"neutral-dark":(this.isFocused||this.isHovered||"success"===this.status||"error"===this.status)&&!this.readOnly||this.isHovered?"neutral-black":"neutral-dark"}renderIcon(){if(""===this.iconName&&"default"===this.status||"transparent"===this.mode&&this.isLoading||"transparent"===this.mode&&"default"===this.status)return;if("error"===this.status&&this.hideErrorIcon)return;const t={loading:{name:this.iconName,color:"primary-base"},success:{name:"checkCircle",color:"success-dark"},error:{name:"alertCircle",color:"error-dark"},default:{name:this.iconName,color:"neutral-dark"},disabled:{name:this.iconName,color:"neutral-medium"}}[this.isLoading?"loading":this.disabled?"disabled":this.status||"default"];return e("div",{class:"feedback-icon",style:this.styles},e("cura-icon",{name:t.name,iconset:"default",size:"transparent"===this.mode||"large"===this.size?20:16,color:t.color}))}renderHelperText(){const t="error"===this.status,i="success"===this.status,r="default"===this.status,n="large"===this.size?"small":"xsmall",a=(()=>this.disabled?"neutral-medium":this.isLoading?"primary-base":this.isFocused||this.isHovered?"neutral-black":"neutral-dark")();return e("div",{style:this.styles,class:"helper-text",part:"cura-input-text-helper"},r&&e("cura-label",{size:n,lineHeight:"xsmall",color:a},e("slot",null)),t&&"default"===this.mode&&e("cura-label",{size:n,lineHeight:"xsmall",color:"error-dark"},e("slot",null)),t&&"transparent"===this.mode&&e("cura-label",{size:n,lineHeight:"xsmall",color:"neutral-black"},e("slot",null)),i&&e("cura-label",{size:n,lineHeight:"xsmall",color:"success-dark"},e("slot",null)))}handleMouseEnter(){this.isHovered=!0}handleMouseLeave(){this.isHovered=!1}componentDidLoad(){this.initializeMask()}disconnectedCallback(){this.destroyMask()}handleMaskUpdate(){this.maskedInput&&this.maskedInput.updateValue()}handleClearInput(){this.handleMaskUpdate(),this.value="",this.inputRef.value="",this.valueChange.emit(this.value),this.inputClear.emit(this.value),this.handleMaskUpdate(),this.setFocus()}handleInputFocus(){this.handleMaskUpdate(),this.isFocused=!0}handleInputBlur(){this.handleMaskUpdate(),setTimeout((()=>{this.isFocused=!1}),150)}shouldDisplayMask(){return this.maskPreset||this.maskRegex||this.maskAdvanced}initializeMask(){this.shouldDisplayMask()?(this.maskedInput&&this.destroyMask(),this.maskPreset?this.initializePresetMask():this.maskRegex?this.initializeRegexMask():this.maskAdvanced&&this.initializeAdvancedMask(),this.applyValueToMask()):this.clearMaskValue()}initializeRegexMask(){const t=this.maskRegex.replace(/^\/|\/[gimsuy]*$/g,""),e=(this.maskRegex.match(/\/[gimsuy]*$/g)||[""])[0].slice(1);this.maskedInput=Qi(this.inputRef,{mask:new RegExp(t,e)})}initializePresetMask(){const t=vr[this.maskPreset];t?this.maskedInput=Qi(this.inputRef,t):console.error(`Mask preset "${this.maskPreset}" not found.`)}initializeAdvancedMask(){if(this.inputRef)try{const t="string"==typeof this.maskAdvanced?JSON.parse(this.maskAdvanced):this.maskAdvanced;this.maskedInput=Qi(this.inputRef,t)}catch(t){console.error("Error defining maskAdvanced:",t)}}applyValueToMask(){this.maskedInput&&(this.maskedInput.mask===Date||this.maskedInput.mask===Number?this.maskedInput.typedValue=this.value:this.value=this.maskedInput.value,this.handleMaskUpdate())}clearMaskValue(){this.inputRef.value=this.value}destroyMask(){this.maskedInput&&(this.maskedInput.destroy(),this.maskedInput=void 0)}handleInputChange(t){var e;const i=t.target.value;this.valueChange.emit(i),"number"===this.type?this.handleNumberInputChange(i):this.handleTextInputChange(i),null===(e=this.internals)||void 0===e||e.setFormValue(this.value)}handleNumberInputChange(t){const e=parseFloat(t);isNaN(e)?console.error("Invalid numeric input:",t):this.value=e}handleTextInputChange(t){this.maskedInput?((this.maskedInput.mask instanceof Date||this.maskedInput.mask===Number)&&(this.maskedInput.typedValue=t,this.value=this.maskedInput.typedValue),this.value=this.maskedInput.value):this.value=t}handleKeyDown(t){"number"===this.type&&this.handleBlockInvalidNumber(t)}handleBlockInvalidNumber(t){["e","E","+","-"].includes(t.key)&&t.preventDefault()}render(){return e(i,{key:"7794e2a816baa0438c256ba584d14ddbeb9cc9b8",role:"textbox","aria-disabled":this.disabled,"aria-required":this.required,"aria-invalid":"error"===this.status},e("div",{key:"60fd4d3edebfe6aeb720dd079efb94970626d975",style:this.styles,onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave(),class:Object.assign({"cura-input-group":!0},this.getClasses())},e("div",{key:"55db1933b3eb29807029669e5c66002556b3bd03",class:"input-wrapper"},this.label&&e("cura-label",{key:"1c4119cc0b2190fbdb1ddcc3f55c41c68ec88957",class:"label",weight:"bold",size:"large"===this.size?"small":"xsmall",color:this.getLabelColor()},this.label," ",this.required&&e("span",{key:"779e4726201110a6daf2c474b494f6baa9db5dc0",class:"required"},"* ")),e("div",{key:"a409f41993833fea3eb3212821c26a63f62e970f",class:"cura-input-field",part:"cura-input-field",style:this.styles},this.renderIcon(),e("input",{key:"75b3de8e8ca33eb2b9e8e8a285de19d172490552",name:this.name?this.name:"",type:this.type,onKeyDown:t=>this.handleKeyDown(t),onBlur:this.handleInputBlur.bind(this),onFocus:this.handleInputFocus.bind(this),onInput:t=>this.handleInputChange(t),class:this.getClasses(),style:this.styles,placeholder:this.placeholder,disabled:this.disabled||this.isLoading,required:this.required,readonly:this.readOnly,maxlength:this.maxlength,value:null!=this.value?this.value:"",inputmode:this.maskPreset?"tel":this.inputMode,ref:t=>this.inputRef=t,autocomplete:this.autocomplete}),!!this.clearIcon&&!this.readOnly&&!this.isLoading&&!this.disabled&&this.value&&this.isFocused&&e("cura-icon",{key:"4a22b5b1608c5dc57a99b7edc93ab11ce2de4048",size:"large"===this.size||"transparent"===this.mode?20:16,color:"primary-base",name:"closeCircle",iconset:"default",class:"clear-button",onMouseDown:()=>this.handleClearInput()}),this.isLoading&&e("cura-loader-circle",{key:"65a078642ac17f1779726749b29516c018bc317d",size:"large"===this.size?"medium":"small",color:"primary-base"})),this.renderHelperText())))}static get formAssociated(){return!0}get host(){return r(this)}static get watchers(){return{styles:[{connectedCallback:0}],size:[{getClasses:0}],status:[{renderIcon:0}],mode:[{renderIcon:0}],maskPreset:[{initializeMask:0}],maskRegex:[{initializeMask:0}],maskAdvanced:[{initializeMask:0}]}}};wr.style=":host{display:block;box-sizing:border-box;width:100%}.required{color:var(--error-base)}.cura-input-group{width:100%;font-family:var(--font-family);text-align:left !important}.cura-input-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-input-group cura-label{margin-bottom:8px}.cura-input-group .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group .cura-input-field cura-loader-circle{margin:0px 12px}.cura-input-group .cura-input-field .feedback-icon{padding-left:12px;padding-top:6px}.cura-input-group .cura-input-field .clear-button{padding-right:12px;cursor:pointer}.cura-input-group .helper-text{margin-top:8px;color:var(--neutral-dark)}.cura-input-group.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field input{color:var(--success-darker) !important}.cura-input-group.success .cura-input-field input::placeholder{color:var(--success-darker) !important}.cura-input-group.success:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark) !important;background-color:var(--success-lighter) !important}.cura-input-group.success:not(.transparent) .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field input{color:var(--error-darker) !important}.cura-input-group.error .cura-input-field input::placeholder{color:var(--error-darker) !important}.cura-input-group.error:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark) !important;background-color:var(--error-lighter) !important}.cura-input-group.error:not(.transparent) .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field{border-color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input{color:var(--neutral-dark)}.cura-input-group:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group:focus-within:not(.selection) .cura-input-field{border:2px solid var(--info-base) !important;background-color:var(--neutral-purewhite);outline:none}.cura-input-group:focus-within:not(.selection) .cura-input-field input{color:var(--neutral-black) !important}.cura-input-group:focus-within.selection .cura-input-field{border-radius:4px 4px 0px 0px}.cura-input-group.isLoading{cursor:wait}.cura-input-group.isLoading .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:var(--neutral-white) !important;border:2px solid var(--primary-base) !important}.cura-input-group.isLoading .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.isLoading .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.isLoading .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.isLoading .cura-input-field input{cursor:wait;color:var(--primary-base) !important}.cura-input-group.isLoading .cura-input-field input::placeholder{color:var(--primary-base) !important}.cura-input-group.readOnly[read-only] .cura-input-field{cursor:default}.cura-input-group.readOnly[read-only] .cura-input-field input{cursor:default}.cura-input-group.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.disabled .cura-input-field{background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.cura-input-group.disabled .cura-input-field input{color:var(--neutral-medium)}.cura-input-group.disabled .cura-input-field input::placeholder{color:var(--neutral-medium)}.cura-input-group.transparent{background-color:transparent;padding:0px;max-height:80px}.cura-input-group.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent !important;border:none !important;border-radius:0;height:27px}.cura-input-group.transparent .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.transparent .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.transparent .cura-input-field input{color:var(--neutral-black) !important;font-size:16px;font-weight:var(--font-weight-bold) !important;padding:0}.cura-input-group.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.cura-input-group.transparent .cura-input-field .feedback-icon{order:3;margin:0 20px 0 0}.cura-input-group.transparent:focus-within .cura-input-field{border:none !important;background-color:transparent !important}.cura-input-group.transparent:focus-within .cura-input-field input{border:none !important;outline:none}.cura-input-group.transparent .helper-text{margin-top:0px}.cura-input-group.transparent.transparent{display:flex;background-color:transparent;padding:0px;justify-content:start;align-items:center;max-height:80px;gap:4px}.cura-input-group.transparent.transparent .input-wrapper{display:flex;width:100%;flex-direction:column;justify-content:start}.cura-input-group.transparent.transparent cura-label{margin-bottom:4px;--color-body:var(--neutral-dark) !important}.cura-input-group.transparent.transparent.error cura-label{--color-body:var(--neutral-black) !important}.cura-input-group.transparent.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent !important;border:none !important;border-radius:0;height:27px;overflow:hidden}.cura-input-group.transparent.transparent .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.transparent.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.transparent.transparent .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.transparent.transparent .cura-input-field input{order:1;color:var(--neutral-black) !important;font-size:16px;font-weight:var(--font-weight-bold) !important;padding:0}.cura-input-group.transparent.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.cura-input-group.transparent.transparent .cura-input-field .clear-button{order:2;cursor:pointer;margin:0 20px 0 0;padding:0}.cura-input-group.transparent.transparent .cura-input-field .feedback-icon{padding:6px 0 0 0}.cura-input-group.transparent.transparent .cura-input-field cura-loader-circle{order:2;margin:0 20px 0 0}.cura-input-group.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error .cura-input-field input{color:var(--error-darker) !important}.cura-input-group.error .cura-input-field input::placeholder{color:var(--error-darker) !important}.cura-input-group.error.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.error.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.error.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.error.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.error.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.error.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.error.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.error:not(.transparent).large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark) !important;background-color:var(--error-lighter) !important}.cura-input-group.error:not(.transparent).large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.error:not(.transparent).large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.error:not(.transparent).large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success .cura-input-field input{color:var(--success-darker) !important}.cura-input-group.success .cura-input-field input::placeholder{color:var(--success-darker) !important}.cura-input-group.success.small .cura-input-field{width:100%;height:32px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.small .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:12px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.small .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.small .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.small .cura-input-field input{line-height:13px;letter-spacing:0.72px}.cura-input-group.success.small .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.success.medium .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.medium .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.medium .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.medium .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.medium .cura-input-field input{line-height:16px;letter-spacing:0.56px}.cura-input-group.success.medium .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-regular)}.cura-input-group.success.large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.cura-input-group.success.large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success.large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success.large .cura-input-field .feedback-icon{padding-left:12px}.cura-input-group.success.large .helper-text{margin-top:8px;color:var(--neutral-dark);font-weight:var(--font-weight-bold)}.cura-input-group.success:not(.transparent).large .cura-input-field{width:100%;height:44px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark) !important;background-color:var(--success-lighter) !important}.cura-input-group.success:not(.transparent).large .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:16px;box-sizing:border-box;padding:0px 12px 0px 8px}.cura-input-group.success:not(.transparent).large .cura-input-field input::placeholder{color:var(--neutral-dark)}.cura-input-group.success:not(.transparent).large .cura-input-field .feedback-icon{padding-left:12px}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}";const xr=class{constructor(e){t(this,e),this.size="medium",this.weight="regular",this.spotColor="accent-dark",this.marginBlock="0",this.lineHeight="125%",this.textOverflow="none",this.styles={},this.theme=window.CuraAPI.theme}handleChangeColor(){this.setColors()}connectedCallback(){this.setFontProperties(),this.setColors()}getClasses(){const t={"textoverflow-single":"single"===this.textOverflow};return t[this.size.toLowerCase()]=!0,t[`${this.weight.toLowerCase()}-weight`]=!0,t}setFontProperties(){this.weights=this.theme.fonts.getWeights(),this.fontSizeBase=this.theme.fonts.getSize(),this.styles={"--font-family":this.theme.fonts.getFamily("body"),"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold}}setColors(){this.styles=Object.assign(Object.assign({},this.styles),{"--color-link":this.theme.colors.getColor(`${this.spotColor}`)})}hostCSSProperties(){const t=this.color?this.theme.colors.getColor(this.color):this.theme.fonts.getColor();return{"--margin-block":this.marginBlock,"--font-size-base":this.fontSizeBase,"--line-height":this.lineHeight,"--color-body":t||this.theme.colors.getColor("neutral-darker")}}render(){return e(i,{key:"80bddd4f902e7084628ed2cbfe1144a6ddcf2674",style:this.hostCSSProperties()},e("p",{key:"bc507c1b119459c6efbb81120a7cc33c1e305800",style:this.styles,class:this.getClasses()},e("slot",{key:"451674e41f86b0b3db3f2f29b498aa49c489a7ec"})))}get host(){return r(this)}static get watchers(){return{color:[{handleChangeColor:0}],spotColor:[{handleChangeColor:0}]}}};xr.style=":host{display:block;font-size:var(--font-size-base)}:host p{font-family:var(--font-family);font-size:1.143em;font-weight:var(--font-weight-medium);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0.32px}:host p.bold-weight,:host p ::slotted(b),:host p ::slotted(strong),:host p ::slotted(u){font-weight:var(--font-weight-bold)}:host p.large{font-size:1.357em;line-height:calc(var(--line-height) - 4%);letter-spacing:0px}:host p.small{font-size:1em;line-height:calc(var(--line-height) - 4%);letter-spacing:0.56px}:host p.xsmall{font-size:0.857em;line-height:calc(var(--line-height) - 17%);letter-spacing:0.72px}:host p.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}:host p ::slotted(a){font-weight:var(--font-weight-bold);color:var(--color-link);text-underline-offset:10%}:host p ::slotted(u){text-underline-offset:10%}:host p ::slotted(abbr){color:var(--color-link);text-decoration:underline dashed 1px var(--color-link);text-underline-offset:10%;cursor:default}";const yr=class{constructor(e){t(this,e),this.size="medium",this.color="neutral-white",this.sizes={xlarge:32,large:24,medium:20,small:16,default:16},this.getPxSize=()=>this.sizes[this.size]||this.sizes.default}getStyles(){return{"--size":`${this.getPxSize()}px`,"--color":window.CuraAPI.theme.colors.getColor(this.color)}}render(){return e(i,{key:"628e3341e2bc0bef9a18362ab46625d99a7f6800",style:this.getStyles(),role:"progressbar"},e("svg",{key:"c0e5366cef003222ec7a60fcaed02a1e2376acd5",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{key:"194989f5d872562dffc46ca981a699183de87603"},e("circle",{key:"6ffa4ee0394f80b4328e5bda459f849387086568",cx:"8",cy:"8",r:"7",stroke:"url(#paint0_linear_13485_11488)","stroke-width":"2"}),e("path",{key:"9cc41c580811d999769f1ebe1443bd63a092eae0",d:"M1 8C1 4.13401 4.11877 1 7.96596 1C9.53445 1 10.9819 1.52093 12.1462 2.4C12.8959 2.96601 13.5282 3.68049 14 4.5","stroke-width":"2"})),e("defs",{key:"1190920b737c9306a96ac9854207a339ac312815"},e("linearGradient",{key:"11921fe3939bef2f32a4688058a3c818600c5781",id:"paint0_linear_13485_11488",x1:"15.7",y1:"4.5",x2:"4.15",y2:"11.5",gradientUnits:"userSpaceOnUse"},e("stop",{key:"fa3f8b029d39912abea7adef004f24e99f76d453"}),e("stop",{key:"53b8efce47f6101c36ccf9f05beca7ab76ffb886",offset:"1"})))))}};yr.style=":host{display:inline-block;width:var(--size);height:var(--size)}:host svg{width:var(--size);height:var(--size);animation:rotate 0.7s linear infinite}:host circle,:host path{stroke-miterlimit:10;stroke-linecap:round;stroke-linejoin:round}:host path{stroke:var(--color)}:host stop{stop-color:var(--color)}:host linearGradient stop:first-child{stop-opacity:0.14}@keyframes rotate{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}";const kr=class{constructor(e){t(this,e),this.contentwidth="default"}connectedCallback(){this.styles={"--spacing":window.CuraAPI.theme.spacing.getSpacing()}}getClasses(){const t={};return t[this.contentwidth.toLowerCase()]=!0,t}render(){return e(i,{key:"65ceac57166149f686508dd56d865092406afe4d"},e("div",{key:"c78f1ef93fd52b43285fa3b39d203db258c1bf31",style:this.styles,class:"grid-template"},e("div",{key:"cfb99058f718560bf2679e13266bf6e1447cfb1e",id:"sub-header"},e("slot",{key:"ddd2aaeb147cad4e92e16dda69f757d9aa261e2c",name:"sub-header"})),e("div",{key:"c3d87f2c1d68d08e2c46730d731e03a17e0c355d",id:"header"},e("slot",{key:"a681e8d1c9c379be1c18278811d7e99455ad0a8b",name:"header"})),e("div",{key:"aee6e5920384ecdbf0c8adb358a431e304f612de",id:"pre-content"},e("slot",{key:"4e554925885a9f8200fe8cb7b35e438e6a7dd1e8",name:"pre-content"})),e("div",{key:"30f1f9aeb3a58fb390716dec7f5855fdcc1cc82d",id:"content-container",class:this.getClasses()},e("div",{key:"259ab99ca0ec43a86536c3c188429a555eebbd45",id:"sidebar-left"},e("slot",{key:"ff359698c0b452776e558234b46745dd40746edc",name:"sidebar-left"})),e("div",{key:"14338cdc57d8ee6cfb5ca15fd5ed8fe276d83bea",id:"content"},e("slot",{key:"ea4f4a5423bf061880d580e86f015907ee5929ea",name:"content"}),e("slot",{key:"ddf40946d828b0de102e9fc21ee99201dc36342b"})),e("div",{key:"c207b0c2280033f71c2b7803b1ae9ec017ab2b5c",id:"sidebar-right"},e("slot",{key:"fd15c1b0ce197f7de9e72827dca3c1d4736b4219",name:"sidebar-right"}))),e("div",{key:"fd02b69336b4d6920975bf1a8b4a7c8a957e65d6",id:"post-body"},e("slot",{key:"205b2283d6fff54f3e3be4ed9b2b64b05c985601",name:"post-body"})),e("div",{key:"4602dc880efe376c9a951237c43ebcb6723499db",id:"footer"},e("slot",{key:"ed9314b5192194cea91dab7fc6efdbfb198016fc",name:"footer"})),e("div",{key:"53b5bd4b187a0ae6657bccfb8626a5d335bdeb73",id:"sub-footer"},e("slot",{key:"8b086fb200223ff0bf5acd2266da3ae47cc30269",name:"sub-footer"}))))}get host(){return r(this)}};kr.style=':host{display:block}:host .grid-template{display:grid;grid-template-rows:auto;grid-template-columns:auto;grid-template-areas:"sub-header" "header" "pre-content" "content-container" "post-body" "footer" "sub-footer"}:host .grid-template #sub-header{grid-area:sub-header}:host .grid-template #header{grid-area:header}:host .grid-template #pre-content{grid-area:pre-content}:host .grid-template #content-container{grid-area:content-container}:host .grid-template #post-body{grid-area:post-body}:host .grid-template #footer{grid-area:footer}:host .grid-template #sub-footer{grid-area:sub-footer}@media (max-width: 768px){:host .grid-template{padding:0px}}@media (min-width: 769px) and (max-width: 992px){:host .grid-template{padding:0px}}@media (min-width: 993px) and (max-width: 1920px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 5px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 5px)}:host .grid-template #content-container{display:flex}:host .grid-template #content-container #content{flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}}@media (min-width: 1921px){:host .grid-template{padding:0px}:host .grid-template #content-container #sidebar-left ::slotted(div[slot=sidebar-left]){margin-right:calc(var(--spacing) * 7px)}:host .grid-template #content-container #sidebar-right ::slotted(div[slot=sidebar-right]){margin-left:calc(var(--spacing) * 7px)}:host .grid-template #content-container{display:flex}:host .grid-template #content-container #content{flex-grow:1}:host .grid-template #content-container #sidebar-left,:host .grid-template #content-container #sidebar-right{max-width:20%}:host .grid-template #content-container.centered{max-width:1921px;justify-self:center}}';const Ar=class{constructor(e){t(this,e),this.size="medium",this.spotColor="accent-dark",this.marginBlock="1.25em",this.lineHeight="140%",this.textOverflow="none",this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){this.setFontProperties()}setFontProperties(){this.weights=this.theme.fonts.getWeights(),this.fontSizeBase=this.theme.fonts.getSize(),this.styles={"--font-family":this.theme.fonts.getFamily("body"),"--font-weight-regular":this.weights.regular,"--font-weight-medium":this.weights.medium,"--font-weight-bold":this.weights.bold}}hostCSSProperties(){const t=this.color?this.theme.colors.getColor(this.color):this.theme.fonts.getColor();return{"--margin-block":this.marginBlock,"--font-size-base":this.fontSizeBase,"--line-height":this.lineHeight,"--color-body":t||this.theme.colors.getColor("neutral-darker"),"--color-spot":this.theme.colors.getColor(`${this.spotColor}`)}}getClasses(){const t={"textoverflow-single":"single"===this.textOverflow};return t[this.size.toLowerCase()]=!0,t}render(){return e(i,{key:"33b3d1d2e739523255fbfbfd8b6afd67aa5dbc2d",style:this.hostCSSProperties()},e("p",{key:"1baf909ffcc9c682bc9fba3b36d173e53020d084",style:this.styles,class:this.getClasses()},e("slot",{key:"b836160b6c94a6f3a2f5a7c4c1802bc5340bd5b5"})))}get host(){return r(this)}};Ar.style=":host{display:block;font-size:var(--font-size-base);min-width:0}:host p{font-family:var(--font-family);font-size:var(--font-size-base);font-weight:var(--font-weight-regular);color:var(--color-body);line-height:var(--line-height);margin-block:var(--margin-block);letter-spacing:0.28px;width:100%}:host p.large{font-size:1.214em;line-height:calc(var(--line-height) + 10%);letter-spacing:0px}:host p.small{font-size:0.85em;line-height:calc(var(--line-height) - 5%);letter-spacing:0.48px}:host p.caption,:host p.xsmall{font-size:0.8571428571em;line-height:calc(var(--line-height) - 5%);letter-spacing:0.6px}:host p.textoverflow-single{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}:host p ::slotted(b),:host p ::slotted(strong){font-weight:var(--font-weight-bold)}:host p ::slotted(a),:host p ::slotted(a:-webkit-any-link){font-weight:var(--font-weight-medium);color:var(--color-spot);text-underline-offset:10%}:host p ::slotted(u){font-weight:var(--font-weight-medium);text-underline-offset:10%}:host p ::slotted(i){font-style:italic}:host p ::slotted(em){font-weight:var(--font-weight-bold);color:var(--color-spot);font-style:normal}:host p ::slotted(abbr){color:var(--color-spot);text-decoration:underline dashed 1px var(--color-spot);text-underline-offset:10%;cursor:default}@media (min-width: 769px) and (max-width: 1920px){:host p{font-size:1.143em;line-height:calc(var(--line-height) + 5%);letter-spacing:0.32px}:host p.large{font-size:1.357em;line-height:calc(var(--line-height) + 10%);letter-spacing:0px}:host p.small{font-size:1em;line-height:calc(var(--line-height) - 5%);letter-spacing:0.56px}:host p.caption,:host p.xsmall{font-size:0.8571428571em;line-height:calc(var(--line-height) - 5%);letter-spacing:0.72px}}@media (min-width: 1921px){:host p{font-size:1.429em;line-height:calc(var(--line-height) + 10%);letter-spacing:0px}:host p.large{font-size:1.714em;line-height:calc(var(--line-height) + 20%)}:host p.small{font-size:1.21em;line-height:calc(var(--line-height) + 5%);letter-spacing:0px}:host p.caption,:host p.xsmall{font-size:1em;line-height:calc(var(--line-height) + 5%);letter-spacing:0.28px}}";const Cr=Math.min,Dr=Math.max,zr=Math.round,Er=Math.floor,Fr=t=>({x:t,y:t}),Mr={left:"right",right:"left",bottom:"top",top:"bottom"};function Br(t,e,i){return Dr(t,Cr(e,i))}function Sr(t,e){return"function"==typeof t?t(e):t}function Tr(t){return t.split("-")[0]}function jr(t){return t.split("-")[1]}function _r(t){return"x"===t?"y":"x"}function Lr(t){return"y"===t?"height":"width"}function Or(t){const e=t[0];return"t"===e||"b"===e?"y":"x"}function Pr(t){return _r(Or(t))}function Ir(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Rr=["left","right"],Nr=["right","left"],qr=["top","bottom"],$r=["bottom","top"];function Vr(t){const e=Tr(t);return Mr[e]+t.slice(e.length)}function Wr(t){const{x:e,y:i,width:r,height:n}=t;return{width:r,height:n,top:i,left:e,right:e+r,bottom:i+n,x:e,y:i}}function Hr(t,e,i){let{reference:r,floating:n}=t;const a=Or(e),o=Pr(e),s=Lr(o),u=Tr(e),h="y"===a,l=r.x+r.width/2-n.width/2,c=r.y+r.height/2-n.height/2,d=r[s]/2-n[s]/2;let p;switch(u){case"top":p={x:l,y:r.y-n.height};break;case"bottom":p={x:l,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:c};break;case"left":p={x:r.x-n.width,y:c};break;default:p={x:r.x,y:r.y}}switch(jr(e)){case"start":p[o]-=d*(i&&h?-1:1);break;case"end":p[o]+=d*(i&&h?-1:1)}return p}async function Yr(t,e){var i;void 0===e&&(e={});const{x:r,y:n,platform:a,rects:o,elements:s,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:l="viewport",elementContext:c="floating",altBoundary:d=!1,padding:p=0}=Sr(e,t),f=function(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}}(p),b=s[d?"floating"===c?"reference":"floating":c],g=Wr(await a.getClippingRect({element:null==(i=await(null==a.isElement?void 0:a.isElement(b)))||i?b:b.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:h,rootBoundary:l,strategy:u})),m="floating"===c?{x:r,y:n,width:o.floating.width,height:o.floating.height}:o.reference,v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),w=await(null==a.isElement?void 0:a.isElement(v))&&await(null==a.getScale?void 0:a.getScale(v))||{x:1,y:1},x=Wr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:m,offsetParent:v,strategy:u}):m);return{top:(g.top-x.top+f.top)/w.y,bottom:(x.bottom-g.bottom+f.bottom)/w.y,left:(g.left-x.left+f.left)/w.x,right:(x.right-g.right+f.right)/w.x}}const Qr=new Set(["left","top"]);function Xr(){return"undefined"!=typeof window}function Gr(t){return Kr(t)?(t.nodeName||"").toLowerCase():"#document"}function Ur(t){var e;return(null==t||null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function Zr(t){var e;return null==(e=(Kr(t)?t.ownerDocument:t.document)||window.document)?void 0:e.documentElement}function Kr(t){return!!Xr()&&(t instanceof Node||t instanceof Ur(t).Node)}function Jr(t){return!!Xr()&&(t instanceof Element||t instanceof Ur(t).Element)}function tn(t){return!!Xr()&&(t instanceof HTMLElement||t instanceof Ur(t).HTMLElement)}function en(t){return!(!Xr()||"undefined"==typeof ShadowRoot)&&(t instanceof ShadowRoot||t instanceof Ur(t).ShadowRoot)}function rn(t){const{overflow:e,overflowX:i,overflowY:r,display:n}=pn(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+i)&&"inline"!==n&&"contents"!==n}function nn(t){return/^(table|td|th)$/.test(Gr(t))}function an(t){try{if(t.matches(":popover-open"))return!0}catch(t){}try{return t.matches(":modal")}catch(t){return!1}}const on=/transform|translate|scale|rotate|perspective|filter/,sn=/paint|layout|strict|content/,un=t=>!!t&&"none"!==t;let hn;function ln(t){const e=Jr(t)?pn(t):t;return un(e.transform)||un(e.translate)||un(e.scale)||un(e.rotate)||un(e.perspective)||!cn()&&(un(e.backdropFilter)||un(e.filter))||on.test(e.willChange||"")||sn.test(e.contain||"")}function cn(){return null==hn&&(hn="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),hn}function dn(t){return/^(html|body|#document)$/.test(Gr(t))}function pn(t){return Ur(t).getComputedStyle(t)}function fn(t){return Jr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function bn(t){if("html"===Gr(t))return t;const e=t.assignedSlot||t.parentNode||en(t)&&t.host||Zr(t);return en(e)?e.host:e}function gn(t){const e=bn(t);return dn(e)?t.ownerDocument?t.ownerDocument.body:t.body:tn(e)&&rn(e)?e:gn(e)}function mn(t,e,i){var r;void 0===e&&(e=[]),void 0===i&&(i=!0);const n=gn(t),a=n===(null==(r=t.ownerDocument)?void 0:r.body),o=Ur(n);if(a){const t=vn(o);return e.concat(o,o.visualViewport||[],rn(n)?n:[],t&&i?mn(t):[])}return e.concat(n,mn(n,[],i))}function vn(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function wn(t){const e=pn(t);let i=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const n=tn(t),a=n?t.offsetWidth:i,o=n?t.offsetHeight:r,s=zr(i)!==a||zr(r)!==o;return s&&(i=a,r=o),{width:i,height:r,$:s}}function xn(t){return Jr(t)?t:t.contextElement}function yn(t){const e=xn(t);if(!tn(e))return Fr(1);const i=e.getBoundingClientRect(),{width:r,height:n,$:a}=wn(e);let o=(a?zr(i.width):i.width)/r,s=(a?zr(i.height):i.height)/n;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}const kn=Fr(0);function An(t){const e=Ur(t);return cn()&&e.visualViewport?{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}:kn}function Cn(t,e,i,r){void 0===e&&(e=!1),void 0===i&&(i=!1);const n=t.getBoundingClientRect(),a=xn(t);let o=Fr(1);e&&(r?Jr(r)&&(o=yn(r)):o=yn(t));const s=function(t,e,i){return void 0===e&&(e=!1),!(!i||e&&i!==Ur(t))&&e}(a,i,r)?An(a):Fr(0);let u=(n.left+s.x)/o.x,h=(n.top+s.y)/o.y,l=n.width/o.x,c=n.height/o.y;if(a){const t=Ur(a),e=r&&Jr(r)?Ur(r):r;let i=t,n=vn(i);for(;n&&r&&e!==i;){const t=yn(n),e=n.getBoundingClientRect(),r=pn(n),a=e.left+(n.clientLeft+parseFloat(r.paddingLeft))*t.x,o=e.top+(n.clientTop+parseFloat(r.paddingTop))*t.y;u*=t.x,h*=t.y,l*=t.x,c*=t.y,u+=a,h+=o,i=Ur(n),n=vn(i)}}return Wr({width:l,height:c,x:u,y:h})}function Dn(t,e){const i=fn(t).scrollLeft;return e?e.left+i:Cn(Zr(t)).left+i}function zn(t,e){const i=t.getBoundingClientRect();return{x:i.left+e.scrollLeft-Dn(t,i),y:i.top+e.scrollTop}}function En(t,e,i){let r;if("viewport"===e)r=function(t,e){const i=Ur(t),r=Zr(t),n=i.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,u=0;if(n){a=n.width,o=n.height;const t=cn();(!t||t&&"fixed"===e)&&(s=n.offsetLeft,u=n.offsetTop)}const h=Dn(r);if(h<=0){const t=r.ownerDocument,e=t.body,i=getComputedStyle(e),n="CSS1Compat"===t.compatMode&&parseFloat(i.marginLeft)+parseFloat(i.marginRight)||0,o=Math.abs(r.clientWidth-e.clientWidth-n);o<=25&&(a-=o)}else h<=25&&(a+=h);return{width:a,height:o,x:s,y:u}}(t,i);else if("document"===e)r=function(t){const e=Zr(t),i=fn(t),r=t.ownerDocument.body,n=Dr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),a=Dr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-i.scrollLeft+Dn(t);const s=-i.scrollTop;return"rtl"===pn(r).direction&&(o+=Dr(e.clientWidth,r.clientWidth)-n),{width:n,height:a,x:o,y:s}}(Zr(t));else if(Jr(e))r=function(t,e){const i=Cn(t,!0,"fixed"===e),r=i.top+t.clientTop,n=i.left+t.clientLeft,a=tn(t)?yn(t):Fr(1);return{width:t.clientWidth*a.x,height:t.clientHeight*a.y,x:n*a.x,y:r*a.y}}(e,i);else{const i=An(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Wr(r)}function Fn(t,e){const i=bn(t);return!(i===e||!Jr(i)||dn(i))&&("fixed"===pn(i).position||Fn(i,e))}function Mn(t,e,i){const r=tn(e),n=Zr(e),a="fixed"===i,o=Cn(t,!0,a,e);let s={scrollLeft:0,scrollTop:0};const u=Fr(0);function h(){u.x=Dn(n)}if(r||!r&&!a)if(("body"!==Gr(e)||rn(n))&&(s=fn(e)),r){const t=Cn(e,!0,a,e);u.x=t.x+e.clientLeft,u.y=t.y+e.clientTop}else n&&h();a&&!r&&n&&h();const l=!n||r||a?Fr(0):zn(n,s);return{x:o.left+s.scrollLeft-u.x-l.x,y:o.top+s.scrollTop-u.y-l.y,width:o.width,height:o.height}}function Bn(t){return"static"===pn(t).position}function Sn(t,e){if(!tn(t)||"fixed"===pn(t).position)return null;if(e)return e(t);let i=t.offsetParent;return Zr(t)===i&&(i=i.ownerDocument.body),i}function Tn(t,e){const i=Ur(t);if(an(t))return i;if(!tn(t)){let e=bn(t);for(;e&&!dn(e);){if(Jr(e)&&!Bn(e))return e;e=bn(e)}return i}let r=Sn(t,e);for(;r&&nn(r)&&Bn(r);)r=Sn(r,e);return r&&dn(r)&&Bn(r)&&!ln(r)?i:r||function(t){let e=bn(t);for(;tn(e)&&!dn(e);){if(ln(e))return e;if(an(e))return null;e=bn(e)}return null}(t)||i}const jn={convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{elements:e,rect:i,offsetParent:r,strategy:n}=t;const a="fixed"===n,o=Zr(r),s=!!e&&an(e.floating);if(r===o||s&&a)return i;let u={scrollLeft:0,scrollTop:0},h=Fr(1);const l=Fr(0),c=tn(r);if((c||!c&&!a)&&(("body"!==Gr(r)||rn(o))&&(u=fn(r)),c)){const t=Cn(r);h=yn(r),l.x=t.x+r.clientLeft,l.y=t.y+r.clientTop}const d=!o||c||a?Fr(0):zn(o,u);return{width:i.width*h.x,height:i.height*h.y,x:i.x*h.x-u.scrollLeft*h.x+l.x+d.x,y:i.y*h.y-u.scrollTop*h.y+l.y+d.y}},getDocumentElement:Zr,getClippingRect:function(t){let{element:e,boundary:i,rootBoundary:r,strategy:n}=t;const a=[..."clippingAncestors"===i?an(e)?[]:function(t,e){const i=e.get(t);if(i)return i;let r=mn(t,[],!1).filter((t=>Jr(t)&&"body"!==Gr(t))),n=null;const a="fixed"===pn(t).position;let o=a?bn(t):t;for(;Jr(o)&&!dn(o);){const e=pn(o),i=ln(o);i||"fixed"!==e.position||(n=null),(a?!i&&!n:!i&&"static"===e.position&&n&&("absolute"===n.position||"fixed"===n.position)||rn(o)&&!i&&Fn(t,o))?r=r.filter((t=>t!==o)):n=e,o=bn(o)}return e.set(t,r),r}(e,this._c):[].concat(i),r],o=En(e,a[0],n);let s=o.top,u=o.right,h=o.bottom,l=o.left;for(let t=1;t<a.length;t++){const i=En(e,a[t],n);s=Dr(i.top,s),u=Cr(i.right,u),h=Cr(i.bottom,h),l=Dr(i.left,l)}return{width:u-l,height:h-s,x:l,y:s}},getOffsetParent:Tn,getElementRects:async function(t){const e=this.getOffsetParent||Tn,i=this.getDimensions,r=await i(t.floating);return{reference:Mn(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(t){return Array.from(t.getClientRects())},getDimensions:function(t){const{width:e,height:i}=wn(t);return{width:e,height:i}},getScale:yn,isElement:Jr,isRTL:function(t){return"rtl"===pn(t).direction}};function _n(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}const Ln=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:i,y:r,placement:n,platform:a}=e,{mainAxis:o=!0,crossAxis:s=!1,limiter:u={fn:t=>{let{x:e,y:i}=t;return{x:e,y:i}}},...h}=Sr(t,e),l={x:i,y:r},c=await a.detectOverflow(e,h),d=Or(Tr(n)),p=_r(d);let f=l[p],b=l[d];o&&(f=Br(f+c["y"===p?"top":"left"],f,f-c["y"===p?"bottom":"right"])),s&&(b=Br(b+c["y"===d?"top":"left"],b,b-c["y"===d?"bottom":"right"]));const g=u.fn({...e,[p]:f,[d]:b});return{...g,data:{x:g.x-i,y:g.y-r,enabled:{[p]:o,[d]:s}}}}}},On=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var i,r;const{placement:n,middlewareData:a,rects:o,initialPlacement:s,platform:u,elements:h}=e,{mainAxis:l=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:b=!0,...g}=Sr(t,e);if(null!=(i=a.arrow)&&i.alignmentOffset)return{};const m=Tr(n),v=Or(s),w=Tr(s)===s,x=await(null==u.isRTL?void 0:u.isRTL(h.floating)),y=d||(w||!b?[Vr(s)]:function(t){const e=Vr(t);return[Ir(t),e,Ir(e)]}(s)),k="none"!==f;!d&&k&&y.push(...function(t,e,i,r){const n=jr(t);let a=function(t,e,i){switch(t){case"top":case"bottom":return i?e?Nr:Rr:e?Rr:Nr;case"left":case"right":return e?qr:$r;default:return[]}}(Tr(t),"start"===i,r);return n&&(a=a.map((t=>t+"-"+n)),e&&(a=a.concat(a.map(Ir)))),a}(s,b,f,x));const A=[s,...y],C=await u.detectOverflow(e,g),D=[];let z=(null==(r=a.flip)?void 0:r.overflows)||[];if(l&&D.push(C[m]),c){const t=function(t,e,i){void 0===i&&(i=!1);const r=jr(t),n=Pr(t),a=Lr(n);let o="x"===n?r===(i?"end":"start")?"right":"left":"start"===r?"bottom":"top";return e.reference[a]>e.floating[a]&&(o=Vr(o)),[o,Vr(o)]}(n,o,x);D.push(C[t[0]],C[t[1]])}if(z=[...z,{placement:n,overflows:D}],!D.every((t=>t<=0))){var E,F;const t=((null==(E=a.flip)?void 0:E.index)||0)+1,e=A[t];if(e&&("alignment"!==c||v===Or(e)||z.every((t=>Or(t.placement)!==v||t.overflows[0]>0))))return{data:{index:t,overflows:z},reset:{placement:e}};let i=null==(F=z.filter((t=>t.overflows[0]<=0)).sort(((t,e)=>t.overflows[1]-e.overflows[1]))[0])?void 0:F.placement;if(!i)switch(p){case"bestFit":{var M;const t=null==(M=z.filter((t=>{if(k){const e=Or(t.placement);return e===v||"y"===e}return!0})).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:M[0];t&&(i=t);break}case"initialPlacement":i=s}if(n!==i)return{reset:{placement:i}}}return{}}}},Pn=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){var i,r;const{placement:n,rects:a,platform:o,elements:s}=e,{apply:u=()=>{},...h}=Sr(t,e),l=await o.detectOverflow(e,h),c=Tr(n),d=jr(n),p="y"===Or(n),{width:f,height:b}=a.floating;let g,m;"top"===c||"bottom"===c?(g=c,m=d===(await(null==o.isRTL?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(m=c,g="end"===d?"top":"bottom");const v=b-l.top-l.bottom,w=f-l.left-l.right;let x=Cr(b-l[g],v),y=Cr(f-l[m],w);if(null!=(i=e.middlewareData.shift)&&i.enabled.x&&(y=w),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(x=v),!e.middlewareData.shift&&!d){const t=Dr(l.left,0),e=Dr(l.right,0),i=Dr(l.top,0),r=Dr(l.bottom,0);p?y=f-2*(0!==t||0!==e?t+e:Dr(l.left,l.right)):x=b-2*(0!==i||0!==r?i+r:Dr(l.top,l.bottom))}await u({...e,availableWidth:y,availableHeight:x});const k=await o.getDimensions(s.floating);return f!==k.width||b!==k.height?{reset:{rects:!0}}:{}}}},In=class{constructor(e){t(this,e),this.selected=n(this,"selected"),this.searchTermInput=n(this,"searchTermInput"),e.$hostElement$["s-ei"]?this.internals=e.$hostElement$["s-ei"]:(this.internals=e.$hostElement$.attachInternals(),e.$hostElement$["s-ei"]=this.internals),this.label="",this.placeholder="",this.value="",this.mode="default",this.size="medium",this.status="default",this.disabled=!1,this.required=!1,this.searchBehavior=!1,this.caseSensitive=!0,this.maxHeight="285px",this.isHovered=!1,this.isFocused=!1,this.isOpen=!1,this.isPositioned=!1,this.menuStyle={top:"0px",left:"0px",width:"0px",maxHeight:this.maxHeight},this.activeIndex=-1,this.preferredPlacement="bottom",this.textInput="",this.floatingPlacement="bottom-start",this.styles={},this.theme=window.CuraAPI.theme,this.handleMutations=t=>{t.forEach((t=>{"attributes"===t.type&&"selected"===t.attributeName&&this.updateSelectedOption()}))},this.onOptiselected=t=>{const e=t.target;this.clearSelectedAttributes(),e.setAttribute("selected","true")},this.handleKeyNavigation=t=>{var e;const{code:i}=t;if(!this.isOpen&&"ArrowDown"===i)return this.openMenu(),void(this.activeIndex=0);"ArrowDown"===i&&(t.preventDefault(),this.updateActiveIndex(1)),"ArrowUp"===i&&(t.preventDefault(),this.updateActiveIndex(-1)),"Enter"!==i&&"Space"!==i||null===(e=this.options[this.activeIndex])||void 0===e||e.click(),"Escape"===i&&this.closeMenu()},this.handleInputChange=t=>{this.textInput=t.target.value,this.searchBehavior&&(this.textInput.length>0&&!this.isOpen&&this.openMenu(),0===this.textInput.length&&this.isOpen&&this.closeMenu()),this.internals.setFormValue(this.textInput)},this.handleClick=t=>this.disabled?t.preventDefault():"CURA-SELECT-OPTION"===t.target.tagName?this.onOptiselected(t):void(this.isOpen?this.closeMenu():this.openMenu()),this.handleClickOutside=t=>{const e=t.composedPath&&t.composedPath()||[];!(e.includes(this.host)||this.menuElement&&e.includes(this.menuElement))&&this.closeMenu()},this.handleViewportChange=()=>{this.isOpen&&this.updateMenuPosition()}}updateOptionHighlights(t){this.options.forEach(((e,i)=>e.active=i===t))}filterOptions(t){if(this.searchTermInput.emit(t),!this.isOpen||!this.searchBehavior)return;const e=t=>t.normalize("NFD").replace(/[\u0300-\u036f]/g,"");let i=t;this.caseSensitive||(i=e(i).toLocaleLowerCase()),this.options.forEach((t=>{let r=t.textContent||"";this.caseSensitive||(r=e(null==r?void 0:r.toLowerCase()));const n=r.includes(i);t.style.display=n?"block":"none"}))}formAssociatedCallback(t){t.ariaLabel=this.label}formStateRestoreCallback(t){this.textInput=t.value,this.updateSelectedOption()}formResetCallback(){this.textInput="",this.clearSelectedAttributes(),this.internals.setFormValue(""),this.internals.setValidity({})}formDisabledCallback(t){this.disabled=t}componentWillLoad(){this.initializeOptions()}componentDidLoad(){this.setupMutationObserver(),this.addOutsideClickListener(),this.addPositionListeners()}connectedCallback(){this.applyStyles()}disconnectedCallback(){var t,e;null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.removeOutsideClickListener(),this.removePositionListeners(),null===(e=this.cleanupAutoUpdate)||void 0===e||e.call(this)}initializeOptions(){var t;this.options=this.host.querySelectorAll("cura-select-option"),this.options.forEach((t=>{t.setAttribute("size",this.size);const e=this.value===t.value;t.setAttribute("selected",JSON.stringify(e)),e&&(this.value=t.value,this.internals.setFormValue(t.value))})),this.textInput=(null===(t=Array.from(this.options).find((t=>t.value===this.value)))||void 0===t?void 0:t.textContent)||this.textInput}applyStyles(){const{fonts:t,colors:e}=this.theme,i=t.getWeights();this.styles=Object.assign(Object.assign({},this.styles),{"--font-weight-medium":i.medium,"--font-weight-bold":i.bold,"--font-weight-regular":i.regular,"--font-color":t.getColor(),"--font-family":t.getFamily(),"--font-size":t.getSize()}),["primary-base","neutral-purewhite","neutral-white","neutral-black","neutral-medium","neutral-light","neutral-base","neutral-dark","success-dark","success-darker","success-lighter","error-lighter","error-dark","error-darker","error-base","info-base"].forEach((t=>{this.styles[`--${t}`]=e.getColor(t)}))}setupMutationObserver(){this.mutationObserver=new MutationObserver(this.handleMutations),this.mutationObserver.observe(this.host,{attributes:!0,subtree:!0,attributeFilter:["selected","value"]})}handleValueChange(t){this.clearSelectedAttributes();const e=this.host.querySelector(`cura-select-option[value="${t}"]`);e&&e.setAttribute("selected","true")}updateSelectedOption(){const t=this.host.querySelector("cura-select-option[selected]");t&&(this.value=t.value,this.internals.setFormValue(this.value),this.textInput!==t.textContent&&(this.textInput=t.textContent,this.closeMenu(),this.selected.emit(t.value)))}clearSelectedAttributes(){this.options.forEach((t=>t.removeAttribute("selected")))}updateActiveIndex(t){0!==this.options.length&&(this.activeIndex=(this.activeIndex+t+this.options.length)%this.options.length)}getClasses(){return{wrapper:!0,label:!!this.label,disabled:this.disabled,transparent:"transparent"===this.mode,[this.size.toLowerCase()]:!0,[this.status.toLowerCase()]:!0}}getColor(t){if(this.disabled)return"neutral-medium";const e="default"===this.status,i=this.isFocused||this.isHovered;return"label"===t?!e||i?"neutral-black":"neutral-dark":i&&e?"neutral-black":"success"===this.status?"success-dark":"error"===this.status?"error-dark":"neutral-dark"}renderIcon(){return"default"!==this.status||this.iconName?e("cura-icon",{class:"feedback-icon",name:{default:this.iconName,success:"checkCircle",error:"alertCircle"}[this.status],iconset:"default",size:"large"===this.size?20:16,color:this.getColor("icon"),style:this.styles}):null}openMenu(){this.isOpen=!0,this.isPositioned=!1,requestAnimationFrame((()=>this.setupFloating()))}closeMenu(){var t;this.isOpen=!1,this.isPositioned=!1,null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this)}addOutsideClickListener(){document.addEventListener("click",this.handleClickOutside)}removeOutsideClickListener(){document.removeEventListener("click",this.handleClickOutside)}addPositionListeners(){window.addEventListener("resize",this.handleViewportChange,{passive:!0}),window.addEventListener("scroll",this.handleViewportChange,!0)}removePositionListeners(){window.removeEventListener("resize",this.handleViewportChange),window.removeEventListener("scroll",this.handleViewportChange,!0)}parseMaxHeight(){const t=parseFloat(this.maxHeight);return Number.isFinite(t)?t:285}setupFloating(){var t;this.inputWrapper&&this.menuElement&&(null===(t=this.cleanupAutoUpdate)||void 0===t||t.call(this),this.cleanupAutoUpdate=function(t,e,i,r){void 0===r&&(r={});const{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:o="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,h=xn(t),l=n||a?[...h?mn(h):[],...e?mn(e):[]]:[];l.forEach((t=>{n&&t.addEventListener("scroll",i,{passive:!0}),a&&t.addEventListener("resize",i)}));const c=h&&s?function(t,e){let i,r=null;const n=Zr(t);function a(){var t;clearTimeout(i),null==(t=r)||t.disconnect(),r=null}return function o(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),a();const h=t.getBoundingClientRect(),{left:l,top:c,width:d,height:p}=h;if(s||e(),!d||!p)return;const f={rootMargin:-Er(c)+"px "+-Er(n.clientWidth-(l+d))+"px "+-Er(n.clientHeight-(c+p))+"px "+-Er(l)+"px",threshold:Dr(0,Cr(1,u))||1};let b=!0;function g(e){const r=e[0].intersectionRatio;if(r!==u){if(!b)return o();r?o(!1,r):i=setTimeout((()=>{o(!1,1e-7)}),1e3)}1!==r||_n(h,t.getBoundingClientRect())||o(),b=!1}try{r=new IntersectionObserver(g,{...f,root:n.ownerDocument})}catch(t){r=new IntersectionObserver(g,f)}r.observe(t)}(!0),a}(h,i):null;let d,p=-1,f=null;o&&(f=new ResizeObserver((t=>{let[r]=t;r&&r.target===h&&f&&e&&(f.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var t;null==(t=f)||t.observe(e)}))),i()})),h&&!u&&f.observe(h),e&&f.observe(e));let b=u?Cn(t):null;return u&&function e(){const r=Cn(t);b&&!_n(b,r)&&i(),b=r,d=requestAnimationFrame(e)}(),i(),()=>{var t;l.forEach((t=>{n&&t.removeEventListener("scroll",i),a&&t.removeEventListener("resize",i)})),null==c||c(),null==(t=f)||t.disconnect(),f=null,u&&cancelAnimationFrame(d)}}(this.inputWrapper,this.menuElement,(()=>{this.updateMenuPosition()})),this.updateMenuPosition())}updateMenuPosition(){var t;this.inputWrapper&&this.menuElement&&((t,e,i)=>{const r=new Map,n={platform:jn,...i},a={...n.platform,_c:r};return(async(t,e,i)=>{const{placement:r="bottom",strategy:n="absolute",middleware:a=[],platform:o}=i,s=o.detectOverflow?o:{...o,detectOverflow:Yr},u=await(null==o.isRTL?void 0:o.isRTL(e));let h=await o.getElementRects({reference:t,floating:e,strategy:n}),{x:l,y:c}=Hr(h,r,u),d=r,p=0;const f={};for(let i=0;i<a.length;i++){const b=a[i];if(!b)continue;const{name:g,fn:m}=b,{x:v,y:w,data:x,reset:y}=await m({x:l,y:c,initialPlacement:r,placement:d,strategy:n,middlewareData:f,rects:h,platform:s,elements:{reference:t,floating:e}});l=null!=v?v:l,c=null!=w?w:c,f[g]={...f[g],...x},y&&p<50&&(p++,"object"==typeof y&&(y.placement&&(d=y.placement),y.rects&&(h=!0===y.rects?await o.getElementRects({reference:t,floating:e,strategy:n}):y.rects),({x:l,y:c}=Hr(h,d,u))),i=-1)}return{x:l,y:c,placement:d,strategy:n,middlewareData:f}})(t,e,{...n,platform:a})})(this.inputWrapper,this.menuElement,{strategy:"fixed",placement:this.floatingPlacement,middleware:[(t=0,void 0===t&&(t=0),{name:"offset",options:t,async fn(e){var i,r;const{x:n,y:a,placement:o,middlewareData:s}=e,u=await async function(t,e){const{placement:i,platform:r,elements:n}=t,a=await(null==r.isRTL?void 0:r.isRTL(n.floating)),o=Tr(i),s=jr(i),u="y"===Or(i),h=Qr.has(o)?-1:1,l=a&&u?-1:1,c=Sr(e,t);let{mainAxis:d,crossAxis:p,alignmentAxis:f}="number"==typeof c?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&"number"==typeof f&&(p="end"===s?-1*f:f),u?{x:p*l,y:d*h}:{x:d*h,y:p*l}}(e,t);return o===(null==(i=s.offset)?void 0:i.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:n+u.x,y:a+u.y,data:{...u,placement:o}}}}),On(),Ln({padding:8}),Pn({apply:({rects:t,availableHeight:e})=>{this.menuStyle=Object.assign(Object.assign({},this.menuStyle),{width:`${t.reference.width}px`,maxHeight:`${Math.min(e,this.parseMaxHeight())}px`})}})]}).then((({x:t,y:e,placement:i})=>{this.preferredPlacement=i.startsWith("top")?"top":"bottom",this.menuStyle=Object.assign(Object.assign({},this.menuStyle),{top:`${e}px`,left:`${t}px`}),this.isPositioned=!0}))}render(){return e(i,{key:"7621641772e6c166b5359346f0d0681a614c1f5c",style:this.styles,role:"combobox","aria-label":this.label,"aria-required":String(this.required),"aria-disabled":String(this.disabled),"aria-invalid":String("error"===this.status)},e("div",{key:"7cc11beb3a10ada937c4668fdfcdb98b380200e0",class:this.getClasses(),onMouseEnter:()=>this.isHovered=!0,onMouseLeave:()=>this.isHovered=!1,onClick:this.handleClick},this.label&&e("cura-label",{key:"d10426c84bb97db84074430f537293407f7afa05",class:"label",weight:"bold",size:"large"===this.size?"small":"xsmall",color:this.getColor("label")},this.label," ",this.required&&e("span",{key:"82808b9add65b3c6abf03e56fe63dccd574229f3",class:"required"},"* ")),e("div",{key:"e37b1468d0bf2bdac3f1c2096c22840fe7e0eced",class:{"cura-input-field":!0,open:this.isOpen},ref:t=>this.inputWrapper=t},this.renderIcon(),e("input",{key:"7fabd1a5fc59c479ea09d95f7552f49f8448125e",type:"text",autocomplete:"off",onFocus:()=>this.isFocused=!0,onBlur:()=>this.isFocused=!1,onKeyDown:this.handleKeyNavigation,"aria-required":String(this.required),"aria-disabled":String(this.disabled),"aria-invalid":String("error"===this.status),onInput:this.handleInputChange,style:this.styles,placeholder:this.placeholder,disabled:this.disabled,required:this.required,value:this.textInput,readonly:!this.searchBehavior||null}),e("button",{key:"9fa767799517d3872d60e33a9d71562bfe24d0c5",class:"up-down-button"},e("cura-icon",{key:"2299a69d28c72eba5f2a18faa87c653226105034",name:this.isOpen?"up":"down",class:"up-down-icon",color:this.disabled?"neutral-dark":"primary-base",size:16,iconset:"default"}))),e("cura-label",{key:"6c88858d35cdf9c756b9ee7d9e93f5ff0596e372",class:"helper-text",size:"xsmall",color:this.getColor("text"),weight:"transparent"===this.mode?"bold":"regular"},e("slot",{key:"55a075d118ba10f7921d6cf13331c7c0a0ddae46"})),this.isOpen&&e("div",{key:"d36637fb50aeefbb10991dd2fa8212886293fff3",class:{menu:!0,open:this.isOpen,[this.preferredPlacement]:!0},ref:t=>this.menuElement=t,style:{"--max-height":this.maxHeight,top:this.menuStyle.top,left:this.menuStyle.left,width:this.menuStyle.width,maxHeight:this.menuStyle.maxHeight,visibility:this.isPositioned?"visible":"hidden",opacity:this.isPositioned?"1":"0",pointerEvents:this.isPositioned?"auto":"none"}},e("slot",{key:"399d62fd686ed4c0a0729d336a3502b53918e371",name:"option"}))))}static get formAssociated(){return!0}get host(){return r(this)}static get watchers(){return{activeIndex:[{updateOptionHighlights:0}],textInput:[{filterOptions:0}],value:[{handleValueChange:0}]}}};In.style=":host{display:block;position:relative;font-family:var(--font-family)}.wrapper{width:100%;user-select:none;text-align:left !important}.wrapper cura-label{margin-bottom:8px}.wrapper .helper-text{margin-top:8px;color:var(--neutral-dark)}.wrapper .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.wrapper .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper .cura-input-field .feedback-icon{padding-left:12px}.wrapper .cura-input-field .up-down-icon{order:3;padding-right:6px;cursor:pointer;pointer-events:all}.wrapper .cura-input-field .up-down-button{background-color:transparent;border:none}.wrapper .cura-input-field input{padding:0px 12px 0px 8px;cursor:pointer}.wrapper .cura-input-field.open{border-radius:4px 4px 0 0 !important}.wrapper.transparent{background-color:transparent;padding:0px;max-height:80px}.wrapper.transparent .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;background-color:transparent !important;border:none !important;border-radius:0;height:27px}.wrapper.transparent .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.wrapper.transparent .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.transparent .cura-input-field .feedback-icon{padding-left:12px}.wrapper.transparent .cura-input-field input{color:var(--neutral-black) !important;font-size:16px;font-weight:var(--font-weight-bold) !important;padding:0}.wrapper.transparent .cura-input-field input::placeholder{color:var(--neutral-black)}.wrapper.transparent .cura-input-field .feedback-icon{order:3;margin:0 20px 0 0}.wrapper.transparent:focus-within .cura-input-field{border:none !important;background-color:transparent !important}.wrapper.transparent:focus-within .cura-input-field input{border:none !important;outline:none}.wrapper.transparent .helper-text{margin-top:0px}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field{border-color:var(--neutral-dark)}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input{color:var(--neutral-dark)}.wrapper:hover:not(.disabled):not(.isLoading):not(.success):not(.error):not(.isFocused):not(.readOnly):not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper:focus-within:not(.selection) .cura-input-field{border:2px solid var(--info-base) !important;background-color:var(--neutral-purewhite);outline:none}.wrapper:focus-within:not(.selection) .cura-input-field input{color:var(--neutral-black) !important}.wrapper:focus-within.selection .cura-input-field{border-radius:4px 4px 0px 0px}.wrapper.success .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.success .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.wrapper.success .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.success .cura-input-field .feedback-icon{padding-left:12px}.wrapper.success .cura-input-field input{color:var(--success-darker) !important}.wrapper.success .cura-input-field input::placeholder{color:var(--success-darker) !important}.wrapper.success:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--success-dark) !important;background-color:var(--success-lighter) !important}.wrapper.success:not(.transparent) .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.wrapper.success:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.success:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.wrapper.error .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box}.wrapper.error .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.wrapper.error .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.error .cura-input-field .feedback-icon{padding-left:12px}.wrapper.error .cura-input-field input{color:var(--error-darker) !important}.wrapper.error .cura-input-field input::placeholder{color:var(--error-darker) !important}.wrapper.error:not(.transparent) .cura-input-field{width:100%;height:40px;display:flex;flex-direction:row;align-items:center;background-color:var(--neutral-purewhite);border:2px solid var(--neutral-medium);border-radius:4px;color:var(--primary-base);letter-spacing:0.32px;line-height:20px;overflow:hidden;box-sizing:border-box;border:2px solid var(--error-dark) !important;background-color:var(--error-lighter) !important}.wrapper.error:not(.transparent) .cura-input-field input{flex:1;width:100%;height:100%;background:transparent;border:none;outline:none;color:var(--neutral-dark);font-family:var(--font-family);font-weight:var(--font-weight-medium);font-size:14px;box-sizing:border-box;padding:0px 12px 0px 8px}.wrapper.error:not(.transparent) .cura-input-field input::placeholder{color:var(--neutral-dark)}.wrapper.error:not(.transparent) .cura-input-field .feedback-icon{padding-left:12px}.wrapper.disabled .cura-input-field{background-color:var(--neutral-white);border:2px solid var(--neutral-base)}.wrapper.disabled .cura-input-field input{color:var(--neutral-medium)}.wrapper.disabled .cura-input-field input::placeholder{color:var(--neutral-medium)}.required{color:red}.menu{position:fixed;left:0;top:0;box-sizing:border-box;background:#fff;border:2px solid var(--neutral-light);border-radius:4px;z-index:1000;max-height:var(--max-height);overflow:hidden;border-top:transparent;align-items:center;scrollbar-color:var(--neutral-medium) var(--neutral-black-20);overflow-y:auto;box-shadow:0px 4px 8px 0px rgba(38, 38, 38, 0.16)}.menu.open{border-radius:0 !important;padding:12px}";const Rn=class{constructor(e){t(this,e),this.selected=!1,this.active=!1,this.size="small",this.styles={},this.theme=window.CuraAPI.theme}connectedCallback(){[{name:"--primary-lighter-50",theme:"primary-lighter",opacity:.5},{name:"--primary-light",theme:"primary-light"},{name:"--neutral-light",theme:"neutral-light"},{name:"--neutral-purewhite",theme:"neutral-purewhite"}].forEach((t=>this.styles=Object.assign(Object.assign({},this.styles),{[t.name]:this.theme.colors.getColor(t.theme,null==t?void 0:t.opacity)})))}getSize(t){const e={large:"label"===t?"medium":20,medium:"label"===t?"small":16,small:"label"===t?"xsmall":"micro"};return e[this.size]||e.medium}getClasses(){return{item:!0,selected:this.selected,active:this.active}}render(){return e(i,{key:"351cadffe0228ba5af1a9d6019c8dece886061c6",slot:"option",role:"option","aria-selected":this.selected},e("div",{key:"0bbe81fd481f3d7d83e42bcbeb69c8b88ce23804",class:this.getClasses(),style:this.styles},e("cura-label",{key:"fa4ae11397845ed517f756fd4537f80bb7580e4f",color:this.selected?"primary-base":"neutral-black",size:this.getSize("label"),"margin-block":"0"},e("slot",{key:"c3b653b8a65d3b7afe0253fd9aafe922fdaebcfc"})),this.selected&&e("cura-icon",{key:"d7420da36a93c1f873ac79e6d55e1fa697a4eaad",name:"check",size:this.getSize("icon"),color:"primary-base"})))}get host(){return r(this)}static get watchers(){return{size:[{getSize:0}]}}};Rn.style=":host{display:block}.item{display:flex;padding:12px 8px;cursor:pointer;justify-content:space-between;align-items:center;box-sizing:border-box;background:var(--neutral-purewhite);border-bottom:1px solid transparent}.item.selected{background-color:var(--primary-lighter-50);border-bottom:1px solid var(--primary-light)}.item:hover:not(.selected){background:var(--neutral-white)}.item:hover:not(.selected){border-bottom:1px solid var(--neutral-light)}.item.active{background:var(--neutral-white) !important}.item.active{border-bottom:1px solid var(--neutral-light)}.item.selected.active{background-color:var(--primary-lighter-50) !important;box-shadow:none}:host(:last-of-type) .item{border-bottom:none}:host(:last-of-type) .item:hover,:host(:last-of-type) .item.active,:host(:last-of-type) .item.selected{border-bottom:none}";const Nn=class{constructor(e){t(this,e),this.tabSelect=n(this,"tabSelect"),this.selected=!1,this.disabled=!1,this.borderBottom=!0,this.size="large",this.colorMode="light",this.hovered=!1,this.styles={}}setColors(){[{name:"--background-color-selected",theme:"light"===this.colorMode?"primary-base":"primary-lighter"},{name:"--background-color-hover",theme:"light"===this.colorMode?"primary-lighter":null},{name:"--background-disabled-selected",theme:"light"===this.colorMode?"neutral-pale":"neutral-black"},{name:"--border-bottom-color",theme:"light"===this.colorMode?"neutral-base":"primary"}].forEach((t=>{t.theme&&(this.styles[t.name]=window.CuraAPI.theme.colors.getColor(t.theme))})),this.styles=Object.assign({},this.styles)}computeContentColor(){return this.disabled?"neutral-dark":"dark"===this.colorMode?this.hovered&&!this.selected?"neutral-purewhite":this.selected?"neutral-black":"primary-lighter":this.selected?"neutral-purewhite":"primary-dark"}updateDynamicStyles(){"dark"===this.colorMode&&this.hovered&&!this.selected&&(this.styles=Object.assign(Object.assign({},this.styles),{"--border-bottom-color":window.CuraAPI.theme.colors.getColor("neutral-purewhite")}))}getIcon(){if(!this.iconName)return"";const t="large"===this.size?20:16,i=this.computeContentColor();return e("cura-icon",{name:this.iconName,size:t,color:i})}getClasses(){return{[this.size]:!0,[this.colorMode]:!0,selected:this.selected,disabled:this.disabled,"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--primary-dark":window.CuraAPI.theme.colors.getColor("primary-dark"),"--neutral-purewhite":window.CuraAPI.theme.colors.getColor("neutral-purewhite"),"--base-spacing":window.CuraAPI.theme.spacing.getSpacing()}),this.setColors()}handleMouseEnter(){this.disabled||(this.hovered=!0)}handleMouseLeave(){this.hovered=!1}handleClick(t){this.disabled?t.preventDefault():(this.selected=!this.selected,this.tabSelect.emit({name:this.name}))}render(){const t=m[this.size]||m.default,r=this.computeContentColor();return this.updateDynamicStyles(),e(i,{key:"d12ccbd8e900c1a21dfee2ee7363e167772acad4",role:"button","aria-pressed":this.selected,"aria-disabled":this.disabled},e("button",{key:"2e77d02614e38baaca599d7830f5ba4dcb048519",class:this.getClasses(),style:this.styles,onClick:t=>this.handleClick(t),disabled:this.disabled,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this)},this.getIcon(),e("cura-label",{key:"343f0d566d70ea2f132ea55ca588c57cb2ce20f2",size:t,color:r,lineHeight:"0",marginBlock:"0"},e("slot",{key:"9acebd9e763f88d698ca6c0a08e97c3960701730"}))))}static get watchers(){return{colorMode:[{setColors:0}]}}};Nn.style=":host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:transparent;box-sizing:border-box;border:none;min-width:120px;width:fit-content;display:flex;align-items:center;justify-content:center;border-radius:4px 4px 0 0}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button.border-bottom,:host a.border-bottom{border-bottom:1px solid var(--border-bottom-color)}:host button:not(.disabled,.selected):hover,:host a:not(.disabled,.selected):hover{background-color:var(--background-color-hover)}:host button:not(.disabled,.selected):hover.light,:host a:not(.disabled,.selected):hover.light{border-bottom-color:var(--primary-dark)}:host button:not(.disabled,.selected):hover.dark,:host a:not(.disabled,.selected):hover.dark{border-bottom-color:var(--neutral-purewhite)}:host button.small,:host a.small{padding:calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px)}:host button.medium,:host a.medium{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px)}:host button.large,:host a.large{padding:calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px)}:host button:focus,:host a:focus{border:2px solid var(--primary-light)}:host button cura-icon,:host a cura-icon{margin-right:calc(var(--cura-spacing-base) * 2px)}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--background-color-selected)}:host button.selected.disabled,:host a.selected.disabled{background-color:var(--background-disabled-selected)}:host button.disabled,:host a.disabled{cursor:not-allowed}";const qn=class{constructor(e){t(this,e),this.tabChange=n(this,"tabChange"),this.gap=0,this.borderBottom=!0,this.colorMode="light",this.styles={}}handleTabSelect(t){this.updateSelectedTab(t.detail.name)}updateSelectedTab(t){this.host.querySelectorAll("cura-tabs, cura-tabs-transparent, cura-tabs-button").forEach((e=>{e.selected=e.name===t}))}getClasses(){return{"border-bottom":this.borderBottom}}connectedCallback(){this.styles=Object.assign(Object.assign({},this.styles),{"--border-color":window.CuraAPI.theme.colors.getColor("light"===this.colorMode?"neutral-base":"primary-base"),"--gap":`${this.gap}px`})}render(){return e(i,{key:"1a2babd4b23b2f54644cfe9d0129736c897f50c3",role:"tablist",style:this.styles,class:this.getClasses()},e("slot",{key:"ba78df56f01619de8df14cbfde08dd501b15048e"}))}get host(){return r(this)}};qn.style=':host{display:flex;gap:var(--gap)}:host(.border-bottom){position:relative}:host(.border-bottom)::after{content:"";position:absolute;bottom:0;left:0;right:0;height:1px;background:var(--border-color);z-index:0}::slotted(cura-tabs),::slotted(cura-tabs-transparent){position:relative;z-index:1}';export{v as cura_accordion,w as cura_accordion_item,y as cura_avatar,k as cura_badge_distance,A as cura_button,C as cura_button_transparent,Fi as cura_calendar,Mi as cura_card,Si as cura_dropdown_search,Ti as cura_dropdown_search_category,ji as cura_dropdown_search_option,_i as cura_heading,Li as cura_icon,wr as cura_input_text,xr as cura_label,yr as cura_loader_circle,kr as cura_page_template,Ar as cura_paragraph,In as cura_select,Rn as cura_select_option,Nn as cura_tabs,qn as cura_tabs_group}