@haiilo/catalyst 10.32.2 → 10.33.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,5 +6,5 @@ import{r as t,h as e,H as a,g as i,c as r}from"./p-c3a9aef7.js";import{e as n,O
6
6
  /*!
7
7
  * focus-trap 7.6.4
8
8
  * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
9
- */function Zr(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,i=Array(e);a<e;a++)i[a]=t[a];return i}function Xr(t){if(Array.isArray(t))return Zr(t)}function Qr(t,e,a){return(e=cn(e))in t?Object.defineProperty(t,e,{value:a,enumerable:true,configurable:true,writable:true}):t[e]=a,t}function tn(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function en(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function an(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function rn(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?an(Object(a),true).forEach((function(e){Qr(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):an(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function nn(t){return Xr(t)||tn(t)||sn(t)||en()}function on(t,e){if("object"!=typeof t||!t)return t;var a=t[Symbol.toPrimitive];if(undefined!==a){var i=a.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function cn(t){var e=on(t,"string");return"symbol"==typeof e?e:e+""}function sn(t,e){if(t){if("string"==typeof t)return Zr(t,e);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Zr(t,e):undefined}}var ln={activateTrap:function t(e,a){if(e.length>0){var i=e[e.length-1];if(i!==a){i._setPausedState(true)}}var r=e.indexOf(a);if(r===-1){e.push(a)}else{e.splice(r,1);e.push(a)}},deactivateTrap:function t(e,a){var i=e.indexOf(a);if(i!==-1){e.splice(i,1)}if(e.length>0&&!e[e.length-1]._isManuallyPaused()){e[e.length-1]._setPausedState(false)}}};var dn=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var hn=function t(e){return(e===null||e===undefined?undefined:e.key)==="Escape"||(e===null||e===undefined?undefined:e.key)==="Esc"||(e===null||e===undefined?undefined:e.keyCode)===27};var un=function t(e){return(e===null||e===undefined?undefined:e.key)==="Tab"||(e===null||e===undefined?undefined:e.keyCode)===9};var fn=function t(e){return un(e)&&!e.shiftKey};var pn=function t(e){return un(e)&&e.shiftKey};var bn=function t(e){return setTimeout(e,0)};var mn=function t(e){for(var a=arguments.length,i=new Array(a>1?a-1:0),r=1;r<a;r++){i[r-1]=arguments[r]}return typeof e==="function"?e.apply(undefined,i):e};var gn=function t(e){return e.target.shadowRoot&&typeof e.composedPath==="function"?e.composedPath()[0]:e.target};var vn=[];var yn=function t(e,a){var i=(a===null||a===undefined?undefined:a.document)||document;var r=(a===null||a===undefined?undefined:a.trapStack)||vn;var n=rn({returnFocusOnDeactivate:true,escapeDeactivates:true,delayInitialFocus:true,isKeyForward:fn,isKeyBackward:pn},a);var o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:false,paused:false,manuallyPaused:false,delayInitialFocusTimer:undefined,recentNavEvent:undefined};var c;var s=function t(e,a,i){return e&&e[a]!==undefined?e[a]:n[i||a]};var l=function t(e,a){var i=typeof(a===null||a===undefined?undefined:a.composedPath)==="function"?a.composedPath():undefined;return o.containerGroups.findIndex((function(t){var a=t.container,r=t.tabbableNodes;return a.contains(e)||(i===null||i===undefined?undefined:i.includes(a))||r.find((function(t){return t===e}))}))};var d=function t(e){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=a.hasFallback,o=r===undefined?false:r,c=a.params,s=c===undefined?[]:c;var l=n[e];if(typeof l==="function"){l=l.apply(undefined,nn(s))}if(l===true){l=undefined}if(!l){if(l===undefined||l===false){return l}throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var d=l;if(typeof l==="string"){try{d=i.querySelector(l)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!d){if(!o){throw new Error("`".concat(e,"` as selector refers to no known node"))}}}return d};var h=function t(){var e=d("initialFocus",{hasFallback:true});if(e===false){return false}if(e===undefined||e&&!ra(e,n.tabbableOptions)){if(l(i.activeElement)>=0){e=i.activeElement}else{var a=o.tabbableGroups[0];var r=a&&a.firstTabbableNode;e=r||d("fallbackFocus")}}else if(e===null){e=d("fallbackFocus")}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var u=function t(){o.containerGroups=o.containers.map((function(t){var e=ta(t,n.tabbableOptions);var a=ea(t,n.tabbableOptions);var i=e.length>0?e[0]:undefined;var r=e.length>0?e[e.length-1]:undefined;var o=a.find((function(t){return aa(t)}));var c=a.slice().reverse().find((function(t){return aa(t)}));var s=!!e.find((function(t){return Oe(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:a,posTabIndexesFound:s,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:c,nextTabbableNode:function t(i){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var n=e.indexOf(i);if(n<0){if(r){return a.slice(a.indexOf(i)+1).find((function(t){return aa(t)}))}return a.slice(0,a.indexOf(i)).reverse().find((function(t){return aa(t)}))}return e[n+(r?1:-1)]}}}));o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0}));if(o.tabbableGroups.length<=0&&!d("fallbackFocus")){throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")}if(o.containerGroups.find((function(t){return t.posTabIndexesFound}))&&o.containerGroups.length>1){throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}};var f=function t(e){var a=e.activeElement;if(!a){return}if(a.shadowRoot&&a.shadowRoot.activeElement!==null){return f(a.shadowRoot)}return a};var p=function t(e){if(e===false){return}if(e===f(document)){return}if(!e||!e.focus){p(h());return}e.focus({preventScroll:!!n.preventScroll});o.mostRecentlyFocusedNode=e;if(dn(e)){e.select()}};var b=function t(e){var a=d("setReturnFocus",{params:[e]});return a?a:a===false?false:e};var m=function t(e){var a=e.target,i=e.event,r=e.isBackward,c=r===undefined?false:r;a=a||gn(i);u();var s=null;if(o.tabbableGroups.length>0){var h=l(a,i);var f=h>=0?o.containerGroups[h]:undefined;if(h<0){if(c){s=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode}else{s=o.tabbableGroups[0].firstTabbableNode}}else if(c){var p=o.tabbableGroups.findIndex((function(t){var e=t.firstTabbableNode;return a===e}));if(p<0&&(f.container===a||ra(a,n.tabbableOptions)&&!aa(a,n.tabbableOptions)&&!f.nextTabbableNode(a,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];s=Oe(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!un(i)){s=f.nextTabbableNode(a,false)}}else{var g=o.tabbableGroups.findIndex((function(t){var e=t.lastTabbableNode;return a===e}));if(g<0&&(f.container===a||ra(a,n.tabbableOptions)&&!aa(a,n.tabbableOptions)&&!f.nextTabbableNode(a))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];s=Oe(a)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!un(i)){s=f.nextTabbableNode(a)}}}else{s=d("fallbackFocus")}return s};var g=function t(e){var a=gn(e);if(l(a,e)>=0){return}if(mn(n.clickOutsideDeactivates,e)){c.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(mn(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var a=gn(e);var i=l(a,e)>=0;if(i||a instanceof Document){if(i){o.mostRecentlyFocusedNode=a}}else{e.stopImmediatePropagation();var r;var c=true;if(o.mostRecentlyFocusedNode){if(Oe(o.mostRecentlyFocusedNode)>0){var s=l(o.mostRecentlyFocusedNode);var d=o.containerGroups[s].tabbableNodes;if(d.length>0){var u=d.findIndex((function(t){return t===o.mostRecentlyFocusedNode}));if(u>=0){if(n.isKeyForward(o.recentNavEvent)){if(u+1<d.length){r=d[u+1];c=false}}else{if(u-1>=0){r=d[u-1];c=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return Oe(t)>0}))}))){c=false}}}else{c=false}if(c){r=m({target:o.mostRecentlyFocusedNode,isBackward:n.isKeyBackward(o.recentNavEvent)})}if(r){p(r)}else{p(o.mostRecentlyFocusedNode||h())}}o.recentNavEvent=undefined};var y=function t(e){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;o.recentNavEvent=e;var i=m({event:e,isBackward:a});if(i){if(un(e)){e.preventDefault()}p(i)}};var k=function t(e){if(n.isKeyForward(e)||n.isKeyBackward(e)){y(e,n.isKeyBackward(e))}};var x=function t(e){if(hn(e)&&mn(n.escapeDeactivates,e)!==false){e.preventDefault();c.deactivate()}};var w=function t(e){var a=gn(e);if(l(a,e)>=0){return}if(mn(n.clickOutsideDeactivates,e)){return}if(mn(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var z=function t(){if(!o.active){return}ln.activateTrap(r,c);o.delayInitialFocusTimer=n.delayInitialFocus?bn((function(){p(h())})):p(h());i.addEventListener("focusin",v,true);i.addEventListener("mousedown",g,{capture:true,passive:false});i.addEventListener("touchstart",g,{capture:true,passive:false});i.addEventListener("click",w,{capture:true,passive:false});i.addEventListener("keydown",k,{capture:true,passive:false});i.addEventListener("keydown",x);return c};var I=function t(){if(!o.active){return}i.removeEventListener("focusin",v,true);i.removeEventListener("mousedown",g,true);i.removeEventListener("touchstart",g,true);i.removeEventListener("click",w,true);i.removeEventListener("keydown",k,true);i.removeEventListener("keydown",x);return c};var D=function t(e){var a=e.some((function(t){var e=Array.from(t.removedNodes);return e.some((function(t){return t===o.mostRecentlyFocusedNode}))}));if(a){p(h())}};var M=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(D):undefined;var C=function t(){if(!M){return}M.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){M.observe(t,{subtree:true,childList:true})}))}};c={get active(){return o.active},get paused(){return o.paused},activate:function t(e){if(o.active){return this}var a=s(e,"onActivate");var r=s(e,"onPostActivate");var n=s(e,"checkCanFocusTrap");if(!n){u()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=i.activeElement;a===null||a===undefined||a();var c=function t(){if(n){u()}z();C();r===null||r===undefined||r()};if(n){n(o.containers.concat()).then(c,c);return this}c();return this},deactivate:function t(e){if(!o.active){return this}var a=rn({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;I();o.active=false;o.paused=false;C();ln.deactivateTrap(r,c);var i=s(a,"onDeactivate");var l=s(a,"onPostDeactivate");var d=s(a,"checkCanReturnFocus");var h=s(a,"returnFocus","returnFocusOnDeactivate");i===null||i===undefined||i();var u=function t(){bn((function(){if(h){p(b(o.nodeFocusedBeforeActivation))}l===null||l===undefined||l()}))};if(h&&d){d(b(o.nodeFocusedBeforeActivation)).then(u,u);return this}u();return this},pause:function t(e){if(!o.active){return this}o.manuallyPaused=true;return this._setPausedState(true,e)},unpause:function t(e){if(!o.active){return this}o.manuallyPaused=false;if(r[r.length-1]!==this){return this}return this._setPausedState(false,e)},updateContainerElements:function t(e){var a=[].concat(e).filter(Boolean);o.containers=a.map((function(t){return typeof t==="string"?i.querySelector(t):t}));if(o.active){u()}C();return this}};Object.defineProperties(c,{_isManuallyPaused:{value:function t(){return o.manuallyPaused}},_setPausedState:{value:function t(e,a){if(o.paused===e){return this}o.paused=e;if(e){var i=s(a,"onPause");var r=s(a,"onPostPause");i===null||i===undefined||i();I();C();r===null||r===undefined||r()}else{var n=s(a,"onUnpause");var c=s(a,"onPostUnpause");n===null||n===undefined||n();u();z();C();c===null||c===undefined||c()}return this}}});c.updateContainerElements(e);return c};const kn=":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding:0.25rem;min-width:8rem;max-width:16rem}.content{position:fixed;background:white;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);display:none;opacity:0;transform:scale(0.9);transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.content[data-placement^=top]{transform-origin:bottom}.content[data-placement^=top-start]{transform-origin:bottom left}.content[data-placement^=top-end]{transform-origin:bottom right}.content[data-placement^=left]{transform-origin:right}.content[data-placement^=left-start]{transform-origin:right top}.content[data-placement^=left-end]{transform-origin:right bottom}.content[data-placement^=right]{transform-origin:left}.content[data-placement^=right-start]{transform-origin:left top}.content[data-placement^=right-end]{transform-origin:left bottom}.content[data-placement^=bottom]{transform-origin:top}.content[data-placement^=bottom-start]{transform-origin:top left}.content[data-placement^=bottom-end]{transform-origin:top right}.content.show{opacity:1;transform:scale(1);transition:transform 250ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 250ms cubic-bezier(0.05, 0.7, 0.1, 1)}.content.overflow-auto{overflow:auto}";const xn=kn;let wn=0;const zn=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=wn++;this.isOpen=false;this.hasInitialFocus=false;this.placement="bottom-start";this.noAutoClose=false;this.arrowNavigation="vertical";this.noResize=false;this.overflow=false;this.noInitialFocus=false;this.noReturnFocus=false}clickHandler(t){if(!this.trigger){this.hasInitialFocus=this.isEventOriginFromKeyboard(t.detail);this.initTrigger();this.toggle()}const e=t.composedPath();if(!this.noAutoClose&&e.includes(this.content)&&t.target?.slot!=="trigger"&&!e.slice(0,e.indexOf(this.content)).find((t=>this.hasAttribute(t,"data-dropdown-no-close")))){this.close()}}async toggle(){this.isOpen?this.close():this.open()}async open(t){if(!this.trigger){this.initTrigger()}if(this.isOpen===null||this.isOpen){return}this.isOpen=null;this.content.style.display="block";this.hasInitialFocus=t??this.hasInitialFocus;setTimeout((()=>{this.isOpen=true;this.content.classList.add("show");this.trigger?.setAttribute("aria-expanded","true");this.trap=this.trap?this.trap.updateContainerElements(this.content):yn(this.content,{tabbableOptions:{getShadowRoot:true},allowOutsideClick:true,clickOutsideDeactivates:t=>!this.noAutoClose&&!t.composedPath().includes(this.content)&&!t.composedPath().find((t=>this.hasAttribute(t,"data-dropdown-no-close"))),onPostDeactivate:()=>this.close(),onPostActivate:()=>this.catOpen.emit(),setReturnFocus:t=>this.noReturnFocus?false:this.trigger||t,isKeyForward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowRight"||this.arrowNavigation==="vertical"&&t.key==="ArrowDown"){t.preventDefault();return true}return t.key==="Tab"},isKeyBackward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowLeft"||this.arrowNavigation==="vertical"&&t.key==="ArrowUp"){t.preventDefault();return true}return t.key==="Tab"&&t.shiftKey},initialFocus:()=>this.hasInitialFocus&&!this.noInitialFocus?undefined:false});this.trap.activate()}))}async close(){if(!this.isOpen){return}this.isOpen=null;this.trap?.deactivate();this.content.classList.remove("show");setTimeout((()=>{this.isOpen=false;this.content.classList.remove("show");this.content.style.display="";this.trigger?.setAttribute("aria-expanded","false");this.catClose.emit()}),Gr)}render(){return e(a,{key:"1a87f171daed4f9eccc40a303f3aba45f3501128"},e("slot",{key:"f74085056470832d32434ebcacdb6d9532177e86",name:"anchor",ref:t=>this.anchorSlot=t}),e("slot",{key:"fdf8879c10e6ad7179487480d2ff0f890bf5f8da",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"1c6b50433220e084ea096c38e14c17625c52e5e5",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"9c8de61eb11c1bb0771b8f0b6a9d7f7f574c928e",name:"content"})))}componentDidLoad(){this.initAnchor()}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();const t=this.trigger.getAttribute("aria-haspopup");this.trigger.setAttribute("aria-haspopup",t??"true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(t=>{this.hasInitialFocus=this.isEventOriginFromKeyboard(t);this.toggle()}));if(!this.anchor){Lr(this.trigger,this.content,(()=>this.update(this.trigger)))}}isEventOriginFromKeyboard(t){return t.detail===0}initAnchor(){this.anchor=(this.anchorSlot?.assignedElements?.()||[])[0];if(this.anchor){Lr(this.anchor,this.content,(()=>this.update(this.anchor)))}}findTrigger(){let t;const e=this.triggerSlot?.assignedElements?.()||[];while(!t&&e.length){const a=e.shift();t=a?.hasAttribute("data-trigger")?a:a?.querySelector("[data-trigger]")??undefined}if(!t){t=na(this.triggerSlot)}if(!t){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return t}update(t){if(t){const e=this.noResize?[]:[Yr({padding:zn.OFFSET,apply({availableWidth:t,availableHeight:e,elements:a}){Object.assign(a.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];Hr(t,this.content,{strategy:"fixed",placement:this.placement,middleware:[Wr(zn.OFFSET),Pr(),...e]}).then((({x:t,y:e,placement:a})=>{this.content.dataset.placement=a;Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})}))}}hasAttribute(t,e){return t instanceof HTMLElement&&t.hasAttribute(e)}};zn.OFFSET=4;zn.style=xn;const In=":host{display:block}";const Dn=In;const Mn=class{constructor(e){t(this,e);this.formElements=[];this.requiredMarker="auto";this.horizontal=false;this.labelSize=undefined}onRequiredMarkerChanged(t){const e=t==="auto"?this.calculate(this.formElements):t;this.formElements.forEach((t=>!t.requiredMarker?.endsWith("!")&&(t.requiredMarker=e)))}onHorizontalChanged(t){this.formElements.forEach((e=>{e.horizontal=t}))}render(){return e(a,{key:"c9fe233663c9967b3e78334e6994ceb62653c19c",style:{"--label-size":this.labelSize}},e("slot",{key:"49274e5e31644d6f7d042033e975d8b91d6aaea6",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-input, cat-textarea, cat-select, cat-datepicker"));this.onRequiredMarkerChanged(this.requiredMarker);this.onHorizontalChanged(this.horizontal)}calculate(t){const e=t.filter((t=>!t.required)).length;const a=t.length-e;return a>=e?"optional":"required"}get hostElement(){return i(this)}static get watchers(){return{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}}};Mn.style=Dn;const Cn=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}span{display:inline-flex}svg{fill:currentColor;stroke:none;transform-origin:center center;height:1em;width:calc(var(--cat-icon-ratio, 1) * 1em)}.icon-xs svg{font-size:0.75rem}.icon-s svg{font-size:1rem}.icon-m svg{font-size:1.25rem}.icon-l svg{font-size:1.5rem}.icon-xl svg{font-size:1.75rem}";const Rn=Cn;const An=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"1e1698413feaee8ca810b50370fc44a5a9f229dc",innerHTML:this.iconSrc||(this.icon?M.getIcon(this.icon):""),"aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",part:"icon",class:{icon:true,[`icon-${this.size}`]:this.size!=="inline"}})}};An.style=Rn;var Sn=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var Fn=function(t,e,a,i,r,n,o,c,s,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=a>=0?a:2;d.numeralThousandsGroupStyle=i||Fn.groupStyle.thousand;d.numeralPositiveOnly=!!r;d.stripLeadingZeroes=n!==false;d.prefix=o||o===""?o:"";d.signBeforePrefix=!!c;d.tailPrefix=!!s;d.delimiter=l||l===""?l:",";d.delimiterRE=l?new RegExp("\\"+l,"g"):""};Fn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};Fn.prototype={getRawValue:function(t){return t.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(t){var e=this,a,i,r,n,o="";t=t.replace(/[A-Za-z]/g,"").replace(e.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",e.numeralPositiveOnly?"":"-").replace("M",e.numeralDecimalMark);if(e.stripLeadingZeroes){t=t.replace(/^(-)?0+(?=\d)/,"$1")}i=t.slice(0,1)==="-"?"-":"";if(typeof e.prefix!="undefined"){if(e.signBeforePrefix){r=i+e.prefix}else{r=e.prefix+i}}else{r=i}n=t;if(t.indexOf(e.numeralDecimalMark)>=0){a=t.split(e.numeralDecimalMark);n=a[0];o=e.numeralDecimalMark+a[1].slice(0,e.numeralDecimalScale)}if(i==="-"){n=n.slice(1)}if(e.numeralIntegerScale>0){n=n.slice(0,e.numeralIntegerScale)}switch(e.numeralThousandsGroupStyle){case Fn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case Fn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case Fn.groupStyle.thousand:n=n.replace(/(\d)(?=(\d{3})+$)/g,"$1"+e.delimiter);break}if(e.tailPrefix){return i+n.toString()+(e.numeralDecimalScale>0?o.toString():"")+e.prefix}return r+n.toString()+(e.numeralDecimalScale>0?o.toString():"")}};var Tn=Fn;var $n=function(t,e,a){var i=this;i.date=[];i.blocks=[];i.datePattern=t;i.dateMin=e.split("-").reverse().map((function(t){return parseInt(t,10)}));if(i.dateMin.length===2)i.dateMin.unshift(0);i.dateMax=a.split("-").reverse().map((function(t){return parseInt(t,10)}));if(i.dateMax.length===2)i.dateMax.unshift(0);i.initBlocks()};$n.prototype={initBlocks:function(){var t=this;t.datePattern.forEach((function(e){if(e==="Y"){t.blocks.push(4)}else{t.blocks.push(2)}}))},getISOFormatDate:function(){var t=this,e=t.date;return e[2]?e[2]+"-"+t.addLeadingZero(e[1])+"-"+t.addLeadingZero(e[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(t){var e=this,a="";t=t.replace(/[^\d]/g,"");e.blocks.forEach((function(i,r){if(t.length>0){var n=t.slice(0,i),o=n.slice(0,1),c=t.slice(i);switch(e.datePattern[r]){case"d":if(n==="00"){n="01"}else if(parseInt(o,10)>3){n="0"+o}else if(parseInt(n,10)>31){n="31"}break;case"m":if(n==="00"){n="01"}else if(parseInt(o,10)>1){n="0"+o}else if(parseInt(n,10)>12){n="12"}break}a+=n;t=c}}));return this.getFixedDateString(a)},getFixedDateString:function(t){var e=this,a=e.datePattern,i=[],r=0,n=0,o=0,c=0,s=0,l=0,d,h,u,f=false;if(t.length===4&&a[0].toLowerCase()!=="y"&&a[1].toLowerCase()!=="y"){c=a[0]==="d"?0:2;s=2-c;d=parseInt(t.slice(c,c+2),10);h=parseInt(t.slice(s,s+2),10);i=this.getFixedDate(d,h,0)}if(t.length===8){a.forEach((function(t,e){switch(t){case"d":r=e;break;case"m":n=e;break;default:o=e;break}}));l=o*2;c=r<=o?r*2:r*2+2;s=n<=o?n*2:n*2+2;d=parseInt(t.slice(c,c+2),10);h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+4),10);f=t.slice(l,l+4).length===4;i=this.getFixedDate(d,h,u)}if(t.length===4&&(a[0]==="y"||a[1]==="y")){s=a[0]==="m"?0:2;l=2-s;h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+2),10);f=t.slice(l,l+2).length===2;i=[0,h,u]}if(t.length===6&&(a[0]==="Y"||a[1]==="Y")){s=a[0]==="m"?0:4;l=2-.5*s;h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+4),10);f=t.slice(l,l+4).length===4;i=[0,h,u]}i=e.getRangeFixedDate(i);e.date=i;var p=i.length===0?t:a.reduce((function(t,a){switch(a){case"d":return t+(i[0]===0?"":e.addLeadingZero(i[0]));case"m":return t+(i[1]===0?"":e.addLeadingZero(i[1]));case"y":return t+(f?e.addLeadingZeroForYear(i[2],false):"");case"Y":return t+(f?e.addLeadingZeroForYear(i[2],true):"")}}),"");return p},getRangeFixedDate:function(t){var e=this,a=e.datePattern,i=e.dateMin||[],r=e.dateMax||[];if(!t.length||i.length<3&&r.length<3)return t;if(a.find((function(t){return t.toLowerCase()==="y"}))&&t[2]===0)return t;if(r.length&&(r[2]<t[2]||r[2]===t[2]&&(r[1]<t[1]||r[1]===t[1]&&r[0]<t[0])))return r;if(i.length&&(i[2]>t[2]||i[2]===t[2]&&(i[1]>t[1]||i[1]===t[1]&&i[0]>t[0])))return i;return t},getFixedDate:function(t,e,a){t=Math.min(t,31);e=Math.min(e,12);a=parseInt(a||0,10);if(e<7&&e%2===0||e>8&&e%2===1){t=Math.min(t,e===2?this.isLeapYear(a)?29:28:30)}return[t,e,a]},isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},addLeadingZero:function(t){return(t<10?"0":"")+t},addLeadingZeroForYear:function(t,e){if(e){return(t<10?"000":t<100?"00":t<1e3?"0":"")+t}return(t<10?"0":"")+t}};var Bn=$n;var En=function(t,e){var a=this;a.time=[];a.blocks=[];a.timePattern=t;a.timeFormat=e;a.initBlocks()};En.prototype={initBlocks:function(){var t=this;t.timePattern.forEach((function(){t.blocks.push(2)}))},getISOFormatTime:function(){var t=this,e=t.time;return e[2]?t.addLeadingZero(e[0])+":"+t.addLeadingZero(e[1])+":"+t.addLeadingZero(e[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var t=this;if(String(t.timeFormat)==="12"){return{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}}return{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(t){var e=this,a="";t=t.replace(/[^\d]/g,"");var i=e.getTimeFormatOptions();e.blocks.forEach((function(r,n){if(t.length>0){var o=t.slice(0,r),c=o.slice(0,1),s=t.slice(r);switch(e.timePattern[n]){case"h":if(parseInt(c,10)>i.maxHourFirstDigit){o="0"+c}else if(parseInt(o,10)>i.maxHours){o=i.maxHours+""}break;case"m":case"s":if(parseInt(c,10)>i.maxMinutesFirstDigit){o="0"+c}else if(parseInt(o,10)>i.maxMinutes){o=i.maxMinutes+""}break}a+=o;t=s}}));return this.getFixedTimeString(a)},getFixedTimeString:function(t){var e=this,a=e.timePattern,i=[],r=0,n=0,o=0,c=0,s=0,l=0,d,h,u;if(t.length===6){a.forEach((function(t,e){switch(t){case"s":r=e*2;break;case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;s=n;c=r;d=parseInt(t.slice(c,c+2),10);h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+2),10);i=this.getFixedTime(u,h,d)}if(t.length===4&&e.timePattern.indexOf("s")<0){a.forEach((function(t,e){switch(t){case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;s=n;d=0;h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+2),10);i=this.getFixedTime(u,h,d)}e.time=i;return i.length===0?t:a.reduce((function(t,a){switch(a){case"s":return t+e.addLeadingZero(i[2]);case"m":return t+e.addLeadingZero(i[1]);case"h":return t+e.addLeadingZero(i[0])}}),"")},getFixedTime:function(t,e,a){a=Math.min(parseInt(a||0,10),60);e=Math.min(e,60);t=Math.min(t,60);return[t,e,a]},addLeadingZero:function(t){return(t<10?"0":"")+t}};var On=En;var Nn=function(t,e){var a=this;a.delimiter=e||e===""?e:" ";a.delimiterRE=e?new RegExp("\\"+e,"g"):"";a.formatter=t};Nn.prototype={setFormatter:function(t){this.formatter=t},format:function(t){var e=this;e.formatter.clear();t=t.replace(/[^\d+]/g,"");t=t.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+");t=t.replace(e.delimiterRE,"");var a="",i,r=false;for(var n=0,o=t.length;n<o;n++){i=e.formatter.inputDigit(t.charAt(n));if(/[\s()-]/g.test(i)){a=i;r=true}else{if(!r){a=i}}}a=a.replace(/[()]/g,"");a=a.replace(/[\s-]/g,e.delimiter);return a}};var Ln=Nn;var Wn={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(t){var e=t.reduce((function(t,e){return t+e}),0);return t.concat(19-e)},getInfo:function(t,e){var a=Wn.blocks,i=Wn.re;e=!!e;for(var r in i){if(i[r].test(t)){var n=a[r];return{type:r,blocks:e?this.getStrictBlocks(n):n}}}return{type:"unknown",blocks:e?this.getStrictBlocks(a.general):a.general}}};var jn=Wn;var Pn={noop:function(){},strip:function(t,e){return t.replace(e,"")},getPostDelimiter:function(t,e,a){if(a.length===0){return t.slice(-e.length)===e?e:""}var i="";a.forEach((function(e){if(t.slice(-e.length)===e){i=e}}));return i},getDelimiterREByDelimiter:function(t){return new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(t,e,a,i,r){if(e.length===t){return a.length}return t+this.getPositionOffset(t,e,a,i,r)},getPositionOffset:function(t,e,a,i,r){var n,o,c;n=this.stripDelimiters(e.slice(0,t),i,r);o=this.stripDelimiters(a.slice(0,t),i,r);c=n.length-o.length;return c!==0?c/Math.abs(c):0},stripDelimiters:function(t,e,a){var i=this;if(a.length===0){var r=e?i.getDelimiterREByDelimiter(e):"";return t.replace(r,"")}a.forEach((function(e){e.split("").forEach((function(e){t=t.replace(i.getDelimiterREByDelimiter(e),"")}))}));return t},headStr:function(t,e){return t.slice(0,e)},getMaxLength:function(t){return t.reduce((function(t,e){return t+e}),0)},getPrefixStrippedValue:function(t,e,a,i,r,n,o,c,s){if(a===0){return t}if(t===e&&t!==""){return""}if(s&&t.slice(0,1)=="-"){var l=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(t.slice(1),e,a,l,r,n,o,c,s)}if(i.slice(0,a)!==e&&!c){if(o&&!i&&t)return t;return""}else if(i.slice(-a)!==e&&c){if(o&&!i&&t)return t;return""}var d=this.stripDelimiters(i,r,n);if(t.slice(0,a)!==e&&!c){return d.slice(a)}else if(t.slice(-a)!==e&&c){return d.slice(0,-a-1)}return c?t.slice(0,-a):t.slice(a)},getFirstDiffIndex:function(t,e){var a=0;while(t.charAt(a)===e.charAt(a)){if(t.charAt(a++)===""){return-1}}return a},getFormattedValue:function(t,e,a,i,r,n){var o="",c=r.length>0,s="";if(a===0){return t}e.forEach((function(e,l){if(t.length>0){var d=t.slice(0,e),h=t.slice(e);if(c){s=r[n?l-1:l]||s}else{s=i}if(n){if(l>0){o+=s}o+=d}else{o+=d;if(d.length===e&&l<a-1){o+=s}}t=h}}));return o},fixPrefixCursor:function(t,e,a,i){if(!t){return}var r=t.value,n=a||(i[0]||" ");if(!t.setSelectionRange||!e||e.length+n.length<=r.length){return}var o=r.length*2;setTimeout((function(){t.setSelectionRange(o,o)}),1)},checkFullSelection:function(t){try{var e=window.getSelection()||document.getSelection()||{};return e.toString().length===t.length}catch(t){}return false},setSelection:function(t,e,a){if(t!==this.getActiveElement(a)){return}if(t&&t.value.length<=e){return}if(t.createTextRange){var i=t.createTextRange();i.move("character",e);i.select()}else{try{t.setSelectionRange(e,e)}catch(t){console.warn("The input element type does not support selection")}}},getActiveElement:function(t){var e=t.activeElement;if(e&&e.shadowRoot){return this.getActiveElement(e.shadowRoot)}return e},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(t,e){if(!this.isAndroid()||!t||!e){return false}return e===t.slice(0,-1)}};var Yn=Pn;var Hn={assign:function(t,e){t=t||{};e=e||{};t.creditCard=!!e.creditCard;t.creditCardStrictMode=!!e.creditCardStrictMode;t.creditCardType="";t.onCreditCardTypeChanged=e.onCreditCardTypeChanged||function(){};t.phone=!!e.phone;t.phoneRegionCode=e.phoneRegionCode||"AU";t.phoneFormatter={};t.time=!!e.time;t.timePattern=e.timePattern||["h","m","s"];t.timeFormat=e.timeFormat||"24";t.timeFormatter={};t.date=!!e.date;t.datePattern=e.datePattern||["d","m","Y"];t.dateMin=e.dateMin||"";t.dateMax=e.dateMax||"";t.dateFormatter={};t.numeral=!!e.numeral;t.numeralIntegerScale=e.numeralIntegerScale>0?e.numeralIntegerScale:0;t.numeralDecimalScale=e.numeralDecimalScale>=0?e.numeralDecimalScale:2;t.numeralDecimalMark=e.numeralDecimalMark||".";t.numeralThousandsGroupStyle=e.numeralThousandsGroupStyle||"thousand";t.numeralPositiveOnly=!!e.numeralPositiveOnly;t.stripLeadingZeroes=e.stripLeadingZeroes!==false;t.signBeforePrefix=!!e.signBeforePrefix;t.tailPrefix=!!e.tailPrefix;t.swapHiddenInput=!!e.swapHiddenInput;t.numericOnly=t.creditCard||t.date||!!e.numericOnly;t.uppercase=!!e.uppercase;t.lowercase=!!e.lowercase;t.prefix=t.creditCard||t.date?"":e.prefix||"";t.noImmediatePrefix=!!e.noImmediatePrefix;t.prefixLength=t.prefix.length;t.rawValueTrimPrefix=!!e.rawValueTrimPrefix;t.copyDelimiter=!!e.copyDelimiter;t.initValue=e.initValue!==undefined&&e.initValue!==null?e.initValue.toString():"";t.delimiter=e.delimiter||e.delimiter===""?e.delimiter:e.date?"/":e.time?":":e.numeral?",":e.phone?" ":" ";t.delimiterLength=t.delimiter.length;t.delimiterLazyShow=!!e.delimiterLazyShow;t.delimiters=e.delimiters||[];t.blocks=e.blocks||[];t.blocksLength=t.blocks.length;t.root=typeof Sn==="object"&&Sn?Sn:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var _n=Hn;var Un=function(t,e){var a=this;var i=false;if(typeof t==="string"){a.element=document.querySelector(t);i=document.querySelectorAll(t).length>1}else{if(typeof t.length!=="undefined"&&t.length>0){a.element=t[0];i=t.length>1}else{a.element=t}}if(!a.element){throw new Error("[cleave.js] Please check the element")}if(i){try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(t){}}e.initValue=a.element.value;a.properties=Un.DefaultProperties.assign({},e);a.init()};Un.prototype={init:function(){var t=this,e=t.properties;if(!e.numeral&&!e.phone&&!e.creditCard&&!e.time&&!e.date&&(e.blocksLength===0&&!e.prefix)){t.onInput(e.initValue);return}e.maxLength=Un.Util.getMaxLength(e.blocks);t.isAndroid=Un.Util.isAndroid();t.lastInputValue="";t.isBackward="";t.onChangeListener=t.onChange.bind(t);t.onKeyDownListener=t.onKeyDown.bind(t);t.onFocusListener=t.onFocus.bind(t);t.onCutListener=t.onCut.bind(t);t.onCopyListener=t.onCopy.bind(t);t.initSwapHiddenInput();t.element.addEventListener("input",t.onChangeListener);t.element.addEventListener("keydown",t.onKeyDownListener);t.element.addEventListener("focus",t.onFocusListener);t.element.addEventListener("cut",t.onCutListener);t.element.addEventListener("copy",t.onCopyListener);t.initPhoneFormatter();t.initDateFormatter();t.initTimeFormatter();t.initNumeralFormatter();if(e.initValue||e.prefix&&!e.noImmediatePrefix){t.onInput(e.initValue)}},initSwapHiddenInput:function(){var t=this,e=t.properties;if(!e.swapHiddenInput)return;var a=t.element.cloneNode(true);t.element.parentNode.insertBefore(a,t.element);t.elementSwapHidden=t.element;t.elementSwapHidden.type="hidden";t.element=a;t.element.id=""},initNumeralFormatter:function(){var t=this,e=t.properties;if(!e.numeral){return}e.numeralFormatter=new Un.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter)},initTimeFormatter:function(){var t=this,e=t.properties;if(!e.time){return}e.timeFormatter=new Un.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=Un.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new Un.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=Un.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new Un.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch(t){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(t){var e=this,a=t.which||t.keyCode;e.lastInputValue=e.element.value;e.isBackward=a===8},onChange:function(t){var e=this,a=e.properties,i=Un.Util;e.isBackward=e.isBackward||t.inputType==="deleteContentBackward";var r=i.getPostDelimiter(e.lastInputValue,a.delimiter,a.delimiters);if(e.isBackward&&r){a.postDelimiterBackspace=r}else{a.postDelimiterBackspace=false}this.onInput(this.element.value)},onFocus:function(){var t=this,e=t.properties;t.lastInputValue=t.element.value;if(e.prefix&&e.noImmediatePrefix&&!t.element.value){this.onInput(e.prefix)}Un.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!Un.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!Un.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,a=e.properties,i=Un.Util,r=e.element.value,n="";if(!a.copyDelimiter){n=i.stripDelimiters(r,a.delimiter,a.delimiters)}else{n=r}try{if(t.clipboardData){t.clipboardData.setData("Text",n)}else{window.clipboardData.setData("Text",n)}t.preventDefault()}catch(t){}},onInput:function(t){var e=this,a=e.properties,i=Un.Util;var r=i.getPostDelimiter(t,a.delimiter,a.delimiters);if(!a.numeral&&a.postDelimiterBackspace&&!r){t=i.headStr(t,t.length-a.postDelimiterBackspace.length)}if(a.phone){if(a.prefix&&(!a.noImmediatePrefix||t.length)){a.result=a.prefix+a.phoneFormatter.format(t).slice(a.prefix.length)}else{a.result=a.phoneFormatter.format(t)}e.updateValueState();return}if(a.numeral){if(a.prefix&&a.noImmediatePrefix&&t.length===0){a.result=""}else{a.result=a.numeralFormatter.format(t)}e.updateValueState();return}if(a.date){t=a.dateFormatter.getValidatedDate(t)}if(a.time){t=a.timeFormatter.getValidatedTime(t)}t=i.stripDelimiters(t,a.delimiter,a.delimiters);t=i.getPrefixStrippedValue(t,a.prefix,a.prefixLength,a.result,a.delimiter,a.delimiters,a.noImmediatePrefix,a.tailPrefix,a.signBeforePrefix);t=a.numericOnly?i.strip(t,/[^\d]/g):t;t=a.uppercase?t.toUpperCase():t;t=a.lowercase?t.toLowerCase():t;if(a.prefix){if(a.tailPrefix){t=t+a.prefix}else{t=a.prefix+t}if(a.blocksLength===0){a.result=t;e.updateValueState();return}}if(a.creditCard){e.updateCreditCardPropsByValue(t)}t=i.headStr(t,a.maxLength);a.result=i.getFormattedValue(t,a.blocks,a.blocksLength,a.delimiter,a.delimiters,a.delimiterLazyShow);e.updateValueState()},updateCreditCardPropsByValue:function(t){var e=this,a=e.properties,i=Un.Util,r;if(i.headStr(a.result,4)===i.headStr(t,4)){return}r=Un.CreditCardDetector.getInfo(t,a.creditCardStrictMode);a.blocks=r.blocks;a.blocksLength=a.blocks.length;a.maxLength=i.getMaxLength(a.blocks);if(a.creditCardType!==r.type){a.creditCardType=r.type;a.onCreditCardTypeChanged.call(e,a.creditCardType)}},updateValueState:function(){var t=this,e=Un.Util,a=t.properties;if(!t.element){return}var i=t.element.selectionEnd;var r=t.element.value;var n=a.result;i=e.getNextCursorPosition(i,r,n,a.delimiter,a.delimiters);if(t.isAndroid){window.setTimeout((function(){t.element.value=n;e.setSelection(t.element,i,a.document,false);t.callOnValueChanged()}),1);return}t.element.value=n;if(a.swapHiddenInput)t.elementSwapHidden.value=t.getRawValue();e.setSelection(t.element,i,a.document,false);t.callOnValueChanged()},callOnValueChanged:function(){var t=this,e=t.properties;e.onValueChanged.call(t,{target:{name:t.element.name,value:e.result,rawValue:t.getRawValue()}})},setPhoneRegionCode:function(t){var e=this,a=e.properties;a.phoneRegionCode=t;e.initPhoneFormatter();e.onChange()},setRawValue:function(t){var e=this,a=e.properties;t=t!==undefined&&t!==null?t.toString():"";if(a.numeral){t=t.replace(".",a.numeralDecimalMark)}a.postDelimiterBackspace=false;e.element.value=t;e.onInput(t)},getRawValue:function(){var t=this,e=t.properties,a=Un.Util,i=t.element.value;if(e.rawValueTrimPrefix){i=a.getPrefixStrippedValue(i,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)}if(e.numeral){i=e.numeralFormatter.getRawValue(i)}else{i=a.stripDelimiters(i,e.delimiter,e.delimiters)}return i},getISOFormatDate:function(){var t=this,e=t.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var t=this,e=t.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var t=this;t.element.removeEventListener("input",t.onChangeListener);t.element.removeEventListener("keydown",t.onKeyDownListener);t.element.removeEventListener("focus",t.onFocusListener);t.element.removeEventListener("cut",t.onCutListener);t.element.removeEventListener("copy",t.onCopyListener)},toString:function(){return"[Cleave Object]"}};Un.NumeralFormatter=Tn;Un.DateFormatter=Bn;Un.TimeFormatter=On;Un.PhoneFormatter=Ln;Un.CreditCardDetector=jn;Un.Util=Yn;Un.DefaultProperties=_n;(typeof Sn==="object"&&Sn?Sn:window)["Cleave"]=Un;var Kn=Un;function Vn(t){return t!=null&&`${t}`!=="false"}function qn(t,e=0){return Jn(t)?Number(t):e}function Jn(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const Gn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}button.cat-text-primary,button.cat-link-primary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}button.cat-text-primaryInverted,button.cat-link-primaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}button.cat-text-secondary,button.cat-link-secondary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}button.cat-text-secondaryInverted,button.cat-link-secondaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}button.cat-text-info,button.cat-link-info{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-info:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-info:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}button.cat-text-success,button.cat-link-success{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-success:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-success:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}button.cat-text-warning,button.cat-link-warning{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-warning:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-warning:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}button.cat-text-danger,button.cat-link-danger{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-danger:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-danger:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-loading,.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";const Zn=Gn;let Xn=0;const Qn=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Xn++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.hasSlottedCounter=false;this.isPasswordShown=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.togglePassword=false;this.disabled=false;this.loading=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.maxLength=undefined;this.min=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.round=false;this.type="text";this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');this.hasSlottedCounter=!!this.hostElement.querySelector('[slot="counter"]')}async doFocus(t){const e=this.input.type==="hidden"?this.findSiblingInput(this.input.nextSibling):this.input;e?.focus(t)}async doBlur(){this.input.blur()}async clear(){this.value="";this.catChange.emit(this.value)}async mask(t){new Kn(this.input,t)}onErrorsChanged(t,e,a=true){if(!Vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e("div",{key:"65536a5d26ff0ebe45920b352cdfa4e28719efeb",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"1492e4f53056086c1b01d9314b368a301d36667b",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"6ced806dcfcbe1eb0f2a6ebcd31f4ff4a3280e58",htmlFor:this.id,part:"label"},e("span",{key:"23bbe79e6af8b0869510bc43533e02b60fd345ac",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"d1ccafcf2d7f49eedf400d78b678fbafabb2c158",name:"label"})||this.label,e("div",{key:"7ee3879f60ec33a414406e040da4f93c24ccd5ea",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"58f31ad7dc3a108f6dde1ec88c482a5a3c74fcbd",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"63d78c225748e457899f55d964bcb1d2a0da851c",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"),(this.maxLength||this.hasSlottedCounter)&&e("div",{key:"b36623a31118624beca4d4005dbf0480e476cb53",class:"label-character-count","aria-hidden":"true"},this.hasSlottedCounter?e("slot",{name:"counter"}):`${this.value?.length??0}/${this.maxLength}`))))),e("div",{key:"75d9b67e7cf19f2526e1e036de0efce6b02d2fa5",class:"input-container"},e("div",{key:"33b2d24c18c7e4b78bcaf569787f4153237f0686",class:"input-outer-wrapper"},e("div",{key:"50f66d6a718bc66162ce93d3f3ce75b53afd193a",class:{"input-wrapper":true,"input-round":this.round,"input-readonly":this.readonly,"input-disabled":this.disabled,"input-invalid":this.invalid},onClick:()=>this.input.focus()},this.textPrefix&&e("span",{key:"9549568c8b7d088babf19125a063270863d545a3",class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{key:"fbd58b96277fc28e9de49ffd355471811fb16257",icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"9ea5b2502d1364de65b656c064124329ace8a074",class:"input-inner-wrapper"},e("input",{key:"80f00d9abc53fbc3cd6fa261663f6c9e940ec213","data-test":this.testId,...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,class:{"has-clearable":this.clearable&&!this.disabled&&!this.readonly&&!!this.value,"has-toggle-password":this.togglePassword&&!this.disabled&&!this.readonly&&!!this.value},autocomplete:this.autoComplete,disabled:this.disabled,max:this.max,maxlength:this.maxLength,min:this.min,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,type:this.isPasswordShown?"text":this.type,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.clearable&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{key:"f301a2b57d36d2005e8705e07ea59dd32e54691a",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":I.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.togglePassword&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{key:"8a9e442e985f5654ae1a2dc4ad7e24939e2275c4",class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":I.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),this.loading&&e("cat-spinner",{key:"50ef079a4d7a193d367817a0afa3db8be839b4a6",size:"m",class:"icon-loading"}),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{key:"8ceedd341d85faebb2ebbb1d60b137f9e866aa05",icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{key:"3be8071c0d5d25d6607fd40547d2405c4cd1b7bb",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{key:"7019774d260c7c59c33a2dc1d82c6f4fa1f45b45",class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"d3882acee81f3456c1d7ab86469b12deed42debe",name:"addon"})),this.hasHint&&e(oe,{key:"3dce699be6ee391d0aee55735959ed69501e52ff",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.input.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(Vn(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=qn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}findSiblingInput(t){if(t instanceof HTMLInputElement){return t}else if(t?.nextSibling){return this.findSiblingInput(t.nextSibling)}return undefined}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Qn.style=Zn;const to=":host{display:inline-block}:host([hidden]){display:none}ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}li{display:inline-flex;justify-content:center}li.dots{-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([variant=outlined]) ol{gap:0.75rem}.cat-pagination-xs li.dots,.cat-pagination-xs li.text{height:1.5rem;line-height:1.5rem;font-size:0.875rem}.cat-pagination-xs li.dots{width:1.5rem}:host([variant=outlined]) .cat-pagination-xs{gap:0.375rem}.cat-pagination-s li.dots,.cat-pagination-s li.text{height:2rem;line-height:2rem;font-size:0.9375rem}.cat-pagination-s li.dots{width:2rem}:host([variant=outlined]) .cat-pagination-s{gap:0.5rem}.cat-pagination-m li.dots,.cat-pagination-m li.text{height:2.5rem;line-height:2.5rem;font-size:0.9375rem}.cat-pagination-m li.dots{width:2.5rem}:host([variant=outlined]) .cat-pagination-m{gap:0.625rem}.cat-pagination-l li.dots,.cat-pagination-l li.text{height:3rem;line-height:3rem;font-size:0.9375rem}.cat-pagination-l li.dots{width:3rem}:host([variant=outlined]) .cat-pagination-l{gap:0.75rem}.cat-pagination-xl li.dots,.cat-pagination-xl li.text{height:3.5rem;line-height:3.5rem;font-size:1.125rem}.cat-pagination-xl li.dots{width:3.5rem}:host([variant=outlined]) .cat-pagination-xl{gap:0.875rem}";const eo=to;const ao=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.page=0;this.pageCount=1;this.activePadding=1;this.sidePadding=1;this.size="m";this.variant="text";this.round=false;this.compact=false;this.iconPrev="$cat:pagination-left";this.iconNext="$cat:pagination-right"}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e("nav",{key:"ed5098e1578e2157e0f5b8c539f313e2892c5f05",role:"navigation"},e("ol",{key:"6f63a5c0a79722913dafbf1b6391ab586a20695a",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"0dd989fa017490749141ab2029546b115a34ce27"},e("cat-button",{key:"8614e9e1ebfc2ff3aeda2cec8be07aeff6e592eb",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:I.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"b864788a70e125ae93a34e705522e537b359a12a"},e("cat-button",{key:"93f6d89967b6f6b93b733fbcb628cf4a3663dbf0",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:I.t("pagination.next"),icon:this.iconNext,iconOnly:true,onClick:()=>this.setPage(this.page+1)}))))}get isFirst(){return this.page===0}get isLast(){return this.page===this.pageCount-1}setPage(t){this.page=t;this.catChange.emit(this.page)}get pages(){if(!this.sidePadding&&!this.activePadding){return[this.page]}const t=new Set;const e=this.page<=this.sidePadding+this.activePadding+1;const a=e?this.sidePadding+2*this.activePadding+2:this.sidePadding;const i=this.page>=this.pageCount-this.sidePadding-this.activePadding-2;const r=i?this.pageCount-this.sidePadding-2*this.activePadding-2:this.pageCount-this.sidePadding;this.addSeq(t,0,a);if(!e&&!i){this.addSeq(t,this.page-this.activePadding,this.page+this.activePadding+1)}this.addSeq(t,r,this.pageCount);return[...t]}addSeq(t,e,a){const i=this.clamp(e,0,this.pageCount);const r=this.clamp(a,0,this.pageCount);Array(r-i).fill(0).forEach(((e,a)=>t.add(i+a)))}clamp(t,e,a){return Math.min(Math.max(t,e),a)}get content(){if(this.compact){return e("li",{class:"text"},this.page+1,"/",this.pageCount)}return this.pages.map(((t,a)=>[a>0&&this.pages[a-1]!==t-1?e("li",{class:"dots"},"…"):null,e("li",null,e("cat-button",{variant:this.variant,size:this.size,round:this.round,color:this.page===t?"primary":undefined,active:this.page===t,a11yLabel:I.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}static get delegatesFocus(){return true}get hostElement(){return i(this)}};ao.style=eo;const io=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle-placeholder{width:calc(1.25rem + 1px);flex-shrink:0}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.is-disabled input{background-color:#f2f4f7}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.align-center .radio{align-self:center}.align-end .radio{align-self:flex-end}";const ro=io;let no=0;const oo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-radio-${++no}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value="";this.hint=undefined;this.labelLeft=false;this.alignment="top";this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"ca329dab3b08cf59911216e6d1d89e931d4c6836"},e("label",{key:"0fae08dcf9b6017f1052342f22989a9218437a82",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"eed2cf5a6e64d64770466bbfcd5fd0f6e7e329d9",class:"radio"},e("input",{key:"02a288466717c319419f94e2f9607ab63575e9d5","data-test":this.testId,...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.identifier||this.id,type:"radio",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"f75aa8f50e723b8aa90b60001190638d3d56234a",class:"circle"})),e("span",{key:"52de52cc932bb531440862a04ede38cdf2b29a3a",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"3c66d88d6517721590a342001258b5375f274714",name:"label"})||this.label)),this.hasHint&&e("div",{key:"b86904829302d22f22ce51f42bd147504b6e387f",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"dcca2f05ea10d9cbf731c7b59f82e33916014327",class:"circle-placeholder"}),e(oe,{key:"e7b29ec3c4675b1e077fc783fe90780b5794f78a",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=true;this.catChange.emit(this.value)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}static get delegatesFocus(){return true}get hostElement(){return i(this)}};oo.style=ro;const co=":host{display:block}:host([hidden]){display:none}";const so=co;const lo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.catRadioGroup=[];this.name=undefined;this.value=undefined;this.disabled=false;this.a11yLabel=undefined;this.labelLeft=false}onNameChanged(t){this.catRadioGroup.forEach((e=>e.name=t))}onValueChanged(t){this.catRadioGroup.forEach((e=>e.checked=e.value===t));this.updateTabIndex()}onDisabledChanged(t){this.catRadioGroup.forEach((e=>e.disabled=e.disabled||t))}onLabelLeftChanged(t){this.catRadioGroup.forEach((e=>e.labelLeft=e.labelLeft||t))}componentDidLoad(){this.init();this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-RADIO"))&&this.init()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)&&this.catRadioGroup.length){const e=this.catRadioGroup.filter((t=>!t.disabled));const a=document.activeElement;const i=this.catRadioGroup.findIndex((t=>t===a));const r=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const n=i<0?0:(i+r+e.length)%e.length;e[n].doFocus();e[n].shadowRoot?.querySelector("input")?.click();this.updateTabIndex();t.preventDefault()}}onInput(t){const e=this.catRadioGroup.find((e=>e===t.target));if(e?.localName==="cat-radio"){this.value=e?.checked?e?.value:undefined;this.catChange.emit(this.value)}}onFocus(t){if(!t.relatedTarget){this.catBlur.emit(t)}}onBlur(t){if(!t.relatedTarget){this.catBlur.emit(t)}}render(){return e("div",{key:"af9aff52c285bb32986d27c4f062f7ca8dbe394e",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"e4542e17427cdd2d31e38276afe5d240f5b9e6cf"}))}init(){this.catRadioGroup=Array.from(this.hostElement.querySelectorAll(`cat-radio`));this.onNameChanged(this.name);this.onValueChanged(this.value);this.onDisabledChanged(this.disabled);this.onLabelLeftChanged(this.labelLeft)}updateTabIndex(){if(this.catRadioGroup.length){this.catRadioGroup.forEach((t=>t.shadowRoot?.querySelector("input")?.setAttribute("tabindex","-1")));const t=this.catRadioGroup.findIndex((t=>t.checked));this.catRadioGroup[t>=0?t:0].shadowRoot?.querySelector("input")?.setAttribute("tabindex","0")}}get hostElement(){return i(this)}static get watchers(){return{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}}};lo.style=so;const ho=":host{overflow:hidden;position:relative;display:flex}:host([hidden]){display:none}.shadow-bottom,.shadow-right,.shadow-left,.shadow-top{position:absolute;transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}.shadow-top{z-index:2;width:100%;top:0}.shadow-left{z-index:4;height:100%;left:0}.shadow-right{z-index:4;height:100%;right:0}.shadow-bottom{z-index:2;width:100%;bottom:0}.scrollable-wrapper{position:absolute;inset:0;pointer-events:none}.scrollable-wrapper.cat-scrollable-top .shadow-top,.scrollable-wrapper.cat-scrollable-bottom .shadow-bottom,.scrollable-wrapper.cat-scrollable-left .shadow-left,.scrollable-wrapper.cat-scrollable-right .shadow-right{box-shadow:0 0 4px 1px rgba(16, 29, 48, 0.2)}.scrollable-content{width:100%;overflow:hidden}.scrollable-content.scroll-x{overflow-x:auto}.scrollable-content.scroll-y{overflow-y:auto}.scrollable-content.no-overscroll{overscroll-behavior:contain}";const uo=ho;const fo=class{constructor(e){t(this,e);this.scrolledTop=r(this,"scrolledTop",7);this.scrolledLeft=r(this,"scrolledLeft",7);this.scrolledRight=r(this,"scrolledRight",7);this.scrolledBottom=r(this,"scrolledBottom",7);this.init=new A;this.destroyed=new A;this.resizedEntries=new A;this.resizedObserver=new ResizeObserver((t=>this.resizedEntries.next(t)));this.noShadowX=false;this.noShadowY=false;this.noOverflowX=false;this.noOverflowY=false;this.noOverscroll=false;this.noScrolledInit=false;this.scrolledBuffer=0}componentDidRender(){if(this.scrollElement){this.scrolled=tt(this.scrollElement,"scroll").pipe(Ct(this.destroyed));this.resizedObserver.observe(this.scrollElement)}if(this.scrollWrapperElement){this.resizedObserver.observe(this.scrollWrapperElement)}this.attachEmitter("left",this.scrolledLeft);this.attachEmitter("right",this.scrolledRight);this.attachEmitter("bottom",this.scrolledBottom);this.attachEmitter("top",this.scrolledTop);ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(fo.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),yt(),Ct(this.destroyed)).subscribe((({top:t,left:e,right:a,bottom:i})=>{this.toggleClass("cat-scrollable-top",t);this.toggleClass("cat-scrollable-left",e);this.toggleClass("cat-scrollable-right",a);this.toggleClass("cat-scrollable-bottom",i)}))}componentDidLoad(){if(!this.noScrolledInit){this.init.next()}}disconnectedCallback(){this.init.complete();this.destroyed.next();this.destroyed.complete();this.resizedObserver.disconnect()}render(){return[e("div",{key:"d2c0966e736fe4da66b4ff4c17ce51b914bc4b8d",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{key:"a0b25b995b5f75d1c09d4dc982ceebe9a8c904b8",class:"shadow-top"}),!this.noShadowX&&e("div",{key:"02e550e37511bff64e9c8c2bd09c41858fdd3930",class:"shadow-left"}),!this.noShadowX&&e("div",{key:"debb835bfcf815837e14b1378190e90a243a1af5",class:"shadow-right"}),!this.noShadowY&&e("div",{key:"d646f92372ab80246f0164c672812854d6c1c946",class:"shadow-bottom"})),e("div",{key:"e24d26d9c11070b8b0d5a66da3bcaeb12bf3532c",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"6923a1a06201e1997c80af316d57d0654312dca4"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(fo.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),yt(),ct((t=>t)),Ct(this.destroyed)).subscribe((()=>e.emit()))}getScrollOffset(t){if(this.scrollElement){switch(t){case"top":return this.scrollElement.scrollTop;case"left":return this.scrollElement.scrollLeft;case"right":return this.scrollElement.scrollWidth-this.scrollElement.clientWidth-this.scrollElement.scrollLeft;case"bottom":return this.scrollElement.scrollHeight-this.scrollElement.clientHeight-this.scrollElement.scrollTop;default:return 0}}return 0}toggleClass(t,e){if(e){this.scrollWrapperElement?.classList.add(t)}else{this.scrollWrapperElement?.classList.remove(t)}}};fo.THROTTLE=50;fo.style=uo;var po="__autosizeInputGhost";var bo={" ":"nbsp","<":"lt",">":"gt"};function mo(t){return"&"+bo[t]+";"}function go(t){return t.replace(/\s|<|>/g,mo)}function vo(){var t=document.createElement("div");t.id=po;t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;";document.body.appendChild(t);return t}var yo=function(t,e){var a=window.getComputedStyle(t);var i="box-sizing:"+a.boxSizing+";border-left:"+a.borderLeftWidth+" solid red"+";border-right:"+a.borderRightWidth+" solid red"+";font-family:"+a.fontFamily+";font-feature-settings:"+a.fontFeatureSettings+";font-kerning:"+a.fontKerning+";font-size:"+a.fontSize+";font-stretch:"+a.fontStretch+";font-style:"+a.fontStyle+";font-variant:"+a.fontVariant+";font-variant-caps:"+a.fontVariantCaps+";font-variant-ligatures:"+a.fontVariantLigatures+";font-variant-numeric:"+a.fontVariantNumeric+";font-weight:"+a.fontWeight+";letter-spacing:"+a.letterSpacing+";margin-left:"+a.marginLeft+";margin-right:"+a.marginRight+";padding-left:"+a.paddingLeft+";padding-right:"+a.paddingRight+";text-indent:"+a.textIndent+";text-transform:"+a.textTransform;function r(){var e=t.value||t.getAttribute("placeholder")||"";var a=document.getElementById(po)||vo();a.style.cssText+=i;a.innerHTML=go(e);var r=window.getComputedStyle(a).width;t.style.width=r;return r}t.addEventListener("input",r);var n=r();if(e&&e.minWidth&&n!=="0px"){t.style.minWidth=n}return function(){t.removeEventListener("input",r);var e=document.getElementById(po);if(e){e.parentNode.removeChild(e)}}};const ko=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}button.cat-text-primary,button.cat-link-primary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}button.cat-text-primaryInverted,button.cat-link-primaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}button.cat-text-secondary,button.cat-link-secondary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}button.cat-text-secondaryInverted,button.cat-link-secondaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}button.cat-text-info,button.cat-link-info{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-info:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-info:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}button.cat-text-success,button.cat-link-success{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-success:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-success:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}button.cat-text-warning,button.cat-link-warning{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-warning:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-warning:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}button.cat-text-danger,button.cat-link-danger{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-danger:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-danger:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.select-field,.select-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.select-field.select-horizontal{flex-direction:row;gap:1rem}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;padding:0.25rem;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.select-wrapper:not(.select-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.select-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.select-wrapper.select-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.select-wrapper:has(input:-webkit-autofill),.select-wrapper:has(input:-webkit-autofill):hover,.select-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{display:inline-block;padding-left:0.5rem}.select-wrapper-inner>cat-avatar+.select-input{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-multiple .select-wrapper-inner{flex-wrap:wrap}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 125ms linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.icon-suffix{padding:0.25rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:fixed;right:0;background:white;display:none;overflow:auto;box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);width:max-content;top:0;left:0}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem}.select-option-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-option-text{flex:1 1 0%;min-width:0}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-wrap:break-word;word-break:break-word}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const xo=ko;const wo={term:"",isOpen:false,isLoading:false,isFirstLoading:true,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let zo=0;let Io=0;const Do=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.catChange=r(this,"catChange",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${zo++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=wo;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.multiple=false;this.debounce=250;this.placement="bottom-start";this.value=undefined;this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.clearable=false;this.tags=false;this.tagHint=undefined;this.noItems=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}onConnectorChanged(t){this.reset(t);this.resolve()}onValueChanged(){!this.valueChangedBySelection?this.resolve():this.valueChangedBySelection=false}onErrorsChanged(t,e,a=true){if(!Vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}onStateChanged(t,e){const a=a=>t[a]!==e[a];if(a("isOpen")){this.update()}if(a("activeOptionIndex")&&this.state.activeOptionIndex>=0){this.dropdown?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)?.scrollIntoView({block:"nearest"})}if(a("selection")){let t;if(!this.multiple&&this.state.selection.length){this.hide()}const a=this.state.selection.map((t=>t.item.id));if(!this.tags){if(this.multiple){t=a}else{t=a.length?a[0]:""}}else{const e=a.filter((t=>!t.startsWith(`select-${this.id}-tag`)));const i=this.state.selection.filter((t=>t.item.id.startsWith(`select-${this.id}-tag`))).map((t=>t.render.label));if(this.multiple){t={ids:e,tags:i}}else{t={id:e.length?e[0]:"",tag:i.length?i[0]:""}}}if(!e.isResolving){this.valueChangedBySelection=true;this.value=t}this.catChange.emit();this.showErrorsIfTimeout()}}componentDidLoad(){if(this.input){yo(this.input,{minWidth:true})}if(this.trigger&&this.dropdown){Lr(this.trigger,this.dropdown,(()=>this.update()))}}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onBlur(t){if(!this.multiple&&this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}this.hide();if(!this.multiple&&(!this.tags||!this.state.selection?.length)){if(this.state.tempSelection?.length){this.patchState({activeSelectionIndex:-1,selection:this.state.tempSelection,tempSelection:[],options:[],term:this.state.tempSelection[0].render.label})}else if(!this.state.selection?.length){this.patchState({activeSelectionIndex:-1,selection:[],tempSelection:[],options:[],term:""})}}else{this.patchState({activeSelectionIndex:-1})}this.catBlur.emit(t);if(Vn(this.errorUpdate)){this.showErrors()}}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(t.key)){this.onArrowKeyDown(t)}else if(["Enter"," "].includes(t.key)&&e){if(this.tags&&this.state.activeOptionIndex===0&&this.state.options[0].item.id===`select-${this.id}-option-tag`){t.preventDefault();if(this.multiple){this.toggleTag(this.state.options[0])}else{this.createTag(this.state.options[0].render.label)}}else if(this.state.activeOptionIndex>=0){t.preventDefault();if(this.multiple){this.toggle(this.state.options[this.state.activeOptionIndex])}else{this.select(this.state.options[this.state.activeOptionIndex])}}else if(this.tags&&t.key==="Enter"&&this.state.activeOptionIndex<0){this.createTag(this.state.term)}}else if(t.key==="Escape"){if(this.hide()){t.stopPropagation()}}else if(t.key==="Backspace"||t.key==="Delete"){this.input?.focus();if(!this.multiple||!this.state.term||this.input?.selectionStart===0&&t.key==="Backspace"){if(this.state.activeSelectionIndex>=0){this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id)}else if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:this.state.term?[...this.state.selection]:[]})}}}else if(t.key==="Tab"){this.trigger?.setAttribute("tabindex","-1");if(this.multiple){this.patchState({activeSelectionIndex:-1,activeOptionIndex:-1})}else if(this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}}else if(t.key.length===1){this.input?.focus()}}onKeyUp(t){if(t.key==="Tab"&&!t.shiftKey){this.hostElement.shadowRoot?.activeElement===this.trigger&&this.input?.focus();if(this.hostElement.shadowRoot?.activeElement===this.input){this.show()}}else if(t.key==="Tab"&&t.shiftKey){const t=this.trigger?.querySelector(`#select-clear-btn-${this.id}`);if(t){this.hostElement.shadowRoot?.activeElement===t&&this.show()}else{this.show()}}}async doFocus(t){this.input?.focus(t)}async doBlur(){this.input?.blur()}async clear(){this.clearInput()}async connect(t){this.connector=t;let e;this.subscription?.unsubscribe();this.subscription=this.term$.asObservable().pipe(ut((t=>t?nt(this.debounce):C(0))),yt(),At((()=>e=this.more$.pipe(ct((()=>!this.state.isLoading)),It((t=>t+1),0),Dt(0)))),Mt((a=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(a,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements,isFirstLoading:false}))),Rt((t=>!t.last),true),It(((t,e)=>[...t,...e.content]),[]))))).subscribe((e=>{const a=this.toSelectItems(t,e);if(this.tags&&this.state.term.trim().length&&!a.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))){let t;if(this.isTagSelected(this.state.term)){t=this.state.selection.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))?.render.label}a.unshift({item:{id:`select-${this.id}-option-tag`},render:{label:t?t:this.state.term}})}this.patchState({options:a})}))}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"4ffaec1ec7c59635d3e923912e5bb5b554661973"},e("div",{key:"ad9ad59ff47ab4fe9c9485da344b0be8f030f824",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"d87e3451ded9630ef471c6a0d0230f73bf2001f0",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"0eb6bd92232da327fd11a5b8fa5108064216b98d",htmlFor:`select-${this.id}-input`,part:"label"},e("span",{key:"29b3bc2a6300cf116e85b598c43bc3d590bfca40",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"105d69c1c4ebce966d207248d0919713402775fc",name:"label"})||this.label,e("div",{key:"60d737d4bc621e64c4d60a4454c81d5cd2f14036",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"3ff4fc174c6769300fecde9b4f3785e7f510b3c5",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"44beff5fb235a6ecfe4d3bde6173309ab9374b7d",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"))))),e("div",{key:"ca853307f93adc14b4ebe5de1f0b5cd255d438d7",class:"select-container"},e("div",{key:"fc56c44f4d6b27ca4d7d1c3f344bef6c5495ae84",class:{"select-wrapper":true,"select-disabled":this.disabled,"select-invalid":this.invalid},ref:t=>this.trigger=t,id:this.id,role:"combobox","aria-expanded":this.state.isOpen||this.isPillboxActive(),"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-required":this.required?"true":false,"aria-activedescendant":this.activeDescendant,onClick:t=>this.onClick(t)},e("div",{key:"77d3a48ea7ad111136fb1513aaeb6c3b15533436",class:"select-wrapper-inner"},this.multiple&&this.state.selection.length?e("div",{id:`select-pillbox-${this.id}`,role:"listbox","aria-orientation":"horizontal",class:"select-pills"},this.state.selection.map(((t,a)=>e("span",{class:{pill:true,"select-no-open":true,"select-option-active":this.state.activeSelectionIndex===a},role:"option","aria-selected":"true",id:`select-${this.id}-selection-${a}`},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",null,t.render.label),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:I.t("select.deselect"),onClick:()=>this.deselect(t.item.id),tabIndex:-1,"data-dropdown-no-close":true}))))):this.state.selection.length&&this.state.selection[0].render.avatar?e("cat-avatar",{label:this.state.selection[0].render.label,round:this.state.selection[0].render.avatar.round,src:this.state.selection[0].render.avatar.src,icon:this.state.selection[0].render.avatar.icon,initials:this.state.selection[0].render.avatar.initials??""}):null,e("input",{key:"a4e438192ecee41d5acf77de45a1526876409a0f","data-test":this.testId,...this.nativeAttributes,part:"input",id:`select-${this.id}-input`,class:"select-input",role:"combobox",ref:t=>this.input=t,"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-activedescendant":this.activeDescendant,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,"aria-autocomplete":"list",onInput:this.onInput.bind(this),value:!this.multiple?this.state.term:undefined,placeholder:this.placeholder,disabled:this.disabled||this.state.isResolving})),this.state.isResolving&&e("cat-spinner",{key:"04d53d0d39bc429a6ac9a479c46f42c6b03a9283"}),this.invalid&&e("cat-icon",{key:"d21136d141632914fc176ea1939164a4d40dc446",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),(this.state.selection.length||this.state.term.length)&&!this.disabled&&!this.state.isResolving&&this.clearable?e("cat-button",{id:`select-clear-btn-${this.id}`,iconOnly:true,icon:"$cat:input-close",variant:"text",size:"s",a11yLabel:I.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{key:"cd5c84bbc7b04b28acda86d656b2ea9835cbb439",iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?I.t("select.close"):I.t("select.open"),"aria-controls":`select-listbox-${this.id}`,"aria-expanded":this.state.isOpen,tabIndex:-1,disabled:this.disabled||this.state.isResolving,"data-dropdown-no-close":true})),this.hasHint&&e(oe,{key:"d0f3f4f080abf2136e681161802f0b332591a30a",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"1fb0555801f6793b6351dbc19f2eba12c7292593",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{key:"8eea85eea2b000f29d690aafc7fbae106bf275e5",class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{key:"fa0415a3459967bc8a8591c94e3227c8fb99443d",class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isFirstLoading?Array.from(Array(Do.SKELETON_COUNT)).map((()=>e("li",{class:"select-option-loading"},e("cat-skeleton",{variant:"body",lines:1}),e("cat-skeleton",{variant:"body",lines:1})))):!this.state.options.length&&!this.tags&&e("li",{class:"select-option-empty"},this.noItems?this.noItems:I.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}get optionsList(){return this.state.options.map(((t,a)=>{const i=this.tags&&t.item.id===`select-${this.id}-option-tag`;const r=this.isSelected(t.item.id)||this.tags&&this.isTagSelected(t.render.label);const n=()=>{if(i){return t.render.label+this.tagTextHelp}return t.render.label};return e("li",{role:"option",class:"select-option",id:`select-${this.id}-option-${a}`,"aria-selected":r?"true":"false"},this.multiple?e("cat-checkbox",{class:{"select-option-active":this.state.activeOptionIndex===a},checked:r,tabIndex:-1,labelLeft:true,onFocus:()=>this.input?.focus(),onCatChange:e=>{!i?this.toggle(t):this.toggleTag(t);e.stopPropagation()}},e("span",{slot:"label",class:"select-option-inner"},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description)))):e("div",{class:{"select-option-inner":true,"select-option-single":true,"select-option-active":this.state.activeOptionIndex===a},onFocus:()=>this.input?.focus(),onClick:()=>i?this.createTag(t.render.label):this.select(t),tabIndex:-1},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description))))}))}resolve(){const t=this.connector;if(!t){return}this.patchState({isResolving:true});const e=this.initIds();let a;if(this.tags){a=this.initTags()}const i=e.length?t.resolve(e).pipe(zt()):C([]);i.pipe(dt((()=>C([])))).subscribe((e=>{const i=this.toSelectItems(t,e);if(this.tags){a.filter((t=>!this.isTagSelected(t,i))).forEach(((t,e)=>{const a={id:`select-${this.id}-tag-${e}`,name:t};i.push({item:a,render:{label:a.name}})}))}const r=!this.multiple&&i.length?i[0].render.label:"";this.patchState({isResolving:false,selection:i,term:r,activeOptionIndex:-1});this.term$.next(r);this.input&&(this.input.value=r)}))}toSelectItems(t,e){return e.map((e=>({item:{...e,id:t.customId?t.customId(e):e.id},render:t.render(e)})))}show(){if(!this.state.isOpen&&this.connector){this.connect(this.connector);this.patchState({isOpen:true,isFirstLoading:true,options:[]});this.catOpen.emit();this.term$.next("");this.input?.classList.remove("select-input-transparent-caret")}}hide(){if(this.state.isOpen){this.patchState({isOpen:false,activeOptionIndex:-1});this.catClose.emit();return true}return false}search(t){this.patchState({term:t,activeOptionIndex:-1,activeSelectionIndex:-1});this.term$.next(t)}isSelected(t){return this.state.selection.findIndex((e=>e.item.id===t))>=0}select(t){if(!this.isSelected(t.item.id)){let e;if(this.multiple){e=[...this.state.selection,t]}else{e=[t];this.patchState({term:t.render.label,activeOptionIndex:-1,activeSelectionIndex:-1})}this.patchState({selection:e,tempSelection:[]});if(this.multiple&&this.state.term.trim()&&this.input){this.patchState({term:"",activeOptionIndex:-1});this.term$.next("");this.input.value=""}}this.setTransparentCaret()}deselect(t){if(this.isSelected(t)){this.patchState({selection:this.state.selection.filter((e=>e.item.id!==t)),activeSelectionIndex:-1})}}toggle(t){this.isSelected(t.item.id)?this.deselect(t.item.id):this.tags&&this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.select(t)}clearInput(){if(this.input&&this.state.term){this.patchState({selection:[],term:"",activeOptionIndex:-1,tempSelection:[]});this.term$.next("");this.input.value=""}else{this.patchState({selection:[],tempSelection:[]})}}reset(t){this.connector=t??this.connector;this.subscription?.unsubscribe();this.subscription=undefined;this.state=wo}onClick(t){if(this.disabled){return}const e=t.target;this.trigger?.setAttribute("tabindex","0");this.input?.focus();if(e===this.trigger||e===this.input||e.classList.contains("select-btn")||e.nodeName==="SPAN"){this.state.isOpen?this.hide():this.show()}}onInput(){this.search(this.input?.value.trim()||"");if(!this.multiple){if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:[...this.state.selection]})}if(!this.required&&!this.input?.value.trim()){this.patchState({tempSelection:[]})}}this.show()}update(){if(this.trigger&&this.dropdown){Hr(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Wr(Do.DROPDOWN_OFFSET),Pr()]}).then((({x:t,y:e,placement:a})=>{if(this.dropdown){this.dropdown.dataset.placement=a;Object.assign(this.dropdown.style,{width:`${this.trigger?.clientWidth}px`,left:`${t}px`,top:`${e}px`})}}))}}patchState(t){this.state={...this.state,...t}}isPillboxActive(){return this.state.activeSelectionIndex>=0}get activeDescendant(){let t=undefined;if(this.state.activeOptionIndex>=0){t=`select-${this.id}-option-${this.state.activeOptionIndex}`}else if(this.state.activeSelectionIndex>=0){t=`select-${this.id}-selection-${this.state.activeSelectionIndex}`}return t}onArrowKeyDown(t){let e=false;this.input?.focus();switch(t.key){case"ArrowDown":e=true;this.state.isOpen?this.patchState({activeOptionIndex:Math.min(this.state.activeOptionIndex+1,this.state.options.length-1),activeSelectionIndex:-1}):this.show();break;case"ArrowUp":e=true;this.state.activeOptionIndex>=0?this.patchState({activeOptionIndex:Math.max(this.state.activeOptionIndex-1,-1),activeSelectionIndex:-1}):this.hide();break;case"ArrowLeft":if(this.input?.selectionStart===0){e=true;let t;this.state.activeSelectionIndex>0?t=Math.max(this.state.activeSelectionIndex-1,-1):t=this.state.selection.length-1;this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}break;case"ArrowRight":if(this.state.activeSelectionIndex>=0){e=true;let t=-1;if(this.state.activeSelectionIndex<this.state.selection.length-1){t=Math.min(this.state.activeSelectionIndex+1,this.state.selection.length-1)}else if(!this.state.term){t=0}this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}}if(e){t.preventDefault();t.stopPropagation()}}get tagTextHelp(){return this.tagHint&&!this.isTagSelected(this.state.term)?" ("+this.tagHint+")":""}isTagSelected(t,e=this.state.selection){return e.findIndex((e=>e.render.label.toLowerCase()===t.toLowerCase()))>=0}createTag(t){if(t.trim().length&&!this.isTagSelected(t)){const e=this.value;const a=e?.tags;const i={id:`select-${this.id}-tag-${a?.length?a?.length+Io++:0}`,name:t};this.select({item:i,render:{label:i.name}})}this.setTransparentCaret()}removeTag(t){if(this.isTagSelected(t)){const e=this.state.selection.find((e=>e.render.label.toLowerCase()===t.toLowerCase()));e&&this.deselect(e.item.id)}}toggleTag(t){this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.createTag(t.render.label)}initIds(){let t=[];if(this.value){if(!this.tags){if(this.multiple){t=this.value}else{t=[this.value]}}else{if(this.multiple){const e=this.value;t=e.ids?e.ids:[]}else{const e=this.value;t=e.id?[e.id]:[]}}}return t}initTags(){let t=[];if(this.value){if(this.multiple){const e=this.value;t=e.tags?e.tags:[]}else{const e=this.value;t=e.tag?[e.tag]:[]}}return t}setTransparentCaret(){if(!this.multiple){this.hide();this.input?.classList.add("select-input-transparent-caret")}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=qn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};Do.SKELETON_COUNT=4;Do.DROPDOWN_OFFSET=4;Do.style=xo;const Mo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.multipleSelectAvatar?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})});this.multipleSelectAvatarInitials?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{round:true,initials:`JD`}})});this.multipleSelectTagging?.connect(this.countryConnector);this.singleSelect?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.singleSelectAvatar?.connect(this.countryConnector);this.singleSelectAvatarInitials?.connect({...this.countryConnector,render:t=>({label:t.country,description:t.capital||"No capital",avatar:{round:true,initials:`${t.country.charAt(0)?.toUpperCase()??"J"}${t.capital?.charAt(0)?.toUpperCase()??"D"}`}})});this.singleSelectTagging?.connect(this.countryConnector);setTimeout((()=>this.multipleSelect&&(this.multipleSelect.value=[])),5e3)}render(){return e(a,{key:"0427cd222f128124aa5b7304ecc56f98f82ad601",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"20731907f24cecd4f79bc2b8fb55bf4ca2a8781d",label:"Multiple Select",hint:"This is a hint!",ref:t=>this.multipleSelect=t,value:["1"],placeholder:"Hello World",onCatChange:()=>console.log("Multiple change",this.multipleSelect?.value),onCatBlur:t=>console.log("Multiple blur",t),multiple:true,noItems:"No results",clearable:true,errorUpdate:false},e("span",{key:"b4284b5fa7bd3c80c49900cc901a67ce87b02fba",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"1ae920c166bcffb8c417887ab01830bc9704d82b",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"6928bbfea0b54d3a2d82bdc16de71208934cd4ab",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"ffa816a1e6f4e5e170aeed4c64f75aefb928e800",label:"Multiple with tagging support",hint:"This is a hint!",ref:t=>this.multipleSelectTagging=t,value:{ids:["1"],tags:["Test","Albania","Algeria"]},placeholder:"Select country",onCatChange:()=>console.log("Multiple tagging change",this.multipleSelectTagging?.value),multiple:true,tags:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"a392acd00395251efe86deb5f95de439cb2e2947",label:"Single Select",hint:"This is a hint!",ref:t=>this.singleSelect=t,placeholder:"Search for a country or capital",onCatBlur:t=>console.log("Single blur",t),clearable:true,errorUpdate:false}),e("cat-select",{key:"abe4098459cb27c12ecccd500080ed4b183d4221",label:"Single with img",ref:t=>this.singleSelectAvatar=t,value:"1",placeholder:"Search for a country or capital",clearable:true,errorUpdate:false}),e("cat-select",{key:"59e0e9df2329e1ee7f96a071462a58e7aac8c057",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"bfed29db8e502f705877dd79ad9f584569639a22",overflow:true},e("cat-button",{key:"fda80f359585e24f3fa9cff4567b4c6d0681cc9d",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"180ed85afb561a07ff346bd481503d57c336fbe6",slot:"content",style:{width:"400px"}},e("cat-select",{key:"12efa7508dfcb72cb897a160353958ef2c66a7a0",label:"Single with tagging support",ref:t=>this.singleSelectTagging=t,value:{id:"",tag:"Albania"},placeholder:"Search for a country or capital",onCatChange:()=>console.log("Single change",this.singleSelectTagging?.value),tagHint:"new country",tags:true,clearable:true,errorUpdate:false,style:{width:"90%"}}))))}get countryConnector(){return{resolve:t=>C(t.map((t=>Co.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const a=Co.filter((e=>e.country.toLowerCase().indexOf(t.toLowerCase())===0||e.capital?.toLowerCase().indexOf(t.toLowerCase())===0));const i=a.slice(e*10,e*10+10);return C({last:i.length<10,totalElements:a.length,content:i}).pipe(vt(500))},render:t=>({label:t.country,description:t.capital||"No capital",avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})}}};const Co=[{id:"0",country:"Afghanistan Extra extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large ",capital:"Kabul"},{id:"1",country:"Albania",capital:"Tirana"},{id:"2",country:"Algeria",capital:"Alger"},{id:"3",country:"American Samoa",capital:"Fagatogo"},{id:"4",country:"Andorra",capital:"Andorra la Vella"},{id:"5",country:"Angola",capital:"Luanda"},{id:"6",country:"Anguilla",capital:"The Valley"},{id:"7",country:"Antarctica"},{id:"8",country:"Antigua and Barbuda",capital:"Saint John's"},{id:"9",country:"Argentina",capital:"Buenos Aires"},{id:"10",country:"Armenia",capital:"Yerevan"},{id:"11",country:"Aruba",capital:"Oranjestad"},{id:"12",country:"Australia",capital:"Canberra"},{id:"13",country:"Austria",capital:"Wien"},{id:"14",country:"Azerbaijan",capital:"Baku"},{id:"15",country:"Bahamas",capital:"Nassau"},{id:"16",country:"Bahrain",capital:"al-Manama"},{id:"17",country:"Bangladesh",capital:"Dhaka"},{id:"18",country:"Barbados",capital:"Bridgetown"},{id:"19",country:"Belarus",capital:"Minsk"},{id:"20",country:"Belgium",capital:"Bruxelles [Brussel]"},{id:"21",country:"Belize",capital:"Belmopan"},{id:"22",country:"Benin",capital:"Porto-Novo"},{id:"23",country:"Bermuda",capital:"Hamilton"},{id:"24",country:"Bhutan",capital:"Thimphu"},{id:"25",country:"Bolivia",capital:"La Paz"},{id:"26",country:"Bosnia and Herzegovina",capital:"Sarajevo"},{id:"27",country:"Botswana",capital:"Gaborone"},{id:"28",country:"Bouvet Island"},{id:"29",country:"Brazil",capital:"Brasília"},{id:"30",country:"British Indian Ocean Territory"},{id:"31",country:"Brunei",capital:"Bandar Seri Begawan"},{id:"32",country:"Bulgaria",capital:"Sofia"},{id:"33",country:"Burkina Faso",capital:"Ouagadougou"},{id:"34",country:"Burundi",capital:"Bujumbura"},{id:"35",country:"Cambodia",capital:"Phnom Penh"},{id:"36",country:"Cameroon",capital:"Yaound"},{id:"37",country:"Canada",capital:"Ottawa"},{id:"38",country:"Cape Verde",capital:"Praia"},{id:"39",country:"Cayman Islands",capital:"George Town"},{id:"40",country:"Central African Republic",capital:"Bangui"},{id:"41",country:"Chad",capital:"N'Djam"},{id:"42",country:"Chile",capital:"Santiago de Chile"},{id:"43",country:"China",capital:"Peking"},{id:"44",country:"Christmas Island",capital:"Flying Fish Cove"},{id:"45",country:"Cocos (Keeling) Islands",capital:"West Island"},{id:"46",country:"Colombia",capital:"Santaf"},{id:"47",country:"Comoros",capital:"Moroni"},{id:"48",country:"Congo",capital:"Brazzaville"},{id:"49",country:"Cook Islands",capital:"Avarua"},{id:"50",country:"Costa Rica",capital:"San José"},{id:"51",country:"Croatia",capital:"Zagreb"},{id:"52",country:"Cuba",capital:"La Habana"},{id:"53",country:"Cyprus",capital:"Nicosia"},{id:"54",country:"Czech Republic",capital:"Praha"},{id:"55",country:"Denmark",capital:"Copenhagen"},{id:"56",country:"Djibouti",capital:"Djibouti"},{id:"57",country:"Dominica",capital:"Roseau"},{id:"58",country:"Dominican Republic",capital:"Santo Domingo de Guzm"},{id:"59",country:"East Timor",capital:"Dili"},{id:"60",country:"Ecuador",capital:"Quito"},{id:"61",country:"Egypt",capital:"Cairo"},{id:"62",country:"El Salvador",capital:"San Salvador"},{id:"63",country:"England",capital:"London"},{id:"64",country:"Equatorial Guinea",capital:"Malabo"},{id:"65",country:"Eritrea",capital:"Asmara"},{id:"66",country:"Estonia",capital:"Tallinn"},{id:"67",country:"Ethiopia",capital:"Addis Abeba"},{id:"68",country:"Falkland Islands",capital:"Stanley"},{id:"69",country:"Faroe Islands",capital:"Tórshavn"},{id:"70",country:"Fiji Islands",capital:"Suva"},{id:"71",country:"Finland",capital:"Helsinki [Helsingfors]"},{id:"72",country:"France",capital:"Paris"},{id:"73",country:"French Guiana",capital:"Cayenne"},{id:"74",country:"French Polynesia",capital:"Papeete"},{id:"75",country:"French Southern territories"},{id:"76",country:"Gabon",capital:"Libreville"},{id:"77",country:"Gambia",capital:"Banjul"},{id:"78",country:"Georgia",capital:"Tbilisi"},{id:"79",country:"Germany",capital:"Berlin"},{id:"80",country:"Ghana",capital:"Accra"},{id:"81",country:"Gibraltar",capital:"Gibraltar"},{id:"82",country:"Greece",capital:"Athenai"},{id:"83",country:"Greenland",capital:"Nuuk"},{id:"84",country:"Grenada",capital:"Saint George's"},{id:"85",country:"Guadeloupe",capital:"Basse-Terre"},{id:"86",country:"Guam",capital:"Aga"},{id:"87",country:"Guatemala",capital:"Ciudad de Guatemala"},{id:"88",country:"Guinea",capital:"Conakry"},{id:"89",country:"Guinea-Bissau",capital:"Bissau"},{id:"90",country:"Guyana",capital:"Georgetown"},{id:"91",country:"Haiti",capital:"Port-au-Prince"},{id:"92",country:"Heard Island and McDonald Islands"},{id:"93",country:"Holy See (Vatican City State)",capital:"Citt"},{id:"94",country:"Honduras",capital:"Tegucigalpa"},{id:"95",country:"Hong Kong",capital:"Victoria"},{id:"96",country:"Hungary",capital:"Budapest"},{id:"97",country:"Iceland",capital:"Reykjavík"},{id:"98",country:"India",capital:"New Delhi"},{id:"99",country:"Indonesia",capital:"Jakarta"},{id:"100",country:"Iran",capital:"Tehran"},{id:"101",country:"Iraq",capital:"Baghdad"},{id:"102",country:"Ireland",capital:"Dublin"},{id:"103",country:"Israel",capital:"Jerusalem"},{id:"104",country:"Italy",capital:"Roma"},{id:"105",country:"Ivory Coast",capital:"Yamoussoukro"},{id:"106",country:"Jamaica",capital:"Kingston"},{id:"107",country:"Japan",capital:"Tokyo"},{id:"108",country:"Jordan",capital:"Amman"},{id:"109",country:"Kazakhstan",capital:"Astana"},{id:"110",country:"Kenya",capital:"Nairobi"},{id:"111",country:"Kiribati",capital:"Bairiki"},{id:"112",country:"Kuwait",capital:"Kuwait"},{id:"113",country:"Kyrgyzstan",capital:"Bishkek"},{id:"114",country:"Laos",capital:"Vientiane"},{id:"115",country:"Latvia",capital:"Riga"},{id:"116",country:"Lebanon",capital:"Beirut"},{id:"117",country:"Lesotho",capital:"Maseru"},{id:"118",country:"Liberia",capital:"Monrovia"},{id:"119",country:"Libyan Arab Jamahiriya",capital:"Tripoli"},{id:"120",country:"Liechtenstein",capital:"Vaduz"},{id:"121",country:"Lithuania",capital:"Vilnius"},{id:"122",country:"Luxembourg",capital:"Luxembourg [Luxemburg/L"},{id:"123",country:"Macao",capital:"Macao"},{id:"124",country:"North Macedonia",capital:"Skopje"},{id:"125",country:"Madagascar",capital:"Antananarivo"},{id:"126",country:"Malawi",capital:"Lilongwe"},{id:"127",country:"Malaysia",capital:"Kuala Lumpur"},{id:"128",country:"Maldives",capital:"Male"},{id:"129",country:"Mali",capital:"Bamako"},{id:"130",country:"Malta",capital:"Valletta"},{id:"131",country:"Marshall Islands",capital:"Dalap-Uliga-Darrit"},{id:"132",country:"Martinique",capital:"Fort-de-France"},{id:"133",country:"Mauritania",capital:"Nouakchott"},{id:"134",country:"Mauritius",capital:"Port-Louis"},{id:"135",country:"Mayotte",capital:"Mamoutzou"},{id:"136",country:"Mexico",capital:"Ciudad de M"},{id:"137",country:"Micronesia, Federated States of",capital:"Palikir"},{id:"138",country:"Moldova",capital:"Chisinau"},{id:"139",country:"Monaco",capital:"Monaco-Ville"},{id:"140",country:"Mongolia",capital:"Ulan Bator"},{id:"141",country:"Montenegro",capital:"Podgorica"},{id:"142",country:"Montserrat",capital:"Plymouth"},{id:"143",country:"Morocco",capital:"Rabat"},{id:"144",country:"Mozambique",capital:"Maputo"},{id:"145",country:"Myanmar",capital:"Rangoon (Yangon)"},{id:"146",country:"Namibia",capital:"Windhoek"},{id:"147",country:"Nauru",capital:"Yaren"},{id:"148",country:"Nepal",capital:"Kathmandu"},{id:"149",country:"Netherlands",capital:"Amsterdam"},{id:"150",country:"Netherlands Antilles",capital:"Willemstad"},{id:"151",country:"New Caledonia",capital:"Noum"},{id:"152",country:"New Zealand",capital:"Wellington"},{id:"153",country:"Nicaragua",capital:"Managua"},{id:"154",country:"Niger",capital:"Niamey"},{id:"155",country:"Nigeria",capital:"Abuja"},{id:"156",country:"Niue",capital:"Alofi"},{id:"157",country:"Norfolk Island",capital:"Kingston"},{id:"158",country:"North Korea",capital:"Pyongyang"},{id:"159",country:"Northern Ireland",capital:"Belfast"},{id:"160",country:"Northern Mariana Islands",capital:"Garapan"},{id:"161",country:"Norway",capital:"Oslo"},{id:"162",country:"Oman",capital:"Masqat"},{id:"163",country:"Pakistan",capital:"Islamabad"},{id:"164",country:"Palau",capital:"Koror"},{id:"165",country:"Palestine",capital:"Gaza"},{id:"166",country:"Panama",capital:"Ciudad de Panamá"},{id:"167",country:"Papua New Guinea",capital:"Port Moresby"},{id:"168",country:"Paraguay",capital:"Asunción"},{id:"169",country:"Peru",capital:"Lima"},{id:"170",country:"Philippines",capital:"Manila"},{id:"171",country:"Pitcairn",capital:"Adamstown"},{id:"172",country:"Poland",capital:"Warszawa"},{id:"173",country:"Portugal",capital:"Lisboa"},{id:"174",country:"Puerto Rico",capital:"San Juan"},{id:"175",country:"Qatar",capital:"Doha"},{id:"176",country:"Reunion",capital:"Saint-Denis"},{id:"177",country:"Romania",capital:"Bucuresti"},{id:"178",country:"Russian Federation",capital:"Moscow"},{id:"179",country:"Rwanda",capital:"Kigali"},{id:"180",country:"Saint Helena",capital:"Jamestown"},{id:"181",country:"Saint Kitts and Nevis",capital:"Basseterre"},{id:"182",country:"Saint Lucia",capital:"Castries"},{id:"183",country:"Saint Pierre and Miquelon",capital:"Saint-Pierre"},{id:"184",country:"Saint Vincent and the Grenadines",capital:"Kingstown"},{id:"185",country:"Samoa",capital:"Apia"},{id:"186",country:"San Marino",capital:"San Marino"},{id:"187",country:"Sao Tome and Principe",capital:"São Tomé"},{id:"188",country:"Saudi Arabia",capital:"Riyadh"},{id:"189",country:"Scotland",capital:"Edinburgh"},{id:"190",country:"Senegal",capital:"Dakar"},{id:"191",country:"Serbia",capital:"Belgrade"},{id:"192",country:"Seychelles",capital:"Victoria"},{id:"193",country:"Sierra Leone",capital:"Freetown"},{id:"194",country:"Singapore",capital:"Singapore"},{id:"195",country:"Slovakia",capital:"Bratislava"},{id:"196",country:"Slovenia",capital:"Ljubljana"},{id:"197",country:"Solomon Islands",capital:"Honiara"},{id:"198",country:"Somalia",capital:"Mogadishu"},{id:"199",country:"South Africa",capital:"Pretoria"},{id:"200",country:"South Georgia and the South Sandwich Islands"},{id:"201",country:"South Korea",capital:"Seoul"},{id:"202",country:"South Sudan",capital:"Juba"},{id:"203",country:"Spain",capital:"Madrid"},{id:"204",country:"Sri Lanka",capital:"Colombo, Sri Jayawardenepura Kotte"},{id:"205",country:"Sudan",capital:"Khartum"},{id:"206",country:"Suriname",capital:"Paramaribo"},{id:"207",country:"Svalbard and Jan Mayen",capital:"Longyearbyen"},{id:"208",country:"Swaziland",capital:"Mbabane"},{id:"209",country:"Sweden",capital:"Stockholm"},{id:"210",country:"Switzerland",capital:"Bern"},{id:"211",country:"Syria",capital:"Damascus"},{id:"212",country:"Tajikistan",capital:"Dushanbe"},{id:"213",country:"Tanzania",capital:"Dodoma"},{id:"214",country:"Thailand",capital:"Bangkok"},{id:"215",country:"The Democratic Republic of Congo",capital:"Kinshasa"},{id:"216",country:"Togo",capital:"Lomé"},{id:"217",country:"Tokelau",capital:"Fakaofo"},{id:"218",country:"Tonga",capital:"Nuku'alofa"},{id:"219",country:"Trinidad and Tobago",capital:"Port-of-Spain"},{id:"220",country:"Tunisia",capital:"Tunis"},{id:"221",country:"Turkey",capital:"Ankara"},{id:"222",country:"Turkmenistan",capital:"Ashgabat"},{id:"223",country:"Turks and Caicos Islands",capital:"Cockburn Town"},{id:"224",country:"Tuvalu",capital:"Funafuti"},{id:"225",country:"Uganda",capital:"Kampala"},{id:"226",country:"Ukraine",capital:"Kyiv"},{id:"227",country:"United Arab Emirates",capital:"Abu Dhabi"},{id:"228",country:"United Kingdom",capital:"London"},{id:"229",country:"United States",capital:"Washington"},{id:"230",country:"United States Minor Outlying Islands"},{id:"231",country:"Uruguay",capital:"Montevideo"},{id:"232",country:"Uzbekistan",capital:"Toskent"},{id:"233",country:"Vanuatu",capital:"Port-Vila"},{id:"234",country:"Venezuela",capital:"Caracas"},{id:"235",country:"Vietnam",capital:"Hanoi"},{id:"236",country:"Virgin Islands, British",capital:"Road Town"},{id:"237",country:"Virgin Islands, U.S.",capital:"Charlotte Amalie"},{id:"238",country:"Wales",capital:"Cardiff"},{id:"239",country:"Wallis and Futuna",capital:"Mata-Utu"},{id:"240",country:"Western Sahara",capital:"El-Aai"},{id:"241",country:"Yemen",capital:"Sanaa"},{id:"242",country:"Zambia",capital:"Lusaka"},{id:"243",country:"Zimbabwe",capital:"Harare"}];const Ro=':host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]:not(:last-child)){margin-bottom:1rem}:host([variant=body]:not(:last-child)){margin-bottom:2rem}.skeleton{display:block;border-radius:var(--cat-border-radius-m, 0.25rem);background:var(--background)}.skeleton-circle{border-radius:10rem}.skeleton-xs.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-square,.skeleton-xs.skeleton-circle{width:var(--width, 1.5rem);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-head,.skeleton-xs.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xs.skeleton-head{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-xs.skeleton-body{height:calc(0.75rem - 4px);margin:calc((1rem - 0.75rem + 4px) * 0.5) 0}.skeleton-s.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2rem)}.skeleton-s.skeleton-square,.skeleton-s.skeleton-circle{width:var(--width, 2rem);height:var(--height, 2rem)}.skeleton-s.skeleton-head,.skeleton-s.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-s.skeleton-head{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-s.skeleton-body{height:calc(0.875rem - 4px);margin:calc((1.125rem - 0.875rem + 4px) * 0.5) 0}.skeleton-m.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2.5rem)}.skeleton-m.skeleton-square,.skeleton-m.skeleton-circle{width:var(--width, 2.5rem);height:var(--height, 2.5rem)}.skeleton-m.skeleton-head,.skeleton-m.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-m.skeleton-head{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-m.skeleton-body{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-l.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3rem)}.skeleton-l.skeleton-square,.skeleton-l.skeleton-circle{width:var(--width, 3rem);height:var(--height, 3rem)}.skeleton-l.skeleton-head,.skeleton-l.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-l.skeleton-head{height:calc(1.5rem - 4px);margin:calc((1.75rem - 1.5rem + 4px) * 0.5) 0}.skeleton-l.skeleton-body{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-square,.skeleton-xl.skeleton-circle{width:var(--width, 3.5rem);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-head,.skeleton-xl.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xl.skeleton-head{height:calc(1.75rem - 4px);margin:calc((2rem - 1.75rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-body{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-sheen{background:linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);background-size:300% 100%;animation:sheen var(--speed) ease-in-out infinite}.skeleton-pulse{position:relative;overflow:hidden}.skeleton-pulse::before{content:"";display:block;position:absolute;width:100%;height:100%;background-color:var(--highlight);animation:var(--speed) ease-in-out 0.5s infinite normal none running pulse;opacity:0}@keyframes sheen{0%{background-position:right}}@keyframes pulse{50%{opacity:1}}';const Ao=Ro;const So=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(a,{key:"95992890ce7b8c90068af979179fe6e512cd599c"},Array.from(Array(this.count)).map((()=>e("div",{style:this.style,class:{skeleton:true,[`skeleton-${this.effect}`]:Boolean(this.effect),[`skeleton-${this.variant}`]:Boolean(this.variant),[`skeleton-${this.size}`]:Boolean(this.size)}}))))}get count(){switch(this.variant){case"head":return Math.max(1,this.lines||1);case"body":return Math.max(1,this.lines||3);default:return 1}}get style(){return this.variant==="head"||this.variant==="body"?{"--line-width":`${this.random(50,100)}%`}:undefined}random(t,e){return Math.floor(Math.random()*(e-t+1)+t)}};So.style=Ao;const Fo=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;width:1em;height:1em}.spinner-xs svg{font-size:0.75rem}.spinner-s svg{font-size:1rem}.spinner-m svg{font-size:1.25rem}.spinner-l svg{font-size:1.5rem}.spinner-xl svg{font-size:1.75rem}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";const To=Fo;const $o=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined;this.value=0}render(){return e("span",{key:"8922d0ec7f5474084a39a8b3a4620bee426cea78",role:"progressbar",tabindex:"-1","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true","aria-valuenow":this.value,"aria-valuemin":"0","aria-valuemax":"100",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"6a649c21b27b3dbad3c73a71936566e7e9648254",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"3fb75a339ec6e18d0209e9da2cbf650f2dae4420",cx:"24",cy:"24",r:"21.5"})))}};$o.style=To;const Bo=":host{display:block}:host([hidden]){display:none}";const Eo=Bo;let Oo=0;const No=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.label="";this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.url=undefined;this.urlTarget=undefined;this.deactivated=false;this.noActive=false;this.error=false;this.nativeAttributes=undefined}connectedCallback(){if(!this.hostElement.id){this.hostElement.id=`cat-tab-${Oo++}`}}onClick(t){this.catClick.emit(t)}render(){return e(a,{key:"0db9a9f8449cb69691552450d653d86251a17954"})}get hostElement(){return i(this)}};No.style=Eo;const Lo=':host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color, 235, 236, 240))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab:first-of-type{margin-left:-0.75rem}.cat-tab:last-of-type{margin-right:-0.75rem}.cat-tab::after{opacity:0;content:"";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-error{color:rgb(var(--cat-danger-text-active, 174, 42, 10))}.cat-tab.cat-tab-active::after{opacity:1}';const Wo=Lo;const jo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.tabs=[];this.activeTab="";this.tabsAlign="left"}componentWillLoad(){this.syncTabs()}componentDidLoad(){this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-TAB"))&&this.syncTabs()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onActiveTabChange(t){const e=this.tabs.findIndex((e=>e.id===t));this.catChange.emit({id:t,index:e})}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)){const e=this.hostElement.shadowRoot?.querySelectorAll('cat-button[role="tab"]');const a=Array.from(e??[]).filter((t=>!t.disabled));const i=this.hostElement.shadowRoot?.activeElement;const r=i?a.indexOf(i):-1;const n=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const o=r<0?0:(r+n+a.length)%a.length;a[o].doFocus();t.preventDefault()}}async setActive(t){this.activate(this.tabs.find((e=>e.id===t)))}async setActiveIndex(t){this.activate(this.tabs[t])}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"057726c753ef2e4d5557736488fbffb92774f26f"},this.tabs.map((t=>e("cat-button",{buttonId:t.id,role:"tab",part:"tab",class:{"cat-tab":true,"cat-tab-active":t.id===this.activeTab,"cat-tab-error":t.error},active:t.id===this.activeTab,color:t.error?"danger":t.id===this.activeTab?"primary":"secondary",variant:"text",icon:t.icon?t.error?"$cat:input-error":t.icon:undefined,iconOnly:t.iconOnly,iconRight:t.iconRight,url:t.url,disabled:t.deactivated,urlTarget:t.urlTarget,onCatClick:()=>this.click(t),nativeAttributes:{...t.nativeAttributes},nativeContentAttributes:{"data-text":t.label},"data-dropdown-no-close":true},t.label))))}syncTabs(){this.tabs=Array.from(this.hostElement.querySelectorAll("cat-tab"));this.activeTab=this.activeTab||this.tabs.filter((t=>this.canActivate(t)&&!t.noActive))[0]?.id}click(t){if(this.canActivate(t)){t.click();if(!t.noActive){this.activate(t)}}}activate(t){if(!t){this.activeTab=""}else if(this.canActivate(t)){this.activeTab=t.id}}canActivate(t){return!t.deactivated&&!t.url&&t.id!==this.activeTab}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};jo.style=Wo;const Po=".label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}button.cat-text-primary,button.cat-link-primary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}button.cat-text-primaryInverted,button.cat-link-primaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}button.cat-text-secondary,button.cat-link-secondary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}button.cat-text-secondaryInverted,button.cat-link-secondaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}button.cat-text-info,button.cat-link-info{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-info:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-info:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}button.cat-text-success,button.cat-link-success{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-success:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-success:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}button.cat-text-warning,button.cat-link-warning{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-warning:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-warning:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}button.cat-text-danger,button.cat-link-danger{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-danger:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-danger:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}:host{display:flex;flex-direction:column;gap:0.5rem}input{font:inherit;margin:0;min-width:20rem;padding:0.375rem 0;flex:1 1 auto;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.25rem;padding:0.25rem 0.75rem;min-height:2rem;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);flex-wrap:wrap;}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.tag-pill{display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.tag-pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0}.tag-pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.icon-suffix{align-self:center}.input-inner-wrapper{flex:1 1 auto;display:flex}";const Yo=Po;let Ho=0;const _o=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Ho++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.tags=[];this.errorMap=undefined;this.requiredMarker="optional";this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.nativeAttributes=undefined;this.testId=undefined;this.value=undefined;this.clearable=false;this.errors=undefined;this.errorUpdate=0;this.tagCreationChars=[" "];this.addOnBlur=false}get id(){return this.identifier||this._id}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["Enter",...this.tagCreationChars].includes(t.key)&&e){t.preventDefault();this.addInputValue()}else if(["Backspace"].includes(t.key)&&this.input?.selectionStart===0&&(this.value?.length??0)>0&&e){this.value=this.value?.slice(0,-1)??[];this.catChange.emit(this.value)}}onErrorsChanged(t,e,a=true){if(!Vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"ea219f15738c0e0b11d7b4134e970141c337a991"},e("div",{key:"54cbafd14a0a243b459b8cce5f5b9199cdef7f59",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"4a916c1ec4f99f3db7e2a31008d0277b1a93690e",htmlFor:`tags-${this.id}-input`,part:"label"},e("span",{key:"999ad493f6ab3b97e9dbf4c62033ad358a77ab57",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"ff636ee0ccd174878eafe0ab709e9c66d3ba4d3e",name:"label"})||this.label,e("div",{key:"b983335cc6f08005495c3784fb9c0de6a39f039f",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"91fd49cfdf2e2a7af3d7d87b91c4f6bc6ed88f3f",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"d59686d3ac8c02b2198fc8013ad34463d8e2afba",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"))))),e("div",{key:"37cc1963186b77dae6e853042db75919316f5a10",class:{"input-wrapper":true,"input-disabled":this.disabled,"input-invalid":this.invalid}},this.value?.map((t=>e("div",{class:"tag-pill"},e("span",null,t),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:I.t("select.deselect"),onClick:()=>this.deselect(t),tabIndex:-1})))),e("div",{key:"37902cc20fcf55f9f8848daa167a765dc7f48ac2",class:"input-inner-wrapper"},e("input",{key:"316e34e90944d96b1e829a49e5041ad865336d63","data-test":this.testId,...this.nativeAttributes,part:"input",id:`tags-${this.id}-input`,class:"tags-input",role:"combobox",ref:t=>this.input=t,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,onInput:this.onInput.bind(this),onBlur:this.onBlur.bind(this),placeholder:this.placeholder,disabled:this.disabled}),this.clearable&&!this.disabled&&(this.value?.length??0)>0&&e("cat-button",{key:"17a6710dbf2aa77eefa25ad97252f78101e1dcee",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":I.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.invalid&&e("cat-icon",{key:"c439cfc9bf8e2579d053cb7efe827665456167ed",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}))),this.hasHint&&e(oe,{key:"577f9da90fb534b99d43b7d35643237d46c6f6da",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}onInput(){const t=[...new Set(this.input?.value?.split(this.createSplitRegex(this.tagCreationChars))??[])].filter((t=>!!t&&!this.value?.includes(t)));if(t.length>1){this.value=[...this.value??[],...t];this.catChange.emit(this.value);if(this.input){this.input.value=""}}}onBlur(){if(this.addOnBlur){this.addInputValue()}}addInputValue(){const t=this.input?.value.trim();if(t&&!this.value?.includes(t)){this.value=[...this.value??[],t];this.catChange.emit(this.value)}if(this.input){this.input.value=""}}clear(){this.value=[];this.catChange.emit(this.value);if(this.input){this.input.value=""}}deselect(t){this.value=this.value?.filter((e=>e!==t));this.catChange.emit(this.value)}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=qn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}createSplitRegex(t){const e=t.map((t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")));e.push("\\n","\\r");const a=`[${e.join("")}]`;return new RegExp(a,"g")}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};_o.style=Yo;var Uo=new Map;function Ko(t){var e=Uo.get(t);e&&e.destroy()}function Vo(t){var e=Uo.get(t);e&&e.update()}var qo=null;"undefined"==typeof window?((qo=function(t){return t}).destroy=function(t){return t},qo.update=function(t){return t}):((qo=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!Uo.has(t)){var e,a=null,i=window.getComputedStyle(t),r=(e=t.value,function(){o({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),n=function(e){t.removeEventListener("autosize:destroy",n),t.removeEventListener("autosize:update",c),t.removeEventListener("input",r),window.removeEventListener("resize",c),Object.keys(e).forEach((function(a){return t.style[a]=e[a]})),Uo.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",n),t.addEventListener("autosize:update",c),t.addEventListener("input",r),window.addEventListener("resize",c),t.style.overflowX="hidden",t.style.wordWrap="break-word",Uo.set(t,{destroy:n,update:c}),c()}function o(e){var r,n,c=e.restoreTextAlign,s=void 0===c?null:c,l=e.testForHeightReduction,d=void 0===l||l,h=i.overflowY;if(0!==t.scrollHeight&&("vertical"===i.resize?t.style.resize="none":"both"===i.resize&&(t.style.resize="horizontal"),d&&(r=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],a=t[1];e.style.scrollBehavior="auto",e.scrollTop=a,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===i.boxSizing?t.scrollHeight-(parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)):t.scrollHeight+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),"none"!==i.maxHeight&&n>parseFloat(i.maxHeight)?("hidden"===i.overflowY&&(t.style.overflow="scroll"),n=parseFloat(i.maxHeight)):"hidden"!==i.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",s&&(t.style.textAlign=s),r&&r(),a!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),a=n),h!==i.overflow&&!s)){var u=i.textAlign;"hidden"===i.overflow&&(t.style.textAlign="start"===u?"end":"start"),o({restoreTextAlign:u,testForHeightReduction:!0})}}function c(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Ko),t},qo.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Vo),t});var Jo=qo;const Go=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}button.cat-text-primary,button.cat-link-primary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}button.cat-text-primaryInverted,button.cat-link-primaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}button.cat-text-secondary,button.cat-link-secondary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}button.cat-text-secondaryInverted,button.cat-link-secondaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}button.cat-text-info,button.cat-link-info{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-info:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-info:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}button.cat-text-success,button.cat-link-success{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-success:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-success:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}button.cat-text-warning,button.cat-link-warning{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-warning:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-warning:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}button.cat-text-danger,button.cat-link-danger{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-danger:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-danger:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400)}:host([hidden]){display:none}.textarea-field,.textarea-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.textarea-field.textarea-horizontal{flex-direction:row;gap:1rem}.textarea-readonly{pointer-events:none}.textarea-wrapper{position:relative;display:flex;flex-direction:column}.icon-suffix{position:absolute;top:calc(0.625rem - 2px);right:0.75rem;background:rgba(255, 255, 255, 0.75);border-radius:100rem}.textarea-disabled .icon-suffix{background:rgba(242, 244, 247, 0.75)}textarea{margin:0;padding:0.625rem 0.75rem;box-sizing:border-box;min-height:2.5rem;font:inherit;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;resize:vertical;--border-color:var(--cat-border-color-dark, 215, 219, 224);}textarea:disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));resize:none}textarea:not(:disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.textarea-invalid textarea{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}textarea:-webkit-autofill,textarea:-webkit-autofill:hover,textarea:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}";const Zo=Go;let Xo=0;const Qo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-textarea-${Xo++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.hasSlottedCounter=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.disabled=false;this.hint=undefined;this.identifier=undefined;this.label="";this.labelHidden=false;this.maxLength=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=3;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');this.hasSlottedCounter=!!this.hostElement.querySelector('[slot="counter"]')}componentDidLoad(){Jo(this.textarea)}async doFocus(t){this.textarea.focus(t)}async doBlur(){this.textarea.blur()}async clear(){this.value="";this.catChange.emit(this.value)}onErrorsChanged(t,e,a=true){if(!Vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"776354bbb03c8cb024d707f005cc53b11a61bc08"},e("div",{key:"8ba766cb2681246058e7bd1082bb8b06d09c3edf",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"75345030c6d4c269f60da416c43ddaf0979f93fc",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"b0332bc73a58d3559e31620687802cf5abf5d92f",htmlFor:this.id,part:"label"},e("span",{key:"177f5cccd3b74c85fa86acc1a9f2b4a0bc05809e",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"775fd2269ed0d8333d1a1630cc6fd4928fe851a0",name:"label"})||this.label,e("div",{key:"a3db8aaaae6a72789e7b1039c5ce685335f081da",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"7b80ecce688910d85b63b230085489bfdde5d833",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"0d047c9fc850c795df761d4b9d7a414861eb38be",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"),(this.maxLength||this.hasSlottedCounter)&&e("div",{key:"d1339f4e4df011c65c57f701d5fc861966ff918d",class:"label-character-count","aria-hidden":"true"},this.hasSlottedCounter?e("slot",{name:"counter"}):`${this.value?.length??0}/${this.maxLength}`))))),e("div",{key:"31af38f5bd63cbf2b315b072421dbbded35ee5ae",class:"textarea-container"},e("div",{key:"5da2c1a1cbcd790a931a1444097919648f73761e",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"bc3f1210a9ed12884e916e050e4f0c93823d0600","data-test":this.testId,...this.nativeAttributes,part:"textarea",ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,autocomplete:this.autoComplete,maxlength:this.maxLength,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,rows:this.rows,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.invalid&&e("cat-icon",{key:"342839d1ebb8fd3fab02d6692ec26b680fb187c6",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(oe,{key:"132bfe8caf387912b7d1156e2b066aecec99ed54",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.textarea.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(Vn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=qn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.textarea;if(!t){this.showErrors()}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Qo.style=Zo;function tc(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function ec(t){return{change:I.t("timepicker.change"),choose:I.t("timepicker.choose"),timeFormat:tc(t)?"12":"24"}}function ac(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function ic(t,e,a){const[,i,r]=t?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];const[,n,o]=a?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];let c=-Infinity;let s=Infinity;if(i!==undefined&&r!==undefined){c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),i,r).getTime()}if(n!==undefined&&o!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),n,o).getTime()}return new Date(Math.min(Math.max(e.getTime(),c),s))}function rc(t,e){const[,a,i]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(a===undefined||i===undefined){return false}return t.getHours()<a||t.getHours()===a&&t.getMinutes()<i}function nc(t,e){const[,a,i]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(a===undefined||i===undefined){return false}return t.getHours()>a||t.getHours()===a&&t.getMinutes()>i}const oc=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.cat-time-addon{margin-left:-1px;display:flex}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const cc=oc;const sc=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=I.getLocale();this.locale=ec(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.valueChangedBySelection=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete="off";this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end";this.step=30}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}onValueChanged(t,e){if(this.valueChangedBySelection){this.valueChangedBySelection=false}else if(t!==e){this.set12hFormat();this.syncValue(t??"")}}componentWillLoad(){this.set12hFormat();this.syncValue(this.value??"")}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){this.input?.mask({time:true,timeFormat:this.locale.timeFormat,timePattern:["h","m"]})}onOpen(){const t=t=>this.hostElement.shadowRoot?.querySelector(t);const e=ic(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const a=t(`[data-time="${ac(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const i=t(`[data-time="${ac(e)}"]`);setTimeout((()=>{(i??a)?.doFocus();(i??a)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;let a=this.value;if(!t){this.selectionTime=null;a=undefined}else{const e=ic(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;a=ac(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==a){this.valueChangedBySelection=true;this.value=a;this.catChange.emit(this.value)}else{this.valueChangedBySelection=false}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"55ddaea80f34a762b7f3b97145f3fc23678764df"},e("cat-input",{key:"b9c72fafc50c6f123478f426d771ae25fa77d7d9",class:"cat-time-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.format(this.selectionTime,false),errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatFocus:t=>this.catFocus.emit(t.detail),onCatBlur:t=>this.onInputBlur(t.detail)},e("span",{key:"fff1bf4b55421e1d3d0a59c6526e2a1489531c73",slot:"label"},this.hasSlottedLabel&&e("slot",{key:"3bf7db213bf73ed33f47b78df88445654feef6f1",name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"cd3bc1b7be142e85106f03ab84f664279f129c02",class:"label-aria"}," (HH:mm)")),e("div",{key:"c56add3522077567621147d80a327c7acfa93110",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{key:"e895941581bd1d6a67eb3f384d6cdf4cd6663ca2",class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"b44d49f1d06c3a78342f60b873ad57d613fe38c5",slot:"addon",placement:this.placement},e("cat-button",{key:"95789ba8b632e442a41059c60a8394efa61a6e54",slot:"trigger",class:"cat-time-toggle",disabled:this.disabled||this.readonly,icon:"$cat:timepicker-clock",iconOnly:true,a11yLabel:this.selectionTime?`${this.locale.change}, ${this.format(this.selectionTime)}`:this.locale.choose}),e("nav",{key:"fd16e5301bdde5fa3f3ac929380d9f8ca7cef75b",slot:"content",class:"cat-nav"},e("ul",{key:"9107c10a9533ef4cef0c0718cba17e097a7d54bd"},this.timeArray().map((t=>{const a=ac(t);const i=rc(t,this.min??null)||nc(t,this.max??null);return e("li",null,e("cat-button",{class:{"cat-nav-item":true,"time-disabled":i},disabled:i,active:a===this.value,color:a===this.value?"primary":"secondary",variant:a===this.value?"filled":"outlined",onCatClick:()=>this.select(t),"data-time":a},this.format(t)))})))))),this.hasSlottedHint&&e("span",{key:"55b0ac7a0d4aa7f743d23a3f0f8461b4f1e44781",slot:"hint"},e("slot",{key:"8f05bb69ab686061bebad8cc6a1364e0bea5267a",name:"hint"}))))}timeArray(){const t=[];const e=new Date(2e3,5,1,0,0,0);let a=new Date(e.getTime());while(a.getDate()===e.getDate()){t.push(a);a=new Date(a.getTime()+this.step*6e4)}return t}syncValue(t){const[,e,a]=t.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(e===undefined||a===undefined){this.select(null);return}this.select(this.locale.timeFormat==="24"?new Date(2e3,5,1,e,a,0):new Date(2e3,5,1,e%12+(this.isAm?0:12),a,0))}set12hFormat(){const[,t]=this.value?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(this.locale.timeFormat==="12"){this.isAm=t===0||t<12}}toggleAm(){if(this.selectionTime){this.select(new Date(this.selectionTime.getTime()+(this.isAm?12:-12)*36e5))}else{this.isAm=!this.isAm}}onInputBlur(t){this.syncValue(this.input?.value??"");this.catBlur.emit(t)}format(t,e=true){const a=t?new Intl.DateTimeFormat(this.language,{hour:"2-digit",minute:"2-digit"}).format(t):"";return e?a:a.replace(/\s?(am|pm)/i,"")}reclamp(t,e){if(!this.value)return;const a=(t==="min"?e:this.min)??null;const i=(t==="max"?e:this.max)??null;const[r,n,o]=this.value.match(/(\d{2}):(\d{2})/)??[];const c=r?ac(ic(a,new Date(2e3,5,1,Number(n),Number(o)),i)):undefined;if(this.value!==c){this.syncValue(c??"");this.catChange.emit(c)}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"],value:["onValueChanged"]}}};sc.style=cc;const lc='.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle-placeholder{width:calc(2rem + 1px);flex-shrink:0}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 125ms ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:"";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 125ms linear;box-shadow:0 1px 2px rgba(27, 31, 38, 0.06), 0 1px 3px rgba(27, 31, 38, 0.1)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem));background:rgb(var(--cat-primary-fill, 255, 255, 255))}.is-disabled .toggle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}:host(.cat-error) .toggle{background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.2)}:host(.cat-error) :checked+.toggle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.toggle::after{background:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.align-center{align-items:center}.align-end{align-items:flex-end}';const dc=lc;let hc=0;const uc=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-toggle-${hc++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.alignment="top";this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"18e3e673ff5447b34457de423f601cc1af767c00"},e("label",{key:"22df334a9f372ee040c3deb3165f82f8fdcef0b0",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"}},e("input",{key:"4472899b180f286d43c5d34aa7821a29db3ffb18","data-test":this.testId,...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,class:"form-check-input",role:"switch",onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"90e342a85fd5e80ccde346aa65aaccacaf2cb919",class:"toggle"}),e("span",{key:"138b08fbf20d83cd74d18b3a7c76ecb87d4b9eb2",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"6753f56609e0447ec0eb5b040c74bd511f6dd4de",name:"label"})||this.label)),this.hasHint&&e("div",{key:"4d5bda25b5e53b0ba8725b41539d08fd9c3bf5f6",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"9006cf3a82f66cf15c255bba4e2720f86b63e8c8",class:"toggle-placeholder"}),e(oe,{key:"17eebfed86f71a33629ee9ed943bcd9e0fe276c5",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}static get delegatesFocus(){return true}get hostElement(){return i(this)}};uc.style=dc;const fc="ontouchstart"in window||navigator.maxTouchPoints>0;const pc=":host{display:contents}:host([hidden]){display:none}.tooltip{--cat-font-color-head:var(--cat-font-color-tooltip, 255, 255, 255);--cat-font-color-body:var(--cat-font-color-tooltip, 255, 255, 255);position:fixed;width:max-content;top:0;left:0;box-sizing:border-box;background-color:rgb(var(--cat-bg-tooltip, 0, 0, 0));border-radius:var(--cat-border-radius-m, 0.25rem);color:rgb(var(--cat-font-color-tooltip, 255, 255, 255));transition:opacity 250ms linear, visibility 250ms linear;visibility:hidden;opacity:0;box-shadow:rgba(0, 0, 0, 0.08) 0 1px 8px 0;z-index:calc(var(--cat-z-index, 1000) + 200);max-width:min(100vw - 0.5rem, 20rem)}.tooltip-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.tooltip-show{opacity:1;visibility:visible}.tooltip p{margin:0}.tooltip-round{border-radius:10rem}.tooltip-s{padding:0.25rem 0.375rem;font-size:0.75rem;line-height:1rem;font-weight:500}.tooltip-s.tooltip-round{padding-left:0.5rem;padding-right:0.5rem}.tooltip-m{padding:0.375rem 0.5rem;font-size:0.875rem;line-height:1.125rem;font-weight:500}.tooltip-m.tooltip-round{padding-left:0.75rem;padding-right:0.75rem}.tooltip-l{padding:0.5rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;font-weight:500}.tooltip-l.tooltip-round{padding-left:1rem;padding-right:1rem}";const bc=pc;let mc=0;const gc=class{constructor(e){t(this,e);this.id=`cat-tooltip-${mc++}`;this.inactive=false;this.open=false;this.content="";this.disabled=false;this.placement="top";this.round=false;this.size="m";this.showDelay=250;this.hideDelay=0;this.longTouchDuration=1e3;this.boundShowListener=this.showListener.bind(this);this.boundHideListener=this.hideListener.bind(this);this.boundWindowTouchStartListener=this.windowTouchStartListener.bind(this);this.boundTouchStartListener=this.touchStartListener.bind(this);this.boundTouchEndListener=this.touchEndListener.bind(this)}handleKeyDown({key:t}){t==="Escape"&&this.hideTooltip()}componentDidLoad(){const t=this.hostElement.shadowRoot?.querySelector("slot");this.trigger=t?.assignedElements?.()?.[0];if(this.trigger&&!this.trigger.hasAttribute("aria-describedby")){this.trigger.setAttribute("aria-describedby",this.id)}if(fc){window.addEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.addEventListener("touchstart",this.boundTouchStartListener);this.trigger?.addEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.addEventListener("focusin",this.boundShowListener);this.trigger?.addEventListener("focusout",this.boundHideListener);this.trigger?.addEventListener("mouseenter",this.boundShowListener);this.trigger?.addEventListener("mouseleave",this.boundHideListener)}}componentWillRender(){this.inactive=this.disabled||!this.content&&!this.hostElement.querySelector('[slot="content"]')}disconnectedCallback(){if(fc){window.removeEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.removeEventListener("touchstart",this.boundTouchStartListener);this.trigger?.removeEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.removeEventListener("mouseenter",this.boundShowListener);this.trigger?.removeEventListener("mouseleave",this.boundHideListener);this.trigger?.removeEventListener("focusin",this.boundShowListener);this.trigger?.removeEventListener("focusout",this.boundHideListener)}}render(){return e(a,{key:"340e9ed5613717d88fc8dde858d16716d0d100e8"},e("slot",{key:"af044aaa5e320540463d1318ba8cf8ed1b02b7e4"}),e("div",{key:"117ed1ce275f03f879aa2f320d9c0b28bfc953bd",ref:t=>this.tooltip=t,id:this.id,role:"tooltip","aria-hidden":!this.open,"aria-live":this.open?"polite":"off",class:{tooltip:true,"tooltip-hidden":this.inactive,"tooltip-round":this.round,[`tooltip-${this.size}`]:Boolean(this.size)}},e("slot",{key:"af0986e70f3d6ba0ad2f791cfa327ae9ebf768f5",name:"content"},e("p",{key:"bfcca7d936fa6e05719a88ace8bacf806b8f423b"},this.content))))}async update(){if(this.trigger&&this.tooltip){await Hr(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Wr(gc.OFFSET),Pr({fallbackAxisSideDirection:"start"}),jr({padding:gc.SHIFT_PADDING})]}).then((({x:t,y:e})=>{if(this.tooltip){Object.assign(this.tooltip.style,{left:`${Math.max(0,t)}px`,top:`${e}px`})}}))}}showListener(){window.clearTimeout(this.hideTimeout);this.hideTimeout=undefined;if(!this.showTimeout){this.showTimeout=window.setTimeout((()=>{this.showTimeout=undefined;this.showTooltip()}),this.showDelay)}}hideListener(){window.clearTimeout(this.showTimeout);this.showTimeout=undefined;if(!this.hideTimeout){this.hideTimeout=window.setTimeout((()=>{this.hideTimeout=undefined;this.hideTooltip()}),this.hideDelay)}}touchStartListener(t){t.stopPropagation();if(!this.touchTimeout){this.touchTimeout=window.setTimeout((()=>{this.touchTimeout=undefined;this.showTooltip()}),this.longTouchDuration)}}touchEndListener(){window.clearTimeout(this.touchTimeout);this.touchTimeout=undefined;this.hideTooltip()}windowTouchStartListener(){this.hideTooltip()}showTooltip(){if(this.trigger&&this.tooltip){this.cleanupFloatingUi=Lr(this.trigger,this.tooltip,(()=>this.update()))}if(!this.inactive){this.open=true;this.tooltip?.classList.add("tooltip-show")}}hideTooltip(){this.open=false;this.tooltip?.classList.remove("tooltip-show");this.cleanupFloatingUi?.();this.cleanupFloatingUi=undefined}get hostElement(){return i(this)}};gc.OFFSET=4;gc.SHIFT_PADDING=4;gc.style=bc;export{$t as cat_alert,Nt as cat_avatar,Jt as cat_badge,Qt as cat_button,ae as cat_button_group,ne as cat_card,de as cat_checkbox,De as cat_date,la as cat_date_inline,Kr as cat_datepicker,Jr as cat_datepicker_inline,zn as cat_dropdown,Mn as cat_form_group,An as cat_icon,Qn as cat_input,ao as cat_pagination,oo as cat_radio,lo as cat_radio_group,fo as cat_scrollable,Do as cat_select,Mo as cat_select_demo,So as cat_skeleton,$o as cat_spinner,No as cat_tab,jo as cat_tabs,_o as cat_tag,Qo as cat_textarea,sc as cat_time,uc as cat_toggle,gc as cat_tooltip};
10
- //# sourceMappingURL=p-0c0af582.entry.js.map
9
+ */function Zr(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,i=Array(e);a<e;a++)i[a]=t[a];return i}function Xr(t){if(Array.isArray(t))return Zr(t)}function Qr(t,e,a){return(e=cn(e))in t?Object.defineProperty(t,e,{value:a,enumerable:true,configurable:true,writable:true}):t[e]=a,t}function tn(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function en(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function an(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}return a}function rn(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?an(Object(a),true).forEach((function(e){Qr(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):an(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}function nn(t){return Xr(t)||tn(t)||sn(t)||en()}function on(t,e){if("object"!=typeof t||!t)return t;var a=t[Symbol.toPrimitive];if(undefined!==a){var i=a.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function cn(t){var e=on(t,"string");return"symbol"==typeof e?e:e+""}function sn(t,e){if(t){if("string"==typeof t)return Zr(t,e);var a={}.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Zr(t,e):undefined}}var ln={activateTrap:function t(e,a){if(e.length>0){var i=e[e.length-1];if(i!==a){i._setPausedState(true)}}var r=e.indexOf(a);if(r===-1){e.push(a)}else{e.splice(r,1);e.push(a)}},deactivateTrap:function t(e,a){var i=e.indexOf(a);if(i!==-1){e.splice(i,1)}if(e.length>0&&!e[e.length-1]._isManuallyPaused()){e[e.length-1]._setPausedState(false)}}};var dn=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var hn=function t(e){return(e===null||e===undefined?undefined:e.key)==="Escape"||(e===null||e===undefined?undefined:e.key)==="Esc"||(e===null||e===undefined?undefined:e.keyCode)===27};var un=function t(e){return(e===null||e===undefined?undefined:e.key)==="Tab"||(e===null||e===undefined?undefined:e.keyCode)===9};var fn=function t(e){return un(e)&&!e.shiftKey};var pn=function t(e){return un(e)&&e.shiftKey};var bn=function t(e){return setTimeout(e,0)};var mn=function t(e){for(var a=arguments.length,i=new Array(a>1?a-1:0),r=1;r<a;r++){i[r-1]=arguments[r]}return typeof e==="function"?e.apply(undefined,i):e};var gn=function t(e){return e.target.shadowRoot&&typeof e.composedPath==="function"?e.composedPath()[0]:e.target};var vn=[];var yn=function t(e,a){var i=(a===null||a===undefined?undefined:a.document)||document;var r=(a===null||a===undefined?undefined:a.trapStack)||vn;var n=rn({returnFocusOnDeactivate:true,escapeDeactivates:true,delayInitialFocus:true,isKeyForward:fn,isKeyBackward:pn},a);var o={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:false,paused:false,manuallyPaused:false,delayInitialFocusTimer:undefined,recentNavEvent:undefined};var c;var s=function t(e,a,i){return e&&e[a]!==undefined?e[a]:n[i||a]};var l=function t(e,a){var i=typeof(a===null||a===undefined?undefined:a.composedPath)==="function"?a.composedPath():undefined;return o.containerGroups.findIndex((function(t){var a=t.container,r=t.tabbableNodes;return a.contains(e)||(i===null||i===undefined?undefined:i.includes(a))||r.find((function(t){return t===e}))}))};var d=function t(e){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},r=a.hasFallback,o=r===undefined?false:r,c=a.params,s=c===undefined?[]:c;var l=n[e];if(typeof l==="function"){l=l.apply(undefined,nn(s))}if(l===true){l=undefined}if(!l){if(l===undefined||l===false){return l}throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var d=l;if(typeof l==="string"){try{d=i.querySelector(l)}catch(t){throw new Error("`".concat(e,'` appears to be an invalid selector; error="').concat(t.message,'"'))}if(!d){if(!o){throw new Error("`".concat(e,"` as selector refers to no known node"))}}}return d};var h=function t(){var e=d("initialFocus",{hasFallback:true});if(e===false){return false}if(e===undefined||e&&!ra(e,n.tabbableOptions)){if(l(i.activeElement)>=0){e=i.activeElement}else{var a=o.tabbableGroups[0];var r=a&&a.firstTabbableNode;e=r||d("fallbackFocus")}}else if(e===null){e=d("fallbackFocus")}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var u=function t(){o.containerGroups=o.containers.map((function(t){var e=ta(t,n.tabbableOptions);var a=ea(t,n.tabbableOptions);var i=e.length>0?e[0]:undefined;var r=e.length>0?e[e.length-1]:undefined;var o=a.find((function(t){return aa(t)}));var c=a.slice().reverse().find((function(t){return aa(t)}));var s=!!e.find((function(t){return Oe(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:a,posTabIndexesFound:s,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:c,nextTabbableNode:function t(i){var r=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var n=e.indexOf(i);if(n<0){if(r){return a.slice(a.indexOf(i)+1).find((function(t){return aa(t)}))}return a.slice(0,a.indexOf(i)).reverse().find((function(t){return aa(t)}))}return e[n+(r?1:-1)]}}}));o.tabbableGroups=o.containerGroups.filter((function(t){return t.tabbableNodes.length>0}));if(o.tabbableGroups.length<=0&&!d("fallbackFocus")){throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")}if(o.containerGroups.find((function(t){return t.posTabIndexesFound}))&&o.containerGroups.length>1){throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}};var f=function t(e){var a=e.activeElement;if(!a){return}if(a.shadowRoot&&a.shadowRoot.activeElement!==null){return f(a.shadowRoot)}return a};var p=function t(e){if(e===false){return}if(e===f(document)){return}if(!e||!e.focus){p(h());return}e.focus({preventScroll:!!n.preventScroll});o.mostRecentlyFocusedNode=e;if(dn(e)){e.select()}};var b=function t(e){var a=d("setReturnFocus",{params:[e]});return a?a:a===false?false:e};var m=function t(e){var a=e.target,i=e.event,r=e.isBackward,c=r===undefined?false:r;a=a||gn(i);u();var s=null;if(o.tabbableGroups.length>0){var h=l(a,i);var f=h>=0?o.containerGroups[h]:undefined;if(h<0){if(c){s=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode}else{s=o.tabbableGroups[0].firstTabbableNode}}else if(c){var p=o.tabbableGroups.findIndex((function(t){var e=t.firstTabbableNode;return a===e}));if(p<0&&(f.container===a||ra(a,n.tabbableOptions)&&!aa(a,n.tabbableOptions)&&!f.nextTabbableNode(a,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];s=Oe(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!un(i)){s=f.nextTabbableNode(a,false)}}else{var g=o.tabbableGroups.findIndex((function(t){var e=t.lastTabbableNode;return a===e}));if(g<0&&(f.container===a||ra(a,n.tabbableOptions)&&!aa(a,n.tabbableOptions)&&!f.nextTabbableNode(a))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];s=Oe(a)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!un(i)){s=f.nextTabbableNode(a)}}}else{s=d("fallbackFocus")}return s};var g=function t(e){var a=gn(e);if(l(a,e)>=0){return}if(mn(n.clickOutsideDeactivates,e)){c.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(mn(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var a=gn(e);var i=l(a,e)>=0;if(i||a instanceof Document){if(i){o.mostRecentlyFocusedNode=a}}else{e.stopImmediatePropagation();var r;var c=true;if(o.mostRecentlyFocusedNode){if(Oe(o.mostRecentlyFocusedNode)>0){var s=l(o.mostRecentlyFocusedNode);var d=o.containerGroups[s].tabbableNodes;if(d.length>0){var u=d.findIndex((function(t){return t===o.mostRecentlyFocusedNode}));if(u>=0){if(n.isKeyForward(o.recentNavEvent)){if(u+1<d.length){r=d[u+1];c=false}}else{if(u-1>=0){r=d[u-1];c=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return Oe(t)>0}))}))){c=false}}}else{c=false}if(c){r=m({target:o.mostRecentlyFocusedNode,isBackward:n.isKeyBackward(o.recentNavEvent)})}if(r){p(r)}else{p(o.mostRecentlyFocusedNode||h())}}o.recentNavEvent=undefined};var y=function t(e){var a=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;o.recentNavEvent=e;var i=m({event:e,isBackward:a});if(i){if(un(e)){e.preventDefault()}p(i)}};var k=function t(e){if(n.isKeyForward(e)||n.isKeyBackward(e)){y(e,n.isKeyBackward(e))}};var x=function t(e){if(hn(e)&&mn(n.escapeDeactivates,e)!==false){e.preventDefault();c.deactivate()}};var w=function t(e){var a=gn(e);if(l(a,e)>=0){return}if(mn(n.clickOutsideDeactivates,e)){return}if(mn(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var z=function t(){if(!o.active){return}ln.activateTrap(r,c);o.delayInitialFocusTimer=n.delayInitialFocus?bn((function(){p(h())})):p(h());i.addEventListener("focusin",v,true);i.addEventListener("mousedown",g,{capture:true,passive:false});i.addEventListener("touchstart",g,{capture:true,passive:false});i.addEventListener("click",w,{capture:true,passive:false});i.addEventListener("keydown",k,{capture:true,passive:false});i.addEventListener("keydown",x);return c};var I=function t(){if(!o.active){return}i.removeEventListener("focusin",v,true);i.removeEventListener("mousedown",g,true);i.removeEventListener("touchstart",g,true);i.removeEventListener("click",w,true);i.removeEventListener("keydown",k,true);i.removeEventListener("keydown",x);return c};var D=function t(e){var a=e.some((function(t){var e=Array.from(t.removedNodes);return e.some((function(t){return t===o.mostRecentlyFocusedNode}))}));if(a){p(h())}};var M=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(D):undefined;var C=function t(){if(!M){return}M.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){M.observe(t,{subtree:true,childList:true})}))}};c={get active(){return o.active},get paused(){return o.paused},activate:function t(e){if(o.active){return this}var a=s(e,"onActivate");var r=s(e,"onPostActivate");var n=s(e,"checkCanFocusTrap");if(!n){u()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=i.activeElement;a===null||a===undefined||a();var c=function t(){if(n){u()}z();C();r===null||r===undefined||r()};if(n){n(o.containers.concat()).then(c,c);return this}c();return this},deactivate:function t(e){if(!o.active){return this}var a=rn({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;I();o.active=false;o.paused=false;C();ln.deactivateTrap(r,c);var i=s(a,"onDeactivate");var l=s(a,"onPostDeactivate");var d=s(a,"checkCanReturnFocus");var h=s(a,"returnFocus","returnFocusOnDeactivate");i===null||i===undefined||i();var u=function t(){bn((function(){if(h){p(b(o.nodeFocusedBeforeActivation))}l===null||l===undefined||l()}))};if(h&&d){d(b(o.nodeFocusedBeforeActivation)).then(u,u);return this}u();return this},pause:function t(e){if(!o.active){return this}o.manuallyPaused=true;return this._setPausedState(true,e)},unpause:function t(e){if(!o.active){return this}o.manuallyPaused=false;if(r[r.length-1]!==this){return this}return this._setPausedState(false,e)},updateContainerElements:function t(e){var a=[].concat(e).filter(Boolean);o.containers=a.map((function(t){return typeof t==="string"?i.querySelector(t):t}));if(o.active){u()}C();return this}};Object.defineProperties(c,{_isManuallyPaused:{value:function t(){return o.manuallyPaused}},_setPausedState:{value:function t(e,a){if(o.paused===e){return this}o.paused=e;if(e){var i=s(a,"onPause");var r=s(a,"onPostPause");i===null||i===undefined||i();I();C();r===null||r===undefined||r()}else{var n=s(a,"onUnpause");var c=s(a,"onPostUnpause");n===null||n===undefined||n();u();z();C();c===null||c===undefined||c()}return this}}});c.updateContainerElements(e);return c};const kn=":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding:0.25rem;min-width:8rem;max-width:16rem}.content{position:fixed;background:white;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);display:none;opacity:0;transform:scale(0.9);transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.content[data-placement^=top]{transform-origin:bottom}.content[data-placement^=top-start]{transform-origin:bottom left}.content[data-placement^=top-end]{transform-origin:bottom right}.content[data-placement^=left]{transform-origin:right}.content[data-placement^=left-start]{transform-origin:right top}.content[data-placement^=left-end]{transform-origin:right bottom}.content[data-placement^=right]{transform-origin:left}.content[data-placement^=right-start]{transform-origin:left top}.content[data-placement^=right-end]{transform-origin:left bottom}.content[data-placement^=bottom]{transform-origin:top}.content[data-placement^=bottom-start]{transform-origin:top left}.content[data-placement^=bottom-end]{transform-origin:top right}.content.show{opacity:1;transform:scale(1);transition:transform 250ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 250ms cubic-bezier(0.05, 0.7, 0.1, 1)}.content.overflow-auto{overflow:auto}";const xn=kn;let wn=0;const zn=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=wn++;this.isOpen=false;this.hasInitialFocus=false;this.placement="bottom-start";this.noAutoClose=false;this.arrowNavigation="vertical";this.noResize=false;this.overflow=false;this.noInitialFocus=false;this.noReturnFocus=false}clickHandler(t){if(!this.trigger){this.hasInitialFocus=this.isEventOriginFromKeyboard(t.detail);this.initTrigger();this.toggle()}const e=t.composedPath();if(!this.noAutoClose&&e.includes(this.content)&&t.target?.slot!=="trigger"&&!e.slice(0,e.indexOf(this.content)).find((t=>this.hasAttribute(t,"data-dropdown-no-close")))){this.close()}}async toggle(){this.isOpen?this.close():this.open()}async open(t){if(!this.trigger){this.initTrigger()}if(this.isOpen===null||this.isOpen){return}this.isOpen=null;this.content.style.display="block";this.hasInitialFocus=t??this.hasInitialFocus;setTimeout((()=>{this.isOpen=true;this.content.classList.add("show");this.trigger?.setAttribute("aria-expanded","true");this.trap=this.trap?this.trap.updateContainerElements(this.content):yn(this.content,{tabbableOptions:{getShadowRoot:true},allowOutsideClick:true,clickOutsideDeactivates:t=>!this.noAutoClose&&!t.composedPath().includes(this.content)&&!t.composedPath().find((t=>this.hasAttribute(t,"data-dropdown-no-close"))),onPostDeactivate:()=>this.close(),onPostActivate:()=>this.catOpen.emit(),setReturnFocus:t=>this.noReturnFocus?false:this.trigger||t,isKeyForward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowRight"||this.arrowNavigation==="vertical"&&t.key==="ArrowDown"){t.preventDefault();return true}return t.key==="Tab"},isKeyBackward:t=>{if(this.arrowNavigation==="horizontal"&&t.key==="ArrowLeft"||this.arrowNavigation==="vertical"&&t.key==="ArrowUp"){t.preventDefault();return true}return t.key==="Tab"&&t.shiftKey},initialFocus:()=>this.hasInitialFocus&&!this.noInitialFocus?undefined:false});this.trap.activate()}))}async close(){if(!this.isOpen){return}this.isOpen=null;this.trap?.deactivate();this.content.classList.remove("show");setTimeout((()=>{this.isOpen=false;this.content.classList.remove("show");this.content.style.display="";this.trigger?.setAttribute("aria-expanded","false");this.catClose.emit()}),Gr)}render(){return e(a,{key:"1a87f171daed4f9eccc40a303f3aba45f3501128"},e("slot",{key:"f74085056470832d32434ebcacdb6d9532177e86",name:"anchor",ref:t=>this.anchorSlot=t}),e("slot",{key:"fdf8879c10e6ad7179487480d2ff0f890bf5f8da",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"1c6b50433220e084ea096c38e14c17625c52e5e5",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"9c8de61eb11c1bb0771b8f0b6a9d7f7f574c928e",name:"content"})))}componentDidLoad(){this.initAnchor()}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();const t=this.trigger.getAttribute("aria-haspopup");this.trigger.setAttribute("aria-haspopup",t??"true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(t=>{this.hasInitialFocus=this.isEventOriginFromKeyboard(t);this.toggle()}));if(!this.anchor){Lr(this.trigger,this.content,(()=>this.update(this.trigger)))}}isEventOriginFromKeyboard(t){return t.detail===0}initAnchor(){this.anchor=(this.anchorSlot?.assignedElements?.()||[])[0];if(this.anchor){Lr(this.anchor,this.content,(()=>this.update(this.anchor)))}}findTrigger(){let t;const e=this.triggerSlot?.assignedElements?.()||[];while(!t&&e.length){const a=e.shift();t=a?.hasAttribute("data-trigger")?a:a?.querySelector("[data-trigger]")??undefined}if(!t){t=na(this.triggerSlot)}if(!t){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return t}update(t){if(t){const e=this.noResize?[]:[Yr({padding:zn.OFFSET,apply({availableWidth:t,availableHeight:e,elements:a}){Object.assign(a.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];Hr(t,this.content,{strategy:"fixed",placement:this.placement,middleware:[Wr(zn.OFFSET),Pr(),...e]}).then((({x:t,y:e,placement:a})=>{this.content.dataset.placement=a;Object.assign(this.content.style,{left:`${t}px`,top:`${e}px`})}))}}hasAttribute(t,e){return t instanceof HTMLElement&&t.hasAttribute(e)}};zn.OFFSET=4;zn.style=xn;const In=":host{display:block}";const Dn=In;const Mn=class{constructor(e){t(this,e);this.formElements=[];this.requiredMarker="auto";this.horizontal=false;this.labelSize=undefined}onRequiredMarkerChanged(t){const e=t==="auto"?this.calculate(this.formElements):t;this.formElements.forEach((t=>!t.requiredMarker?.endsWith("!")&&(t.requiredMarker=e)))}onHorizontalChanged(t){this.formElements.forEach((e=>{e.horizontal=t}))}render(){return e(a,{key:"c9fe233663c9967b3e78334e6994ceb62653c19c",style:{"--label-size":this.labelSize}},e("slot",{key:"49274e5e31644d6f7d042033e975d8b91d6aaea6",onSlotchange:this.onSlotChange.bind(this)}))}onSlotChange(){this.formElements=Array.from(this.hostElement.querySelectorAll("cat-input, cat-textarea, cat-select, cat-datepicker"));this.onRequiredMarkerChanged(this.requiredMarker);this.onHorizontalChanged(this.horizontal)}calculate(t){const e=t.filter((t=>!t.required)).length;const a=t.length-e;return a>=e?"optional":"required"}get hostElement(){return i(this)}static get watchers(){return{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}}};Mn.style=Dn;const Cn=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([hidden]){display:none}span{display:inline-flex}svg{fill:currentColor;stroke:none;transform-origin:center center;height:1em;width:calc(var(--cat-icon-ratio, 1) * 1em)}.icon-xs svg{font-size:0.75rem}.icon-s svg{font-size:1rem}.icon-m svg{font-size:1.25rem}.icon-l svg{font-size:1.5rem}.icon-xl svg{font-size:1.75rem}";const Rn=Cn;const An=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"1e1698413feaee8ca810b50370fc44a5a9f229dc",innerHTML:this.iconSrc||(this.icon?M.getIcon(this.icon):""),"aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",part:"icon",class:{icon:true,[`icon-${this.size}`]:this.size!=="inline"}})}};An.style=Rn;var Sn=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var Fn=function(t,e,a,i,r,n,o,c,s,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=a>=0?a:2;d.numeralThousandsGroupStyle=i||Fn.groupStyle.thousand;d.numeralPositiveOnly=!!r;d.stripLeadingZeroes=n!==false;d.prefix=o||o===""?o:"";d.signBeforePrefix=!!c;d.tailPrefix=!!s;d.delimiter=l||l===""?l:",";d.delimiterRE=l?new RegExp("\\"+l,"g"):""};Fn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};Fn.prototype={getRawValue:function(t){return t.replace(this.delimiterRE,"").replace(this.numeralDecimalMark,".")},format:function(t){var e=this,a,i,r,n,o="";t=t.replace(/[A-Za-z]/g,"").replace(e.numeralDecimalMark,"M").replace(/[^\dM-]/g,"").replace(/^\-/,"N").replace(/\-/g,"").replace("N",e.numeralPositiveOnly?"":"-").replace("M",e.numeralDecimalMark);if(e.stripLeadingZeroes){t=t.replace(/^(-)?0+(?=\d)/,"$1")}i=t.slice(0,1)==="-"?"-":"";if(typeof e.prefix!="undefined"){if(e.signBeforePrefix){r=i+e.prefix}else{r=e.prefix+i}}else{r=i}n=t;if(t.indexOf(e.numeralDecimalMark)>=0){a=t.split(e.numeralDecimalMark);n=a[0];o=e.numeralDecimalMark+a[1].slice(0,e.numeralDecimalScale)}if(i==="-"){n=n.slice(1)}if(e.numeralIntegerScale>0){n=n.slice(0,e.numeralIntegerScale)}switch(e.numeralThousandsGroupStyle){case Fn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case Fn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case Fn.groupStyle.thousand:n=n.replace(/(\d)(?=(\d{3})+$)/g,"$1"+e.delimiter);break}if(e.tailPrefix){return i+n.toString()+(e.numeralDecimalScale>0?o.toString():"")+e.prefix}return r+n.toString()+(e.numeralDecimalScale>0?o.toString():"")}};var Tn=Fn;var $n=function(t,e,a){var i=this;i.date=[];i.blocks=[];i.datePattern=t;i.dateMin=e.split("-").reverse().map((function(t){return parseInt(t,10)}));if(i.dateMin.length===2)i.dateMin.unshift(0);i.dateMax=a.split("-").reverse().map((function(t){return parseInt(t,10)}));if(i.dateMax.length===2)i.dateMax.unshift(0);i.initBlocks()};$n.prototype={initBlocks:function(){var t=this;t.datePattern.forEach((function(e){if(e==="Y"){t.blocks.push(4)}else{t.blocks.push(2)}}))},getISOFormatDate:function(){var t=this,e=t.date;return e[2]?e[2]+"-"+t.addLeadingZero(e[1])+"-"+t.addLeadingZero(e[0]):""},getBlocks:function(){return this.blocks},getValidatedDate:function(t){var e=this,a="";t=t.replace(/[^\d]/g,"");e.blocks.forEach((function(i,r){if(t.length>0){var n=t.slice(0,i),o=n.slice(0,1),c=t.slice(i);switch(e.datePattern[r]){case"d":if(n==="00"){n="01"}else if(parseInt(o,10)>3){n="0"+o}else if(parseInt(n,10)>31){n="31"}break;case"m":if(n==="00"){n="01"}else if(parseInt(o,10)>1){n="0"+o}else if(parseInt(n,10)>12){n="12"}break}a+=n;t=c}}));return this.getFixedDateString(a)},getFixedDateString:function(t){var e=this,a=e.datePattern,i=[],r=0,n=0,o=0,c=0,s=0,l=0,d,h,u,f=false;if(t.length===4&&a[0].toLowerCase()!=="y"&&a[1].toLowerCase()!=="y"){c=a[0]==="d"?0:2;s=2-c;d=parseInt(t.slice(c,c+2),10);h=parseInt(t.slice(s,s+2),10);i=this.getFixedDate(d,h,0)}if(t.length===8){a.forEach((function(t,e){switch(t){case"d":r=e;break;case"m":n=e;break;default:o=e;break}}));l=o*2;c=r<=o?r*2:r*2+2;s=n<=o?n*2:n*2+2;d=parseInt(t.slice(c,c+2),10);h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+4),10);f=t.slice(l,l+4).length===4;i=this.getFixedDate(d,h,u)}if(t.length===4&&(a[0]==="y"||a[1]==="y")){s=a[0]==="m"?0:2;l=2-s;h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+2),10);f=t.slice(l,l+2).length===2;i=[0,h,u]}if(t.length===6&&(a[0]==="Y"||a[1]==="Y")){s=a[0]==="m"?0:4;l=2-.5*s;h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+4),10);f=t.slice(l,l+4).length===4;i=[0,h,u]}i=e.getRangeFixedDate(i);e.date=i;var p=i.length===0?t:a.reduce((function(t,a){switch(a){case"d":return t+(i[0]===0?"":e.addLeadingZero(i[0]));case"m":return t+(i[1]===0?"":e.addLeadingZero(i[1]));case"y":return t+(f?e.addLeadingZeroForYear(i[2],false):"");case"Y":return t+(f?e.addLeadingZeroForYear(i[2],true):"")}}),"");return p},getRangeFixedDate:function(t){var e=this,a=e.datePattern,i=e.dateMin||[],r=e.dateMax||[];if(!t.length||i.length<3&&r.length<3)return t;if(a.find((function(t){return t.toLowerCase()==="y"}))&&t[2]===0)return t;if(r.length&&(r[2]<t[2]||r[2]===t[2]&&(r[1]<t[1]||r[1]===t[1]&&r[0]<t[0])))return r;if(i.length&&(i[2]>t[2]||i[2]===t[2]&&(i[1]>t[1]||i[1]===t[1]&&i[0]>t[0])))return i;return t},getFixedDate:function(t,e,a){t=Math.min(t,31);e=Math.min(e,12);a=parseInt(a||0,10);if(e<7&&e%2===0||e>8&&e%2===1){t=Math.min(t,e===2?this.isLeapYear(a)?29:28:30)}return[t,e,a]},isLeapYear:function(t){return t%4===0&&t%100!==0||t%400===0},addLeadingZero:function(t){return(t<10?"0":"")+t},addLeadingZeroForYear:function(t,e){if(e){return(t<10?"000":t<100?"00":t<1e3?"0":"")+t}return(t<10?"0":"")+t}};var Bn=$n;var En=function(t,e){var a=this;a.time=[];a.blocks=[];a.timePattern=t;a.timeFormat=e;a.initBlocks()};En.prototype={initBlocks:function(){var t=this;t.timePattern.forEach((function(){t.blocks.push(2)}))},getISOFormatTime:function(){var t=this,e=t.time;return e[2]?t.addLeadingZero(e[0])+":"+t.addLeadingZero(e[1])+":"+t.addLeadingZero(e[2]):""},getBlocks:function(){return this.blocks},getTimeFormatOptions:function(){var t=this;if(String(t.timeFormat)==="12"){return{maxHourFirstDigit:1,maxHours:12,maxMinutesFirstDigit:5,maxMinutes:60}}return{maxHourFirstDigit:2,maxHours:23,maxMinutesFirstDigit:5,maxMinutes:60}},getValidatedTime:function(t){var e=this,a="";t=t.replace(/[^\d]/g,"");var i=e.getTimeFormatOptions();e.blocks.forEach((function(r,n){if(t.length>0){var o=t.slice(0,r),c=o.slice(0,1),s=t.slice(r);switch(e.timePattern[n]){case"h":if(parseInt(c,10)>i.maxHourFirstDigit){o="0"+c}else if(parseInt(o,10)>i.maxHours){o=i.maxHours+""}break;case"m":case"s":if(parseInt(c,10)>i.maxMinutesFirstDigit){o="0"+c}else if(parseInt(o,10)>i.maxMinutes){o=i.maxMinutes+""}break}a+=o;t=s}}));return this.getFixedTimeString(a)},getFixedTimeString:function(t){var e=this,a=e.timePattern,i=[],r=0,n=0,o=0,c=0,s=0,l=0,d,h,u;if(t.length===6){a.forEach((function(t,e){switch(t){case"s":r=e*2;break;case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;s=n;c=r;d=parseInt(t.slice(c,c+2),10);h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+2),10);i=this.getFixedTime(u,h,d)}if(t.length===4&&e.timePattern.indexOf("s")<0){a.forEach((function(t,e){switch(t){case"m":n=e*2;break;case"h":o=e*2;break}}));l=o;s=n;d=0;h=parseInt(t.slice(s,s+2),10);u=parseInt(t.slice(l,l+2),10);i=this.getFixedTime(u,h,d)}e.time=i;return i.length===0?t:a.reduce((function(t,a){switch(a){case"s":return t+e.addLeadingZero(i[2]);case"m":return t+e.addLeadingZero(i[1]);case"h":return t+e.addLeadingZero(i[0])}}),"")},getFixedTime:function(t,e,a){a=Math.min(parseInt(a||0,10),60);e=Math.min(e,60);t=Math.min(t,60);return[t,e,a]},addLeadingZero:function(t){return(t<10?"0":"")+t}};var On=En;var Nn=function(t,e){var a=this;a.delimiter=e||e===""?e:" ";a.delimiterRE=e?new RegExp("\\"+e,"g"):"";a.formatter=t};Nn.prototype={setFormatter:function(t){this.formatter=t},format:function(t){var e=this;e.formatter.clear();t=t.replace(/[^\d+]/g,"");t=t.replace(/^\+/,"B").replace(/\+/g,"").replace("B","+");t=t.replace(e.delimiterRE,"");var a="",i,r=false;for(var n=0,o=t.length;n<o;n++){i=e.formatter.inputDigit(t.charAt(n));if(/[\s()-]/g.test(i)){a=i;r=true}else{if(!r){a=i}}}a=a.replace(/[()]/g,"");a=a.replace(/[\s-]/g,e.delimiter);return a}};var Ln=Nn;var Wn={blocks:{uatp:[4,5,6],amex:[4,6,5],diners:[4,6,4],discover:[4,4,4,4],mastercard:[4,4,4,4],dankort:[4,4,4,4],instapayment:[4,4,4,4],jcb15:[4,6,5],jcb:[4,4,4,4],maestro:[4,4,4,4],visa:[4,4,4,4],mir:[4,4,4,4],unionPay:[4,4,4,4],general:[4,4,4,4]},re:{uatp:/^(?!1800)1\d{0,14}/,amex:/^3[47]\d{0,13}/,discover:/^(?:6011|65\d{0,2}|64[4-9]\d?)\d{0,12}/,diners:/^3(?:0([0-5]|9)|[689]\d?)\d{0,11}/,mastercard:/^(5[1-5]\d{0,2}|22[2-9]\d{0,1}|2[3-7]\d{0,2})\d{0,12}/,dankort:/^(5019|4175|4571)\d{0,12}/,instapayment:/^63[7-9]\d{0,13}/,jcb15:/^(?:2131|1800)\d{0,11}/,jcb:/^(?:35\d{0,2})\d{0,12}/,maestro:/^(?:5[0678]\d{0,2}|6304|67\d{0,2})\d{0,12}/,mir:/^220[0-4]\d{0,12}/,visa:/^4\d{0,15}/,unionPay:/^(62|81)\d{0,14}/},getStrictBlocks:function(t){var e=t.reduce((function(t,e){return t+e}),0);return t.concat(19-e)},getInfo:function(t,e){var a=Wn.blocks,i=Wn.re;e=!!e;for(var r in i){if(i[r].test(t)){var n=a[r];return{type:r,blocks:e?this.getStrictBlocks(n):n}}}return{type:"unknown",blocks:e?this.getStrictBlocks(a.general):a.general}}};var jn=Wn;var Pn={noop:function(){},strip:function(t,e){return t.replace(e,"")},getPostDelimiter:function(t,e,a){if(a.length===0){return t.slice(-e.length)===e?e:""}var i="";a.forEach((function(e){if(t.slice(-e.length)===e){i=e}}));return i},getDelimiterREByDelimiter:function(t){return new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g")},getNextCursorPosition:function(t,e,a,i,r){if(e.length===t){return a.length}return t+this.getPositionOffset(t,e,a,i,r)},getPositionOffset:function(t,e,a,i,r){var n,o,c;n=this.stripDelimiters(e.slice(0,t),i,r);o=this.stripDelimiters(a.slice(0,t),i,r);c=n.length-o.length;return c!==0?c/Math.abs(c):0},stripDelimiters:function(t,e,a){var i=this;if(a.length===0){var r=e?i.getDelimiterREByDelimiter(e):"";return t.replace(r,"")}a.forEach((function(e){e.split("").forEach((function(e){t=t.replace(i.getDelimiterREByDelimiter(e),"")}))}));return t},headStr:function(t,e){return t.slice(0,e)},getMaxLength:function(t){return t.reduce((function(t,e){return t+e}),0)},getPrefixStrippedValue:function(t,e,a,i,r,n,o,c,s){if(a===0){return t}if(t===e&&t!==""){return""}if(s&&t.slice(0,1)=="-"){var l=i.slice(0,1)=="-"?i.slice(1):i;return"-"+this.getPrefixStrippedValue(t.slice(1),e,a,l,r,n,o,c,s)}if(i.slice(0,a)!==e&&!c){if(o&&!i&&t)return t;return""}else if(i.slice(-a)!==e&&c){if(o&&!i&&t)return t;return""}var d=this.stripDelimiters(i,r,n);if(t.slice(0,a)!==e&&!c){return d.slice(a)}else if(t.slice(-a)!==e&&c){return d.slice(0,-a-1)}return c?t.slice(0,-a):t.slice(a)},getFirstDiffIndex:function(t,e){var a=0;while(t.charAt(a)===e.charAt(a)){if(t.charAt(a++)===""){return-1}}return a},getFormattedValue:function(t,e,a,i,r,n){var o="",c=r.length>0,s="";if(a===0){return t}e.forEach((function(e,l){if(t.length>0){var d=t.slice(0,e),h=t.slice(e);if(c){s=r[n?l-1:l]||s}else{s=i}if(n){if(l>0){o+=s}o+=d}else{o+=d;if(d.length===e&&l<a-1){o+=s}}t=h}}));return o},fixPrefixCursor:function(t,e,a,i){if(!t){return}var r=t.value,n=a||(i[0]||" ");if(!t.setSelectionRange||!e||e.length+n.length<=r.length){return}var o=r.length*2;setTimeout((function(){t.setSelectionRange(o,o)}),1)},checkFullSelection:function(t){try{var e=window.getSelection()||document.getSelection()||{};return e.toString().length===t.length}catch(t){}return false},setSelection:function(t,e,a){if(t!==this.getActiveElement(a)){return}if(t&&t.value.length<=e){return}if(t.createTextRange){var i=t.createTextRange();i.move("character",e);i.select()}else{try{t.setSelectionRange(e,e)}catch(t){console.warn("The input element type does not support selection")}}},getActiveElement:function(t){var e=t.activeElement;if(e&&e.shadowRoot){return this.getActiveElement(e.shadowRoot)}return e},isAndroid:function(){return navigator&&/android/i.test(navigator.userAgent)},isAndroidBackspaceKeydown:function(t,e){if(!this.isAndroid()||!t||!e){return false}return e===t.slice(0,-1)}};var Yn=Pn;var Hn={assign:function(t,e){t=t||{};e=e||{};t.creditCard=!!e.creditCard;t.creditCardStrictMode=!!e.creditCardStrictMode;t.creditCardType="";t.onCreditCardTypeChanged=e.onCreditCardTypeChanged||function(){};t.phone=!!e.phone;t.phoneRegionCode=e.phoneRegionCode||"AU";t.phoneFormatter={};t.time=!!e.time;t.timePattern=e.timePattern||["h","m","s"];t.timeFormat=e.timeFormat||"24";t.timeFormatter={};t.date=!!e.date;t.datePattern=e.datePattern||["d","m","Y"];t.dateMin=e.dateMin||"";t.dateMax=e.dateMax||"";t.dateFormatter={};t.numeral=!!e.numeral;t.numeralIntegerScale=e.numeralIntegerScale>0?e.numeralIntegerScale:0;t.numeralDecimalScale=e.numeralDecimalScale>=0?e.numeralDecimalScale:2;t.numeralDecimalMark=e.numeralDecimalMark||".";t.numeralThousandsGroupStyle=e.numeralThousandsGroupStyle||"thousand";t.numeralPositiveOnly=!!e.numeralPositiveOnly;t.stripLeadingZeroes=e.stripLeadingZeroes!==false;t.signBeforePrefix=!!e.signBeforePrefix;t.tailPrefix=!!e.tailPrefix;t.swapHiddenInput=!!e.swapHiddenInput;t.numericOnly=t.creditCard||t.date||!!e.numericOnly;t.uppercase=!!e.uppercase;t.lowercase=!!e.lowercase;t.prefix=t.creditCard||t.date?"":e.prefix||"";t.noImmediatePrefix=!!e.noImmediatePrefix;t.prefixLength=t.prefix.length;t.rawValueTrimPrefix=!!e.rawValueTrimPrefix;t.copyDelimiter=!!e.copyDelimiter;t.initValue=e.initValue!==undefined&&e.initValue!==null?e.initValue.toString():"";t.delimiter=e.delimiter||e.delimiter===""?e.delimiter:e.date?"/":e.time?":":e.numeral?",":e.phone?" ":" ";t.delimiterLength=t.delimiter.length;t.delimiterLazyShow=!!e.delimiterLazyShow;t.delimiters=e.delimiters||[];t.blocks=e.blocks||[];t.blocksLength=t.blocks.length;t.root=typeof Sn==="object"&&Sn?Sn:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var _n=Hn;var Un=function(t,e){var a=this;var i=false;if(typeof t==="string"){a.element=document.querySelector(t);i=document.querySelectorAll(t).length>1}else{if(typeof t.length!=="undefined"&&t.length>0){a.element=t[0];i=t.length>1}else{a.element=t}}if(!a.element){throw new Error("[cleave.js] Please check the element")}if(i){try{console.warn("[cleave.js] Multiple input fields matched, cleave.js will only take the first one.")}catch(t){}}e.initValue=a.element.value;a.properties=Un.DefaultProperties.assign({},e);a.init()};Un.prototype={init:function(){var t=this,e=t.properties;if(!e.numeral&&!e.phone&&!e.creditCard&&!e.time&&!e.date&&(e.blocksLength===0&&!e.prefix)){t.onInput(e.initValue);return}e.maxLength=Un.Util.getMaxLength(e.blocks);t.isAndroid=Un.Util.isAndroid();t.lastInputValue="";t.isBackward="";t.onChangeListener=t.onChange.bind(t);t.onKeyDownListener=t.onKeyDown.bind(t);t.onFocusListener=t.onFocus.bind(t);t.onCutListener=t.onCut.bind(t);t.onCopyListener=t.onCopy.bind(t);t.initSwapHiddenInput();t.element.addEventListener("input",t.onChangeListener);t.element.addEventListener("keydown",t.onKeyDownListener);t.element.addEventListener("focus",t.onFocusListener);t.element.addEventListener("cut",t.onCutListener);t.element.addEventListener("copy",t.onCopyListener);t.initPhoneFormatter();t.initDateFormatter();t.initTimeFormatter();t.initNumeralFormatter();if(e.initValue||e.prefix&&!e.noImmediatePrefix){t.onInput(e.initValue)}},initSwapHiddenInput:function(){var t=this,e=t.properties;if(!e.swapHiddenInput)return;var a=t.element.cloneNode(true);t.element.parentNode.insertBefore(a,t.element);t.elementSwapHidden=t.element;t.elementSwapHidden.type="hidden";t.element=a;t.element.id=""},initNumeralFormatter:function(){var t=this,e=t.properties;if(!e.numeral){return}e.numeralFormatter=new Un.NumeralFormatter(e.numeralDecimalMark,e.numeralIntegerScale,e.numeralDecimalScale,e.numeralThousandsGroupStyle,e.numeralPositiveOnly,e.stripLeadingZeroes,e.prefix,e.signBeforePrefix,e.tailPrefix,e.delimiter)},initTimeFormatter:function(){var t=this,e=t.properties;if(!e.time){return}e.timeFormatter=new Un.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=Un.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new Un.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=Un.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new Un.PhoneFormatter(new e.root.Cleave.AsYouTypeFormatter(e.phoneRegionCode),e.delimiter)}catch(t){throw new Error("[cleave.js] Please include phone-type-formatter.{country}.js lib")}},onKeyDown:function(t){var e=this,a=t.which||t.keyCode;e.lastInputValue=e.element.value;e.isBackward=a===8},onChange:function(t){var e=this,a=e.properties,i=Un.Util;e.isBackward=e.isBackward||t.inputType==="deleteContentBackward";var r=i.getPostDelimiter(e.lastInputValue,a.delimiter,a.delimiters);if(e.isBackward&&r){a.postDelimiterBackspace=r}else{a.postDelimiterBackspace=false}this.onInput(this.element.value)},onFocus:function(){var t=this,e=t.properties;t.lastInputValue=t.element.value;if(e.prefix&&e.noImmediatePrefix&&!t.element.value){this.onInput(e.prefix)}Un.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!Un.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!Un.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,a=e.properties,i=Un.Util,r=e.element.value,n="";if(!a.copyDelimiter){n=i.stripDelimiters(r,a.delimiter,a.delimiters)}else{n=r}try{if(t.clipboardData){t.clipboardData.setData("Text",n)}else{window.clipboardData.setData("Text",n)}t.preventDefault()}catch(t){}},onInput:function(t){var e=this,a=e.properties,i=Un.Util;var r=i.getPostDelimiter(t,a.delimiter,a.delimiters);if(!a.numeral&&a.postDelimiterBackspace&&!r){t=i.headStr(t,t.length-a.postDelimiterBackspace.length)}if(a.phone){if(a.prefix&&(!a.noImmediatePrefix||t.length)){a.result=a.prefix+a.phoneFormatter.format(t).slice(a.prefix.length)}else{a.result=a.phoneFormatter.format(t)}e.updateValueState();return}if(a.numeral){if(a.prefix&&a.noImmediatePrefix&&t.length===0){a.result=""}else{a.result=a.numeralFormatter.format(t)}e.updateValueState();return}if(a.date){t=a.dateFormatter.getValidatedDate(t)}if(a.time){t=a.timeFormatter.getValidatedTime(t)}t=i.stripDelimiters(t,a.delimiter,a.delimiters);t=i.getPrefixStrippedValue(t,a.prefix,a.prefixLength,a.result,a.delimiter,a.delimiters,a.noImmediatePrefix,a.tailPrefix,a.signBeforePrefix);t=a.numericOnly?i.strip(t,/[^\d]/g):t;t=a.uppercase?t.toUpperCase():t;t=a.lowercase?t.toLowerCase():t;if(a.prefix){if(a.tailPrefix){t=t+a.prefix}else{t=a.prefix+t}if(a.blocksLength===0){a.result=t;e.updateValueState();return}}if(a.creditCard){e.updateCreditCardPropsByValue(t)}t=i.headStr(t,a.maxLength);a.result=i.getFormattedValue(t,a.blocks,a.blocksLength,a.delimiter,a.delimiters,a.delimiterLazyShow);e.updateValueState()},updateCreditCardPropsByValue:function(t){var e=this,a=e.properties,i=Un.Util,r;if(i.headStr(a.result,4)===i.headStr(t,4)){return}r=Un.CreditCardDetector.getInfo(t,a.creditCardStrictMode);a.blocks=r.blocks;a.blocksLength=a.blocks.length;a.maxLength=i.getMaxLength(a.blocks);if(a.creditCardType!==r.type){a.creditCardType=r.type;a.onCreditCardTypeChanged.call(e,a.creditCardType)}},updateValueState:function(){var t=this,e=Un.Util,a=t.properties;if(!t.element){return}var i=t.element.selectionEnd;var r=t.element.value;var n=a.result;i=e.getNextCursorPosition(i,r,n,a.delimiter,a.delimiters);if(t.isAndroid){window.setTimeout((function(){t.element.value=n;e.setSelection(t.element,i,a.document,false);t.callOnValueChanged()}),1);return}t.element.value=n;if(a.swapHiddenInput)t.elementSwapHidden.value=t.getRawValue();e.setSelection(t.element,i,a.document,false);t.callOnValueChanged()},callOnValueChanged:function(){var t=this,e=t.properties;e.onValueChanged.call(t,{target:{name:t.element.name,value:e.result,rawValue:t.getRawValue()}})},setPhoneRegionCode:function(t){var e=this,a=e.properties;a.phoneRegionCode=t;e.initPhoneFormatter();e.onChange()},setRawValue:function(t){var e=this,a=e.properties;t=t!==undefined&&t!==null?t.toString():"";if(a.numeral){t=t.replace(".",a.numeralDecimalMark)}a.postDelimiterBackspace=false;e.element.value=t;e.onInput(t)},getRawValue:function(){var t=this,e=t.properties,a=Un.Util,i=t.element.value;if(e.rawValueTrimPrefix){i=a.getPrefixStrippedValue(i,e.prefix,e.prefixLength,e.result,e.delimiter,e.delimiters,e.noImmediatePrefix,e.tailPrefix,e.signBeforePrefix)}if(e.numeral){i=e.numeralFormatter.getRawValue(i)}else{i=a.stripDelimiters(i,e.delimiter,e.delimiters)}return i},getISOFormatDate:function(){var t=this,e=t.properties;return e.date?e.dateFormatter.getISOFormatDate():""},getISOFormatTime:function(){var t=this,e=t.properties;return e.time?e.timeFormatter.getISOFormatTime():""},getFormattedValue:function(){return this.element.value},destroy:function(){var t=this;t.element.removeEventListener("input",t.onChangeListener);t.element.removeEventListener("keydown",t.onKeyDownListener);t.element.removeEventListener("focus",t.onFocusListener);t.element.removeEventListener("cut",t.onCutListener);t.element.removeEventListener("copy",t.onCopyListener)},toString:function(){return"[Cleave Object]"}};Un.NumeralFormatter=Tn;Un.DateFormatter=Bn;Un.TimeFormatter=On;Un.PhoneFormatter=Ln;Un.CreditCardDetector=jn;Un.Util=Yn;Un.DefaultProperties=_n;(typeof Sn==="object"&&Sn?Sn:window)["Cleave"]=Un;var Kn=Un;function Vn(t){return t!=null&&`${t}`!=="false"}function qn(t,e=0){return Jn(t)?Number(t):e}function Jn(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const Gn=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}button.cat-text-primary,button.cat-link-primary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}button.cat-text-primaryInverted,button.cat-link-primaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}button.cat-text-secondary,button.cat-link-secondary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}button.cat-text-secondaryInverted,button.cat-link-secondaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}button.cat-text-info,button.cat-link-info{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-info:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-info:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}button.cat-text-success,button.cat-link-success{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-success:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-success:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}button.cat-text-warning,button.cat-link-warning{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-warning:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-warning:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}button.cat-text-danger,button.cat-link-danger{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-danger:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-danger:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-loading,.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";const Zn=Gn;let Xn=0;const Qn=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Xn++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.hasSlottedCounter=false;this.isPasswordShown=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.clearable=false;this.togglePassword=false;this.disabled=false;this.loading=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.maxLength=undefined;this.min=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.round=false;this.type="text";this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');this.hasSlottedCounter=!!this.hostElement.querySelector('[slot="counter"]')}async doFocus(t){const e=this.input.type==="hidden"?this.findSiblingInput(this.input.nextSibling):this.input;e?.focus(t)}async doBlur(){this.input.blur()}async clear(){this.value="";this.catChange.emit(this.value)}async mask(t){new Kn(this.input,t)}onErrorsChanged(t,e,a=true){if(!Vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e("div",{key:"65536a5d26ff0ebe45920b352cdfa4e28719efeb",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"1492e4f53056086c1b01d9314b368a301d36667b",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"6ced806dcfcbe1eb0f2a6ebcd31f4ff4a3280e58",htmlFor:this.id,part:"label"},e("span",{key:"23bbe79e6af8b0869510bc43533e02b60fd345ac",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"d1ccafcf2d7f49eedf400d78b678fbafabb2c158",name:"label"})||this.label,e("div",{key:"7ee3879f60ec33a414406e040da4f93c24ccd5ea",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"58f31ad7dc3a108f6dde1ec88c482a5a3c74fcbd",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"63d78c225748e457899f55d964bcb1d2a0da851c",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"),(this.maxLength||this.hasSlottedCounter)&&e("div",{key:"b36623a31118624beca4d4005dbf0480e476cb53",class:"label-character-count","aria-hidden":"true"},this.hasSlottedCounter?e("slot",{name:"counter"}):`${this.value?.length??0}/${this.maxLength}`))))),e("div",{key:"75d9b67e7cf19f2526e1e036de0efce6b02d2fa5",class:"input-container"},e("div",{key:"33b2d24c18c7e4b78bcaf569787f4153237f0686",class:"input-outer-wrapper"},e("div",{key:"50f66d6a718bc66162ce93d3f3ce75b53afd193a",class:{"input-wrapper":true,"input-round":this.round,"input-readonly":this.readonly,"input-disabled":this.disabled,"input-invalid":this.invalid},onClick:()=>this.input.focus()},this.textPrefix&&e("span",{key:"9549568c8b7d088babf19125a063270863d545a3",class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{key:"fbd58b96277fc28e9de49ffd355471811fb16257",icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"9ea5b2502d1364de65b656c064124329ace8a074",class:"input-inner-wrapper"},e("input",{key:"80f00d9abc53fbc3cd6fa261663f6c9e940ec213","data-test":this.testId,...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,class:{"has-clearable":this.clearable&&!this.disabled&&!this.readonly&&!!this.value,"has-toggle-password":this.togglePassword&&!this.disabled&&!this.readonly&&!!this.value},autocomplete:this.autoComplete,disabled:this.disabled,max:this.max,maxlength:this.maxLength,min:this.min,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,type:this.isPasswordShown?"text":this.type,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.clearable&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{key:"f301a2b57d36d2005e8705e07ea59dd32e54691a",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":I.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.togglePassword&&!this.disabled&&!this.readonly&&this.value&&e("cat-button",{key:"8a9e442e985f5654ae1a2dc4ad7e24939e2275c4",class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":I.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),this.loading&&e("cat-spinner",{key:"50ef079a4d7a193d367817a0afa3db8be839b4a6",size:"m",class:"icon-loading"}),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{key:"8ceedd341d85faebb2ebbb1d60b137f9e866aa05",icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{key:"3be8071c0d5d25d6607fd40547d2405c4cd1b7bb",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{key:"7019774d260c7c59c33a2dc1d82c6f4fa1f45b45",class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"d3882acee81f3456c1d7ab86469b12deed42debe",name:"addon"})),this.hasHint&&e(oe,{key:"3dce699be6ee391d0aee55735959ed69501e52ff",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.input.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(Vn(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=qn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}findSiblingInput(t){if(t instanceof HTMLInputElement){return t}else if(t?.nextSibling){return this.findSiblingInput(t.nextSibling)}return undefined}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Qn.style=Zn;const to=":host{display:inline-block}:host([hidden]){display:none}ol{display:flex;flex-wrap:wrap;list-style:none;margin:0;padding:0}li{display:inline-flex;justify-content:center}li.dots{-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host([variant=outlined]) ol{gap:0.75rem}.cat-pagination-xs li.dots,.cat-pagination-xs li.text{height:1.5rem;line-height:1.5rem;font-size:0.875rem}.cat-pagination-xs li.dots{width:1.5rem}:host([variant=outlined]) .cat-pagination-xs{gap:0.375rem}.cat-pagination-s li.dots,.cat-pagination-s li.text{height:2rem;line-height:2rem;font-size:0.9375rem}.cat-pagination-s li.dots{width:2rem}:host([variant=outlined]) .cat-pagination-s{gap:0.5rem}.cat-pagination-m li.dots,.cat-pagination-m li.text{height:2.5rem;line-height:2.5rem;font-size:0.9375rem}.cat-pagination-m li.dots{width:2.5rem}:host([variant=outlined]) .cat-pagination-m{gap:0.625rem}.cat-pagination-l li.dots,.cat-pagination-l li.text{height:3rem;line-height:3rem;font-size:0.9375rem}.cat-pagination-l li.dots{width:3rem}:host([variant=outlined]) .cat-pagination-l{gap:0.75rem}.cat-pagination-xl li.dots,.cat-pagination-xl li.text{height:3.5rem;line-height:3.5rem;font-size:1.125rem}.cat-pagination-xl li.dots{width:3.5rem}:host([variant=outlined]) .cat-pagination-xl{gap:0.875rem}";const eo=to;const ao=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.page=0;this.pageCount=1;this.activePadding=1;this.sidePadding=1;this.size="m";this.variant="text";this.round=false;this.compact=false;this.iconPrev="$cat:pagination-left";this.iconNext="$cat:pagination-right"}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e("nav",{key:"ed5098e1578e2157e0f5b8c539f313e2892c5f05",role:"navigation"},e("ol",{key:"6f63a5c0a79722913dafbf1b6391ab586a20695a",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"0dd989fa017490749141ab2029546b115a34ce27"},e("cat-button",{key:"8614e9e1ebfc2ff3aeda2cec8be07aeff6e592eb",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:I.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"b864788a70e125ae93a34e705522e537b359a12a"},e("cat-button",{key:"93f6d89967b6f6b93b733fbcb628cf4a3663dbf0",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:I.t("pagination.next"),icon:this.iconNext,iconOnly:true,onClick:()=>this.setPage(this.page+1)}))))}get isFirst(){return this.page===0}get isLast(){return this.page===this.pageCount-1}setPage(t){this.page=t;this.catChange.emit(this.page)}get pages(){if(!this.sidePadding&&!this.activePadding){return[this.page]}const t=new Set;const e=this.page<=this.sidePadding+this.activePadding+1;const a=e?this.sidePadding+2*this.activePadding+2:this.sidePadding;const i=this.page>=this.pageCount-this.sidePadding-this.activePadding-2;const r=i?this.pageCount-this.sidePadding-2*this.activePadding-2:this.pageCount-this.sidePadding;this.addSeq(t,0,a);if(!e&&!i){this.addSeq(t,this.page-this.activePadding,this.page+this.activePadding+1)}this.addSeq(t,r,this.pageCount);return[...t]}addSeq(t,e,a){const i=this.clamp(e,0,this.pageCount);const r=this.clamp(a,0,this.pageCount);Array(r-i).fill(0).forEach(((e,a)=>t.add(i+a)))}clamp(t,e,a){return Math.min(Math.max(t,e),a)}get content(){if(this.compact){return e("li",{class:"text"},this.page+1,"/",this.pageCount)}return this.pages.map(((t,a)=>[a>0&&this.pages[a-1]!==t-1?e("li",{class:"dots"},"…"):null,e("li",null,e("cat-button",{variant:this.variant,size:this.size,round:this.round,color:this.page===t?"primary":undefined,active:this.page===t,a11yLabel:I.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}static get delegatesFocus(){return true}get hostElement(){return i(this)}};ao.style=eo;const io=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);cursor:pointer}.label-left{flex-direction:row-reverse}.radio{display:flex;position:relative;align-self:flex-start}.circle-placeholder{width:calc(1.25rem + 1px);flex-shrink:0}.circle{position:absolute;width:0.75rem;height:0.75rem;background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-radius:10rem;top:calc(50% - 0.375rem);left:calc(50% - 0.375rem);visibility:hidden;pointer-events:none}input{margin:0;width:1.25rem;height:1.25rem;appearance:none;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:10rem;cursor:inherit}input:checked{border-color:rgb(var(--cat-primary-bg, 0, 129, 148))}input:checked+.circle{visibility:visible}input:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}:host(.cat-error) input{border-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .circle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.is-disabled input{background-color:#f2f4f7}.is-disabled input:checked{border-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.is-disabled .circle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}.align-center .radio{align-self:center}.align-end .radio{align-self:flex-end}";const ro=io;let no=0;const oo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-radio-${++no}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value="";this.hint=undefined;this.labelLeft=false;this.alignment="top";this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"ca329dab3b08cf59911216e6d1d89e931d4c6836"},e("label",{key:"0fae08dcf9b6017f1052342f22989a9218437a82",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"eed2cf5a6e64d64770466bbfcd5fd0f6e7e329d9",class:"radio"},e("input",{key:"02a288466717c319419f94e2f9607ab63575e9d5","data-test":this.testId,...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.identifier||this.id,type:"radio",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"f75aa8f50e723b8aa90b60001190638d3d56234a",class:"circle"})),e("span",{key:"52de52cc932bb531440862a04ede38cdf2b29a3a",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"3c66d88d6517721590a342001258b5375f274714",name:"label"})||this.label)),this.hasHint&&e("div",{key:"b86904829302d22f22ce51f42bd147504b6e387f",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"dcca2f05ea10d9cbf731c7b59f82e33916014327",class:"circle-placeholder"}),e(oe,{key:"e7b29ec3c4675b1e077fc783fe90780b5794f78a",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=true;this.catChange.emit(this.value)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}static get delegatesFocus(){return true}get hostElement(){return i(this)}};oo.style=ro;const co=":host{display:block}:host([hidden]){display:none}";const so=co;const lo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.catRadioGroup=[];this.name=undefined;this.value=undefined;this.disabled=false;this.a11yLabel=undefined;this.labelLeft=false}onNameChanged(t){this.catRadioGroup.forEach((e=>e.name=t))}onValueChanged(t){this.catRadioGroup.forEach((e=>e.checked=e.value===t));this.updateTabIndex()}onDisabledChanged(t){this.catRadioGroup.forEach((e=>e.disabled=e.disabled||t))}onLabelLeftChanged(t){this.catRadioGroup.forEach((e=>e.labelLeft=e.labelLeft||t))}componentDidLoad(){this.init();this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-RADIO"))&&this.init()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)&&this.catRadioGroup.length){const e=this.catRadioGroup.filter((t=>!t.disabled));const a=document.activeElement;const i=this.catRadioGroup.findIndex((t=>t===a));const r=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const n=i<0?0:(i+r+e.length)%e.length;e[n].doFocus();e[n].shadowRoot?.querySelector("input")?.click();this.updateTabIndex();t.preventDefault()}}onInput(t){const e=this.catRadioGroup.find((e=>e===t.target));if(e?.localName==="cat-radio"){this.value=e?.checked?e?.value:undefined;this.catChange.emit(this.value)}}onFocus(t){if(!t.relatedTarget){this.catBlur.emit(t)}}onBlur(t){if(!t.relatedTarget){this.catBlur.emit(t)}}render(){return e("div",{key:"af9aff52c285bb32986d27c4f062f7ca8dbe394e",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"e4542e17427cdd2d31e38276afe5d240f5b9e6cf"}))}init(){this.catRadioGroup=Array.from(this.hostElement.querySelectorAll(`cat-radio`));this.onNameChanged(this.name);this.onValueChanged(this.value);this.onDisabledChanged(this.disabled);this.onLabelLeftChanged(this.labelLeft)}updateTabIndex(){if(this.catRadioGroup.length){this.catRadioGroup.forEach((t=>t.shadowRoot?.querySelector("input")?.setAttribute("tabindex","-1")));const t=this.catRadioGroup.findIndex((t=>t.checked));this.catRadioGroup[t>=0?t:0].shadowRoot?.querySelector("input")?.setAttribute("tabindex","0")}}get hostElement(){return i(this)}static get watchers(){return{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}}};lo.style=so;const ho=":host{overflow:hidden;position:relative;display:flex}:host([hidden]){display:none}.shadow-bottom,.shadow-right,.shadow-left,.shadow-top{position:absolute;transition:box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1)}.shadow-top{z-index:2;width:100%;top:0}.shadow-left{z-index:4;height:100%;left:0}.shadow-right{z-index:4;height:100%;right:0}.shadow-bottom{z-index:2;width:100%;bottom:0}.scrollable-wrapper{position:absolute;inset:0;pointer-events:none}.scrollable-wrapper.cat-scrollable-top .shadow-top,.scrollable-wrapper.cat-scrollable-bottom .shadow-bottom,.scrollable-wrapper.cat-scrollable-left .shadow-left,.scrollable-wrapper.cat-scrollable-right .shadow-right{box-shadow:0 0 4px 1px rgba(16, 29, 48, 0.2)}.scrollable-content{width:100%;overflow:hidden}.scrollable-content.scroll-x{overflow-x:auto}.scrollable-content.scroll-y{overflow-y:auto}.scrollable-content.no-overscroll{overscroll-behavior:contain}";const uo=ho;const fo=class{constructor(e){t(this,e);this.scrolledTop=r(this,"scrolledTop",7);this.scrolledLeft=r(this,"scrolledLeft",7);this.scrolledRight=r(this,"scrolledRight",7);this.scrolledBottom=r(this,"scrolledBottom",7);this.init=new A;this.destroyed=new A;this.resizedEntries=new A;this.resizedObserver=new ResizeObserver((t=>this.resizedEntries.next(t)));this.noShadowX=false;this.noShadowY=false;this.noOverflowX=false;this.noOverflowY=false;this.noOverscroll=false;this.noScrolledInit=false;this.scrolledBuffer=0}componentDidRender(){if(this.scrollElement){this.scrolled=tt(this.scrollElement,"scroll").pipe(Ct(this.destroyed));this.resizedObserver.observe(this.scrollElement)}if(this.scrollWrapperElement){this.resizedObserver.observe(this.scrollWrapperElement)}this.attachEmitter("left",this.scrolledLeft);this.attachEmitter("right",this.scrolledRight);this.attachEmitter("bottom",this.scrolledBottom);this.attachEmitter("top",this.scrolledTop);ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(fo.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>5,left:this.getScrollOffset("left")>5,right:this.getScrollOffset("right")>5,bottom:this.getScrollOffset("bottom")>5}))),Ct(this.destroyed)).subscribe((({top:t,left:e,right:a,bottom:i})=>{this.toggleClass("cat-scrollable-top",t);this.toggleClass("cat-scrollable-left",e);this.toggleClass("cat-scrollable-right",a);this.toggleClass("cat-scrollable-bottom",i)}))}componentDidLoad(){if(!this.noScrolledInit){this.init.next()}}disconnectedCallback(){this.init.complete();this.destroyed.next();this.destroyed.complete();this.resizedObserver.disconnect()}render(){return[e("div",{key:"8153419d11ba30f6360acb82b87ac62727248599",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{key:"3374f51499e735a692ccd8e0f9bea23c0132b47d",class:"shadow-top"}),!this.noShadowX&&e("div",{key:"d208685280ae658baf5672003141ab9349d0feef",class:"shadow-left"}),!this.noShadowX&&e("div",{key:"0404d0cd8afbaac6ac9d89947ce9fbd91c7929f6",class:"shadow-right"}),!this.noShadowY&&e("div",{key:"539c15c633403f03e4fc36c1fb1d86e498c8d9cc",class:"shadow-bottom"})),e("div",{key:"0ea3a47900df0689a73a5c440a8774ca04edf4ad",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"9c10382fc5f4773242738be4070af6bd5ce2e2d3"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(fo.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),ct((t=>t)),Y((()=>{switch(t){case"top":return this.getScrollOffset("bottom");case"left":return this.getScrollOffset("right");case"right":return this.getScrollOffset("left");case"bottom":return this.getScrollOffset("top")}})),yt(),Ct(this.destroyed)).subscribe((()=>e.emit()))}getScrollOffset(t){if(this.scrollElement){switch(t){case"top":return this.scrollElement.scrollTop;case"left":return this.scrollElement.scrollLeft;case"right":return this.scrollElement.scrollWidth-this.scrollElement.clientWidth-this.scrollElement.scrollLeft;case"bottom":return this.scrollElement.scrollHeight-this.scrollElement.clientHeight-this.scrollElement.scrollTop;default:return 0}}return 0}toggleClass(t,e){if(e){this.scrollWrapperElement?.classList.add(t)}else{this.scrollWrapperElement?.classList.remove(t)}}};fo.THROTTLE=50;fo.style=uo;var po="__autosizeInputGhost";var bo={" ":"nbsp","<":"lt",">":"gt"};function mo(t){return"&"+bo[t]+";"}function go(t){return t.replace(/\s|<|>/g,mo)}function vo(){var t=document.createElement("div");t.id=po;t.style.cssText="display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;";document.body.appendChild(t);return t}var yo=function(t,e){var a=window.getComputedStyle(t);var i="box-sizing:"+a.boxSizing+";border-left:"+a.borderLeftWidth+" solid red"+";border-right:"+a.borderRightWidth+" solid red"+";font-family:"+a.fontFamily+";font-feature-settings:"+a.fontFeatureSettings+";font-kerning:"+a.fontKerning+";font-size:"+a.fontSize+";font-stretch:"+a.fontStretch+";font-style:"+a.fontStyle+";font-variant:"+a.fontVariant+";font-variant-caps:"+a.fontVariantCaps+";font-variant-ligatures:"+a.fontVariantLigatures+";font-variant-numeric:"+a.fontVariantNumeric+";font-weight:"+a.fontWeight+";letter-spacing:"+a.letterSpacing+";margin-left:"+a.marginLeft+";margin-right:"+a.marginRight+";padding-left:"+a.paddingLeft+";padding-right:"+a.paddingRight+";text-indent:"+a.textIndent+";text-transform:"+a.textTransform;function r(){var e=t.value||t.getAttribute("placeholder")||"";var a=document.getElementById(po)||vo();a.style.cssText+=i;a.innerHTML=go(e);var r=window.getComputedStyle(a).width;t.style.width=r;return r}t.addEventListener("input",r);var n=r();if(e&&e.minWidth&&n!=="0px"){t.style.minWidth=n}return function(){t.removeEventListener("input",r);var e=document.getElementById(po);if(e){e.parentNode.removeChild(e)}}};const ko=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}button.cat-text-primary,button.cat-link-primary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}button.cat-text-primaryInverted,button.cat-link-primaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}button.cat-text-secondary,button.cat-link-secondary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}button.cat-text-secondaryInverted,button.cat-link-secondaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}button.cat-text-info,button.cat-link-info{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-info:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-info:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}button.cat-text-success,button.cat-link-success{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-success:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-success:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}button.cat-text-warning,button.cat-link-warning{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-warning:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-warning:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}button.cat-text-danger,button.cat-link-danger{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-danger:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-danger:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;line-height:1.25rem;position:relative}:host([hidden]){display:none}label{align-self:flex-start}label.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.select-field,.select-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.select-field.select-horizontal{flex-direction:row;gap:1rem}.select-wrapper{display:flex;align-items:flex-start;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;padding:0.25rem;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.select-wrapper:not(.select-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.select-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.select-wrapper.select-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.select-wrapper:has(input:-webkit-autofill),.select-wrapper:has(input:-webkit-autofill):hover,.select-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}:host(.cat-error) .select-wrapper{box-shadow:0 0 0 1px rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) .select-wrapper:not(.input-disabled):hover{box-shadow:0 0 0 2px rgb(var(--cat-danger-bg, 217, 52, 13))}.select-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));pointer-events:none}.select-wrapper-inner{display:flex;flex:1 1 auto;align-items:center;gap:0.25rem;min-width:0}.select-wrapper-inner>cat-avatar{display:inline-block;padding-left:0.5rem}.select-wrapper-inner>cat-avatar+.select-input{padding-left:0.25rem}.select-wrapper-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-multiple .select-wrapper-inner{flex-wrap:wrap}.select-input{font:inherit;background:none;border:none;outline:none;padding:0.375rem 0.5rem;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.select-input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.select-disabled .select-input{cursor:inherit}.select-pills{display:contents}.pill{display:inline-flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0%}.pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.select-btn{transition:transform 125ms linear}.select-btn::part(button){outline:none}cat-spinner{padding:0.375rem}.icon-suffix{padding:0.25rem}.select-btn-open{transform:rotate(180deg)}.select-dropdown{position:fixed;right:0;background:white;display:none;overflow:auto;box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);width:max-content;top:0;left:0}.select-options-wrapper{max-height:16rem;width:100%}.select-empty{margin:1rem 0;padding:0 1.25rem}.select-options{list-style-type:none;margin:0;padding:0.5rem 0}.select-options cat-checkbox,.select-options .select-option-single{margin:0;padding:0.5rem 1rem}.select-option-inner{display:flex;gap:0.5rem}.select-option-inner cat-avatar{--cat-avatar-size:1.25rem;--cat-avatar-font-size:0.5rem}.select-option-text{flex:1 1 0%;min-width:0}.select-option-single{cursor:pointer}.select-input-transparent-caret{caret-color:transparent}.select-option-empty,.select-option-loading{padding:0.5rem 1rem}.select-option:hover{background-color:rgba(var(--cat-secondary-bg, 105, 118, 135), 0.05)}.select-option-active{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-2px}.select-option-label{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-wrap:break-word;word-break:break-word}.select-option-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";const xo=ko;const wo={term:"",isOpen:false,isLoading:false,isFirstLoading:true,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let zo=0;let Io=0;const Do=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.catChange=r(this,"catChange",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${zo++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=wo;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.multiple=false;this.debounce=250;this.placement="bottom-start";this.value=undefined;this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.clearable=false;this.tags=false;this.tagHint=undefined;this.noItems=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}onConnectorChanged(t){this.reset(t);this.resolve()}onValueChanged(){!this.valueChangedBySelection?this.resolve():this.valueChangedBySelection=false}onErrorsChanged(t,e,a=true){if(!Vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}onStateChanged(t,e){const a=a=>t[a]!==e[a];if(a("isOpen")){this.update()}if(a("activeOptionIndex")&&this.state.activeOptionIndex>=0){this.dropdown?.querySelector(`#select-${this.id}-option-${this.state.activeOptionIndex}`)?.scrollIntoView({block:"nearest"})}if(a("selection")){let t;if(!this.multiple&&this.state.selection.length){this.hide()}const a=this.state.selection.map((t=>t.item.id));if(!this.tags){if(this.multiple){t=a}else{t=a.length?a[0]:""}}else{const e=a.filter((t=>!t.startsWith(`select-${this.id}-tag`)));const i=this.state.selection.filter((t=>t.item.id.startsWith(`select-${this.id}-tag`))).map((t=>t.render.label));if(this.multiple){t={ids:e,tags:i}}else{t={id:e.length?e[0]:"",tag:i.length?i[0]:""}}}if(!e.isResolving){this.valueChangedBySelection=true;this.value=t}this.catChange.emit();this.showErrorsIfTimeout()}}componentDidLoad(){if(this.input){yo(this.input,{minWidth:true})}if(this.trigger&&this.dropdown){Lr(this.trigger,this.dropdown,(()=>this.update()))}}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onBlur(t){if(!this.multiple&&this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}this.hide();if(!this.multiple&&(!this.tags||!this.state.selection?.length)){if(this.state.tempSelection?.length){this.patchState({activeSelectionIndex:-1,selection:this.state.tempSelection,tempSelection:[],options:[],term:this.state.tempSelection[0].render.label})}else if(!this.state.selection?.length){this.patchState({activeSelectionIndex:-1,selection:[],tempSelection:[],options:[],term:""})}}else{this.patchState({activeSelectionIndex:-1})}this.catBlur.emit(t);if(Vn(this.errorUpdate)){this.showErrors()}}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["ArrowDown","ArrowUp","ArrowLeft","ArrowRight"].includes(t.key)){this.onArrowKeyDown(t)}else if(["Enter"," "].includes(t.key)&&e){if(this.tags&&this.state.activeOptionIndex===0&&this.state.options[0].item.id===`select-${this.id}-option-tag`){t.preventDefault();if(this.multiple){this.toggleTag(this.state.options[0])}else{this.createTag(this.state.options[0].render.label)}}else if(this.state.activeOptionIndex>=0){t.preventDefault();if(this.multiple){this.toggle(this.state.options[this.state.activeOptionIndex])}else{this.select(this.state.options[this.state.activeOptionIndex])}}else if(this.tags&&t.key==="Enter"&&this.state.activeOptionIndex<0){this.createTag(this.state.term)}}else if(t.key==="Escape"){if(this.hide()){t.stopPropagation()}}else if(t.key==="Backspace"||t.key==="Delete"){this.input?.focus();if(!this.multiple||!this.state.term||this.input?.selectionStart===0&&t.key==="Backspace"){if(this.state.activeSelectionIndex>=0){this.deselect(this.state.selection[this.state.activeSelectionIndex].item.id)}else if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:this.state.term?[...this.state.selection]:[]})}}}else if(t.key==="Tab"){this.trigger?.setAttribute("tabindex","-1");if(this.multiple){this.patchState({activeSelectionIndex:-1,activeOptionIndex:-1})}else if(this.state.activeOptionIndex>=0){if(this.tags&&this.state.options[this.state.activeOptionIndex].item.id===`select-${this.id}-option-tag`){this.createTag(this.state.term)}else{this.select(this.state.options[this.state.activeOptionIndex])}}}else if(t.key.length===1){this.input?.focus()}}onKeyUp(t){if(t.key==="Tab"&&!t.shiftKey){this.hostElement.shadowRoot?.activeElement===this.trigger&&this.input?.focus();if(this.hostElement.shadowRoot?.activeElement===this.input){this.show()}}else if(t.key==="Tab"&&t.shiftKey){const t=this.trigger?.querySelector(`#select-clear-btn-${this.id}`);if(t){this.hostElement.shadowRoot?.activeElement===t&&this.show()}else{this.show()}}}async doFocus(t){this.input?.focus(t)}async doBlur(){this.input?.blur()}async clear(){this.clearInput()}async connect(t){this.connector=t;let e;this.subscription?.unsubscribe();this.subscription=this.term$.asObservable().pipe(ut((t=>t?nt(this.debounce):C(0))),yt(),At((()=>e=this.more$.pipe(ct((()=>!this.state.isLoading)),It((t=>t+1),0),Dt(0)))),Mt((a=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(a,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements,isFirstLoading:false}))),Rt((t=>!t.last),true),It(((t,e)=>[...t,...e.content]),[]))))).subscribe((e=>{const a=this.toSelectItems(t,e);if(this.tags&&this.state.term.trim().length&&!a.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))){let t;if(this.isTagSelected(this.state.term)){t=this.state.selection.find((t=>t.render.label.toLowerCase()===this.state.term.toLowerCase()))?.render.label}a.unshift({item:{id:`select-${this.id}-option-tag`},render:{label:t?t:this.state.term}})}this.patchState({options:a})}))}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"4ffaec1ec7c59635d3e923912e5bb5b554661973"},e("div",{key:"ad9ad59ff47ab4fe9c9485da344b0be8f030f824",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"d87e3451ded9630ef471c6a0d0230f73bf2001f0",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"0eb6bd92232da327fd11a5b8fa5108064216b98d",htmlFor:`select-${this.id}-input`,part:"label"},e("span",{key:"29b3bc2a6300cf116e85b598c43bc3d590bfca40",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"105d69c1c4ebce966d207248d0919713402775fc",name:"label"})||this.label,e("div",{key:"60d737d4bc621e64c4d60a4454c81d5cd2f14036",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"3ff4fc174c6769300fecde9b4f3785e7f510b3c5",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"44beff5fb235a6ecfe4d3bde6173309ab9374b7d",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"))))),e("div",{key:"ca853307f93adc14b4ebe5de1f0b5cd255d438d7",class:"select-container"},e("div",{key:"fc56c44f4d6b27ca4d7d1c3f344bef6c5495ae84",class:{"select-wrapper":true,"select-disabled":this.disabled,"select-invalid":this.invalid},ref:t=>this.trigger=t,id:this.id,role:"combobox","aria-expanded":this.state.isOpen||this.isPillboxActive(),"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-required":this.required?"true":false,"aria-activedescendant":this.activeDescendant,onClick:t=>this.onClick(t)},e("div",{key:"77d3a48ea7ad111136fb1513aaeb6c3b15533436",class:"select-wrapper-inner"},this.multiple&&this.state.selection.length?e("div",{id:`select-pillbox-${this.id}`,role:"listbox","aria-orientation":"horizontal",class:"select-pills"},this.state.selection.map(((t,a)=>e("span",{class:{pill:true,"select-no-open":true,"select-option-active":this.state.activeSelectionIndex===a},role:"option","aria-selected":"true",id:`select-${this.id}-selection-${a}`},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",null,t.render.label),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:I.t("select.deselect"),onClick:()=>this.deselect(t.item.id),tabIndex:-1,"data-dropdown-no-close":true}))))):this.state.selection.length&&this.state.selection[0].render.avatar?e("cat-avatar",{label:this.state.selection[0].render.label,round:this.state.selection[0].render.avatar.round,src:this.state.selection[0].render.avatar.src,icon:this.state.selection[0].render.avatar.icon,initials:this.state.selection[0].render.avatar.initials??""}):null,e("input",{key:"a4e438192ecee41d5acf77de45a1526876409a0f","data-test":this.testId,...this.nativeAttributes,part:"input",id:`select-${this.id}-input`,class:"select-input",role:"combobox",ref:t=>this.input=t,"aria-controls":this.isPillboxActive()?`select-pillbox-${this.id}`:`select-listbox-${this.id}`,"aria-activedescendant":this.activeDescendant,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,"aria-autocomplete":"list",onInput:this.onInput.bind(this),value:!this.multiple?this.state.term:undefined,placeholder:this.placeholder,disabled:this.disabled||this.state.isResolving})),this.state.isResolving&&e("cat-spinner",{key:"04d53d0d39bc429a6ac9a479c46f42c6b03a9283"}),this.invalid&&e("cat-icon",{key:"d21136d141632914fc176ea1939164a4d40dc446",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),(this.state.selection.length||this.state.term.length)&&!this.disabled&&!this.state.isResolving&&this.clearable?e("cat-button",{id:`select-clear-btn-${this.id}`,iconOnly:true,icon:"$cat:input-close",variant:"text",size:"s",a11yLabel:I.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{key:"cd5c84bbc7b04b28acda86d656b2ea9835cbb439",iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?I.t("select.close"):I.t("select.open"),"aria-controls":`select-listbox-${this.id}`,"aria-expanded":this.state.isOpen,tabIndex:-1,disabled:this.disabled||this.state.isResolving,"data-dropdown-no-close":true})),this.hasHint&&e(oe,{key:"d0f3f4f080abf2136e681161802f0b332591a30a",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"1fb0555801f6793b6351dbc19f2eba12c7292593",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{key:"8eea85eea2b000f29d690aafc7fbae106bf275e5",class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{key:"fa0415a3459967bc8a8591c94e3227c8fb99443d",class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isFirstLoading?Array.from(Array(Do.SKELETON_COUNT)).map((()=>e("li",{class:"select-option-loading"},e("cat-skeleton",{variant:"body",lines:1}),e("cat-skeleton",{variant:"body",lines:1})))):!this.state.options.length&&!this.tags&&e("li",{class:"select-option-empty"},this.noItems?this.noItems:I.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}get optionsList(){return this.state.options.map(((t,a)=>{const i=this.tags&&t.item.id===`select-${this.id}-option-tag`;const r=this.isSelected(t.item.id)||this.tags&&this.isTagSelected(t.render.label);const n=()=>{if(i){return t.render.label+this.tagTextHelp}return t.render.label};return e("li",{role:"option",class:"select-option",id:`select-${this.id}-option-${a}`,"aria-selected":r?"true":"false"},this.multiple?e("cat-checkbox",{class:{"select-option-active":this.state.activeOptionIndex===a},checked:r,tabIndex:-1,labelLeft:true,onFocus:()=>this.input?.focus(),onCatChange:e=>{!i?this.toggle(t):this.toggleTag(t);e.stopPropagation()}},e("span",{slot:"label",class:"select-option-inner"},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description)))):e("div",{class:{"select-option-inner":true,"select-option-single":true,"select-option-active":this.state.activeOptionIndex===a},onFocus:()=>this.input?.focus(),onClick:()=>i?this.createTag(t.render.label):this.select(t),tabIndex:-1},t.render.avatar?e("cat-avatar",{label:t.render.label,round:t.render.avatar.round,src:t.render.avatar.src,icon:t.render.avatar.icon,initials:t.render.avatar.initials??""}):null,e("span",{class:"select-option-text"},e("span",{class:"select-option-label"},n()),e("span",{class:"select-option-description"},t.render.description))))}))}resolve(){const t=this.connector;if(!t){return}this.patchState({isResolving:true});const e=this.initIds();let a;if(this.tags){a=this.initTags()}const i=e.length?t.resolve(e).pipe(zt()):C([]);i.pipe(dt((()=>C([])))).subscribe((e=>{const i=this.toSelectItems(t,e);if(this.tags){a.filter((t=>!this.isTagSelected(t,i))).forEach(((t,e)=>{const a={id:`select-${this.id}-tag-${e}`,name:t};i.push({item:a,render:{label:a.name}})}))}const r=!this.multiple&&i.length?i[0].render.label:"";this.patchState({isResolving:false,selection:i,term:r,activeOptionIndex:-1});this.term$.next(r);this.input&&(this.input.value=r)}))}toSelectItems(t,e){return e.map((e=>({item:{...e,id:t.customId?t.customId(e):e.id},render:t.render(e)})))}show(){if(!this.state.isOpen&&this.connector){this.connect(this.connector);this.patchState({isOpen:true,isFirstLoading:true,options:[]});this.catOpen.emit();this.term$.next("");this.input?.classList.remove("select-input-transparent-caret")}}hide(){if(this.state.isOpen){this.patchState({isOpen:false,activeOptionIndex:-1});this.catClose.emit();return true}return false}search(t){this.patchState({term:t,activeOptionIndex:-1,activeSelectionIndex:-1});this.term$.next(t)}isSelected(t){return this.state.selection.findIndex((e=>e.item.id===t))>=0}select(t){if(!this.isSelected(t.item.id)){let e;if(this.multiple){e=[...this.state.selection,t]}else{e=[t];this.patchState({term:t.render.label,activeOptionIndex:-1,activeSelectionIndex:-1})}this.patchState({selection:e,tempSelection:[]});if(this.multiple&&this.state.term.trim()&&this.input){this.patchState({term:"",activeOptionIndex:-1});this.term$.next("");this.input.value=""}}this.setTransparentCaret()}deselect(t){if(this.isSelected(t)){this.patchState({selection:this.state.selection.filter((e=>e.item.id!==t)),activeSelectionIndex:-1})}}toggle(t){this.isSelected(t.item.id)?this.deselect(t.item.id):this.tags&&this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.select(t)}clearInput(){if(this.input&&this.state.term){this.patchState({selection:[],term:"",activeOptionIndex:-1,tempSelection:[]});this.term$.next("");this.input.value=""}else{this.patchState({selection:[],tempSelection:[]})}}reset(t){this.connector=t??this.connector;this.subscription?.unsubscribe();this.subscription=undefined;this.state=wo}onClick(t){if(this.disabled){return}const e=t.target;this.trigger?.setAttribute("tabindex","0");this.input?.focus();if(e===this.trigger||e===this.input||e.classList.contains("select-btn")||e.nodeName==="SPAN"){this.state.isOpen?this.hide():this.show()}}onInput(){this.search(this.input?.value.trim()||"");if(!this.multiple){if(this.state.selection.length){const t=[...this.state.selection];t.pop();this.patchState({selection:t,tempSelection:[...this.state.selection]})}if(!this.required&&!this.input?.value.trim()){this.patchState({tempSelection:[]})}}this.show()}update(){if(this.trigger&&this.dropdown){Hr(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Wr(Do.DROPDOWN_OFFSET),Pr()]}).then((({x:t,y:e,placement:a})=>{if(this.dropdown){this.dropdown.dataset.placement=a;Object.assign(this.dropdown.style,{width:`${this.trigger?.clientWidth}px`,left:`${t}px`,top:`${e}px`})}}))}}patchState(t){this.state={...this.state,...t}}isPillboxActive(){return this.state.activeSelectionIndex>=0}get activeDescendant(){let t=undefined;if(this.state.activeOptionIndex>=0){t=`select-${this.id}-option-${this.state.activeOptionIndex}`}else if(this.state.activeSelectionIndex>=0){t=`select-${this.id}-selection-${this.state.activeSelectionIndex}`}return t}onArrowKeyDown(t){let e=false;this.input?.focus();switch(t.key){case"ArrowDown":e=true;this.state.isOpen?this.patchState({activeOptionIndex:Math.min(this.state.activeOptionIndex+1,this.state.options.length-1),activeSelectionIndex:-1}):this.show();break;case"ArrowUp":e=true;this.state.activeOptionIndex>=0?this.patchState({activeOptionIndex:Math.max(this.state.activeOptionIndex-1,-1),activeSelectionIndex:-1}):this.hide();break;case"ArrowLeft":if(this.input?.selectionStart===0){e=true;let t;this.state.activeSelectionIndex>0?t=Math.max(this.state.activeSelectionIndex-1,-1):t=this.state.selection.length-1;this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}break;case"ArrowRight":if(this.state.activeSelectionIndex>=0){e=true;let t=-1;if(this.state.activeSelectionIndex<this.state.selection.length-1){t=Math.min(this.state.activeSelectionIndex+1,this.state.selection.length-1)}else if(!this.state.term){t=0}this.patchState({activeSelectionIndex:t,activeOptionIndex:-1})}}if(e){t.preventDefault();t.stopPropagation()}}get tagTextHelp(){return this.tagHint&&!this.isTagSelected(this.state.term)?" ("+this.tagHint+")":""}isTagSelected(t,e=this.state.selection){return e.findIndex((e=>e.render.label.toLowerCase()===t.toLowerCase()))>=0}createTag(t){if(t.trim().length&&!this.isTagSelected(t)){const e=this.value;const a=e?.tags;const i={id:`select-${this.id}-tag-${a?.length?a?.length+Io++:0}`,name:t};this.select({item:i,render:{label:i.name}})}this.setTransparentCaret()}removeTag(t){if(this.isTagSelected(t)){const e=this.state.selection.find((e=>e.render.label.toLowerCase()===t.toLowerCase()));e&&this.deselect(e.item.id)}}toggleTag(t){this.isTagSelected(t.render.label)?this.removeTag(t.render.label):this.createTag(t.render.label)}initIds(){let t=[];if(this.value){if(!this.tags){if(this.multiple){t=this.value}else{t=[this.value]}}else{if(this.multiple){const e=this.value;t=e.ids?e.ids:[]}else{const e=this.value;t=e.id?[e.id]:[]}}}return t}initTags(){let t=[];if(this.value){if(this.multiple){const e=this.value;t=e.tags?e.tags:[]}else{const e=this.value;t=e.tag?[e.tag]:[]}}return t}setTransparentCaret(){if(!this.multiple){this.hide();this.input?.classList.add("select-input-transparent-caret")}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=qn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};Do.SKELETON_COUNT=4;Do.DROPDOWN_OFFSET=4;Do.style=xo;const Mo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.multipleSelectAvatar?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})});this.multipleSelectAvatarInitials?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc,avatar:{round:true,initials:`JD`}})});this.multipleSelectTagging?.connect(this.countryConnector);this.singleSelect?.connect({resolve:t=>C(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?C({last:true,content:[],totalElements:0}):C({last:false,totalElements:1e4,content:Array.from({length:10},((a,i)=>({id:""+(i+e*10),firstName:"John",lastName:`Doe (${i+e*10})`,desc:`"${t}": page ${e}`})))}).pipe(vt(500)),render:t=>({label:`${t.firstName} ${t.lastName}`,description:t.desc})});this.singleSelectAvatar?.connect(this.countryConnector);this.singleSelectAvatarInitials?.connect({...this.countryConnector,render:t=>({label:t.country,description:t.capital||"No capital",avatar:{round:true,initials:`${t.country.charAt(0)?.toUpperCase()??"J"}${t.capital?.charAt(0)?.toUpperCase()??"D"}`}})});this.singleSelectTagging?.connect(this.countryConnector);setTimeout((()=>this.multipleSelect&&(this.multipleSelect.value=[])),5e3)}render(){return e(a,{key:"0427cd222f128124aa5b7304ecc56f98f82ad601",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"20731907f24cecd4f79bc2b8fb55bf4ca2a8781d",label:"Multiple Select",hint:"This is a hint!",ref:t=>this.multipleSelect=t,value:["1"],placeholder:"Hello World",onCatChange:()=>console.log("Multiple change",this.multipleSelect?.value),onCatBlur:t=>console.log("Multiple blur",t),multiple:true,noItems:"No results",clearable:true,errorUpdate:false},e("span",{key:"b4284b5fa7bd3c80c49900cc901a67ce87b02fba",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"1ae920c166bcffb8c417887ab01830bc9704d82b",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"6928bbfea0b54d3a2d82bdc16de71208934cd4ab",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"ffa816a1e6f4e5e170aeed4c64f75aefb928e800",label:"Multiple with tagging support",hint:"This is a hint!",ref:t=>this.multipleSelectTagging=t,value:{ids:["1"],tags:["Test","Albania","Algeria"]},placeholder:"Select country",onCatChange:()=>console.log("Multiple tagging change",this.multipleSelectTagging?.value),multiple:true,tags:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"a392acd00395251efe86deb5f95de439cb2e2947",label:"Single Select",hint:"This is a hint!",ref:t=>this.singleSelect=t,placeholder:"Search for a country or capital",onCatBlur:t=>console.log("Single blur",t),clearable:true,errorUpdate:false}),e("cat-select",{key:"abe4098459cb27c12ecccd500080ed4b183d4221",label:"Single with img",ref:t=>this.singleSelectAvatar=t,value:"1",placeholder:"Search for a country or capital",clearable:true,errorUpdate:false}),e("cat-select",{key:"59e0e9df2329e1ee7f96a071462a58e7aac8c057",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"bfed29db8e502f705877dd79ad9f584569639a22",overflow:true},e("cat-button",{key:"fda80f359585e24f3fa9cff4567b4c6d0681cc9d",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"180ed85afb561a07ff346bd481503d57c336fbe6",slot:"content",style:{width:"400px"}},e("cat-select",{key:"12efa7508dfcb72cb897a160353958ef2c66a7a0",label:"Single with tagging support",ref:t=>this.singleSelectTagging=t,value:{id:"",tag:"Albania"},placeholder:"Search for a country or capital",onCatChange:()=>console.log("Single change",this.singleSelectTagging?.value),tagHint:"new country",tags:true,clearable:true,errorUpdate:false,style:{width:"90%"}}))))}get countryConnector(){return{resolve:t=>C(t.map((t=>Co.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const a=Co.filter((e=>e.country.toLowerCase().indexOf(t.toLowerCase())===0||e.capital?.toLowerCase().indexOf(t.toLowerCase())===0));const i=a.slice(e*10,e*10+10);return C({last:i.length<10,totalElements:a.length,content:i}).pipe(vt(500))},render:t=>({label:t.country,description:t.capital||"No capital",avatar:{src:`https://picsum.photos/id/${Math.floor(Math.random()*100)}/200`,round:true}})}}};const Co=[{id:"0",country:"Afghanistan Extra extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large extra large ",capital:"Kabul"},{id:"1",country:"Albania",capital:"Tirana"},{id:"2",country:"Algeria",capital:"Alger"},{id:"3",country:"American Samoa",capital:"Fagatogo"},{id:"4",country:"Andorra",capital:"Andorra la Vella"},{id:"5",country:"Angola",capital:"Luanda"},{id:"6",country:"Anguilla",capital:"The Valley"},{id:"7",country:"Antarctica"},{id:"8",country:"Antigua and Barbuda",capital:"Saint John's"},{id:"9",country:"Argentina",capital:"Buenos Aires"},{id:"10",country:"Armenia",capital:"Yerevan"},{id:"11",country:"Aruba",capital:"Oranjestad"},{id:"12",country:"Australia",capital:"Canberra"},{id:"13",country:"Austria",capital:"Wien"},{id:"14",country:"Azerbaijan",capital:"Baku"},{id:"15",country:"Bahamas",capital:"Nassau"},{id:"16",country:"Bahrain",capital:"al-Manama"},{id:"17",country:"Bangladesh",capital:"Dhaka"},{id:"18",country:"Barbados",capital:"Bridgetown"},{id:"19",country:"Belarus",capital:"Minsk"},{id:"20",country:"Belgium",capital:"Bruxelles [Brussel]"},{id:"21",country:"Belize",capital:"Belmopan"},{id:"22",country:"Benin",capital:"Porto-Novo"},{id:"23",country:"Bermuda",capital:"Hamilton"},{id:"24",country:"Bhutan",capital:"Thimphu"},{id:"25",country:"Bolivia",capital:"La Paz"},{id:"26",country:"Bosnia and Herzegovina",capital:"Sarajevo"},{id:"27",country:"Botswana",capital:"Gaborone"},{id:"28",country:"Bouvet Island"},{id:"29",country:"Brazil",capital:"Brasília"},{id:"30",country:"British Indian Ocean Territory"},{id:"31",country:"Brunei",capital:"Bandar Seri Begawan"},{id:"32",country:"Bulgaria",capital:"Sofia"},{id:"33",country:"Burkina Faso",capital:"Ouagadougou"},{id:"34",country:"Burundi",capital:"Bujumbura"},{id:"35",country:"Cambodia",capital:"Phnom Penh"},{id:"36",country:"Cameroon",capital:"Yaound"},{id:"37",country:"Canada",capital:"Ottawa"},{id:"38",country:"Cape Verde",capital:"Praia"},{id:"39",country:"Cayman Islands",capital:"George Town"},{id:"40",country:"Central African Republic",capital:"Bangui"},{id:"41",country:"Chad",capital:"N'Djam"},{id:"42",country:"Chile",capital:"Santiago de Chile"},{id:"43",country:"China",capital:"Peking"},{id:"44",country:"Christmas Island",capital:"Flying Fish Cove"},{id:"45",country:"Cocos (Keeling) Islands",capital:"West Island"},{id:"46",country:"Colombia",capital:"Santaf"},{id:"47",country:"Comoros",capital:"Moroni"},{id:"48",country:"Congo",capital:"Brazzaville"},{id:"49",country:"Cook Islands",capital:"Avarua"},{id:"50",country:"Costa Rica",capital:"San José"},{id:"51",country:"Croatia",capital:"Zagreb"},{id:"52",country:"Cuba",capital:"La Habana"},{id:"53",country:"Cyprus",capital:"Nicosia"},{id:"54",country:"Czech Republic",capital:"Praha"},{id:"55",country:"Denmark",capital:"Copenhagen"},{id:"56",country:"Djibouti",capital:"Djibouti"},{id:"57",country:"Dominica",capital:"Roseau"},{id:"58",country:"Dominican Republic",capital:"Santo Domingo de Guzm"},{id:"59",country:"East Timor",capital:"Dili"},{id:"60",country:"Ecuador",capital:"Quito"},{id:"61",country:"Egypt",capital:"Cairo"},{id:"62",country:"El Salvador",capital:"San Salvador"},{id:"63",country:"England",capital:"London"},{id:"64",country:"Equatorial Guinea",capital:"Malabo"},{id:"65",country:"Eritrea",capital:"Asmara"},{id:"66",country:"Estonia",capital:"Tallinn"},{id:"67",country:"Ethiopia",capital:"Addis Abeba"},{id:"68",country:"Falkland Islands",capital:"Stanley"},{id:"69",country:"Faroe Islands",capital:"Tórshavn"},{id:"70",country:"Fiji Islands",capital:"Suva"},{id:"71",country:"Finland",capital:"Helsinki [Helsingfors]"},{id:"72",country:"France",capital:"Paris"},{id:"73",country:"French Guiana",capital:"Cayenne"},{id:"74",country:"French Polynesia",capital:"Papeete"},{id:"75",country:"French Southern territories"},{id:"76",country:"Gabon",capital:"Libreville"},{id:"77",country:"Gambia",capital:"Banjul"},{id:"78",country:"Georgia",capital:"Tbilisi"},{id:"79",country:"Germany",capital:"Berlin"},{id:"80",country:"Ghana",capital:"Accra"},{id:"81",country:"Gibraltar",capital:"Gibraltar"},{id:"82",country:"Greece",capital:"Athenai"},{id:"83",country:"Greenland",capital:"Nuuk"},{id:"84",country:"Grenada",capital:"Saint George's"},{id:"85",country:"Guadeloupe",capital:"Basse-Terre"},{id:"86",country:"Guam",capital:"Aga"},{id:"87",country:"Guatemala",capital:"Ciudad de Guatemala"},{id:"88",country:"Guinea",capital:"Conakry"},{id:"89",country:"Guinea-Bissau",capital:"Bissau"},{id:"90",country:"Guyana",capital:"Georgetown"},{id:"91",country:"Haiti",capital:"Port-au-Prince"},{id:"92",country:"Heard Island and McDonald Islands"},{id:"93",country:"Holy See (Vatican City State)",capital:"Citt"},{id:"94",country:"Honduras",capital:"Tegucigalpa"},{id:"95",country:"Hong Kong",capital:"Victoria"},{id:"96",country:"Hungary",capital:"Budapest"},{id:"97",country:"Iceland",capital:"Reykjavík"},{id:"98",country:"India",capital:"New Delhi"},{id:"99",country:"Indonesia",capital:"Jakarta"},{id:"100",country:"Iran",capital:"Tehran"},{id:"101",country:"Iraq",capital:"Baghdad"},{id:"102",country:"Ireland",capital:"Dublin"},{id:"103",country:"Israel",capital:"Jerusalem"},{id:"104",country:"Italy",capital:"Roma"},{id:"105",country:"Ivory Coast",capital:"Yamoussoukro"},{id:"106",country:"Jamaica",capital:"Kingston"},{id:"107",country:"Japan",capital:"Tokyo"},{id:"108",country:"Jordan",capital:"Amman"},{id:"109",country:"Kazakhstan",capital:"Astana"},{id:"110",country:"Kenya",capital:"Nairobi"},{id:"111",country:"Kiribati",capital:"Bairiki"},{id:"112",country:"Kuwait",capital:"Kuwait"},{id:"113",country:"Kyrgyzstan",capital:"Bishkek"},{id:"114",country:"Laos",capital:"Vientiane"},{id:"115",country:"Latvia",capital:"Riga"},{id:"116",country:"Lebanon",capital:"Beirut"},{id:"117",country:"Lesotho",capital:"Maseru"},{id:"118",country:"Liberia",capital:"Monrovia"},{id:"119",country:"Libyan Arab Jamahiriya",capital:"Tripoli"},{id:"120",country:"Liechtenstein",capital:"Vaduz"},{id:"121",country:"Lithuania",capital:"Vilnius"},{id:"122",country:"Luxembourg",capital:"Luxembourg [Luxemburg/L"},{id:"123",country:"Macao",capital:"Macao"},{id:"124",country:"North Macedonia",capital:"Skopje"},{id:"125",country:"Madagascar",capital:"Antananarivo"},{id:"126",country:"Malawi",capital:"Lilongwe"},{id:"127",country:"Malaysia",capital:"Kuala Lumpur"},{id:"128",country:"Maldives",capital:"Male"},{id:"129",country:"Mali",capital:"Bamako"},{id:"130",country:"Malta",capital:"Valletta"},{id:"131",country:"Marshall Islands",capital:"Dalap-Uliga-Darrit"},{id:"132",country:"Martinique",capital:"Fort-de-France"},{id:"133",country:"Mauritania",capital:"Nouakchott"},{id:"134",country:"Mauritius",capital:"Port-Louis"},{id:"135",country:"Mayotte",capital:"Mamoutzou"},{id:"136",country:"Mexico",capital:"Ciudad de M"},{id:"137",country:"Micronesia, Federated States of",capital:"Palikir"},{id:"138",country:"Moldova",capital:"Chisinau"},{id:"139",country:"Monaco",capital:"Monaco-Ville"},{id:"140",country:"Mongolia",capital:"Ulan Bator"},{id:"141",country:"Montenegro",capital:"Podgorica"},{id:"142",country:"Montserrat",capital:"Plymouth"},{id:"143",country:"Morocco",capital:"Rabat"},{id:"144",country:"Mozambique",capital:"Maputo"},{id:"145",country:"Myanmar",capital:"Rangoon (Yangon)"},{id:"146",country:"Namibia",capital:"Windhoek"},{id:"147",country:"Nauru",capital:"Yaren"},{id:"148",country:"Nepal",capital:"Kathmandu"},{id:"149",country:"Netherlands",capital:"Amsterdam"},{id:"150",country:"Netherlands Antilles",capital:"Willemstad"},{id:"151",country:"New Caledonia",capital:"Noum"},{id:"152",country:"New Zealand",capital:"Wellington"},{id:"153",country:"Nicaragua",capital:"Managua"},{id:"154",country:"Niger",capital:"Niamey"},{id:"155",country:"Nigeria",capital:"Abuja"},{id:"156",country:"Niue",capital:"Alofi"},{id:"157",country:"Norfolk Island",capital:"Kingston"},{id:"158",country:"North Korea",capital:"Pyongyang"},{id:"159",country:"Northern Ireland",capital:"Belfast"},{id:"160",country:"Northern Mariana Islands",capital:"Garapan"},{id:"161",country:"Norway",capital:"Oslo"},{id:"162",country:"Oman",capital:"Masqat"},{id:"163",country:"Pakistan",capital:"Islamabad"},{id:"164",country:"Palau",capital:"Koror"},{id:"165",country:"Palestine",capital:"Gaza"},{id:"166",country:"Panama",capital:"Ciudad de Panamá"},{id:"167",country:"Papua New Guinea",capital:"Port Moresby"},{id:"168",country:"Paraguay",capital:"Asunción"},{id:"169",country:"Peru",capital:"Lima"},{id:"170",country:"Philippines",capital:"Manila"},{id:"171",country:"Pitcairn",capital:"Adamstown"},{id:"172",country:"Poland",capital:"Warszawa"},{id:"173",country:"Portugal",capital:"Lisboa"},{id:"174",country:"Puerto Rico",capital:"San Juan"},{id:"175",country:"Qatar",capital:"Doha"},{id:"176",country:"Reunion",capital:"Saint-Denis"},{id:"177",country:"Romania",capital:"Bucuresti"},{id:"178",country:"Russian Federation",capital:"Moscow"},{id:"179",country:"Rwanda",capital:"Kigali"},{id:"180",country:"Saint Helena",capital:"Jamestown"},{id:"181",country:"Saint Kitts and Nevis",capital:"Basseterre"},{id:"182",country:"Saint Lucia",capital:"Castries"},{id:"183",country:"Saint Pierre and Miquelon",capital:"Saint-Pierre"},{id:"184",country:"Saint Vincent and the Grenadines",capital:"Kingstown"},{id:"185",country:"Samoa",capital:"Apia"},{id:"186",country:"San Marino",capital:"San Marino"},{id:"187",country:"Sao Tome and Principe",capital:"São Tomé"},{id:"188",country:"Saudi Arabia",capital:"Riyadh"},{id:"189",country:"Scotland",capital:"Edinburgh"},{id:"190",country:"Senegal",capital:"Dakar"},{id:"191",country:"Serbia",capital:"Belgrade"},{id:"192",country:"Seychelles",capital:"Victoria"},{id:"193",country:"Sierra Leone",capital:"Freetown"},{id:"194",country:"Singapore",capital:"Singapore"},{id:"195",country:"Slovakia",capital:"Bratislava"},{id:"196",country:"Slovenia",capital:"Ljubljana"},{id:"197",country:"Solomon Islands",capital:"Honiara"},{id:"198",country:"Somalia",capital:"Mogadishu"},{id:"199",country:"South Africa",capital:"Pretoria"},{id:"200",country:"South Georgia and the South Sandwich Islands"},{id:"201",country:"South Korea",capital:"Seoul"},{id:"202",country:"South Sudan",capital:"Juba"},{id:"203",country:"Spain",capital:"Madrid"},{id:"204",country:"Sri Lanka",capital:"Colombo, Sri Jayawardenepura Kotte"},{id:"205",country:"Sudan",capital:"Khartum"},{id:"206",country:"Suriname",capital:"Paramaribo"},{id:"207",country:"Svalbard and Jan Mayen",capital:"Longyearbyen"},{id:"208",country:"Swaziland",capital:"Mbabane"},{id:"209",country:"Sweden",capital:"Stockholm"},{id:"210",country:"Switzerland",capital:"Bern"},{id:"211",country:"Syria",capital:"Damascus"},{id:"212",country:"Tajikistan",capital:"Dushanbe"},{id:"213",country:"Tanzania",capital:"Dodoma"},{id:"214",country:"Thailand",capital:"Bangkok"},{id:"215",country:"The Democratic Republic of Congo",capital:"Kinshasa"},{id:"216",country:"Togo",capital:"Lomé"},{id:"217",country:"Tokelau",capital:"Fakaofo"},{id:"218",country:"Tonga",capital:"Nuku'alofa"},{id:"219",country:"Trinidad and Tobago",capital:"Port-of-Spain"},{id:"220",country:"Tunisia",capital:"Tunis"},{id:"221",country:"Turkey",capital:"Ankara"},{id:"222",country:"Turkmenistan",capital:"Ashgabat"},{id:"223",country:"Turks and Caicos Islands",capital:"Cockburn Town"},{id:"224",country:"Tuvalu",capital:"Funafuti"},{id:"225",country:"Uganda",capital:"Kampala"},{id:"226",country:"Ukraine",capital:"Kyiv"},{id:"227",country:"United Arab Emirates",capital:"Abu Dhabi"},{id:"228",country:"United Kingdom",capital:"London"},{id:"229",country:"United States",capital:"Washington"},{id:"230",country:"United States Minor Outlying Islands"},{id:"231",country:"Uruguay",capital:"Montevideo"},{id:"232",country:"Uzbekistan",capital:"Toskent"},{id:"233",country:"Vanuatu",capital:"Port-Vila"},{id:"234",country:"Venezuela",capital:"Caracas"},{id:"235",country:"Vietnam",capital:"Hanoi"},{id:"236",country:"Virgin Islands, British",capital:"Road Town"},{id:"237",country:"Virgin Islands, U.S.",capital:"Charlotte Amalie"},{id:"238",country:"Wales",capital:"Cardiff"},{id:"239",country:"Wallis and Futuna",capital:"Mata-Utu"},{id:"240",country:"Western Sahara",capital:"El-Aai"},{id:"241",country:"Yemen",capital:"Sanaa"},{id:"242",country:"Zambia",capital:"Lusaka"},{id:"243",country:"Zimbabwe",capital:"Harare"}];const Ro=':host{display:flex;flex-direction:column;position:relative;--background:#ebecf0;--highlight:#d7dbe0;--speed:2s}:host([variant=square]),:host([variant=circle]){display:inline-flex}:host([hidden]){display:none}:host([variant=head]:not(:last-child)){margin-bottom:1rem}:host([variant=body]:not(:last-child)){margin-bottom:2rem}.skeleton{display:block;border-radius:var(--cat-border-radius-m, 0.25rem);background:var(--background)}.skeleton-circle{border-radius:10rem}.skeleton-xs.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-square,.skeleton-xs.skeleton-circle{width:var(--width, 1.5rem);height:var(--height, 1.5rem)}.skeleton-xs.skeleton-head,.skeleton-xs.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xs.skeleton-head{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-xs.skeleton-body{height:calc(0.75rem - 4px);margin:calc((1rem - 0.75rem + 4px) * 0.5) 0}.skeleton-s.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2rem)}.skeleton-s.skeleton-square,.skeleton-s.skeleton-circle{width:var(--width, 2rem);height:var(--height, 2rem)}.skeleton-s.skeleton-head,.skeleton-s.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-s.skeleton-head{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-s.skeleton-body{height:calc(0.875rem - 4px);margin:calc((1.125rem - 0.875rem + 4px) * 0.5) 0}.skeleton-m.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 2.5rem)}.skeleton-m.skeleton-square,.skeleton-m.skeleton-circle{width:var(--width, 2.5rem);height:var(--height, 2.5rem)}.skeleton-m.skeleton-head,.skeleton-m.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-m.skeleton-head{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-m.skeleton-body{height:calc(0.9375rem - 4px);margin:calc((1.25rem - 0.9375rem + 4px) * 0.5) 0}.skeleton-l.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3rem)}.skeleton-l.skeleton-square,.skeleton-l.skeleton-circle{width:var(--width, 3rem);height:var(--height, 3rem)}.skeleton-l.skeleton-head,.skeleton-l.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-l.skeleton-head{height:calc(1.5rem - 4px);margin:calc((1.75rem - 1.5rem + 4px) * 0.5) 0}.skeleton-l.skeleton-body{height:calc(1.125rem - 4px);margin:calc((1.5rem - 1.125rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-rectangle{width:var(--width, 100%);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-square,.skeleton-xl.skeleton-circle{width:var(--width, 3.5rem);height:var(--height, 3.5rem)}.skeleton-xl.skeleton-head,.skeleton-xl.skeleton-body{width:var(--width, var(--line-width, 100%))}.skeleton-xl.skeleton-head{height:calc(1.75rem - 4px);margin:calc((2rem - 1.75rem + 4px) * 0.5) 0}.skeleton-xl.skeleton-body{height:calc(1.25rem - 4px);margin:calc((1.5rem - 1.25rem + 4px) * 0.5) 0}.skeleton-sheen{background:linear-gradient(90deg, var(--background) 33%, var(--highlight) 50%, var(--background) 66%) var(--background);background-size:300% 100%;animation:sheen var(--speed) ease-in-out infinite}.skeleton-pulse{position:relative;overflow:hidden}.skeleton-pulse::before{content:"";display:block;position:absolute;width:100%;height:100%;background-color:var(--highlight);animation:var(--speed) ease-in-out 0.5s infinite normal none running pulse;opacity:0}@keyframes sheen{0%{background-position:right}}@keyframes pulse{50%{opacity:1}}';const Ao=Ro;const So=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(a,{key:"95992890ce7b8c90068af979179fe6e512cd599c"},Array.from(Array(this.count)).map((()=>e("div",{style:this.style,class:{skeleton:true,[`skeleton-${this.effect}`]:Boolean(this.effect),[`skeleton-${this.variant}`]:Boolean(this.variant),[`skeleton-${this.size}`]:Boolean(this.size)}}))))}get count(){switch(this.variant){case"head":return Math.max(1,this.lines||1);case"body":return Math.max(1,this.lines||3);default:return 1}}get style(){return this.variant==="head"||this.variant==="body"?{"--line-width":`${this.random(50,100)}%`}:undefined}random(t,e){return Math.floor(Math.random()*(e-t+1)+t)}};So.style=Ao;const Fo=":host{display:inline-flex;vertical-align:middle;-webkit-user-select:none;-ms-user-select:none;user-select:none;}:host[hidden]{display:none}span{display:inline-flex}svg{fill:none;stroke:currentColor;stroke-dasharray:135px;stroke-dashoffset:95px;stroke-linecap:round;stroke-width:5px;transform-origin:center center;animation:spin 0.75s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;width:1em;height:1em}.spinner-xs svg{font-size:0.75rem}.spinner-s svg{font-size:1rem}.spinner-m svg{font-size:1.25rem}.spinner-l svg{font-size:1.5rem}.spinner-xl svg{font-size:1.75rem}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";const To=Fo;const $o=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined;this.value=0}render(){return e("span",{key:"8922d0ec7f5474084a39a8b3a4620bee426cea78",role:"progressbar",tabindex:"-1","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true","aria-valuenow":this.value,"aria-valuemin":"0","aria-valuemax":"100",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"6a649c21b27b3dbad3c73a71936566e7e9648254",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"3fb75a339ec6e18d0209e9da2cbf650f2dae4420",cx:"24",cy:"24",r:"21.5"})))}};$o.style=To;const Bo=":host{display:block}:host([hidden]){display:none}";const Eo=Bo;let Oo=0;const No=class{constructor(e){t(this,e);this.catClick=r(this,"catClick",7);this.label="";this.icon=undefined;this.iconOnly=false;this.iconRight=false;this.url=undefined;this.urlTarget=undefined;this.deactivated=false;this.noActive=false;this.error=false;this.nativeAttributes=undefined}connectedCallback(){if(!this.hostElement.id){this.hostElement.id=`cat-tab-${Oo++}`}}onClick(t){this.catClick.emit(t)}render(){return e(a,{key:"0db9a9f8449cb69691552450d653d86251a17954"})}get hostElement(){return i(this)}};No.style=Eo;const Lo=':host{display:flex;flex-direction:row;box-shadow:inset 0 -1px 0 0 rgb(var(--cat-border-color, 235, 236, 240))}:host([hidden]){display:none}:host([tabs-align=center]){justify-content:center}:host([tabs-align=right]){justify-content:end}:host([tabs-align=justify]) cat-button{flex:1 0 auto}.cat-tab{display:inline-flex;flex-direction:column;align-items:center;justify-content:space-between;position:relative;transition:none}.cat-tab:first-of-type{margin-left:-0.75rem}.cat-tab:last-of-type{margin-right:-0.75rem}.cat-tab::after{opacity:0;content:"";position:absolute;background:currentColor;left:0.75rem;right:0.75rem;bottom:0;height:2px}.cat-tab:hover::after{opacity:0.25}.cat-tab.cat-tab-active{font-weight:700;color:rgb(var(--cat-primary-text-active, 2, 99, 113))}.cat-tab.cat-tab-error{color:rgb(var(--cat-danger-text-active, 174, 42, 10))}.cat-tab.cat-tab-active::after{opacity:1}';const Wo=Lo;const jo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.tabs=[];this.activeTab="";this.tabsAlign="left"}componentWillLoad(){this.syncTabs()}componentDidLoad(){this.mutationObserver=new MutationObserver((t=>t.some((t=>t.target.nodeName==="CAT-TAB"))&&this.syncTabs()));this.mutationObserver?.observe(this.hostElement,{childList:true,attributes:true,subtree:true})}disconnectedCallback(){this.mutationObserver?.disconnect()}onActiveTabChange(t){const e=this.tabs.findIndex((e=>e.id===t));this.catChange.emit({id:t,index:e})}onKeydown(t){if(["ArrowDown","ArrowUp","ArrowRight","ArrowLeft"].includes(t.key)){const e=this.hostElement.shadowRoot?.querySelectorAll('cat-button[role="tab"]');const a=Array.from(e??[]).filter((t=>!t.disabled));const i=this.hostElement.shadowRoot?.activeElement;const r=i?a.indexOf(i):-1;const n=["ArrowDown","ArrowRight"].includes(t.key)?1:-1;const o=r<0?0:(r+n+a.length)%a.length;a[o].doFocus();t.preventDefault()}}async setActive(t){this.activate(this.tabs.find((e=>e.id===t)))}async setActiveIndex(t){this.activate(this.tabs[t])}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"057726c753ef2e4d5557736488fbffb92774f26f"},this.tabs.map((t=>e("cat-button",{buttonId:t.id,role:"tab",part:"tab",class:{"cat-tab":true,"cat-tab-active":t.id===this.activeTab,"cat-tab-error":t.error},active:t.id===this.activeTab,color:t.error?"danger":t.id===this.activeTab?"primary":"secondary",variant:"text",icon:t.icon?t.error?"$cat:input-error":t.icon:undefined,iconOnly:t.iconOnly,iconRight:t.iconRight,url:t.url,disabled:t.deactivated,urlTarget:t.urlTarget,onCatClick:()=>this.click(t),nativeAttributes:{...t.nativeAttributes},nativeContentAttributes:{"data-text":t.label},"data-dropdown-no-close":true},t.label))))}syncTabs(){this.tabs=Array.from(this.hostElement.querySelectorAll("cat-tab"));this.activeTab=this.activeTab||this.tabs.filter((t=>this.canActivate(t)&&!t.noActive))[0]?.id}click(t){if(this.canActivate(t)){t.click();if(!t.noActive){this.activate(t)}}}activate(t){if(!t){this.activeTab=""}else if(this.canActivate(t)){this.activeTab=t.id}}canActivate(t){return!t.deactivated&&!t.url&&t.id!==this.activeTab}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};jo.style=Wo;const Po=".label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}button.cat-text-primary,button.cat-link-primary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}button.cat-text-primaryInverted,button.cat-link-primaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}button.cat-text-secondary,button.cat-link-secondary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}button.cat-text-secondaryInverted,button.cat-link-secondaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}button.cat-text-info,button.cat-link-info{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-info:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-info:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}button.cat-text-success,button.cat-link-success{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-success:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-success:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}button.cat-text-warning,button.cat-link-warning{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-warning:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-warning:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}button.cat-text-danger,button.cat-link-danger{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-danger:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-danger:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}:host{display:flex;flex-direction:column;gap:0.5rem}input{font:inherit;margin:0;min-width:20rem;padding:0.375rem 0;flex:1 1 auto;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.25rem;padding:0.25rem 0.75rem;min-height:2rem;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);flex-wrap:wrap;}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.tag-pill{display:flex;align-items:center;gap:0.5rem;padding:0.25rem 0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-s, 0.125rem);white-space:nowrap;min-width:0}.tag-pill>span{overflow:hidden;text-overflow:ellipsis;flex:1 1 0}.tag-pill>cat-button{margin-right:-0.25rem;margin-left:-0.25rem}.icon-suffix{align-self:center}.input-inner-wrapper{flex:1 1 auto;display:flex}";const Yo=Po;let Ho=0;const _o=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-input-${Ho++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.tags=[];this.errorMap=undefined;this.requiredMarker="optional";this.disabled=false;this.placeholder=undefined;this.hint=undefined;this.identifier=undefined;this.label="";this.name=undefined;this.labelHidden=false;this.required=false;this.nativeAttributes=undefined;this.testId=undefined;this.value=undefined;this.clearable=false;this.errors=undefined;this.errorUpdate=0;this.tagCreationChars=[" "];this.addOnBlur=false}get id(){return this.identifier||this._id}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}onKeyDown(t){const e=this.hostElement.shadowRoot?.activeElement===this.input;if(["Enter",...this.tagCreationChars].includes(t.key)&&e){t.preventDefault();this.addInputValue()}else if(["Backspace"].includes(t.key)&&this.input?.selectionStart===0&&(this.value?.length??0)>0&&e){this.value=this.value?.slice(0,-1)??[];this.catChange.emit(this.value)}}onErrorsChanged(t,e,a=true){if(!Vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"ea219f15738c0e0b11d7b4134e970141c337a991"},e("div",{key:"54cbafd14a0a243b459b8cce5f5b9199cdef7f59",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"4a916c1ec4f99f3db7e2a31008d0277b1a93690e",htmlFor:`tags-${this.id}-input`,part:"label"},e("span",{key:"999ad493f6ab3b97e9dbf4c62033ad358a77ab57",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"ff636ee0ccd174878eafe0ab709e9c66d3ba4d3e",name:"label"})||this.label,e("div",{key:"b983335cc6f08005495c3784fb9c0de6a39f039f",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"91fd49cfdf2e2a7af3d7d87b91c4f6bc6ed88f3f",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"d59686d3ac8c02b2198fc8013ad34463d8e2afba",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"))))),e("div",{key:"37cc1963186b77dae6e853042db75919316f5a10",class:{"input-wrapper":true,"input-disabled":this.disabled,"input-invalid":this.invalid}},this.value?.map((t=>e("div",{class:"tag-pill"},e("span",null,t),!this.disabled&&e("cat-button",{size:"xs",variant:"text",icon:"$cat:select-clear",iconOnly:true,a11yLabel:I.t("select.deselect"),onClick:()=>this.deselect(t),tabIndex:-1})))),e("div",{key:"37902cc20fcf55f9f8848daa167a765dc7f48ac2",class:"input-inner-wrapper"},e("input",{key:"316e34e90944d96b1e829a49e5041ad865336d63","data-test":this.testId,...this.nativeAttributes,part:"input",id:`tags-${this.id}-input`,class:"tags-input",role:"combobox",ref:t=>this.input=t,"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined,onInput:this.onInput.bind(this),onBlur:this.onBlur.bind(this),placeholder:this.placeholder,disabled:this.disabled}),this.clearable&&!this.disabled&&(this.value?.length??0)>0&&e("cat-button",{key:"17a6710dbf2aa77eefa25ad97252f78101e1dcee",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":I.t("input.clear"),onClick:this.clear.bind(this),"data-dropdown-no-close":true}),this.invalid&&e("cat-icon",{key:"c439cfc9bf8e2579d053cb7efe827665456167ed",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}))),this.hasHint&&e(oe,{key:"577f9da90fb534b99d43b7d35643237d46c6f6da",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}onInput(){const t=[...new Set(this.input?.value?.split(this.createSplitRegex(this.tagCreationChars))??[])].filter((t=>!!t&&!this.value?.includes(t)));if(t.length>1){this.value=[...this.value??[],...t];this.catChange.emit(this.value);if(this.input){this.input.value=""}}}onBlur(){if(this.addOnBlur){this.addInputValue()}}addInputValue(){const t=this.input?.value.trim();if(t&&!this.value?.includes(t)){this.value=[...this.value??[],t];this.catChange.emit(this.value)}if(this.input){this.input.value=""}}clear(){this.value=[];this.catChange.emit(this.value);if(this.input){this.input.value=""}}deselect(t){this.value=this.value?.filter((e=>e!==t));this.catChange.emit(this.value)}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=qn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.input;if(!t){this.showErrors()}}createSplitRegex(t){const e=t.map((t=>t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")));e.push("\\n","\\r");const a=`[${e.join("")}]`;return new RegExp(a,"g")}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};_o.style=Yo;var Uo=new Map;function Ko(t){var e=Uo.get(t);e&&e.destroy()}function Vo(t){var e=Uo.get(t);e&&e.update()}var qo=null;"undefined"==typeof window?((qo=function(t){return t}).destroy=function(t){return t},qo.update=function(t){return t}):((qo=function(t,e){return t&&Array.prototype.forEach.call(t.length?t:[t],(function(t){return function(t){if(t&&t.nodeName&&"TEXTAREA"===t.nodeName&&!Uo.has(t)){var e,a=null,i=window.getComputedStyle(t),r=(e=t.value,function(){o({testForHeightReduction:""===e||!t.value.startsWith(e),restoreTextAlign:null}),e=t.value}),n=function(e){t.removeEventListener("autosize:destroy",n),t.removeEventListener("autosize:update",c),t.removeEventListener("input",r),window.removeEventListener("resize",c),Object.keys(e).forEach((function(a){return t.style[a]=e[a]})),Uo.delete(t)}.bind(t,{height:t.style.height,resize:t.style.resize,textAlign:t.style.textAlign,overflowY:t.style.overflowY,overflowX:t.style.overflowX,wordWrap:t.style.wordWrap});t.addEventListener("autosize:destroy",n),t.addEventListener("autosize:update",c),t.addEventListener("input",r),window.addEventListener("resize",c),t.style.overflowX="hidden",t.style.wordWrap="break-word",Uo.set(t,{destroy:n,update:c}),c()}function o(e){var r,n,c=e.restoreTextAlign,s=void 0===c?null:c,l=e.testForHeightReduction,d=void 0===l||l,h=i.overflowY;if(0!==t.scrollHeight&&("vertical"===i.resize?t.style.resize="none":"both"===i.resize&&(t.style.resize="horizontal"),d&&(r=function(t){for(var e=[];t&&t.parentNode&&t.parentNode instanceof Element;)t.parentNode.scrollTop&&e.push([t.parentNode,t.parentNode.scrollTop]),t=t.parentNode;return function(){return e.forEach((function(t){var e=t[0],a=t[1];e.style.scrollBehavior="auto",e.scrollTop=a,e.style.scrollBehavior=null}))}}(t),t.style.height=""),n="content-box"===i.boxSizing?t.scrollHeight-(parseFloat(i.paddingTop)+parseFloat(i.paddingBottom)):t.scrollHeight+parseFloat(i.borderTopWidth)+parseFloat(i.borderBottomWidth),"none"!==i.maxHeight&&n>parseFloat(i.maxHeight)?("hidden"===i.overflowY&&(t.style.overflow="scroll"),n=parseFloat(i.maxHeight)):"hidden"!==i.overflowY&&(t.style.overflow="hidden"),t.style.height=n+"px",s&&(t.style.textAlign=s),r&&r(),a!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),a=n),h!==i.overflow&&!s)){var u=i.textAlign;"hidden"===i.overflow&&(t.style.textAlign="start"===u?"end":"start"),o({restoreTextAlign:u,testForHeightReduction:!0})}}function c(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Ko),t},qo.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Vo),t});var Jo=qo;const Go=".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}button.cat-text-primary,button.cat-link-primary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}button.cat-text-primaryInverted,button.cat-link-primaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-primaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-primaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}button.cat-text-secondary,button.cat-link-secondary{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondary:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondary:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}button.cat-text-secondaryInverted,button.cat-link-secondaryInverted{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-secondaryInverted:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-secondaryInverted:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}button.cat-text-info,button.cat-link-info{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-info:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-info:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}button.cat-text-success,button.cat-link-success{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-success:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-success:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}button.cat-text-warning,button.cat-link-warning{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-warning:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-warning:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}button.cat-text-danger,button.cat-link-danger{margin:0;padding:0;font:inherit;border:none;background:none;cursor:pointer}button.cat-link-danger:hover:not(:disabled){text-decoration:var(--cat-link-decoration-hover, underline)}button.cat-link-danger:focus-visible{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;flex-direction:column;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400)}:host([hidden]){display:none}.textarea-field,.textarea-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.textarea-field.textarea-horizontal{flex-direction:row;gap:1rem}.textarea-readonly{pointer-events:none}.textarea-wrapper{position:relative;display:flex;flex-direction:column}.icon-suffix{position:absolute;top:calc(0.625rem - 2px);right:0.75rem;background:rgba(255, 255, 255, 0.75);border-radius:100rem}.textarea-disabled .icon-suffix{background:rgba(242, 244, 247, 0.75)}textarea{margin:0;padding:0.625rem 0.75rem;box-sizing:border-box;min-height:2.5rem;font:inherit;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);border:none;box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;resize:vertical;--border-color:var(--cat-border-color-dark, 215, 219, 224);}textarea:disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108));resize:none}textarea:not(:disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}textarea:focus{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.textarea-invalid textarea{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}textarea::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}textarea:-webkit-autofill,textarea:-webkit-autofill:hover,textarea:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}";const Zo=Go;let Xo=0;const Qo=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-textarea-${Xo++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.hasSlottedCounter=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;this.disabled=false;this.hint=undefined;this.identifier=undefined;this.label="";this.labelHidden=false;this.maxLength=undefined;this.minLength=undefined;this.name=undefined;this.placeholder=undefined;this.readonly=false;this.required=false;this.rows=3;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.onErrorsChanged(this.errors,undefined,false)}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]');this.hasSlottedCounter=!!this.hostElement.querySelector('[slot="counter"]')}componentDidLoad(){Jo(this.textarea)}async doFocus(t){this.textarea.focus(t)}async doBlur(){this.textarea.blur()}async clear(){this.value="";this.catChange.emit(this.value)}onErrorsChanged(t,e,a=true){if(!Vn(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t||undefined;if(a){this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"776354bbb03c8cb024d707f005cc53b11a61bc08"},e("div",{key:"8ba766cb2681246058e7bd1082bb8b06d09c3edf",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"75345030c6d4c269f60da416c43ddaf0979f93fc",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"b0332bc73a58d3559e31620687802cf5abf5d92f",htmlFor:this.id,part:"label"},e("span",{key:"177f5cccd3b74c85fa86acc1a9f2b4a0bc05809e",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"775fd2269ed0d8333d1a1630cc6fd4928fe851a0",name:"label"})||this.label,e("div",{key:"a3db8aaaae6a72789e7b1039c5ce685335f081da",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"7b80ecce688910d85b63b230085489bfdde5d833",class:"label-optional","aria-hidden":"true"},"(",I.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"0d047c9fc850c795df761d4b9d7a414861eb38be",class:"label-optional","aria-hidden":"true"},"(",I.t("input.required"),")"),(this.maxLength||this.hasSlottedCounter)&&e("div",{key:"d1339f4e4df011c65c57f701d5fc861966ff918d",class:"label-character-count","aria-hidden":"true"},this.hasSlottedCounter?e("slot",{name:"counter"}):`${this.value?.length??0}/${this.maxLength}`))))),e("div",{key:"31af38f5bd63cbf2b315b072421dbbded35ee5ae",class:"textarea-container"},e("div",{key:"5da2c1a1cbcd790a931a1444097919648f73761e",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"bc3f1210a9ed12884e916e050e4f0c93823d0600","data-test":this.testId,...this.nativeAttributes,part:"textarea",ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,autocomplete:this.autoComplete,maxlength:this.maxLength,minlength:this.minLength,name:this.name,placeholder:this.placeholder,readonly:this.readonly,required:this.required,rows:this.rows,value:this.value,onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-invalid":this.invalid?"true":undefined,"aria-describedby":this.hasHint?this.id+"-hint":undefined}),this.invalid&&e("cat-icon",{key:"342839d1ebb8fd3fab02d6692ec26b680fb187c6",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(oe,{key:"132bfe8caf387912b7d1156e2b066aecec99ed54",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return this.errorMap===true||!!Object.keys(this.errorMap||{}).length}onInput(){this.value=this.textarea.value;this.catChange.emit(this.value);this.showErrorsIfTimeout()}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t);if(Vn(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=qn(this.errorUpdate,null);if(t!==null){typeof this.errorUpdateTimeoutId==="number"&&window.clearTimeout(this.errorUpdateTimeoutId);this.errorUpdateTimeoutId=window.setTimeout((()=>this.showErrors()),t);return true}return false}showErrorsIfNoFocus(){const t=document.activeElement===this.hostElement||document.activeElement===this.textarea;if(!t){this.showErrors()}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Qo.style=Zo;function tc(t){const e=new Intl.DateTimeFormat(t,{hour:"2-digit",minute:"2-digit"}).format(new Date).toLowerCase();return e.includes("am")||e.includes("pm")}function ec(t){return{change:I.t("timepicker.change"),choose:I.t("timepicker.choose"),timeFormat:tc(t)?"12":"24"}}function ac(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function ic(t,e,a){const[,i,r]=t?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];const[,n,o]=a?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];let c=-Infinity;let s=Infinity;if(i!==undefined&&r!==undefined){c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),i,r).getTime()}if(n!==undefined&&o!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),n,o).getTime()}return new Date(Math.min(Math.max(e.getTime(),c),s))}function rc(t,e){const[,a,i]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(a===undefined||i===undefined){return false}return t.getHours()<a||t.getHours()===a&&t.getMinutes()<i}function nc(t,e){const[,a,i]=e?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(a===undefined||i===undefined){return false}return t.getHours()>a||t.getHours()===a&&t.getMinutes()>i}const oc=":host{display:block}:host([hidden]){display:none}.label-aria{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.cat-time-addon{margin-left:-1px;display:flex}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const cc=oc;const sc=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this.language=I.getLocale();this.locale=ec(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.valueChangedBySelection=false;this.requiredMarker="optional";this.horizontal=false;this.autoComplete="off";this.clearable=false;this.disabled=false;this.hint=undefined;this.icon=undefined;this.iconRight=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.max=undefined;this.min=undefined;this.name=undefined;this.placeholder=undefined;this.textPrefix=undefined;this.textSuffix=undefined;this.readonly=false;this.required=false;this.value=undefined;this.errors=undefined;this.errorUpdate=0;this.nativeAttributes=undefined;this.placement="bottom-end";this.step=30}onMinChanged(t,e){if(t!==e){this.reclamp("min",t)}}onMaxChanged(t,e){if(t!==e){this.reclamp("max",t)}}onValueChanged(t,e){if(this.valueChangedBySelection){this.valueChangedBySelection=false}else if(t!==e){this.set12hFormat();this.syncValue(t??"")}}componentWillLoad(){this.set12hFormat();this.syncValue(this.value??"")}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){this.input?.mask({time:true,timeFormat:this.locale.timeFormat,timePattern:["h","m"]})}onOpen(){const t=t=>this.hostElement.shadowRoot?.querySelector(t);const e=ic(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const a=t(`[data-time="${ac(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const i=t(`[data-time="${ac(e)}"]`);setTimeout((()=>{(i??a)?.doFocus();(i??a)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;let a=this.value;if(!t){this.selectionTime=null;a=undefined}else{const e=ic(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;a=ac(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==a){this.valueChangedBySelection=true;this.value=a;this.catChange.emit(this.value)}else{this.valueChangedBySelection=false}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"55ddaea80f34a762b7f3b97145f3fc23678764df"},e("cat-input",{key:"b9c72fafc50c6f123478f426d771ae25fa77d7d9",class:"cat-time-input",ref:t=>this.input=t,requiredMarker:this.requiredMarker,horizontal:this.horizontal,autoComplete:this.autoComplete,clearable:this.clearable,disabled:this.disabled,hint:this.hint,icon:this.icon,iconRight:this.iconRight,identifier:this.identifier,label:this.label,labelHidden:this.labelHidden,name:this.name,placeholder:this.placeholder,textPrefix:this.textPrefix,textSuffix:this.textSuffix,readonly:this.readonly,required:this.required,value:this.format(this.selectionTime,false),errors:this.errors,errorUpdate:this.errorUpdate,nativeAttributes:this.nativeAttributes,onCatFocus:t=>this.catFocus.emit(t.detail),onCatBlur:t=>this.onInputBlur(t.detail)},e("span",{key:"fff1bf4b55421e1d3d0a59c6526e2a1489531c73",slot:"label"},this.hasSlottedLabel&&e("slot",{key:"3bf7db213bf73ed33f47b78df88445654feef6f1",name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"cd3bc1b7be142e85106f03ab84f664279f129c02",class:"label-aria"}," (HH:mm)")),e("div",{key:"c56add3522077567621147d80a327c7acfa93110",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{key:"e895941581bd1d6a67eb3f384d6cdf4cd6663ca2",class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"b44d49f1d06c3a78342f60b873ad57d613fe38c5",slot:"addon",placement:this.placement},e("cat-button",{key:"95789ba8b632e442a41059c60a8394efa61a6e54",slot:"trigger",class:"cat-time-toggle",disabled:this.disabled||this.readonly,icon:"$cat:timepicker-clock",iconOnly:true,a11yLabel:this.selectionTime?`${this.locale.change}, ${this.format(this.selectionTime)}`:this.locale.choose}),e("nav",{key:"fd16e5301bdde5fa3f3ac929380d9f8ca7cef75b",slot:"content",class:"cat-nav"},e("ul",{key:"9107c10a9533ef4cef0c0718cba17e097a7d54bd"},this.timeArray().map((t=>{const a=ac(t);const i=rc(t,this.min??null)||nc(t,this.max??null);return e("li",null,e("cat-button",{class:{"cat-nav-item":true,"time-disabled":i},disabled:i,active:a===this.value,color:a===this.value?"primary":"secondary",variant:a===this.value?"filled":"outlined",onCatClick:()=>this.select(t),"data-time":a},this.format(t)))})))))),this.hasSlottedHint&&e("span",{key:"55b0ac7a0d4aa7f743d23a3f0f8461b4f1e44781",slot:"hint"},e("slot",{key:"8f05bb69ab686061bebad8cc6a1364e0bea5267a",name:"hint"}))))}timeArray(){const t=[];const e=new Date(2e3,5,1,0,0,0);let a=new Date(e.getTime());while(a.getDate()===e.getDate()){t.push(a);a=new Date(a.getTime()+this.step*6e4)}return t}syncValue(t){const[,e,a]=t.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(e===undefined||a===undefined){this.select(null);return}this.select(this.locale.timeFormat==="24"?new Date(2e3,5,1,e,a,0):new Date(2e3,5,1,e%12+(this.isAm?0:12),a,0))}set12hFormat(){const[,t]=this.value?.match(/(\d{2}):(\d{2})/)?.map(Number)??[];if(this.locale.timeFormat==="12"){this.isAm=t===0||t<12}}toggleAm(){if(this.selectionTime){this.select(new Date(this.selectionTime.getTime()+(this.isAm?12:-12)*36e5))}else{this.isAm=!this.isAm}}onInputBlur(t){this.syncValue(this.input?.value??"");this.catBlur.emit(t)}format(t,e=true){const a=t?new Intl.DateTimeFormat(this.language,{hour:"2-digit",minute:"2-digit"}).format(t):"";return e?a:a.replace(/\s?(am|pm)/i,"")}reclamp(t,e){if(!this.value)return;const a=(t==="min"?e:this.min)??null;const i=(t==="max"?e:this.max)??null;const[r,n,o]=this.value.match(/(\d{2}):(\d{2})/)??[];const c=r?ac(ic(a,new Date(2e3,5,1,Number(n),Number(o)),i)):undefined;if(this.value!==c){this.syncValue(c??"");this.catChange.emit(c)}}static get delegatesFocus(){return true}get hostElement(){return i(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"],value:["onValueChanged"]}}};sc.style=cc;const lc='.hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer}.label-left{flex-direction:row-reverse}input{position:absolute;margin:0;width:2rem;height:1.25rem;opacity:0;cursor:inherit}.toggle-placeholder{width:calc(2rem + 1px);flex-shrink:0}.toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;position:relative;width:2rem;height:1.25rem;border-radius:10rem;background-color:rgb(var(--cat-border-color-dark, 215, 219, 224));transition:background-color 125ms ease;pointer-events:none}:checked+.toggle{background-color:rgb(var(--cat-primary-bg, 0, 129, 148))}:focus-visible+.toggle{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.toggle::after{content:"";position:absolute;width:1rem;height:1rem;background:#fff;border-radius:10rem;transform:translateX(calc(2px - 0.5rem));transition:transform 125ms linear;box-shadow:0 1px 2px rgba(27, 31, 38, 0.06), 0 1px 3px rgba(27, 31, 38, 0.1)}:checked+.toggle::after{transform:translateX(calc(-2px + 0.5rem));background:rgb(var(--cat-primary-fill, 255, 255, 255))}.is-disabled .toggle{background-color:rgb(var(--cat-border-color-dark, 215, 219, 224))}:host(.cat-error) .toggle{background-color:rgba(var(--cat-danger-bg, 217, 52, 13), 0.2)}:host(.cat-error) :checked+.toggle{background-color:rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.toggle::after{background:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.align-center{align-items:center}.align-end{align-items:flex-end}';const dc=lc;let hc=0;const uc=class{constructor(e){t(this,e);this.catChange=r(this,"catChange",7);this.catFocus=r(this,"catFocus",7);this.catBlur=r(this,"catBlur",7);this._id=`cat-toggle-${hc++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.checked=false;this.disabled=false;this.identifier=undefined;this.label="";this.labelHidden=false;this.name=undefined;this.required=false;this.value=undefined;this.noValue=undefined;this.resolvedValue=null;this.hint=undefined;this.labelLeft=false;this.alignment="top";this.nativeAttributes=undefined;this.testId=undefined}get id(){return this.identifier||this._id}componentWillLoad(){this.updateResolved()}componentWillRender(){this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}async doFocus(t){this.input.focus(t)}async doBlur(){this.input.blur()}render(){this.hostElement.tabIndex=Number(this.hostElement.getAttribute("tabindex"))||0;return e(a,{key:"18e3e673ff5447b34457de423f601cc1af767c00"},e("label",{key:"22df334a9f372ee040c3deb3165f82f8fdcef0b0",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft,"align-center":this.alignment==="center","align-end":this.alignment==="bottom"}},e("input",{key:"4472899b180f286d43c5d34aa7821a29db3ffb18","data-test":this.testId,...this.nativeAttributes,part:"input",ref:t=>this.input=t,id:this.id,type:"checkbox",name:this.name,value:this.value,checked:this.checked,required:this.required,disabled:this.disabled,class:"form-check-input",role:"switch",onInput:this.onInput.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),"aria-describedby":this.hasHint?this.id+"-hint":undefined}),e("span",{key:"90e342a85fd5e80ccde346aa65aaccacaf2cb919",class:"toggle"}),e("span",{key:"138b08fbf20d83cd74d18b3a7c76ecb87d4b9eb2",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"6753f56609e0447ec0eb5b040c74bd511f6dd4de",name:"label"})||this.label)),this.hasHint&&e("div",{key:"4d5bda25b5e53b0ba8725b41539d08fd9c3bf5f6",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"9006cf3a82f66cf15c255bba4e2720f86b63e8c8",class:"toggle-placeholder"}),e(oe,{key:"17eebfed86f71a33629ee9ed943bcd9e0fe276c5",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"})})))}get hasHint(){return!!this.hint||!!this.hasSlottedHint}onInput(){this.checked=this.input.checked;this.updateResolved();this.catChange.emit(this.resolvedValue)}onFocus(t){this.catFocus.emit(t)}onBlur(t){this.catBlur.emit(t)}updateResolved(){this.resolvedValue=this.checked?this.value??true:this.noValue??false}static get delegatesFocus(){return true}get hostElement(){return i(this)}};uc.style=dc;const fc="ontouchstart"in window||navigator.maxTouchPoints>0;const pc=":host{display:contents}:host([hidden]){display:none}.tooltip{--cat-font-color-head:var(--cat-font-color-tooltip, 255, 255, 255);--cat-font-color-body:var(--cat-font-color-tooltip, 255, 255, 255);position:fixed;width:max-content;top:0;left:0;box-sizing:border-box;background-color:rgb(var(--cat-bg-tooltip, 0, 0, 0));border-radius:var(--cat-border-radius-m, 0.25rem);color:rgb(var(--cat-font-color-tooltip, 255, 255, 255));transition:opacity 250ms linear, visibility 250ms linear;visibility:hidden;opacity:0;box-shadow:rgba(0, 0, 0, 0.08) 0 1px 8px 0;z-index:calc(var(--cat-z-index, 1000) + 200);max-width:min(100vw - 0.5rem, 20rem)}.tooltip-hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.tooltip-show{opacity:1;visibility:visible}.tooltip p{margin:0}.tooltip-round{border-radius:10rem}.tooltip-s{padding:0.25rem 0.375rem;font-size:0.75rem;line-height:1rem;font-weight:500}.tooltip-s.tooltip-round{padding-left:0.5rem;padding-right:0.5rem}.tooltip-m{padding:0.375rem 0.5rem;font-size:0.875rem;line-height:1.125rem;font-weight:500}.tooltip-m.tooltip-round{padding-left:0.75rem;padding-right:0.75rem}.tooltip-l{padding:0.5rem 0.75rem;font-size:0.9375rem;line-height:1.25rem;font-weight:500}.tooltip-l.tooltip-round{padding-left:1rem;padding-right:1rem}";const bc=pc;let mc=0;const gc=class{constructor(e){t(this,e);this.id=`cat-tooltip-${mc++}`;this.inactive=false;this.open=false;this.content="";this.disabled=false;this.placement="top";this.round=false;this.size="m";this.showDelay=250;this.hideDelay=0;this.longTouchDuration=1e3;this.boundShowListener=this.showListener.bind(this);this.boundHideListener=this.hideListener.bind(this);this.boundWindowTouchStartListener=this.windowTouchStartListener.bind(this);this.boundTouchStartListener=this.touchStartListener.bind(this);this.boundTouchEndListener=this.touchEndListener.bind(this)}handleKeyDown({key:t}){t==="Escape"&&this.hideTooltip()}componentDidLoad(){const t=this.hostElement.shadowRoot?.querySelector("slot");this.trigger=t?.assignedElements?.()?.[0];if(this.trigger&&!this.trigger.hasAttribute("aria-describedby")){this.trigger.setAttribute("aria-describedby",this.id)}if(fc){window.addEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.addEventListener("touchstart",this.boundTouchStartListener);this.trigger?.addEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.addEventListener("focusin",this.boundShowListener);this.trigger?.addEventListener("focusout",this.boundHideListener);this.trigger?.addEventListener("mouseenter",this.boundShowListener);this.trigger?.addEventListener("mouseleave",this.boundHideListener)}}componentWillRender(){this.inactive=this.disabled||!this.content&&!this.hostElement.querySelector('[slot="content"]')}disconnectedCallback(){if(fc){window.removeEventListener("touchstart",this.boundWindowTouchStartListener);this.trigger?.removeEventListener("touchstart",this.boundTouchStartListener);this.trigger?.removeEventListener("touchend",this.boundTouchEndListener)}else{this.trigger?.removeEventListener("mouseenter",this.boundShowListener);this.trigger?.removeEventListener("mouseleave",this.boundHideListener);this.trigger?.removeEventListener("focusin",this.boundShowListener);this.trigger?.removeEventListener("focusout",this.boundHideListener)}}render(){return e(a,{key:"340e9ed5613717d88fc8dde858d16716d0d100e8"},e("slot",{key:"af044aaa5e320540463d1318ba8cf8ed1b02b7e4"}),e("div",{key:"117ed1ce275f03f879aa2f320d9c0b28bfc953bd",ref:t=>this.tooltip=t,id:this.id,role:"tooltip","aria-hidden":!this.open,"aria-live":this.open?"polite":"off",class:{tooltip:true,"tooltip-hidden":this.inactive,"tooltip-round":this.round,[`tooltip-${this.size}`]:Boolean(this.size)}},e("slot",{key:"af0986e70f3d6ba0ad2f791cfa327ae9ebf768f5",name:"content"},e("p",{key:"bfcca7d936fa6e05719a88ace8bacf806b8f423b"},this.content))))}async update(){if(this.trigger&&this.tooltip){await Hr(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Wr(gc.OFFSET),Pr({fallbackAxisSideDirection:"start"}),jr({padding:gc.SHIFT_PADDING})]}).then((({x:t,y:e})=>{if(this.tooltip){Object.assign(this.tooltip.style,{left:`${Math.max(0,t)}px`,top:`${e}px`})}}))}}showListener(){window.clearTimeout(this.hideTimeout);this.hideTimeout=undefined;if(!this.showTimeout){this.showTimeout=window.setTimeout((()=>{this.showTimeout=undefined;this.showTooltip()}),this.showDelay)}}hideListener(){window.clearTimeout(this.showTimeout);this.showTimeout=undefined;if(!this.hideTimeout){this.hideTimeout=window.setTimeout((()=>{this.hideTimeout=undefined;this.hideTooltip()}),this.hideDelay)}}touchStartListener(t){t.stopPropagation();if(!this.touchTimeout){this.touchTimeout=window.setTimeout((()=>{this.touchTimeout=undefined;this.showTooltip()}),this.longTouchDuration)}}touchEndListener(){window.clearTimeout(this.touchTimeout);this.touchTimeout=undefined;this.hideTooltip()}windowTouchStartListener(){this.hideTooltip()}showTooltip(){if(this.trigger&&this.tooltip){this.cleanupFloatingUi=Lr(this.trigger,this.tooltip,(()=>this.update()))}if(!this.inactive){this.open=true;this.tooltip?.classList.add("tooltip-show")}}hideTooltip(){this.open=false;this.tooltip?.classList.remove("tooltip-show");this.cleanupFloatingUi?.();this.cleanupFloatingUi=undefined}get hostElement(){return i(this)}};gc.OFFSET=4;gc.SHIFT_PADDING=4;gc.style=bc;export{$t as cat_alert,Nt as cat_avatar,Jt as cat_badge,Qt as cat_button,ae as cat_button_group,ne as cat_card,de as cat_checkbox,De as cat_date,la as cat_date_inline,Kr as cat_datepicker,Jr as cat_datepicker_inline,zn as cat_dropdown,Mn as cat_form_group,An as cat_icon,Qn as cat_input,ao as cat_pagination,oo as cat_radio,lo as cat_radio_group,fo as cat_scrollable,Do as cat_select,Mo as cat_select_demo,So as cat_skeleton,$o as cat_spinner,No as cat_tab,jo as cat_tabs,_o as cat_tag,Qo as cat_textarea,sc as cat_time,uc as cat_toggle,gc as cat_tooltip};
10
+ //# sourceMappingURL=p-8b1936d8.entry.js.map