diff --git a/build/catalyst.esm.js b/build/catalyst.esm.js index 3b803bec..43e5f737 100644 --- a/build/catalyst.esm.js +++ b/build/catalyst.esm.js @@ -1,2 +1,2 @@ -import{p as e,b as a}from"./p-751d92ed.js";export{s as setNonce}from"./p-751d92ed.js";import{g as t}from"./p-e1255160.js";var n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-d7169e38",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[8,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],identifier:[1],hint:[4],noToday:[4,"no-today"],weeks:[4],label:[1],labelHidden:[4,"label-hidden"],min:[1],max:[1],range:[4],required:[4],a11yLabel:[1,"a11y-label"],requiredMarker:[1,"required-marker"],value:[1025],hasSlottedLabel:[32],hasSlottedHint:[32],viewDate:[32],select:[64],clear:[64],resetView:[64],doFocus:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],noReturnFocus:[4,"no-return-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); +import{p as e,b as a}from"./p-751d92ed.js";export{s as setNonce}from"./p-751d92ed.js";import{g as t}from"./p-e1255160.js";var n=()=>{const a=import.meta.url;const t={};if(a!==""){t.resourcesUrl=new URL(".",a).href}return e(t)};n().then((async e=>{await t();return a([["p-b11c201a",[[0,"cat-select-demo"],[1,"cat-date",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],doFocus:[64],doBlur:[64],clear:[64]},null,{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-time",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],placement:[1],step:[2],hasSlottedLabel:[32],hasSlottedHint:[32],selectionTime:[32],isAm:[32],select:[64],doFocus:[64],doBlur:[64],clear:[64]},[[0,"catOpen","onOpen"]],{min:["onMinChanged"],max:["onMaxChanged"]}],[1,"cat-datepicker",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[1],min:[1],mode:[1],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],step:[2],attachToElement:[4,"attach-to-element"],position:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],nativePickerAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"],mode:["onDisabledChanged"],min:["onMinChanged"],max:["onMinChanged"]}],[1,"cat-pagination",{page:[1026],pageCount:[2,"page-count"],activePadding:[2,"active-padding"],sidePadding:[2,"side-padding"],size:[1],variant:[1],round:[4],compact:[4],iconPrev:[1,"icon-prev"],iconNext:[1,"icon-next"]}],[1,"cat-tabs",{activeTab:[1537,"active-tab"],tabsAlign:[1,"tabs-align"],tabs:[32],setActive:[64],setActiveIndex:[64]},[[0,"keydown","onKeydown"]],{activeTab:["onActiveTabChange"]}],[1,"cat-alert",{color:[513],icon:[1],noIcon:[4,"no-icon"]}],[1,"cat-textarea",{requiredMarker:[1,"required-marker"],horizontal:[4],disabled:[4],hint:[1],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],maxLength:[2,"max-length"],minLength:[2,"min-length"],name:[1],placeholder:[1],readonly:[4],required:[4],rows:[2],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-badge",{variant:[513],color:[513],size:[513],round:[516],pulse:[516]}],[1,"cat-button-group",{a11yLabel:[1,"a11y-label"]}],[1,"cat-card"],[1,"cat-datepicker-inline",{disabled:[4],max:[1],min:[1],mode:[1],readonly:[4],step:[2],value:[1025],nativePickerAttributes:[16]},null,{value:["onValueChanged"],disabled:["onDisabledChanged"],readonly:["onDisabledChanged"]}],[1,"cat-form-group",{requiredMarker:[1,"required-marker"],horizontal:[4],labelSize:[1,"label-size"]},null,{requiredMarker:["onRequiredMarkerChanged"],horizontal:["onHorizontalChanged"]}],[1,"cat-radio",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-radio-group",{name:[1],value:[1032],disabled:[4],a11yLabel:[1,"a11y-label"],labelLeft:[4,"label-left"]},[[0,"keydown","onKeydown"],[0,"input","onInput"],[2,"focus","onFocus"],[2,"blur","onBlur"]],{name:["onNameChanged"],value:["onValueChanged"],disabled:["onDisabledChanged"],labelLeft:["onLabelLeftChanged"]}],[1,"cat-tab",{label:[513],icon:[513],iconOnly:[520,"icon-only"],iconRight:[516,"icon-right"],url:[513],urlTarget:[513,"url-target"],deactivated:[516],error:[516],nativeAttributes:[16]},[[0,"click","onClick"]]],[1,"cat-toggle",{checked:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-tooltip",{content:[1],disabled:[4],placement:[1],round:[4],size:[1],showDelay:[2,"show-delay"],hideDelay:[2,"hide-delay"],longTouchDuration:[2,"long-touch-duration"],open:[32]},[[8,"keydown","handleKeyDown"]]],[1,"cat-select",{requiredMarker:[1,"required-marker"],horizontal:[4],multiple:[4],debounce:[2],placement:[1],value:[1025],disabled:[4],placeholder:[1],hint:[1],identifier:[1],label:[1],name:[1],labelHidden:[4,"label-hidden"],required:[4],clearable:[4],tags:[4],tagHint:[1,"tag-hint"],noItems:[1,"no-items"],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],connector:[32],state:[32],hasSlottedLabel:[32],hasSlottedHint:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],connect:[64]},[[0,"blur","onBlur"],[0,"keydown","onKeyDown"],[0,"keyup","onKeyUp"]],{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}],[1,"cat-date-inline",{noClear:[4,"no-clear"],identifier:[1],hint:[4],noToday:[4,"no-today"],weeks:[4],label:[1],labelHidden:[4,"label-hidden"],min:[1],max:[1],range:[4],required:[4],a11yLabel:[1,"a11y-label"],requiredMarker:[1,"required-marker"],value:[1025],hasSlottedLabel:[32],hasSlottedHint:[32],viewDate:[32],select:[64],clear:[64],resetView:[64],doFocus:[64]},[[0,"keydown","onKeyDown"]]],[1,"cat-avatar",{size:[1],round:[4],label:[1],initials:[1],src:[1],icon:[1],url:[1],urlTarget:[1,"url-target"],backgroundImage:[32]},null,{src:["onSrcChanged"]}],[1,"cat-checkbox",{checked:[1028],indeterminate:[1028],disabled:[4],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],name:[1],required:[4],value:[8],noValue:[8,"no-value"],resolvedValue:[1032,"resolved-value"],hint:[1],labelLeft:[4,"label-left"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],doFocus:[64],doBlur:[64]}],[1,"cat-scrollable",{noShadowX:[4,"no-shadow-x"],noShadowY:[4,"no-shadow-y"],noOverflowX:[4,"no-overflow-x"],noOverflowY:[4,"no-overflow-y"],noOverscroll:[4,"no-overscroll"],noScrolledInit:[4,"no-scrolled-init"],scrolledBuffer:[2,"scrolled-buffer"]}],[1,"cat-skeleton",{effect:[1],variant:[1],size:[1],lines:[2]}],[1,"cat-input",{requiredMarker:[1,"required-marker"],horizontal:[4],autoComplete:[1,"auto-complete"],clearable:[4],togglePassword:[4,"toggle-password"],disabled:[4],hint:[1],icon:[1],iconRight:[4,"icon-right"],identifier:[1],label:[1],labelHidden:[4,"label-hidden"],max:[8],maxLength:[2,"max-length"],min:[8],minLength:[2,"min-length"],name:[1],placeholder:[1],textPrefix:[1,"text-prefix"],textSuffix:[1,"text-suffix"],readonly:[4],required:[4],round:[4],type:[1],value:[1025],errors:[4],errorUpdate:[8,"error-update"],nativeAttributes:[16],hasSlottedLabel:[32],hasSlottedHint:[32],isPasswordShown:[32],errorMap:[32],doFocus:[64],doBlur:[64],clear:[64],mask:[64]},null,{errors:["onErrorsChanged"]}],[1,"cat-dropdown",{placement:[1],noAutoClose:[4,"no-auto-close"],arrowNavigation:[1,"arrow-navigation"],noResize:[4,"no-resize"],overflow:[4],noInitialFocus:[4,"no-initial-focus"],noReturnFocus:[4,"no-return-focus"],toggle:[64],open:[64],close:[64]},[[0,"catClick","clickHandler"]]],[1,"cat-button",{variant:[1],color:[1],active:[4],size:[1],name:[1],value:[1],disabled:[4],loading:[4],submit:[4],noEllipsis:[4,"no-ellipsis"],round:[4],url:[1],urlTarget:[1,"url-target"],icon:[1],iconOnly:[8,"icon-only"],iconRight:[4,"icon-right"],buttonId:[1,"button-id"],a11yLabel:[1,"a11y-label"],a11yCurrent:[1,"a11y-current"],nativeAttributes:[16],nativeContentAttributes:[16],buttonGroupPosition:[1,"button-group-position"],_iconOnly:[32],doFocus:[64],doBlur:[64],doClick:[64]},[[0,"click","haltDisabledEvents"]],{iconOnly:["onIconOnlyChanged"]}],[1,"cat-spinner",{size:[1],a11yLabel:[1,"a11y-label"]}],[1,"cat-icon",{icon:[1],iconSrc:[1,"icon-src"],size:[1],a11yLabel:[1,"a11y-label"]}]]]],e)})); //# sourceMappingURL=catalyst.esm.js.map \ No newline at end of file diff --git a/build/p-d7169e38.entry.js b/build/p-b11c201a.entry.js similarity index 58% rename from build/p-d7169e38.entry.js rename to build/p-b11c201a.entry.js index 5434a560..9d5e9775 100644 --- a/build/p-d7169e38.entry.js +++ b/build/p-b11c201a.entry.js @@ -6,5 +6,5 @@ import{r as t,h as e,H as a,g as i,c as r}from"./p-751d92ed.js";import{e as n,O /*! * focus-trap 7.5.4 * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE -*/function qr(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 Jr(t){for(var e=1;e0){var i=e[e.length-1];if(i!==a){i.pause()}}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].unpause()}}};var tn=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var en=function t(e){return(e===null||e===void 0?void 0:e.key)==="Escape"||(e===null||e===void 0?void 0:e.key)==="Esc"||(e===null||e===void 0?void 0:e.keyCode)===27};var an=function t(e){return(e===null||e===void 0?void 0:e.key)==="Tab"||(e===null||e===void 0?void 0:e.keyCode)===9};var rn=function t(e){return an(e)&&!e.shiftKey};var nn=function t(e){return an(e)&&e.shiftKey};var on=function t(e){return setTimeout(e,0)};var sn=function t(e,a){var i=-1;e.every((function(t,e){if(a(t)){i=e;return false}return true}));return i};var cn=function t(e){for(var a=arguments.length,i=new Array(a>1?a-1:0),r=1;r1?r-1:0),s=1;s=0){e=i.activeElement}else{var a=o.tabbableGroups[0];var r=a&&a.firstTabbableNode;e=r||d("fallbackFocus")}}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var f=function t(){o.containerGroups=o.containers.map((function(t){var e=Qe(t,n.tabbableOptions);var a=ta(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 ea(t)}));var s=a.slice().reverse().find((function(t){return ea(t)}));var c=!!e.find((function(t){return Ee(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:a,posTabIndexesFound:c,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:s,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 ea(t)}))}return a.slice(0,a.indexOf(i)).reverse().find((function(t){return ea(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 u=function t(e){var a=e.activeElement;if(!a){return}if(a.shadowRoot&&a.shadowRoot.activeElement!==null){return t(a.shadowRoot)}return a};var p=function t(e){if(e===false){return}if(e===u(document)){return}if(!e||!e.focus){t(h());return}e.focus({preventScroll:!!n.preventScroll});o.mostRecentlyFocusedNode=e;if(tn(e)){e.select()}};var b=function t(e){var a=d("setReturnFocus",e);return a?a:a===false?false:e};var m=function t(e){var a=e.target,i=e.event,r=e.isBackward,s=r===void 0?false:r;a=a||ln(i);f();var c=null;if(o.tabbableGroups.length>0){var h=l(a,i);var u=h>=0?o.containerGroups[h]:undefined;if(h<0){if(s){c=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode}else{c=o.tabbableGroups[0].firstTabbableNode}}else if(s){var p=sn(o.tabbableGroups,(function(t){var e=t.firstTabbableNode;return a===e}));if(p<0&&(u.container===a||ia(a,n.tabbableOptions)&&!ea(a,n.tabbableOptions)&&!u.nextTabbableNode(a,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];c=Ee(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!an(i)){c=u.nextTabbableNode(a,false)}}else{var g=sn(o.tabbableGroups,(function(t){var e=t.lastTabbableNode;return a===e}));if(g<0&&(u.container===a||ia(a,n.tabbableOptions)&&!ea(a,n.tabbableOptions)&&!u.nextTabbableNode(a))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];c=Ee(a)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!an(i)){c=u.nextTabbableNode(a)}}}else{c=d("fallbackFocus")}return c};var g=function t(e){var a=ln(e);if(l(a,e)>=0){return}if(cn(n.clickOutsideDeactivates,e)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(cn(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var a=ln(e);var i=l(a,e)>=0;if(i||a instanceof Document){if(i){o.mostRecentlyFocusedNode=a}}else{e.stopImmediatePropagation();var r;var s=true;if(o.mostRecentlyFocusedNode){if(Ee(o.mostRecentlyFocusedNode)>0){var c=l(o.mostRecentlyFocusedNode);var d=o.containerGroups[c].tabbableNodes;if(d.length>0){var f=d.findIndex((function(t){return t===o.mostRecentlyFocusedNode}));if(f>=0){if(n.isKeyForward(o.recentNavEvent)){if(f+1=0){r=d[f-1];s=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return Ee(t)>0}))}))){s=false}}}else{s=false}if(s){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(an(e)){e.preventDefault()}p(i)}};var k=function t(e){if(en(e)&&cn(n.escapeDeactivates,e)!==false){e.preventDefault();s.deactivate();return}if(n.isKeyForward(e)||n.isKeyBackward(e)){y(e,n.isKeyBackward(e))}};var x=function t(e){var a=ln(e);if(l(a,e)>=0){return}if(cn(n.clickOutsideDeactivates,e)){return}if(cn(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var w=function t(){if(!o.active){return}Qr.activateTrap(r,s);o.delayInitialFocusTimer=n.delayInitialFocus?on((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",x,{capture:true,passive:false});i.addEventListener("keydown",k,{capture:true,passive:false});return s};var z=function t(){if(!o.active){return}i.removeEventListener("focusin",v,true);i.removeEventListener("mousedown",g,true);i.removeEventListener("touchstart",g,true);i.removeEventListener("click",x,true);i.removeEventListener("keydown",k,true);return s};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 I=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(D):undefined;var M=function t(){if(!I){return}I.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){I.observe(t,{subtree:true,childList:true})}))}};s={get active(){return o.active},get paused(){return o.paused},activate:function t(e){if(o.active){return this}var a=c(e,"onActivate");var r=c(e,"onPostActivate");var n=c(e,"checkCanFocusTrap");if(!n){f()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=i.activeElement;a===null||a===void 0||a();var s=function t(){if(n){f()}w();M();r===null||r===void 0||r()};if(n){n(o.containers.concat()).then(s,s);return this}s();return this},deactivate:function t(e){if(!o.active){return this}var a=Jr({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;z();o.active=false;o.paused=false;M();Qr.deactivateTrap(r,s);var i=c(a,"onDeactivate");var l=c(a,"onPostDeactivate");var d=c(a,"checkCanReturnFocus");var h=c(a,"returnFocus","returnFocusOnDeactivate");i===null||i===void 0||i();var f=function t(){on((function(){if(h){p(b(o.nodeFocusedBeforeActivation))}l===null||l===void 0||l()}))};if(h&&d){d(b(o.nodeFocusedBeforeActivation)).then(f,f);return this}f();return this},pause:function t(e){if(o.paused||!o.active){return this}var a=c(e,"onPause");var i=c(e,"onPostPause");o.paused=true;a===null||a===void 0||a();z();M();i===null||i===void 0||i();return this},unpause:function t(e){if(!o.paused||!o.active){return this}var a=c(e,"onUnpause");var i=c(e,"onPostUnpause");o.paused=false;a===null||a===void 0||a();f();w();M();i===null||i===void 0||i();return this},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){f()}M();return this}};s.updateContainerElements(e);return s};const fn=":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 un=fn;let pn=0;const bn=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=pn++;this.isOpen=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.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(){if(!this.trigger){this.initTrigger()}if(this.isOpen===null||this.isOpen){return}this.isOpen=null;this.content.style.display="block";setTimeout((()=>{this.isOpen=true;this.content.classList.add("show");this.trigger?.setAttribute("aria-expanded","true");this.trap=this.trap?this.trap.updateContainerElements(this.content):hn(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.noInitialFocus?false:undefined});this.trap.activate()}))}async close(){if(!this.isOpen){return}this.isOpen=null;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.trap?.deactivate();this.catClose.emit()}),Vr)}render(){return e(a,{key:"ecbe6c25380b7e553dd81932af3faf7871e60650"},e("slot",{key:"2c067a4bcbcb5491b1eb9c939b9f4ca1e13f4bf9",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"74c96accb106aba04746eb200ca2a57642828b2b",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"064f79e0d0c636f087b0185f0813cfb263fc7832",name:"content"})))}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();this.trigger.setAttribute("aria-haspopup","true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(()=>this.toggle()));Er(this.trigger,this.content,(()=>this.update()))}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=ra(this.triggerSlot)}if(!t){throw new Error("Cannot find tabbable element. Use [data-trigger] to set the trigger.")}return t}update(){if(this.trigger){const t=this.noResize?[]:[Lr({padding:bn.OFFSET,apply({availableWidth:t,availableHeight:e,elements:a}){Object.assign(a.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];jr(this.trigger,this.content,{strategy:"fixed",placement:this.placement,middleware:[Or(bn.OFFSET),Wr(),...t]}).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)}};bn.OFFSET=4;bn.style=un;const mn=":host{display:block}";const gn=mn;const vn=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:"89edc92669abb1c9a1f4c5ed47830371a5f315bd",style:{"--label-size":this.labelSize}},e("slot",{key:"451878b08d2ca7cfece502b00b14f2da3c274d88",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"]}}};vn.style=gn;const yn=":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 kn=yn;const xn=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"03076f9f5e7335d8c42b1802e78ad24afa459c2e",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"}})}};xn.style=kn;var wn=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var zn=function(t,e,a,i,r,n,o,s,c,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=a>=0?a:2;d.numeralThousandsGroupStyle=i||zn.groupStyle.thousand;d.numeralPositiveOnly=!!r;d.stripLeadingZeroes=n!==false;d.prefix=o||o===""?o:"";d.signBeforePrefix=!!s;d.tailPrefix=!!c;d.delimiter=l||l===""?l:",";d.delimiterRE=l?new RegExp("\\"+l,"g"):""};zn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};zn.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 zn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case zn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case zn.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 Dn=zn;var In=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()};In.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),s=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=s}}));return this.getFixedDateString(a)},getFixedDateString:function(t){var e=this,a=e.datePattern,i=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f,u=false;if(t.length===4&&a[0].toLowerCase()!=="y"&&a[1].toLowerCase()!=="y"){s=a[0]==="d"?0:2;c=2-s;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+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;s=r<=o?r*2:r*2+2;c=n<=o?n*2:n*2+2;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;i=this.getFixedDate(d,h,f)}if(t.length===4&&(a[0]==="y"||a[1]==="y")){c=a[0]==="m"?0:2;l=2-c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);u=t.slice(l,l+2).length===2;i=[0,h,f]}if(t.length===6&&(a[0]==="Y"||a[1]==="Y")){c=a[0]==="m"?0:4;l=2-.5*c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;i=[0,h,f]}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+(u?e.addLeadingZeroForYear(i[2],false):"");case"Y":return t+(u?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]||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 Mn=In;var Rn=function(t,e){var a=this;a.time=[];a.blocks=[];a.timePattern=t;a.timeFormat=e;a.initBlocks()};Rn.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),s=o.slice(0,1),c=t.slice(r);switch(e.timePattern[n]){case"h":if(parseInt(s,10)>i.maxHourFirstDigit){o="0"+s}else if(parseInt(o,10)>i.maxHours){o=i.maxHours+""}break;case"m":case"s":if(parseInt(s,10)>i.maxMinutesFirstDigit){o="0"+s}else if(parseInt(o,10)>i.maxMinutes){o=i.maxMinutes+""}break}a+=o;t=c}}));return this.getFixedTimeString(a)},getFixedTimeString:function(t){var e=this,a=e.timePattern,i=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f;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;c=n;s=r;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);i=this.getFixedTime(f,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;c=n;d=0;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);i=this.getFixedTime(f,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 Cn=Rn;var An=function(t,e){var a=this;a.delimiter=e||e===""?e:" ";a.delimiterRE=e?new RegExp("\\"+e,"g"):"";a.formatter=t};An.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;n0,c="";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(s){c=r[n?l-1:l]||c}else{c=i}if(n){if(l>0){o+=c}o+=d}else{o+=d;if(d.length===e&&l0?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 wn==="object"&&wn?wn:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var On=En;var Nn=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=Nn.DefaultProperties.assign({},e);a.init()};Nn.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=Nn.Util.getMaxLength(e.blocks);t.isAndroid=Nn.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 Nn.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 Nn.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=Nn.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new Nn.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=Nn.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new Nn.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=Nn.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)}Nn.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!Nn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!Nn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,a=e.properties,i=Nn.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=Nn.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=Nn.Util,r;if(i.headStr(a.result,4)===i.headStr(t,4)){return}r=Nn.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=Nn.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=Nn.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]"}};Nn.NumeralFormatter=Dn;Nn.DateFormatter=Mn;Nn.TimeFormatter=Cn;Nn.PhoneFormatter=Sn;Nn.CreditCardDetector=Tn;Nn.Util=$n;Nn.DefaultProperties=On;(typeof wn==="object"&&wn?wn:window)["Cleave"]=Nn;var Wn=Nn;function Ln(t){return t!=null&&`${t}`!=="false"}function jn(t,e=0){return Pn(t)?Number(t):e}function Pn(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const Yn=".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}.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}.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}.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}.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}.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}.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}.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}.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-container .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-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 Hn=Yn;let Un=0;const _n=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-${Un++}`;this.hasSlottedLabel=false;this.hasSlottedHint=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.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}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}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 Wn(this.input,t)}onErrorsChanged(t){if(!Ln(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e("div",{key:"710fc250d8f11176a961b5206bc1f9232aa84be4",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"d57a83ea90d24a5afaed81088b708567daa0b4bf",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"61b641051a272bc80177d228e4d56df470fdcd40",htmlFor:this.id,part:"label"},e("span",{key:"a522fa48dfadd05cc2ec3175cab8ca3f2d23e73d",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"d6d746332b369ef0c4b3f73ef15b020411e50d73",name:"label"})||this.label,e("div",{key:"ecf148a66a061e6e6dcf1b064b81d9f0f17efbfb",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"e0caa04516b0185d3f5916ef3f72742979d3e8f2",class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"392aa2bb291df5b0c34a7f38deb0a2ee2e24a0bd",class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{key:"17926bcd4830cffd1373c4ffd7cd5e3af13aa9bd",class:"label-character-count","aria-hidden":"true"},this.value?.toString().length??0,"/",this.maxLength))))),e("div",{key:"54b16ece948552768266937a22cf01005e1173c3",class:"input-container"},e("div",{key:"c1f5879a29b9178a72587daa852fbbdb26faddf0",class:"input-outer-wrapper"},e("div",{key:"f69ecc01540efc059696a5e25b180355433820bf",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:"2e3d91279deb4179162d975335ebfa9f0e9d2b2e",class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{key:"80b26a819294fb17b37bf773f9cd083a45dbe483",icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"43efb99f56314c8bd5cfce38753244f108a5a610",class:"input-inner-wrapper"},e("input",{key:"2be965730ab7d0492e0b0d91d0a90d8d288e0203",...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:"2368492bdefb956c46767bdc5d27bee18b0723dc",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":D.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:"c6cd66169ea99ee2975aa96dfcd3761186d9a574",class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":D.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{key:"6262a983d66c3355a131a7a37bdb7dab8a169f41",icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{key:"c50c15e17b515bff2933e36e40ea12d62f719b95",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{key:"937984d04d867aff813f8bf204904d8277521a41",class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"a5d6ea59f76885ca72c66371771452544692be22",name:"addon"})),this.hasHint&&e(ne,{key:"15ace5d211cf0abce63bd7fc277b913914ca415a",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!!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(Ln(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=jn(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}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};_n.style=Hn;const Kn=":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 Vn=Kn;const qn=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(){return e("nav",{key:"1929458d04848122f7b5b5fa806b347c32d562a5",role:"navigation"},e("ol",{key:"e93478ef96a8a8ca0b11f238c168194934848f1b",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"116feebfe0d10971ffce4a8ff7f9ecd1d293c3cc"},e("cat-button",{key:"22b12534bac787dc91ac969e30e4dce6ce3c8b87",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:D.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"1b17792a3ce126cedbfc832ee98c203bdc479057"},e("cat-button",{key:"b697f56af43022877c3822a0b584a7c0b433fb0d",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:D.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:D.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}};qn.style=Vn;const Jn=".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))}";const Gn=Jn;let Zn=0;const Xn=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-${++Zn}`;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.nativeAttributes=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(){return e(a,{key:"4a49b7834c01dc4327944c53f3b822d8775eee01"},e("label",{key:"81dbf8a09db266eaba01a2f3a374b73254795a86",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"87b922e8bc26e68835fcd4ea6ed126012d11e50a",class:"radio"},e("input",{key:"61d1cd9e9081ee11d3b712517a181ab6102496bb",...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:"bbe1950285fc2a9e9723bcb8cd92d28cdda29e65",class:"circle"})),e("span",{key:"1d88e32b17d00de877ee850d7d454c42f1dbe297",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"4075a46bee01b98327e8a0989114a35102283486",name:"label"})||this.label)),this.hasHint&&e("div",{key:"8e16fc09d52dd0635fb1025a28b248617cc90dfb",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"88f943828f89127bc64b740dfe05ad9385c95312",class:"circle-placeholder"}),e(ne,{key:"f20f806b22a50ccdccee130da835f4702d28f719",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)}get hostElement(){return i(this)}};Xn.style=Gn;const Qn=":host{display:block}:host([hidden]){display:none}";const to=Qn;const eo=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:"700491e3e68675725272b877296df47e8d538af3",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"3a03df80cac82f5530f5e1317b226d6d120b52ba"}))}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"]}}};eo.style=to;const ao=":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 io=ao;const ro=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(Rt(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(ro.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),yt(),Rt(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:"b9e809dfdeafaba07bf5e6b6fee92b256c5dc7ec",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{key:"2a1fd0f1de1abbbba912e571197cb3bec51d458f",class:"shadow-top"}),!this.noShadowX&&e("div",{key:"7d45944d3e77653c57bac6f40a2903a00bbe07d3",class:"shadow-left"}),!this.noShadowX&&e("div",{key:"4b556dbb3cec3f34fce448721a8b0f1a8fa2e2c3",class:"shadow-right"}),!this.noShadowY&&e("div",{key:"dcbcf18521b4cbfd0f9b50e2a0090fff1e230571",class:"shadow-bottom"})),e("div",{key:"0847d6934ff533528636f27b6e2ca41af71f6538",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"f1e5dd010c1e4fe9f875046096d313b76a55b062"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(ro.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),yt(),st((t=>t)),Rt(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)}}};ro.THROTTLE=50;ro.style=io;var no="__autosizeInputGhost";var oo={" ":"nbsp","<":"lt",">":"gt"};function so(t){return"&"+oo[t]+";"}function co(t){return t.replace(/\s|<|>/g,so)}function lo(){var t=document.createElement("div");t.id=no;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 ho=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(no)||lo();a.style.cssText+=i;a.innerHTML=co(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(no);if(e){e.parentNode.removeChild(e)}}};const fo=".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}.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}.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}.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}.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}.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}.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}.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}.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-container .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 uo=fo;const po={term:"",isOpen:false,isLoading:false,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let bo=0;let mo=0;const go=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-${bo++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=po;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}get id(){return this.identifier||this._id}onConnectorChanged(t){this.reset(t);this.resolve()}onValueChanged(){!this.valueChangedBySelection?this.resolve():this.valueChangedBySelection=false}onErrorsChanged(t){if(!Ln(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;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){ho(this.input)}if(this.trigger&&this.dropdown){Er(this.trigger,this.dropdown,(()=>this.update()))}}componentWillRender(){this.onErrorsChanged(this.errors);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(Ln(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(ft((t=>t?nt(this.debounce):R(0))),yt(),At((()=>e=this.more$.pipe(st((()=>!this.state.isLoading)),Dt((t=>t+1),0),It(0)))),At((()=>this.patchState({options:[]}))),Mt((a=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(a,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements}))),Ct((t=>!t.last),true),Dt(((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(){return e(a,{key:"46b0ce9bf810c41ce4befa63b1bc6389097e65d4"},e("div",{key:"d2ff2fa34304b01f5658b3e36802d936ca4ffb57",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"57a789f4461cba4c8fa1fbff15f4343d1c180b3c",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"a0df13d7734260281fbceeb3a14e53b7403861bd",htmlFor:`select-${this.id}-input`,part:"label"},e("span",{key:"64b7fe2a210dcc04436ce40f3ba7fe8ec877d098",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"4bb2124527e2082d9ca34b7a20ae8f4e156bb488",name:"label"})||this.label,e("div",{key:"28b9dbac0ec470274dbc7d7d45efe4c40ead1a54",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"2b380f134bfc8f6b8a5b9e62e9ffce7a8091a779",class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"017dd74b59b061a54f819eaffb9a52345d2fea6f",class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"))))),e("div",{key:"e41ff696c0cd324f929f42f796b8cd8311f063b7",class:"select-container"},e("div",{key:"9f7ee2820973a7ee409f7215cdafe1656148a38c",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:"59da473837f08e21f4ef2de243eb5f65b211bf82",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:D.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:"6760c556500cea4ef8ff9ed16d66ee8be4ae2e65",...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:"0cb649c51da135ba58acc2945a776801e4831d94"}),this.invalid&&e("cat-icon",{key:"13cce56c5e320cfddbe5071fd6364730b118da48",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:D.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{key:"90242787bd0709a3c00391254947cb64a9ad7881",iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?D.t("select.close"):D.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(ne,{key:"1be050a399eb4f27daa841526d849786db13f4cf",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"60c2fff689652e63214ed1fe2bf10d71d48dc7a0",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{key:"97228db7a5a0f7f40b220ce909742c38f9e744ac",class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{key:"6c79ab6c89dcd198dad55cae3a4445b26c2d7f8f",class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isLoading?Array.from(Array(go.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:D.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!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()):R([]);i.pipe(dt((()=>R([])))).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}})}))}this.patchState({isResolving:false,selection:i,term:!this.multiple&&i.length?i[0].render.label:""})}))}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});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.search(t.render.label)}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=po}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){jr(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Or(go.DROPDOWN_OFFSET),Wr()]}).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.activeSelectionIndexe.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+mo++: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=jn(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()}}get hostElement(){return i(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};go.SKELETON_COUNT=4;go.DROPDOWN_OFFSET=4;go.style=uo;const vo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({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=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({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=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({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=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({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:"6dee38053268c2d945c195cfd4dd39109ed22021",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"fa571970ee14e63d95567ed847af36d2da7e96ae",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:"a222dd43988c0e088903c8f260a7bcb2a074c73e",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"34314fa05e1dc159594d12a242b720276449e35d",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"ac72d824efb07f6012fee35725c9e5fd6e16b9f8",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"e4965ee7c2c0d2452bf907fcc51809b45f590219",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:"62b13c5e38165dbcf6c4b98376d65183e45b6b02",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:"6417bfc737cb4fab8fbbcd777c9f522f084f375f",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:"9e530aad5e9cd9add1fcfaf8fc00651091c267c4",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"5cc4e92952af134af6fabc5fe6555ba7e8f5d3f2",overflow:true},e("cat-button",{key:"5916378b87e75d58bdc3b253e7731f9a0a7a5350",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"9efbc90e07ffba870869de8682f4e57a7611550c",slot:"content",style:{width:"400px"}},e("cat-select",{key:"d45765d2243918ef11b8ec63438347dd8421fe6d",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=>R(t.map((t=>yo.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const a=yo.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 R({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 yo=[{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 ko=':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 xo=ko;const wo=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(a,{key:"9039e34e1c03c573e07e1fc9f0041bbb5bc9369e"},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)}};wo.style=xo;const zo=":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 Do=zo;const Io=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"5dc8097429f1b606c187ae3e5adc2871680f05f4","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"2daf677665ac8f5089d33414acde28e1d7bf630d",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"7c38b0547d2aaa78921072917306765d866d4d97",cx:"24",cy:"24",r:"21.5"})))}};Io.style=Do;const Mo=":host{display:block}:host([hidden]){display:none}";const Ro=Mo;let Co=0;const Ao=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.error=false;this.nativeAttributes=undefined}connectedCallback(){if(!this.hostElement.id){this.hostElement.id=`cat-tab-${Co++}`}}onClick(t){this.catClick.emit(t)}render(){return e(a,{key:"454f82a9ffacf27abd207c7e06af0c2a888cc201"})}get hostElement(){return i(this)}};Ao.style=Ro;const So=':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 Fo=So;const To=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(){return e(a,{key:"19c67fc838c4dd854168d398b3dd6c9e0e522ff0"},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)))[0]?.id}canActivate(t){return!!t&&!t.deactivated&&!t.url&&t.id!==this.activeTab}click(t){if(this.canActivate(t)){t.click();this.activate(t)}}activate(t){if(this.canActivate(t)){this.activeTab=t.id}}get hostElement(){return i(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};To.style=Fo;var Bo=new Map;function $o(t){var e=Bo.get(t);e&&e.destroy()}function Eo(t){var e=Bo.get(t);e&&e.update()}var Oo=null;"undefined"==typeof window?((Oo=function(t){return t}).destroy=function(t){return t},Oo.update=function(t){return t}):((Oo=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&&!Bo.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",s),t.removeEventListener("input",r),window.removeEventListener("resize",s),Object.keys(e).forEach((function(a){return t.style[a]=e[a]})),Bo.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",s),t.addEventListener("input",r),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",Bo.set(t,{destroy:n,update:s}),s()}function o(e){var r,n,s=e.restoreTextAlign,c=void 0===s?null:s,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",c&&(t.style.textAlign=c),r&&r(),a!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),a=n),h!==i.overflow&&!c)){var f=i.textAlign;"hidden"===i.overflow&&(t.style.textAlign="start"===f?"end":"start"),o({restoreTextAlign:f,testForHeightReduction:!0})}}function s(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],$o),t},Oo.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Eo),t});var No=Oo;const Wo=".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}.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}.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}.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}.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}.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}.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}.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}.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-container .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 Lo=Wo;let jo=0;const Po=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-${jo++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;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}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){No(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){if(!Ln(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e(a,{key:"070f00143aba6158c8722cf6d56d5da6e74a1355"},e("div",{key:"f72ab3bece3d9b260e0d9619ed86d94be3fcfcc1",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"fc861702a03fd6104ce7e09eecc666b043323e05",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"2406d6aaad8d1b468ec1b3c3256e0b9c816eb813",htmlFor:this.id,part:"label"},e("span",{key:"48596c3e9fae64c6ed94e3cf9d7faf82a4f8c5ce",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"413d2987f8211e9ee6c4a64c1364665dc8d16301",name:"label"})||this.label,e("div",{key:"161a8717ff84623558e9a911a9fd5df2692f66ff",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"b7023d75088999709ba43fefe3e96d1f155f9d60",class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"4f0e5c76b51eeb5313da62aecd0058a2511116ca",class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{key:"65a934a9c376e38ba4f152499141bb43e0b1471a",class:"label-character-count","aria-hidden":"true"},this.value?.length??0,"/",this.maxLength))))),e("div",{key:"d8fe7aaa5410b3f84d0813a338e3dce6ea94d102",class:"textarea-container"},e("div",{key:"60c23259f0fb3e225215351e04bc07702ecd2a23",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"c12a26593be4eb72081163cf0d341dda47293b20",...this.nativeAttributes,part:"textarea",ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,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:"5f865aa68764fd24b0101158237fa3645e4e2579",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(ne,{key:"7cb20d364b1c19d074175380c358f26bdaaf0293",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!!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(Ln(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=jn(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()}}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Po.style=Lo;function Yo(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 Ho(t){return{change:D.t("timepicker.change"),choose:D.t("timepicker.choose"),timeFormat:Yo(t)?"12":"24"}}function Uo(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function _o(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 s=-Infinity;let c=Infinity;if(i!==undefined&&r!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),i,r).getTime()}if(n!==undefined&&o!==undefined){c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),n,o).getTime()}return new Date(Math.min(Math.max(e.getTime(),s),c))}function Ko(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 qo=":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}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const Jo=qo;const Go=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=D.getLocale();this.locale=Ho(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;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)}}componentWillLoad(){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=_o(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const a=t(`[data-time="${Uo(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const i=t(`[data-time="${Uo(e)}"]`);setTimeout((()=>{(i??a)?.doFocus();(i??a)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;if(!t){this.selectionTime=null;this.value=undefined}else{const e=_o(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;this.value=Uo(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==this.value){this.catChange.emit(this.value)}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(a,{key:"f27248f07e9dee2b129f3ffd651f3fbc40ec9c60"},e("cat-input",{key:"8031cdca279be78f7af36e62c961aeb74641ad6e",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:"658e7782b963294d9c48443b98e47841e96276ca",slot:"label"},this.hasSlottedLabel&&e("slot",{key:"a773fa33d7dcc51cbdad72ae4bbfff3158e0b1e8",name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"e6b75349897b779521da75541dcd6467bd57af62",class:"label-aria"}," (HH:mm)")),e("div",{key:"e6ca724256eacbaa48d0aa4a4dfcd3eeba8adfec",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{key:"c60bd2a02b5f7a0e12fb397e7d4230e648b815e9",class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"80fcef2872af257486240ea8c3447b38d55f13a5",slot:"addon",placement:this.placement},e("cat-button",{key:"8ff466440e2a2631770509500a40c9cae5d7d549",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:"8ba70ebb9ab84e28712df787b7402a7e2fbd7b59",slot:"content",class:"cat-nav"},e("ul",{key:"50c2e92dc053177bc0b5a99bb77468e906f58f9e"},this.timeArray().map((t=>{const a=Uo(t);const i=Ko(t,this.min??null)||Vo(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:"5d9cb046f0aa9e692578353ac6e07533670c9429",slot:"hint"},e("slot",{key:"109e5477d55a9a90701a9d83aa2d79cf434ebbc0",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))}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 s=r?Uo(_o(a,new Date(2e3,5,1,Number(n),Number(o)),i)):undefined;if(this.value!==s){this.syncValue(s??"");this.catChange.emit(s)}}get hostElement(){return i(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};Go.style=Jo;const Zo='.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))}';const Xo=Zo;let Qo=0;const ts=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-${Qo++}`;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.nativeAttributes=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(){return e(a,{key:"082c75c6860aac2fea848a631486c7db7d9f7cda"},e("label",{key:"4526f5ce9dc8c03b8756ac5b8fae64cd2a261dc7",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"ada0e0e3532a4e15b75e5a5cfd29e41967636c64",...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:"5c798c5d9fb4a527e6b4f27175492597398565eb",class:"toggle"}),e("span",{key:"5c69e3ab3d372807b61ec3eb6eb7b71dd7c48430",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"0774821337d69d482e2086febe75d15d9fc3bbea",name:"label"})||this.label)),this.hasHint&&e("div",{key:"eac22e3e1874765b300df6b1e304b1eb37844335",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"c1c2954851706feded0c17c7b261ec144927aafb",class:"toggle-placeholder"}),e(ne,{key:"d5308787a63d44e3f3a54bfeeff6d50cdd95670f",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}get hostElement(){return i(this)}};ts.style=Xo;const es="ontouchstart"in window||navigator.maxTouchPoints>0;const as=":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;font-size:0.875rem;line-height:1.125rem;font-weight:500;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.375rem 0.5rem}.tooltip-s.tooltip-round{padding:0.375rem 0.75rem}.tooltip-m{padding:0.75rem}.tooltip-m.tooltip-round{padding:0.75rem 1rem}.tooltip-l{padding:1rem}.tooltip-l.tooltip-round{padding:1rem 1.5rem}";const is=as;let rs=0;const ns=class{constructor(e){t(this,e);this.id=`cat-tooltip-${rs++}`;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(es){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(es){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:"38a9782f607e32cd7c6af0603a32f0880691cd64"},e("slot",{key:"960baa37b44020a8032b5f90d2eaa8d90ee212ff"}),e("div",{key:"f5a14f7a0e887c0e0b7879e44cee099b090cf913",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:"205c5d7b2f65120aa3d0f46a4539c1c5c6d888c8",name:"content"},e("p",{key:"e88757f1e19d4de60e1b1ca295d9e7fc74e88fee"},this.content))))}async update(){if(this.trigger&&this.tooltip){await jr(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Or(ns.OFFSET),Wr({fallbackAxisSideDirection:"start"}),Nr({padding:ns.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=Er(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)}};ns.OFFSET=4;ns.SHIFT_PADDING=4;ns.style=is;export{Bt as cat_alert,Nt as cat_avatar,jt as cat_badge,Xt as cat_button,ee as cat_button_group,re as cat_card,le as cat_checkbox,De as cat_date,ca as cat_date_inline,Hr as cat_datepicker,Kr as cat_datepicker_inline,bn as cat_dropdown,vn as cat_form_group,xn as cat_icon,_n as cat_input,qn as cat_pagination,Xn as cat_radio,eo as cat_radio_group,ro as cat_scrollable,go as cat_select,vo as cat_select_demo,wo as cat_skeleton,Io as cat_spinner,Ao as cat_tab,To as cat_tabs,Po as cat_textarea,Go as cat_time,ts as cat_toggle,ns as cat_tooltip}; -//# sourceMappingURL=p-d7169e38.entry.js.map \ No newline at end of file +*/function qr(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 Jr(t){for(var e=1;e0){var i=e[e.length-1];if(i!==a){i.pause()}}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].unpause()}}};var tn=function t(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select==="function"};var en=function t(e){return(e===null||e===void 0?void 0:e.key)==="Escape"||(e===null||e===void 0?void 0:e.key)==="Esc"||(e===null||e===void 0?void 0:e.keyCode)===27};var an=function t(e){return(e===null||e===void 0?void 0:e.key)==="Tab"||(e===null||e===void 0?void 0:e.keyCode)===9};var rn=function t(e){return an(e)&&!e.shiftKey};var nn=function t(e){return an(e)&&e.shiftKey};var on=function t(e){return setTimeout(e,0)};var sn=function t(e,a){var i=-1;e.every((function(t,e){if(a(t)){i=e;return false}return true}));return i};var cn=function t(e){for(var a=arguments.length,i=new Array(a>1?a-1:0),r=1;r1?r-1:0),s=1;s=0){e=i.activeElement}else{var a=o.tabbableGroups[0];var r=a&&a.firstTabbableNode;e=r||d("fallbackFocus")}}if(!e){throw new Error("Your focus-trap needs to have at least one focusable element")}return e};var f=function t(){o.containerGroups=o.containers.map((function(t){var e=Qe(t,n.tabbableOptions);var a=ta(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 ea(t)}));var s=a.slice().reverse().find((function(t){return ea(t)}));var c=!!e.find((function(t){return Ee(t)>0}));return{container:t,tabbableNodes:e,focusableNodes:a,posTabIndexesFound:c,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:o,lastDomTabbableNode:s,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 ea(t)}))}return a.slice(0,a.indexOf(i)).reverse().find((function(t){return ea(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 u=function t(e){var a=e.activeElement;if(!a){return}if(a.shadowRoot&&a.shadowRoot.activeElement!==null){return t(a.shadowRoot)}return a};var p=function t(e){if(e===false){return}if(e===u(document)){return}if(!e||!e.focus){t(h());return}e.focus({preventScroll:!!n.preventScroll});o.mostRecentlyFocusedNode=e;if(tn(e)){e.select()}};var b=function t(e){var a=d("setReturnFocus",e);return a?a:a===false?false:e};var m=function t(e){var a=e.target,i=e.event,r=e.isBackward,s=r===void 0?false:r;a=a||ln(i);f();var c=null;if(o.tabbableGroups.length>0){var h=l(a,i);var u=h>=0?o.containerGroups[h]:undefined;if(h<0){if(s){c=o.tabbableGroups[o.tabbableGroups.length-1].lastTabbableNode}else{c=o.tabbableGroups[0].firstTabbableNode}}else if(s){var p=sn(o.tabbableGroups,(function(t){var e=t.firstTabbableNode;return a===e}));if(p<0&&(u.container===a||ia(a,n.tabbableOptions)&&!ea(a,n.tabbableOptions)&&!u.nextTabbableNode(a,false))){p=h}if(p>=0){var b=p===0?o.tabbableGroups.length-1:p-1;var m=o.tabbableGroups[b];c=Ee(a)>=0?m.lastTabbableNode:m.lastDomTabbableNode}else if(!an(i)){c=u.nextTabbableNode(a,false)}}else{var g=sn(o.tabbableGroups,(function(t){var e=t.lastTabbableNode;return a===e}));if(g<0&&(u.container===a||ia(a,n.tabbableOptions)&&!ea(a,n.tabbableOptions)&&!u.nextTabbableNode(a))){g=h}if(g>=0){var v=g===o.tabbableGroups.length-1?0:g+1;var y=o.tabbableGroups[v];c=Ee(a)>=0?y.firstTabbableNode:y.firstDomTabbableNode}else if(!an(i)){c=u.nextTabbableNode(a)}}}else{c=d("fallbackFocus")}return c};var g=function t(e){var a=ln(e);if(l(a,e)>=0){return}if(cn(n.clickOutsideDeactivates,e)){s.deactivate({returnFocus:n.returnFocusOnDeactivate});return}if(cn(n.allowOutsideClick,e)){return}e.preventDefault()};var v=function t(e){var a=ln(e);var i=l(a,e)>=0;if(i||a instanceof Document){if(i){o.mostRecentlyFocusedNode=a}}else{e.stopImmediatePropagation();var r;var s=true;if(o.mostRecentlyFocusedNode){if(Ee(o.mostRecentlyFocusedNode)>0){var c=l(o.mostRecentlyFocusedNode);var d=o.containerGroups[c].tabbableNodes;if(d.length>0){var f=d.findIndex((function(t){return t===o.mostRecentlyFocusedNode}));if(f>=0){if(n.isKeyForward(o.recentNavEvent)){if(f+1=0){r=d[f-1];s=false}}}}}else{if(!o.containerGroups.some((function(t){return t.tabbableNodes.some((function(t){return Ee(t)>0}))}))){s=false}}}else{s=false}if(s){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(an(e)){e.preventDefault()}p(i)}};var k=function t(e){if(en(e)&&cn(n.escapeDeactivates,e)!==false){e.preventDefault();s.deactivate();return}if(n.isKeyForward(e)||n.isKeyBackward(e)){y(e,n.isKeyBackward(e))}};var x=function t(e){var a=ln(e);if(l(a,e)>=0){return}if(cn(n.clickOutsideDeactivates,e)){return}if(cn(n.allowOutsideClick,e)){return}e.preventDefault();e.stopImmediatePropagation()};var w=function t(){if(!o.active){return}Qr.activateTrap(r,s);o.delayInitialFocusTimer=n.delayInitialFocus?on((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",x,{capture:true,passive:false});i.addEventListener("keydown",k,{capture:true,passive:false});return s};var z=function t(){if(!o.active){return}i.removeEventListener("focusin",v,true);i.removeEventListener("mousedown",g,true);i.removeEventListener("touchstart",g,true);i.removeEventListener("click",x,true);i.removeEventListener("keydown",k,true);return s};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 I=typeof window!=="undefined"&&"MutationObserver"in window?new MutationObserver(D):undefined;var M=function t(){if(!I){return}I.disconnect();if(o.active&&!o.paused){o.containers.map((function(t){I.observe(t,{subtree:true,childList:true})}))}};s={get active(){return o.active},get paused(){return o.paused},activate:function t(e){if(o.active){return this}var a=c(e,"onActivate");var r=c(e,"onPostActivate");var n=c(e,"checkCanFocusTrap");if(!n){f()}o.active=true;o.paused=false;o.nodeFocusedBeforeActivation=i.activeElement;a===null||a===void 0||a();var s=function t(){if(n){f()}w();M();r===null||r===void 0||r()};if(n){n(o.containers.concat()).then(s,s);return this}s();return this},deactivate:function t(e){if(!o.active){return this}var a=Jr({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},e);clearTimeout(o.delayInitialFocusTimer);o.delayInitialFocusTimer=undefined;z();o.active=false;o.paused=false;M();Qr.deactivateTrap(r,s);var i=c(a,"onDeactivate");var l=c(a,"onPostDeactivate");var d=c(a,"checkCanReturnFocus");var h=c(a,"returnFocus","returnFocusOnDeactivate");i===null||i===void 0||i();var f=function t(){on((function(){if(h){p(b(o.nodeFocusedBeforeActivation))}l===null||l===void 0||l()}))};if(h&&d){d(b(o.nodeFocusedBeforeActivation)).then(f,f);return this}f();return this},pause:function t(e){if(o.paused||!o.active){return this}var a=c(e,"onPause");var i=c(e,"onPostPause");o.paused=true;a===null||a===void 0||a();z();M();i===null||i===void 0||i();return this},unpause:function t(e){if(!o.paused||!o.active){return this}var a=c(e,"onUnpause");var i=c(e,"onPostUnpause");o.paused=false;a===null||a===void 0||a();f();w();M();i===null||i===void 0||i();return this},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){f()}M();return this}};s.updateContainerElements(e);return s};const fn=":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 un=fn;let pn=0;const bn=class{constructor(e){t(this,e);this.catOpen=r(this,"catOpen",7);this.catClose=r(this,"catClose",7);this.id=pn++;this.isOpen=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.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(){if(!this.trigger){this.initTrigger()}if(this.isOpen===null||this.isOpen){return}this.isOpen=null;this.content.style.display="block";setTimeout((()=>{this.isOpen=true;this.content.classList.add("show");this.trigger?.setAttribute("aria-expanded","true");this.trap=this.trap?this.trap.updateContainerElements(this.content):hn(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.noInitialFocus?false:undefined});this.trap.activate()}))}async close(){if(!this.isOpen){return}this.isOpen=null;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.trap?.deactivate();this.catClose.emit()}),Vr)}render(){return e(a,{key:"7e36594a07f06a29d6360a275ac2aeff94c15a6e"},e("slot",{key:"4eca46c3ef78b8dc33861b53b4c24fea7e55934b",name:"anchor",ref:t=>this.anchorSlot=t}),e("slot",{key:"63cf5ee478ac0f4472525bf7af87b951f190c1a6",name:"trigger",ref:t=>this.triggerSlot=t}),e("div",{key:"7721f06ff6ad699d11775edbb56b428ba3f2fcdd",id:this.contentId,class:{content:true,"overflow-auto":!this.overflow},ref:t=>this.content=t},e("slot",{key:"a3019a04b20c6e0d18af8aa690ae6ff71bd30ae6",name:"content"})))}componentDidLoad(){this.initAnchor()}get contentId(){return`cat-dropdown-${this.id}`}initTrigger(){this.trigger=this.findTrigger();this.trigger.setAttribute("aria-haspopup","true");this.trigger.setAttribute("aria-expanded","false");this.trigger.setAttribute("aria-controls",this.contentId);this.trigger.addEventListener("click",(()=>this.toggle()));if(!this.anchor){Er(this.trigger,this.content,(()=>this.update(this.trigger)))}}initAnchor(){this.anchor=(this.anchorSlot?.assignedElements?.()||[])[0];if(this.anchor){Er(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=ra(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?[]:[Lr({padding:bn.OFFSET,apply({availableWidth:t,availableHeight:e,elements:a}){Object.assign(a.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}})];jr(t,this.content,{strategy:"fixed",placement:this.placement,middleware:[Or(bn.OFFSET),Wr(),...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)}};bn.OFFSET=4;bn.style=un;const mn=":host{display:block}";const gn=mn;const vn=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:"9dd41737f5494414b9d512ed96574d601354e30f",style:{"--label-size":this.labelSize}},e("slot",{key:"59eb8e44f63bdb5530ff4abe9171997cbe4a315d",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"]}}};vn.style=gn;const yn=":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 kn=yn;const xn=class{constructor(e){t(this,e);this.icon=undefined;this.iconSrc=undefined;this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"83b5dc326310880529e5edc274e2a3196a0e6234",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"}})}};xn.style=kn;var wn=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};var zn=function(t,e,a,i,r,n,o,s,c,l){var d=this;d.numeralDecimalMark=t||".";d.numeralIntegerScale=e>0?e:0;d.numeralDecimalScale=a>=0?a:2;d.numeralThousandsGroupStyle=i||zn.groupStyle.thousand;d.numeralPositiveOnly=!!r;d.stripLeadingZeroes=n!==false;d.prefix=o||o===""?o:"";d.signBeforePrefix=!!s;d.tailPrefix=!!c;d.delimiter=l||l===""?l:",";d.delimiterRE=l?new RegExp("\\"+l,"g"):""};zn.groupStyle={thousand:"thousand",lakh:"lakh",wan:"wan",none:"none"};zn.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 zn.groupStyle.lakh:n=n.replace(/(\d)(?=(\d\d)+\d$)/g,"$1"+e.delimiter);break;case zn.groupStyle.wan:n=n.replace(/(\d)(?=(\d{4})+$)/g,"$1"+e.delimiter);break;case zn.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 Dn=zn;var In=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()};In.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),s=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=s}}));return this.getFixedDateString(a)},getFixedDateString:function(t){var e=this,a=e.datePattern,i=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f,u=false;if(t.length===4&&a[0].toLowerCase()!=="y"&&a[1].toLowerCase()!=="y"){s=a[0]==="d"?0:2;c=2-s;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+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;s=r<=o?r*2:r*2+2;c=n<=o?n*2:n*2+2;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;i=this.getFixedDate(d,h,f)}if(t.length===4&&(a[0]==="y"||a[1]==="y")){c=a[0]==="m"?0:2;l=2-c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);u=t.slice(l,l+2).length===2;i=[0,h,f]}if(t.length===6&&(a[0]==="Y"||a[1]==="Y")){c=a[0]==="m"?0:4;l=2-.5*c;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+4),10);u=t.slice(l,l+4).length===4;i=[0,h,f]}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+(u?e.addLeadingZeroForYear(i[2],false):"");case"Y":return t+(u?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]||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 Mn=In;var Rn=function(t,e){var a=this;a.time=[];a.blocks=[];a.timePattern=t;a.timeFormat=e;a.initBlocks()};Rn.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),s=o.slice(0,1),c=t.slice(r);switch(e.timePattern[n]){case"h":if(parseInt(s,10)>i.maxHourFirstDigit){o="0"+s}else if(parseInt(o,10)>i.maxHours){o=i.maxHours+""}break;case"m":case"s":if(parseInt(s,10)>i.maxMinutesFirstDigit){o="0"+s}else if(parseInt(o,10)>i.maxMinutes){o=i.maxMinutes+""}break}a+=o;t=c}}));return this.getFixedTimeString(a)},getFixedTimeString:function(t){var e=this,a=e.timePattern,i=[],r=0,n=0,o=0,s=0,c=0,l=0,d,h,f;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;c=n;s=r;d=parseInt(t.slice(s,s+2),10);h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);i=this.getFixedTime(f,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;c=n;d=0;h=parseInt(t.slice(c,c+2),10);f=parseInt(t.slice(l,l+2),10);i=this.getFixedTime(f,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 Cn=Rn;var An=function(t,e){var a=this;a.delimiter=e||e===""?e:" ";a.delimiterRE=e?new RegExp("\\"+e,"g"):"";a.formatter=t};An.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;n0,c="";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(s){c=r[n?l-1:l]||c}else{c=i}if(n){if(l>0){o+=c}o+=d}else{o+=d;if(d.length===e&&l0?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 wn==="object"&&wn?wn:window;t.document=e.document||t.root.document;t.maxLength=0;t.backspace=false;t.result="";t.onValueChanged=e.onValueChanged||function(){};return t}};var On=En;var Nn=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=Nn.DefaultProperties.assign({},e);a.init()};Nn.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=Nn.Util.getMaxLength(e.blocks);t.isAndroid=Nn.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 Nn.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 Nn.TimeFormatter(e.timePattern,e.timeFormat);e.blocks=e.timeFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=Nn.Util.getMaxLength(e.blocks)},initDateFormatter:function(){var t=this,e=t.properties;if(!e.date){return}e.dateFormatter=new Nn.DateFormatter(e.datePattern,e.dateMin,e.dateMax);e.blocks=e.dateFormatter.getBlocks();e.blocksLength=e.blocks.length;e.maxLength=Nn.Util.getMaxLength(e.blocks)},initPhoneFormatter:function(){var t=this,e=t.properties;if(!e.phone){return}try{e.phoneFormatter=new Nn.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=Nn.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)}Nn.Util.fixPrefixCursor(t.element,e.prefix,e.delimiter,e.delimiters)},onCut:function(t){if(!Nn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t);this.onInput("")},onCopy:function(t){if(!Nn.Util.checkFullSelection(this.element.value))return;this.copyClipboardData(t)},copyClipboardData:function(t){var e=this,a=e.properties,i=Nn.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=Nn.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=Nn.Util,r;if(i.headStr(a.result,4)===i.headStr(t,4)){return}r=Nn.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=Nn.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=Nn.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]"}};Nn.NumeralFormatter=Dn;Nn.DateFormatter=Mn;Nn.TimeFormatter=Cn;Nn.PhoneFormatter=Sn;Nn.CreditCardDetector=Tn;Nn.Util=$n;Nn.DefaultProperties=On;(typeof wn==="object"&&wn?wn:window)["Cleave"]=Nn;var Wn=Nn;function Ln(t){return t!=null&&`${t}`!=="false"}function jn(t,e=0){return Pn(t)?Number(t):e}function Pn(t){return!isNaN(parseFloat(t))&&!isNaN(Number(t))}const Yn=".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}.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}.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}.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}.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}.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}.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}.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}.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-container .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-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 Hn=Yn;let Un=0;const _n=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-${Un++}`;this.hasSlottedLabel=false;this.hasSlottedHint=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.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}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}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 Wn(this.input,t)}onErrorsChanged(t){if(!Ln(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e("div",{key:"710fc250d8f11176a961b5206bc1f9232aa84be4",class:{"input-field":true,"input-horizontal":this.horizontal}},e("div",{key:"d57a83ea90d24a5afaed81088b708567daa0b4bf",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"61b641051a272bc80177d228e4d56df470fdcd40",htmlFor:this.id,part:"label"},e("span",{key:"a522fa48dfadd05cc2ec3175cab8ca3f2d23e73d",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"d6d746332b369ef0c4b3f73ef15b020411e50d73",name:"label"})||this.label,e("div",{key:"ecf148a66a061e6e6dcf1b064b81d9f0f17efbfb",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"e0caa04516b0185d3f5916ef3f72742979d3e8f2",class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"392aa2bb291df5b0c34a7f38deb0a2ee2e24a0bd",class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{key:"17926bcd4830cffd1373c4ffd7cd5e3af13aa9bd",class:"label-character-count","aria-hidden":"true"},this.value?.toString().length??0,"/",this.maxLength))))),e("div",{key:"54b16ece948552768266937a22cf01005e1173c3",class:"input-container"},e("div",{key:"c1f5879a29b9178a72587daa852fbbdb26faddf0",class:"input-outer-wrapper"},e("div",{key:"f69ecc01540efc059696a5e25b180355433820bf",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:"2e3d91279deb4179162d975335ebfa9f0e9d2b2e",class:"text-prefix",part:"prefix"},this.textPrefix),this.icon&&!this.iconRight&&e("cat-icon",{key:"80b26a819294fb17b37bf773f9cd083a45dbe483",icon:this.icon,class:"icon-prefix",size:"l",onClick:()=>this.doFocus()}),e("div",{key:"43efb99f56314c8bd5cfce38753244f108a5a610",class:"input-inner-wrapper"},e("input",{key:"2be965730ab7d0492e0b0d91d0a90d8d288e0203",...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:"2368492bdefb956c46767bdc5d27bee18b0723dc",class:"clearable",icon:"$cat:input-close","icon-only":"true",size:"s",variant:"text","a11y-label":D.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:"c6cd66169ea99ee2975aa96dfcd3761186d9a574",class:"toggle-password",icon:this.isPasswordShown?"$cat:input-password-hide":"$cat:input-password-show","icon-only":"true",size:"s",variant:"text","a11y-label":D.t(this.isPasswordShown?"input.hidePassword":"input.showPassword"),onClick:this.doTogglePassword.bind(this)})),!this.invalid&&this.icon&&this.iconRight&&e("cat-icon",{key:"6262a983d66c3355a131a7a37bdb7dab8a169f41",icon:this.icon,class:"icon-suffix",size:"l",onClick:()=>this.doFocus()}),this.invalid&&e("cat-icon",{key:"c50c15e17b515bff2933e36e40ea12d62f719b95",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l"}),this.textSuffix&&e("span",{key:"937984d04d867aff813f8bf204904d8277521a41",class:"text-suffix",part:"suffix"},this.textSuffix)),e("slot",{key:"a5d6ea59f76885ca72c66371771452544692be22",name:"addon"})),this.hasHint&&e(ne,{key:"15ace5d211cf0abce63bd7fc277b913914ca415a",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!!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(Ln(this.errorUpdate)){this.showErrors()}}doTogglePassword(){this.isPasswordShown=!this.isPasswordShown}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=jn(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}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};_n.style=Hn;const Kn=":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 Vn=Kn;const qn=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(){return e("nav",{key:"e0afa5efde129998d5899191374849c2538d5656",role:"navigation"},e("ol",{key:"3b6d1838f508a3323d0ff11b95318eee5cfe5c89",class:{[`cat-pagination-${this.size}`]:Boolean(this.size)}},e("li",{key:"fffae2ea8d502b03c01841f2cdf281150d6b62b5"},e("cat-button",{key:"8f320c285b322ca8ae618143b70fdf85b227c232",variant:this.variant,size:this.size,round:this.round,disabled:this.isFirst,a11yLabel:D.t("pagination.prev"),icon:this.iconPrev,iconOnly:true,onClick:()=>this.setPage(this.page-1)})),this.content,e("li",{key:"77d3aa0acb4a27cd8c65d7396dab318dcce7825c"},e("cat-button",{key:"fe70cf4c908cbc7ac2bd2167f778f42fa3b49025",variant:this.variant,size:this.size,round:this.round,disabled:this.isLast,a11yLabel:D.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:D.t("pagination.page",{page:t+1}),a11yCurrent:this.page===t?"step":undefined,onClick:()=>this.setPage(t)},t+1))]))}};qn.style=Vn;const Jn=".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))}";const Gn=Jn;let Zn=0;const Xn=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-${++Zn}`;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.nativeAttributes=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(){return e(a,{key:"ac195620510636c4a00252872b925c26b7e40809"},e("label",{key:"bdca13538284884a2e8b66365d32c951b84e19e9",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft},role:"radio","aria-checked":this.checked?"true":"false"},e("span",{key:"e1c58b79ee19209fafb8120e4ce560c6df260454",class:"radio"},e("input",{key:"b847d19afa147207a7a21586f941ce38da8bc11f",...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:"9872df04798ec57660c35cd4b0cad8e179668022",class:"circle"})),e("span",{key:"89d6e1dc470e6db8c94ecc7567392eeaae636f67",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"ff6c945b79f690771e3751c95685cdf9df91c9cf",name:"label"})||this.label)),this.hasHint&&e("div",{key:"24b4f214a0c3d1c5d27f3517f4a57edde61a73dd",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"3e37c759d11347654c86d522189f82b6509fc680",class:"circle-placeholder"}),e(ne,{key:"a236040feaa1f77d9e3bbf326f7cf2cac3ab5031",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)}get hostElement(){return i(this)}};Xn.style=Gn;const Qn=":host{display:block}:host([hidden]){display:none}";const to=Qn;const eo=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:"597881a52c2314f3cc6e159473d8dc83e5944900",role:"radiogroup","aria-label":this.a11yLabel},e("slot",{key:"ca1d499d74100334a86bf75362bd61f3674d31fa"}))}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"]}}};eo.style=to;const ao=":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 io=ao;const ro=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(Rt(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(ro.THROTTLE),Y((()=>({top:this.getScrollOffset("top")>0,left:this.getScrollOffset("left")>0,right:this.getScrollOffset("right")>0,bottom:this.getScrollOffset("bottom")>0}))),yt(),Rt(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:"3fa7e90419b11118694def5d300036b1062fb685",class:"scrollable-wrapper",ref:t=>this.scrollWrapperElement=t},!this.noShadowY&&e("div",{key:"3f7a3b2aa4a8b434ab66fc676e02771e056dfc95",class:"shadow-top"}),!this.noShadowX&&e("div",{key:"450547a0b1a08a15903e605f2bd12c1eb2637089",class:"shadow-left"}),!this.noShadowX&&e("div",{key:"69fe8dc3f0282d9d8bf1ccd65add30c0046789c4",class:"shadow-right"}),!this.noShadowY&&e("div",{key:"b2f1df225d3653cd778b28f2f94724ff1f7a7729",class:"shadow-bottom"})),e("div",{key:"56833efe4ee21f847c2321e89e0b3e2fa9a7240b",ref:t=>this.scrollElement=t,class:{"scrollable-content":true,"scroll-x":!this.noOverflowX,"scroll-y":!this.noOverflowY,"no-overscroll":this.noOverscroll}},e("slot",{key:"c959b7cbbd06a0233ad773738ef925b05bd76be3"}))]}attachEmitter(t,e){ot(this.init,this.scrolled,this.resizedEntries).pipe(lt(ro.THROTTLE),Y((()=>this.getScrollOffset(t))),Y((t=>t<=this.scrolledBuffer)),yt(),st((t=>t)),Rt(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)}}};ro.THROTTLE=50;ro.style=io;var no="__autosizeInputGhost";var oo={" ":"nbsp","<":"lt",">":"gt"};function so(t){return"&"+oo[t]+";"}function co(t){return t.replace(/\s|<|>/g,so)}function lo(){var t=document.createElement("div");t.id=no;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 ho=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(no)||lo();a.style.cssText+=i;a.innerHTML=co(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(no);if(e){e.parentNode.removeChild(e)}}};const fo=".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}.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}.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}.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}.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}.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}.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}.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}.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-container .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 uo=fo;const po={term:"",isOpen:false,isLoading:false,isResolving:false,options:[],selection:[],tempSelection:[],activeOptionIndex:-1,activeSelectionIndex:-1};let bo=0;let mo=0;const go=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-${bo++}`;this.term$=new A;this.more$=new A;this.valueChangedBySelection=false;this.connector=undefined;this.state=po;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}get id(){return this.identifier||this._id}onConnectorChanged(t){this.reset(t);this.resolve()}onValueChanged(){!this.valueChangedBySelection?this.resolve():this.valueChangedBySelection=false}onErrorsChanged(t){if(!Ln(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;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){ho(this.input)}if(this.trigger&&this.dropdown){Er(this.trigger,this.dropdown,(()=>this.update()))}}componentWillRender(){this.onErrorsChanged(this.errors);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(Ln(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(ft((t=>t?nt(this.debounce):R(0))),yt(),At((()=>e=this.more$.pipe(st((()=>!this.state.isLoading)),Dt((t=>t+1),0),It(0)))),At((()=>this.patchState({options:[]}))),Mt((a=>e.pipe(At((()=>this.patchState({isLoading:true}))),Mt((e=>t.retrieve(a,e))),At((t=>this.patchState({isLoading:false,totalElements:t.totalElements}))),Ct((t=>!t.last),true),Dt(((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(){return e(a,{key:"46b0ce9bf810c41ce4befa63b1bc6389097e65d4"},e("div",{key:"d2ff2fa34304b01f5658b3e36802d936ca4ffb57",class:{"select-field":true,"select-horizontal":this.horizontal,"select-multiple":this.multiple}},e("div",{key:"57a789f4461cba4c8fa1fbff15f4343d1c180b3c",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"a0df13d7734260281fbceeb3a14e53b7403861bd",htmlFor:`select-${this.id}-input`,part:"label"},e("span",{key:"64b7fe2a210dcc04436ce40f3ba7fe8ec877d098",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"4bb2124527e2082d9ca34b7a20ae8f4e156bb488",name:"label"})||this.label,e("div",{key:"28b9dbac0ec470274dbc7d7d45efe4c40ead1a54",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"2b380f134bfc8f6b8a5b9e62e9ffce7a8091a779",class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"017dd74b59b061a54f819eaffb9a52345d2fea6f",class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"))))),e("div",{key:"e41ff696c0cd324f929f42f796b8cd8311f063b7",class:"select-container"},e("div",{key:"9f7ee2820973a7ee409f7215cdafe1656148a38c",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:"59da473837f08e21f4ef2de243eb5f65b211bf82",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:D.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:"6760c556500cea4ef8ff9ed16d66ee8be4ae2e65",...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:"0cb649c51da135ba58acc2945a776801e4831d94"}),this.invalid&&e("cat-icon",{key:"13cce56c5e320cfddbe5071fd6364730b118da48",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:D.t("input.clear"),onCatClick:()=>this.clearInput(),"data-dropdown-no-close":true}):null,!this.state.isResolving&&e("cat-button",{key:"90242787bd0709a3c00391254947cb64a9ad7881",iconOnly:true,icon:"$cat:select-open",class:{"select-btn":true,"select-btn-open":this.state.isOpen},variant:"text",size:"s",a11yLabel:this.state.isOpen?D.t("select.close"):D.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(ne,{key:"1be050a399eb4f27daa841526d849786db13f4cf",id:this.id,hint:this.hint,slottedHint:this.hasSlottedHint&&e("slot",{name:"hint"}),errorMap:this.errorMap}))),e("div",{key:"60c2fff689652e63214ed1fe2bf10d71d48dc7a0",class:"select-dropdown",ref:t=>this.dropdown=t,style:{display:this.state.isOpen?"block":undefined}},this.state.isOpen&&e("cat-scrollable",{key:"97228db7a5a0f7f40b220ce909742c38f9e744ac",class:"select-options-wrapper",scrolledBuffer:56,noOverflowX:true,noOverscroll:true,noScrolledInit:true,onScrolledBottom:()=>this.more$.next()},e("ul",{key:"6c79ab6c89dcd198dad55cae3a4445b26c2d7f8f",class:"select-options",role:"listbox","aria-multiselectable":this.multiple,"aria-setsize":this.state.totalElements,id:`select-listbox-${this.id}`},this.optionsList,this.state.isLoading?Array.from(Array(go.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:D.t("select.empty"))))))}get hasHint(){return!!this.hint||!!this.hasSlottedHint||this.invalid}get invalid(){return!!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()):R([]);i.pipe(dt((()=>R([])))).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}})}))}this.patchState({isResolving:false,selection:i,term:!this.multiple&&i.length?i[0].render.label:""})}))}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});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.search(t.render.label)}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=po}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){jr(this.trigger,this.dropdown,{strategy:"fixed",placement:this.placement,middleware:[Or(go.DROPDOWN_OFFSET),Wr()]}).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.activeSelectionIndexe.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+mo++: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=jn(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()}}get hostElement(){return i(this)}static get watchers(){return{connector:["onConnectorChanged"],value:["onValueChanged"],errors:["onErrorsChanged"],state:["onStateChanged"]}}};go.SKELETON_COUNT=4;go.DROPDOWN_OFFSET=4;go.style=uo;const vo=class{constructor(e){t(this,e)}componentDidLoad(){this.multipleSelect?.connect({resolve:t=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({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=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({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=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({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=>R(t.map((t=>({id:t,firstName:"John",lastName:`Doe (${t})`,desc:"resolved"})))).pipe(vt(500)),retrieve:(t,e)=>t==="no"?R({last:true,content:[],totalElements:0}):R({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:"745d55bbd0e1c38377f5f7ed138dc78213b47960",style:{display:"flex",flexDirection:"column"},class:"cat-form"},e("cat-select",{key:"7c201ebc18e36a8551899b7e5276a63ded6bb6c8",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:"a0c9f9514070e2101c84839292bbc749a7969eab",slot:"hint"},'Searching for "no" -',">"," no options are returned!")),e("cat-select",{key:"b648ecf10f825cb33a11da79b6528caf78b7b07c",label:"Multiple with img",ref:t=>this.multipleSelectAvatar=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"23e6ab45009463f2d703d8913b232ade2f1abfa3",label:"Multiple with initials",ref:t=>this.multipleSelectAvatarInitials=t,value:["1"],placeholder:"Hello World",multiple:true,clearable:true,errorUpdate:false}),e("cat-select",{key:"18f247000136a32e7ec202c7be7f01e625a4a40d",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:"445e29437d8af225222a9af1e2cd87e730d23b8f",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:"781b635fbe75a7cc9f8bfb840b0614b65f53b7f6",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:"2078bf8f1778a21c1b6a4180292b244a8b11eb62",label:"Single with initials",ref:t=>this.singleSelectAvatarInitials=t,placeholder:"Hello World",clearable:true,errorUpdate:false}),e("cat-dropdown",{key:"42a8847c8e88d349f4919794ca93e067a25ecf36",overflow:true},e("cat-button",{key:"55f407b6d3316311faa138169f1eb8725757f588",slot:"trigger",style:{width:"50%"}},"Open select"),e("div",{key:"c68ad1b486b5985bb550d026ba2969a786995c48",slot:"content",style:{width:"400px"}},e("cat-select",{key:"2a32550e0f87e8aa3f90abbe819c7ceab0d9c773",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=>R(t.map((t=>yo.find((e=>e.id===t))))).pipe(vt(500)),retrieve:(t,e)=>{const a=yo.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 R({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 yo=[{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 ko=':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 xo=ko;const wo=class{constructor(e){t(this,e);this.effect="sheen";this.variant="rectangle";this.size="m";this.lines=undefined}render(){return e(a,{key:"aac4684f2816b1be2367866041d15e9fac0de7ac"},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)}};wo.style=xo;const zo=":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 Do=zo;const Io=class{constructor(e){t(this,e);this.size="m";this.a11yLabel=undefined}render(){return e("span",{key:"6e6fe85607e6f6b00fd095c176604aecc05ea75a","aria-label":this.a11yLabel,"aria-hidden":this.a11yLabel?null:"true",class:{[`spinner-${this.size}`]:this.size!=="inline"}},e("svg",{key:"9c5823b8f4ab7796a34342901e1d1278a3c34537",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48"},e("circle",{key:"386e29a6dd880ae337f20ba1c4074edb7484c8f6",cx:"24",cy:"24",r:"21.5"})))}};Io.style=Do;const Mo=":host{display:block}:host([hidden]){display:none}";const Ro=Mo;let Co=0;const Ao=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.error=false;this.nativeAttributes=undefined}connectedCallback(){if(!this.hostElement.id){this.hostElement.id=`cat-tab-${Co++}`}}onClick(t){this.catClick.emit(t)}render(){return e(a,{key:"423a9d58be83b8acccdbe72ffb0f75733dc91cc7"})}get hostElement(){return i(this)}};Ao.style=Ro;const So=':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 Fo=So;const To=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(){return e(a,{key:"b3119423d8f6cae90991af25bd6d7d6ef94b5609"},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)))[0]?.id}canActivate(t){return!!t&&!t.deactivated&&!t.url&&t.id!==this.activeTab}click(t){if(this.canActivate(t)){t.click();this.activate(t)}}activate(t){if(this.canActivate(t)){this.activeTab=t.id}}get hostElement(){return i(this)}static get watchers(){return{activeTab:["onActiveTabChange"]}}};To.style=Fo;var Bo=new Map;function $o(t){var e=Bo.get(t);e&&e.destroy()}function Eo(t){var e=Bo.get(t);e&&e.update()}var Oo=null;"undefined"==typeof window?((Oo=function(t){return t}).destroy=function(t){return t},Oo.update=function(t){return t}):((Oo=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&&!Bo.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",s),t.removeEventListener("input",r),window.removeEventListener("resize",s),Object.keys(e).forEach((function(a){return t.style[a]=e[a]})),Bo.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",s),t.addEventListener("input",r),window.addEventListener("resize",s),t.style.overflowX="hidden",t.style.wordWrap="break-word",Bo.set(t,{destroy:n,update:s}),s()}function o(e){var r,n,s=e.restoreTextAlign,c=void 0===s?null:s,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",c&&(t.style.textAlign=c),r&&r(),a!==n&&(t.dispatchEvent(new Event("autosize:resized",{bubbles:!0})),a=n),h!==i.overflow&&!c)){var f=i.textAlign;"hidden"===i.overflow&&(t.style.textAlign="start"===f?"end":"start"),o({restoreTextAlign:f,testForHeightReduction:!0})}}function s(){o({testForHeightReduction:!0,restoreTextAlign:null})}}(t)})),t}).destroy=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],$o),t},Oo.update=function(t){return t&&Array.prototype.forEach.call(t.length?t:[t],Eo),t});var No=Oo;const Wo=".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}.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}.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}.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}.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}.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}.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}.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}.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-container .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 Lo=Wo;let jo=0;const Po=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-${jo++}`;this.hasSlottedLabel=false;this.hasSlottedHint=false;this.errorMap=undefined;this.requiredMarker="optional";this.horizontal=false;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}get id(){return this.identifier||this._id}componentWillRender(){this.onErrorsChanged(this.errors);this.hasSlottedLabel=!!this.hostElement.querySelector('[slot="label"]');this.hasSlottedHint=!!this.hostElement.querySelector('[slot="hint"]')}componentDidLoad(){No(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){if(!Ln(this.errorUpdate)){this.errorMap=undefined}else{this.errorMapSrc=Array.isArray(t)?t.reduce(((t,e)=>({...t,[e]:undefined})),{}):t===true?{}:t||undefined;this.showErrorsIfTimeout()||this.showErrorsIfNoFocus()}}render(){return e(a,{key:"75665cdb53070b131971482ec39853e07d2f4ca9"},e("div",{key:"a2439d68f9e7314a9f970ff10f900c4c04e23e4a",class:{"textarea-field":true,"textarea-horizontal":this.horizontal}},e("div",{key:"fc3556d42d3b02cf31d83cccf03b0226d53c9517",class:{"label-container":true,hidden:this.labelHidden}},(this.hasSlottedLabel||this.label)&&e("label",{key:"1e7a169e766a4a349a080fab967aa6c678b27ede",htmlFor:this.id,part:"label"},e("span",{key:"3658d2fc258162a3c1c635fa1b5148005d1e1bac",class:"label-wrapper"},this.hasSlottedLabel&&e("slot",{key:"2ce32b2a5984547d09aa8921f9ee33b918e1aab2",name:"label"})||this.label,e("div",{key:"36ef608cdee7550adc0be30270db64f3dcd4ea2e",class:"label-metadata"},!this.required&&(this.requiredMarker??"optional").startsWith("optional")&&e("span",{key:"4a7480181592a16d39db92273dd9a32fe338388a",class:"label-optional","aria-hidden":"true"},"(",D.t("input.optional"),")"),this.required&&this.requiredMarker?.startsWith("required")&&e("span",{key:"de54a7e25c78c6cdc1f8683c8e5c1773714323ce",class:"label-optional","aria-hidden":"true"},"(",D.t("input.required"),")"),this.maxLength&&e("div",{key:"05a49aeae9c47c22c5ee0c95a5d4d1708f8aeff1",class:"label-character-count","aria-hidden":"true"},this.value?.length??0,"/",this.maxLength))))),e("div",{key:"b2a6bc4d2f61b4a5683fd7fdf39123c8c0c4c39e",class:"textarea-container"},e("div",{key:"79a4291af19da695a14b80539cfc6d6e9313ccaf",class:{"textarea-wrapper":true,"textarea-readonly":this.readonly,"textarea-disabled":this.disabled,"textarea-invalid":this.invalid}},e("textarea",{key:"3e06a6c68119338adf15b93d717da4a3dbc4e8cb",...this.nativeAttributes,part:"textarea",ref:t=>this.textarea=t,id:this.id,disabled:this.disabled,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:"3845c0f84764b5f382b8e36ff90571548c057087",icon:"$cat:input-error",class:"icon-suffix cat-text-danger",size:"l",onClick:()=>this.textarea.focus()})),this.hasHint&&e(ne,{key:"564729eaa387e7b08c35415dd9ac16ad6e2c806a",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!!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(Ln(this.errorUpdate)){this.showErrors()}}showErrors(){this.errorMap=this.errorMapSrc}showErrorsIfTimeout(){const t=jn(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()}}get hostElement(){return i(this)}static get watchers(){return{errors:["onErrorsChanged"]}}};Po.style=Lo;function Yo(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 Ho(t){return{change:D.t("timepicker.change"),choose:D.t("timepicker.choose"),timeFormat:Yo(t)?"12":"24"}}function Uo(t){return`${t.getHours().toString().padStart(2,"0")}:${t.getMinutes().toString().padStart(2,"0")}`}function _o(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 s=-Infinity;let c=Infinity;if(i!==undefined&&r!==undefined){s=new Date(e.getFullYear(),e.getMonth(),e.getDate(),i,r).getTime()}if(n!==undefined&&o!==undefined){c=new Date(e.getFullYear(),e.getMonth(),e.getDate(),n,o).getTime()}return new Date(Math.min(Math.max(e.getTime(),s),c))}function Ko(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 qo=":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}nav{max-height:16rem}nav ul{list-style:none;margin:0;padding:0}.time-disabled{opacity:0.25}";const Jo=qo;const Go=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=D.getLocale();this.locale=Ho(this.language);this.hasSlottedLabel=false;this.hasSlottedHint=false;this.selectionTime=null;this.isAm=true;this.requiredMarker="optional";this.horizontal=false;this.autoComplete=undefined;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)}}componentWillLoad(){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=_o(this.min??null,this.selectionTime??new Date(2e3,5,1,8),this.max??null);const a=t(`[data-time="${Uo(e)}"]`);e.setMinutes(Math.floor(e.getMinutes()/this.step)*this.step);const i=t(`[data-time="${Uo(e)}"]`);setTimeout((()=>{(i??a)?.doFocus();(i??a)?.scrollIntoView(this.selectionTime?{block:"center"}:undefined)}))}async select(t){const e=this.value;if(!t){this.selectionTime=null;this.value=undefined}else{const e=_o(this.min??null,t,this.max??null);this.isAm=this.format(e).toLowerCase().includes("am");this.selectionTime=e;this.value=Uo(e)}if(this.input){this.input.value=this.format(this.selectionTime,false)}if(e!==this.value){this.catChange.emit(this.value)}}async doFocus(t){this.input?.doFocus(t)}async doBlur(){this.input?.doBlur()}async clear(){this.input?.clear()}render(){return e(a,{key:"4f78a1c5d3dd09a6f7476a4fed55ba1241305b4b"},e("cat-input",{key:"e783cd952c5a9bfc1b205eabf62b4b7e42684695",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:"945c465de003a32f67c6cab827afe8667c3d8436",slot:"label"},this.hasSlottedLabel&&e("slot",{key:"801d55325c6ec485c8519586a1fe03751b7ea4a2",name:"label"}),!this.hasSlottedLabel&&this.label,e("span",{key:"0dacef4090d789d0a600b5db2881bd9598e38a18",class:"label-aria"}," (HH:mm)")),e("div",{key:"209dfdb875dbb40a0865dde72fd4aaa217a2592f",slot:"addon",class:"cat-time-addon"},this.locale.timeFormat==="12"&&e("cat-button",{key:"d3b901214820efebe32769996a8aa188d3a1e3e2",class:"cat-time-format",disabled:this.disabled||this.readonly,onCatClick:()=>this.toggleAm()},this.isAm?"AM":"PM"),e("cat-dropdown",{key:"b25d55512fc792bcb159e016ea71547032856aca",slot:"addon",placement:this.placement},e("cat-button",{key:"5b6d1cf64a4c561b7d56ddbbaecf4e035e1ec3d4",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:"b24b73a4374c5304b600c07c8c5f6c01e478f990",slot:"content",class:"cat-nav"},e("ul",{key:"386fda017f42a0152b0095f3a107f892c425f844"},this.timeArray().map((t=>{const a=Uo(t);const i=Ko(t,this.min??null)||Vo(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:"e563a161e00cc919f39ecf663cc93065ca078f9a",slot:"hint"},e("slot",{key:"c302e5d24d005b43fe035865488318d03389d7cb",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))}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 s=r?Uo(_o(a,new Date(2e3,5,1,Number(n),Number(o)),i)):undefined;if(this.value!==s){this.syncValue(s??"");this.catChange.emit(s)}}get hostElement(){return i(this)}static get watchers(){return{min:["onMinChanged"],max:["onMaxChanged"]}}};Go.style=Jo;const Zo='.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))}';const Xo=Zo;let Qo=0;const ts=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-${Qo++}`;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.nativeAttributes=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(){return e(a,{key:"e41e7a93c56caf528e912f498da751e9a5710ba4"},e("label",{key:"85521c6e6d45dc66625ba22eb3580b66544afc9c",htmlFor:this.id,class:{"is-hidden":this.labelHidden,"is-disabled":this.disabled,"label-left":this.labelLeft}},e("input",{key:"a3dac924a5139b0574cbc61ae884dc59bb17e2be",...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:"be56569d133a4ee3d2177209bb72db2f23414748",class:"toggle"}),e("span",{key:"83696bea618f5b68f5ecbf1e04e27cdad09cb7da",class:"label",part:"label"},this.hasSlottedLabel&&e("slot",{key:"05affd31e735cbf00d1e273bef672911d8b7ac42",name:"label"})||this.label)),this.hasHint&&e("div",{key:"9f60cdd92373eff8d40926d5d23c359ec1aa65d6",class:{"hint-wrapper":true,"label-left":this.labelLeft}},e("div",{key:"1df00fec9243519ad820a34ddf0ff282874af215",class:"toggle-placeholder"}),e(ne,{key:"6bf5540c16adf497f33c51783bd624d71f18343f",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}get hostElement(){return i(this)}};ts.style=Xo;const es="ontouchstart"in window||navigator.maxTouchPoints>0;const as=":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;font-size:0.875rem;line-height:1.125rem;font-weight:500;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.375rem 0.5rem}.tooltip-s.tooltip-round{padding:0.375rem 0.75rem}.tooltip-m{padding:0.75rem}.tooltip-m.tooltip-round{padding:0.75rem 1rem}.tooltip-l{padding:1rem}.tooltip-l.tooltip-round{padding:1rem 1.5rem}";const is=as;let rs=0;const ns=class{constructor(e){t(this,e);this.id=`cat-tooltip-${rs++}`;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(es){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(es){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:"22e95841f5029e24e0ae9b08e0843fd8b8d360df"},e("slot",{key:"b9fc1e2472dc4610fe61ffc16274fa7b49510ecf"}),e("div",{key:"e2971ec2746574a27b066ae9b3cece3236aa1bd9",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:"afbcad951679fb8d139c8415a7305f498072276c",name:"content"},e("p",{key:"6e10ef094c479288a02f8b874d48206158dece38"},this.content))))}async update(){if(this.trigger&&this.tooltip){await jr(this.trigger,this.tooltip,{strategy:"fixed",placement:this.placement,middleware:[Or(ns.OFFSET),Wr({fallbackAxisSideDirection:"start"}),Nr({padding:ns.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=Er(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)}};ns.OFFSET=4;ns.SHIFT_PADDING=4;ns.style=is;export{Bt as cat_alert,Nt as cat_avatar,jt as cat_badge,Xt as cat_button,ee as cat_button_group,re as cat_card,le as cat_checkbox,De as cat_date,ca as cat_date_inline,Hr as cat_datepicker,Kr as cat_datepicker_inline,bn as cat_dropdown,vn as cat_form_group,xn as cat_icon,_n as cat_input,qn as cat_pagination,Xn as cat_radio,eo as cat_radio_group,ro as cat_scrollable,go as cat_select,vo as cat_select_demo,wo as cat_skeleton,Io as cat_spinner,Ao as cat_tab,To as cat_tabs,Po as cat_textarea,Go as cat_time,ts as cat_toggle,ns as cat_tooltip}; +//# sourceMappingURL=p-b11c201a.entry.js.map \ No newline at end of file diff --git a/build/p-b11c201a.entry.js.map b/build/p-b11c201a.entry.js.map new file mode 100644 index 00000000..89b10204 --- /dev/null +++ b/build/p-b11c201a.entry.js.map @@ -0,0 +1 @@ +{"version":3,"names":["ObjectUnsubscribedError","createErrorClass","_super","ObjectUnsubscribedErrorImpl","this","name","message","Subject","Observable","constructor","super","closed","currentObservers","observers","isStopped","hasError","thrownError","lift","operator","subject","AnonymousSubject","_throwIfClosed","next","value","errorContext","Array","from","observer","error","err","length","shift","complete","unsubscribe","observed","_a","_trySubscribe","subscriber","_subscribe","_checkFinalizedStatuses","_innerSubscribe","EMPTY_SUBSCRIPTION","push","Subscription","arrRemove","asObservable","observable","source","create","destination","_b","call","subscribe","dateTimestampProvider","now","delegate","Date","undefined","Action","scheduler","work","schedule","state","delay","intervalProvider","setInterval","handler","timeout","args","clearInterval","handle","AsyncAction","pending","id","recycleAsyncId","requestAsyncId","_id","flush","bind","_scheduler","execute","Error","_execute","_delay","errored","errorValue","e","actions","Scheduler","schedulerActionCtor","AsyncScheduler","SchedulerAction","_active","action","asyncScheduler","async","EMPTY","EmptyError","EmptyErrorImpl","isValidDate","isNaN","map","project","thisArg","operate","index","createOperatorSubscriber","isArray","callOrApply","fn","mapOneOrManyArgs","mergeInternals","concurrent","onBeforeNext","expand","innerSubScheduler","additionalFinalizer","buffer","active","isComplete","checkComplete","outerNext","doInnerSub","innerComplete","innerFrom","innerValue","bufferedValue","executeSchedule","mergeMap","resultSelector","Infinity","isFunction","a","i","b","ii","mergeAll","identity","concatAll","concat","popScheduler","nodeEventEmitterMethods","eventTargetMethods","jqueryMethods","fromEvent","target","eventName","options","pipe","add","remove","isEventTarget","methodName","isNodeStyleEventEmitter","toCommonHandlerRegistry","isJQueryStyleEventEmitter","isArrayLike","subTarget","TypeError","addListener","removeListener","on","off","addEventListener","removeEventListener","timer","dueTime","intervalOrScheduler","intervalDuration","isScheduler","due","n","merge","popNumber","sources","filter","predicate","audit","durationSelector","hasValue","lastValue","durationSubscriber","endDuration","cleanupDuration","auditTime","duration","catchError","selector","innerSub","syncUnsub","handledResult","scanInternals","accumulator","seed","hasSeed","emitOnNext","emitBeforeComplete","hasState","debounce","emit","noop","defaultIfEmpty","defaultValue","take","count","seen","ignoreElements","mapTo","delayWhen","delayDurationSelector","subscriptionDelay","distinctUntilChanged","comparator","keySelector","defaultCompare","previousKey","first","currentKey","throwIfEmpty","errorFactory","defaultErrorFactory","hasDefaultValue","arguments","v","scan","startWith","values","switchMap","innerSubscriber","innerIndex","outerIndex","takeUntil","notifier","takeWhile","inclusive","result","tap","observerOrNext","tapObserver","isUnsub","finalize","setAttributeDefault","host","attr","hostElement","hasAttribute","setAttribute","String","catAlertCss","CatAlertStyle0","CatAlert","mapIcon","Map","mapRole","connectedCallback","get","color","render","h","Host","key","noIcon","size","icon","class","loadImg","src","Promise","resolve","reject","image","Image","catAvatarCss","CatAvatarStyle0","CatAvatar","onSrcChanged","then","backgroundImage","componentWillLoad","url","href","urlTarget","style","cssStyle","cssClass","label","content","getInitials","avatar","round","Boolean","initials","split","join","catBadgeCss","CatBadgeStyle0","CatBadge","_breakpoints","Breakpoints","xs","s","m","l","xl","isBreakpoint","includes","hasV8BreakIterator","Intl","v8BreakIterator","Platform","EDGE","test","navigator","userAgent","TRIDENT","BLINK","window","chrome","CSS","WEBKIT","IOS","FIREFOX","ANDROID","SAFARI","mediaQueriesForWebkitCompatibility","Set","mediaQueryStyleNode","MediaMatcher","_platform","_matchMedia","matchMedia","query","createEmptyStyleRule","has","document","createElement","head","appendChild","sheet","insertRule","log","catButtonCss","CatButtonStyle0","CatButton","onIconOnlyChanged","mediaQueryList","mediaQueryListener","mediaMatcher","event","_iconOnly","matches","iconOnly","haltDisabledEvents","disabled","loading","preventDefault","stopImmediatePropagation","doFocus","button","focus","doBlur","blur","doClick","click","nativeAttributes","ref","el","a11yLabel","a11yCurrent","buttonId","part","isIconButton","noEllipsis","variant","onClick","onFocus","onBlur","type","submit","buttonGroupPosition","iconSize","spinnerSize","hasPrefixIcon","iconRight","hasSuffixIcon","nativeContentAttributes","catClick","catFocus","catBlur","catButtonGroupCss","CatButtonGroupStyle0","CatButtonGroup","formElements","role","onSlotchange","onSlotChange","querySelectorAll","forEach","element","catCardCss","CatCardStyle0","CatCard","componentDidLoad","catLoad","CatFormHint","props","hint","slottedHint","errorMap","errors","Object","entries","params","i18n","t","item","catCheckboxCss","CatCheckboxStyle0","nextUniqueId","CatCheckbox","identifier","updateResolved","componentWillRender","hasSlottedLabel","querySelector","hasSlottedHint","input","htmlFor","labelHidden","labelLeft","checked","required","indeterminate","onInput","hasHint","viewBox","points","catChange","resolvedValue","noValue","getDays","language","weekday","date","firstDayOfWeek","getUTCDate","getUTCDay","format","DateTimeFormat","keys","day","getTime","setUTCDate","getMonths","month","setUTCMonth","getWeekInfo","locale","Locale","weekInfo","firstDay","minDays","weekend","getFormat","year","replace","getLocale","prevYear","nextYear","prevMonth","nextMonth","arrowKeys","today","change","choose","clear","formatStr","days","short","long","months","getFullYear","getMonth","getDate","fromLocalISO","match","Number","toLocalISO","toString","padStart","toLocalStr","isLeapYear","addDays","addMonth","maxDays","newDate","setDate","setMonth","Math","min","isSameYear","date1","date2","isSameMonth","isSameDay","clampDate","max","catDateCss","CatDateStyle0","CatDate","onMinChanged","oldMin","reclamp","onMaxChanged","oldMax","inputValue","p1","d1","p2","p3","exec","mask","dateMin","dateMax","delimiter","datePattern","requiredMarker","horizontal","autoComplete","clearable","placeholder","textPrefix","textSuffix","readonly","errorUpdate","onCatFocus","stopPropagation","detail","onCatBlur","onInputBlur","slot","placement","arrowNavigation","noResize","onCatOpen","dateInline","resetView","getTriggerA11yLabel","weeks","noClear","onCatChange","onDateChange","oldValue","dateParsed","parse","select","formatParts","parts","indexOf","isInteger","mode","limit","oldDate","limitDate","newValue","candidateSelectors","candidateSelector","NoElement","Element","prototype","msMatchesSelector","webkitMatchesSelector","getRootNode","_element$getRootNode","ownerDocument","isInert","node","lookUp","_node$getAttribute","inertAtt","getAttribute","inert","parentNode","isContentEditable","_node$getAttribute2","attValue","getCandidates","includeContainer","candidates","slice","apply","unshift","getCandidatesIteratively","elements","elementsToCheck","tagName","assigned","assignedElements","children","nestedCandidates","flatten","scopeParent","validCandidate","shadowRoot","getShadowRoot","validShadowRoot","shadowRootFilter","_nestedCandidates","hasTabIndex","parseInt","getTabIndex","tabIndex","getSortOrderTabIndex","isScope","sortOrderedTabbables","documentOrder","isInput","isHiddenInput","isDetailsWithSummary","r","some","child","getCheckedRadio","nodes","form","isTabbableRadio","radioScope","queryRadios","radioSet","escape","console","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","contains","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","getBoundingClientRect","width","height","isHidden","_ref","displayCheck","getComputedStyle","visibility","isDirectSummary","nodeUnderDetails","parentElement","originalNode","rootNode","assignedSlot","getClientRects","isDisabledFromFieldset","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isValidShadowRootTabbable","shadowHostNode","sortByOrder","regularTabbables","orderedTabbables","candidateTabindex","sort","reduce","acc","sortable","tabbable","container","focusable","isTabbable","focusableCandidateSelector","isFocusable","firstTabbable","catDateInlineCss","CatDateInlineStyle0","CatDateInline","focusDate","focusedDate","all","dataset","startDate","endDate","getValue","componentDidRender","onKeyDown","shiftKey","minDate","maxDate","getMinMaxDate","range","toRangeValue","dateStart","viewDate","dateGrid","dateEnd","FocusIn","setAriaLive","hidden","startsWith","picker","navigate","getHeadline","onFocusin","_","title","getWeekNumber","isStartDate","isEndDate","isRange","isToday","isWeekend","getDay","canFocus","canClick","tabindex","noToday","direction","period","setFullYear","text","innerHTML","daysOffset","daysInMonth","daysBefore","getLastDaysOfMonth","daysAfter","x","lastDayOfMonth","daysOfMonth","iso8601","currentDate","dayNum","yearStart","ceil","minDay","JSON","stringify","HOOKS","defaults","_disable","allowInput","allowInvalidPreload","altFormat","altInput","altInputClass","animate","ariaDateFormat","autoFillDefaultTime","clickOpens","closeOnSelect","conjunction","dateFormat","defaultHour","defaultMinute","defaultSeconds","disable","disableMobile","enableSeconds","enableTime","errorHandler","warn","getWeek","givenDate","setHours","week1","hourIncrement","ignoredFocusElements","inline","minuteIncrement","monthSelectorType","nextArrow","noCalendar","onChange","onClose","onDayCreate","onDestroy","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition","plugins","position","positionElement","prevArrow","shorthandCurrentMonth","showMonths","static","time_24hr","weekNumbers","wrap","english","weekdays","shorthand","longhand","ordinal","nth","rangeSeparator","weekAbbreviation","scrollTitle","toggleTitle","amPM","yearAriaLabel","monthAriaLabel","hourAriaLabel","minuteAriaLabel","pad","number","int","bool","wait","_this","clearTimeout","setTimeout","arrayify","obj","toggleClass","elem","className","classList","tag","textContent","clearNode","firstChild","removeChild","findParent","condition","createNumberInput","inputClassName","opts","wrapper","numInput","arrowUp","arrowDown","pattern","getEventTarget","composedPath","path","doNothing","monthToStr","monthNumber","revFormat","D","F","dateObj","monthName","G","hour","getHours","parseFloat","H","J","K","RegExp","M","shortMonth","S","seconds","setSeconds","U","unixSeconds","W","weekNum","weekNumber","Y","Z","ISODate","d","minutes","setMinutes","j","u","unixMillSeconds","w","y","tokenRegex","formats","toISOString","getSeconds","getMinutes","substring","createDateFormatter","config","_c","l10n","_d","isMobile","frmt","overrideLocale","formatDate","c","arr","createDateParser","givenFormat","timeless","customLocale","parsedDate","dateOrig","toFixed","datestr","trim","parseDate","matched","ops","matchIndex","regexStr","token","isBackSlash","escaped","val","compareDates","isBetween","ts","ts1","ts2","calculateSecondsSinceMidnight","hours","parseSeconds","secondsSinceMidnight","floor","DAY","getDefaultHours","minHour","minMinutes","minSeconds","maxHr","maxMinutes","assign","_i","_loop_1","args_1","__assign","p","hasOwnProperty","__spreadArrays","il","k","jl","DEBOUNCED_CHANGE_MS","FlatpickrInstance","instanceConfig","self","defaultOptions","flatpickr","defaultConfig","English","_handlers","pluginElements","loadedPlugins","_bind","_setHoursFromDate","setHoursFromDate","_positionCalendar","positionCalendar","changeMonth","changeYear","close","onMouseOver","_createElement","createDay","destroy","isEnabled","jumpToDate","updateValue","open","redraw","set","toggle","setupHelperFunctions","utils","getDaysInMonth","yr","currentMonth","currentYear","init","isOpen","parseConfig","setupLocale","setupInputs","setupDates","build","bindEvents","selectedDates","latestSelectedDateObj","setCalendarWidth","isSafari","triggerEvent","getClosestActiveElement","calendarContainer","activeElement","bindToInstance","requestAnimationFrame","display","daysContainer","daysWidth","offsetWidth","weekWrapper","removeProperty","updateTime","defaultDate","getMilliseconds","timeWrapper","prevValue","_input","setHoursFromInputs","_debouncedChange","ampm2military","military2ampm","hourElement","minuteElement","secondElement","limitMinHours","minTime","minDateHasTime","limitMaxHours","maxTime","maxDateHasTime","minBound","maxBound","currentTime","onYearInput","eventTarget","delta","ev","triggerChange","evt","setupMobile","debouncedResize","onResize","ontouchstart","documentClick","capture","monthNav","onMonthNavClick","selectDate","timeContainer","selText","timeIncrement","jumpDate","jumpTo","oldYear","oldMonth","buildMonthSwitch","incrementNumInput","inputElem","createEvent","dispatchEvent","fragment","createDocumentFragment","buildMonthNav","innerContainer","buildWeeks","rContainer","buildWeekdays","buildDays","buildTime","customAppend","appendTo","nodeType","insertBefore","nextSibling","body","_dayNumber","dateIsEnabled","dayElement","$i","todayDateElem","isDateSelected","selectedDateElem","isDateInRange","insertAdjacentHTML","focusOnDayElem","targetNode","getFirstAvailableDay","startMonth","endMonth","startIndex","endIndex","getNextAvailableDay","current","givenMonth","loopDelta","numMonthDays","abs","focusOnDay","offset","dayFocused","isInView","startElem","buildMonthDays","firstOfMonth","prevMonthDays","isMultiMonth","prevMonthDayClass","nextMonthDayClass","dayNumber","dayIndex","dayContainer","frag","shouldBuildMonth","monthsDropdownContainer","selected","buildMonth","monthNavFragment","monthElement","selectedMonth","yearInput","yearElement","getElementsByTagName","buildMonths","prevMonthNav","yearElements","monthElements","nextMonthNav","defineProperty","__hidePrevMonthArrow","__hideNextMonthArrow","currentYearElement","updateNavigationCurrentMonth","separator","hourInput","minuteInput","secondInput","weekdayContainer","updateWeekdays","splice","isOffset","_hidePrevMonthArrow","_hideNextMonthArrow","triggerChangeEvent","toInitial","mobileInput","_initialDate","lastChild","_type","removeAttribute","isCalendarElem","eventTarget_1","isCalendarElement","lostFocus","relatedTarget","isIgnored","newYear","newYearNum","isNewYear","dateToCheck","enable","array","parsed","to","valueChanged","trimEnd","getDateStr","allowKeydown","allowInlineKeydown","keyCode","isTimeObj","focusAndClose","delta_1","ctrlKey","elems","charAt","toLowerCase","cellClass","hoverDate","firstElementChild","initialDate","rangeStartDate","rangeEndDate","containsDisabled","minRange","maxRange","hoverableCells","dayElem","timestamp","outOfRange","_positionElement","wasOpen","minMaxDateSetter","inverseDateObj","boolOpts","userConfig","_enable","dates","parseDateRules","timeMode","defaultDateFormat","defaultAltFormat","_minDate","_maxDate","minMaxTimeSetter","_minTime","_maxTime","hook","pluginConf","getInputElem","l10ns","default","customPositionElement","calendarHeight","offsetHeight","calendarWidth","configPos","configPosVertical","configPosHorizontal","inputBounds","distanceFromBottom","innerHeight","bottom","showOnTop","top","pageYOffset","left","pageXOffset","isCenter","isRight","right","rightMost","centerMost","doc","getDocumentStyleSheet","bodyWidth","centerLeft","centerBefore","centerAfter","centerIndex","cssRules","centerStyle","editableSheet","styleSheets","createStyleSheet","msMaxTouchPoints","isSelectable","selectedDate","shouldChangeMonth","selectedIndex","single","CALLBACKS","updatePositionElement","option","setSelectedDate","inputDate","rule","preloadedDate","nodeName","inputType","mobileFormatStr","step","data","hooks","initEvent","specificFormat","dObj","isPrevMonth","isNextMonth","isKeyDown","curValue","which","isHourElem","isMinuteElem","_flatpickr","nodeList","HTMLElement","instances","HTMLCollection","NodeList","Node","en","localize","setDefaults","jQuery","fp_incr","findClosest","nextElement","ShadowRoot","global","factory","module","exports","weekSelectPlugin","fp","onDayHover","childNodes","dayIndSeven","weekStartDay","weekEndDay","day_1","highlightWeek","selDate","clearHover","getConfig","more","_dates","_dateStr","nativePickerAttributes","instance","dateStr","start","end","applyChange","formatTime","minute","time","datetime","daterange","getHour12","getFirstDayOfWeek","daysForLocale","monthsForLocale","sides","alignments","placements","side","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","evaluate","param","getSide","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","reference","floating","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","computeCoordsFromPlacement","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","computePosition","strategy","middleware","platform","validMiddleware","isRTL","getElementRects","statefulPlacement","middlewareData","resetCount","nextX","nextY","reset","initialPlacement","detectOverflow","_await$platform$isEle","boundary","rootBoundary","elementContext","altBoundary","paddingObject","altContext","clippingClientRect","getClippingRect","isElement","contextElement","getDocumentElement","offsetParent","getOffsetParent","offsetScale","getScale","elementClientRect","convertOffsetParentRelativeRectToViewportRelativeRect","arrow","arrowDimensions","getDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","shouldAddOffset","alignmentOffset","centerOffset","getPlacementList","autoAlignment","allowedPlacements","allowedPlacementsSortedByAlignment","autoPlacement","_middlewareData$autoP","_middlewareData$autoP2","_placementsThatFitOnE","crossAxis","detectOverflowOptions","placements$1","overflow","currentIndex","currentPlacement","alignmentSides","currentOverflows","allOverflows","overflows","nextPlacement","placementsSortedByMostSpace","placementsThatFitOnEachSide","every","resetPlacement","flip","_middlewareData$arrow","_middlewareData$flip","mainAxis","checkMainAxis","checkCrossAxis","fallbackPlacements","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","isBasePlacement","overflowsData","_middlewareData$flip2","_overflowsData$filter","nextIndex","_overflowsData$map$so","getSideOffsets","isAnySideFullyClipped","hide","offsets","referenceHiddenOffsets","referenceHidden","escapedOffsets","getBoundingRect","minX","minY","maxX","maxY","getRectsByLine","sortedRects","groups","prevRect","nativeClientRects","clientRects","fallback","find","firstRect","lastRect","isTop","isLeftSide","maxRight","minLeft","measureRects","resetRects","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","_middlewareData$offse","diffCoords","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","limitShift","rawOffset","computedOffset","len","limitMin","limitMax","_middlewareData$offse2","isOriginSide","heightSide","widthSide","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","maximumClippingWidth","maximumClippingHeight","xMin","xMax","yMin","yMax","nextDimensions","getNodeName","isNode","getWindow","defaultView","documentElement","isHTMLElement","isShadowRoot","isOverflowElement","overflowX","overflowY","isTableElement","isContainingBlock","webkit","isWebKit","css","transform","perspective","containerType","backdropFilter","willChange","contain","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","supports","getNodeScroll","scrollLeft","scrollTop","getNearestOverflowAncestor","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","visualViewport","frameElement","getCssDimensions","hasOffset","shouldFallback","$","unwrapElement","domElement","isFinite","noOffsets","getVisualOffsets","offsetLeft","offsetTop","shouldAddVisualOffsets","isFixed","floatingOffsetParent","includeScale","isFixedStrategy","clientRect","scale","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","clientLeft","paddingLeft","clientTop","paddingTop","topLayerSelectors","isTopLayer","topLayer","scroll","isOffsetParentAnElement","offsetRect","getWindowScrollBarX","getDocumentRect","html","scrollWidth","clientWidth","scrollHeight","clientHeight","getViewportRect","visualViewportBased","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","shouldDropCurrentNode","ancestor","elementClippingAncestors","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getRectRelativeToOffsetParent","isStaticPositioned","getTrueOffsetParent","polyfill","svgOffsetParent","getOffsetParentFn","getDimensionsFn","floatingDimensions","observeMove","onMove","io","timeoutId","root","cleanup","_io","disconnect","refresh","skip","threshold","insetTop","insetRight","insetBottom","insetLeft","rootMargin","isFirstUpdate","handleObserve","ratio","intersectionRatio","IntersectionObserver","observe","autoUpdate","update","ancestorScroll","ancestorResize","elementResize","ResizeObserver","layoutShift","animationFrame","referenceEl","ancestors","passive","cleanupIo","reobserveFrame","resizeObserver","firstEntry","unobserve","cancelAnimationFrame","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","offset$1","autoPlacement$1","shift$1","flip$1","size$1","hide$1","arrow$1","inline$1","limitShift$1","mergedOptions","platformWithCache","computePosition$1","catDatepickerCss","CatDatepickerStyle0","CatDatepickerFlat","onValueChanged","pickr","onDisabledChanged","initDatepicker","_calendarWrapper","withinDropdown","attachToElement","updatePosition","catDatepickerInlineCss","CatDatepickerInlineStyle0","CatDatepickerInline","timeTransitionS","ownKeys","getOwnPropertySymbols","o","getOwnPropertyDescriptor","enumerable","_objectSpread2","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","configurable","writable","_toPrimitive","prim","Symbol","toPrimitive","res","arg","activeFocusTraps","activateTrap","trapStack","trap","activeTrap","pause","trapIndex","deactivateTrap","unpause","isSelectableInput","isEscapeEvent","isTabEvent","isKeyForward","isKeyBackward","findIndex","idx","valueOrHandler","_len","_key","getActualTarget","internalTrapStack","createFocusTrap","userOptions","returnFocusOnDeactivate","escapeDeactivates","delayInitialFocus","containers","containerGroups","tabbableGroups","nodeFocusedBeforeActivation","mostRecentlyFocusedNode","paused","delayInitialFocusTimer","recentNavEvent","getOption","configOverrideOptions","optionName","configOptionName","findContainerIndex","tabbableNodes","getNodeForOption","optionValue","_len2","_key2","getInitialFocusNode","tabbableOptions","firstTabbableGroup","firstTabbableNode","updateTabbableNodes","focusableNodes","lastTabbableNode","firstDomTabbableNode","lastDomTabbableNode","reverse","posTabIndexesFound","nextTabbableNode","forward","nodeIdx","group","g","getActiveElement","tryFocus","preventScroll","getReturnFocusNode","previousActiveElement","findNextNavNode","_ref2","_ref2$isBackward","isBackward","destinationNode","containerIndex","containerGroup","startOfGroupIndex","_ref3","destinationGroupIndex","destinationGroup","lastOfGroupIndex","_ref4","_destinationGroupIndex","_destinationGroup","checkPointerDown","clickOutsideDeactivates","deactivate","returnFocus","allowOutsideClick","checkFocusIn","targetContained","Document","nextNode","navAcrossContainers","mruContainerIdx","mruTabIdx","checkKeyNav","checkKey","checkClick","addListeners","removeListeners","checkDomRemoval","mutations","isFocusedNodeRemoved","mutation","removedNodes","mutationObserver","MutationObserver","updateObservedNodes","subtree","childList","activate","activateOptions","onActivate","onPostActivate","checkCanFocusTrap","finishActivation","deactivateOptions","onDeactivate","onPostDeactivate","checkCanReturnFocus","finishDeactivation","pauseOptions","onPause","onPostPause","unpauseOptions","onUnpause","onPostUnpause","updateContainerElements","containerElements","elementsAsArray","catDropdownCss","CatDropdownStyle0","CatDropdown","clickHandler","trigger","initTrigger","noAutoClose","focusTrap.createFocusTrap","catOpen","setReturnFocus","noReturnFocus","initialFocus","noInitialFocus","catClose","anchorSlot","triggerSlot","contentId","initAnchor","findTrigger","anchor","anchorElement","resize","OFFSET","maxWidth","maxHeight","catFormGroupCss","CatFormGroupStyle0","CatFormGroup","onRequiredMarkerChanged","newRequiredMarker","updateMarker","calculate","endsWith","onHorizontalChanged","newHorizontal","labelSize","optionalFields","requiredFields","catIconCss","CatIconStyle0","CatIcon","iconSrc","icons","getIcon","commonjsGlobal","NumeralFormatter","numeralDecimalMark","numeralIntegerScale","numeralDecimalScale","numeralThousandsGroupStyle","numeralPositiveOnly","stripLeadingZeroes","prefix","signBeforePrefix","tailPrefix","owner","groupStyle","thousand","delimiterRE","lakh","wan","none","getRawValue","partSign","partSignAndPrefix","partInteger","partDecimal","NumeralFormatter_1","DateFormatter","blocks","initBlocks","getISOFormatDate","addLeadingZero","getBlocks","getValidatedDate","sub","sub0","rest","getFixedDateString","monthIndex","yearIndex","dayStartIndex","monthStartIndex","yearStartIndex","fullYearDone","getFixedDate","getRangeFixedDate","previous","addLeadingZeroForYear","fullYearMode","DateFormatter_1","TimeFormatter","timePattern","timeFormat","getISOFormatTime","getTimeFormatOptions","maxHourFirstDigit","maxHours","maxMinutesFirstDigit","getValidatedTime","timeFormatOptions","getFixedTimeString","secondIndex","minuteIndex","hourIndex","secondStartIndex","minuteStartIndex","hourStartIndex","second","getFixedTime","TimeFormatter_1","PhoneFormatter","formatter","setFormatter","phoneNumber","validated","iMax","inputDigit","PhoneFormatter_1","CreditCardDetector","uatp","amex","diners","discover","mastercard","dankort","instapayment","jcb15","jcb","maestro","visa","mir","unionPay","general","re","getStrictBlocks","block","total","prev","getInfo","strictMode","matchedBlocks","CreditCardDetector_1","Util","strip","getPostDelimiter","delimiters","matchedDelimiter","getDelimiterREByDelimiter","getNextCursorPosition","prevPos","getPositionOffset","oldRawValue","newRawValue","lengthOffset","stripDelimiters","letter","headStr","str","getMaxLength","getPrefixStrippedValue","prefixLength","prevResult","noImmediatePrefix","getFirstDiffIndex","getFormattedValue","blocksLength","delimiterLazyShow","multipleDelimiters","currentDelimiter","fixPrefixCursor","appendix","setSelectionRange","checkFullSelection","selection","getSelection","ex","setSelection","createTextRange","move","parent","isAndroid","isAndroidBackspaceKeydown","lastInputValue","currentInputValue","Util_1","DefaultProperties","creditCard","creditCardStrictMode","creditCardType","onCreditCardTypeChanged","phone","phoneRegionCode","phoneFormatter","timeFormatter","dateFormatter","numeral","swapHiddenInput","numericOnly","uppercase","lowercase","rawValueTrimPrefix","copyDelimiter","initValue","delimiterLength","maxLength","backspace","DefaultProperties_1","Cleave","hasMultipleElements","properties","pps","onChangeListener","onKeyDownListener","onFocusListener","onCutListener","onCut","onCopyListener","onCopy","initSwapHiddenInput","initPhoneFormatter","initDateFormatter","initTimeFormatter","initNumeralFormatter","inputFormatter","cloneNode","elementSwapHidden","numeralFormatter","AsYouTypeFormatter","charCode","postDelimiter","postDelimiterBackspace","copyClipboardData","textToCopy","clipboardData","setData","postDelimiterAfter","updateValueState","toUpperCase","updateCreditCardPropsByValue","creditCardInfo","endPos","selectionEnd","callOnValueChanged","setPhoneRegionCode","setRawValue","Cleave_1","coerceBoolean","coerceNumber","fallbackValue","isNumberValue","catInputCss","CatInputStyle0","CatInput","onErrorsChanged","findSiblingInput","errorMapSrc","showErrorsIfTimeout","showErrorsIfNoFocus","invalid","togglePassword","autocomplete","maxlength","minlength","minLength","isPasswordShown","doTogglePassword","showErrors","errorUpdateTimeoutId","hasFocus","HTMLInputElement","catPaginationCss","CatPaginationStyle0","CatPagination","isFirst","iconPrev","setPage","page","isLast","iconNext","pageCount","pages","sidePadding","activePadding","minPage","minActivepage","maxPage","maxActivepage","addSeq","_start","_end","fill","num","compact","catRadioCss","CatRadioStyle0","CatRadio","catRadioGroupCss","CatRadioGroupStyle0","CatRadioGroup","catRadioGroup","onNameChanged","newName","catRadio","updateTabIndex","onLabelLeftChanged","attributes","disconnectedCallback","onKeydown","targetElements","activeIdx","activeOff","targetIdx","radio","localName","checkedRadioIndex","catScrollableCss","CatScrollableStyle0","CatScrollable","destroyed","resizedEntries","resizedObserver","scrollElement","scrolled","scrollWrapperElement","attachEmitter","scrolledLeft","scrolledRight","scrolledBottom","scrolledTop","THROTTLE","getScrollOffset","noScrolledInit","noShadowY","noShadowX","noOverflowX","noOverflowY","noOverscroll","emitter","scrolledBuffer","isLower","GHOST_ELEMENT_ID","characterEntities","mapSpecialCharacterToCharacterEntity","specialCharacter","escapeSpecialCharacters","string","createGhostElement","ghostElement","cssText","autosizeInput","elementStyle","elementCssText","boxSizing","borderLeftWidth","borderRightWidth","fontFamily","fontFeatureSettings","fontKerning","fontSize","fontStretch","fontStyle","fontVariant","fontVariantCaps","fontVariantLigatures","fontVariantNumeric","fontWeight","letterSpacing","marginLeft","marginRight","paddingRight","textIndent","textTransform","setWidth","getElementById","minWidth","catSelectCss","CatSelectStyle0","INIT_STATE","term","isLoading","isResolving","tempSelection","activeOptionIndex","activeSelectionIndex","nextTagUniqueId","CatSelect","term$","more$","valueChangedBySelection","onConnectorChanged","connector","onStateChanged","newState","oldState","changed","dropdown","scrollIntoView","multiple","idsSelected","tags","ids","createTag","patchState","isInputFocused","onArrowKeyDown","toggleTag","selectionStart","deselect","selectionClone","pop","onKeyUp","show","clearButton","clearInput","connect","number$","subscription","of","retrieve","totalElements","last","items","toSelectItems","value1","isTagSelected","isPillboxActive","activeDescendant","pill","onCatClick","onScrolledBottom","optionsList","SKELETON_COUNT","lines","noItems","isTagOption","isOptionSelected","isSelected","getLabel","tagTextHelp","description","initIds","initTags","data$","customId","search","newSelection","setTransparentCaret","removeTag","DROPDOWN_OFFSET","tagHint","CatSelectTest","multipleSelect","firstName","lastName","desc","user","multipleSelectAvatar","random","multipleSelectAvatarInitials","multipleSelectTagging","countryConnector","singleSelect","singleSelectAvatar","singleSelectAvatarInitials","country","capital","singleSelectTagging","flexDirection","countries","catSkeletonCss","CatSkeletonStyle0","CatSkeleton","skeleton","effect","catSpinnerCss","CatSpinnerStyle0","CatSpinner","xmlns","cx","cy","catTabCss","CatTabStyle0","CatTab","catTabsCss","CatTabsStyle0","CatTabs","syncTabs","onActiveTabChange","tabs","tab","setActive","setActiveIndex","activeTab","deactivated","canActivate","testForHeightReduction","restoreTextAlign","delete","textAlign","wordWrap","scrollBehavior","paddingBottom","borderTopWidth","borderBottomWidth","Event","bubbles","catTextareaCss","CatTextareaStyle0","CatTextarea","autosize","textarea","rows","formatIso","clampTime","hhMin","mmMin","hhMax","mmMax","isBefore","hh","mm","isAfter","catTimeCss","CatTimeStyle0","CatTime","syncValue","selectionTime","elem1","elem2","isAm","toggleAm","timeArray","isoTime","includeAmPm","catToggleCss","CatToggleStyle0","CatToggle","isTouchDevice","maxTouchPoints","catTooltipCss","CatTooltipStyle0","CatTooltip","hostRef","inactive","boundShowListener","showListener","boundHideListener","hideListener","boundWindowTouchStartListener","windowTouchStartListener","boundTouchStartListener","touchStartListener","boundTouchEndListener","touchEndListener","handleKeyDown","hideTooltip","isTouchScreen","tooltip","SHIFT_PADDING","hideTimeout","showTimeout","showTooltip","showDelay","hideDelay","touchTimeout","longTouchDuration","cleanupFloatingUi"],"sources":["../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/ObjectUnsubscribedError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/Subject.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/dateTimestampProvider.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/Action.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/intervalProvider.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/AsyncAction.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/Scheduler.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/AsyncScheduler.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/scheduler/async.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/empty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/EmptyError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/isDate.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/map.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/util/mapOneOrManyArgs.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeInternals.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeMap.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mergeAll.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/concatAll.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/concat.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/fromEvent.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/timer.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/observable/merge.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/filter.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/audit.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/auditTime.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/catchError.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/scanInternals.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/debounce.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/defaultIfEmpty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/take.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/ignoreElements.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/mapTo.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/delayWhen.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/delay.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/distinctUntilChanged.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/throwIfEmpty.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/first.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/scan.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/startWith.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/switchMap.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/takeUntil.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/takeWhile.js","../node_modules/.pnpm/rxjs@7.8.1/node_modules/rxjs/dist/esm/internal/operators/tap.js","src/utils/setDefault.ts","src/components/cat-alert/cat-alert.scss?tag=cat-alert&encapsulation=shadow","src/components/cat-alert/cat-alert.tsx","src/utils/load-img.ts","src/components/cat-avatar/cat-avatar.scss?tag=cat-avatar&encapsulation=shadow","src/components/cat-avatar/cat-avatar.tsx","src/components/cat-badge/cat-badge.scss?tag=cat-badge&encapsulation=shadow","src/components/cat-badge/cat-badge.tsx","src/utils/breakpoints.ts","src/utils/platform.ts","src/utils/media-matcher.ts","src/components/cat-button/cat-button.scss?tag=cat-button&encapsulation=shadow","src/components/cat-button/cat-button.tsx","src/components/cat-button-group/cat-button-group.scss?tag=cat-button-group&encapsulation=shadow","src/components/cat-button-group/cat-button-group.tsx","src/components/cat-card/cat-card.scss?tag=cat-card&encapsulation=shadow","src/components/cat-card/cat-card.tsx","src/components/cat-form-hint/cat-form-hint.tsx","src/components/cat-checkbox/cat-checkbox.scss?tag=cat-checkbox&encapsulation=shadow","src/components/cat-checkbox/cat-checkbox.tsx","src/components/cat-date-inline/cat-date-locale.ts","src/components/cat-date-inline/cat-date-math.ts","src/components/cat-date/cat-date.scss?tag=cat-date&encapsulation=shadow","src/components/cat-date/cat-date.tsx","../node_modules/.pnpm/tabbable@6.2.0/node_modules/tabbable/dist/index.esm.js","src/utils/first-tabbable.ts","src/components/cat-date-inline/cat-date-inline.scss?tag=cat-date-inline&encapsulation=shadow","src/components/cat-date-inline/cat-date-inline.tsx","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/types/options.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/l10n/default.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/index.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/dom.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/formatting.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/dates.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/utils/polyfills.js","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/esm/index.js","src/utils/find-closest.ts","../node_modules/.pnpm/flatpickr@4.6.13/node_modules/flatpickr/dist/plugins/weekSelect/weekSelect.js","src/components/cat-datepicker/cat-datepicker.config.ts","src/components/cat-datepicker/cat-datepicker.format.ts","src/components/cat-datepicker/cat-datepicker.locale.ts","../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js","../node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js","../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js","../node_modules/.pnpm/@floating-ui+dom@1.6.5/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js","src/components/cat-datepicker/cat-datepicker.scss?tag=cat-datepicker&encapsulation=shadow","src/components/cat-datepicker/cat-datepicker.tsx","src/components/cat-datepicker-inline/cat-datepicker-inline.scss?tag=cat-datepicker-inline&encapsulation=shadow","src/components/cat-datepicker-inline/cat-datepicker-inline.tsx","../tokens/dist/js/variables.js","../node_modules/.pnpm/focus-trap@7.5.4/node_modules/focus-trap/dist/focus-trap.esm.js","src/components/cat-dropdown/cat-dropdown.scss?tag=cat-dropdown&encapsulation=shadow","src/components/cat-dropdown/cat-dropdown.tsx","src/components/cat-form-group/cat-form-group.scss?tag=cat-form-group&encapsulation=shadow","src/components/cat-form-group/cat-form-group.tsx","src/components/cat-icon/cat-icon.scss?tag=cat-icon&encapsulation=shadow","src/components/cat-icon/cat-icon.tsx","../node_modules/.pnpm/cleave.js@1.6.0/node_modules/cleave.js/dist/cleave-esm.js","src/utils/coerce.ts","src/components/cat-input/cat-input.scss?tag=cat-input&encapsulation=shadow","src/components/cat-input/cat-input.tsx","src/components/cat-pagination/cat-pagination.scss?tag=cat-pagination&encapsulation=shadow","src/components/cat-pagination/cat-pagination.tsx","src/components/cat-radio/cat-radio.scss?tag=cat-radio&encapsulation=shadow","src/components/cat-radio/cat-radio.tsx","src/components/cat-radio-group/cat-radio-group.scss?tag=cat-radio-group&encapsulation=shadow","src/components/cat-radio-group/cat-radio-group.tsx","src/components/cat-scrollable/cat-scrollable.scss?tag=cat-scrollable&encapsulation=shadow","src/components/cat-scrollable/cat-scrollable.tsx","../node_modules/.pnpm/autosize-input@1.0.2/node_modules/autosize-input/index.js","src/components/cat-select/cat-select.scss?tag=cat-select&encapsulation=shadow","src/components/cat-select/cat-select.tsx","src/components/cat-select-demo/cat-select-demo.tsx","src/components/cat-skeleton/cat-skeleton.scss?tag=cat-skeleton&encapsulation=shadow","src/components/cat-skeleton/cat-skeleton.tsx","src/components/cat-spinner/cat-spinner.scss?tag=cat-spinner&encapsulation=shadow","src/components/cat-spinner/cat-spinner.tsx","src/components/cat-tab/cat-tab.scss?tag=cat-tab&encapsulation=shadow","src/components/cat-tab/cat-tab.tsx","src/components/cat-tabs/cat-tabs.scss?tag=cat-tabs&encapsulation=shadow","src/components/cat-tabs/cat-tabs.tsx","../node_modules/.pnpm/autosize@6.0.1/node_modules/autosize/dist/autosize.esm.js","src/components/cat-textarea/cat-textarea.scss?tag=cat-textarea&encapsulation=shadow","src/components/cat-textarea/cat-textarea.tsx","src/components/cat-time/cat-time-locale.ts","src/components/cat-time/cat-time-math.ts","src/components/cat-time/cat-time.scss?tag=cat-time&encapsulation=shadow","src/components/cat-time/cat-time.tsx","src/components/cat-toggle/cat-toggle.scss?tag=cat-toggle&encapsulation=shadow","src/components/cat-toggle/cat-toggle.tsx","src/utils/is-touch-screen.ts","src/components/cat-tooltip/cat-tooltip.scss?tag=cat-tooltip&encapsulation=shadow","src/components/cat-tooltip/cat-tooltip.tsx"],"sourcesContent":["import { createErrorClass } from './createErrorClass';\nexport const ObjectUnsubscribedError = createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nexport class Subject extends Observable {\n constructor() {\n super();\n this.closed = false;\n this.currentObservers = null;\n this.observers = [];\n this.isStopped = false;\n this.hasError = false;\n this.thrownError = null;\n }\n lift(operator) {\n const subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n }\n _throwIfClosed() {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n }\n next(value) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n if (!this.currentObservers) {\n this.currentObservers = Array.from(this.observers);\n }\n for (const observer of this.currentObservers) {\n observer.next(value);\n }\n }\n });\n }\n error(err) {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.hasError = this.isStopped = true;\n this.thrownError = err;\n const { observers } = this;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n }\n complete() {\n errorContext(() => {\n this._throwIfClosed();\n if (!this.isStopped) {\n this.isStopped = true;\n const { observers } = this;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n }\n unsubscribe() {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n }\n get observed() {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n }\n _trySubscribe(subscriber) {\n this._throwIfClosed();\n return super._trySubscribe(subscriber);\n }\n _subscribe(subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n }\n _innerSubscribe(subscriber) {\n const { hasError, isStopped, observers } = this;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(() => {\n this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n }\n _checkFinalizedStatuses(subscriber) {\n const { hasError, thrownError, isStopped } = this;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n }\n asObservable() {\n const observable = new Observable();\n observable.source = this;\n return observable;\n }\n}\nSubject.create = (destination, source) => {\n return new AnonymousSubject(destination, source);\n};\nexport class AnonymousSubject extends Subject {\n constructor(destination, source) {\n super();\n this.destination = destination;\n this.source = source;\n }\n next(value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n }\n error(err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n }\n complete() {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n }\n _subscribe(subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n }\n}\n//# sourceMappingURL=Subject.js.map","export const dateTimestampProvider = {\n now() {\n return (dateTimestampProvider.delegate || Date).now();\n },\n delegate: undefined,\n};\n//# sourceMappingURL=dateTimestampProvider.js.map","import { Subscription } from '../Subscription';\nexport class Action extends Subscription {\n constructor(scheduler, work) {\n super();\n }\n schedule(state, delay = 0) {\n return this;\n }\n}\n//# sourceMappingURL=Action.js.map","export const intervalProvider = {\n setInterval(handler, timeout, ...args) {\n const { delegate } = intervalProvider;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setInterval) {\n return delegate.setInterval(handler, timeout, ...args);\n }\n return setInterval(handler, timeout, ...args);\n },\n clearInterval(handle) {\n const { delegate } = intervalProvider;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearInterval) || clearInterval)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=intervalProvider.js.map","import { Action } from './Action';\nimport { intervalProvider } from './intervalProvider';\nimport { arrRemove } from '../util/arrRemove';\nexport class AsyncAction extends Action {\n constructor(scheduler, work) {\n super(scheduler, work);\n this.scheduler = scheduler;\n this.work = work;\n this.pending = false;\n }\n schedule(state, delay = 0) {\n var _a;\n if (this.closed) {\n return this;\n }\n this.state = state;\n const id = this.id;\n const scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = (_a = this.id) !== null && _a !== void 0 ? _a : this.requestAsyncId(scheduler, this.id, delay);\n return this;\n }\n requestAsyncId(scheduler, _id, delay = 0) {\n return intervalProvider.setInterval(scheduler.flush.bind(scheduler, this), delay);\n }\n recycleAsyncId(_scheduler, id, delay = 0) {\n if (delay != null && this.delay === delay && this.pending === false) {\n return id;\n }\n if (id != null) {\n intervalProvider.clearInterval(id);\n }\n return undefined;\n }\n execute(state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n const error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n }\n _execute(state, _delay) {\n let errored = false;\n let errorValue;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = e ? e : new Error('Scheduled action threw falsy error');\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n }\n unsubscribe() {\n if (!this.closed) {\n const { id, scheduler } = this;\n const { actions } = scheduler;\n this.work = this.state = this.scheduler = null;\n this.pending = false;\n arrRemove(actions, this);\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n super.unsubscribe();\n }\n }\n}\n//# sourceMappingURL=AsyncAction.js.map","import { dateTimestampProvider } from './scheduler/dateTimestampProvider';\nexport class Scheduler {\n constructor(schedulerActionCtor, now = Scheduler.now) {\n this.schedulerActionCtor = schedulerActionCtor;\n this.now = now;\n }\n schedule(work, delay = 0, state) {\n return new this.schedulerActionCtor(this, work).schedule(state, delay);\n }\n}\nScheduler.now = dateTimestampProvider.now;\n//# sourceMappingURL=Scheduler.js.map","import { Scheduler } from '../Scheduler';\nexport class AsyncScheduler extends Scheduler {\n constructor(SchedulerAction, now = Scheduler.now) {\n super(SchedulerAction, now);\n this.actions = [];\n this._active = false;\n }\n flush(action) {\n const { actions } = this;\n if (this._active) {\n actions.push(action);\n return;\n }\n let error;\n this._active = true;\n do {\n if ((error = action.execute(action.state, action.delay))) {\n break;\n }\n } while ((action = actions.shift()));\n this._active = false;\n if (error) {\n while ((action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n }\n}\n//# sourceMappingURL=AsyncScheduler.js.map","import { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport const asyncScheduler = new AsyncScheduler(AsyncAction);\nexport const async = asyncScheduler;\n//# sourceMappingURL=async.js.map","import { Observable } from '../Observable';\nexport const EMPTY = new Observable((subscriber) => subscriber.complete());\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable((subscriber) => scheduler.schedule(() => subscriber.complete()));\n}\n//# sourceMappingURL=empty.js.map","import { createErrorClass } from './createErrorClass';\nexport const EmptyError = createErrorClass((_super) => function EmptyErrorImpl() {\n _super(this);\n this.name = 'EmptyError';\n this.message = 'no elements in sequence';\n});\n//# sourceMappingURL=EmptyError.js.map","export function isValidDate(value) {\n return value instanceof Date && !isNaN(value);\n}\n//# sourceMappingURL=isDate.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function map(project, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n subscriber.next(project.call(thisArg, value, index++));\n }));\n });\n}\n//# sourceMappingURL=map.js.map","import { map } from \"../operators/map\";\nconst { isArray } = Array;\nfunction callOrApply(fn, args) {\n return isArray(args) ? fn(...args) : fn(args);\n}\nexport function mapOneOrManyArgs(fn) {\n return map(args => callOrApply(fn, args));\n}\n//# sourceMappingURL=mapOneOrManyArgs.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { executeSchedule } from '../util/executeSchedule';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function mergeInternals(source, subscriber, project, concurrent, onBeforeNext, expand, innerSubScheduler, additionalFinalizer) {\n const buffer = [];\n let active = 0;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => {\n if (isComplete && !buffer.length && !active) {\n subscriber.complete();\n }\n };\n const outerNext = (value) => (active < concurrent ? doInnerSub(value) : buffer.push(value));\n const doInnerSub = (value) => {\n expand && subscriber.next(value);\n active++;\n let innerComplete = false;\n innerFrom(project(value, index++)).subscribe(createOperatorSubscriber(subscriber, (innerValue) => {\n onBeforeNext === null || onBeforeNext === void 0 ? void 0 : onBeforeNext(innerValue);\n if (expand) {\n outerNext(innerValue);\n }\n else {\n subscriber.next(innerValue);\n }\n }, () => {\n innerComplete = true;\n }, undefined, () => {\n if (innerComplete) {\n try {\n active--;\n while (buffer.length && active < concurrent) {\n const bufferedValue = buffer.shift();\n if (innerSubScheduler) {\n executeSchedule(subscriber, innerSubScheduler, () => doInnerSub(bufferedValue));\n }\n else {\n doInnerSub(bufferedValue);\n }\n }\n checkComplete();\n }\n catch (err) {\n subscriber.error(err);\n }\n }\n }));\n };\n source.subscribe(createOperatorSubscriber(subscriber, outerNext, () => {\n isComplete = true;\n checkComplete();\n }));\n return () => {\n additionalFinalizer === null || additionalFinalizer === void 0 ? void 0 : additionalFinalizer();\n };\n}\n//# sourceMappingURL=mergeInternals.js.map","import { map } from './map';\nimport { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { mergeInternals } from './mergeInternals';\nimport { isFunction } from '../util/isFunction';\nexport function mergeMap(project, resultSelector, concurrent = Infinity) {\n if (isFunction(resultSelector)) {\n return mergeMap((a, i) => map((b, ii) => resultSelector(a, b, i, ii))(innerFrom(project(a, i))), concurrent);\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return operate((source, subscriber) => mergeInternals(source, subscriber, project, concurrent));\n}\n//# sourceMappingURL=mergeMap.js.map","import { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent = Infinity) {\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map","import { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map","import { concatAll } from '../operators/concatAll';\nimport { popScheduler } from '../util/args';\nimport { from } from './from';\nexport function concat(...args) {\n return concatAll()(from(args, popScheduler(args)));\n}\n//# sourceMappingURL=concat.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { Observable } from '../Observable';\nimport { mergeMap } from '../operators/mergeMap';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isFunction } from '../util/isFunction';\nimport { mapOneOrManyArgs } from '../util/mapOneOrManyArgs';\nconst nodeEventEmitterMethods = ['addListener', 'removeListener'];\nconst eventTargetMethods = ['addEventListener', 'removeEventListener'];\nconst jqueryMethods = ['on', 'off'];\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(mapOneOrManyArgs(resultSelector));\n }\n const [add, remove] = isEventTarget(target)\n ? eventTargetMethods.map((methodName) => (handler) => target[methodName](eventName, handler, options))\n :\n isNodeStyleEventEmitter(target)\n ? nodeEventEmitterMethods.map(toCommonHandlerRegistry(target, eventName))\n : isJQueryStyleEventEmitter(target)\n ? jqueryMethods.map(toCommonHandlerRegistry(target, eventName))\n : [];\n if (!add) {\n if (isArrayLike(target)) {\n return mergeMap((subTarget) => fromEvent(subTarget, eventName, options))(innerFrom(target));\n }\n }\n if (!add) {\n throw new TypeError('Invalid event target');\n }\n return new Observable((subscriber) => {\n const handler = (...args) => subscriber.next(1 < args.length ? args : args[0]);\n add(handler);\n return () => remove(handler);\n });\n}\nfunction toCommonHandlerRegistry(target, eventName) {\n return (methodName) => (handler) => target[methodName](eventName, handler);\n}\nfunction isNodeStyleEventEmitter(target) {\n return isFunction(target.addListener) && isFunction(target.removeListener);\n}\nfunction isJQueryStyleEventEmitter(target) {\n return isFunction(target.on) && isFunction(target.off);\n}\nfunction isEventTarget(target) {\n return isFunction(target.addEventListener) && isFunction(target.removeEventListener);\n}\n//# sourceMappingURL=fromEvent.js.map","import { Observable } from '../Observable';\nimport { async as asyncScheduler } from '../scheduler/async';\nimport { isScheduler } from '../util/isScheduler';\nimport { isValidDate } from '../util/isDate';\nexport function timer(dueTime = 0, intervalOrScheduler, scheduler = asyncScheduler) {\n let intervalDuration = -1;\n if (intervalOrScheduler != null) {\n if (isScheduler(intervalOrScheduler)) {\n scheduler = intervalOrScheduler;\n }\n else {\n intervalDuration = intervalOrScheduler;\n }\n }\n return new Observable((subscriber) => {\n let due = isValidDate(dueTime) ? +dueTime - scheduler.now() : dueTime;\n if (due < 0) {\n due = 0;\n }\n let n = 0;\n return scheduler.schedule(function () {\n if (!subscriber.closed) {\n subscriber.next(n++);\n if (0 <= intervalDuration) {\n this.schedule(undefined, intervalDuration);\n }\n else {\n subscriber.complete();\n }\n }\n }, due);\n });\n}\n//# sourceMappingURL=timer.js.map","import { mergeAll } from '../operators/mergeAll';\nimport { innerFrom } from './innerFrom';\nimport { EMPTY } from './empty';\nimport { popNumber, popScheduler } from '../util/args';\nimport { from } from './from';\nexport function merge(...args) {\n const scheduler = popScheduler(args);\n const concurrent = popNumber(args, Infinity);\n const sources = args;\n return !sources.length\n ?\n EMPTY\n : sources.length === 1\n ?\n innerFrom(sources[0])\n :\n mergeAll(concurrent)(from(sources, scheduler));\n}\n//# sourceMappingURL=merge.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => predicate.call(thisArg, value, index++) && subscriber.next(value)));\n });\n}\n//# sourceMappingURL=filter.js.map","import { operate } from '../util/lift';\nimport { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function audit(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n let isComplete = false;\n const endDuration = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n isComplete && subscriber.complete();\n };\n const cleanupDuration = () => {\n durationSubscriber = null;\n isComplete && subscriber.complete();\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n lastValue = value;\n if (!durationSubscriber) {\n innerFrom(durationSelector(value)).subscribe((durationSubscriber = createOperatorSubscriber(subscriber, endDuration, cleanupDuration)));\n }\n }, () => {\n isComplete = true;\n (!hasValue || !durationSubscriber || durationSubscriber.closed) && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=audit.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { audit } from './audit';\nimport { timer } from '../observable/timer';\nexport function auditTime(duration, scheduler = asyncScheduler) {\n return audit(() => timer(duration, scheduler));\n}\n//# sourceMappingURL=auditTime.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { operate } from '../util/lift';\nexport function catchError(selector) {\n return operate((source, subscriber) => {\n let innerSub = null;\n let syncUnsub = false;\n let handledResult;\n innerSub = source.subscribe(createOperatorSubscriber(subscriber, undefined, undefined, (err) => {\n handledResult = innerFrom(selector(err, catchError(selector)(source)));\n if (innerSub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n else {\n syncUnsub = true;\n }\n }));\n if (syncUnsub) {\n innerSub.unsubscribe();\n innerSub = null;\n handledResult.subscribe(subscriber);\n }\n });\n}\n//# sourceMappingURL=catchError.js.map","import { createOperatorSubscriber } from './OperatorSubscriber';\nexport function scanInternals(accumulator, seed, hasSeed, emitOnNext, emitBeforeComplete) {\n return (source, subscriber) => {\n let hasState = hasSeed;\n let state = seed;\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const i = index++;\n state = hasState\n ?\n accumulator(state, value, i)\n :\n ((hasState = true), value);\n emitOnNext && subscriber.next(state);\n }, emitBeforeComplete &&\n (() => {\n hasState && subscriber.next(state);\n subscriber.complete();\n })));\n };\n}\n//# sourceMappingURL=scanInternals.js.map","import { operate } from '../util/lift';\nimport { noop } from '../util/noop';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nexport function debounce(durationSelector) {\n return operate((source, subscriber) => {\n let hasValue = false;\n let lastValue = null;\n let durationSubscriber = null;\n const emit = () => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n durationSubscriber = null;\n if (hasValue) {\n hasValue = false;\n const value = lastValue;\n lastValue = null;\n subscriber.next(value);\n }\n };\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n durationSubscriber === null || durationSubscriber === void 0 ? void 0 : durationSubscriber.unsubscribe();\n hasValue = true;\n lastValue = value;\n durationSubscriber = createOperatorSubscriber(subscriber, emit, noop);\n innerFrom(durationSelector(value)).subscribe(durationSubscriber);\n }, () => {\n emit();\n subscriber.complete();\n }, undefined, () => {\n lastValue = durationSubscriber = null;\n }));\n });\n}\n//# sourceMappingURL=debounce.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function defaultIfEmpty(defaultValue) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => {\n if (!hasValue) {\n subscriber.next(defaultValue);\n }\n subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=defaultIfEmpty.js.map","import { EMPTY } from '../observable/empty';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function take(count) {\n return count <= 0\n ?\n () => EMPTY\n : operate((source, subscriber) => {\n let seen = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n if (++seen <= count) {\n subscriber.next(value);\n if (count <= seen) {\n subscriber.complete();\n }\n }\n }));\n });\n}\n//# sourceMappingURL=take.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { noop } from '../util/noop';\nexport function ignoreElements() {\n return operate((source, subscriber) => {\n source.subscribe(createOperatorSubscriber(subscriber, noop));\n });\n}\n//# sourceMappingURL=ignoreElements.js.map","import { map } from './map';\nexport function mapTo(value) {\n return map(() => value);\n}\n//# sourceMappingURL=mapTo.js.map","import { concat } from '../observable/concat';\nimport { take } from './take';\nimport { ignoreElements } from './ignoreElements';\nimport { mapTo } from './mapTo';\nimport { mergeMap } from './mergeMap';\nimport { innerFrom } from '../observable/innerFrom';\nexport function delayWhen(delayDurationSelector, subscriptionDelay) {\n if (subscriptionDelay) {\n return (source) => concat(subscriptionDelay.pipe(take(1), ignoreElements()), source.pipe(delayWhen(delayDurationSelector)));\n }\n return mergeMap((value, index) => innerFrom(delayDurationSelector(value, index)).pipe(take(1), mapTo(value)));\n}\n//# sourceMappingURL=delayWhen.js.map","import { asyncScheduler } from '../scheduler/async';\nimport { delayWhen } from './delayWhen';\nimport { timer } from '../observable/timer';\nexport function delay(due, scheduler = asyncScheduler) {\n const duration = timer(due, scheduler);\n return delayWhen(() => duration);\n}\n//# sourceMappingURL=delay.js.map","import { identity } from '../util/identity';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function distinctUntilChanged(comparator, keySelector = identity) {\n comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;\n return operate((source, subscriber) => {\n let previousKey;\n let first = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const currentKey = keySelector(value);\n if (first || !comparator(previousKey, currentKey)) {\n first = false;\n previousKey = currentKey;\n subscriber.next(value);\n }\n }));\n });\n}\nfunction defaultCompare(a, b) {\n return a === b;\n}\n//# sourceMappingURL=distinctUntilChanged.js.map","import { EmptyError } from '../util/EmptyError';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function throwIfEmpty(errorFactory = defaultErrorFactory) {\n return operate((source, subscriber) => {\n let hasValue = false;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n hasValue = true;\n subscriber.next(value);\n }, () => (hasValue ? subscriber.complete() : subscriber.error(errorFactory()))));\n });\n}\nfunction defaultErrorFactory() {\n return new EmptyError();\n}\n//# sourceMappingURL=throwIfEmpty.js.map","import { EmptyError } from '../util/EmptyError';\nimport { filter } from './filter';\nimport { take } from './take';\nimport { defaultIfEmpty } from './defaultIfEmpty';\nimport { throwIfEmpty } from './throwIfEmpty';\nimport { identity } from '../util/identity';\nexport function first(predicate, defaultValue) {\n const hasDefaultValue = arguments.length >= 2;\n return (source) => source.pipe(predicate ? filter((v, i) => predicate(v, i, source)) : identity, take(1), hasDefaultValue ? defaultIfEmpty(defaultValue) : throwIfEmpty(() => new EmptyError()));\n}\n//# sourceMappingURL=first.js.map","import { operate } from '../util/lift';\nimport { scanInternals } from './scanInternals';\nexport function scan(accumulator, seed) {\n return operate(scanInternals(accumulator, seed, arguments.length >= 2, true));\n}\n//# sourceMappingURL=scan.js.map","import { concat } from '../observable/concat';\nimport { popScheduler } from '../util/args';\nimport { operate } from '../util/lift';\nexport function startWith(...values) {\n const scheduler = popScheduler(values);\n return operate((source, subscriber) => {\n (scheduler ? concat(values, source, scheduler) : concat(values, source)).subscribe(subscriber);\n });\n}\n//# sourceMappingURL=startWith.js.map","import { innerFrom } from '../observable/innerFrom';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function switchMap(project, resultSelector) {\n return operate((source, subscriber) => {\n let innerSubscriber = null;\n let index = 0;\n let isComplete = false;\n const checkComplete = () => isComplete && !innerSubscriber && subscriber.complete();\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n innerSubscriber === null || innerSubscriber === void 0 ? void 0 : innerSubscriber.unsubscribe();\n let innerIndex = 0;\n const outerIndex = index++;\n innerFrom(project(value, outerIndex)).subscribe((innerSubscriber = createOperatorSubscriber(subscriber, (innerValue) => subscriber.next(resultSelector ? resultSelector(value, innerValue, outerIndex, innerIndex++) : innerValue), () => {\n innerSubscriber = null;\n checkComplete();\n })));\n }, () => {\n isComplete = true;\n checkComplete();\n }));\n });\n}\n//# sourceMappingURL=switchMap.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { innerFrom } from '../observable/innerFrom';\nimport { noop } from '../util/noop';\nexport function takeUntil(notifier) {\n return operate((source, subscriber) => {\n innerFrom(notifier).subscribe(createOperatorSubscriber(subscriber, () => subscriber.complete(), noop));\n !subscriber.closed && source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=takeUntil.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function takeWhile(predicate, inclusive = false) {\n return operate((source, subscriber) => {\n let index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n const result = predicate(value, index++);\n (result || inclusive) && subscriber.next(value);\n !result && subscriber.complete();\n }));\n });\n}\n//# sourceMappingURL=takeWhile.js.map","import { isFunction } from '../util/isFunction';\nimport { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nimport { identity } from '../util/identity';\nexport function tap(observerOrNext, error, complete) {\n const tapObserver = isFunction(observerOrNext) || error || complete\n ?\n { next: observerOrNext, error, complete }\n : observerOrNext;\n return tapObserver\n ? operate((source, subscriber) => {\n var _a;\n (_a = tapObserver.subscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n let isUnsub = true;\n source.subscribe(createOperatorSubscriber(subscriber, (value) => {\n var _a;\n (_a = tapObserver.next) === null || _a === void 0 ? void 0 : _a.call(tapObserver, value);\n subscriber.next(value);\n }, () => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.complete) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n subscriber.complete();\n }, (err) => {\n var _a;\n isUnsub = false;\n (_a = tapObserver.error) === null || _a === void 0 ? void 0 : _a.call(tapObserver, err);\n subscriber.error(err);\n }, () => {\n var _a, _b;\n if (isUnsub) {\n (_a = tapObserver.unsubscribe) === null || _a === void 0 ? void 0 : _a.call(tapObserver);\n }\n (_b = tapObserver.finalize) === null || _b === void 0 ? void 0 : _b.call(tapObserver);\n }));\n })\n :\n identity;\n}\n//# sourceMappingURL=tap.js.map","export function setAttributeDefault(\n host: T,\n attr: string,\n value: unknown\n): void {\n if (!host.hostElement.hasAttribute(attr) && value != null) {\n host.hostElement.setAttribute(attr, String(value));\n }\n}\n\nexport function setAttribute(host: T, attr: string, value: unknown): void {\n host.hostElement.setAttribute(attr, String(value));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n:host {\n display: flex;\n gap: 0.5rem;\n padding: 1.25rem;\n border-radius: cat-border-radius('l');\n}\n\n:host([hidden]) {\n display: none;\n}\n\n:host(:focus-visible) {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n}\n\n.content {\n align-self: center;\n width: 100%;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n// ----- theme\n\n@mixin theme($theme) {\n :host([color='#{$theme}']) {\n background-color: cat-token('color.theme.#{$theme}.bg');\n color: cat-token('color.theme.#{$theme}.fill');\n // adjust nested links\n --cat-primary-text: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --cat-primary-text-hover: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --cat-primary-text-active: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --cat-link-decoration: underline;\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\nimport { setAttributeDefault } from '../../utils/setDefault';\n\n/**\n * Informs user about important changes or conditions in the interface. Use this\n * component if you need to capture user’s attention in a prominent way.\n */\n@Component({\n tag: 'cat-alert',\n styleUrl: 'cat-alert.scss',\n shadow: true\n})\nexport class CatAlert {\n private readonly mapIcon: Map = new Map([\n ['primary', '$cat:alert-primary'],\n ['secondary', '$cat:alert-secondary'],\n ['info', '$cat:alert-info'],\n ['success', '$cat:alert-success'],\n ['warning', '$cat:alert-warning'],\n ['danger', '$cat:alert-danger']\n ]);\n private readonly mapRole: Map = new Map([\n ['primary', 'status'],\n ['secondary', 'status'],\n ['info', 'status'],\n ['success', 'status'],\n ['warning', 'alert'],\n ['danger', 'alert']\n ]);\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * The color palette of the alert.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The name of an icon to be displayed in the alert.\n */\n @Prop() icon?: string;\n\n /**\n * Whether the icon of the alert is deactivated.\n */\n @Prop() noIcon = false;\n\n connectedCallback() {\n setAttributeDefault(this, 'tabindex', 0);\n setAttributeDefault(this, 'role', this.mapRole.get(this.color));\n }\n\n render() {\n return (\n \n {!this.noIcon && }\n
\n \n
\n
\n );\n }\n}\n","/**\n * Loads an image and wraps the result in a promise.\n *\n * @param src the image URL\n * @returns a promise\n */\nconst loadImg = (src: string): Promise => {\n return new Promise((resolve, reject) => {\n const image = new Image();\n image.addEventListener('load', resolve);\n image.addEventListener('error', reject);\n image.src = src;\n });\n};\n\nexport default loadImg;\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n// -----\n\n$-background-color: cat-token('color.base.neutral.100');\n$-color: cat-token('color.base.neutral.500');\n$-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n// -----\n\n:host {\n /**\n * @prop --cat-avatar-bg: The background color of the avatar.\n * @prop --cat-avatar-fill: The text color of the avatar.\n * @prop --cat-avatar-size: The size of the avatar.\n * @prop --cat-avatar-font-size: The font size of the avatar.\n */\n display: contents;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.avatar {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: inherit;\n color: var(--cat-avatar-fill, $-color);\n background-color: var(--cat-avatar-bg, $-background-color);\n background-size: cover;\n background-position: center;\n white-space: nowrap;\n overflow: hidden;\n vertical-align: middle;\n font-weight: 600;\n @include cat-select(none);\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n.avatar-round {\n border-radius: 50%;\n}\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n .avatar-#{$size} {\n width: var(--cat-avatar-size, map.get($-sizes, $size));\n height: var(--cat-avatar-size, map.get($-sizes, $size));\n line-height: var(--cat-avatar-size, map.get($-sizes, $size));\n font-size: var(--cat-avatar-font-size, cat-body-font-size($fontSize));\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 's');\n@include size('m', 'm');\n@include size('l', 'l');\n@include size('xl', 'xl');\n","import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport loadImg from '../../utils/load-img';\n\n/**\n * Avatars are used to represent a person or object.\n */\n@Component({\n tag: 'cat-avatar',\n styleUrl: 'cat-avatar.scss',\n shadow: true\n})\nexport class CatAvatar {\n @State() backgroundImage?: string;\n\n /**\n * The size of the avatar.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round avatar edges.\n */\n @Prop() round = false;\n\n /**\n * The label of the avatar.\n */\n @Prop() label = '';\n\n /**\n * Custom initials for the avatar.\n */\n @Prop() initials?: string;\n\n /**\n * An optional avatar image.\n */\n @Prop() src?: string;\n\n /**\n * An icon to be used instead of the initials.\n */\n @Prop() icon?: string;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n @Watch('src')\n onSrcChanged(value?: string): void {\n if (value) {\n loadImg(value).then(\n () => (this.backgroundImage = `url(${value})`),\n () => (this.backgroundImage = undefined)\n );\n } else {\n this.backgroundImage = undefined;\n }\n }\n\n componentWillLoad(): void {\n this.onSrcChanged(this.src);\n }\n\n render() {\n if (this.url) {\n return (\n \n {this.content}\n \n );\n } else {\n return (\n \n {this.content}\n \n );\n }\n }\n\n private get content() {\n return !this.backgroundImage\n ? [this.icon ? : this.getInitials()]\n : [];\n }\n\n private get cssStyle() {\n return { 'background-image': this.backgroundImage };\n }\n\n private get cssClass() {\n return {\n avatar: true,\n 'avatar-round': this.round,\n [`avatar-${this.size}`]: Boolean(this.size)\n };\n }\n\n private getInitials(): string {\n return (\n this.initials ??\n (this.label ?? '')\n .split(' ')\n .map(n => n[0])\n .join('')\n );\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n// -----\n\n$-sizes: (\n 'xl': 3rem,\n 'l': 2.5rem,\n 'm': 2rem,\n 's': 1.5rem,\n 'xs': 1rem\n);\n$-paddings: (\n 'xl': 0 1rem,\n 'l': 0 1rem,\n 'm': 0 0.75rem,\n 's': 0 0.5rem,\n 'xs': 0 0.25rem\n);\n\n// -----\n\n:host([hidden]) {\n display: none;\n}\n\n:host {\n display: inline-flex;\n max-width: 100%;\n vertical-align: baseline;\n align-items: center;\n justify-content: center;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n line-height: 1.5;\n\n slot {\n display: inline-block;\n @include cat-ellipsis;\n }\n}\n\n// ----- round\n\n:host([round]) {\n border-radius: 10rem;\n}\n\n// ----- theme\n\n$-outline: inset 0 0 0 1px cat-token-wrap(var(--text), $alpha: 0.2);\n\n:host([variant='filled']) {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: 600;\n @include cat-font-smooth;\n}\n\n:host([variant='outlined']) {\n background-color: cat-token('color.ui.background.surface');\n color: cat-token-wrap(var(--text));\n box-shadow: $-outline;\n}\n\n@mixin theme($theme) {\n :host([color='#{$theme}']) {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize) {\n :host([size='#{$size}']) {\n height: map.get($-sizes, $size);\n min-width: map.get($-sizes, $size);\n font-size: cat-body-font-size($fontSize);\n padding: map.get($-paddings, $size);\n }\n}\n\n@include size('xs', 'xs');\n@include size('s', 'xs');\n@include size('m', 's');\n@include size('l', 'm');\n@include size('xl', 'l');\n\n// ----- pulse\n\n$-pulse-0: 0 0 0 0 cat-token-wrap(var(--bg));\n$-pulse-70: transparent 0 0 0 0.5rem;\n$-pulse-100: transparent 0 0 0 0;\n\n:host([pulse][variant='filled']) {\n animation: 1.5s ease 0s infinite normal none running pulse;\n}\n\n:host([pulse][variant='outlined']) {\n animation: 1.5s ease 0s infinite normal none running pulse-outlined;\n}\n\n@keyframes pulse {\n 0% {\n box-shadow: $-pulse-0;\n }\n\n 70% {\n box-shadow: $-pulse-70;\n }\n\n 100% {\n box-shadow: $-pulse-100;\n }\n}\n\n@keyframes pulse-outlined {\n 0% {\n box-shadow: $-pulse-0, $-outline;\n }\n\n 70% {\n box-shadow: $-pulse-70, $-outline;\n }\n\n 100% {\n box-shadow: $-pulse-100, $-outline;\n }\n}\n","import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The rendering style of the badge.\n */\n @Prop({ reflect: true }) variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop({ reflect: true }) size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop({ reflect: true }) round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop({ reflect: true }) pulse = false;\n\n render() {\n return ;\n }\n}\n","const _breakpoints = ['xs', 's', 'm', 'l', 'xl'] as const;\n\nexport type Breakpoint = (typeof _breakpoints)[number];\n\nexport const Breakpoints: { [breakpoint in Breakpoint]: string } = {\n xs: '(max-width: 539.98px)',\n s: '(max-width: 767.98px)',\n m: '(max-width: 991.98px)',\n l: '(max-width: 1199.98px)',\n xl: '(max-width: 1399.98px)'\n};\n\nexport function isBreakpoint(value: unknown): value is Breakpoint {\n return typeof value === 'string' && _breakpoints.includes(value as Breakpoint);\n}\n","// https://github.com/angular/components/blob/master/src/cdk/platform/platform.ts\n\n// Whether the current platform supports the V8 Break Iterator. The V8 check\n// is necessary to detect all Blink based browsers.\nlet hasV8BreakIterator: boolean;\n\n// We need a try/catch around the reference to `Intl`, because accessing it in some cases can\n// cause IE to throw. These cases are tied to particular versions of Windows and can happen if\n// the consumer is providing a polyfilled `Map`. See:\n// https://github.com/Microsoft/ChakraCore/issues/3189\n// https://github.com/angular/components/issues/15687\ntry {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n hasV8BreakIterator = typeof Intl !== 'undefined' && (Intl as any).v8BreakIterator;\n} catch {\n hasV8BreakIterator = false;\n}\n\nexport class Platform {\n /** Whether the current browser is Microsoft Edge. */\n EDGE: boolean = /(edge)/i.test(navigator.userAgent);\n\n /** Whether the current rendering engine is Microsoft Trident. */\n TRIDENT: boolean = /(msie|trident)/i.test(navigator.userAgent);\n\n // EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.\n /** Whether the current rendering engine is Blink. */\n BLINK: boolean =\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n !!((window as any).chrome || hasV8BreakIterator) && typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT;\n\n // Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to\n // ensure that Webkit runs standalone and is not used as another engine's base.\n /** Whether the current rendering engine is WebKit. */\n WEBKIT: boolean = /AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;\n\n /** Whether the current platform is Apple iOS. */\n IOS: boolean = /iPad|iPhone|iPod/.test(navigator.userAgent) && !('MSStream' in window);\n\n // It's difficult to detect the plain Gecko engine, because most of the browsers identify\n // them self as Gecko-like browsers and modify the userAgent's according to that.\n // Since we only cover one explicit Firefox case, we can simply check for Firefox\n // instead of having an unstable check for Gecko.\n /** Whether the current browser is Firefox. */\n FIREFOX: boolean = /(firefox|minefield)/i.test(navigator.userAgent);\n\n /** Whether the current platform is Android. */\n // Trident on mobile adds the android platform to the userAgent to trick detections.\n ANDROID: boolean = /android/i.test(navigator.userAgent) && !this.TRIDENT;\n\n // Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake\n // this and just place the Safari keyword in the userAgent. To be more safe about Safari every\n // Safari browser should also use Webkit as its layout engine.\n /** Whether the current browser is Safari. */\n SAFARI: boolean = /safari/i.test(navigator.userAgent) && this.WEBKIT;\n}\n","import log from 'loglevel';\nimport { Platform } from './platform';\n\n// https://github.com/angular/components/blob/master/src/cdk/layout/media-matcher.ts\n\n/** Global registry for all dynamically-created, injected media queries. */\nconst mediaQueriesForWebkitCompatibility: Set = new Set();\n\n/** Style tag that holds all of the dynamically-created media queries. */\nlet mediaQueryStyleNode: HTMLStyleElement | undefined;\n\n/** A utility for calling matchMedia queries. */\nexport class MediaMatcher {\n private _platform;\n private _matchMedia: (query: string) => MediaQueryList;\n\n constructor() {\n this._platform = new Platform();\n this._matchMedia = window.matchMedia.bind(window);\n }\n\n /**\n * Evaluates the given media query and returns the native MediaQueryList from which results\n * can be retrieved.\n * Confirms the layout engine will trigger for the selector query provided and returns the\n * MediaQueryList for the query provided.\n */\n matchMedia(query: string): MediaQueryList {\n if (this._platform.WEBKIT || this._platform.BLINK) {\n createEmptyStyleRule(query);\n }\n return this._matchMedia(query);\n }\n}\n\n/**\n * Creates an empty stylesheet that is used to work around browser inconsistencies related to\n * `matchMedia`. At the time of writing, it handles the following cases:\n * 1. On WebKit browsers, a media query has to have at least one rule in order for `matchMedia`\n * to fire. We work around it by declaring a dummy stylesheet with a `@media` declaration.\n * 2. In some cases Blink browsers will stop firing the `matchMedia` listener if none of the rules\n * inside the `@media` match existing elements on the page. We work around it by having one rule\n * targeting the `body`. See https://github.com/angular/components/issues/23546.\n */\nfunction createEmptyStyleRule(query: string) {\n if (mediaQueriesForWebkitCompatibility.has(query)) {\n return;\n }\n\n try {\n if (!mediaQueryStyleNode) {\n mediaQueryStyleNode = document.createElement('style');\n mediaQueryStyleNode.setAttribute('type', 'text/css');\n document.head.appendChild(mediaQueryStyleNode);\n }\n if (mediaQueryStyleNode.sheet) {\n mediaQueryStyleNode.sheet.insertRule(`@media ${query} {body{ }}`, 0);\n mediaQueriesForWebkitCompatibility.add(query);\n }\n } catch (e) {\n log.error(e);\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'sass:map';\n\n$button-sizes: (\n 'xl': 3.5rem,\n 'l': 3rem,\n 'm': 2.5rem,\n 's': 2rem,\n 'xs': 1.5rem\n);\n\n:host {\n display: inline-block;\n max-width: 100%;\n vertical-align: middle;\n @include cat-select(none);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.cat-button {\n position: relative;\n font: inherit;\n display: flex;\n align-items: center;\n justify-content: center;\n border: none;\n border-radius: cat-border-radius('m');\n text-decoration: none;\n width: 100%;\n box-sizing: border-box;\n cursor: pointer;\n transition:\n color cat-token('time.transition.s') linear,\n border-color cat-token('time.transition.s') linear,\n background-color cat-token('time.transition.s') linear,\n box-shadow cat-token('time.transition.s') linear;\n\n &:focus-visible {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n}\n\n// ----- content\n\n.cat-button-content {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n.cat-button-content-inner {\n @include cat-break-word;\n\n .cat-button-ellipsed & {\n @include cat-ellipsis;\n }\n}\n\n// ----- disabled\n\n.cat-button-disabled {\n cursor: not-allowed;\n}\n\n// ----- round\n\n.cat-button-round {\n border-radius: 10rem;\n}\n\n// ----- loading\n\n.cat-button-loading {\n cursor: default;\n\n cat-spinner {\n position: absolute;\n }\n\n > *:not(cat-spinner) {\n visibility: hidden;\n }\n}\n\n// ----- group button\n\n.cat-group-button {\n &-first {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &-middle {\n border-radius: 0;\n }\n\n &-last {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n &:hover {\n z-index: 1;\n }\n\n &:focus-visible {\n z-index: 2;\n }\n}\n\n// ----- theme\n\n.cat-button-filled {\n background-color: cat-token-wrap(var(--bg));\n color: cat-token-wrap(var(--fill));\n font-weight: var(--cat-font-weight-button, 600);\n @include cat-font-smooth;\n\n &.cat-button-disabled {\n --bg: #{cat-token('color.ui.background.muted', $wrap: false)};\n --fill: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n}\n\n.cat-button-outlined {\n background-color: cat-token('color.ui.background.surface');\n box-shadow: inset 0 0 0 1px cat-token-wrap(var(--base), $alpha: 0.2);\n color: cat-token-wrap(var(--text));\n\n &.cat-button-disabled {\n --base: #{cat-token('color.ui.font.muted', $wrap: false)};\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: cat-token-wrap(var(--base), $alpha: 0.1);\n }\n}\n\n.cat-button-text {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n text-decoration: cat-token('font.decoration.linkButton');\n\n &.cat-button-disabled {\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: rgba(var(--base), 0.1);\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n background-color: rgba(var(--base), 0.1);\n }\n}\n\n.cat-button-link {\n background-color: transparent;\n color: cat-token-wrap(var(--text));\n\n &.cat-button-disabled {\n --text: #{cat-token('color.ui.font.muted', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: cat-token('font.decoration.linkHover');\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading) {\n text-decoration: cat-token('font.decoration.linkHover');\n }\n}\n\n@mixin theme($theme) {\n .cat-button-#{$theme} {\n --bg: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fill', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n @if $theme == 'secondary' {\n --base: #{cat-token('color.theme.#{$theme}.bg', $wrap: false)};\n } @else {\n --base: #{cat-token('color.theme.#{$theme}.text', $wrap: false)};\n }\n\n &:hover:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgHover', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillHover', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textHover', $wrap: false)};\n }\n\n &.cat-button-active:not(.cat-button-disabled):not(.cat-button-loading),\n &:active:not(.cat-button-disabled):not(.cat-button-loading) {\n --bg: #{cat-token('color.theme.#{$theme}.bgActive', $wrap: false)};\n --fill: #{cat-token('color.theme.#{$theme}.fillActive', $wrap: false)};\n --text: #{cat-token('color.theme.#{$theme}.textActive', $wrap: false)};\n }\n }\n}\n\n@include theme('primary');\n@include theme('secondary');\n@include theme('info');\n@include theme('success');\n@include theme('warning');\n@include theme('danger');\n\n// ----- size\n\n@mixin size($size, $fontSize, $padding) {\n $-line-height: cat-body-line-height($fontSize);\n\n $-total-height: map.get($button-sizes, $size);\n $-padding-v: ($-total-height - $-line-height) * 0.5;\n $-padding-h: $padding;\n\n .cat-button-#{$size} {\n min-width: map.get($button-sizes, $size);\n padding: $-padding-v $-padding-h;\n @include cat-body($fontSize, null);\n gap: 0.25rem;\n\n // normalize icon size for line height\n @if $fontSize == 'm' {\n cat-icon {\n margin-top: -0.125rem;\n margin-bottom: -0.125rem;\n }\n }\n\n &.cat-button-icon {\n width: $-total-height;\n height: $-total-height;\n padding: 0;\n }\n }\n\n :host(.cat-button-pull[size='#{$size}']) {\n margin: $-padding-v * -1 $-padding-h * -1;\n }\n\n :host(.cat-button-pull-h[size='#{$size}']) {\n margin-left: $-padding-h * -1;\n margin-right: $-padding-h * -1;\n }\n\n :host(.cat-button-pull-v[size='#{$size}']) {\n margin-top: $-padding-v * -1;\n margin-bottom: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-t[size='#{$size}']) {\n margin-top: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-l[size='#{$size}']) {\n margin-left: $-padding-h * -1;\n }\n\n :host(.cat-button-pull-b[size='#{$size}']) {\n margin-bottom: $-padding-v * -1;\n }\n\n :host(.cat-button-pull-r[size='#{$size}']) {\n margin-right: $-padding-h * -1;\n }\n}\n\n:host(.cat-button-pull:not([size])) {\n margin: -0.625rem -0.75rem;\n}\n\n:host(.cat-button-pull-h:not([size])) {\n margin-left: -0.75rem;\n margin-right: -0.75rem;\n}\n\n:host(.cat-button-pull-v:not([size])) {\n margin-top: -0.625rem;\n margin-bottom: -0.625rem;\n}\n\n:host(.cat-button-pull-t:not([size])) {\n margin-top: -0.625rem;\n}\n\n:host(.cat-button-pull-l:not([size])) {\n margin-left: -0.75rem;\n}\n\n:host(.cat-button-pull-b:not([size])) {\n margin-bottom: -0.625rem;\n}\n\n:host(.cat-button-pull-r:not([size])) {\n margin-right: -0.75rem;\n}\n\n@include size('xs', 's', 0.25rem);\n@include size('s', 'm', 0.5rem);\n@include size('m', 'm', 0.75rem);\n@include size('l', 'm', 1rem);\n@include size('xl', 'l', 1.25rem);\n\n// ----- tabs\n\n:host(.cat-tab) {\n &::part(button) {\n padding: 1.125rem 0.75rem;\n --cat-secondary-bg: transparent;\n --cat-primary-text: transparent;\n --cat-danger-text: transparent;\n }\n\n &::part(content) {\n &::before {\n content: attr(data-text);\n content: attr(data-text) / '';\n height: 0;\n visibility: hidden;\n overflow: hidden;\n user-select: none;\n pointer-events: none;\n font-weight: 700;\n }\n }\n}\n\n// ----- alignment\n\n:host(.cat-text-left) .cat-button {\n justify-content: left;\n}\n\n:host(.cat-text-right) .cat-button {\n justify-content: right;\n}\n\n// ----- navigation\n\n:host(.cat-nav-item) {\n width: 100%;\n\n .cat-button {\n box-shadow: none;\n justify-content: left;\n gap: 0.5rem;\n\n &:focus-visible {\n outline-offset: -2px;\n }\n }\n}\n\n// ----- datepicker\n\n:host(.cat-time-format) {\n .cat-button {\n border-radius: 0;\n }\n}\n\n:host(.cat-date-toggle),\n:host(.cat-time-toggle) {\n .cat-button {\n margin-left: -1px;\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n\n:host(.cat-date-item),\n:host(.cat-date-toggle),\n:host(.cat-time-format),\n:host(.cat-time-toggle) {\n .cat-button {\n &:hover {\n z-index: 1;\n }\n\n &:focus-visible {\n z-index: 2;\n }\n }\n}\n\n:host(.cat-date-item) {\n .cat-button {\n padding: 0;\n min-width: 2rem;\n max-height: 3rem;\n aspect-ratio: 1;\n }\n}\n\n:host(.date-start:not(.date-end)) {\n .cat-button {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n}\n\n:host(.date-end:not(.date-start)) {\n .cat-button {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n}\n","import { Component, Event, EventEmitter, h, Listen, Method, Prop, State, Watch } from '@stencil/core';\nimport { Breakpoint, Breakpoints, isBreakpoint } from '../../utils/breakpoints';\nimport { MediaMatcher } from '../../utils/media-matcher';\n\n/**\n * Buttons are used for interface actions. Primary style should be used only\n * once per view for main call-to-action.\n *\n * @part button - The native anchor or button element.\n * @part content - The textual content of the button.\n * @part prefix - The prefix icon.\n * @part suffix - The suffix icon.\n */\n@Component({\n tag: 'cat-button',\n styleUrl: 'cat-button.scss',\n shadow: true\n})\nexport class CatButton {\n private button!: HTMLButtonElement | HTMLAnchorElement;\n private mediaMatcher?: MediaMatcher;\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n @State() _iconOnly = true;\n\n /**\n * The rendering style of the button.\n */\n @Prop() variant: 'filled' | 'outlined' | 'text' | 'link' = 'outlined';\n\n /**\n * The color palette of the button.\n */\n @Prop() color: 'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'danger' = 'secondary';\n\n /**\n * Set the button into an active state.\n */\n @Prop() active = false;\n\n /**\n * The size of the button.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * The name of the button, which gets paired with the button's value when\n * submitted as part of a form. Corresponds with the native HTML name\n * attribute.\n */\n @Prop() name?: string;\n\n /**\n * The value of the button, which gets paired with the button's name when\n * submitted as part of a form. Corresponds with the native HTML value\n * attribute.\n */\n @Prop() value?: string;\n\n /**\n * Specifies that the button should be disabled. A disabled button is unusable\n * and un-clickable. Corresponds with the native HTML disabled attribute.\n */\n @Prop() disabled = false;\n\n /**\n * Displays the button in a loading state with a spinner. Just like a disabled\n * button, an inactive button is unusable and un-clickable. However, it\n * retains the current focus state.\n */\n @Prop() loading = false;\n\n /**\n * Allows the button to submit a form.\n */\n @Prop() submit = false;\n\n /**\n * Disables ellipse overflowing button content.\n */\n @Prop() noEllipsis = false;\n\n /**\n * Use round button edges.\n */\n @Prop() round = false;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n /**\n * The name of an icon to be displayed in the button.\n */\n @Prop() icon?: string;\n\n /**\n * Hide the actual button content and only display the icon.\n */\n @Prop() iconOnly: boolean | Breakpoint = false;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * Adds a unique identifier for the button. Please note that with this\n * particular component this ID is added inside the web component. If you need\n * an ID on the HTML element, use the regular `id` attribute instead.\n */\n @Prop() buttonId?: string;\n\n /**\n * Adds accessible label for the button that is only shown for screen\n * readers. Typically, this label text replaces the visible text on the\n * button for users who use assistive technology.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n /**\n * Sets the `aria-current` attribute on the button.\n */\n @Prop({ attribute: 'a11y-current' }) a11yCurrent?: string;\n\n /**\n * Attributes that will be added to the native HTML button element\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Attributes that will be added to the native HTML button content element\n */\n @Prop() nativeContentAttributes?: { [key: string]: string };\n\n /**\n * The index of a button that is used inside a cat-button-group component\n */\n @Prop() buttonGroupPosition?: 'first' | 'last' | 'middle';\n\n @Watch('iconOnly')\n onIconOnlyChanged(value: boolean | Breakpoint): void {\n // teardown\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.mediaQueryList?.removeEventListener('change', this.mediaQueryListener!);\n this.mediaQueryList = undefined;\n this.mediaQueryListener = undefined;\n // setup\n if (isBreakpoint(value)) {\n this.mediaMatcher ??= new MediaMatcher();\n this.mediaQueryList = this.mediaMatcher.matchMedia(Breakpoints[value]);\n this.mediaQueryListener = (event: MediaQueryListEvent) => (this._iconOnly = event.matches);\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n this._iconOnly = this.mediaQueryList.matches;\n } else {\n this._iconOnly = value;\n }\n }\n\n /**\n * Emitted when the button is clicked.\n */\n @Event() catClick!: EventEmitter;\n\n /**\n * Emitted when the button received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the button loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad(): void {\n this.onIconOnlyChanged(this.iconOnly);\n }\n\n @Listen('click')\n haltDisabledEvents(event: Event): void {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Programmatically move focus to the button. Use this method instead of\n * `button.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.button.focus(options);\n }\n\n /**\n * Programmatically remove focus from the button. Use this method instead of\n * `button.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.button.blur();\n }\n\n /**\n * Programmatically simulate a click on the button.\n */\n @Method()\n async doClick(): Promise {\n this.button.click();\n }\n\n render() {\n if (this.url) {\n return (\n (this.button = el as HTMLAnchorElement)}\n href={this.disabled ? undefined : this.url}\n target={this.urlTarget}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n aria-current={this.a11yCurrent}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n \n );\n } else {\n return (\n (this.button = el as HTMLButtonElement)}\n type={this.submit ? 'submit' : 'button'}\n name={this.name}\n value={this.value}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n aria-label={this.a11yLabel}\n aria-current={this.a11yCurrent}\n id={this.buttonId}\n part=\"button\"\n class={{\n 'cat-button': true,\n 'cat-button-active': this.active,\n 'cat-button-icon': this.isIconButton,\n 'cat-button-round': this.round ?? this.isIconButton,\n 'cat-button-loading': this.loading,\n 'cat-button-disabled': this.disabled,\n 'cat-button-ellipsed': !this.noEllipsis && !this.isIconButton,\n [`cat-button-${this.variant}`]: Boolean(this.variant),\n [`cat-button-${this.color}`]: Boolean(this.color),\n [`cat-button-${this.size}`]: Boolean(this.size),\n [`cat-group-button-${this.buttonGroupPosition}`]: Boolean(this.buttonGroupPosition),\n 'cat-group-button': Boolean(this.buttonGroupPosition)\n }}\n onClick={this.onClick.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n >\n {this.content}\n \n );\n }\n }\n\n private get iconSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 's';\n default:\n return 'l';\n }\n }\n\n private get spinnerSize(): 'xs' | 's' | 'm' | 'l' | 'xl' {\n switch (this.size) {\n case 'xs':\n return 'xs';\n default:\n return 'm';\n }\n }\n\n private get isIconButton() {\n return Boolean(this.icon) && this._iconOnly;\n }\n\n private get hasPrefixIcon() {\n return Boolean(this.icon) && !this._iconOnly && !this.iconRight;\n }\n\n private get hasSuffixIcon() {\n return Boolean(this.icon) && !this._iconOnly && this.iconRight;\n }\n\n private get content() {\n return [\n this.hasPrefixIcon ? : null,\n this.isIconButton ? (\n \n ) : (\n \n \n \n \n \n ),\n this.hasSuffixIcon ? : null,\n this.loading ? : null\n ];\n }\n\n private onClick(event: MouseEvent) {\n this.catClick.emit(event);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n}\n",":host {\n position: relative;\n display: inline-flex;\n vertical-align: middle;\n}\n\n::slotted(cat-button[variant='outlined']),\n::slotted(cat-button:not([variant])) {\n margin-right: -1px;\n}\n\n::slotted(cat-button[variant='outlined']:last-child),\n::slotted(cat-button:not([variant]):last-child) {\n margin-right: 0;\n}\n","import { Component, Element, h, Host, Prop } from '@stencil/core';\n\n/**\n * Button groups are designed to bring together button controls that are of a\n * similar nature. For example text formatting controls.\n */\n@Component({\n tag: 'cat-button-group',\n styleUrl: 'cat-button-group.scss',\n shadow: true\n})\nexport class CatButtonGroup {\n private formElements: HTMLCatButtonElement[] = [];\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * Adds an accessible label for the button group that\n * it is only shown in assistive technologies, like screen readers.\n */\n @Prop({ attribute: 'a11y-label' }) a11yLabel?: string;\n\n render() {\n return (\n \n \n \n );\n }\n\n private onSlotChange(): void {\n this.formElements = Array.from(this.hostElement.querySelectorAll('cat-button'));\n this.formElements.forEach((element, index) => {\n element.buttonGroupPosition = index === 0 ? 'first' : index === this.formElements.length - 1 ? 'last' : 'middle';\n });\n }\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n$-padding: 1.25rem;\n\n:host {\n display: block;\n border-radius: cat-border-radius('l');\n background-color: cat-token('color.ui.background.surface');\n padding: $-padding;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n::slotted(:last-child) {\n margin-bottom: 0 !important;\n}\n\n::slotted(nav),\n::slotted(nav:last-child) {\n margin: #{0.25rem - $-padding} #{0.25rem - $-padding} !important;\n}\n\n// --- pull out helper classes\n\n::slotted(.cat-card-pull) {\n margin: -$-padding !important;\n width: calc(100% + #{2 * $-padding}) !important;\n height: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-h) {\n margin-left: -$-padding !important;\n margin-right: -$-padding !important;\n width: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-v) {\n margin-top: -$-padding !important;\n margin-bottom: -$-padding !important;\n height: calc(100% + #{2 * $-padding}) !important;\n}\n\n::slotted(.cat-card-pull-t) {\n margin-top: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-l) {\n margin-left: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-r) {\n margin-right: -$-padding !important;\n}\n\n::slotted(.cat-card-pull-b) {\n margin-bottom: -$-padding !important;\n}\n","import { Component, Event, EventEmitter, h } from '@stencil/core';\n\n/**\n * Cards are surfaces that display content and actions on a single topic. They\n * should be easy to scan for relevant and actionable information.\n */\n@Component({\n tag: 'cat-card',\n styleUrl: 'cat-card.scss',\n shadow: true\n})\nexport class CatCard {\n /**\n * Emitted when the card and all the children are fully loaded.\n */\n @Event() catLoad!: EventEmitter;\n\n render() {\n return ;\n }\n\n componentDidLoad() {\n this.catLoad.emit();\n }\n}\n","import { h, FunctionalComponent } from '@stencil/core';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type ErrorMap = { [key: string]: any };\n\n/**\n * Properties of CatFormHint.\n *\n * @property hint - Optional hint text(s) of the form field.\n * @property slottedHint - Optional hint element of the form field.\n */\ninterface CatFormHintProps {\n id: string;\n hint?: string | string[];\n slottedHint?: HTMLSlotElement;\n class?: string;\n errorMap?: ErrorMap;\n}\n\n/**\n * CatFormHint is a functional component that represents the hint area of form elements.\n *\n * @param props - {@link CatFormHintProps}\n * @return a JSX.Element\n */\nexport const CatFormHint: FunctionalComponent = props => {\n const { id, hint, slottedHint, errorMap } = props;\n const errors = Object.entries(errorMap || {});\n return (\n
\n {errors.length\n ? errors.map(([key, params]) => (\n

{i18n.t(`error.${key}`, params)}

\n ))\n : [\n hint &&\n (Array.isArray(hint) ? (\n hint.map(item =>

{item}

)\n ) : (\n

{hint}

\n )),\n slottedHint\n ]}\n
\n );\n};\n","@use 'variables' as *;\n@use 'mixins' as *;\n@use 'src/components/cat-form-hint/cat-form-hint';\n\n$checkbox-width: 1.25rem;\n$checkbox-height: 1.25rem;\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nlabel {\n flex: 0 1 auto;\n display: flex;\n gap: 0.5rem;\n @include cat-body('m');\n @include cat-select(none);\n cursor: pointer;\n position: relative;\n}\n\n.label-left {\n flex-direction: row-reverse;\n\n input {\n right: 1px;\n left: unset;\n }\n}\n\ninput {\n position: absolute;\n width: $checkbox-width;\n height: $checkbox-height;\n margin: 0;\n opacity: 0;\n cursor: inherit;\n left: 1px;\n top: 0.5px;\n}\n\n.box-placeholder {\n width: calc($checkbox-width + 2px);\n flex-shrink: 0;\n}\n\n.box {\n flex: 0 0 auto;\n display: flex;\n position: relative;\n height: $checkbox-height;\n width: $checkbox-width;\n background-color: cat-token('color.ui.background.input');\n border: 1px solid cat-token('color.ui.border.dark');\n border-radius: cat-border-radius(s);\n transition:\n background-color cat-token('time.transition.s') ease,\n border-color cat-token('time.transition.s') ease;\n pointer-events: none;\n box-sizing: border-box;\n\n svg {\n fill: none;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-dasharray: 16px;\n stroke-dashoffset: 16px;\n transition: all cat-token('time.transition.s') ease;\n width: 50%;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(0.99);\n }\n\n :checked + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 0;\n }\n }\n\n :indeterminate + & {\n background-color: cat-token('color.theme.primary.bg');\n border-color: cat-token('color.theme.primary.bg');\n stroke: cat-token('color.theme.primary.fill');\n\n .check {\n stroke-dashoffset: 16px;\n }\n\n .dash {\n stroke-dashoffset: 0;\n }\n }\n\n :focus-visible + & {\n outline: 2px solid cat-token('color.ui.border.focus');\n outline-offset: 1px;\n }\n\n .is-disabled & {\n background-color: cat-token('color.ui.background.muted');\n border-color: cat-token('color.ui.border.dark');\n stroke: cat-token('color.ui.font.muted');\n }\n}\n\n:host(.cat-error) {\n .box {\n border: 1px solid cat-token('color.theme.danger.bg');\n }\n\n :checked + .box,\n :indeterminate + .box {\n background-color: cat-token('color.theme.danger.bg');\n border-color: cat-token('color.theme.danger.bg');\n stroke: cat-token('color.theme.danger.fill');\n }\n}\n\n.label {\n flex: 1 1 auto;\n min-width: 0;\n\n .is-hidden & {\n @include cat-visually-hidden;\n }\n}\n\n.is-disabled {\n cursor: not-allowed;\n color: cat-token('color.ui.font.muted');\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop, State } from '@stencil/core';\nimport { CatFormHint } from '../cat-form-hint/cat-form-hint';\n\nlet nextUniqueId = 0;\n\n/**\n * Checkboxes are used to let a user choose one or more options from a limited\n * number of options.\n *\n * @slot hint - Optional hint element to be displayed with the checkbox.\n * @slot label - The slotted label. If both the label property and the label slot are present, only the label slot will be displayed.\n * @part label - The label content.\n * @part input - The native input element.\n */\n@Component({\n tag: 'cat-checkbox',\n styleUrls: ['cat-checkbox.scss'],\n shadow: true\n})\nexport class CatCheckbox {\n private readonly _id = `cat-checkbox-${nextUniqueId++}`;\n private get id() {\n return this.identifier || this._id;\n }\n\n private input!: HTMLInputElement;\n\n @Element() hostElement!: HTMLElement;\n\n @State() hasSlottedLabel = false;\n\n @State() hasSlottedHint = false;\n\n /**\n * Checked state of the checkbox\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * Indeterminate state of the checkbox\n */\n @Prop({ mutable: true }) indeterminate = false;\n\n /**\n * Disabled state of the checkbox\n */\n @Prop() disabled = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * Label of the checkbox which is presented in the UI\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * The name of the input.\n */\n @Prop() name?: string;\n\n /**\n * Required state of the checkbox.\n */\n @Prop() required = false;\n\n /**\n * The value of the checked checkbox.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() value?: any;\n\n /**\n * The value of the unchecked checkbox.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop() noValue?: any;\n\n /**\n * The resolved value of the checkbox, based on the checked state and value.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Prop({ mutable: true }) resolvedValue: any = null;\n\n /**\n * Optional hint text(s) to be displayed with the checkbox.\n */\n @Prop() hint?: string | string[];\n\n /**\n * Whether the label should appear to the left of the checkbox.\n */\n @Prop() labelLeft = false;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * Emitted when the checked status of the checkbox is changed.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the checkbox received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n componentWillLoad() {\n this.updateResolved();\n }\n\n componentWillRender(): void {\n this.hasSlottedLabel = !!this.hostElement.querySelector('[slot=\"label\"]');\n this.hasSlottedHint = !!this.hostElement.querySelector('[slot=\"hint\"]');\n }\n\n /**\n * Programmatically move focus to the checkbox. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input.focus(options);\n }\n\n /**\n * Programmatically remove focus from the checkbox. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input.blur();\n }\n\n render() {\n return (\n \n \n (this.input = el as HTMLInputElement)}\n id={this.id}\n type=\"checkbox\"\n name={this.name}\n value={this.value}\n checked={this.checked}\n required={this.required}\n disabled={this.disabled}\n indeterminate={this.indeterminate}\n onInput={this.onInput.bind(this)}\n onFocus={this.onFocus.bind(this)}\n onBlur={this.onBlur.bind(this)}\n aria-describedby={this.hasHint ? this.id + '-hint' : undefined}\n />\n \n \n \n \n \n \n \n \n \n {(this.hasSlottedLabel && ) || this.label}\n \n \n {this.hasHint && (\n
\n
\n } />\n
\n )}\n
\n );\n }\n\n private get hasHint() {\n return !!this.hint || !!this.hasSlottedHint;\n }\n\n private onInput() {\n this.checked = this.input.checked;\n this.indeterminate = this.input.indeterminate;\n this.updateResolved();\n this.catChange.emit(this.resolvedValue);\n }\n\n private onFocus(event: FocusEvent) {\n this.catFocus.emit(event);\n }\n\n private onBlur(event: FocusEvent) {\n this.catBlur.emit(event);\n }\n\n private updateResolved() {\n this.resolvedValue = this.checked ? this.value ?? true : this.noValue ?? false;\n }\n}\n","import { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\nfunction getDays(language: string, weekday: 'long' | 'short' | 'narrow' = 'long') {\n const date = new Date();\n const firstDayOfWeek = (date.getUTCDate() - date.getUTCDay() + 7) % 7;\n const format = new Intl.DateTimeFormat(language, { weekday }).format;\n return [...Array(7).keys()].map(day => format(new Date(date.getTime()).setUTCDate(firstDayOfWeek + day)));\n}\n\nfunction getMonths(language: string, month: 'long' | 'short' = 'long') {\n const date = new Date(0);\n const format = new Intl.DateTimeFormat(language, { month }).format;\n return [...Array(12).keys()].map(month => format(new Date(date.getTime()).setUTCMonth(month)));\n}\n\nfunction getWeekInfo(language: string) {\n const locale = new Intl.Locale(language);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const weekInfo = (locale as any).getWeekInfo?.() ?? (locale as any).weekInfo;\n return {\n firstDay: weekInfo?.firstDay ?? 1,\n minDays: weekInfo?.minDays ?? 4,\n weekend: weekInfo?.weekend ?? [6, 7]\n };\n}\n\nfunction getFormat(language: string) {\n const format = new Intl.DateTimeFormat(language, { year: 'numeric', month: '2-digit', day: '2-digit' })\n .format(new Date(3456, 10, 22))\n .replace('3456', 'YYYY')\n .replace('56', 'YY')\n .replace('11', 'MM')\n .replace('22', 'DD');\n return /^(YYYY|YY|MM|DD)\\W(YYYY|YY|MM|DD)\\W(YYYY|YY|MM|DD)$/.test(format) ? format : 'DD-MM-YYYY';\n}\n\nexport function getLocale(language: string) {\n return {\n prevYear: i18n.t('datepicker.prevYear'),\n nextYear: i18n.t('datepicker.nextYear'),\n prevMonth: i18n.t('datepicker.prevMonth'),\n nextMonth: i18n.t('datepicker.nextMonth'),\n arrowKeys: i18n.t('datepicker.arrowKeys'),\n today: i18n.t('datepicker.today'),\n change: i18n.t('datepicker.change'),\n choose: i18n.t('datepicker.choose'),\n clear: i18n.t('datepicker.clear'),\n formatStr: getFormat(language),\n weekInfo: getWeekInfo(language),\n days: {\n short: getDays(language, 'short'),\n long: getDays(language, 'long')\n },\n months: {\n short: getMonths(language, 'short'),\n long: getMonths(language, 'long')\n },\n now: () => {\n const date = new Date();\n return new Date(date.getFullYear(), date.getMonth(), date.getDate());\n },\n fromLocalISO: (date?: string | null) => {\n const [match, year, month, day] = date?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n return match ? new Date(Number(year), Number(month) - 1, Number(day)) : null;\n },\n toLocalISO: (date: Date) => {\n const year = date.getFullYear();\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const day = date.getDate().toString().padStart(2, '0');\n return `${year}-${month}-${day}`;\n },\n toLocalStr: (date: Date) =>\n new Intl.DateTimeFormat(language, {\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n weekday: 'long'\n }).format(date)\n };\n}\n","export function isLeapYear(year: number): boolean {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n}\n\nexport function addDays(date: Date, n: number): Date {\n return new Date(date.getFullYear(), date.getMonth(), date.getDate() + n);\n}\n\nexport function addMonth(date: Date, n: number): Date {\n const [year, month, day] = [date.getFullYear(), date.getMonth(), date.getDate()];\n const maxDays = [31, isLeapYear(year) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\n const newDate = new Date(date);\n newDate.setDate(1);\n newDate.setMonth(newDate.getMonth() + n);\n newDate.setDate(Math.min(day, maxDays[(month + (n % 12) + 12) % 12]));\n return newDate;\n}\n\nexport function isSameYear(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getFullYear() === date2.getFullYear();\n}\n\nexport function isSameMonth(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getMonth() === date2.getMonth() && isSameYear(date1, date2);\n}\n\nexport function isSameDay(date1: Date | null, date2: Date | null): boolean {\n return !!date1 && !!date2 && date1.getDate() === date2.getDate() && isSameMonth(date1, date2);\n}\n\nexport function clampDate(min: Date | null, date: Date, max: Date | null): Date {\n return new Date(Math.min(Math.max(date.getTime(), min?.getTime() ?? -Infinity), max?.getTime() ?? Infinity));\n}\n","@use 'variables' as *;\n@use 'mixins' as *;\n\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.label-aria {\n @include cat-visually-hidden;\n}\n\ncat-date-inline {\n margin: 1rem;\n width: 20rem;\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, Element, Event, EventEmitter, Host, Method, Prop, Watch, h } from '@stencil/core';\nimport { getLocale } from '../cat-date-inline/cat-date-locale';\nimport { clampDate } from '../cat-date-inline/cat-date-math';\nimport { ErrorMap } from '../cat-form-hint/cat-form-hint';\nimport { catI18nRegistry as i18n } from '../cat-i18n/cat-i18n-registry';\n\n/**\n * A date input component to select a date from a calendar in a dropdown.\n */\n@Component({\n tag: 'cat-date',\n styleUrl: 'cat-date.scss',\n shadow: true\n})\nexport class CatDate {\n private readonly language = i18n.getLocale();\n private readonly locale = getLocale(this.language);\n private input?: HTMLCatInputElement;\n private dateInline?: HTMLCatDateInlineElement;\n\n @Element() hostElement!: HTMLElement;\n\n /**\n * Whether the label need a marker to shown if the input is required or optional.\n */\n @Prop() requiredMarker?: 'none' | 'required' | 'optional' | 'none!' | 'optional!' | 'required!' = 'optional';\n\n /**\n * Whether the label is on top or left.\n */\n @Prop() horizontal = false;\n\n /**\n * Hint for form autofill feature.\n */\n @Prop() autoComplete?: string;\n\n /**\n * Whether the input should show a clear button.\n */\n @Prop() clearable = false;\n\n /**\n * Whether the input is disabled.\n */\n @Prop() disabled = false;\n\n /**\n * Optional hint text(s) to be displayed with the input.\n */\n @Prop() hint?: string | string[];\n\n /**\n * The name of an icon to be displayed in the input.\n */\n @Prop() icon?: string;\n\n /**\n * Display the icon on the right.\n */\n @Prop() iconRight = false;\n\n /**\n * A unique identifier for the input.\n */\n @Prop() identifier?: string;\n\n /**\n * The label for the input.\n */\n @Prop() label = '';\n\n /**\n * Visually hide the label, but still show it to assistive technologies like screen readers.\n */\n @Prop() labelHidden = false;\n\n /**\n * A maximum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() max?: string;\n\n /**\n * A minimum value for the date, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop() min?: string;\n\n /**\n * The name of the form control. Submitted with the form as part of a name/value pair.\n */\n @Prop() name?: string;\n\n /**\n * The placeholder text to display within the input.\n */\n @Prop() placeholder?: string;\n\n /**\n * A textual prefix to be displayed in the input.\n */\n @Prop() textPrefix?: string;\n\n /**\n * A textual suffix to be displayed in the input.\n */\n @Prop() textSuffix?: string;\n\n /**\n * The value is not editable.\n */\n @Prop() readonly = false;\n\n /**\n * A value is required or must be check for the form to be submittable.\n */\n @Prop() required = false;\n\n /**\n * The value of the control, given in local ISO 8601 date format YYYY-MM-DD.\n */\n @Prop({ mutable: true }) value?: string;\n\n /**\n * The validation errors for this input. Will render a hint under the input\n * with the translated error message(s) `error.${key}`. If an object is\n * passed, the keys will be used as error keys and the values translation\n * parameters.\n * If the value is `true`, the input will be marked as invalid without any\n * hints under the input.\n */\n @Prop() errors?: boolean | string[] | ErrorMap;\n\n /**\n * Fine-grained control over when the errors are shown. Can be `false` to\n * never show errors, `true` to show errors on blur, or a number to show\n * errors on change with the given delay in milliseconds.\n */\n @Prop() errorUpdate: boolean | number = 0;\n\n /**\n * Attributes that will be added to the native HTML input element.\n */\n @Prop() nativeAttributes?: { [key: string]: string };\n\n /**\n * The placement of the dropdown.\n */\n @Prop() placement: Placement = 'bottom-end';\n\n @Watch('min')\n onMinChanged(min?: string, oldMin?: string) {\n if (min !== oldMin) {\n this.reclamp('min', min);\n }\n }\n\n @Watch('max')\n onMaxChanged(max?: string, oldMax?: string) {\n if (max !== oldMax) {\n this.reclamp('max', max);\n }\n }\n\n /**\n * Emitted when the value is changed.\n */\n @Event() catChange!: EventEmitter;\n\n /**\n * Emitted when the input received focus.\n */\n @Event() catFocus!: EventEmitter;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() catBlur!: EventEmitter;\n\n private get inputValue() {\n const [match, year, month, day] = this.value?.match(/^(\\d{4})-(\\d{2})-(\\d{2})/) ?? [];\n if (match) {\n const date = new Date(Number(year), Number(month) - 1, Number(day));\n const format = new Intl.DateTimeFormat(this.language, { year: 'numeric', month: '2-digit', day: '2-digit' });\n return format.format(date);\n }\n return '';\n }\n\n componentDidLoad() {\n const format = this.locale.formatStr.replace('YYYY', 'Y').replace('YY', 'y').replace('MM', 'm').replace('DD', 'd');\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(format) || [];\n this.input?.mask({\n date: true,\n dateMin: this.min,\n dateMax: this.max,\n delimiter: d1,\n datePattern: [p1, p2, p3]\n });\n }\n\n /**\n * Programmatically move focus to the input. Use this method instead of\n * `input.focus()`.\n *\n * @param options An optional object providing options to control aspects of\n * the focusing process.\n */\n @Method()\n async doFocus(options?: FocusOptions): Promise {\n this.input?.doFocus(options);\n }\n\n /**\n * Programmatically remove focus from the input. Use this method instead of\n * `input.blur()`.\n */\n @Method()\n async doBlur(): Promise {\n this.input?.doBlur();\n }\n\n /**\n * Clear the input.\n */\n @Method()\n async clear(): Promise {\n this.input?.clear();\n }\n\n render() {\n return (\n \n (this.input = el as HTMLCatInputElement)}\n requiredMarker={this.requiredMarker}\n horizontal={this.horizontal}\n autoComplete={this.autoComplete}\n clearable={this.clearable}\n disabled={this.disabled}\n hint={this.hint}\n icon={this.icon}\n iconRight={this.iconRight}\n identifier={this.identifier}\n labelHidden={this.labelHidden}\n name={this.name}\n placeholder={this.placeholder}\n textPrefix={this.textPrefix}\n textSuffix={this.textSuffix}\n readonly={this.readonly}\n required={this.required}\n errors={this.errors}\n errorUpdate={this.errorUpdate}\n nativeAttributes={this.nativeAttributes}\n value={this.inputValue}\n onCatFocus={e => {\n e.stopPropagation();\n this.catFocus.emit(e.detail);\n }}\n onCatBlur={e => {\n e.stopPropagation();\n this.onInputBlur(e.detail);\n }}\n >\n \n {this.label}\n ({this.locale.formatStr})\n \n this.dateInline?.resetView()}\n >\n \n
\n (this.dateInline = el as HTMLCatDateInlineElement)}\n min={this.min}\n max={this.max}\n value={this.value}\n hint\n weeks\n noClear\n onCatChange={this.onDateChange.bind(this)}\n >\n
\n \n \n
\n );\n }\n\n private getTriggerA11yLabel() {\n const date = this.locale.fromLocalISO(this.value);\n return date ? `${this.locale.change}, ${this.locale.toLocalStr(date)}` : this.locale.choose;\n }\n\n private onInputBlur(e: FocusEvent) {\n if (!this.input) {\n return;\n }\n const oldValue = this.value;\n const dateParsed = this.parse(this.input.value ?? '');\n const dateMin = this.locale.fromLocalISO(this.min);\n const dateMax = this.locale.fromLocalISO(this.max);\n const date = dateParsed ? clampDate(dateMin, dateParsed, dateMax) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n if (date) {\n this.dateInline?.select(date);\n } else {\n this.dateInline?.clear();\n }\n this.catChange.emit(this.value);\n }\n this.input.value = this.inputValue;\n this.catBlur.emit(e);\n }\n\n private onDateChange(e: CustomEvent) {\n e.stopPropagation();\n const oldValue = this.value;\n const date = e.detail ? new Date(e.detail) : null;\n this.value = date ? this.locale.toLocalISO(date) : undefined;\n if (oldValue !== this.value) {\n this.catChange.emit(this.value);\n }\n }\n\n private parse(value: string) {\n const [, p1, d1, p2, p3] = /(\\w+)([^\\w]+)(\\w+)[^\\w]+(\\w+)/.exec(this.locale.formatStr) || [];\n const formatParts = [p1, p2, p3];\n const parts = value.split(d1).map(s => Number(s || 'x'));\n let year = parts[formatParts.indexOf('YYYY') || formatParts.indexOf('YY')] || this.locale.now().getFullYear();\n const month = parts[formatParts.indexOf('MM')];\n const day = parts[formatParts.indexOf('DD')];\n if (!Number.isInteger(month) || !Number.isInteger(day)) {\n return null;\n } else if (year < 100) {\n year += year < 50 ? 2000 : 1900;\n }\n return new Date(year, month - 1, day);\n }\n\n private reclamp(mode: 'min' | 'max', limit: string | undefined) {\n const oldValue = this.value;\n const oldDate = this.locale.fromLocalISO(oldValue);\n const limitDate = this.locale.fromLocalISO(limit);\n if (!oldDate || !limitDate) {\n return;\n }\n const newDate = clampDate(mode === 'min' ? limitDate : null, oldDate, mode === 'max' ? limitDate : null);\n const newValue = this.locale.toLocalISO(newDate);\n if (oldValue !== newValue) {\n this.value = newValue;\n this.catChange.emit(newValue);\n }\n }\n}\n","/*!\n* tabbable 6.2.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome,
,