Localisation updates from https://translatewiki.net.
[mediawiki.git] / resources / lib / codex / codex.cjs
blob655bda610e63a2e75b86e3b2771c3d9e6b94168b
1 "use strict";var Vn=Object.defineProperty,En=Object.defineProperties;var Nn=Object.getOwnPropertyDescriptors;var Oe=Object.getOwnPropertySymbols;var Bt=Object.prototype.hasOwnProperty,St=Object.prototype.propertyIsEnumerable;var st=(e,n,o)=>n in e?Vn(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o,Q=(e,n)=>{for(var o in n||(n={}))Bt.call(n,o)&&st(e,o,n[o]);if(Oe)for(var o of Oe(n))St.call(n,o)&&st(e,o,n[o]);return e},oe=(e,n)=>En(e,Nn(n));var de=(e,n)=>{var o={};for(var l in e)Bt.call(e,l)&&n.indexOf(l)<0&&(o[l]=e[l]);if(e!=null&&Oe)for(var l of Oe(e))n.indexOf(l)<0&&St.call(e,l)&&(o[l]=e[l]);return o};var fe=(e,n,o)=>(st(e,typeof n!="symbol"?n+"":n,o),o);var ee=(e,n,o)=>new Promise((l,i)=>{var d=a=>{try{s(o.next(a))}catch(u){i(u)}},r=a=>{try{s(o.throw(a))}catch(u){i(u)}},s=a=>a.done?l(a.value):Promise.resolve(a.value).then(d,r);s((o=o.apply(e,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),An='<path d="M11.53 2.3A1.85 1.85 0 0010 1.21 1.85 1.85 0 008.48 2.3L.36 16.36C-.48 17.81.21 19 1.88 19h16.24c1.67 0 2.36-1.19 1.52-2.64zM11 16H9v-2h2zm0-4H9V6h2z"/>',Dn='<path d="M12.43 14.34A5 5 0 0110 15a5 5 0 113.95-2L17 16.09V3a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 001.45-.63z"/><circle cx="10" cy="10" r="3"/>',Mn='<path d="M7 14.17 2.83 10l-1.41 1.41L7 17 19 5l-1.41-1.42z"/>',Ln='<path d="M10 0a10 10 0 1010 10A10 10 0 0010 0m5.66 14.24-1.41 1.41L10 11.41l-4.24 4.25-1.42-1.42L8.59 10 4.34 5.76l1.42-1.42L10 8.59l4.24-4.24 1.41 1.41L11.41 10z"/>',Tn='<path d="m4.34 2.93 12.73 12.73-1.41 1.41L2.93 4.35z"/><path d="M17.07 4.34 4.34 17.07l-1.41-1.41L15.66 2.93z"/>',Rn='<path d="M10 15 2 5h16z"/>',Fn='<path d="M13.728 1H6.272L1 6.272v7.456L6.272 19h7.456L19 13.728V6.272zM11 15H9v-2h2zm0-4H9V5h2z"/>',On='<path d="m17.5 4.75-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z"/>',Pn='<path d="M19 3H1v14h18zM3 14l3.5-4.5 2.5 3L12.5 8l4.5 6z"/><path d="M19 5H1V3h18zm0 12H1v-2h18z"/>',_n='<path d="M8 19a1 1 0 001 1h2a1 1 0 001-1v-1H8zm9-12a7 7 0 10-12 4.9S7 14 7 15v1a1 1 0 001 1h4a1 1 0 001-1v-1c0-1 2-3.1 2-3.1A7 7 0 0017 7"/>',zn='<path d="M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0M9 5h2v2H9zm0 4h2v6H9z"/>',Kn='<path d="M3 1h2v18H3zm13.5 1.5L15 1l-9 9 9 9 1.5-1.5L9 10z"/>',Hn='<path d="M15 1h2v18h-2zM3.5 2.5 11 10l-7.5 7.5L5 19l9-9-9-9z"/>',Un='<path d="M7 1 5.6 2.5 13 10l-7.4 7.5L7 19l9-9z"/>',jn='<path d="m4 10 9 9 1.4-1.5L7 10l7.4-7.5L13 1z"/>',Wn='<path d="M12.2 13.6a7 7 0 111.4-1.4l5.4 5.4-1.4 1.4zM3 8a5 5 0 1010 0A5 5 0 003 8"/>',qn='<path d="M10 0 3 8h14zm0 18-7-8h14z"/>',Qn='<path d="M10 20a10 10 0 010-20 10 10 0 110 20m-2-5 9-8.5L15.5 5 8 12 4.5 8.5 3 10z"/>',Gn='<path d="m10 5 8 10H2z"/>',Rt=An,Yn=Dn,Xn=Mn,Jn=Ln,ft=Tn,Zn=Rn,Ft=Fn,Ot=On,eo=Pn,Pt={langCodeMap:{ar:_n},default:zn},to={ltr:Kn,shouldFlip:!0},no={ltr:Hn,shouldFlip:!0},_t={ltr:Un,shouldFlip:!0},zt={ltr:jn,shouldFlip:!0},oo=Wn,lo=qn,Kt=Qn,ao=Gn;function so(e,n,o){if(typeof e=="string"||"path"in e)return e;if("shouldFlip"in e)return e.ltr;if("rtl"in e)return o==="rtl"?e.rtl:e.ltr;const l=n in e.langCodeMap?e.langCodeMap[n]:e.default;return typeof l=="string"||"path"in l?l:l.ltr}function io(e,n){if(typeof e=="string")return!1;if("langCodeMap"in e){const o=n in e.langCodeMap?e.langCodeMap[n]:e.default;if(typeof o=="string")return!1;e=o}if("shouldFlipExceptions"in e&&Array.isArray(e.shouldFlipExceptions)){const o=e.shouldFlipExceptions.indexOf(n);return o===void 0||o===-1}return"shouldFlip"in e?e.shouldFlip:!1}function Me(e){const n=t.ref(null);return t.onMounted(()=>{const o=window.getComputedStyle(e.value).direction;n.value=o==="ltr"||o==="rtl"?o:null}),n}function Ht(e){const n=t.ref("");return t.onMounted(()=>{let o=e.value;for(;o&&o.lang==="";)o=o.parentElement;n.value=o?o.lang:null}),n}function J(e){return n=>typeof n=="string"&&e.indexOf(n)!==-1}const ze="cdx",ro=["default","progressive","destructive"],uo=["normal","primary","quiet"],co=["medium","large"],po=["x-small","small","medium"],fo=["notice","warning","error","success"],Ut=J(fo),mo=["text","search","number","email","month","password","tel","url","week","date","datetime-local","time"],pe=["default","warning","error","success"],ho=["start","center","end","number"],vo=120,go=500,Se="cdx-menu-footer-item",jt=Symbol("CdxTabs"),Wt=Symbol("CdxActiveTab"),qt=Symbol("CdxAllowArbitrary"),Qt=Symbol("CdxFieldInputId"),qe=Symbol("CdxFieldDescriptionId"),Gt=Symbol("CdxFieldStatus"),Yt=Symbol("CdxDisabled"),bo="".concat(ze,"-no-invert"),Ke=Symbol("CdxTableRowIdentifier"),yo=["top","bottom","both"],Co=J(po),wo=t.defineComponent({name:"CdxIcon",props:{icon:{type:[String,Object],required:!0},iconLabel:{type:String,default:""},lang:{type:String,default:null},dir:{type:String,default:null},size:{type:String,default:"medium",validator:Co}},setup(e){const n=t.ref(),o=Me(n),l=Ht(n),i=t.computed(()=>{var c;return(c=e.dir)!=null?c:o.value}),d=t.computed(()=>{var c;return(c=e.lang)!=null?c:l.value}),r=t.computed(()=>({"cdx-icon--flipped":i.value==="rtl"&&d.value!==null&&io(e.icon,d.value),["cdx-icon--".concat(e.size)]:!0})),s=t.computed(()=>{var c,p;return so(e.icon,(c=d.value)!=null?c:"",(p=i.value)!=null?p:"ltr")}),a=t.computed(()=>typeof s.value=="string"?s.value:""),u=t.computed(()=>typeof s.value!="string"?s.value.path:"");return{rootElement:n,rootClasses:r,iconSvg:a,iconPath:u}}}),P=(e,n)=>{const o=e.__vccOpts||e;for(const[l,i]of n)o[l]=i;return o},ko=["aria-hidden"],$o={key:0},Bo=["innerHTML"],So=["d"];function xo(e,n,o,l,i,d){return t.openBlock(),t.createElementBlock("span",{ref:"rootElement",class:t.normalizeClass(["cdx-icon",e.rootClasses])},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":e.iconLabel?void 0:!0},[e.iconLabel?(t.openBlock(),t.createElementBlock("title",$o,t.toDisplayString(e.iconLabel),1)):t.createCommentVNode("v-if",!0),e.iconSvg?(t.openBlock(),t.createElementBlock("g",{key:1,innerHTML:e.iconSvg},null,8,Bo)):(t.openBlock(),t.createElementBlock("path",{key:2,d:e.iconPath},null,8,So))],8,ko))],2)}const q=P(wo,[["render",xo]]);function Xt(e){const n=[];for(const o of e)typeof o.type=="string"||typeof o.type=="object"?n.push(o):o.type!==t.Comment&&(typeof o.children=="string"&&o.children.trim()!==""?n.push(o.children):Array.isArray(o.children)&&n.push(...Xt(o.children)));return n}function Jt(e,n){return typeof e.type=="object"&&"name"in e.type?n!==void 0?e.type.name===n:!0:!1}function Io(e,n){return typeof e.type=="string"?e.type===n.toLowerCase():!1}function Qe(e){const n=typeof e=="function"?e():e;return n?Xt(n):[]}function Ge(e,n){if(e()){t.warn(n);return}const o=t.watch(e,l=>{l&&(t.warn(n),o())})}function Zt(e,n,o){const l=t.computed(()=>{const i=Qe(e);if(i.length!==1)return!1;const d=i[0];return!!(typeof d=="object"&&(Jt(d,"CdxIcon")||Io(d,"svg")))});return Ge(()=>l.value&&!n["aria-label"]&&!n["aria-hidden"],"".concat(o,": Icon-only buttons require one of the following attributes: aria-label or aria-hidden. See documentation at https://doc.wikimedia.org/codex/latest/components/demos/button.html#icon-only-button")),l}const Vo=J(ro),Eo=J(uo),No=J(co),Ao=t.defineComponent({name:"CdxButton",props:{action:{type:String,default:"default",validator:Vo},weight:{type:String,default:"normal",validator:Eo},size:{type:String,default:"medium",validator:No}},emits:["click"],setup(e,{emit:n,slots:o,attrs:l}){const i=t.ref(),d=Zt(o.default,l,"CdxButton"),r=t.ref(!1),s=t.computed(()=>({["cdx-button--action-".concat(e.action)]:!0,["cdx-button--weight-".concat(e.weight)]:!0,["cdx-button--size-".concat(e.size)]:!0,"cdx-button--framed":e.weight!=="quiet","cdx-button--icon-only":d.value,"cdx-button--is-active":r.value})),a=f=>{n("click",f)},u=f=>{r.value=f};function c(){u(!0)}function p(){var f;u(!1),(f=i.value)==null||f.click()}return{button:i,rootClasses:s,onClick:a,onKeyDown:c,onKeyUp:p}}});function Do(e,n,o,l,i,d){return t.openBlock(),t.createElementBlock("button",{ref:"button",class:t.normalizeClass(["cdx-button",e.rootClasses]),onKeydown:n[0]||(n[0]=t.withKeys(t.withModifiers((...r)=>e.onKeyDown&&e.onKeyDown(...r),["prevent"]),["space","enter"])),onKeyup:n[1]||(n[1]=t.withKeys((...r)=>e.onKeyUp&&e.onKeyUp(...r),["space","enter"])),onClick:n[2]||(n[2]=(...r)=>e.onClick&&e.onClick(...r))},[t.renderSlot(e.$slots,"default")],34)}const ve=P(Ao,[["render",Do]]),Mo=t.defineComponent({name:"CdxAccordion",components:{CdxButton:ve,CdxIcon:q},props:{actionAlwaysVisible:{type:Boolean,default:!1},actionIcon:{type:[String,Object],default:null},actionButtonLabel:{type:String,default:""},headingLevel:{type:String,default:"h3"}},emits:["action-button-click"],setup(e,{attrs:n,emit:o}){const l=t.ref("open"in n),i=()=>{o("action-button-click")},d=a=>{l.value=a.newState==="open"},r=t.computed(()=>e.actionIcon&&(l.value||e.actionAlwaysVisible)),s=t.computed(()=>({"cdx-accordion--has-icon":r.value}));return{emitActionButtonClick:i,rootClasses:s,shouldShowActionButton:r,onToggle:d}}}),Lo={class:"cdx-accordion__header__title"},To={class:"cdx-accordion__header__description"};function Ro(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("details",{class:t.normalizeClass(["cdx-accordion",e.rootClasses]),onToggle:n[1]||(n[1]=(...a)=>e.onToggle&&e.onToggle(...a))},[t.createElementVNode("summary",null,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.headingLevel),{class:"cdx-accordion__header"},{default:t.withCtx(()=>[t.createElementVNode("span",Lo,[t.renderSlot(e.$slots,"title")]),t.createElementVNode("span",To,[t.renderSlot(e.$slots,"description")])]),_:3})),e.shouldShowActionButton?(t.openBlock(),t.createBlock(s,{key:0,class:"cdx-accordion__action","aria-label":e.actionButtonLabel,type:"button",weight:"quiet",onClick:t.withModifiers(e.emitActionButtonClick,["stop"])},{default:t.withCtx(()=>[t.createVNode(r,{icon:e.actionIcon,"icon-label":e.actionButtonLabel,size:"medium"},null,8,["icon","icon-label"])]),_:1},8,["aria-label","onClick"])):t.createCommentVNode("v-if",!0)]),t.createElementVNode("div",{class:"cdx-accordion__content",onClick:n[0]||(n[0]=t.withModifiers(()=>{},["stop"]))},[t.renderSlot(e.$slots,"default")])],34)}const Fo=P(Mo,[["render",Ro]]);function en(e){return e.label===void 0?e.value:e.label===null?"":e.label}function tn(e){const n=t.ref(),o=t.ref(),l=t.ref(new Map),i=Me(n);function d(h,g){const C=h;C&&l.value.set(g,C)}function r(h){o.value=h}function s(){o.value=void 0}function a(h,g){var B;const C=h+g,k=e.value[C];if(k)if(k.disabled)a(C,g);else{const $=(B=l.value.get(C))==null?void 0:B.$el;$==null||$.focus()}}function u(){var h;a((h=o.value)!=null?h:-1,1)}function c(){var h;a((h=o.value)!=null?h:e.value.length,-1)}function p(){i.value==="rtl"?c():u()}function f(){i.value==="rtl"?u():c()}function m(h){switch(h.key){case"ArrowRight":h.preventDefault(),p();break;case"ArrowLeft":h.preventDefault(),f();break;case"ArrowDown":h.preventDefault(),u();break;case"ArrowUp":h.preventDefault(),c();break}}return{rootElement:n,assignTemplateRef:d,onFocus:r,onBlur:s,onKeydown:m}}const Oo=t.defineComponent({name:"CdxButtonGroup",components:{CdxButton:ve,CdxIcon:q},props:{buttons:{type:Array,required:!0,validator:e=>Array.isArray(e)&&e.length>=1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e){const{rootElement:n,assignTemplateRef:o,onFocus:l,onBlur:i,onKeydown:d}=tn(t.toRef(e,"buttons"));return{rootElement:n,assignTemplateRef:o,onFocus:l,onBlur:i,onKeydown:d,getButtonLabel:en}}}),Po={ref:"rootElement",class:"cdx-button-group"};function _o(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",Po,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.buttons,(a,u)=>(t.openBlock(),t.createBlock(s,{key:a.value,ref_for:!0,ref:c=>e.assignTemplateRef(c,u),disabled:a.disabled||e.disabled,"aria-label":a.ariaLabel,onClick:c=>e.$emit("click",a.value),onFocus:c=>e.onFocus(u),onBlur:e.onBlur,onKeydown:e.onKeydown},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{button:a},()=>[a.icon?(t.openBlock(),t.createBlock(r,{key:0,icon:a.icon},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createTextVNode(" "+t.toDisplayString(e.getButtonLabel(a)),1)])]),_:2},1032,["disabled","aria-label","onClick","onFocus","onBlur","onKeydown"]))),128))],512)}const zo=P(Oo,[["render",_o]]),Ko=t.defineComponent({name:"CdxThumbnail",components:{CdxIcon:q},props:{thumbnail:{type:[Object,null],default:null},placeholderIcon:{type:[String,Object],default:eo}},setup:e=>{const n=t.ref(!1),o=t.ref({}),l=i=>{const d=i.replace(/([\\"\n])/g,"\\$1"),r=new Image;r.onload=()=>{o.value={backgroundImage:'url("'.concat(d,'")')},n.value=!0},r.onerror=()=>{n.value=!1},r.src=d};return t.onMounted(()=>{var i;(i=e.thumbnail)!=null&&i.url&&l(e.thumbnail.url)}),{thumbnailStyle:o,thumbnailLoaded:n,NoInvertClass:bo}}}),Ho={class:"cdx-thumbnail"},Uo={key:0,class:"cdx-thumbnail__placeholder"};function jo(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("span",Ho,[e.thumbnailLoaded?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("span",Uo,[t.createVNode(r,{icon:e.placeholderIcon,class:"cdx-thumbnail__placeholder__icon--vue"},null,8,["icon"])])),t.createVNode(t.Transition,{name:"cdx-thumbnail__image"},{default:t.withCtx(()=>[e.thumbnailLoaded?(t.openBlock(),t.createElementBlock("span",{key:0,style:t.normalizeStyle(e.thumbnailStyle),class:t.normalizeClass([e.NoInvertClass,"cdx-thumbnail__image"])},null,6)):t.createCommentVNode("v-if",!0)]),_:1})])}const mt=P(Ko,[["render",jo]]),Wo=t.defineComponent({name:"CdxCard",components:{CdxIcon:q,CdxThumbnail:mt},props:{url:{type:String,default:""},icon:{type:[String,Object],default:""},thumbnail:{type:[Object,null],default:null},forceThumbnail:{type:Boolean,default:!1},customPlaceholderIcon:{type:[String,Object],default:void 0}},setup(e){const n=t.computed(()=>!!e.url),o=t.computed(()=>n.value?"a":"span"),l=t.computed(()=>n.value?e.url:void 0);return{isLink:n,contentTag:o,cardLink:l}}}),qo={class:"cdx-card__text"},Qo={class:"cdx-card__text__title"},Go={key:0,class:"cdx-card__text__description"},Yo={key:1,class:"cdx-card__text__supporting-text"};function Xo(e,n,o,l,i,d){const r=t.resolveComponent("cdx-thumbnail"),s=t.resolveComponent("cdx-icon");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.contentTag),{href:e.cardLink,class:t.normalizeClass(["cdx-card",{"cdx-card--is-link":e.isLink,"cdx-card--title-only":!e.$slots.description&&!e.$slots["supporting-text"]}])},{default:t.withCtx(()=>[e.thumbnail||e.forceThumbnail?(t.openBlock(),t.createBlock(r,{key:0,thumbnail:e.thumbnail,"placeholder-icon":e.customPlaceholderIcon,class:"cdx-card__thumbnail"},null,8,["thumbnail","placeholder-icon"])):e.icon?(t.openBlock(),t.createBlock(s,{key:1,icon:e.icon,class:"cdx-card__icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",qo,[t.createElementVNode("span",Qo,[t.renderSlot(e.$slots,"title")]),e.$slots.description?(t.openBlock(),t.createElementBlock("span",Go,[t.renderSlot(e.$slots,"description")])):t.createCommentVNode("v-if",!0),e.$slots["supporting-text"]?(t.openBlock(),t.createElementBlock("span",Yo,[t.renderSlot(e.$slots,"supporting-text")])):t.createCommentVNode("v-if",!0)])]),_:3},8,["href","class"])}const Jo=P(Wo,[["render",Xo]]);function ht(e){const n=t.inject(Yt,t.ref(!1));return t.computed(()=>n.value||e.value)}function le(e,n,o){const l=ht(e),i=t.inject(Gt,t.ref("default")),d=t.computed(()=>n!=null&&n.value&&n.value!=="default"?n.value:i.value),r=t.inject(Qt,void 0),s=t.computed(()=>{var a;return(a=r==null?void 0:r.value)!=null?a:o});return{computedDisabled:l,computedStatus:d,computedInputId:s}}function ae(e,n=t.computed(()=>({}))){const o=t.computed(()=>{const d=de(n.value,[]);return e.class&&e.class.split(" ").forEach(s=>{d[s]=!0}),d}),l=t.computed(()=>{if("style"in e)return e.style}),i=t.computed(()=>{const a=e,{class:d,style:r}=a;return de(a,["class","style"])});return{rootClasses:o,rootStyle:l,otherAttrs:i}}function W(e,n,o=[]){const l=t.inject("CdxI18nFunction",void 0);return t.computed(()=>{const i=o.map(r=>typeof r=="function"?r():r.value),d=l==null?void 0:l(e,...i);return d!=null?d:typeof n=="function"?n(...i):n})}function Ye(e,n,o,l=[]){const i=W(n,o,l);return t.computed(()=>e.value||i.value)}const Zo=t.defineComponent({name:"CdxLabel",components:{CdxIcon:q},inheritAttrs:!1,props:{icon:{type:[String,Object],default:null},optional:{type:Boolean,default:!1},optionalFlag:{type:String,default:""},visuallyHidden:{type:Boolean,default:!1},isLegend:{type:Boolean,default:!1},inputId:{type:String,default:""},descriptionId:{type:String,default:""},disabled:{type:Boolean,default:!1}},setup(e,{attrs:n}){const{computedDisabled:o}=le(t.toRef(e,"disabled")),l=t.computed(()=>({"cdx-label--visually-hidden":e.visuallyHidden,"cdx-label--disabled":o.value})),{rootClasses:i,rootStyle:d,otherAttrs:r}=ae(n,l),s=Ye(t.toRef(e,"optionalFlag"),"cdx-label-optional-flag","(optional)");return{rootClasses:i,rootStyle:d,otherAttrs:r,translatedOptionalFlag:s}}}),el=["for"],tl={class:"cdx-label__label__text"},nl={key:1,class:"cdx-label__label__optional-flag"},ol=["id"],ll={class:"cdx-label__label"},al={class:"cdx-label__label__text"},sl={key:1,class:"cdx-label__label__optional-flag"},il={key:0,class:"cdx-label__description"};function rl(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon");return e.isLegend?(t.openBlock(),t.createElementBlock("legend",t.mergeProps({key:1,class:["cdx-label",e.rootClasses],style:e.rootStyle},e.otherAttrs),[t.createElementVNode("span",ll,[e.icon?(t.openBlock(),t.createBlock(r,{key:0,icon:e.icon,class:"cdx-label__label__icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",al,[t.renderSlot(e.$slots,"default")]),e.optionalFlag||e.optional?(t.openBlock(),t.createElementBlock("span",sl,t.toDisplayString(" ")+" "+t.toDisplayString(e.translatedOptionalFlag),1)):t.createCommentVNode("v-if",!0)]),e.$slots.description&&e.$slots.description().length>0?(t.openBlock(),t.createElementBlock("span",il,[t.renderSlot(e.$slots,"description")])):t.createCommentVNode("v-if",!0)],16)):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["cdx-label",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("label",t.mergeProps({class:"cdx-label__label",for:e.inputId?e.inputId:void 0},e.otherAttrs),[e.icon?(t.openBlock(),t.createBlock(r,{key:0,icon:e.icon,class:"cdx-label__label__icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",tl,[t.renderSlot(e.$slots,"default")]),e.optionalFlag||e.optional?(t.openBlock(),t.createElementBlock("span",nl,t.toDisplayString(" ")+" "+t.toDisplayString(e.translatedOptionalFlag),1)):t.createCommentVNode("v-if",!0)],16,el),e.$slots.description&&e.$slots.description().length>0?(t.openBlock(),t.createElementBlock("span",{key:0,id:e.descriptionId||void 0,class:"cdx-label__description"},[t.renderSlot(e.$slots,"description")],8,ol)):t.createCommentVNode("v-if",!0)],6))}const Le=P(Zo,[["render",rl]]);function vt(e,n,o){Ge(()=>Qe(e).length===0&&!(n!=null&&n["aria-label"])&&!(n!=null&&n["aria-labelledby"]),"".concat(o,": Inputs must have an associated label. Provide one of the following:\n - A label via the appropriate slot\n - An `aria-label` attribute set to the label text\n - An `aria-labelledby` attribute set to the ID of the label element"))}function ne(e,n,o){return t.computed({get:()=>e.value,set:l=>n(o||"update:modelValue",l)})}let it=0;function U(e){var l;const n=t.getCurrentInstance(),o=(l=n==null?void 0:n.props.id)!=null?l:n==null?void 0:n.attrs.id;return e?"".concat(ze,"-").concat(e,"-").concat(it++):o?"".concat(ze,"-").concat(o,"-").concat(it++):"".concat(ze,"-").concat(it++)}const dl=J(pe),ul=t.defineComponent({name:"CdxCheckbox",components:{CdxLabel:Le},props:{modelValue:{type:[Boolean,Array],default:!1},inputValue:{type:[String,Number,Boolean],default:!1},name:{type:String,default:null},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},hideLabel:{type:Boolean,default:!1},status:{type:String,default:"default",validator:dl}},emits:["update:modelValue"],setup(e,{emit:n,slots:o,attrs:l}){var f;vt((f=o.default)==null?void 0:f.call(o),l,"CdxCheckbox");const{computedDisabled:i,computedStatus:d}=le(t.toRef(e,"disabled"),t.toRef(e,"status")),r=t.computed(()=>({"cdx-checkbox--inline":e.inline,["cdx-checkbox--status-".concat(d.value)]:!0})),s=t.computed(()=>({"cdx-checkbox__custom-input--inline":e.inline})),a=t.ref(),u=U("checkbox"),c=U("description"),p=ne(t.toRef(e,"modelValue"),n);return{rootClasses:r,computedDisabled:i,input:a,checkboxId:u,descriptionId:c,wrappedModel:p,customInputClasses:s}}}),cl={class:"cdx-checkbox__wrapper"},pl=["id","aria-describedby","value","name","disabled",".indeterminate"],fl=t.createElementVNode("span",{class:"cdx-checkbox__icon"},null,-1);function ml(e,n,o,l,i,d){const r=t.resolveComponent("cdx-label");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-checkbox",e.rootClasses])},[t.createElementVNode("div",cl,[t.withDirectives(t.createElementVNode("input",{id:e.checkboxId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=s=>e.wrappedModel=s),class:"cdx-checkbox__input",type:"checkbox","aria-describedby":e.$slots.description&&e.$slots.description().length>0?e.descriptionId:void 0,value:e.inputValue,name:e.name,disabled:e.computedDisabled,".indeterminate":e.indeterminate},null,40,pl),[[t.vModelCheckbox,e.wrappedModel]]),fl,e.$slots.default&&e.$slots.default().length?(t.openBlock(),t.createBlock(r,{key:0,class:"cdx-checkbox__label","input-id":e.checkboxId,"description-id":e.$slots.description&&e.$slots.description().length>0?e.descriptionId:void 0,disabled:e.computedDisabled,"visually-hidden":e.hideLabel},t.createSlots({default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:2},[e.$slots.description&&e.$slots.description().length>0?{name:"description",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"description")]),key:"0"}:void 0]),1032,["input-id","description-id","disabled","visually-hidden"])):t.createCommentVNode("v-if",!0)]),e.$slots["custom-input"]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["cdx-checkbox__custom-input",e.customInputClasses])},[t.renderSlot(e.$slots,"custom-input")],2)):t.createCommentVNode("v-if",!0)],2)}const nn=P(ul,[["render",ml]]),hl=t.defineComponent({name:"CdxInputChip",components:{CdxButton:ve,CdxIcon:q},props:{icon:{type:[String,Object],default:null},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},expose:["focus"],emits:["remove-chip","click-chip","arrow-left","arrow-right"],setup(e,{emit:n}){const o=t.computed(()=>e.disabled?-1:0),l=t.ref(),i=t.computed(()=>({"cdx-input-chip--disabled":e.disabled,"cdx-input-chip--readonly":e.readonly})),d=W("cdx-input-chip-aria-description","Press Enter to edit or Delete to remove");function r(s){var a;switch(s.key){case"Enter":n("click-chip"),s.preventDefault(),s.stopPropagation();break;case"Escape":(a=l.value)==null||a.blur(),s.preventDefault(),s.stopPropagation();break;case"Backspace":case"Delete":n("remove-chip",s.key),s.preventDefault(),s.stopPropagation();break;case"ArrowLeft":n("arrow-left"),s.preventDefault(),s.stopPropagation();break;case"ArrowRight":n("arrow-right"),s.preventDefault(),s.stopPropagation();break}}return{rootElement:l,rootClasses:i,ariaDescription:d,onKeydown:r,cdxIconClose:ft,tabIndex:o}},methods:{focus(){this.$refs.rootElement.focus()}}}),vl=["tabindex","aria-description"],gl={class:"cdx-input-chip__text"};function bl(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{ref:"rootElement",class:t.normalizeClass(["cdx-input-chip",e.rootClasses]),tabindex:e.tabIndex,role:"option","aria-description":e.ariaDescription,onKeydown:n[1]||(n[1]=(...a)=>e.onKeydown&&e.onKeydown(...a)),onClick:n[2]||(n[2]=a=>e.$emit("click-chip"))},[e.icon?(t.openBlock(),t.createBlock(r,{key:0,icon:e.icon,size:"small"},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",gl,[t.renderSlot(e.$slots,"default")]),t.createVNode(s,{class:"cdx-input-chip__button",weight:"quiet",tabindex:"-1","aria-hidden":"true",disabled:e.disabled,onClick:n[0]||(n[0]=t.withModifiers(a=>e.$emit("remove-chip","button"),["stop"]))},{default:t.withCtx(()=>[t.createVNode(r,{icon:e.cdxIconClose,size:"x-small"},null,8,["icon"])]),_:1},8,["disabled"])],42,vl)}const yl=P(hl,[["render",bl]]);function Xe(e,n,o,l){return t.computed({get:()=>{var i;return(i=n.value)!=null?i:e.value},set:i=>{n.value!==null?o(l||"update:modelValue",i):e.value=i}})}const Cl=J(pe),wl=t.defineComponent({name:"CdxChipInput",components:{CdxInputChip:yl},inheritAttrs:!1,props:{inputChips:{type:Array,required:!0},inputValue:{type:[String,Number],default:null},separateInput:{type:Boolean,default:!1},status:{type:String,default:"default",validator:Cl},chipValidator:{type:Function,default:e=>!0},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["update:input-chips","update:input-value"],setup(e,{emit:n,attrs:o}){const l=t.ref(),i=t.ref(),d=t.ref(),r=t.ref(""),s=Me(l),a=t.ref(),u=t.inject(qt,t.ref(!0)),c=t.ref(""),p=Xe(c,t.toRef(e,"inputValue"),n,"update:input-value"),f=t.ref("default"),m=t.computed(()=>f.value==="error"||e.status==="error"?"error":"default"),{computedDisabled:h,computedStatus:g}=le(t.toRef(e,"disabled"),m),C=t.ref(!1),k=t.computed(()=>({"cdx-chip-input--has-separate-input":e.separateInput,["cdx-chip-input--status-".concat(g.value)]:!0,"cdx-chip-input--focused":C.value,"cdx-chip-input--disabled":h.value,"cdx-chip-input--readonly":e.readonly})),{rootClasses:B,rootStyle:$,otherAttrs:I}=ae(o,k),E=[],M=t.ref(null),A=t.computed(()=>M.value?M.value.value:""),x=W("cdx-chip-input-chip-added",w=>"Chip ".concat(w," was added."),[p]),y=W("cdx-chip-input-chip-removed",w=>"Chip ".concat(w," was removed."),[A]);function b(w,T){w!==null&&(E[T]=w)}const S=()=>{a.value.focus()};function V(){e.inputChips.find(w=>w.value===p.value)||!e.chipValidator(p.value)?f.value="error":p.value.toString().length>0&&(r.value=x.value,n("update:input-chips",e.inputChips.concat({value:p.value})),p.value="")}function R(w){e.readonly||h.value||n("update:input-chips",e.inputChips.filter(T=>T.value!==w.value))}function z(w,T){const K=s.value==="ltr"&&w==="left"||s.value==="rtl"&&w==="right"?-1:1,Y=T+K;if(!(Y<0)){if(Y>=e.inputChips.length){S();return}E[Y].focus()}}function L(w){return ee(this,null,function*(){var T;e.readonly||h.value||(V(),yield t.nextTick(),R(w),p.value=(T=w.label)!=null?T:w.value,S())})}function F(w,T,K){if(M.value=w,r.value=y.value,K==="button")S();else if(K==="Backspace"){const Y=T===0?1:T-1;Y<e.inputChips.length?E[Y].focus():S()}else if(K==="Delete"){const Y=T+1;Y<e.inputChips.length?E[Y].focus():S()}R(w)}function G(w){var K,Y;const T=s.value==="rtl"?"ArrowRight":"ArrowLeft";switch(w.key){case"Enter":if(p.value.toString().length>0&&u.value){V(),w.preventDefault(),w.stopPropagation();return}break;case"Escape":(K=a.value)==null||K.blur(),w.preventDefault(),w.stopPropagation();return;case"Backspace":case T:if(((Y=a.value)==null?void 0:Y.selectionStart)===0&&a.value.selectionEnd===0&&e.inputChips.length>0){E[e.inputChips.length-1].focus(),w.preventDefault(),w.stopPropagation();return}break}}function j(){C.value=!0}function te(){C.value=!1}function Z(w){var T;!((T=l.value)!=null&&T.contains(w.relatedTarget))&&u.value&&V()}return t.watch(t.toRef(e,"inputChips"),w=>{const T=w.find(K=>K.value===p.value);f.value=T?"error":"default"}),t.watch(p,()=>{f.value==="error"&&(f.value="default")}),{rootElement:l,chipsContainer:i,separateInputWrapper:d,input:a,computedInputValue:p,rootClasses:B,rootStyle:$,otherAttrs:I,assignChipTemplateRef:b,handleChipClick:L,handleChipRemove:F,moveChipFocus:z,onInputKeydown:G,focusInput:S,onInputFocus:j,onInputBlur:te,onFocusOut:Z,computedDisabled:h,statusMessageContent:r}}}),kl={ref:"chipsContainer",class:"cdx-chip-input__chips",role:"listbox","aria-orientation":"horizontal"},$l=["readonly","disabled"],Bl={key:0,ref:"separateInputWrapper",class:"cdx-chip-input__separate-input"},Sl=["readonly","disabled"],xl={class:"cdx-chip-input__aria-status",role:"status","aria-live":"polite"};function Il(e,n,o,l,i,d){const r=t.resolveComponent("cdx-input-chip");return t.openBlock(),t.createElementBlock("div",{ref:"rootElement",class:t.normalizeClass(["cdx-chip-input",e.rootClasses]),style:t.normalizeStyle(e.rootStyle),onClick:n[8]||(n[8]=s=>e.disabled||e.readonly?null:e.focusInput),onFocusout:n[9]||(n[9]=(...s)=>e.onFocusOut&&e.onFocusOut(...s))},[t.createElementVNode("div",kl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.inputChips,(s,a)=>(t.openBlock(),t.createBlock(r,{key:s.value,ref_for:!0,ref:u=>e.assignChipTemplateRef(u,a),class:"cdx-chip-input__item",icon:s.icon,readonly:e.readonly,disabled:e.computedDisabled,onClickChip:u=>e.handleChipClick(s),onRemoveChip:u=>e.handleChipRemove(s,a,u),onArrowLeft:u=>e.moveChipFocus("left",a),onArrowRight:u=>e.moveChipFocus("right",a)},{default:t.withCtx(()=>{var u;return[t.createTextVNode(t.toDisplayString((u=s.label)!=null?u:s.value),1)]}),_:2},1032,["icon","readonly","disabled","onClickChip","onRemoveChip","onArrowLeft","onArrowRight"]))),128)),e.separateInput?t.createCommentVNode("v-if",!0):t.withDirectives((t.openBlock(),t.createElementBlock("input",t.mergeProps({key:0,ref:"input","onUpdate:modelValue":n[0]||(n[0]=s=>e.computedInputValue=s),class:"cdx-chip-input__input",readonly:e.readonly,disabled:e.computedDisabled},e.otherAttrs,{onBlur:n[1]||(n[1]=(...s)=>e.onInputBlur&&e.onInputBlur(...s)),onFocus:n[2]||(n[2]=(...s)=>e.onInputFocus&&e.onInputFocus(...s)),onKeydown:n[3]||(n[3]=(...s)=>e.onInputKeydown&&e.onInputKeydown(...s))}),null,16,$l)),[[t.vModelDynamic,e.computedInputValue]])],512),e.separateInput?(t.openBlock(),t.createElementBlock("div",Bl,[t.withDirectives(t.createElementVNode("input",t.mergeProps({ref:"input","onUpdate:modelValue":n[4]||(n[4]=s=>e.computedInputValue=s),class:"cdx-chip-input__input",readonly:e.readonly,disabled:e.computedDisabled},e.otherAttrs,{onBlur:n[5]||(n[5]=(...s)=>e.onInputBlur&&e.onInputBlur(...s)),onFocus:n[6]||(n[6]=(...s)=>e.onInputFocus&&e.onInputFocus(...s)),onKeydown:n[7]||(n[7]=(...s)=>e.onInputKeydown&&e.onInputKeydown(...s))}),null,16,Sl),[[t.vModelDynamic,e.computedInputValue]])],512)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",xl,t.toDisplayString(e.statusMessageContent),1)],38)}const on=P(wl,[["render",Il]]);function ln(e){return e.replace(/([\\{}()|.?*+\-^$[\]])/g,"\\$1")}const Vl="[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-᪾ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯]";function an(e,n){if(!e)return[n,"",""];const o=ln(e),l=new RegExp(o+Vl+"*","i").exec(n);if(!l||l.index===void 0)return[n,"",""];const i=l.index,d=i+l[0].length,r=n.slice(i,d),s=n.slice(0,i),a=n.slice(d,n.length);return[s,r,a]}const El=Object.freeze(Object.defineProperty({__proto__:null,regExpEscape:ln,splitStringAtMatch:an},Symbol.toStringTag,{value:"Module"})),Nl=t.defineComponent({name:"CdxSearchResultTitle",props:{title:{type:String,required:!0},searchQuery:{type:String,default:""}},setup:e=>({titleChunks:t.computed(()=>an(e.searchQuery,String(e.title)))})}),Al={class:"cdx-search-result-title"},Dl={class:"cdx-search-result-title__match"};function Ml(e,n,o,l,i,d){return t.openBlock(),t.createElementBlock("span",Al,[t.createElementVNode("bdi",null,[t.createTextVNode(t.toDisplayString(e.titleChunks[0]),1),t.createElementVNode("span",Dl,t.toDisplayString(e.titleChunks[1]),1),t.createTextVNode(t.toDisplayString(e.titleChunks[2]),1)])])}const sn=P(Nl,[["render",Ml]]),Ll=t.defineComponent({name:"CdxMenuItem",components:{CdxIcon:q,CdxThumbnail:mt,CdxSearchResultTitle:sn},props:{id:{type:String,required:!0},value:{type:[String,Number],required:!0},disabled:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},active:{type:Boolean,default:!1},highlighted:{type:Boolean,default:!1},label:{type:String,default:""},match:{type:String,default:""},supportingText:{type:String,default:""},url:{type:String,default:""},icon:{type:[String,Object],default:""},showThumbnail:{type:Boolean,default:!1},thumbnail:{type:[Object,null],default:null},description:{type:[String,null],default:""},searchQuery:{type:String,default:""},boldLabel:{type:Boolean,default:!1},hideDescriptionOverflow:{type:Boolean,default:!1},language:{type:Object,default:()=>({})},action:{type:String,default:"default"},multiselect:{type:Boolean,default:!1}},emits:["change"],setup:(e,{emit:n})=>{const o=()=>{e.highlighted||n("change","highlighted",!0)},l=()=>{n("change","highlighted",!1)},i=c=>{c.button===0&&n("change","active",!0)},d=()=>{n("change","selected",!0)},r=t.computed(()=>e.searchQuery.length>0),s=t.computed(()=>({"cdx-menu-item--selected":e.selected,"cdx-menu-item--active":e.active&&e.highlighted,"cdx-menu-item--highlighted":e.highlighted,"cdx-menu-item--destructive":e.action&&e.action==="destructive","cdx-menu-item--enabled":!e.disabled,"cdx-menu-item--disabled":e.disabled,"cdx-menu-item--highlight-query":r.value,"cdx-menu-item--bold-label":e.boldLabel,"cdx-menu-item--has-description":!!e.description,"cdx-menu-item--hide-description-overflow":e.hideDescriptionOverflow})),a=t.computed(()=>e.url?"a":"span"),u=t.computed(()=>e.label||String(e.value));return{onMouseMove:o,onMouseLeave:l,onMouseDown:i,onClick:d,highlightQuery:r,rootClasses:s,contentTag:a,title:u,cdxIconCheck:Xn}}}),Tl=["id","aria-disabled","aria-selected","aria-checked"],Rl={class:"cdx-menu-item__text"},Fl=["lang"],Ol=["lang"],Pl=["lang"],_l=["lang"];function zl(e,n,o,l,i,d){const r=t.resolveComponent("cdx-thumbnail"),s=t.resolveComponent("cdx-icon"),a=t.resolveComponent("cdx-search-result-title");return t.openBlock(),t.createElementBlock("li",{id:e.id,role:"option",class:t.normalizeClass(["cdx-menu-item",e.rootClasses]),"aria-disabled":e.disabled,"aria-selected":e.selected&&!e.multiselect?!0:void 0,"aria-checked":e.selected&&e.multiselect?!0:void 0,onMousemove:n[0]||(n[0]=(...u)=>e.onMouseMove&&e.onMouseMove(...u)),onMouseleave:n[1]||(n[1]=(...u)=>e.onMouseLeave&&e.onMouseLeave(...u)),onMousedown:n[2]||(n[2]=t.withModifiers((...u)=>e.onMouseDown&&e.onMouseDown(...u),["prevent"])),onClick:n[3]||(n[3]=(...u)=>e.onClick&&e.onClick(...u))},[t.renderSlot(e.$slots,"default",{},()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.contentTag),{href:e.url?e.url:void 0,class:"cdx-menu-item__content"},{default:t.withCtx(()=>{var u,c,p,f,m,h;return[e.showThumbnail?(t.openBlock(),t.createBlock(r,{key:0,thumbnail:e.thumbnail,class:"cdx-menu-item__thumbnail"},null,8,["thumbnail"])):e.icon?(t.openBlock(),t.createBlock(s,{key:1,icon:e.icon,class:"cdx-menu-item__icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",Rl,[e.highlightQuery?(t.openBlock(),t.createBlock(a,{key:0,title:e.title,"search-query":e.searchQuery,lang:(u=e.language)==null?void 0:u.label},null,8,["title","search-query","lang"])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"cdx-menu-item__text__label",lang:(c=e.language)==null?void 0:c.label},[t.createElementVNode("bdi",null,t.toDisplayString(e.title),1)],8,Fl)),e.match?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(" ")+" "),e.highlightQuery?(t.openBlock(),t.createBlock(a,{key:0,title:e.match,"search-query":e.searchQuery,lang:(p=e.language)==null?void 0:p.match},null,8,["title","search-query","lang"])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"cdx-menu-item__text__match",lang:(f=e.language)==null?void 0:f.match},[t.createElementVNode("bdi",null,t.toDisplayString(e.match),1)],8,Ol))],64)):t.createCommentVNode("v-if",!0),e.supportingText?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(" ")+" "),t.createElementVNode("span",{class:"cdx-menu-item__text__supporting-text",lang:(m=e.language)==null?void 0:m.supportingText},[t.createElementVNode("bdi",null,t.toDisplayString(e.supportingText),1)],8,Pl)],64)):t.createCommentVNode("v-if",!0),e.description?(t.openBlock(),t.createElementBlock("span",{key:4,class:"cdx-menu-item__text__description",lang:(h=e.language)==null?void 0:h.description},[t.createElementVNode("bdi",null,t.toDisplayString(e.description),1)],8,_l)):t.createCommentVNode("v-if",!0)]),e.multiselect&&e.selected?(t.openBlock(),t.createBlock(s,{key:2,icon:e.cdxIconCheck,size:"small",class:"cdx-menu-item__selected-icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0)]}),_:1},8,["href"]))])],42,Tl)}const rn=P(Ll,[["render",zl]]),Kl=t.defineComponent({name:"CdxProgressBar",props:{inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e,{attrs:n}){Ge(()=>!e.inline&&!n["aria-label"]&&!n["aria-hidden"],"CdxProgressBar: Progress bars require one of the following attribute, aria-label or aria-hidden. See documentation on https://doc.wikimedia.org/codex/latest/components/demos/progressbar.html");const o=t.computed(()=>({"cdx-progress-bar--block":!e.inline,"cdx-progress-bar--inline":e.inline,"cdx-progress-bar--enabled":!e.disabled,"cdx-progress-bar--disabled":e.disabled})),l=t.computed(()=>e.inline?"true":void 0);return{rootClasses:o,computedAriaHidden:l}}}),Hl=["aria-hidden","aria-disabled"],Ul=t.createElementVNode("div",{class:"cdx-progress-bar__bar"},null,-1),jl=[Ul];function Wl(e,n,o,l,i,d){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-progress-bar",e.rootClasses]),role:"progressbar","aria-hidden":e.computedAriaHidden,"aria-disabled":e.disabled},jl,10,Hl)}const gt=P(Kl,[["render",Wl]]);function He(e,n){const o=t.ref(!1);let l=!1;if(typeof window!="object"||!("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype))return o;const i=new window.IntersectionObserver(d=>{const r=d[0];r&&(o.value=r.isIntersecting)},n);return t.onMounted(()=>{l=!0,e.value&&i.observe(e.value)}),t.onUnmounted(()=>{l=!1,i.disconnect()}),t.watch(e,d=>{l&&(i.disconnect(),o.value=!1,d&&i.observe(d))}),o}function Pe(e){return e!==null&&Array.isArray(e)}function rt(e){return"items"in e}const ql=t.defineComponent({name:"CdxMenu",components:{CdxMenuItem:rn,CdxIcon:q,CdxProgressBar:gt},inheritAttrs:!1,props:{menuItems:{type:Array,required:!0},footer:{type:Object,default:null},selected:{type:[String,Number,Array,null],required:!0},expanded:{type:Boolean,required:!0},showPending:{type:Boolean,default:!1},visibleItemLimit:{type:Number,default:null},showThumbnail:{type:Boolean,default:!1},boldLabel:{type:Boolean,default:!1},hideDescriptionOverflow:{type:Boolean,default:!1},searchQuery:{type:String,default:""},showNoResultsSlot:{type:Boolean,default:null}},emits:["update:selected","update:expanded","menu-item-click","menu-item-keyboard-navigation","load-more"],expose:["isExpanded","clearActive","getHighlightedMenuItem","getHighlightedViaKeyboard","getComputedMenuItems","delegateKeyNavigation"],setup(e,{emit:n,slots:o,attrs:l}){const i=t.computed(()=>{const v=e.footer&&e.menuItems?[...e.menuItems,e.footer]:e.menuItems,D=_=>oe(Q({},_),{id:U("menu-item")});return v.map(_=>rt(_)?oe(Q({},_),{id:U("menu-group"),items:_.items.map(X=>D(X))}):D(_))}),d=t.computed(()=>{const v=[];return i.value.forEach(D=>{rt(D)?v.push(...D.items):v.push(D)}),v}),r=t.computed(()=>o["no-results"]?e.showNoResultsSlot!==null?e.showNoResultsSlot:d.value.length===0:!1),s=t.ref(null),a=t.ref(!1),u=t.ref(null),c="additions removals";let p="",f=null;function m(){p="",f!==null&&(clearTimeout(f),f=null)}function h(){f!==null&&clearTimeout(f),f=setTimeout(m,1500)}function g(){var v;return(v=d.value.find(D=>Pe(e.selected)?e.selected.indexOf(D.value)!==-1:D.value===e.selected))!=null?v:null}const C=t.computed(()=>Pe(e.selected));function k(v){return Pe(e.selected)?e.selected.indexOf(v)!==-1:v===e.selected}function B(v){if(Pe(e.selected)){const D=e.selected.indexOf(v)===-1?e.selected.concat(v):e.selected.filter(_=>_!==v);n("update:selected",D)}else n("update:selected",v)}function $(v,D){if(!(D&&D.disabled))switch(v){case"selected":D&&B(D.value),C.value||n("update:expanded",!1),u.value=null;break;case"highlighted":s.value=D!=null?D:null,a.value=!1;break;case"highlightedViaKeyboard":s.value=D!=null?D:null,a.value=!0;break;case"active":u.value=D!=null?D:null;break}}const I=t.computed(()=>{if(s.value!==null)return d.value.findIndex(v=>v.value===s.value.value)});function E(v){v&&($("highlightedViaKeyboard",v),n("menu-item-keyboard-navigation",v))}function M(v){var X;const D=Be=>{for(let re=Be-1;re>=0;re--)if(!d.value[re].disabled)return d.value[re]};v=v!=null?v:d.value.length;const _=(X=D(v))!=null?X:D(d.value.length);E(_)}function A(v){var X;const D=Be=>d.value.find((re,Fe)=>!re.disabled&&Fe>Be);v=v!=null?v:-1;const _=(X=D(v))!=null?X:D(-1);E(_)}function x(v){if(v.key==="Clear")return m(),!0;if(v.key==="Backspace")return p=p.slice(0,-1),h(),!0;if(v.key.length===1&&!v.metaKey&&!v.ctrlKey&&!v.altKey){if(e.expanded||n("update:expanded",!0),v.key===" "&&p.length<1)return!1;p+=v.key.toLowerCase();const D=p.length>1&&p.split("").every(re=>re===p[0]);let _=d.value,X=p;D&&I.value!==void 0&&(_=_.slice(I.value+1).concat(_.slice(0,I.value)),X=p[0]);const Be=_.find(re=>{var Fe;return!re.disabled&&String((Fe=re.label)!=null?Fe:re.value).toLowerCase().startsWith(X)});return Be&&($("highlightedViaKeyboard",Be),F()),h(),!0}return!1}function y(v,{prevent:D=!0,characterNavigation:_=!1}={}){if(_){if(x(v))return v.preventDefault(),!0;m()}function X(){D&&(v.preventDefault(),v.stopPropagation())}switch(v.key){case"Enter":case" ":return X(),e.expanded?(s.value&&a.value&&B(s.value.value),C.value||n("update:expanded",!1)):n("update:expanded",!0),!0;case"Tab":return e.expanded&&s.value&&a.value&&!C.value&&(B(s.value.value),n("update:expanded",!1)),!0;case"ArrowUp":return X(),e.expanded?(s.value===null&&$("highlightedViaKeyboard",g()),M(I.value)):n("update:expanded",!0),F(),!0;case"ArrowDown":return X(),e.expanded?(s.value===null&&$("highlightedViaKeyboard",g()),A(I.value)):n("update:expanded",!0),F(),!0;case"Home":return X(),e.expanded?(s.value===null&&$("highlightedViaKeyboard",g()),A()):n("update:expanded",!0),F(),!0;case"End":return X(),e.expanded?(s.value===null&&$("highlightedViaKeyboard",g()),M()):n("update:expanded",!0),F(),!0;case"Escape":return X(),n("update:expanded",!1),!0;default:return!1}}function b(){$("active",null)}const S=[],V=t.ref(void 0),R=He(V,{threshold:.8});t.watch(R,v=>{v&&n("load-more")});function z(v,D){if(v){S[D]=v.$el;const _=e.visibleItemLimit;if(!_||e.menuItems.length<_)return;const X=Math.min(_,Math.max(2,Math.floor(.2*e.menuItems.length)));D===e.menuItems.length-X&&(V.value=v.$el)}}const L=t.ref();function F(){const v=L.value&&L.value.scrollHeight>L.value.clientHeight;if(I.value===void 0||!v)return;const D=I.value>=0?I.value:0;S[D].scrollIntoView({behavior:"smooth",block:"nearest"})}const G=t.ref(null),j=t.ref(null);function te(){return ee(this,null,function*(){yield t.nextTick(),Z(),w(),yield t.nextTick(),F()})}function Z(){if(e.footer){const v=S[S.length-1];j.value=v.scrollHeight}else j.value=null}function w(){if(!e.visibleItemLimit||S.length<=e.visibleItemLimit){G.value=null;return}const v=S[0].getBoundingClientRect().top,D=S[e.visibleItemLimit].getBoundingClientRect().top;G.value=D-v+2}function T(v){return{"cdx-menu__group-wrapper--hide-label":!!v.hideLabel}}function K(v){return d.value.indexOf(v)}function Y(v){var D,_;return Q({selected:k(v.value),active:v.value===((D=u.value)==null?void 0:D.value),highlighted:v.value===((_=s.value)==null?void 0:_.value),showThumbnail:e.showThumbnail,boldLabel:e.boldLabel,hideDescriptionOverflow:e.hideDescriptionOverflow,searchQuery:e.searchQuery,multiselect:C.value},v)}function nt(v){return{change:(D,_)=>$(D,_?v:null),click:()=>n("menu-item-click",v)}}function ot(v){var D,_;return{menuItem:v,active:v.value===((D=u.value)==null?void 0:D.value)&&v.value===((_=s.value)==null?void 0:_.value)}}t.onMounted(()=>{document.addEventListener("mouseup",b)}),t.onUnmounted(()=>{document.removeEventListener("mouseup",b)}),t.watch(t.toRef(e,"expanded"),v=>ee(this,null,function*(){if(v){const D=g();D&&!s.value&&$("highlighted",D),yield te()}else $("highlighted",null)})),t.watch(t.toRef(e,"menuItems"),v=>ee(this,null,function*(){v.length<S.length&&(S.length=v.length),e.expanded&&(yield te())}),{deep:!0});const lt=t.computed(()=>({"max-height":G.value?"".concat(G.value,"px"):void 0,"margin-bottom":j.value?"".concat(j.value,"px"):void 0})),at=t.computed(()=>({"cdx-menu--has-footer":!!e.footer})),{rootClasses:N,rootStyle:O,otherAttrs:H}=ae(l,at);return{listBoxStyle:lt,rootClasses:N,rootStyle:O,otherAttrs:H,assignTemplateRef:z,computedMenuEntries:i,computedMenuItems:d,computedShowNoResultsSlot:r,highlightedMenuItem:s,highlightedViaKeyboard:a,handleMenuItemChange:$,handleKeyNavigation:y,ariaRelevant:c,isMultiselect:C,menuListbox:L,getGroupWrapperClasses:T,getMenuItemIndex:K,getMenuItemBindings:Y,getMenuItemHandlers:nt,getSlotBindings:ot,isMenuGroupData:rt}},methods:{isExpanded(){return this.expanded},getHighlightedMenuItem(){return this.expanded?this.highlightedMenuItem:null},getHighlightedViaKeyboard(){return this.highlightedViaKeyboard},getComputedMenuItems(){return this.computedMenuItems},clearActive(){this.handleMenuItemChange("active",null)},delegateKeyNavigation(e,{prevent:n=!0,characterNavigation:o=!1}={}){return this.handleKeyNavigation(e,{prevent:n,characterNavigation:o})}}}),Ql=["aria-live","aria-relevant","aria-multiselectable"],Gl={key:0,class:"cdx-menu__pending cdx-menu-item"},Yl={key:1,class:"cdx-menu__no-results cdx-menu-item",role:"option"},Xl=["aria-labelledby","aria-describedby"],Jl={class:"cdx-menu__group__meta"},Zl={class:"cdx-menu__group__meta__text"},ea=["id"],ta=["id"];function na(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-menu-item"),a=t.resolveComponent("cdx-progress-bar");return t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-menu",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("ul",t.mergeProps({ref:"menuListbox",class:"cdx-menu__listbox",role:"listbox",style:e.listBoxStyle,"aria-live":e.showPending?"polite":void 0,"aria-relevant":e.showPending?e.ariaRelevant:void 0,"aria-multiselectable":e.isMultiselect?!0:void 0},e.otherAttrs),[e.showPending&&e.computedMenuItems.length===0&&e.$slots.pending?(t.openBlock(),t.createElementBlock("li",Gl,[t.renderSlot(e.$slots,"pending")])):t.createCommentVNode("v-if",!0),e.computedShowNoResultsSlot?(t.openBlock(),t.createElementBlock("li",Yl,[t.renderSlot(e.$slots,"no-results")])):t.createCommentVNode("v-if",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedMenuEntries,(u,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:c},[e.isMenuGroupData(u)?(t.openBlock(),t.createElementBlock("li",{key:0,class:t.normalizeClass(["cdx-menu__group-wrapper",e.getGroupWrapperClasses(u)])},[t.createElementVNode("ul",{class:"cdx-menu__group",role:"group","aria-labelledby":u.id+"-label","aria-describedby":u.id+"-description"},[t.createElementVNode("span",Jl,[u.icon?(t.openBlock(),t.createBlock(r,{key:0,class:"cdx-menu__group__icon",icon:u.icon},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",Zl,[t.createElementVNode("span",{id:u.id+"-label",class:"cdx-menu__group__label"},t.toDisplayString(u.label),9,ea),u.description?(t.openBlock(),t.createElementBlock("span",{key:0,id:u.id+"-description",class:"cdx-menu__group__description"},t.toDisplayString(u.description),9,ta)):t.createCommentVNode("v-if",!0)])]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.items,p=>(t.openBlock(),t.createBlock(s,t.mergeProps({key:p.value,ref_for:!0,ref:f=>e.assignTemplateRef(f,e.getMenuItemIndex(p)),class:"cdx-menu__group__item"},e.getMenuItemBindings(p),t.toHandlers(e.getMenuItemHandlers(p))),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",t.mergeProps({ref_for:!0},e.getSlotBindings(p)))]),_:2},1040))),128))],8,Xl)],2)):(t.openBlock(),t.createBlock(s,t.mergeProps({key:1,ref_for:!0,ref:p=>e.assignTemplateRef(p,e.getMenuItemIndex(u))},e.getMenuItemBindings(u),t.toHandlers(e.getMenuItemHandlers(u))),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",t.mergeProps({ref_for:!0},e.getSlotBindings(u)))]),_:2},1040))],64))),128)),e.showPending?(t.openBlock(),t.createBlock(a,{key:2,class:"cdx-menu__progress-bar",inline:!0})):t.createCommentVNode("v-if",!0)],16,Ql)],6)),[[t.vShow,e.expanded]])}const ke=P(ql,[["render",na]]),oa=J(mo),la=J(pe),aa=t.defineComponent({name:"CdxTextInput",components:{CdxIcon:q},inheritAttrs:!1,expose:["focus","blur","checkValidity","reportValidity","setCustomValidity"],props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text",validator:oa},status:{type:String,default:"default",validator:la},disabled:{type:Boolean,default:!1},startIcon:{type:[String,Object],default:void 0},endIcon:{type:[String,Object],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue","keydown","input","change","focus","blur","clear","invalid"],setup(e,{emit:n,attrs:o}){const l=o.id,{computedDisabled:i,computedStatus:d,computedInputId:r}=le(t.toRef(e,"disabled"),t.toRef(e,"status"),l),s=t.inject(qe,void 0),a=ne(t.toRef(e,"modelValue"),n),u=t.computed(()=>e.clearable&&!!a.value&&!i.value),c=t.computed(()=>({"cdx-text-input--has-start-icon":!!e.startIcon,"cdx-text-input--has-end-icon":!!e.endIcon,"cdx-text-input--clearable":u.value,["cdx-text-input--status-".concat(d.value)]:!0})),{rootClasses:p,rootStyle:f,otherAttrs:m}=ae(o,c),h=t.computed(()=>{const b=m.value,{id:x}=b;return de(b,["id"])}),g=t.computed(()=>({"cdx-text-input__input--has-value":!!a.value})),C=x=>{a.value="",n("clear",x)},k=x=>{(x.key==="Home"||x.key==="End")&&!x.ctrlKey&&!x.metaKey||n("keydown",x)},B=x=>{n("input",x)},$=x=>{n("change",x)},I=x=>{n("focus",x)},E=x=>{n("blur",x)},M=t.ref(!0);return{computedInputId:r,descriptionId:s,wrappedModel:a,isClearable:u,rootClasses:p,rootStyle:f,otherAttrsMinusId:h,inputClasses:g,computedDisabled:i,onClear:C,onInput:B,onChange:$,onKeydown:k,onFocus:I,onBlur:E,onInvalid:(x,y)=>{y&&x.preventDefault(),n("invalid",x),M.value=!0},shouldPreventDefault:M,cdxIconClear:Jn}},methods:{focus(){this.$refs.input.focus()},blur(){this.$refs.input.blur()},checkValidity(){return this.$refs.input.checkValidity()},reportValidity(){return this.shouldPreventDefault=!1,this.$refs.input.reportValidity()},setCustomValidity(e){this.$refs.input.setCustomValidity(e)}}}),sa=["id","type","aria-describedby","disabled"];function ia(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-text-input",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:e.computedInputId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=s=>e.wrappedModel=s),class:["cdx-text-input__input",e.inputClasses]},e.otherAttrsMinusId,{type:e.inputType,"aria-describedby":e.descriptionId,disabled:e.computedDisabled,size:"1",onInput:n[1]||(n[1]=(...s)=>e.onInput&&e.onInput(...s)),onChange:n[2]||(n[2]=(...s)=>e.onChange&&e.onChange(...s)),onFocus:n[3]||(n[3]=(...s)=>e.onFocus&&e.onFocus(...s)),onBlur:n[4]||(n[4]=(...s)=>e.onBlur&&e.onBlur(...s)),onKeydown:n[5]||(n[5]=(...s)=>e.onKeydown&&e.onKeydown(...s)),onInvalid:n[6]||(n[6]=s=>e.onInvalid(s,e.shouldPreventDefault))}),null,16,sa),[[t.vModelDynamic,e.wrappedModel]]),e.startIcon?(t.openBlock(),t.createBlock(r,{key:0,icon:e.startIcon,class:"cdx-text-input__icon-vue cdx-text-input__start-icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0),e.endIcon?(t.openBlock(),t.createBlock(r,{key:1,icon:e.endIcon,class:"cdx-text-input__icon-vue cdx-text-input__end-icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0),e.isClearable?(t.openBlock(),t.createBlock(r,{key:2,icon:e.cdxIconClear,class:"cdx-text-input__icon-vue cdx-text-input__clear-icon",onMousedown:n[7]||(n[7]=t.withModifiers(()=>{},["prevent"])),onClick:e.onClear},null,8,["icon","onClick"])):t.createCommentVNode("v-if",!0)],6)}const Je=P(aa,[["render",ia]]),ra=["top","right","bottom","left"],Ie=Math.min,se=Math.max,Ue=Math.round,_e=Math.floor,me=e=>({x:e,y:e}),da={left:"right",right:"left",bottom:"top",top:"bottom"},ua={start:"end",end:"start"};function xt(e,n,o){return se(e,Ie(n,o))}function Ee(e,n){return typeof e=="function"?e(n):e}function be(e){return e.split("-")[0]}function Te(e){return e.split("-")[1]}function dn(e){return e==="x"?"y":"x"}function un(e){return e==="y"?"height":"width"}function Ce(e){return["top","bottom"].includes(be(e))?"y":"x"}function cn(e){return dn(Ce(e))}function ca(e,n,o){o===void 0&&(o=!1);const l=Te(e),i=cn(e),d=un(i);let r=i==="x"?l===(o?"end":"start")?"right":"left":l==="start"?"bottom":"top";return n.reference[d]>n.floating[d]&&(r=je(r)),[r,je(r)]}function pa(e){const n=je(e);return[ut(e),n,ut(n)]}function ut(e){return e.replace(/start|end/g,n=>ua[n])}function fa(e,n,o){const l=["left","right"],i=["right","left"],d=["top","bottom"],r=["bottom","top"];switch(e){case"top":case"bottom":return o?n?i:l:n?l:i;case"left":case"right":return n?d:r;default:return[]}}function ma(e,n,o,l){const i=Te(e);let d=fa(be(e),o==="start",l);return i&&(d=d.map(r=>r+"-"+i),n&&(d=d.concat(d.map(ut)))),d}function je(e){return e.replace(/left|right|bottom|top/g,n=>da[n])}function ha(e){return Q({top:0,right:0,bottom:0,left:0},e)}function va(e){return typeof e!="number"?ha(e):{top:e,right:e,bottom:e,left:e}}function We(e){const{x:n,y:o,width:l,height:i}=e;return{width:l,height:i,top:o,left:n,right:n+l,bottom:o+i,x:n,y:o}}function It(e,n,o){let{reference:l,floating:i}=e;const d=Ce(n),r=cn(n),s=un(r),a=be(n),u=d==="y",c=l.x+l.width/2-i.width/2,p=l.y+l.height/2-i.height/2,f=l[s]/2-i[s]/2;let m;switch(a){case"top":m={x:c,y:l.y-i.height};break;case"bottom":m={x:c,y:l.y+l.height};break;case"right":m={x:l.x+l.width,y:p};break;case"left":m={x:l.x-i.width,y:p};break;default:m={x:l.x,y:l.y}}switch(Te(n)){case"start":m[r]-=f*(o&&u?-1:1);break;case"end":m[r]+=f*(o&&u?-1:1);break}return m}const ga=(e,n,o)=>ee(exports,null,function*(){const{placement:l="bottom",strategy:i="absolute",middleware:d=[],platform:r}=o,s=d.filter(Boolean),a=yield r.isRTL==null?void 0:r.isRTL(n);let u=yield r.getElementRects({reference:e,floating:n,strategy:i}),{x:c,y:p}=It(u,l,a),f=l,m={},h=0;for(let g=0;g<s.length;g++){const{name:C,fn:k}=s[g],{x:B,y:$,data:I,reset:E}=yield k({x:c,y:p,initialPlacement:l,placement:f,strategy:i,middlewareData:m,rects:u,platform:r,elements:{reference:e,floating:n}});c=B!=null?B:c,p=$!=null?$:p,m=oe(Q({},m),{[C]:Q(Q({},m[C]),I)}),E&&h<=50&&(h++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(u=E.rects===!0?yield r.getElementRects({reference:e,floating:n,strategy:i}):E.rects),{x:c,y:p}=It(u,f,a)),g=-1)}return{x:c,y:p,placement:f,strategy:i,middlewareData:m}});function Ae(e,n){return ee(this,null,function*(){var o;n===void 0&&(n={});const{x:l,y:i,platform:d,rects:r,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:p="floating",altBoundary:f=!1,padding:m=0}=Ee(n,e),h=va(m),C=s[f?p==="floating"?"reference":"floating":p],k=We(yield d.getClippingRect({element:(o=yield d.isElement==null?void 0:d.isElement(C))==null||o?C:C.contextElement||(yield d.getDocumentElement==null?void 0:d.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),B=p==="floating"?{x:l,y:i,width:r.floating.width,height:r.floating.height}:r.reference,$=yield d.getOffsetParent==null?void 0:d.getOffsetParent(s.floating),I=(yield d.isElement==null?void 0:d.isElement($))?(yield d.getScale==null?void 0:d.getScale($))||{x:1,y:1}:{x:1,y:1},E=We(d.convertOffsetParentRelativeRectToViewportRelativeRect?yield d.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:B,offsetParent:$,strategy:a}):B);return{top:(k.top-E.top+h.top)/I.y,bottom:(E.bottom-k.bottom+h.bottom)/I.y,left:(k.left-E.left+h.left)/I.x,right:(E.right-k.right+h.right)/I.x}})}const ba=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(o){return ee(this,null,function*(){var l,i;const{placement:d,middlewareData:r,rects:s,initialPlacement:a,platform:u,elements:c}=o,L=Ee(e,o),{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:C=!0}=L,k=de(L,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((l=r.arrow)!=null&&l.alignmentOffset)return{};const B=be(d),$=Ce(a),I=be(a)===a,E=yield u.isRTL==null?void 0:u.isRTL(c.floating),M=m||(I||!C?[je(a)]:pa(a)),A=g!=="none";!m&&A&&M.push(...ma(a,C,g,E));const x=[a,...M],y=yield Ae(o,k),b=[];let S=((i=r.flip)==null?void 0:i.overflows)||[];if(p&&b.push(y[B]),f){const F=ca(d,s,E);b.push(y[F[0]],y[F[1]])}if(S=[...S,{placement:d,overflows:b}],!b.every(F=>F<=0)){var V,R;const F=(((V=r.flip)==null?void 0:V.index)||0)+1,G=x[F];if(G)return{data:{index:F,overflows:S},reset:{placement:G}};let j=(R=S.filter(te=>te.overflows[0]<=0).sort((te,Z)=>te.overflows[1]-Z.overflows[1])[0])==null?void 0:R.placement;if(!j)switch(h){case"bestFit":{var z;const te=(z=S.filter(Z=>{if(A){const w=Ce(Z.placement);return w===$||w==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(w=>w>0).reduce((w,T)=>w+T,0)]).sort((Z,w)=>Z[1]-w[1])[0])==null?void 0:z[0];te&&(j=te);break}case"initialPlacement":j=a;break}if(d!==j)return{reset:{placement:j}}}return{}})}}};function Vt(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Et(e){return ra.some(n=>e[n]>=0)}const ya=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(o){return ee(this,null,function*(){const{rects:l}=o,r=Ee(e,o),{strategy:i="referenceHidden"}=r,d=de(r,["strategy"]);switch(i){case"referenceHidden":{const s=yield Ae(o,oe(Q({},d),{elementContext:"reference"})),a=Vt(s,l.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Et(a)}}}case"escaped":{const s=yield Ae(o,oe(Q({},d),{altBoundary:!0})),a=Vt(s,l.floating);return{data:{escapedOffsets:a,escaped:Et(a)}}}default:return{}}})}}};function Ca(e,n){return ee(this,null,function*(){const{placement:o,platform:l,elements:i}=e,d=yield l.isRTL==null?void 0:l.isRTL(i.floating),r=be(o),s=Te(o),a=Ce(o)==="y",u=["left","top"].includes(r)?-1:1,c=d&&a?-1:1,p=Ee(n,e);let{mainAxis:f,crossAxis:m,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return s&&typeof h=="number"&&(m=s==="end"?h*-1:h),a?{x:m*c,y:f*u}:{x:f*u,y:m*c}})}const wa=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(o){return ee(this,null,function*(){var l,i;const{x:d,y:r,placement:s,middlewareData:a}=o,u=yield Ca(o,e);return s===((l=a.offset)==null?void 0:l.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:d+u.x,y:r+u.y,data:oe(Q({},u),{placement:s})}})}}},ka=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(o){return ee(this,null,function*(){const{x:l,y:i,placement:d}=o,k=Ee(e,o),{mainAxis:r=!0,crossAxis:s=!1,limiter:a={fn:B=>{let{x:$,y:I}=B;return{x:$,y:I}}}}=k,u=de(k,["mainAxis","crossAxis","limiter"]),c={x:l,y:i},p=yield Ae(o,u),f=Ce(be(d)),m=dn(f);let h=c[m],g=c[f];if(r){const B=m==="y"?"top":"left",$=m==="y"?"bottom":"right",I=h+p[B],E=h-p[$];h=xt(I,h,E)}if(s){const B=f==="y"?"top":"left",$=f==="y"?"bottom":"right",I=g+p[B],E=g-p[$];g=xt(I,g,E)}const C=a.fn(oe(Q({},o),{[m]:h,[f]:g}));return oe(Q({},C),{data:{x:C.x-l,y:C.y-i,enabled:{[m]:r,[f]:s}}})})}}},$a=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(o){return ee(this,null,function*(){var l,i;const{placement:d,rects:r,platform:s,elements:a}=o,S=Ee(e,o),{apply:u=()=>{}}=S,c=de(S,["apply"]),p=yield Ae(o,c),f=be(d),m=Te(d),h=Ce(d)==="y",{width:g,height:C}=r.floating;let k,B;f==="top"||f==="bottom"?(k=f,B=m===((yield s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(B=f,k=m==="end"?"top":"bottom");const $=C-p.top-p.bottom,I=g-p.left-p.right,E=Ie(C-p[k],$),M=Ie(g-p[B],I),A=!o.middlewareData.shift;let x=E,y=M;if((l=o.middlewareData.shift)!=null&&l.enabled.x&&(y=I),(i=o.middlewareData.shift)!=null&&i.enabled.y&&(x=$),A&&!m){const V=se(p.left,0),R=se(p.right,0),z=se(p.top,0),L=se(p.bottom,0);h?y=g-2*(V!==0||R!==0?V+R:se(p.left,p.right)):x=C-2*(z!==0||L!==0?z+L:se(p.top,p.bottom))}yield u(oe(Q({},o),{availableWidth:y,availableHeight:x}));const b=yield s.getDimensions(a.floating);return g!==b.width||C!==b.height?{reset:{rects:!0}}:{}})}}};function Ze(){return typeof window!="undefined"}function $e(e){return bt(e)?(e.nodeName||"").toLowerCase():"#document"}function ie(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function ge(e){var n;return(n=(bt(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function bt(e){return Ze()?e instanceof Node||e instanceof ie(e).Node:!1}function ue(e){return Ze()?e instanceof Element||e instanceof ie(e).Element:!1}function he(e){return Ze()?e instanceof HTMLElement||e instanceof ie(e).HTMLElement:!1}function Nt(e){return!Ze()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof ie(e).ShadowRoot}function Re(e){const{overflow:n,overflowX:o,overflowY:l,display:i}=ce(e);return/auto|scroll|overlay|hidden|clip/.test(n+l+o)&&!["inline","contents"].includes(i)}function Ba(e){return["table","td","th"].includes($e(e))}function et(e){return[":popover-open",":modal"].some(n=>{try{return e.matches(n)}catch(o){return!1}})}function yt(e){const n=Ct(),o=ue(e)?ce(e):e;return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!n&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!n&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(l=>(o.willChange||"").includes(l))||["paint","layout","strict","content"].some(l=>(o.contain||"").includes(l))}function Sa(e){let n=ye(e);for(;he(n)&&!Ve(n);){if(yt(n))return n;if(et(n))return null;n=ye(n)}return null}function Ct(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ve(e){return["html","body","#document"].includes($e(e))}function ce(e){return ie(e).getComputedStyle(e)}function tt(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ye(e){if($e(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Nt(e)&&e.host||ge(e);return Nt(n)?n.host:n}function pn(e){const n=ye(e);return Ve(n)?e.ownerDocument?e.ownerDocument.body:e.body:he(n)&&Re(n)?n:pn(n)}function De(e,n,o){var l;n===void 0&&(n=[]),o===void 0&&(o=!0);const i=pn(e),d=i===((l=e.ownerDocument)==null?void 0:l.body),r=ie(i);if(d){const s=ct(r);return n.concat(r,r.visualViewport||[],Re(i)?i:[],s&&o?De(s):[])}return n.concat(i,De(i,[],o))}function ct(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fn(e){const n=ce(e);let o=parseFloat(n.width)||0,l=parseFloat(n.height)||0;const i=he(e),d=i?e.offsetWidth:o,r=i?e.offsetHeight:l,s=Ue(o)!==d||Ue(l)!==r;return s&&(o=d,l=r),{width:o,height:l,$:s}}function wt(e){return ue(e)?e:e.contextElement}function xe(e){const n=wt(e);if(!he(n))return me(1);const o=n.getBoundingClientRect(),{width:l,height:i,$:d}=fn(n);let r=(d?Ue(o.width):o.width)/l,s=(d?Ue(o.height):o.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!s||!Number.isFinite(s))&&(s=1),{x:r,y:s}}const xa=me(0);function mn(e){const n=ie(e);return!Ct()||!n.visualViewport?xa:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function Ia(e,n,o){return n===void 0&&(n=!1),!o||n&&o!==ie(e)?!1:n}function we(e,n,o,l){n===void 0&&(n=!1),o===void 0&&(o=!1);const i=e.getBoundingClientRect(),d=wt(e);let r=me(1);n&&(l?ue(l)&&(r=xe(l)):r=xe(e));const s=Ia(d,o,l)?mn(d):me(0);let a=(i.left+s.x)/r.x,u=(i.top+s.y)/r.y,c=i.width/r.x,p=i.height/r.y;if(d){const f=ie(d),m=l&&ue(l)?ie(l):l;let h=f,g=ct(h);for(;g&&l&&m!==h;){const C=xe(g),k=g.getBoundingClientRect(),B=ce(g),$=k.left+(g.clientLeft+parseFloat(B.paddingLeft))*C.x,I=k.top+(g.clientTop+parseFloat(B.paddingTop))*C.y;a*=C.x,u*=C.y,c*=C.x,p*=C.y,a+=$,u+=I,h=ie(g),g=ct(h)}}return We({width:c,height:p,x:a,y:u})}function kt(e,n){const o=tt(e).scrollLeft;return n?n.left+o:we(ge(e)).left+o}function hn(e,n,o){o===void 0&&(o=!1);const l=e.getBoundingClientRect(),i=l.left+n.scrollLeft-(o?0:kt(e,l)),d=l.top+n.scrollTop;return{x:i,y:d}}function Va(e){let{elements:n,rect:o,offsetParent:l,strategy:i}=e;const d=i==="fixed",r=ge(l),s=n?et(n.floating):!1;if(l===r||s&&d)return o;let a={scrollLeft:0,scrollTop:0},u=me(1);const c=me(0),p=he(l);if((p||!p&&!d)&&(($e(l)!=="body"||Re(r))&&(a=tt(l)),he(l))){const m=we(l);u=xe(l),c.x=m.x+l.clientLeft,c.y=m.y+l.clientTop}const f=r&&!p&&!d?hn(r,a,!0):me(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:o.y*u.y-a.scrollTop*u.y+c.y+f.y}}function Ea(e){return Array.from(e.getClientRects())}function Na(e){const n=ge(e),o=tt(e),l=e.ownerDocument.body,i=se(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),d=se(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let r=-o.scrollLeft+kt(e);const s=-o.scrollTop;return ce(l).direction==="rtl"&&(r+=se(n.clientWidth,l.clientWidth)-i),{width:i,height:d,x:r,y:s}}function Aa(e,n){const o=ie(e),l=ge(e),i=o.visualViewport;let d=l.clientWidth,r=l.clientHeight,s=0,a=0;if(i){d=i.width,r=i.height;const u=Ct();(!u||u&&n==="fixed")&&(s=i.offsetLeft,a=i.offsetTop)}return{width:d,height:r,x:s,y:a}}function Da(e,n){const o=we(e,!0,n==="fixed"),l=o.top+e.clientTop,i=o.left+e.clientLeft,d=he(e)?xe(e):me(1),r=e.clientWidth*d.x,s=e.clientHeight*d.y,a=i*d.x,u=l*d.y;return{width:r,height:s,x:a,y:u}}function At(e,n,o){let l;if(n==="viewport")l=Aa(e,o);else if(n==="document")l=Na(ge(e));else if(ue(n))l=Da(n,o);else{const i=mn(e);l={x:n.x-i.x,y:n.y-i.y,width:n.width,height:n.height}}return We(l)}function vn(e,n){const o=ye(e);return o===n||!ue(o)||Ve(o)?!1:ce(o).position==="fixed"||vn(o,n)}function Ma(e,n){const o=n.get(e);if(o)return o;let l=De(e,[],!1).filter(s=>ue(s)&&$e(s)!=="body"),i=null;const d=ce(e).position==="fixed";let r=d?ye(e):e;for(;ue(r)&&!Ve(r);){const s=ce(r),a=yt(r);!a&&s.position==="fixed"&&(i=null),(d?!a&&!i:!a&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Re(r)&&!a&&vn(e,r))?l=l.filter(c=>c!==r):i=s,r=ye(r)}return n.set(e,l),l}function La(e){let{element:n,boundary:o,rootBoundary:l,strategy:i}=e;const r=[...o==="clippingAncestors"?et(n)?[]:Ma(n,this._c):[].concat(o),l],s=r[0],a=r.reduce((u,c)=>{const p=At(n,c,i);return u.top=se(p.top,u.top),u.right=Ie(p.right,u.right),u.bottom=Ie(p.bottom,u.bottom),u.left=se(p.left,u.left),u},At(n,s,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function Ta(e){const{width:n,height:o}=fn(e);return{width:n,height:o}}function Ra(e,n,o){const l=he(n),i=ge(n),d=o==="fixed",r=we(e,!0,d,n);let s={scrollLeft:0,scrollTop:0};const a=me(0);if(l||!l&&!d)if(($e(n)!=="body"||Re(i))&&(s=tt(n)),l){const f=we(n,!0,d,n);a.x=f.x+n.clientLeft,a.y=f.y+n.clientTop}else i&&(a.x=kt(i));const u=i&&!l&&!d?hn(i,s):me(0),c=r.left+s.scrollLeft-a.x-u.x,p=r.top+s.scrollTop-a.y-u.y;return{x:c,y:p,width:r.width,height:r.height}}function dt(e){return ce(e).position==="static"}function Dt(e,n){if(!he(e)||ce(e).position==="fixed")return null;if(n)return n(e);let o=e.offsetParent;return ge(e)===o&&(o=o.ownerDocument.body),o}function gn(e,n){const o=ie(e);if(et(e))return o;if(!he(e)){let i=ye(e);for(;i&&!Ve(i);){if(ue(i)&&!dt(i))return i;i=ye(i)}return o}let l=Dt(e,n);for(;l&&Ba(l)&&dt(l);)l=Dt(l,n);return l&&Ve(l)&&dt(l)&&!yt(l)?o:l||Sa(e)||o}const Fa=function(e){return ee(this,null,function*(){const n=this.getOffsetParent||gn,o=this.getDimensions,l=yield o(e.floating);return{reference:Ra(e.reference,yield n(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}})};function Oa(e){return ce(e).direction==="rtl"}const Pa={convertOffsetParentRelativeRectToViewportRelativeRect:Va,getDocumentElement:ge,getClippingRect:La,getOffsetParent:gn,getElementRects:Fa,getClientRects:Ea,getDimensions:Ta,getScale:xe,isElement:ue,isRTL:Oa};function _a(e,n){let o=null,l;const i=ge(e);function d(){var s;clearTimeout(l),(s=o)==null||s.disconnect(),o=null}function r(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),d();const{left:u,top:c,width:p,height:f}=e.getBoundingClientRect();if(s||n(),!p||!f)return;const m=_e(c),h=_e(i.clientWidth-(u+p)),g=_e(i.clientHeight-(c+f)),C=_e(u),B={rootMargin:-m+"px "+-h+"px "+-g+"px "+-C+"px",threshold:se(0,Ie(1,a))||1};let $=!0;function I(E){const M=E[0].intersectionRatio;if(M!==a){if(!$)return r();M?r(!1,M):l=setTimeout(()=>{r(!1,1e-7)},1e3)}$=!1}try{o=new IntersectionObserver(I,oe(Q({},B),{root:i.ownerDocument}))}catch(E){o=new IntersectionObserver(I,B)}o.observe(e)}return r(!0),d}function bn(e,n,o,l){l===void 0&&(l={});const{ancestorScroll:i=!0,ancestorResize:d=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=l,u=wt(e),c=i||d?[...u?De(u):[],...De(n)]:[];c.forEach(k=>{i&&k.addEventListener("scroll",o,{passive:!0}),d&&k.addEventListener("resize",o)});const p=u&&s?_a(u,o):null;let f=-1,m=null;r&&(m=new ResizeObserver(k=>{let[B]=k;B&&B.target===u&&m&&(m.unobserve(n),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var $;($=m)==null||$.observe(n)})),o()}),u&&!a&&m.observe(u),m.observe(n));let h,g=a?we(e):null;a&&C();function C(){const k=we(e);g&&(k.x!==g.x||k.y!==g.y||k.width!==g.width||k.height!==g.height)&&o(),g=k,h=requestAnimationFrame(C)}return o(),()=>{var k;c.forEach(B=>{i&&B.removeEventListener("scroll",o),d&&B.removeEventListener("resize",o)}),p==null||p(),(k=m)==null||k.disconnect(),m=null,a&&cancelAnimationFrame(h)}}const yn=wa,za=ka,Cn=ba,Ka=$a,pt=ya,wn=(e,n,o)=>{const l=new Map,i=Q({platform:Pa},o),d=oe(Q({},i.platform),{_c:l});return ga(e,n,oe(Q({},i),{platform:d}))};function Ha(e){return e!=null&&typeof e=="object"&&"$el"in e}function Mt(e){if(Ha(e)){const n=e.$el;return bt(n)&&$e(n)==="#comment"?null:n}return e}function kn(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Lt(e,n){const o=kn(e);return Math.round(n*o)/o}function Ua(e,n,o){o===void 0&&(o={});const l=o.whileElementsMounted,i=t.computed(()=>{var A;return(A=t.unref(o.open))!=null?A:!0}),d=t.computed(()=>t.unref(o.middleware)),r=t.computed(()=>{var A;return(A=t.unref(o.placement))!=null?A:"bottom"}),s=t.computed(()=>{var A;return(A=t.unref(o.strategy))!=null?A:"absolute"}),a=t.computed(()=>{var A;return(A=t.unref(o.transform))!=null?A:!0}),u=t.computed(()=>Mt(e.value)),c=t.computed(()=>Mt(n.value)),p=t.ref(0),f=t.ref(0),m=t.ref(s.value),h=t.ref(r.value),g=t.shallowRef({}),C=t.ref(!1),k=t.computed(()=>{const A={position:m.value,left:"0",top:"0"};if(!c.value)return A;const x=Lt(c.value,p.value),y=Lt(c.value,f.value);return a.value?Q(oe(Q({},A),{transform:"translate("+x+"px, "+y+"px)"}),kn(c.value)>=1.5&&{willChange:"transform"}):{position:m.value,left:x+"px",top:y+"px"}});let B;function $(){u.value==null||c.value==null||wn(u.value,c.value,{middleware:d.value,placement:r.value,strategy:s.value}).then(A=>{p.value=A.x,f.value=A.y,m.value=A.strategy,h.value=A.placement,g.value=A.middlewareData,C.value=!0})}function I(){typeof B=="function"&&(B(),B=void 0)}function E(){if(I(),l===void 0){$();return}if(u.value!=null&&c.value!=null){B=l(u.value,c.value,$);return}}function M(){i.value||(C.value=!1)}return t.watch([d,r,s],$,{flush:"sync"}),t.watch([u,c],E,{flush:"sync"}),t.watch(i,M,{flush:"sync"}),t.getCurrentScope()&&t.onScopeDispose(I),{x:t.shallowReadonly(p),y:t.shallowReadonly(f),strategy:t.shallowReadonly(m),placement:t.shallowReadonly(h),middlewareData:t.shallowReadonly(g),isPositioned:t.shallowReadonly(C),floatingStyles:k,update:$}}function ja(e){return e&&"$el"in e?e.$el:e}const Tt=16,Wa=128;function Ne(e,n,o){var p;const l=()=>{var f;return(f=n.value)==null?void 0:f.isExpanded()},i=[yn(o==null?void 0:o.offset),Ka({padding:Tt,apply({rects:f,elements:m,availableHeight:h,availableWidth:g}){Object.assign(m.floating.style,{width:"".concat(o!=null&&o.useAvailableWidth?g:f.reference.width,"px"),maxHeight:"".concat(Math.max(Wa,h),"px")})}}),Cn({padding:Tt}),pt({strategy:"escaped"}),pt()],{floatingStyles:d,placement:r,middlewareData:s,update:a}=Ua(e,n,{middleware:i,placement:(p=o==null?void 0:o.placement)!=null?p:"bottom"}),u=t.computed(()=>{var m,h;return!l()||!!((m=s.value.hide)!=null&&m.escaped)||((h=s.value.hide)==null?void 0:h.referenceHidden)?"hidden":"visible"});t.watch([d,u,r],([f,m,h])=>{var g,C,k,B,$;Object.assign((C=(g=n.value)==null?void 0:g.$el.style)!=null?C:{},{visibility:m,position:f.position,top:"".concat(f.top,"px"),right:"unset",left:"".concat(f.left,"px"),transform:(k=f.transform)!=null?k:"none",borderTopLeftRadius:h==="bottom"&&m==="visible"?"0":"",borderTopRightRadius:h==="bottom"&&m==="visible"?"0":"",borderBottomLeftRadius:h==="top"&&m==="visible"?"0":"",borderBottomRightRadius:h==="top"&&m==="visible"?"0":""}),Object.assign(($=(B=ja(e.value))==null?void 0:B.style)!=null?$:{},{borderTopLeftRadius:h==="top"&&m==="visible"?"0":"",borderTopRightRadius:h==="top"&&m==="visible"?"0":"",borderBottomLeftRadius:h==="bottom"&&m==="visible"?"0":"",borderBottomRightRadius:h==="bottom"&&m==="visible"?"0":""})});let c=null;t.watch(l,f=>{var m;f?c=bn(e.value&&"$el"in e.value?e.value.$el:e,(m=n.value)==null?void 0:m.$el,a):c&&(c(),c=null)})}const qa=J(pe),Qa=t.defineComponent({name:"CdxCombobox",components:{CdxButton:ve,CdxIcon:q,CdxMenu:ke,CdxTextInput:Je},inheritAttrs:!1,props:{menuItems:{type:Array,required:!0},selected:{type:[String,Number],required:!0},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})},status:{type:String,default:"default",validator:qa}},emits:["update:selected","load-more","input","change","focus","blur"],setup(e,{emit:n,attrs:o,slots:l}){const i=t.ref(),d=t.ref(),r=t.ref(),s=U("combobox"),a=t.toRef(e,"selected"),u=ne(a,n,"update:selected"),c=t.ref(!1),p=t.ref(!1),f=t.computed(()=>{var x,y;return(y=(x=r.value)==null?void 0:x.getHighlightedMenuItem())==null?void 0:y.id}),{computedDisabled:m,computedStatus:h}=le(t.toRef(e,"disabled"),t.toRef(e,"status")),g=t.computed(()=>({"cdx-combobox--expanded":c.value,"cdx-combobox--disabled":m.value})),{rootClasses:C,rootStyle:k,otherAttrs:B}=ae(o,g);function $(x){p.value&&c.value?c.value=!1:(e.menuItems.length>0||l["no-results"])&&(c.value=!0),n("focus",x)}function I(x){c.value=p.value&&c.value,n("blur",x)}function E(){m.value||(p.value=!0)}function M(){var x;m.value||(x=i.value)==null||x.focus()}function A(x){!r.value||m.value||e.menuItems.length===0||x.key===" "||r.value.delegateKeyNavigation(x)}return Ne(i,r),t.watch(c,()=>{p.value=!1}),{input:i,inputWrapper:d,menu:r,menuId:s,modelWrapper:u,expanded:c,highlightedId:f,computedDisabled:m,computedStatus:h,onInputFocus:$,onInputBlur:I,onKeydown:A,onButtonClick:M,onButtonMousedown:E,cdxIconExpand:Ot,rootClasses:C,rootStyle:k,otherAttrs:B}}}),Ga={ref:"inputWrapper",class:"cdx-combobox__input-wrapper"};function Ya(e,n,o,l,i,d){const r=t.resolveComponent("cdx-text-input"),s=t.resolveComponent("cdx-icon"),a=t.resolveComponent("cdx-button"),u=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-combobox",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("div",Ga,[t.createVNode(r,t.mergeProps({ref:"input",modelValue:e.modelWrapper,"onUpdate:modelValue":n[0]||(n[0]=c=>e.modelWrapper=c)},e.otherAttrs,{class:"cdx-combobox__input","aria-activedescendant":e.highlightedId,"aria-expanded":e.expanded,"aria-controls":e.menuId,disabled:e.computedDisabled,status:e.computedStatus,autocomplete:"off",role:"combobox",onKeydown:e.onKeydown,onInput:n[1]||(n[1]=c=>e.$emit("input",c)),onChange:n[2]||(n[2]=c=>e.$emit("change",c)),onFocus:e.onInputFocus,onBlur:e.onInputBlur}),null,16,["modelValue","aria-activedescendant","aria-expanded","aria-controls","disabled","status","onKeydown","onFocus","onBlur"]),t.createVNode(a,{class:"cdx-combobox__expand-button","aria-hidden":"true",disabled:e.computedDisabled,tabindex:"-1",type:"button",onMousedown:e.onButtonMousedown,onClick:e.onButtonClick},{default:t.withCtx(()=>[t.createVNode(s,{class:"cdx-combobox__expand-icon",icon:e.cdxIconExpand},null,8,["icon"])]),_:1},8,["disabled","onMousedown","onClick"])],512),t.createVNode(u,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[3]||(n[3]=c=>e.modelWrapper=c),expanded:e.expanded,"onUpdate:expanded":n[4]||(n[4]=c=>e.expanded=c),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[5]||(n[5]=c=>e.$emit("load-more"))}),{default:t.withCtx(({menuItem:c})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:c})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}const Xa=P(Qa,[["render",Ya]]);function $n(e){const n=t.ref({width:void 0,height:void 0});if(typeof window!="object"||!("ResizeObserver"in window)||!("ResizeObserverEntry"in window))return n;const o=new window.ResizeObserver(i=>{const d=i[0];d&&(n.value={width:d.borderBoxSize[0].inlineSize,height:d.borderBoxSize[0].blockSize})});let l=!1;return t.onMounted(()=>{l=!0,e.value&&o.observe(e.value)}),t.onUnmounted(()=>{l=!1,o.disconnect()}),t.watch(e,i=>{l&&(o.disconnect(),n.value={width:void 0,height:void 0},i&&o.observe(i))}),n}const Ja=t.defineComponent({name:"CdxDialog",components:{CdxButton:ve,CdxIcon:q},inheritAttrs:!1,props:{open:{type:Boolean,default:!1},title:{type:String,required:!0},subtitle:{type:String,required:!1,default:null},hideTitle:{type:Boolean,default:!1},useCloseButton:{type:Boolean,default:!1},closeButtonLabel:{type:String,default:""},primaryAction:{type:Object,default:null},defaultAction:{type:Object,default:null},stackedActions:{type:Boolean,default:!1},target:{type:String,default:null},renderInPlace:{type:Boolean,default:!1}},emits:["update:open","primary","default"],setup(e,{emit:n}){const o=U("dialog-label"),l=t.ref(),i=t.ref(),d=t.ref(),r=t.ref(),s=t.ref(),a=t.ref();let u=null;const c=t.computed(()=>e.useCloseButton||e.closeButtonLabel.length>0),p=Ye(t.toRef(e,"closeButtonLabel"),"cdx-dialog-close-button-label","Close"),f=t.computed(()=>!e.hideTitle||c.value),m=t.computed(()=>!!e.primaryAction||!!e.defaultAction),h=$n(d),g=t.computed(()=>{var L;return(L=h.value.height)!=null?L:0}),C=t.ref(!1),k=t.computed(()=>({"cdx-dialog--vertical-actions":e.stackedActions,"cdx-dialog--horizontal-actions":!e.stackedActions,"cdx-dialog--dividers":C.value})),B=t.inject("CdxTeleportTarget",void 0),$=t.computed(()=>{var L,F;return(F=(L=e.target)!=null?L:B)!=null?F:"body"}),I=t.ref(0);function E(){n("update:open",!1)}function M(){x(i.value)}function A(){x(i.value,!0)}function x(L,F=!1){let G=Array.from(L.querySelectorAll('\n                                  input, select, textarea, button, object, a, area,\n                                     [contenteditable], [tabindex]:not([tabindex^="-"])\n                            '));F&&(G=G.reverse());for(const j of G)if(j.focus(),document.activeElement===j)return!0;return!1}let y=[],b=[];function S(){let L=l.value;for(;L.parentElement&&L.nodeName!=="BODY";){for(const F of Array.from(L.parentElement.children))F===L||F.nodeName==="SCRIPT"||(F.hasAttribute("aria-hidden")||(F.setAttribute("aria-hidden","true"),y.push(F)),F.hasAttribute("inert")||(F.setAttribute("inert",""),b.push(F)));L=L.parentElement}}function V(){for(const L of y)L.removeAttribute("aria-hidden");for(const L of b)L.removeAttribute("inert");y=[],b=[]}function R(){return ee(this,null,function*(){var L;yield t.nextTick(),I.value=window.innerWidth-document.documentElement.clientWidth,document.documentElement.style.setProperty("margin-right","".concat(I.value,"px")),document.body.classList.add("cdx-dialog-open"),S(),u=document.activeElement,x(d.value)||(L=r.value)==null||L.focus()})}function z(){document.body.classList.remove("cdx-dialog-open"),document.documentElement.style.removeProperty("margin-right"),V(),u instanceof HTMLElement&&document.contains(u)&&(u.focus(),u=null)}return t.onMounted(()=>{e.open&&R()}),t.onUnmounted(()=>{e.open&&z()}),t.watch(t.toRef(e,"open"),L=>{L?R():z()}),t.watch(g,()=>{d.value&&(C.value=d.value.clientHeight<d.value.scrollHeight)}),{close:E,cdxIconClose:ft,labelId:o,rootClasses:k,backdrop:l,dialogElement:i,focusTrapStart:s,focusTrapEnd:a,focusFirst:M,focusLast:A,dialogBody:d,focusHolder:r,showHeader:f,showFooterActions:m,useCloseButtonOrLabel:c,translatedCloseButtonLabel:p,computedTarget:$}}}),Za=["aria-label","aria-labelledby"],es={key:0,class:"cdx-dialog__header__title-group"},ts=["id"],ns={key:0,class:"cdx-dialog__header__subtitle"},os={ref:"focusHolder",class:"cdx-dialog-focus-trap",tabindex:"-1"},ls={key:0,class:"cdx-dialog__footer__text"},as={key:1,class:"cdx-dialog__footer__actions"};function ss(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-button");return t.openBlock(),t.createBlock(t.Teleport,{to:e.computedTarget,disabled:e.renderInPlace},[t.createVNode(t.Transition,{name:"cdx-dialog-fade",appear:""},{default:t.withCtx(()=>[e.open?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"backdrop",class:"cdx-dialog-backdrop",onClick:n[5]||(n[5]=(...a)=>e.close&&e.close(...a)),onKeyup:n[6]||(n[6]=t.withKeys((...a)=>e.close&&e.close(...a),["escape"]))},[t.createElementVNode("div",{ref:"focusTrapStart",tabindex:"0",onFocus:n[0]||(n[0]=(...a)=>e.focusLast&&e.focusLast(...a))},null,544),t.createElementVNode("div",t.mergeProps({ref:"dialogElement",class:["cdx-dialog",e.rootClasses],role:"dialog"},e.$attrs,{"aria-label":e.$slots.header||e.hideTitle?e.title:void 0,"aria-labelledby":!e.$slots.header&&!e.hideTitle?e.labelId:void 0,"aria-modal":"true",onClick:n[3]||(n[3]=t.withModifiers(()=>{},["stop"]))}),[e.showHeader||e.$slots.header?(t.openBlock(),t.createElementBlock("header",{key:0,class:t.normalizeClass(["cdx-dialog__header",{"cdx-dialog__header--default":!e.$slots.header}])},[t.renderSlot(e.$slots,"header",{},()=>[e.hideTitle?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",es,[t.createElementVNode("h2",{id:e.labelId,class:"cdx-dialog__header__title"},t.toDisplayString(e.title),9,ts),e.subtitle?(t.openBlock(),t.createElementBlock("p",ns,t.toDisplayString(e.subtitle),1)):t.createCommentVNode("v-if",!0)])),e.useCloseButtonOrLabel?(t.openBlock(),t.createBlock(s,{key:1,class:"cdx-dialog__header__close-button",weight:"quiet",type:"button","aria-label":e.translatedCloseButtonLabel,onClick:e.close},{default:t.withCtx(()=>[t.createVNode(r,{icon:e.cdxIconClose},null,8,["icon"])]),_:1},8,["aria-label","onClick"])):t.createCommentVNode("v-if",!0)])],2)):t.createCommentVNode("v-if",!0),t.createElementVNode("div",os,null,512),t.createElementVNode("div",{ref:"dialogBody",class:t.normalizeClass(["cdx-dialog__body",{"cdx-dialog__body--no-header":!(e.showHeader||e.$slots.header),"cdx-dialog__body--no-footer":!(e.showFooterActions||e.$slots.footer||e.$slots["footer-text"])}])},[t.renderSlot(e.$slots,"default")],2),e.showFooterActions||e.$slots.footer||e.$slots["footer-text"]?(t.openBlock(),t.createElementBlock("footer",{key:1,class:t.normalizeClass(["cdx-dialog__footer",{"cdx-dialog__footer--default":!e.$slots.footer}])},[t.renderSlot(e.$slots,"footer",{},()=>[e.$slots["footer-text"]?(t.openBlock(),t.createElementBlock("p",ls,[t.renderSlot(e.$slots,"footer-text")])):t.createCommentVNode("v-if",!0),e.showFooterActions?(t.openBlock(),t.createElementBlock("div",as,[e.primaryAction?(t.openBlock(),t.createBlock(s,{key:0,class:"cdx-dialog__footer__primary-action",weight:"primary",action:e.primaryAction.actionType,disabled:e.primaryAction.disabled,onClick:n[1]||(n[1]=a=>e.$emit("primary"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.primaryAction.label),1)]),_:1},8,["action","disabled"])):t.createCommentVNode("v-if",!0),e.defaultAction?(t.openBlock(),t.createBlock(s,{key:1,class:"cdx-dialog__footer__default-action",disabled:e.defaultAction.disabled,onClick:n[2]||(n[2]=a=>e.$emit("default"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.defaultAction.label),1)]),_:1},8,["disabled"])):t.createCommentVNode("v-if",!0)])):t.createCommentVNode("v-if",!0)])],2)):t.createCommentVNode("v-if",!0)],16,Za),t.createElementVNode("div",{ref:"focusTrapEnd",tabindex:"0",onFocus:n[4]||(n[4]=(...a)=>e.focusFirst&&e.focusFirst(...a))},null,544)],544)):t.createCommentVNode("v-if",!0)]),_:3})],8,["to","disabled"])}const is=P(Ja,[["render",ss]]),rs={notice:Pt,error:Ft,warning:Rt,success:Kt},ds=t.defineComponent({name:"CdxMessage",components:{CdxButton:ve,CdxIcon:q},props:{type:{type:String,default:"notice",validator:Ut},inline:{type:Boolean,default:!1},icon:{type:[String,Object],default:null},fadeIn:{type:Boolean,default:!1},allowUserDismiss:{type:Boolean,default:!1},dismissButtonLabel:{type:String,default:""},autoDismiss:{type:[Boolean,Number],default:!1,validator:e=>typeof e=="boolean"||typeof e=="number"&&e>0}},emits:["user-dismissed","auto-dismissed"],setup(e,{emit:n}){const o=t.ref(!1),l=t.computed(()=>e.inline===!1&&(e.dismissButtonLabel.length>0||e.allowUserDismiss)),i=Ye(t.toRef(e,"dismissButtonLabel"),"cdx-message-dismiss-button-label","Close"),d=t.computed(()=>e.autoDismiss===!1||e.type==="error"?!1:e.autoDismiss===!0?4e3:e.autoDismiss),r=t.computed(()=>({"cdx-message--inline":e.inline,"cdx-message--block":!e.inline,"cdx-message--user-dismissable":l.value,["cdx-message--".concat(e.type)]:!0})),s=t.computed(()=>e.icon&&e.type==="notice"?e.icon:rs[e.type]),a=t.ref("");function u(c){o.value||(a.value=c==="user-dismissed"?"cdx-message-leave-active-user":"cdx-message-leave-active-system",o.value=!0,n(c))}return t.onMounted(()=>{e.type==="error"&&e.autoDismiss!==!1?t.warn('CdxMessage: Message with type="error" cannot use auto-dismiss'):d.value&&setTimeout(()=>u("auto-dismissed"),d.value)}),{dismissed:o,userDismissable:l,translatedDismissButtonLabel:i,rootClasses:r,leaveActiveClass:a,computedIcon:s,onDismiss:u,cdxIconClose:ft}}}),us=["aria-live","role"],cs={class:"cdx-message__content"};function ps(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-button");return t.openBlock(),t.createBlock(t.Transition,{name:"cdx-message",appear:e.fadeIn,"leave-active-class":e.leaveActiveClass},{default:t.withCtx(()=>[e.dismissed?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["cdx-message",e.rootClasses]),"aria-live":e.type!=="error"?"polite":void 0,role:e.type==="error"?"alert":void 0},[t.createVNode(r,{class:"cdx-message__icon--vue",icon:e.computedIcon},null,8,["icon"]),t.createElementVNode("div",cs,[t.renderSlot(e.$slots,"default")]),e.userDismissable?(t.openBlock(),t.createBlock(s,{key:0,class:"cdx-message__dismiss-button",weight:"quiet",type:"button","aria-label":e.translatedDismissButtonLabel,onClick:n[0]||(n[0]=a=>e.onDismiss("user-dismissed"))},{default:t.withCtx(()=>[t.createVNode(r,{icon:e.cdxIconClose},null,8,["icon"])]),_:1},8,["aria-label"])):t.createCommentVNode("v-if",!0)],10,us))]),_:3},8,["appear","leave-active-class"])}const Bn=P(ds,[["render",ps]]),fs=J(pe),ms=t.defineComponent({name:"CdxField",components:{CdxLabel:Le,CdxMessage:Bn},props:{labelIcon:{type:[String,Object],default:""},optional:{type:Boolean,default:!1},optionalFlag:{type:String,default:""},hideLabel:{type:Boolean,default:!1},isFieldset:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},status:{type:String,default:"default",validator:fs},messages:{type:Object,default:()=>({})}},setup(e,{slots:n}){const{disabled:o,status:l,isFieldset:i}=t.toRefs(e),d=ht(o),r=t.computed(()=>({"cdx-field--disabled":d.value,"cdx-field--is-fieldset":i.value})),s=U("label"),a=U("description"),u=U("input"),c=t.computed(()=>i.value?void 0:u);t.provide(Qt,c);const p=t.computed(()=>!i.value&&n.description?a:void 0);t.provide(qe,p),t.provide(Yt,d),t.provide(Gt,l);const f=t.computed(()=>e.status!=="default"&&e.status in e.messages?e.messages[e.status]:""),m=t.computed(()=>e.status==="default"?"notice":e.status);return{rootClasses:r,computedDisabled:d,labelId:s,descriptionId:a,inputId:u,validationMessage:f,validationMessageType:m}}}),hs={class:"cdx-field__control"},vs={class:"cdx-field__help-text"},gs={key:0,class:"cdx-field__validation-message"};function bs(e,n,o,l,i,d){const r=t.resolveComponent("cdx-label"),s=t.resolveComponent("cdx-message");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isFieldset?"fieldset":"div"),{class:t.normalizeClass(["cdx-field",e.rootClasses]),"aria-disabled":!e.isFieldset&&e.computedDisabled?!0:void 0,disabled:e.isFieldset&&e.computedDisabled?!0:void 0},{default:t.withCtx(()=>[t.createVNode(r,{id:e.labelId,icon:e.labelIcon,"visually-hidden":e.hideLabel,optional:e.optional,"optional-flag":e.optionalFlag,"input-id":e.inputId,"description-id":e.descriptionId,disabled:e.computedDisabled,"is-legend":e.isFieldset},t.createSlots({default:t.withCtx(()=>[t.renderSlot(e.$slots,"label")]),_:2},[e.$slots.description&&e.$slots.description().length>0?{name:"description",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"description")]),key:"0"}:void 0]),1032,["id","icon","visually-hidden","optional","optional-flag","input-id","description-id","disabled","is-legend"]),t.createElementVNode("div",hs,[t.renderSlot(e.$slots,"default")]),t.createElementVNode("div",vs,[t.renderSlot(e.$slots,"help-text")]),!e.computedDisabled&&e.validationMessage||e.$slots[e.validationMessageType]?(t.openBlock(),t.createElementBlock("div",gs,[t.createVNode(s,{type:e.validationMessageType,inline:!0},{default:t.withCtx(()=>[e.status==="warning"&&e.$slots.warning?t.renderSlot(e.$slots,"warning",{key:0}):e.status==="error"&&e.$slots.error?t.renderSlot(e.$slots,"error",{key:1}):e.status==="success"&&e.$slots.success?t.renderSlot(e.$slots,"success",{key:2}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createTextVNode(t.toDisplayString(e.validationMessage),1)],64))]),_:3},8,["type"])])):t.createCommentVNode("v-if",!0)]),_:3},8,["class","aria-disabled","disabled"])}const ys=P(ms,[["render",bs]]),Cs={notice:Pt,error:Ft,warning:Rt,success:Kt},ws=t.defineComponent({name:"CdxInfoChip",components:{CdxIcon:q},props:{status:{type:String,default:"notice",validator:Ut},icon:{type:[String,Object],default:null}},setup(e){const n=t.computed(()=>({["cdx-info-chip--".concat(e.status)]:!0})),o=t.computed(()=>e.status==="notice"?e.icon:Cs[e.status]);return{rootClasses:n,computedIcon:o}}}),ks={class:"cdx-info-chip__text"};function $s(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-info-chip",e.rootClasses])},[e.computedIcon?(t.openBlock(),t.createBlock(r,{key:0,class:"cdx-info-chip__icon--vue",icon:e.computedIcon},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createElementVNode("span",ks,[t.renderSlot(e.$slots,"default")])],2)}const Bs=P(ws,[["render",$s]]),Ss=J(pe),xs=t.defineComponent({name:"CdxLookup",components:{CdxMenu:ke,CdxTextInput:Je},inheritAttrs:!1,props:{selected:{type:[String,Number,null],required:!0},menuItems:{type:Array,required:!0},inputValue:{type:[String,Number],default:null},initialInputValue:{type:[String,Number],default:"",validator:e=>(e&&console.warn('[CdxLookup]: prop "initialInputValue" is deprecated. Use "inputValue" instead.'),!0)},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})},status:{type:String,default:"default",validator:Ss}},emits:["update:selected","update:input-value","load-more","input","change","focus","blur"],setup:(e,{emit:n,attrs:o,slots:l})=>{const i=t.ref(),d=t.ref(),r=t.ref(),s=U("lookup-menu"),a=t.ref(!1),u=t.ref(!1),c=t.ref(!1),p=t.ref(e.menuItems),{computedDisabled:f,computedStatus:m}=le(t.toRef(e,"disabled"),t.toRef(e,"status")),h=t.toRef(e,"selected"),g=ne(h,n,"update:selected"),C=t.computed(()=>{var V;return(V=r.value)==null?void 0:V.getComputedMenuItems().find(R=>R.value===g.value)}),k=t.computed(()=>{var V,R;return(R=(V=r.value)==null?void 0:V.getHighlightedMenuItem())==null?void 0:R.id}),B=t.ref(e.initialInputValue),$=Xe(B,t.toRef(e,"inputValue"),n,"update:input-value"),I=t.computed(()=>({"cdx-lookup--disabled":f.value,"cdx-lookup--pending":a.value})),{rootClasses:E,rootStyle:M,otherAttrs:A}=ae(o,I);function x(V){C.value?C.value.label!==V&&C.value.value!==V&&(g.value=null):e.selected!==null&&e.selected!==V&&(g.value=null),V===""&&p.value.length===0?(u.value=!1,a.value=!1):a.value=!0,n("input",V)}function y(V){c.value=!0;const R=$.value!==null&&$.value!=="";!!(e.menuItems.length>0||l["no-results"])&&(R||p.value.length>0)&&(u.value=!0),n("focus",V)}function b(V){c.value=!1,u.value=!1,n("blur",V)}function S(V){!r.value||f.value||e.menuItems.length===0&&!l["no-results"]||V.key===" "||r.value.delegateKeyNavigation(V)}return Ne(d,r),t.watch(g,V=>{var R;if(V!==null){const z=C.value?(R=C.value.label)!=null?R:C.value.value:"";$.value!==z&&($.value=z,n("input",z))}}),t.watch(t.toRef(e,"menuItems"),V=>{c.value&&a.value&&(V.length>0||l["no-results"])&&(u.value=!0),V.length===0&&!l["no-results"]&&(u.value=!1),a.value=!1}),{rootElement:i,textInput:d,menu:r,menuId:s,highlightedId:k,computedInputValue:$,selection:g,expanded:u,computedDisabled:f,computedStatus:m,onInputBlur:b,rootClasses:E,rootStyle:M,otherAttrs:A,onUpdateInput:x,onInputFocus:y,onKeydown:S}}});function Is(e,n,o,l,i,d){const r=t.resolveComponent("cdx-text-input"),s=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{ref:"rootElement",class:t.normalizeClass(["cdx-lookup",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createVNode(r,t.mergeProps({ref:"textInput",modelValue:e.computedInputValue,"onUpdate:modelValue":n[0]||(n[0]=a=>e.computedInputValue=a)},e.otherAttrs,{class:"cdx-lookup__input",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-controls":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,disabled:e.computedDisabled,status:e.computedStatus,"onUpdate:modelValue":e.onUpdateInput,onChange:n[1]||(n[1]=a=>e.$emit("change",a)),onFocus:e.onInputFocus,onBlur:e.onInputBlur,onKeydown:e.onKeydown}),null,16,["modelValue","aria-controls","aria-expanded","aria-activedescendant","disabled","status","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.createVNode(s,t.mergeProps({id:e.menuId,ref:"menu",selected:e.selection,"onUpdate:selected":n[2]||(n[2]=a=>e.selection=a),expanded:e.expanded,"onUpdate:expanded":n[3]||(n[3]=a=>e.expanded=a),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[4]||(n[4]=a=>e.$emit("load-more"))}),{default:t.withCtx(({menuItem:a})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:a})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}const Vs=P(xs,[["render",Is]]),Es=t.defineComponent({name:"CdxToggleButton",props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},quiet:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n,slots:o,attrs:l}){const i=Zt(o.default,l,"CdxToggleButton"),d=t.ref(!1),r=t.computed(()=>({"cdx-toggle-button--quiet":e.quiet,"cdx-toggle-button--framed":!e.quiet,"cdx-toggle-button--toggled-on":e.modelValue,"cdx-toggle-button--toggled-off":!e.modelValue,"cdx-toggle-button--icon-only":i.value,"cdx-toggle-button--is-active":d.value})),s=()=>{n("update:modelValue",!e.modelValue)},a=p=>{d.value=p};function u(){a(!0)}function c(){a(!1),s()}return{rootClasses:r,onClick:s,onKeyDown:u,onKeyUp:c}}}),Ns=["aria-pressed","disabled"];function As(e,n,o,l,i,d){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-toggle-button",e.rootClasses]),"aria-pressed":e.modelValue,disabled:e.disabled,type:"button",onClick:n[0]||(n[0]=(...r)=>e.onClick&&e.onClick(...r)),onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers((...r)=>e.onKeyDown&&e.onKeyDown(...r),["prevent"]),["space","enter"])),onKeyup:n[2]||(n[2]=t.withKeys((...r)=>e.onKeyUp&&e.onKeyUp(...r),["space","enter"]))},[t.renderSlot(e.$slots,"default")],42,Ns)}const $t=P(Es,[["render",As]]),Ds=t.defineComponent({name:"CdxMenuButton",components:{CdxToggleButton:$t,CdxMenu:ke},inheritAttrs:!1,props:{selected:{type:[String,Number,null],required:!0},menuItems:{type:Array,required:!0},menuConfig:{type:Object,default:()=>({})},disabled:{type:Boolean,default:!1},footer:{type:Object,default:null}},emits:["update:selected"],setup(e,{emit:n,attrs:o}){const l=t.ref(),i=t.ref(),d=t.toRef(e,"selected"),r=ne(d,n,"update:selected"),s=t.ref(!1),a=U("menuToggle"),u=U("menu"),{computedDisabled:c}=le(t.toRef(e,"disabled")),{rootClasses:p,rootStyle:f,otherAttrs:m}=ae(o);function h(g){!l.value||c.value||e.menuItems.length===0||g.key===" "||l.value.delegateKeyNavigation(g)}return Ne(i,l,{useAvailableWidth:!0,placement:"bottom-start",offset:4}),{computedDisabled:c,expanded:s,menu:l,menuId:u,modelWrapper:r,onKeydown:h,toggle:i,toggleId:a,rootClasses:p,rootStyle:f,otherAttrs:m}}}),Ms={class:"cdx-menu-button__menu-wrapper"};function Ls(e,n,o,l,i,d){const r=t.resolveComponent("cdx-toggle-button"),s=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-menu-button",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createVNode(r,t.mergeProps({id:e.toggleId,ref:"toggle"},e.otherAttrs,{modelValue:e.expanded,"onUpdate:modelValue":n[0]||(n[0]=a=>e.expanded=a),disabled:e.computedDisabled,quiet:"","aria-haspopup":"menu","aria-controls":e.menuId,"aria-expanded":e.expanded,onBlur:n[1]||(n[1]=a=>e.expanded=!1),onKeydown:e.onKeydown}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["id","modelValue","disabled","aria-controls","aria-expanded","onKeydown"]),t.createElementVNode("div",Ms,[t.createVNode(s,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[2]||(n[2]=a=>e.modelWrapper=a),expanded:e.expanded,"onUpdate:expanded":n[3]||(n[3]=a=>e.expanded=a),"menu-items":e.menuItems},e.menuConfig,{role:"menu","aria-labelledby":e.toggleId,footer:e.footer}),{default:t.withCtx(({menuItem:a})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:a})]),_:3},16,["id","selected","expanded","menu-items","aria-labelledby","footer"])])],6)}const Ts=P(Ds,[["render",Ls]]),Rs=J(pe),Fs=t.defineComponent({name:"CdxMultiselectLookup",components:{CdxChipInput:on,CdxMenu:ke},props:{inputChips:{type:Array,required:!0},selected:{type:[Array],required:!0},menuItems:{type:Array,required:!0},inputValue:{type:[String,Number],default:null},separateInput:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},status:{type:String,default:"default",validator:Rs},menuConfig:{type:Object,default:()=>({})}},emits:["update:input-chips","update:selected","update:input-value","load-more","input","change","focus","blur"],setup:(e,{emit:n,attrs:o,slots:l})=>{const i=t.ref(),d=t.ref(),r=U("multiselect-lookup-menu"),s=t.computed(()=>{var b,S;return(S=(b=d.value)==null?void 0:b.getHighlightedMenuItem())==null?void 0:S.id}),a=t.ref(!1),u=t.ref(!1),c=t.ref(!1);t.provide(qt,t.ref(!1));const{computedDisabled:p,computedStatus:f}=le(t.toRef(e,"disabled"),t.toRef(e,"status")),m=t.computed(()=>({"cdx-multiselect-lookup--disabled":p.value,"cdx-multiselect-lookup--pending":a.value})),{rootClasses:h,rootStyle:g,otherAttrs:C}=ae(o,m);Ne(i,d);const k=ne(t.toRef(e,"selected"),n,"update:selected"),B=ne(t.toRef(e,"inputChips"),n,"update:input-chips"),$=t.ref(""),I=Xe($,t.toRef(e,"inputValue"),n,"update:input-value"),E=t.computed(()=>I.value.toString().length>0&&l["no-results"]);function M(b){return ee(this,null,function*(){yield t.nextTick(),a.value=b!==null&&b!=="",n("input",b)})}function A(b){c.value=!0,(e.menuItems.length>0||E.value)&&(u.value=!0),n("focus",b)}function x(b){c.value=!1,u.value=!1,n("blur",b)}function y(b){!d.value||p.value||e.menuItems.length===0&&!E.value||b.key===" "||d.value.delegateKeyNavigation(b)}return t.watch(t.toRef(e,"selected"),b=>{const S=b.filter(V=>B.value.find(R=>V===R.value)===void 0);S.length>0&&(S.forEach(V=>{var z;const R=(z=d.value)==null?void 0:z.getComputedMenuItems().find(F=>F.value===V);if(R){const L=R,{id:F}=L,G=de(L,["id"]);B.value.push(G)}}),I.value="",n("input","")),B.value=B.value.filter(V=>b.find(R=>V.value===R)!==void 0)}),t.watch(t.toRef(e,"inputChips"),b=>{b.length<k.value.length&&(k.value=b.map(S=>S.value))}),t.watch(t.toRef(e,"menuItems"),b=>{b.length===0&&!E.value?u.value=!1:c.value&&a.value&&(u.value=!0),a.value=!1}),{chipInput:i,menu:d,menuId:r,highlightedId:s,expanded:u,computedDisabled:p,computedStatus:f,rootClasses:h,rootStyle:g,otherAttrs:C,selectedWrapper:k,inputChipsWrapper:B,computedInputValue:I,onUpdateInputValue:M,onInputBlur:x,onInputFocus:A,onKeydown:y}}});function Os(e,n,o,l,i,d){const r=t.resolveComponent("cdx-chip-input"),s=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-multiselect-lookup",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createVNode(r,t.mergeProps({ref:"chipInput","input-chips":e.inputChipsWrapper,"onUpdate:inputChips":n[0]||(n[0]=a=>e.inputChipsWrapper=a),"input-value":e.computedInputValue,"onUpdate:inputValue":n[1]||(n[1]=a=>e.computedInputValue=a)},e.otherAttrs,{class:"cdx-multiselect-lookup__chip-input",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-controls":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,"separate-input":e.separateInput,readonly:e.readonly,disabled:e.computedDisabled,status:e.computedStatus,"onUpdate:inputValue":e.onUpdateInputValue,onFocus:e.onInputFocus,onBlur:e.onInputBlur,onKeydown:e.onKeydown}),null,16,["input-chips","input-value","aria-controls","aria-expanded","aria-activedescendant","separate-input","readonly","disabled","status","onUpdate:inputValue","onFocus","onBlur","onKeydown"]),t.createVNode(s,t.mergeProps({id:e.menuId,ref:"menu",selected:e.selectedWrapper,"onUpdate:selected":n[2]||(n[2]=a=>e.selectedWrapper=a),expanded:e.expanded,"onUpdate:expanded":n[3]||(n[3]=a=>e.expanded=a),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[4]||(n[4]=a=>e.$emit("load-more"))}),{default:t.withCtx(({menuItem:a})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:a})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}const Ps=P(Fs,[["render",Os]]),_s=J(pe),zs=t.defineComponent({name:"CdxRadio",components:{CdxLabel:Le},props:{modelValue:{type:[String,Number,Boolean],default:""},inputValue:{type:[String,Number,Boolean],default:!1},name:{type:String,required:!0},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},status:{type:String,default:"default",validator:_s}},emits:["update:modelValue"],setup(e,{emit:n,slots:o,attrs:l}){var m;vt((m=o.default)==null?void 0:m.call(o),l,"CdxRadio");const{computedDisabled:i,computedStatus:d}=le(t.toRef(e,"disabled"),t.toRef(e,"status")),r=t.computed(()=>({"cdx-radio--inline":e.inline,["cdx-radio--status-".concat(d.value)]:!0})),s=t.computed(()=>({"cdx-radio__custom-input--inline":e.inline})),a=t.ref(),u=U("radio"),c=U("description"),p=()=>{a.value.focus()},f=ne(t.toRef(e,"modelValue"),n);return{rootClasses:r,computedDisabled:i,input:a,radioId:u,descriptionId:c,focusInput:p,wrappedModel:f,customInputClasses:s}}}),Ks={class:"cdx-radio__wrapper"},Hs=["id","aria-describedby","name","value","disabled"],Us=t.createElementVNode("span",{class:"cdx-radio__icon"},null,-1);function js(e,n,o,l,i,d){const r=t.resolveComponent("cdx-label");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-radio",e.rootClasses])},[t.createElementVNode("div",Ks,[t.withDirectives(t.createElementVNode("input",{id:e.radioId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=s=>e.wrappedModel=s),class:"cdx-radio__input",type:"radio","aria-describedby":e.$slots.description&&e.$slots.description().length>0?e.descriptionId:void 0,name:e.name,value:e.inputValue,disabled:e.computedDisabled},null,8,Hs),[[t.vModelRadio,e.wrappedModel]]),Us,e.$slots.default&&e.$slots.default().length?(t.openBlock(),t.createBlock(r,{key:0,class:"cdx-radio__label","input-id":e.radioId,"description-id":e.$slots.description&&e.$slots.description().length>0?e.descriptionId:void 0,disabled:e.computedDisabled,onClick:e.focusInput},t.createSlots({default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:2},[e.$slots.description&&e.$slots.description().length>0?{name:"description",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"description")]),key:"0"}:void 0]),1032,["input-id","description-id","disabled","onClick"])):t.createCommentVNode("v-if",!0)]),e.$slots["custom-input"]?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["cdx-radio__custom-input",e.customInputClasses])},[t.renderSlot(e.$slots,"custom-input")],2)):t.createCommentVNode("v-if",!0)],2)}const Ws=P(zs,[["render",js]]),qs=J(pe),Qs=t.defineComponent({name:"CdxSearchInput",components:{CdxButton:ve,CdxTextInput:Je},inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},useButton:{type:Boolean,default:!1},buttonLabel:{type:String,default:""},disabled:{type:Boolean,default:!1},status:{type:String,default:"default",validator:qs}},emits:["update:modelValue","submit-click","input","change","focus","blur"],setup(e,{emit:n,attrs:o}){const l=ne(t.toRef(e,"modelValue"),n),{computedDisabled:i}=le(t.toRef(e,"disabled")),d=t.computed(()=>({"cdx-search-input--has-end-button":!!e.buttonLabel||e.useButton})),{rootClasses:r,rootStyle:s,otherAttrs:a}=ae(o,d),u=Ye(t.toRef(e,"buttonLabel"),"cdx-search-input-search-button-label","Search"),c=t.computed(()=>e.useButton||e.buttonLabel.length>0);return{wrappedModel:l,computedDisabled:i,rootClasses:r,rootStyle:s,otherAttrs:a,handleSubmit:()=>{n("submit-click",l.value)},searchIcon:oo,translatedSearchButtonLabel:u,useButtonOrLabel:c}},methods:{focus(){this.$refs.textInput.focus()}}}),Gs={class:"cdx-search-input__input-wrapper"};function Ys(e,n,o,l,i,d){const r=t.resolveComponent("cdx-text-input"),s=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-search-input",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("div",Gs,[t.createVNode(r,t.mergeProps({ref:"textInput",modelValue:e.wrappedModel,"onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-search-input__text-input","input-type":"search","start-icon":e.searchIcon,disabled:e.computedDisabled,status:e.status},e.otherAttrs,{onKeydown:t.withKeys(e.handleSubmit,["enter"]),onInput:n[1]||(n[1]=a=>e.$emit("input",a)),onChange:n[2]||(n[2]=a=>e.$emit("change",a)),onFocus:n[3]||(n[3]=a=>e.$emit("focus",a)),onBlur:n[4]||(n[4]=a=>e.$emit("blur",a))}),null,16,["modelValue","start-icon","disabled","status","onKeydown"]),t.renderSlot(e.$slots,"default")]),e.useButtonOrLabel?(t.openBlock(),t.createBlock(s,{key:0,class:"cdx-search-input__end-button",disabled:e.computedDisabled,onClick:e.handleSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.translatedSearchButtonLabel),1)]),_:1},8,["disabled","onClick"])):t.createCommentVNode("v-if",!0)],6)}const Sn=P(Qs,[["render",Ys]]),Xs=J(pe),Js=t.defineComponent({name:"CdxSelect",components:{CdxIcon:q,CdxMenu:ke},inheritAttrs:!1,props:{menuItems:{type:Array,required:!0},selected:{type:[String,Number,null],required:!0},defaultLabel:{type:String,default:""},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})},defaultIcon:{type:[String,Object],default:void 0},status:{type:String,default:"default",validator:Xs}},emits:["update:selected","load-more"],setup(e,{emit:n,attrs:o}){const l=t.ref(),i=t.ref(),d=t.inject(qe,void 0),r=U("select-menu"),s=t.ref(!1),a=o.id||U("select-handle"),{computedDisabled:u,computedStatus:c,computedInputId:p}=le(t.toRef(e,"disabled"),t.toRef(e,"status"),a),f=ne(t.toRef(e,"selected"),n,"update:selected"),m=t.computed(()=>{var y;return(y=i.value)==null?void 0:y.getComputedMenuItems().find(b=>b.value===e.selected)}),h=t.computed(()=>{var y;return m.value?(y=m.value.label)!=null?y:m.value.value:e.defaultLabel}),g=t.computed(()=>{var y;if(e.defaultIcon&&!m.value)return e.defaultIcon;if((y=m.value)!=null&&y.icon)return m.value.icon}),C=t.computed(()=>({"cdx-select-vue--enabled":!u.value,"cdx-select-vue--disabled":u.value,"cdx-select-vue--expanded":s.value,"cdx-select-vue--value-selected":!!m.value,"cdx-select-vue--no-selections":!m.value,"cdx-select-vue--has-start-icon":!!g.value,["cdx-select-vue--status-".concat(c.value)]:!0})),{rootClasses:k,rootStyle:B,otherAttrs:$}=ae(o,C),I=t.computed(()=>{const S=$.value,{id:y}=S;return de(S,["id"])}),E=t.computed(()=>{var y,b;return(b=(y=i.value)==null?void 0:y.getHighlightedMenuItem())==null?void 0:b.id});function M(){s.value=!1}function A(){var y;u.value||(s.value=!s.value,(y=l.value)==null||y.focus())}function x(y){var b;u.value||(b=i.value)==null||b.delegateKeyNavigation(y,{characterNavigation:!0})}return Ne(l,i),{handle:l,menu:i,computedHandleId:p,descriptionId:d,menuId:r,modelWrapper:f,selectedMenuItem:m,highlightedId:E,expanded:s,computedDisabled:u,onBlur:M,currentLabel:h,rootClasses:k,rootStyle:B,otherAttrsMinusId:I,onClick:A,onKeydown:x,startIcon:g,cdxIconExpand:Ot}}}),Zs=["aria-disabled"],ei=["id","aria-controls","aria-activedescendant","aria-expanded","aria-describedby"];function ti(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-select-vue",e.rootClasses]),style:t.normalizeStyle(e.rootStyle),"aria-disabled":e.computedDisabled},[t.createElementVNode("div",t.mergeProps({id:e.computedHandleId,ref:"handle",class:"cdx-select-vue__handle"},e.otherAttrsMinusId,{tabindex:"0",role:"combobox","aria-controls":e.menuId,"aria-activedescendant":e.highlightedId,"aria-expanded":e.expanded,"aria-describedby":e.descriptionId,onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a)),onBlur:n[1]||(n[1]=(...a)=>e.onBlur&&e.onBlur(...a)),onKeydown:n[2]||(n[2]=(...a)=>e.onKeydown&&e.onKeydown(...a))}),[t.renderSlot(e.$slots,"label",{selectedMenuItem:e.selectedMenuItem,defaultLabel:e.defaultLabel},()=>[t.createTextVNode(t.toDisplayString(e.currentLabel),1)]),e.startIcon?(t.openBlock(),t.createBlock(r,{key:0,icon:e.startIcon,class:"cdx-select-vue__start-icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createVNode(r,{icon:e.cdxIconExpand,class:"cdx-select-vue__indicator"},null,8,["icon"])],16,ei),t.createVNode(s,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[3]||(n[3]=a=>e.modelWrapper=a),expanded:e.expanded,"onUpdate:expanded":n[4]||(n[4]=a=>e.expanded=a),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[5]||(n[5]=a=>e.$emit("load-more"))}),{default:t.withCtx(({menuItem:a})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:a})]),_:3},16,["id","selected","expanded","menu-items"])],14,Zs)}const xn=P(Js,[["render",ti]]),ni=t.defineComponent({name:"CdxTablePager",components:{CdxButton:ve,CdxIcon:q,CdxSelect:xn},props:{paginationSizeOptions:{type:Array,required:!0},itemsPerPage:{type:Number,required:!0},nextDisabled:{type:Boolean,default:!1},prevDisabled:{type:Boolean,default:!1},lastDisabled:{type:Boolean,default:!1}},emits:["update:itemsPerPage","first","last","next","prev"],setup(e,{emit:n}){const o=ne(t.toRef(e,"itemsPerPage"),n,"update:itemsPerPage"),l=W("cdx-table-pager-items-per-page-default","Results per page"),i=W("cdx-table-pager-items-per-page-current",u=>"".concat(u," rows"),[o]),d=W("cdx-table-pager-button-first-page","First page"),r=W("cdx-table-pager-button-next-page","Next page"),s=W("cdx-table-pager-button-prev-page","Previous page"),a=W("cdx-table-pager-button-last-page","Last page");return{defaultItemsPerPageLabel:l,currentItemsPerPageLabel:i,btnLabelFirst:d,btnLabelNext:r,btnLabelPrev:s,btnLabelLast:a,wrappedItemsPerPage:o,cdxIconPrevious:zt,cdxIconNext:_t,cdxIconMoveFirst:to,cdxIconMoveLast:no}}}),oi={class:"cdx-table-pager"},li={class:"cdx-table-pager__start"},ai={key:0},si={key:1},ii={class:"cdx-table-pager__center"},ri={class:"cdx-table-pager__end"};function di(e,n,o,l,i,d){const r=t.resolveComponent("cdx-select"),s=t.resolveComponent("cdx-icon"),a=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",oi,[t.createElementVNode("div",li,[t.createVNode(r,{selected:e.wrappedItemsPerPage,"onUpdate:selected":n[0]||(n[0]=u=>e.wrappedItemsPerPage=u),"default-label":e.defaultItemsPerPageLabel,"menu-items":e.paginationSizeOptions},{label:t.withCtx(({selectedMenuItem:u,defaultLabel:c})=>[u?(t.openBlock(),t.createElementBlock("span",ai,[t.createElementVNode("span",null,t.toDisplayString(e.currentItemsPerPageLabel),1)])):(t.openBlock(),t.createElementBlock("span",si,t.toDisplayString(c),1))]),_:1},8,["selected","default-label","menu-items"])]),t.createElementVNode("div",ii,[t.renderSlot(e.$slots,"default")]),t.createElementVNode("div",ri,[t.createVNode(a,{disabled:e.prevDisabled,class:"cdx-table-pager__button-first",weight:"quiet","aria-label":e.btnLabelFirst,onClick:n[1]||(n[1]=u=>e.$emit("first"))},{default:t.withCtx(()=>[t.createVNode(s,{icon:e.cdxIconMoveFirst},null,8,["icon"])]),_:1},8,["disabled","aria-label"]),t.createVNode(a,{disabled:e.prevDisabled,class:"cdx-table-pager__button-prev",weight:"quiet","aria-label":e.btnLabelPrev,onClick:n[2]||(n[2]=u=>e.$emit("prev"))},{default:t.withCtx(()=>[t.createVNode(s,{icon:e.cdxIconPrevious},null,8,["icon"])]),_:1},8,["disabled","aria-label"]),t.createVNode(a,{disabled:e.nextDisabled,class:"cdx-table-pager__button-next",weight:"quiet","aria-label":e.btnLabelNext,onClick:n[3]||(n[3]=u=>e.$emit("next"))},{default:t.withCtx(()=>[t.createVNode(s,{icon:e.cdxIconNext},null,8,["icon"])]),_:1},8,["disabled","aria-label"]),t.createVNode(a,{disabled:e.nextDisabled||e.lastDisabled,class:"cdx-table-pager__button-last",weight:"quiet","aria-label":e.btnLabelLast,onClick:n[4]||(n[4]=u=>e.$emit("last"))},{default:t.withCtx(()=>[t.createVNode(s,{icon:e.cdxIconMoveLast},null,8,["icon"])]),_:1},8,["disabled","aria-label"])])])}const ui=P(ni,[["render",di]]),ci=J(ho),pi=J(yo),fi={none:lo,asc:ao,desc:Zn},mi={none:"none",asc:"ascending",desc:"descending"},hi=t.defineComponent({name:"CdxTable",components:{CdxCheckbox:nn,CdxIcon:q,CdxTablePager:ui,CdxProgressBar:gt},props:{caption:{type:String,required:!0},hideCaption:{type:Boolean,default:!1},columns:{type:Array,default:()=>[],validator:e=>{const n=e.map(l=>l.id);return new Set(n).size===n.length?!0:(console.warn('[CdxTable]: Each column in the "columns" prop must have a unique "id".'),!1)}},data:{type:Array,default:()=>[],validator:(e,n)=>{if(!Array.isArray(n.columns)||n.columns.length===0||e.length===0)return!0;const o=n.columns.some(i=>"allowSort"in i),l=e.every(i=>Ke in i);return o&&n.useRowSelection&&!l?(console.warn('[CdxTable]: With sorting and row selection, each row in the "data" prop must have a "TableRowIdentifier".'),!1):!0}},useRowHeaders:{type:Boolean,default:!1},showVerticalBorders:{type:Boolean,default:!1},useRowSelection:{type:Boolean,default:!1},selectedRows:{type:Array,default:()=>[]},sort:{type:Object,default:()=>({})},pending:{type:Boolean,default:!1},paginate:{type:Boolean,default:!1},serverPagination:{type:Boolean,default:!1},totalRows:{type:Number,default:NaN},paginationPosition:{type:String,default:"bottom",validator:pi},paginationSizeOptions:{type:Array,default:()=>[{value:10},{value:20},{value:50}],validator:e=>{const n=o=>typeof o.value=="number";return e.every(n)?!0:(console.warn('[CdxTable]: "value" property of all menu items in PaginationOptions must be a number.'),!1)}},paginationSizeDefault:{type:Number,default:e=>e.paginate&&e.serverPagination?e.data.length:e.paginationSizeOptions[0].value}},emits:["update:selectedRows","update:sort","load-more","last"],setup(e,{emit:n}){const o=t.ref(0),l=t.ref(e.paginationSizeDefault),i=t.computed(()=>e.serverPagination&&e.paginate?e.data:e.paginate?e.data.slice(o.value,l.value+o.value):e.data),d=t.computed(()=>{var N;return e.serverPagination?(N=e.totalRows)!=null?N:NaN:e.data.length}),r=t.computed(()=>isNaN(d.value)),s=t.computed(()=>i.value.length),a=t.computed(()=>o.value+1),u=t.computed(()=>o.value+s.value),c=t.computed(()=>r.value),p=t.computed(()=>o.value<=0),f=t.computed(()=>r.value?s.value<l.value:o.value+l.value>=d.value),m=W("cdx-table-pagination-status-message-determinate-short",(N,O,H)=>"".concat(N,"–").concat(O," of ").concat(H),[a,u,d]),h=W("cdx-table-pagination-status-message-determinate-long",(N,O,H)=>"Showing results ".concat(N,"–").concat(O," of ").concat(H),[a,u,d]),g=W("cdx-table-pagination-status-message-indeterminate-short",(N,O)=>"".concat(N,"–").concat(O," of many"),[a,u]),C=W("cdx-table-pagination-status-message-indeterminate-long",(N,O)=>"Showing results ".concat(N,"–").concat(O," of many"),[a,u]),k=W("cdx-table-pagination-status-message-indeterminate-final",N=>"Showing the last ".concat(N," results"),[s]),B=W("cdx-table-pagination-status-message-pending","Loading results..."),$=t.computed(()=>e.pending?B.value:r.value&&f.value?k.value:r.value?g.value:m.value),I=t.computed(()=>e.pending?B.value:r.value&&f.value?k.value:r.value?C.value:h.value);function E(){o.value+=l.value,e.serverPagination&&n("load-more",o.value,l.value)}function M(){o.value-l.value<1?A():(o.value-=l.value,e.serverPagination&&n("load-more",o.value,l.value))}function A(){o.value=0,e.serverPagination&&n("load-more",o.value,l.value)}function x(){d.value%l.value===0?(o.value=d.value-l.value,n("load-more",o.value,l.value)):(o.value=Math.floor(d.value/l.value)*l.value,n("load-more",o.value,l.value))}t.watch(l,N=>{e.serverPagination&&n("load-more",o.value,N)});const y=ne(t.toRef(e,"selectedRows"),n,"update:selectedRows"),b=t.ref(d.value===y.value.length),S=t.ref(!1),V=t.computed(()=>Object.keys(e.sort)[0]),R=t.computed(()=>e.columns.some(N=>N.allowSort)),z=t.computed(()=>{var O;return{"cdx-table__table--layout-fixed":(O=e.columns)==null?void 0:O.some(H=>"width"in H||"minWidth"in H),"cdx-table__table--borders-vertical":e.showVerticalBorders}}),L=W("cdx-table-sort-caption",N=>"".concat(N," (column headers with buttons are sortable)."),[t.toRef(e,"caption")]),F=(N,O)=>W("cdx-table-select-row-label",(H,v)=>"Select row ".concat(H," of ").concat(v),[()=>N,()=>O]).value,G=W("cdx-table-select-all-label","Select all rows");function j(N,O){return Ke in N?N[Ke]:O}function te(N,O){const H=j(N,O);return{"cdx-table__row--selected":y.value.indexOf(H)!==-1}}function Z(N){const O=e.columns[0].id;if(e.useRowHeaders&&N===O)return"row"}function w(N){const O=e.columns[0].id;return e.useRowHeaders&&N===O?"th":"td"}function T(N,O=!1){if("textAlign"in N&&!ci(N.textAlign)){console.warn('[CdxTable]: Invalid value for TableColumn "textAlign" property.');return}return{["cdx-table__table__cell--align-".concat(N.textAlign)]:"textAlign"in N&&N.textAlign!=="start","cdx-table__table__cell--has-sort":O}}function K(N){const O={};return"width"in N&&(O.width=N.width),"minWidth"in N&&(O.minWidth=N.minWidth),O}function Y(N){if(d.value===N.length){b.value=!0,S.value=!1;return}b.value=!1,d.value>N.length&&(S.value=!0),N.length===0&&(S.value=!1)}function nt(N){S.value=!1,N?y.value=e.data.map((O,H)=>j(O,H)):y.value=[]}function ot(N){var v;const O=(v=e.sort[N])!=null?v:"none";let H="asc";O==="asc"&&(H="desc"),O==="desc"&&(H="none"),n("update:sort",{[N]:H})}function lt(N){var H;const O=(H=e.sort[N])!=null?H:"none";return fi[O]}function at(N,O=!1){var H;if(O){const v=(H=e.sort[N])!=null?H:"none";return v==="none"?void 0:mi[v]}}return{dataForDisplay:i,pageSize:l,onNext:E,onPrev:M,onFirst:A,onLast:x,nextDisabled:f,prevDisabled:p,lastDisabled:c,paginationStatusMessageShort:$,paginationStatusMessageLong:I,wrappedSelectedRows:y,selectAll:b,selectAllIndeterminate:S,activeSortColumn:V,hasSortableColumns:R,tableClasses:z,getRowKey:j,getRowClass:te,getRowHeaderScope:Z,getCellElement:w,getCellClass:T,getCellStyle:K,handleRowSelection:Y,handleSelectAll:nt,handleSort:ot,getSortIcon:lt,getSortOrder:at,translatedSortCaption:L,translatedSelectRowLabel:F,translatedSelectAllLabel:G}}}),vi={class:"cdx-table",tabindex:"0"},gi={key:0,class:"cdx-table__header"},bi=["aria-hidden"],yi={class:"cdx-table__header__content"},Ci={class:"cdx-table__pagination-status--long"},wi={class:"cdx-table__pagination-status--short"},ki={class:"cdx-table__table-wrapper"},$i={key:0},Bi={key:0,class:"cdx-table__table__select-rows"},Si=["aria-sort"],xi=["aria-selected","onClick"],Ii={class:"cdx-table__table__sort-label"},Vi={key:0},Ei={key:0},Ni={key:1},Ai={class:"cdx-table__table__empty-state"},Di=["colspan"],Mi={class:"cdx-table__pagination-status--long"},Li={class:"cdx-table__pagination-status--short"},Ti={key:3,class:"cdx-table__footer"};function Ri(e,n,o,l,i,d){const r=t.resolveComponent("cdx-table-pager"),s=t.resolveComponent("cdx-checkbox"),a=t.resolveComponent("cdx-icon"),u=t.resolveComponent("cdx-progress-bar");return t.openBlock(),t.createElementBlock("div",vi,[!e.hideCaption||e.$slots.header&&e.$slots.header().length>0?(t.openBlock(),t.createElementBlock("div",gi,[t.createElementVNode("div",{class:"cdx-table__header__caption","aria-hidden":e.$slots.header&&e.$slots.header().length>0?void 0:!0},[e.hideCaption?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(e.caption),1)],64))],8,bi),t.createElementVNode("div",yi,[t.renderSlot(e.$slots,"header")])])):t.createCommentVNode("v-if",!0),e.paginate&&(e.paginationPosition==="top"||e.paginationPosition==="both")?(t.openBlock(),t.createBlock(r,{key:1,"items-per-page":e.pageSize,"onUpdate:itemsPerPage":n[0]||(n[0]=c=>e.pageSize=c),class:"cdx-table__pagination--top","pagination-size-options":e.paginationSizeOptions,"prev-disabled":e.prevDisabled,"next-disabled":e.nextDisabled,"last-disabled":e.lastDisabled,onNext:e.onNext,onPrev:e.onPrev,onFirst:e.onFirst,onLast:e.onLast},{default:t.withCtx(()=>[t.createElementVNode("span",Ci,t.toDisplayString(e.paginationStatusMessageLong),1),t.createElementVNode("span",wi,t.toDisplayString(e.paginationStatusMessageShort),1)]),_:1},8,["items-per-page","pagination-size-options","prev-disabled","next-disabled","last-disabled","onNext","onPrev","onFirst","onLast"])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",ki,[t.createElementVNode("table",{class:t.normalizeClass(["cdx-table__table",e.tableClasses])},[t.createElementVNode("caption",null,[e.hasSortableColumns?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.translatedSortCaption),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(e.caption),1)],64))]),t.renderSlot(e.$slots,"thead",{},()=>[e.columns.length>0?(t.openBlock(),t.createElementBlock("thead",$i,[t.createElementVNode("tr",null,[e.useRowSelection?(t.openBlock(),t.createElementBlock("th",Bi,[t.createVNode(s,{modelValue:e.selectAll,"onUpdate:modelValue":[n[1]||(n[1]=c=>e.selectAll=c),e.handleSelectAll],"hide-label":!0,indeterminate:e.selectAllIndeterminate},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.translatedSelectAllLabel),1)]),_:1},8,["modelValue","indeterminate","onUpdate:modelValue"])])):t.createCommentVNode("v-if",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,c=>(t.openBlock(),t.createElementBlock("th",{key:c.id,scope:"col",class:t.normalizeClass(e.getCellClass(c,c.allowSort)),"aria-sort":e.getSortOrder(c.id,c.allowSort),style:t.normalizeStyle(e.getCellStyle(c))},[c.allowSort?(t.openBlock(),t.createElementBlock("button",{key:0,"aria-selected":c.id===e.activeSortColumn,class:"cdx-table__table__sort-button",onClick:p=>e.handleSort(c.id)},[t.createElementVNode("span",Ii,t.toDisplayString(c.label),1),t.createVNode(a,{icon:e.getSortIcon(c.id),size:"small",class:"cdx-table__table__sort-icon--vue","aria-hidden":"true"},null,8,["icon"])],8,xi)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(c.label),1)],64))],14,Si))),128))])])):t.createCommentVNode("v-if",!0)]),e.pending?(t.openBlock(),t.createBlock(u,{key:0,inline:!0,class:"cdx-table__pending-indicator"})):t.createCommentVNode("v-if",!0),t.renderSlot(e.$slots,"tbody",{},()=>[e.dataForDisplay.length>0?(t.openBlock(),t.createElementBlock("tbody",Vi,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.dataForDisplay,(c,p)=>(t.openBlock(),t.createElementBlock("tr",{key:e.getRowKey(c,p),class:t.normalizeClass(e.getRowClass(c,p))},[e.useRowSelection?(t.openBlock(),t.createElementBlock("td",Ei,[t.createVNode(s,{modelValue:e.wrappedSelectedRows,"onUpdate:modelValue":[n[2]||(n[2]=f=>e.wrappedSelectedRows=f),e.handleRowSelection],"input-value":e.getRowKey(c,p),"hide-label":!0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.translatedSelectRowLabel(p+1,e.dataForDisplay.length)),1)]),_:2},1032,["modelValue","input-value","onUpdate:modelValue"])])):t.createCommentVNode("v-if",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.columns,f=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.getCellElement(f.id)),{key:f.id,scope:e.getRowHeaderScope(f.id),class:t.normalizeClass(e.getCellClass(f))},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"item-"+f.id,{item:c[f.id],row:c},()=>[t.createTextVNode(t.toDisplayString(c[f.id]),1)])]),_:2},1032,["scope","class"]))),128))],2))),128))])):e.$slots["empty-state"]&&e.$slots["empty-state"]().length>0?(t.openBlock(),t.createElementBlock("tbody",Ni,[t.createElementVNode("tr",Ai,[t.createElementVNode("td",{colspan:e.columns.length,class:"cdx-table__table__empty-state-content"},[t.renderSlot(e.$slots,"empty-state")],8,Di)])])):t.createCommentVNode("v-if",!0)]),t.renderSlot(e.$slots,"tfoot")],2)]),e.paginate&&(e.paginationPosition==="bottom"||e.paginationPosition==="both")?(t.openBlock(),t.createBlock(r,{key:2,"items-per-page":e.pageSize,"onUpdate:itemsPerPage":n[3]||(n[3]=c=>e.pageSize=c),class:"cdx-table__pagination--bottom","pagination-size-options":e.paginationSizeOptions,"prev-disabled":e.prevDisabled,"next-disabled":e.nextDisabled,"last-disabled":e.lastDisabled,onNext:e.onNext,onPrev:e.onPrev,onFirst:e.onFirst,onLast:e.onLast},{default:t.withCtx(()=>[t.createElementVNode("span",Mi,t.toDisplayString(e.paginationStatusMessageLong),1),t.createElementVNode("span",Li,t.toDisplayString(e.paginationStatusMessageShort),1)]),_:1},8,["items-per-page","pagination-size-options","prev-disabled","next-disabled","last-disabled","onNext","onPrev","onFirst","onLast"])):t.createCommentVNode("v-if",!0),e.$slots.footer&&e.$slots.footer().length>0?(t.openBlock(),t.createElementBlock("div",Ti,[t.renderSlot(e.$slots,"footer")])):t.createCommentVNode("v-if",!0)])}const Fi=P(hi,[["render",Ri]]),Oi=t.defineComponent({name:"CdxTab",props:{name:{type:String,required:!0},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},setup(e){var d;const n=t.inject(jt),o=t.inject(Wt);if(!n||!o)throw new Error("Tab component must be used inside a Tabs component");const l=(d=n.value.get(e.name))!=null?d:{},i=t.computed(()=>e.name===o.value);return{tab:l,isActive:i}}}),Pi=["id","aria-hidden","aria-labelledby"];function _i(e,n,o,l,i,d){return t.withDirectives((t.openBlock(),t.createElementBlock("section",{id:e.tab.id,"aria-hidden":e.isActive?void 0:!0,"aria-labelledby":"".concat(e.tab.id,"-label"),class:"cdx-tab",role:"tabpanel",tabindex:"-1"},[t.renderSlot(e.$slots,"default")],8,Pi)),[[t.vShow,e.isActive]])}const In=P(Oi,[["render",_i]]),zi=t.defineComponent({name:"CdxTabs",components:{CdxButton:ve,CdxIcon:q},props:{active:{type:String,default:null},framed:{type:Boolean,default:!1}},emits:["update:active"],expose:["select","next","prev"],setup(e,{slots:n,emit:o}){const l=t.ref(),i=t.ref(),d=t.ref(),r=t.ref(),s=Me(l),a=t.computed(()=>{const y=Qe(n.default);if(!y.every(b=>typeof b=="object"&&Jt(b,In.name)))throw new Error("Slot content may only contain CdxTab components");if(y.length===0)throw new Error("Slot content cannot be empty");return y}),u=t.computed(()=>a.value.reduce((y,b)=>{var S;if((S=b.props)!=null&&S.name&&typeof b.props.name=="string"){if(y.get(b.props.name))throw new Error("Tab names must be unique");y.set(b.props.name,{name:b.props.name,id:U(b.props.name),label:b.props.label||b.props.name,disabled:b.props.disabled})}return y},new Map)),c=t.ref(Array.from(u.value.keys())[0]),p=Xe(c,t.toRef(e,"active"),o,"update:active"),f=t.computed(()=>Array.from(u.value.keys())),m=t.computed(()=>f.value.indexOf(p.value)),h=t.computed(()=>{var y;return(y=u.value.get(p.value))==null?void 0:y.id});t.provide(Wt,p),t.provide(jt,u);const g=t.ref(new Map),C=t.ref(),k=t.ref(),B=He(C,{threshold:.95}),$=He(k,{threshold:.95});function I(y,b){const S=y;S&&(g.value.set(b,S),b===0?C.value=S:b===f.value.length-1&&(k.value=S))}const E=t.computed(()=>({"cdx-tabs--framed":e.framed,"cdx-tabs--quiet":!e.framed}));function M(){var y;(y=g.value.get(m.value))==null||y.focus()}function A(y){if(!i.value||!d.value||!r.value)return 0;const b=s.value==="rtl"?r.value:d.value,S=s.value==="rtl"?d.value:r.value,V=y.offsetLeft,R=V+y.clientWidth,z=i.value.scrollLeft+b.clientWidth,L=i.value.scrollLeft+i.value.clientWidth-S.clientWidth;return V<z?V-z:R>L?R-L:0}function x(y){if(!i.value||!d.value||!r.value)return;const b=y==="next"&&s.value==="ltr"||y==="prev"&&s.value==="rtl"?1:-1;let S=0,V=y==="next"?i.value.firstElementChild:i.value.lastElementChild;for(;V;){const R=y==="next"?V.nextElementSibling:V.previousElementSibling;if(S=A(V),Math.sign(S)===b){R&&Math.abs(S)<.25*i.value.clientWidth&&(S=A(R));break}V=R}i.value.scrollBy({left:S,behavior:"smooth"}),M()}return t.watch(p,()=>{if(h.value===void 0||!i.value||!d.value||!r.value)return;const y=document.getElementById("".concat(h.value,"-label"));y&&i.value.scrollBy({left:A(y),behavior:"smooth"})}),{activeTab:p,activeTabIndex:m,activeTabId:h,currentDirection:s,rootElement:l,tabListElement:i,prevScroller:d,nextScroller:r,rootClasses:E,tabNames:f,tabsData:u,firstLabelVisible:B,lastLabelVisible:$,assignTemplateRefForTabButton:I,scrollTabs:x,focusActiveTab:M,cdxIconPrevious:zt,cdxIconNext:_t}},methods:{select(e,n){const o=this.tabsData.get(e);o&&!(o!=null&&o.disabled)&&(this.activeTab=e,n&&t.nextTick(()=>{this.focusActiveTab()}))},selectNonDisabled(e,n,o){const l=this.tabsData.get(this.tabNames[e+n]);l&&(l.disabled?this.selectNonDisabled(e+n,n,o):this.select(l.name,o))},next(e){this.selectNonDisabled(this.activeTabIndex,1,e)},prev(e){this.selectNonDisabled(this.activeTabIndex,-1,e)},onLeftArrowKeypress(){this.currentDirection==="rtl"?this.next(!0):this.prev(!0)},onRightArrowKeypress(){this.currentDirection==="rtl"?this.prev(!0):this.next(!0)},onDownArrowKeypress(){var e;this.activeTabId&&((e=document.getElementById(this.activeTabId))==null||e.focus())}}}),Ki={class:"cdx-tabs__header"},Hi={ref:"prevScroller",class:"cdx-tabs__prev-scroller"},Ui={ref:"tabListElement",class:"cdx-tabs__list",role:"tablist"},ji=["id","disabled","aria-controls","aria-selected","tabindex","onClick","onKeyup"],Wi={ref:"nextScroller",class:"cdx-tabs__next-scroller"},qi={class:"cdx-tabs__content"};function Qi(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{ref:"rootElement",class:t.normalizeClass(["cdx-tabs",e.rootClasses])},[t.createElementVNode("div",Ki,[t.withDirectives(t.createElementVNode("div",Hi,[t.createVNode(s,{class:"cdx-tabs__scroll-button",weight:"quiet",type:"button",tabindex:"-1","aria-hidden":!0,onMousedown:n[0]||(n[0]=t.withModifiers(()=>{},["prevent"])),onClick:n[1]||(n[1]=a=>e.scrollTabs("prev"))},{default:t.withCtx(()=>[t.createVNode(r,{icon:e.cdxIconPrevious},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.firstLabelVisible]]),t.createElementVNode("div",Ui,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabsData.values(),(a,u)=>(t.openBlock(),t.createElementBlock("button",{id:"".concat(a.id,"-label"),key:u,ref_for:!0,ref:c=>e.assignTemplateRefForTabButton(c,u),disabled:a.disabled?!0:void 0,"aria-controls":a.id,"aria-selected":a.name===e.activeTab,tabindex:a.name===e.activeTab?void 0:-1,class:"cdx-tabs__list__item",role:"tab",onClick:t.withModifiers(c=>e.select(a.name),["prevent"]),onKeyup:t.withKeys(c=>e.select(a.name),["enter"]),onKeydown:[n[2]||(n[2]=t.withKeys(t.withModifiers((...c)=>e.onRightArrowKeypress&&e.onRightArrowKeypress(...c),["prevent"]),["right"])),n[3]||(n[3]=t.withKeys(t.withModifiers((...c)=>e.onDownArrowKeypress&&e.onDownArrowKeypress(...c),["prevent"]),["down"])),n[4]||(n[4]=t.withKeys(t.withModifiers((...c)=>e.onLeftArrowKeypress&&e.onLeftArrowKeypress(...c),["prevent"]),["left"]))]},[t.createElementVNode("span",null,t.toDisplayString(a.label),1)],40,ji))),128))],512),t.withDirectives(t.createElementVNode("div",Wi,[t.createVNode(s,{class:"cdx-tabs__scroll-button",weight:"quiet",type:"button",tabindex:"-1","aria-hidden":!0,onMousedown:n[5]||(n[5]=t.withModifiers(()=>{},["prevent"])),onClick:n[6]||(n[6]=a=>e.scrollTabs("next"))},{default:t.withCtx(()=>[t.createVNode(r,{icon:e.cdxIconNext},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.lastLabelVisible]])]),t.createElementVNode("div",qi,[t.renderSlot(e.$slots,"default")])],2)}const Gi=P(zi,[["render",Qi]]),Yi=J(pe),Xi=t.defineComponent({name:"CdxTextArea",components:{CdxIcon:q},inheritAttrs:!1,expose:["focus","blur","checkValidity","reportValidity","setCustomValidity"],props:{modelValue:{type:String,default:""},status:{type:String,default:"default",validator:Yi},disabled:{type:Boolean,default:!1},autosize:{type:Boolean,default:!1},startIcon:{type:[String,Object],default:void 0},endIcon:{type:[String,Object],default:void 0}},emits:["update:modelValue","input","change","focus","blur","invalid"],setup(e,{attrs:n,emit:o}){const l=t.ref(),i=ne(t.toRef(e,"modelValue"),o),d=n.id,{computedDisabled:r,computedStatus:s,computedInputId:a}=le(t.toRef(e,"disabled"),t.toRef(e,"status"),d),u=t.inject(qe,void 0),c=t.computed(()=>({"cdx-text-area__textarea--has-value":!!i.value,"cdx-text-area__textarea--is-autosize":e.autosize})),p=t.computed(()=>({"cdx-text-area--status-default":s.value==="default","cdx-text-area--status-error":s.value==="error","cdx-text-area--has-start-icon":!!e.startIcon,"cdx-text-area--has-end-icon":!!e.endIcon})),{rootClasses:f,rootStyle:m,otherAttrs:h}=ae(n,p),g=t.computed(()=>{const x=h.value,{id:M}=x;return de(x,["id"])});function C(M){l.value&&e.autosize&&(l.value.style.height="auto",l.value.style.height="".concat(l.value.scrollHeight,"px")),o("input",M)}const k=M=>{o("change",M)},B=M=>{o("focus",M)},$=M=>{o("blur",M)},I=t.ref(!0);return{textarea:l,rootClasses:f,rootStyle:m,wrappedModel:i,computedDisabled:r,computedInputId:a,descriptionId:u,textareaClasses:c,otherAttrsMinusId:g,onInput:C,onChange:k,onFocus:B,onBlur:$,onInvalid:(M,A)=>{A&&M.preventDefault(),o("invalid",M),I.value=!0},shouldPreventDefault:I}},methods:{focus(){this.$refs.textarea.focus()},blur(){this.$refs.textarea.blur()},checkValidity(){return this.$refs.textarea.checkValidity()},reportValidity(){return this.shouldPreventDefault=!1,this.$refs.textarea.reportValidity()},setCustomValidity(e){this.$refs.textarea.setCustomValidity(e)}}}),Ji=["id","aria-describedby","disabled"];function Zi(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-text-area",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.withDirectives(t.createElementVNode("textarea",t.mergeProps({id:e.computedInputId,ref:"textarea"},e.otherAttrsMinusId,{"onUpdate:modelValue":n[0]||(n[0]=s=>e.wrappedModel=s),class:[e.textareaClasses,"cdx-text-area__textarea"],"aria-describedby":e.descriptionId,disabled:e.computedDisabled,onInput:n[1]||(n[1]=(...s)=>e.onInput&&e.onInput(...s)),onChange:n[2]||(n[2]=(...s)=>e.onChange&&e.onChange(...s)),onFocus:n[3]||(n[3]=(...s)=>e.onFocus&&e.onFocus(...s)),onBlur:n[4]||(n[4]=(...s)=>e.onBlur&&e.onBlur(...s)),onInvalid:n[5]||(n[5]=s=>e.onInvalid(s,e.shouldPreventDefault))}),null,16,Ji),[[t.vModelText,e.wrappedModel]]),e.startIcon?(t.openBlock(),t.createBlock(r,{key:0,icon:e.startIcon,class:"cdx-text-area__icon-vue cdx-text-area__start-icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0),e.endIcon?(t.openBlock(),t.createBlock(r,{key:1,icon:e.endIcon,class:"cdx-text-area__icon-vue cdx-text-area__end-icon"},null,8,["icon"])):t.createCommentVNode("v-if",!0)],6)}const er=P(Xi,[["render",Zi]]),tr=t.defineComponent({name:"CdxToggleButtonGroup",components:{CdxIcon:q,CdxToggleButton:$t},props:{buttons:{type:Array,required:!0,validator:e=>Array.isArray(e)&&e.length>=1},modelValue:{type:[String,Number,null,Array],required:!0},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const{rootElement:o,assignTemplateRef:l,onFocus:i,onBlur:d,onKeydown:r}=tn(t.toRef(e,"buttons"));function s(u){return Array.isArray(e.modelValue)?e.modelValue.indexOf(u.value)!==-1:e.modelValue!==null?e.modelValue===u.value:!1}function a(u,c){if(Array.isArray(e.modelValue)){const p=e.modelValue.indexOf(u.value)!==-1;c&&!p?n("update:modelValue",e.modelValue.concat(u.value)):!c&&p&&n("update:modelValue",e.modelValue.filter(f=>f!==u.value))}else c&&e.modelValue!==u.value&&n("update:modelValue",u.value)}return{rootElement:o,assignTemplateRef:l,onFocus:i,onBlur:d,onKeydown:r,getButtonLabel:en,isSelected:s,onUpdate:a}}}),nr={ref:"rootElement",class:"cdx-toggle-button-group"};function or(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-toggle-button");return t.openBlock(),t.createElementBlock("div",nr,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.buttons,(a,u)=>(t.openBlock(),t.createBlock(s,{key:a.value,ref_for:!0,ref:c=>e.assignTemplateRef(c,u),"model-value":e.isSelected(a),disabled:a.disabled||e.disabled,"aria-label":a.ariaLabel,"onUpdate:modelValue":c=>e.onUpdate(a,c),onFocus:c=>e.onFocus(u),onBlur:e.onBlur,onKeydown:e.onKeydown},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{button:a,selected:e.isSelected(a)},()=>[a.icon?(t.openBlock(),t.createBlock(r,{key:0,icon:a.icon},null,8,["icon"])):t.createCommentVNode("v-if",!0),t.createTextVNode(" "+t.toDisplayString(e.getButtonLabel(a)),1)])]),_:2},1032,["model-value","disabled","aria-label","onUpdate:modelValue","onFocus","onBlur","onKeydown"]))),128))],512)}const lr=P(tr,[["render",or]]),ar=t.defineComponent({name:"CdxToggleSwitch",components:{CdxLabel:Le},inheritAttrs:!1,props:{modelValue:{type:[Boolean,Array],default:!1},inputValue:{type:[String,Number,Boolean],default:!1},alignSwitch:{type:Boolean,default:!1},hideLabel:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n,slots:o,attrs:l}){var h;vt((h=o.default)==null?void 0:h.call(o),l,"CdxToggleSwitch");const i=t.ref(),d=U("toggle-switch"),r=U("description"),s=t.computed(()=>({"cdx-toggle-switch--align-switch":e.alignSwitch})),{rootClasses:a,rootStyle:u,otherAttrs:c}=ae(l,s),{computedDisabled:p}=le(t.toRef(e,"disabled")),f=ne(t.toRef(e,"modelValue"),n);return{input:i,inputId:d,descriptionId:r,rootClasses:a,rootStyle:u,otherAttrs:c,computedDisabled:p,wrappedModel:f,clickInput:()=>{i.value.click()}}}}),sr=["id","aria-describedby","value","disabled"],ir=t.createElementVNode("span",{class:"cdx-toggle-switch__switch"},[t.createElementVNode("span",{class:"cdx-toggle-switch__switch__grip"})],-1);function rr(e,n,o,l,i,d){const r=t.resolveComponent("cdx-label");return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-toggle-switch",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:e.inputId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=s=>e.wrappedModel=s),class:"cdx-toggle-switch__input",type:"checkbox",role:"switch","aria-describedby":e.$slots.description&&e.$slots.description().length>0?e.descriptionId:void 0,value:e.inputValue,disabled:e.computedDisabled},e.otherAttrs,{onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers((...s)=>e.clickInput&&e.clickInput(...s),["prevent"]),["enter"]))}),null,16,sr),[[t.vModelCheckbox,e.wrappedModel]]),ir,e.$slots.default&&e.$slots.default().length?(t.openBlock(),t.createBlock(r,{key:0,class:"cdx-toggle-switch__label","input-id":e.inputId,"description-id":e.$slots.description&&e.$slots.description().length>0?e.descriptionId:void 0,"visually-hidden":e.hideLabel,disabled:e.computedDisabled},t.createSlots({default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:2},[e.$slots.description&&e.$slots.description().length>0?{name:"description",fn:t.withCtx(()=>[t.renderSlot(e.$slots,"description")]),key:"0"}:void 0]),1032,["input-id","description-id","visually-hidden","disabled"])):t.createCommentVNode("v-if",!0)],6)}const dr=P(ar,[["render",rr]]);class ur{constructor(n,o){fe(this,"referenceElement");fe(this,"tooltipElement");fe(this,"textContent");fe(this,"placement");fe(this,"autoUpdateCleanup");fe(this,"referenceElementHandlers");fe(this,"tooltipElementHandlers");fe(this,"escapeHandler");fe(this,"timeoutId");var d,r;const l=n.ownerDocument,i=U("tooltip");this.referenceElement=n,this.textContent=o.textContent,this.placement=(d=o.placement)!=null?d:"bottom",this.timeoutId=null,this.tooltipElement=l.createElement("div"),this.tooltipElement.classList.add("cdx-tooltip"),this.tooltipElement.role="tooltip",this.tooltipElement.id=i,this.referenceElement.setAttribute("aria-describedby",i),this.tooltipElement.textContent=this.textContent,(r=this.referenceElement.parentElement)==null||r.appendChild(this.tooltipElement),this.referenceElementHandlers={},this.referenceElementHandlers.mouseenter=this.show.bind(this),this.referenceElementHandlers.mouseleave=this.hideAfterDelay.bind(this),this.referenceElementHandlers.focus=this.show.bind(this),this.referenceElementHandlers.blur=this.hide.bind(this),this.tooltipElementHandlers={},this.tooltipElementHandlers.mouseenter=this.show.bind(this),this.tooltipElementHandlers.mouseleave=this.hideAfterDelay.bind(this),this.escapeHandler=this.onKeyup.bind(this),this.addEventListeners(),this.autoUpdateCleanup=bn(this.referenceElement,this.tooltipElement,()=>this.update())}isVisible(){return this.tooltipElement.style.display==="block"}show(){this.timeoutId&&clearTimeout(this.timeoutId),this.tooltipElement.style.display="block",this.tooltipElement.ownerDocument.addEventListener("keyup",this.escapeHandler)}hide(){this.tooltipElement.style.display="none",this.tooltipElement.ownerDocument.removeEventListener("keyup",this.escapeHandler)}hideAfterDelay(){this.timeoutId=setTimeout(this.hide.bind(this),250)}onKeyup(n){n.key==="Escape"&&this.isVisible()&&this.hide()}addEventListeners(){Object.keys(this.referenceElementHandlers).forEach(n=>{this.referenceElement.addEventListener(n,this.referenceElementHandlers[n])}),Object.keys(this.tooltipElementHandlers).forEach(n=>{this.tooltipElement.addEventListener(n,this.tooltipElementHandlers[n])})}removeEventListeners(){Object.keys(this.referenceElementHandlers).forEach(n=>{this.referenceElement.removeEventListener(n,this.referenceElementHandlers[n])}),Object.keys(this.tooltipElementHandlers).forEach(n=>{this.tooltipElement.removeEventListener(n,this.tooltipElementHandlers[n])})}update(){wn(this.referenceElement,this.tooltipElement,{placement:this.placement,middleware:[yn(4),Cn(),za(),pt()]}).then(({x:n,y:o,middlewareData:l})=>{var r,s,a;const i=(s=(r=l.offset)==null?void 0:r.placement)!=null?s:this.placement,d={left:"right","left-start":"right","left-end":"right",top:"bottom","top-start":"bottom","top-end":"bottom",bottom:"top","bottom-start":"top","bottom-end":"top",right:"left","right-start":"left","right-end":"left"};Object.assign(this.tooltipElement.style,{left:"".concat(n,"px"),top:"".concat(o,"px"),visibility:(a=l.hide)!=null&&a.referenceHidden?"hidden":"visible",transformOrigin:d[i]})})}remove(){this.tooltipElement.remove(),this.autoUpdateCleanup(),this.removeEventListeners()}}const cr={mounted(e,{value:n,arg:o}){n&&(typeof n=="string"&&n.trim()===""||(e.tooltip=new ur(e,{textContent:String(n),placement:o})))},beforeUnmount(e){e.tooltip&&e.tooltip.remove()}},pr=t.defineComponent({name:"CdxTypeaheadSearch",components:{CdxIcon:q,CdxMenu:ke,CdxSearchInput:Sn},inheritAttrs:!1,props:{id:{type:String,required:!0},formAction:{type:String,required:!0},searchResults:{type:Array,required:!0},useButton:{type:Boolean,default:!1},buttonLabel:{type:String,default:""},initialInputValue:{type:String,default:""},searchFooterUrl:{type:String,default:""},debounceInterval:{type:Number,default:vo},highlightQuery:{type:Boolean,default:!1},showThumbnail:{type:Boolean,default:!1},autoExpandWidth:{type:Boolean,default:!1},visibleItemLimit:{type:Number,default:null}},emits:["input","search-result-click","submit","load-more"],setup(e,{attrs:n,emit:o,slots:l}){const i=t.ref(),d=t.ref(),r=U("typeahead-search-menu"),s=W("cdx-typeahead-search-search-results-label","Search results"),a=t.ref(!1),u=t.ref(!1),c=t.ref(!1),p=t.ref(!1),f=t.ref(e.initialInputValue),m=t.ref(""),h=t.computed(()=>{var w,T;return(T=(w=d.value)==null?void 0:w.getHighlightedMenuItem())==null?void 0:T.id}),g=t.ref(null),C=t.computed(()=>({"cdx-typeahead-search__menu-message--has-thumbnail":e.showThumbnail})),k=t.computed(()=>e.searchResults.find(w=>w.value===g.value)),B=t.computed(()=>e.searchFooterUrl?{value:Se,url:e.searchFooterUrl}:void 0),$=t.computed(()=>({"cdx-typeahead-search--show-thumbnail":e.showThumbnail,"cdx-typeahead-search--expanded":a.value,"cdx-typeahead-search--auto-expand-width":e.showThumbnail&&e.autoExpandWidth})),{rootClasses:I,rootStyle:E,otherAttrs:M}=ae(n,$);function A(w){return w}const x=t.computed(()=>({visibleItemLimit:e.visibleItemLimit,showThumbnail:e.showThumbnail,boldLabel:!0,hideDescriptionOverflow:!0}));let y,b;function S(w,T=!1){k.value&&k.value.label!==w&&k.value.value!==w&&(g.value=null),b!==void 0&&(clearTimeout(b),b=void 0),w===""?a.value=!1:(u.value=!0,l["search-results-pending"]&&(b=setTimeout(()=>{p.value&&(a.value=!0),c.value=!0},go))),y!==void 0&&(clearTimeout(y),y=void 0);const K=()=>{o("input",w)};T?K():y=setTimeout(()=>{K()},e.debounceInterval)}function V(w){var T;if(w===Se){g.value=null,f.value=m.value;return}g.value=w,w!==null&&(f.value=k.value?(T=k.value.label)!=null?T:String(k.value.value):"")}function R(){p.value=!0,(m.value||c.value)&&(a.value=!0)}function z(){p.value=!1,a.value=!1}function L(w){const Y=w,{id:T}=Y,K=de(Y,["id"]);if(K.value===Se){o("search-result-click",{searchResult:null,index:e.searchResults.length,numberOfResults:e.searchResults.length});return}F(K)}function F(w){const T={searchResult:w,index:e.searchResults.findIndex(K=>K.value===w.value),numberOfResults:e.searchResults.length};o("search-result-click",T)}function G(w){var T;if(w.value===Se){f.value=m.value;return}f.value=w.value?(T=w.label)!=null?T:String(w.value):""}function j(w){var T;a.value=!1,(T=d.value)==null||T.clearActive(),L(w)}function te(w){if(k.value)F(k.value),w.stopPropagation(),window.location.assign(k.value.url),w.preventDefault();else{const T={searchResult:null,index:-1,numberOfResults:e.searchResults.length};o("submit",T)}}function Z(w){if(!d.value||!m.value||w.key===" ")return;const T=d.value.getHighlightedMenuItem(),K=d.value.getHighlightedViaKeyboard();switch(w.key){case"Enter":T&&(T.value===Se&&K?window.location.assign(e.searchFooterUrl):d.value.delegateKeyNavigation(w,{prevent:!1})),a.value=!1;break;case"Tab":a.value=!1;break;default:d.value.delegateKeyNavigation(w);break}}return t.onMounted(()=>{e.initialInputValue&&S(e.initialInputValue,!0)}),t.watch(t.toRef(e,"searchResults"),()=>{m.value=f.value.trim(),p.value&&u.value&&m.value.length>0&&(a.value=!0),b!==void 0&&(clearTimeout(b),b=void 0),u.value=!1,c.value=!1}),{form:i,menu:d,menuId:r,highlightedId:h,selection:g,menuMessageClass:C,footer:B,asSearchResult:A,inputValue:f,searchQuery:m,expanded:a,showPending:c,rootClasses:I,rootStyle:E,otherAttrs:M,menuConfig:x,onUpdateInputValue:S,onUpdateMenuSelection:V,onFocus:R,onBlur:z,onSearchResultClick:L,onSearchResultKeyboardNavigation:G,onSearchFooterClick:j,onSubmit:te,onKeydown:Z,MenuFooterValue:Se,articleIcon:Yn,translatedSearchResultsLabel:s}},methods:{focus(){this.$refs.searchInput.focus()}}}),fr=["id","action"],mr={class:"cdx-typeahead-search__menu-message__text"},hr={class:"cdx-typeahead-search__menu-message__text"},vr=["href","onClickCapture"],gr={class:"cdx-menu-item__text cdx-typeahead-search__search-footer__text"},br={class:"cdx-typeahead-search__search-footer__query"};function yr(e,n,o,l,i,d){const r=t.resolveComponent("cdx-icon"),s=t.resolveComponent("cdx-menu"),a=t.resolveComponent("cdx-search-input");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-typeahead-search",e.rootClasses]),style:t.normalizeStyle(e.rootStyle)},[t.createElementVNode("form",{id:e.id,ref:"form",class:"cdx-typeahead-search__form",action:e.formAction,onSubmit:n[4]||(n[4]=(...u)=>e.onSubmit&&e.onSubmit(...u))},[t.createVNode(a,t.mergeProps({ref:"searchInput",modelValue:e.inputValue,"onUpdate:modelValue":n[3]||(n[3]=u=>e.inputValue=u),"button-label":e.buttonLabel,"use-button":e.useButton},e.otherAttrs,{class:"cdx-typeahead-search__input",name:"search",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-controls":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,"onUpdate:modelValue":e.onUpdateInputValue,onFocus:e.onFocus,onBlur:e.onBlur,onKeydown:e.onKeydown}),{default:t.withCtx(()=>[t.createVNode(s,t.mergeProps({id:e.menuId,ref:"menu",expanded:e.expanded,"onUpdate:expanded":n[0]||(n[0]=u=>e.expanded=u),class:"cdx-typeahead-search__menu","show-pending":e.showPending,selected:e.selection,"menu-items":e.searchResults,footer:e.footer,"search-query":e.highlightQuery?e.searchQuery:"","show-no-results-slot":e.searchQuery.length>0&&e.searchResults.length===0&&e.$slots["search-no-results-text"]&&e.$slots["search-no-results-text"]().length>0},e.menuConfig,{"aria-label":e.translatedSearchResultsLabel,"onUpdate:selected":e.onUpdateMenuSelection,onMenuItemClick:n[1]||(n[1]=u=>e.onSearchResultClick(e.asSearchResult(u))),onMenuItemKeyboardNavigation:e.onSearchResultKeyboardNavigation,onLoadMore:n[2]||(n[2]=u=>e.$emit("load-more"))}),{pending:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["cdx-menu-item__content cdx-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",mr,[t.renderSlot(e.$slots,"search-results-pending")])],2)]),"no-results":t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["cdx-menu-item__content cdx-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",hr,[t.renderSlot(e.$slots,"search-no-results-text")])],2)]),default:t.withCtx(({menuItem:u,active:c})=>[u.value===e.MenuFooterValue?(t.openBlock(),t.createElementBlock("a",{key:0,class:t.normalizeClass(["cdx-menu-item__content cdx-typeahead-search__search-footer",{"cdx-typeahead-search__search-footer__active":c}]),href:e.asSearchResult(u).url,onClickCapture:t.withModifiers(p=>e.onSearchFooterClick(e.asSearchResult(u)),["stop"])},[t.createVNode(r,{class:"cdx-menu-item__thumbnail cdx-typeahead-search__search-footer__icon",icon:e.articleIcon},null,8,["icon"]),t.createElementVNode("span",gr,[t.renderSlot(e.$slots,"search-footer-text",{searchQuery:e.searchQuery},()=>[t.createElementVNode("strong",br,t.toDisplayString(e.searchQuery),1)])])],42,vr)):t.createCommentVNode("v-if",!0)]),_:3},16,["id","expanded","show-pending","selected","menu-items","footer","search-query","show-no-results-slot","aria-label","onUpdate:selected","onMenuItemKeyboardNavigation"])]),_:3},16,["modelValue","button-label","use-button","aria-controls","aria-expanded","aria-activedescendant","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.renderSlot(e.$slots,"default")],40,fr)],6)}const Cr=P(pr,[["render",yr]]);exports.CdxAccordion=Fo;exports.CdxButton=ve;exports.CdxButtonGroup=zo;exports.CdxCard=Jo;exports.CdxCheckbox=nn;exports.CdxChipInput=on;exports.CdxCombobox=Xa;exports.CdxDialog=is;exports.CdxField=ys;exports.CdxIcon=q;exports.CdxInfoChip=Bs;exports.CdxLabel=Le;exports.CdxLookup=Vs;exports.CdxMenu=ke;exports.CdxMenuButton=Ts;exports.CdxMenuItem=rn;exports.CdxMessage=Bn;exports.CdxMultiselectLookup=Ps;exports.CdxProgressBar=gt;exports.CdxRadio=Ws;exports.CdxSearchInput=Sn;exports.CdxSearchResultTitle=sn;exports.CdxSelect=xn;exports.CdxTab=In;exports.CdxTable=Fi;exports.CdxTabs=Gi;exports.CdxTextArea=er;exports.CdxTextInput=Je;exports.CdxThumbnail=mt;exports.CdxToggleButton=$t;exports.CdxToggleButtonGroup=lr;exports.CdxToggleSwitch=dr;exports.CdxTooltip=cr;exports.CdxTypeaheadSearch=Cr;exports.TableRowIdentifier=Ke;exports.stringHelpers=El;exports.useComputedDirection=Me;exports.useComputedDisabled=ht;exports.useComputedLanguage=Ht;exports.useFieldData=le;exports.useFloatingMenu=Ne;exports.useGeneratedId=U;exports.useI18n=W;exports.useIntersectionObserver=He;exports.useModelWrapper=ne;exports.useResizeObserver=$n;exports.useSlotContents=Qe;exports.useSplitAttributes=ae;exports.useWarnOnce=Ge;