diff options
Diffstat (limited to 'resources/lib/codex/codex.umd.js')
-rw-r--r-- | resources/lib/codex/codex.umd.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/resources/lib/codex/codex.umd.js b/resources/lib/codex/codex.umd.js index 86bd7dbdb2f8..0a6fa7c5ff95 100644 --- a/resources/lib/codex/codex.umd.js +++ b/resources/lib/codex/codex.umd.js @@ -1,5 +1,5 @@ -(function(p,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(p=typeof globalThis!="undefined"?globalThis:p||self,t(p.codex={},p.Vue))})(this,function(p,t){"use strict";var Yo=Object.defineProperty,el=Object.defineProperties;var tl=Object.getOwnPropertyDescriptors;var se=Object.getOwnPropertySymbols;var qe=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var Fe=(p,t,B)=>t in p?Yo(p,t,{enumerable:!0,configurable:!0,writable:!0,value:B}):p[t]=B,He=(p,t)=>{for(var B in t||(t={}))qe.call(t,B)&&Fe(p,B,t[B]);if(se)for(var B of se(t))Pe.call(t,B)&&Fe(p,B,t[B]);return p},je=(p,t)=>el(p,tl(t));var ie=(p,t)=>{var B={};for(var K in p)qe.call(p,K)&&t.indexOf(K)<0&&(B[K]=p[K]);if(p!=null&&se)for(var K of se(p))t.indexOf(K)<0&&Pe.call(p,K)&&(B[K]=p[K]);return B};var ge=(p,t,B)=>new Promise((K,ee)=>{var re=q=>{try{te(B.next(q))}catch(J){ee(J)}},de=q=>{try{te(B.throw(q))}catch(J){ee(J)}},te=q=>q.done?K(q.value):Promise.resolve(q.value).then(re,de);te((B=B.apply(p,t)).next())});function B(e){return n=>typeof n=="string"&&e.indexOf(n)!==-1}const K="cdx",ee=["default","progressive","destructive"],re=["normal","primary","quiet"],de=["x-small","small","medium"],q=B(["notice","warning","error","success"]),J=["text","search","number","email","month","password","tel","url","week","date","datetime-local","time"],ne=["default","error"],Ue=120,We=500,G="cdx-menu-footer-item",ye=Symbol("CdxTabs"),Ce=Symbol("CdxActiveTab"),Qe='<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"/>',Ge='<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"/>',Ze='<path d="M10 0a10 10 0 1010 10A10 10 0 0010 0zm5.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"/>',Je='<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"/>',Xe='<path d="M13.728 1H6.272L1 6.272v7.456L6.272 19h7.456L19 13.728V6.272zM11 15H9v-2h2zm0-4H9V5h2z"/>',Ye='<path d="m17.5 4.75-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z"/>',et='<path d="M19 3H1v14h18zM3 14l3.5-4.5 2.5 3L12.5 8l4.5 6z"/><path d="M19 5H1V3h18zm0 12H1v-2h18z"/>',tt='<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 7z"/>',nt='<path d="M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zM9 5h2v2H9zm0 4h2v6H9z"/>',ot='<path d="M7 1 5.6 2.5 13 10l-7.4 7.5L7 19l9-9z"/>',lt='<path d="m4 10 9 9 1.4-1.5L7 10l7.4-7.5L13 1z"/>',at='<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 8z"/>',st='<path d="M10 20a10 10 0 010-20 10 10 0 110 20Zm-2-5 9-8.5L15.5 5 8 12 4.5 8.5 3 10l5 5Z"/>',ke=Qe,it=Ge,rt=Ze,_e=Je,$e=Xe,Be=Ye,dt=et,ct={langCodeMap:{ar:tt},default:nt},ut={ltr:ot,shouldFlip:!0},pt={ltr:lt,shouldFlip:!0},mt=at,we=st;function ft(e,n,l){if(typeof e=="string"||"path"in e)return e;if("shouldFlip"in e)return e.ltr;if("rtl"in e)return l==="rtl"?e.rtl:e.ltr;const i=n in e.langCodeMap?e.langCodeMap[n]:e.default;return typeof i=="string"||"path"in i?i:i.ltr}function ht(e,n){if(typeof e=="string")return!1;if("langCodeMap"in e){const l=n in e.langCodeMap?e.langCodeMap[n]:e.default;if(typeof l=="string")return!1;e=l}if("shouldFlipExceptions"in e&&Array.isArray(e.shouldFlipExceptions)){const l=e.shouldFlipExceptions.indexOf(n);return l===void 0||l===-1}return"shouldFlip"in e?e.shouldFlip:!1}function ce(e){const n=t.ref(null);return t.onMounted(()=>{const l=window.getComputedStyle(e.value).direction;n.value=l==="ltr"||l==="rtl"?l:null}),n}function Se(e){const n=t.ref("");return t.onMounted(()=>{let l=e.value;for(;l&&l.lang==="";)l=l.parentElement;n.value=l?l.lang:null}),n}const bt=B(de),gt=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:bt}},emits:["click"],setup(e,{emit:n}){const l=t.ref(),i=ce(l),s=Se(l),r=t.computed(()=>e.dir||i.value),a=t.computed(()=>e.lang||s.value),d=t.computed(()=>({"cdx-icon--flipped":r.value==="rtl"&&a.value!==null&&ht(e.icon,a.value),[`cdx-icon--${e.size}`]:!0})),o=t.computed(()=>ft(e.icon,a.value||"",r.value||"ltr")),u=t.computed(()=>typeof o.value=="string"?o.value:""),c=t.computed(()=>typeof o.value!="string"?o.value.path:"");return{rootElement:l,rootClasses:d,iconSvg:u,iconPath:c,onClick:b=>{n("click",b)}}}}),nl="",N=(e,n)=>{const l=e.__vccOpts||e;for(const[i,s]of n)l[i]=s;return l},yt=["aria-hidden"],Ct={key:0},kt=["innerHTML"],_t=["d"];function $t(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("span",{ref:"rootElement",class:t.normalizeClass(["cdx-icon",e.rootClasses]),onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":e.iconLabel?void 0:!0},[e.iconLabel?(t.openBlock(),t.createElementBlock("title",Ct,t.toDisplayString(e.iconLabel),1)):t.createCommentVNode("",!0),e.iconSvg?(t.openBlock(),t.createElementBlock("g",{key:1,innerHTML:e.iconSvg},null,8,kt)):(t.openBlock(),t.createElementBlock("path",{key:2,d:e.iconPath},null,8,_t))],8,yt))],2)}const D=N(gt,[["render",$t]]),Bt=B(ee),wt=B(re),St=e=>{!e["aria-label"]&&!e["aria-hidden"]&&t.warn(`icon-only buttons require one of the following attribute: aria-label or aria-hidden. - See documentation on https://doc.wikimedia.org/codex/latest/components/button.html#default-icon-only`)};function ue(e){const n=[];for(const l of e)typeof l=="string"&&l.trim()!==""?n.push(l):Array.isArray(l)?n.push(...ue(l)):typeof l=="object"&&l&&(typeof l.type=="string"||typeof l.type=="object"?n.push(l):l.type!==t.Comment&&(typeof l.children=="string"&&l.children.trim()!==""?n.push(l.children):Array.isArray(l.children)&&n.push(...ue(l.children))));return n}const It=(e,n)=>{if(!e)return!1;const l=ue(e);if(l.length!==1)return!1;const i=l[0],s=typeof i=="object"&&typeof i.type=="object"&&"name"in i.type&&i.type.name===D.name,r=typeof i=="object"&&i.type==="svg";return s||r?(St(n),!0):!1},Vt=t.defineComponent({name:"CdxButton",props:{action:{type:String,default:"default",validator:Bt},weight:{type:String,default:"normal",validator:wt}},emits:["click"],setup(e,{emit:n,slots:l,attrs:i}){const s=t.ref(!1);return{rootClasses:t.computed(()=>{var o;return{[`cdx-button--action-${e.action}`]:!0,[`cdx-button--weight-${e.weight}`]:!0,"cdx-button--framed":e.weight!=="quiet","cdx-button--icon-only":It((o=l.default)==null?void 0:o.call(l),i),"cdx-button--is-active":s.value}}),onClick:o=>{n("click",o)},setActive:o=>{s.value=o}}}}),ol="";function xt(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-button",e.rootClasses]),onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a)),onKeydown:n[1]||(n[1]=t.withKeys(a=>e.setActive(!0),["space","enter"])),onKeyup:n[2]||(n[2]=t.withKeys(a=>e.setActive(!1),["space","enter"]))},[t.renderSlot(e.$slots,"default")],34)}const Q=N(Vt,[["render",xt]]);function Ie(e){return e.label===void 0?e.value:e.label===null?"":e.label}const Nt=t.defineComponent({name:"CdxButtonGroup",components:{CdxButton:Q,CdxIcon:D},props:{buttons:{type:Array,required:!0,validator:e=>Array.isArray(e)&&e.length>=1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(){return{getButtonLabel:Ie}}}),ll="",Et={class:"cdx-button-group"};function Mt(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",Et,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.buttons,o=>(t.openBlock(),t.createBlock(d,{key:o.value,disabled:o.disabled||e.disabled,"aria-label":o.ariaLabel,onClick:u=>e.$emit("click",o.value)},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{button:o},()=>[o.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:o.icon},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.getButtonLabel(o)),1)])]),_:2},1032,["disabled","aria-label","onClick"]))),128))])}const Tt=N(Nt,[["render",Mt]]),Lt=t.defineComponent({name:"CdxThumbnail",components:{CdxIcon:D},props:{thumbnail:{type:[Object,null],default:null},placeholderIcon:{type:[String,Object],default:dt}},setup:e=>{const n=t.ref(!1),l=t.ref({}),i=s=>{const r=s.replace(/([\\"\n])/g,"\\$1"),a=new Image;a.onload=()=>{l.value={backgroundImage:`url("${r}")`},n.value=!0},a.onerror=()=>{n.value=!1},a.src=r};return t.onMounted(()=>{var s;(s=e.thumbnail)!=null&&s.url&&i(e.thumbnail.url)}),{thumbnailStyle:l,thumbnailLoaded:n}}}),al="",At={class:"cdx-thumbnail"},Kt={key:0,class:"cdx-thumbnail__placeholder"};function Dt(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("span",At,[e.thumbnailLoaded?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Kt,[t.createVNode(a,{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:"cdx-thumbnail__image"},null,4)):t.createCommentVNode("",!0)]),_:1})])}const pe=N(Lt,[["render",Dt]]),zt=t.defineComponent({name:"CdxCard",components:{CdxIcon:D,CdxThumbnail:pe},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),l=t.computed(()=>n.value?"a":"span"),i=t.computed(()=>n.value?e.url:void 0);return{isLink:n,contentTag:l,cardLink:i}}}),sl="",Rt={class:"cdx-card__text"},vt={class:"cdx-card__text__title"},Ot={key:0,class:"cdx-card__text__description"},Ft={key:1,class:"cdx-card__text__supporting-text"};function qt(e,n,l,i,s,r){const a=t.resolveComponent("cdx-thumbnail"),d=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(a,{key:0,thumbnail:e.thumbnail,"placeholder-icon":e.customPlaceholderIcon,class:"cdx-card__thumbnail"},null,8,["thumbnail","placeholder-icon"])):e.icon?(t.openBlock(),t.createBlock(d,{key:1,icon:e.icon,class:"cdx-card__icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createElementVNode("span",Rt,[t.createElementVNode("span",vt,[t.renderSlot(e.$slots,"title")]),e.$slots.description?(t.openBlock(),t.createElementBlock("span",Ot,[t.renderSlot(e.$slots,"description")])):t.createCommentVNode("",!0),e.$slots["supporting-text"]?(t.openBlock(),t.createElementBlock("span",Ft,[t.renderSlot(e.$slots,"supporting-text")])):t.createCommentVNode("",!0)])]),_:3},8,["href","class"])}const Pt=N(zt,[["render",qt]]);function P(e,n,l){return t.computed({get:()=>e.value,set:i=>n(l||"update:modelValue",i)})}let me=0;function v(e){const n=t.getCurrentInstance(),l=(n==null?void 0:n.props.id)||(n==null?void 0:n.attrs.id);return e?`${K}-${e}-${me++}`:l?`${K}-${l}-${me++}`:`${K}-${me++}`}const Ht=t.defineComponent({name:"CdxCheckbox",props:{modelValue:{type:[Boolean,Array],default:!1},inputValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.computed(()=>({"cdx-checkbox--inline":e.inline})),i=t.ref(),s=v("checkbox"),r=()=>{i.value.click()},a=P(t.toRef(e,"modelValue"),n);return{rootClasses:l,input:i,checkboxId:s,clickInput:r,wrappedModel:a}}}),il="",jt=["id","value","disabled",".indeterminate"],Ut=t.createElementVNode("span",{class:"cdx-checkbox__icon"},null,-1),Wt=["for"];function Qt(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-checkbox",e.rootClasses])},[t.withDirectives(t.createElementVNode("input",{id:e.checkboxId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-checkbox__input",type:"checkbox",value:e.inputValue,disabled:e.disabled,".indeterminate":e.indeterminate,onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers((...a)=>e.clickInput&&e.clickInput(...a),["prevent"]),["enter"]))},null,40,jt),[[t.vModelCheckbox,e.wrappedModel]]),Ut,t.createElementVNode("label",{class:"cdx-checkbox__label",for:e.checkboxId},[t.renderSlot(e.$slots,"default")],8,Wt)],2)}const Gt=N(Ht,[["render",Qt]]),Zt={error:$e,warning:ke,success:we},Jt=t.defineComponent({name:"CdxInfoChip",components:{CdxIcon:D},props:{status:{type:String,default:"notice",validator:q},icon:{type:[String,Object],default:null}},setup(e){const n=t.computed(()=>({[`cdx-info-chip__icon--${e.status}`]:!0})),l=t.computed(()=>e.status==="notice"?e.icon:Zt[e.status]);return{iconClass:n,computedIcon:l}}}),rl="",Xt={class:"cdx-info-chip"},Yt={class:"cdx-info-chip--text"};function en(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("div",Xt,[e.computedIcon?(t.openBlock(),t.createBlock(a,{key:0,class:t.normalizeClass(["cdx-info-chip__icon",e.iconClass]),icon:e.computedIcon},null,8,["class","icon"])):t.createCommentVNode("",!0),t.createElementVNode("span",Yt,[t.renderSlot(e.$slots,"default")])])}const tn=N(Jt,[["render",en]]);function Ve(e){return e.replace(/([\\{}()|.?*+\-^$[\]])/g,"\\$1")}const nn="[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-᪾ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯]";function xe(e,n){if(!e)return[n,"",""];const l=Ve(e),i=new RegExp(l+nn+"*","i").exec(n);if(!i||i.index===void 0)return[n,"",""];const s=i.index,r=s+i[0].length,a=n.slice(s,r),d=n.slice(0,s),o=n.slice(r,n.length);return[d,a,o]}const on=Object.freeze(Object.defineProperty({__proto__:null,regExpEscape:Ve,splitStringAtMatch:xe},Symbol.toStringTag,{value:"Module"})),ln=t.defineComponent({name:"CdxSearchResultTitle",props:{title:{type:String,required:!0},searchQuery:{type:String,default:""}},setup:e=>({titleChunks:t.computed(()=>xe(e.searchQuery,String(e.title)))})}),dl="",an={class:"cdx-search-result-title"},sn={class:"cdx-search-result-title__match"};function rn(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("span",an,[t.createElementVNode("bdi",null,[t.createTextVNode(t.toDisplayString(e.titleChunks[0]),1),t.createElementVNode("span",sn,t.toDisplayString(e.titleChunks[1]),1),t.createTextVNode(t.toDisplayString(e.titleChunks[2]),1)])])}const Ne=N(ln,[["render",rn]]),dn=t.defineComponent({name:"CdxMenuItem",components:{CdxIcon:D,CdxThumbnail:pe,CdxSearchResultTitle:Ne},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:()=>({})}},emits:["change"],setup:(e,{emit:n})=>{const l=()=>{e.highlighted||n("change","highlighted",!0)},i=()=>{n("change","highlighted",!1)},s=c=>{c.button===0&&n("change","active",!0)},r=()=>{n("change","selected",!0)},a=t.computed(()=>e.searchQuery.length>0),d=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--enabled":!e.disabled,"cdx-menu-item--disabled":e.disabled,"cdx-menu-item--highlight-query":a.value,"cdx-menu-item--bold-label":e.boldLabel,"cdx-menu-item--has-description":!!e.description,"cdx-menu-item--hide-description-overflow":e.hideDescriptionOverflow})),o=t.computed(()=>e.url?"a":"span"),u=t.computed(()=>e.label||String(e.value));return{onMouseMove:l,onMouseLeave:i,onMouseDown:s,onClick:r,highlightQuery:a,rootClasses:d,contentTag:o,title:u}}}),cl="",cn=["id","aria-disabled","aria-selected"],un={class:"cdx-menu-item__text"},pn=["lang"],mn=["lang"],fn=["lang"],hn=["lang"];function bn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-thumbnail"),d=t.resolveComponent("cdx-icon"),o=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,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,g,b,I,_;return[e.showThumbnail?(t.openBlock(),t.createBlock(a,{key:0,thumbnail:e.thumbnail,class:"cdx-menu-item__thumbnail"},null,8,["thumbnail"])):e.icon?(t.openBlock(),t.createBlock(d,{key:1,icon:e.icon,class:"cdx-menu-item__icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createElementVNode("span",un,[e.highlightQuery?(t.openBlock(),t.createBlock(o,{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,pn)),e.match?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(" ")+" "),e.highlightQuery?(t.openBlock(),t.createBlock(o,{key:0,title:e.match,"search-query":e.searchQuery,lang:(g=e.language)==null?void 0:g.match},null,8,["title","search-query","lang"])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"cdx-menu-item__text__match",lang:(b=e.language)==null?void 0:b.match},[t.createElementVNode("bdi",null,t.toDisplayString(e.match),1)],8,mn))],64)):t.createCommentVNode("",!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:(I=e.language)==null?void 0:I.supportingText},[t.createElementVNode("bdi",null,t.toDisplayString(e.supportingText),1)],8,fn)],64)):t.createCommentVNode("",!0),e.description?(t.openBlock(),t.createElementBlock("span",{key:4,class:"cdx-menu-item__text__description",lang:(_=e.language)==null?void 0:_.description},[t.createElementVNode("bdi",null,t.toDisplayString(e.description),1)],8,hn)):t.createCommentVNode("",!0)])]}),_:1},8,["href"]))])],42,cn)}const Ee=N(dn,[["render",bn]]),gn=t.defineComponent({name:"CdxProgressBar",props:{inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return{rootClasses: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}))}}}),ul="",yn=["aria-disabled"],Cn=[t.createElementVNode("div",{class:"cdx-progress-bar__bar"},null,-1)];function kn(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-progress-bar",e.rootClasses]),role:"progressbar","aria-disabled":e.disabled,"aria-valuemin":"0","aria-valuemax":"100"},Cn,10,yn)}const Me=N(gn,[["render",kn]]);function oe(e,n){const l=t.ref(!1);let i=!1;if(typeof window!="object"||!("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype))return l;const s=new window.IntersectionObserver(r=>{const a=r[0];a&&(l.value=a.isIntersecting)},n);return t.onMounted(()=>{i=!0,e.value&&s.observe(e.value)}),t.onUnmounted(()=>{i=!1,s.disconnect()}),t.watch(e,r=>{i&&(s.disconnect(),l.value=!1,r&&s.observe(r))}),l}function U(e,n=t.computed(()=>({}))){const l=t.computed(()=>{const r=ie(n.value,[]);return e.class&&e.class.split(" ").forEach(d=>{r[d]=!0}),r}),i=t.computed(()=>{if("style"in e)return e.style}),s=t.computed(()=>{const o=e,{class:r,style:a}=o;return ie(o,["class","style"])});return{rootClasses:l,rootStyle:i,otherAttrs:s}}const _n=t.defineComponent({name:"CdxMenu",components:{CdxMenuItem:Ee,CdxProgressBar:Me},inheritAttrs:!1,props:{menuItems:{type:Array,required:!0},footer:{type:Object,default:null},selected:{type:[String,Number,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:["clearActive","getHighlightedMenuItem","getHighlightedViaKeyboard","delegateKeyNavigation"],setup(e,{emit:n,slots:l,attrs:i}){const s=t.computed(()=>(e.footer&&e.menuItems?[...e.menuItems,e.footer]:e.menuItems).map(k=>je(He({},k),{id:v("menu-item")}))),r=t.computed(()=>l["no-results"]?e.showNoResultsSlot!==null?e.showNoResultsSlot:s.value.length===0:!1),a=t.ref(null),d=t.ref(!1),o=t.ref(null);function u(){return s.value.find(f=>f.value===e.selected)}function c(f,k){var M;if(!(k&&k.disabled))switch(f){case"selected":n("update:selected",(M=k==null?void 0:k.value)!=null?M:null),n("update:expanded",!1),o.value=null;break;case"highlighted":a.value=k||null,d.value=!1;break;case"highlightedViaKeyboard":a.value=k||null,d.value=!0;break;case"active":o.value=k||null;break}}const g=t.computed(()=>{if(a.value!==null)return s.value.findIndex(f=>f.value===a.value.value)});function b(f){f&&(c("highlightedViaKeyboard",f),n("menu-item-keyboard-navigation",f))}function I(f){var L;const k=Y=>{for(let W=Y-1;W>=0;W--)if(!s.value[W].disabled)return s.value[W]};f=f||s.value.length;const M=(L=k(f))!=null?L:k(s.value.length);b(M)}function _(f){const k=L=>s.value.find((Y,W)=>!Y.disabled&&W>L);f=f!=null?f:-1;const M=k(f)||k(-1);b(M)}function E(f,k=!0){function M(){n("update:expanded",!0),c("highlighted",u())}function L(){k&&(f.preventDefault(),f.stopPropagation())}switch(f.key){case"Enter":case" ":return L(),e.expanded?(a.value&&d.value&&n("update:selected",a.value.value),n("update:expanded",!1)):M(),!0;case"Tab":return e.expanded&&(a.value&&d.value&&n("update:selected",a.value.value),n("update:expanded",!1)),!0;case"ArrowUp":return L(),e.expanded?(a.value===null&&c("highlightedViaKeyboard",u()),I(g.value)):M(),R(),!0;case"ArrowDown":return L(),e.expanded?(a.value===null&&c("highlightedViaKeyboard",u()),_(g.value)):M(),R(),!0;case"Home":return L(),e.expanded?(a.value===null&&c("highlightedViaKeyboard",u()),_()):M(),R(),!0;case"End":return L(),e.expanded?(a.value===null&&c("highlightedViaKeyboard",u()),I()):M(),R(),!0;case"Escape":return L(),n("update:expanded",!1),!0;default:return!1}}function C(){c("active")}const w=[],S=t.ref(void 0),V=oe(S,{threshold:.8});t.watch(V,f=>{f&&n("load-more")});function H(f,k){if(f){w[k]=f.$el;const M=e.visibleItemLimit;if(!M||e.menuItems.length<M)return;const L=Math.min(M,Math.max(2,Math.floor(.2*e.menuItems.length)));k===e.menuItems.length-L&&(S.value=f.$el)}}function R(){if(!e.visibleItemLimit||e.visibleItemLimit>e.menuItems.length||g.value===void 0)return;const f=g.value>=0?g.value:0;w[f].scrollIntoView({behavior:"smooth",block:"nearest"})}const A=t.ref(null),O=t.ref(null);function h(){if(O.value=null,!e.visibleItemLimit||w.length<=e.visibleItemLimit){A.value=null;return}const f=w[0],k=w[e.visibleItemLimit];if(A.value=m(f,k),e.footer){const M=w[w.length-1];O.value=M.scrollHeight}}function m(f,k){const M=f.getBoundingClientRect().top;return k.getBoundingClientRect().top-M+2}t.onMounted(()=>{document.addEventListener("mouseup",C)}),t.onUnmounted(()=>{document.removeEventListener("mouseup",C)}),t.watch(t.toRef(e,"expanded"),f=>ge(this,null,function*(){const k=u();!f&&a.value&&k===void 0&&c("highlighted"),f&&k!==void 0&&c("highlighted",k),f&&(yield t.nextTick(),h(),yield t.nextTick(),R())})),t.watch(t.toRef(e,"menuItems"),f=>ge(this,null,function*(){f.length<w.length&&(w.length=f.length),e.expanded&&(yield t.nextTick(),h(),yield t.nextTick(),R())}),{deep:!0});const $=t.computed(()=>({"max-height":A.value?`${A.value}px`:void 0,"overflow-y":A.value?"scroll":void 0,"margin-bottom":O.value?`${O.value}px`:void 0})),T=t.computed(()=>({"cdx-menu--has-footer":!!e.footer,"cdx-menu--has-sticky-footer":!!e.footer&&!!A.value})),{rootClasses:x,rootStyle:F,otherAttrs:Z}=U(i,T);return{listBoxStyle:$,rootClasses:x,rootStyle:F,otherAttrs:Z,assignTemplateRef:H,computedMenuItems:s,computedShowNoResultsSlot:r,highlightedMenuItem:a,highlightedViaKeyboard:d,activeMenuItem:o,handleMenuItemChange:c,handleKeyNavigation:E}},methods:{getHighlightedMenuItem(){return this.highlightedMenuItem},getHighlightedViaKeyboard(){return this.highlightedViaKeyboard},clearActive(){this.handleMenuItemChange("active")},delegateKeyNavigation(e,n=!0){return this.handleKeyNavigation(e,n)}}}),ml="",$n={key:0,class:"cdx-menu__pending cdx-menu-item"},Bn={key:1,class:"cdx-menu__no-results cdx-menu-item"};function wn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-menu-item"),d=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({class:"cdx-menu__listbox",role:"listbox","aria-multiselectable":"false",style:e.listBoxStyle},e.otherAttrs),[e.showPending&&e.computedMenuItems.length===0&&e.$slots.pending?(t.openBlock(),t.createElementBlock("li",$n,[t.renderSlot(e.$slots,"pending")])):t.createCommentVNode("",!0),e.computedShowNoResultsSlot?(t.openBlock(),t.createElementBlock("li",Bn,[t.renderSlot(e.$slots,"no-results")])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedMenuItems,(o,u)=>{var c,g;return t.openBlock(),t.createBlock(a,t.mergeProps({key:o.value,ref_for:!0,ref:b=>e.assignTemplateRef(b,u)},o,{selected:o.value===e.selected,active:o.value===((c=e.activeMenuItem)==null?void 0:c.value),highlighted:o.value===((g=e.highlightedMenuItem)==null?void 0:g.value),"show-thumbnail":e.showThumbnail,"bold-label":e.boldLabel,"hide-description-overflow":e.hideDescriptionOverflow,"search-query":e.searchQuery,onChange:(b,I)=>e.handleMenuItemChange(b,I&&o),onClick:b=>e.$emit("menu-item-click",o)}),{default:t.withCtx(()=>{var b,I;return[t.renderSlot(e.$slots,"default",{menuItem:o,active:o.value===((b=e.activeMenuItem)==null?void 0:b.value)&&o.value===((I=e.highlightedMenuItem)==null?void 0:I.value)})]}),_:2},1040,["selected","active","highlighted","show-thumbnail","bold-label","hide-description-overflow","search-query","onChange","onClick"])}),128)),e.showPending?(t.openBlock(),t.createBlock(d,{key:2,class:"cdx-menu__progress-bar",inline:!0})):t.createCommentVNode("",!0)],16)],6)),[[t.vShow,e.expanded]])}const X=N(_n,[["render",wn]]),Sn=B(J),In=B(ne),Vn=t.defineComponent({name:"CdxTextInput",components:{CdxIcon:D},inheritAttrs:!1,expose:["focus"],props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text",validator:Sn},status:{type:String,default:"default",validator:In},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"],setup(e,{emit:n,attrs:l}){const i=P(t.toRef(e,"modelValue"),n),s=t.computed(()=>e.clearable&&!!i.value&&!e.disabled),r=t.computed(()=>({"cdx-text-input--has-start-icon":!!e.startIcon,"cdx-text-input--has-end-icon":!!e.endIcon,"cdx-text-input--clearable":s.value,[`cdx-text-input--status-${e.status}`]:!0})),{rootClasses:a,rootStyle:d,otherAttrs:o}=U(l,r),u=t.computed(()=>({"cdx-text-input__input--has-value":!!i.value}));return{wrappedModel:i,isClearable:s,rootClasses:a,rootStyle:d,otherAttrs:o,inputClasses:u,onClear:()=>{i.value=""},onInput:C=>{n("input",C)},onChange:C=>{n("change",C)},onKeydown:C=>{(C.key==="Home"||C.key==="End")&&!C.ctrlKey&&!C.metaKey||n("keydown",C)},onFocus:C=>{n("focus",C)},onBlur:C=>{n("blur",C)},cdxIconClear:rt}},methods:{focus(){this.$refs.input.focus()}}}),fl="",xn=["type","disabled"];function Nn(e,n,l,i,s,r){const a=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({ref:"input","onUpdate:modelValue":n[0]||(n[0]=d=>e.wrappedModel=d),class:["cdx-text-input__input",e.inputClasses]},e.otherAttrs,{type:e.inputType,disabled:e.disabled,onInput:n[1]||(n[1]=(...d)=>e.onInput&&e.onInput(...d)),onChange:n[2]||(n[2]=(...d)=>e.onChange&&e.onChange(...d)),onFocus:n[3]||(n[3]=(...d)=>e.onFocus&&e.onFocus(...d)),onBlur:n[4]||(n[4]=(...d)=>e.onBlur&&e.onBlur(...d)),onKeydown:n[5]||(n[5]=(...d)=>e.onKeydown&&e.onKeydown(...d))}),null,16,xn),[[t.vModelDynamic,e.wrappedModel]]),e.startIcon?(t.openBlock(),t.createBlock(a,{key:0,icon:e.startIcon,class:"cdx-text-input__icon-vue cdx-text-input__start-icon"},null,8,["icon"])):t.createCommentVNode("",!0),e.endIcon?(t.openBlock(),t.createBlock(a,{key:1,icon:e.endIcon,class:"cdx-text-input__icon-vue cdx-text-input__end-icon"},null,8,["icon"])):t.createCommentVNode("",!0),e.isClearable?(t.openBlock(),t.createBlock(a,{key:2,icon:e.cdxIconClear,class:"cdx-text-input__icon-vue cdx-text-input__clear-icon",onMousedown:n[6]||(n[6]=t.withModifiers(()=>{},["prevent"])),onClick:e.onClear},null,8,["icon","onClick"])):t.createCommentVNode("",!0)],6)}const le=N(Vn,[["render",Nn]]);function ae(e){const n=t.ref({width:void 0,height:void 0});if(typeof window!="object"||!("ResizeObserver"in window)||!("ResizeObserverEntry"in window))return n;const l=new window.ResizeObserver(s=>{const r=s[0];r&&(n.value={width:r.borderBoxSize[0].inlineSize,height:r.borderBoxSize[0].blockSize})});let i=!1;return t.onMounted(()=>{i=!0,e.value&&l.observe(e.value)}),t.onUnmounted(()=>{i=!1,l.disconnect()}),t.watch(e,s=>{i&&(l.disconnect(),n.value={width:void 0,height:void 0},s&&l.observe(s))}),n}const En=B(ne),fe=t.defineComponent({name:"CdxCombobox",components:{CdxButton:Q,CdxIcon:D,CdxMenu:X,CdxTextInput:le},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:En}},emits:["update:selected","load-more"],setup(e,{emit:n,attrs:l,slots:i}){const s=t.ref(),r=t.ref(),a=t.ref(),d=v("combobox"),o=t.toRef(e,"selected"),u=P(o,n,"update:selected"),c=t.ref(!1),g=t.ref(!1),b=t.computed(()=>{var h,m;return(m=(h=a.value)==null?void 0:h.getHighlightedMenuItem())==null?void 0:m.id}),I=t.computed(()=>({"cdx-combobox--expanded":c.value,"cdx-combobox--disabled":e.disabled})),_=ae(r),E=t.computed(()=>{var h;return`${(h=_.value.width)!=null?h:0}px`}),{rootClasses:C,rootStyle:w,otherAttrs:S}=U(l,I);function V(){g.value&&c.value?c.value=!1:(e.menuItems.length>0||i["no-results"])&&(c.value=!0)}function H(){c.value=g.value&&c.value}function R(){e.disabled||(g.value=!0)}function A(){var h;e.disabled||(h=s.value)==null||h.focus()}function O(h){!a.value||e.disabled||e.menuItems.length===0||h.key===" "||a.value.delegateKeyNavigation(h)}return t.watch(c,()=>{g.value=!1}),{input:s,inputWrapper:r,currentWidthInPx:E,menu:a,menuId:d,modelWrapper:u,expanded:c,highlightedId:b,onInputFocus:V,onInputBlur:H,onKeydown:O,onButtonClick:A,onButtonMousedown:R,cdxIconExpand:Be,rootClasses:C,rootStyle:w,otherAttrs:S}}}),Te=()=>{t.useCssVars(e=>({"21ba103d":e.currentWidthInPx}))},Le=fe.setup;fe.setup=Le?(e,n)=>(Te(),Le(e,n)):Te;const hl="",Mn={ref:"inputWrapper",class:"cdx-combobox__input-wrapper"};function Tn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-text-input"),d=t.resolveComponent("cdx-icon"),o=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",Mn,[t.createVNode(a,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,"aria-owns":e.menuId,disabled:e.disabled,status:e.status,"aria-autocomplete":"list",autocomplete:"off",role:"combobox",onKeydown:e.onKeydown,onFocus:e.onInputFocus,onBlur:e.onInputBlur}),null,16,["modelValue","aria-activedescendant","aria-expanded","aria-controls","aria-owns","disabled","status","onKeydown","onFocus","onBlur"]),t.createVNode(o,{class:"cdx-combobox__expand-button","aria-hidden":"true",disabled:e.disabled,tabindex:"-1",type:"button",onMousedown:e.onButtonMousedown,onClick:e.onButtonClick},{default:t.withCtx(()=>[t.createVNode(d,{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[1]||(n[1]=c=>e.modelWrapper=c),expanded:e.expanded,"onUpdate:expanded":n[2]||(n[2]=c=>e.expanded=c),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[3]||(n[3]=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 Ln=N(fe,[["render",Tn]]),An=t.defineComponent({name:"CdxDialog",components:{CdxButton:Q,CdxIcon:D},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},closeButtonLabel:{type:String,default:""},primaryAction:{type:Object,default:null},defaultAction:{type:Object,default:null},stackedActions:{type:Boolean,default:!1}},emits:["update:open","primary","default"],setup(e,{emit:n}){const l=v("dialog-label"),i=t.ref(),s=t.ref(),r=t.ref(),a=t.ref(),d=t.ref(),o=t.computed(()=>!e.hideTitle||!!e.closeButtonLabel),u=t.computed(()=>!!e.primaryAction||!!e.defaultAction),c=t.computed(()=>({"cdx-dialog--vertical-actions":e.stackedActions,"cdx-dialog--horizontal-actions":!e.stackedActions})),g=t.ref(0);function b(){n("update:open",!1)}function I(){E(i.value)}function _(){E(i.value,!0)}function E(C,w=!1){let S=Array.from(C.querySelectorAll(` +(function(p,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(p=typeof globalThis!="undefined"?globalThis:p||self,t(p.codex={},p.Vue))})(this,function(p,t){"use strict";var Yo=Object.defineProperty,el=Object.defineProperties;var tl=Object.getOwnPropertyDescriptors;var ae=Object.getOwnPropertySymbols;var qe=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable;var Fe=(p,t,B)=>t in p?Yo(p,t,{enumerable:!0,configurable:!0,writable:!0,value:B}):p[t]=B,He=(p,t)=>{for(var B in t||(t={}))qe.call(t,B)&&Fe(p,B,t[B]);if(ae)for(var B of ae(t))Pe.call(t,B)&&Fe(p,B,t[B]);return p},je=(p,t)=>el(p,tl(t));var se=(p,t)=>{var B={};for(var D in p)qe.call(p,D)&&t.indexOf(D)<0&&(B[D]=p[D]);if(p!=null&&ae)for(var D of ae(p))t.indexOf(D)<0&&Pe.call(p,D)&&(B[D]=p[D]);return B};var be=(p,t,B)=>new Promise((D,Y)=>{var ie=F=>{try{ee(B.next(F))}catch(Z){Y(Z)}},re=F=>{try{ee(B.throw(F))}catch(Z){Y(Z)}},ee=F=>F.done?D(F.value):Promise.resolve(F.value).then(ie,re);ee((B=B.apply(p,t)).next())});function B(e){return n=>typeof n=="string"&&e.indexOf(n)!==-1}const D="cdx",Y=["default","progressive","destructive"],ie=["normal","primary","quiet"],re=["x-small","small","medium"],F=B(["notice","warning","error","success"]),Z=["text","search","number","email","month","password","tel","url","week","date","datetime-local","time"],te=["default","error"],Ue=120,We=500,G="cdx-menu-footer-item",ye=Symbol("CdxTabs"),Ce=Symbol("CdxActiveTab"),Qe='<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"/>',Ge='<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"/>',Ze='<path d="M10 0a10 10 0 1010 10A10 10 0 0010 0zm5.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"/>',Je='<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"/>',Xe='<path d="M13.728 1H6.272L1 6.272v7.456L6.272 19h7.456L19 13.728V6.272zM11 15H9v-2h2zm0-4H9V5h2z"/>',Ye='<path d="m17.5 4.75-7.5 7.5-7.5-7.5L1 6.25l9 9 9-9z"/>',et='<path d="M19 3H1v14h18zM3 14l3.5-4.5 2.5 3L12.5 8l4.5 6z"/><path d="M19 5H1V3h18zm0 12H1v-2h18z"/>',tt='<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 7z"/>',nt='<path d="M10 0C4.477 0 0 4.477 0 10s4.477 10 10 10 10-4.477 10-10S15.523 0 10 0zM9 5h2v2H9zm0 4h2v6H9z"/>',ot='<path d="M7 1 5.6 2.5 13 10l-7.4 7.5L7 19l9-9z"/>',lt='<path d="m4 10 9 9 1.4-1.5L7 10l7.4-7.5L13 1z"/>',at='<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 8z"/>',st='<path d="M10 20a10 10 0 010-20 10 10 0 110 20Zm-2-5 9-8.5L15.5 5 8 12 4.5 8.5 3 10l5 5Z"/>',ke=Qe,it=Ge,rt=Ze,$e=Je,_e=Xe,Be=Ye,dt=et,ct={langCodeMap:{ar:tt},default:nt},ut={ltr:ot,shouldFlip:!0},pt={ltr:lt,shouldFlip:!0},mt=at,we=st;function ft(e,n,l){if(typeof e=="string"||"path"in e)return e;if("shouldFlip"in e)return e.ltr;if("rtl"in e)return l==="rtl"?e.rtl:e.ltr;const i=n in e.langCodeMap?e.langCodeMap[n]:e.default;return typeof i=="string"||"path"in i?i:i.ltr}function ht(e,n){if(typeof e=="string")return!1;if("langCodeMap"in e){const l=n in e.langCodeMap?e.langCodeMap[n]:e.default;if(typeof l=="string")return!1;e=l}if("shouldFlipExceptions"in e&&Array.isArray(e.shouldFlipExceptions)){const l=e.shouldFlipExceptions.indexOf(n);return l===void 0||l===-1}return"shouldFlip"in e?e.shouldFlip:!1}function de(e){const n=t.ref(null);return t.onMounted(()=>{const l=window.getComputedStyle(e.value).direction;n.value=l==="ltr"||l==="rtl"?l:null}),n}function Se(e){const n=t.ref("");return t.onMounted(()=>{let l=e.value;for(;l&&l.lang==="";)l=l.parentElement;n.value=l?l.lang:null}),n}const gt=B(re),bt=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:gt}},emits:["click"],setup(e,{emit:n}){const l=t.ref(),i=de(l),s=Se(l),r=t.computed(()=>e.dir||i.value),a=t.computed(()=>e.lang||s.value),d=t.computed(()=>({"cdx-icon--flipped":r.value==="rtl"&&a.value!==null&&ht(e.icon,a.value),[`cdx-icon--${e.size}`]:!0})),o=t.computed(()=>ft(e.icon,a.value||"",r.value||"ltr")),u=t.computed(()=>typeof o.value=="string"?o.value:""),c=t.computed(()=>typeof o.value!="string"?o.value.path:"");return{rootElement:l,rootClasses:d,iconSvg:u,iconPath:c,onClick:h=>{n("click",h)}}}}),nl="",x=(e,n)=>{const l=e.__vccOpts||e;for(const[i,s]of n)l[i]=s;return l},yt=["aria-hidden"],Ct={key:0},kt=["innerHTML"],$t=["d"];function _t(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("span",{ref:"rootElement",class:t.normalizeClass(["cdx-icon",e.rootClasses]),onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a))},[(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20","aria-hidden":e.iconLabel?void 0:!0},[e.iconLabel?(t.openBlock(),t.createElementBlock("title",Ct,t.toDisplayString(e.iconLabel),1)):t.createCommentVNode("",!0),e.iconSvg?(t.openBlock(),t.createElementBlock("g",{key:1,innerHTML:e.iconSvg},null,8,kt)):(t.openBlock(),t.createElementBlock("path",{key:2,d:e.iconPath},null,8,$t))],8,yt))],2)}const z=x(bt,[["render",_t]]),Bt=B(Y),wt=B(ie),St=e=>{!e["aria-label"]&&!e["aria-hidden"]&&t.warn(`icon-only buttons require one of the following attribute: aria-label or aria-hidden. + See documentation on https://doc.wikimedia.org/codex/latest/components/button.html#default-icon-only`)};function ce(e){const n=[];for(const l of e)typeof l=="string"&&l.trim()!==""?n.push(l):Array.isArray(l)?n.push(...ce(l)):typeof l=="object"&&l&&(typeof l.type=="string"||typeof l.type=="object"?n.push(l):l.type!==t.Comment&&(typeof l.children=="string"&&l.children.trim()!==""?n.push(l.children):Array.isArray(l.children)&&n.push(...ce(l.children))));return n}const It=(e,n)=>{if(!e)return!1;const l=ce(e);if(l.length!==1)return!1;const i=l[0],s=typeof i=="object"&&typeof i.type=="object"&&"name"in i.type&&i.type.name===z.name,r=typeof i=="object"&&i.type==="svg";return s||r?(St(n),!0):!1},Vt=t.defineComponent({name:"CdxButton",props:{action:{type:String,default:"default",validator:Bt},weight:{type:String,default:"normal",validator:wt}},emits:["click"],setup(e,{emit:n,slots:l,attrs:i}){const s=t.ref(!1);return{rootClasses:t.computed(()=>{var o;return{[`cdx-button--action-${e.action}`]:!0,[`cdx-button--weight-${e.weight}`]:!0,"cdx-button--framed":e.weight!=="quiet","cdx-button--icon-only":It((o=l.default)==null?void 0:o.call(l),i),"cdx-button--is-active":s.value}}),onClick:o=>{n("click",o)},setActive:o=>{s.value=o}}}}),ol="";function xt(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-button",e.rootClasses]),onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a)),onKeydown:n[1]||(n[1]=t.withKeys(a=>e.setActive(!0),["space","enter"])),onKeyup:n[2]||(n[2]=t.withKeys(a=>e.setActive(!1),["space","enter"]))},[t.renderSlot(e.$slots,"default")],34)}const W=x(Vt,[["render",xt]]);function Ie(e){return e.label===void 0?e.value:e.label===null?"":e.label}const Nt=t.defineComponent({name:"CdxButtonGroup",components:{CdxButton:W,CdxIcon:z},props:{buttons:{type:Array,required:!0,validator:e=>Array.isArray(e)&&e.length>=1},disabled:{type:Boolean,default:!1}},emits:["click"],setup(){return{getButtonLabel:Ie}}}),ll="",Et={class:"cdx-button-group"};function Mt(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",Et,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.buttons,o=>(t.openBlock(),t.createBlock(d,{key:o.value,disabled:o.disabled||e.disabled,"aria-label":o.ariaLabel,onClick:u=>e.$emit("click",o.value)},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{button:o},()=>[o.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:o.icon},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.getButtonLabel(o)),1)])]),_:2},1032,["disabled","aria-label","onClick"]))),128))])}const Tt=x(Nt,[["render",Mt]]),Lt=t.defineComponent({name:"CdxThumbnail",components:{CdxIcon:z},props:{thumbnail:{type:[Object,null],default:null},placeholderIcon:{type:[String,Object],default:dt}},setup:e=>{const n=t.ref(!1),l=t.ref({}),i=s=>{const r=s.replace(/([\\"\n])/g,"\\$1"),a=new Image;a.onload=()=>{l.value={backgroundImage:`url("${r}")`},n.value=!0},a.onerror=()=>{n.value=!1},a.src=r};return t.onMounted(()=>{var s;(s=e.thumbnail)!=null&&s.url&&i(e.thumbnail.url)}),{thumbnailStyle:l,thumbnailLoaded:n}}}),al="",At={class:"cdx-thumbnail"},Kt={key:0,class:"cdx-thumbnail__placeholder"};function Dt(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("span",At,[e.thumbnailLoaded?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Kt,[t.createVNode(a,{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:"cdx-thumbnail__image"},null,4)):t.createCommentVNode("",!0)]),_:1})])}const ue=x(Lt,[["render",Dt]]),zt=t.defineComponent({name:"CdxCard",components:{CdxIcon:z,CdxThumbnail:ue},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),l=t.computed(()=>n.value?"a":"span"),i=t.computed(()=>n.value?e.url:void 0);return{isLink:n,contentTag:l,cardLink:i}}}),sl="",Rt={class:"cdx-card__text"},vt={class:"cdx-card__text__title"},Ot={key:0,class:"cdx-card__text__description"},Ft={key:1,class:"cdx-card__text__supporting-text"};function qt(e,n,l,i,s,r){const a=t.resolveComponent("cdx-thumbnail"),d=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(a,{key:0,thumbnail:e.thumbnail,"placeholder-icon":e.customPlaceholderIcon,class:"cdx-card__thumbnail"},null,8,["thumbnail","placeholder-icon"])):e.icon?(t.openBlock(),t.createBlock(d,{key:1,icon:e.icon,class:"cdx-card__icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createElementVNode("span",Rt,[t.createElementVNode("span",vt,[t.renderSlot(e.$slots,"title")]),e.$slots.description?(t.openBlock(),t.createElementBlock("span",Ot,[t.renderSlot(e.$slots,"description")])):t.createCommentVNode("",!0),e.$slots["supporting-text"]?(t.openBlock(),t.createElementBlock("span",Ft,[t.renderSlot(e.$slots,"supporting-text")])):t.createCommentVNode("",!0)])]),_:3},8,["href","class"])}const Pt=x(zt,[["render",qt]]);function q(e,n,l){return t.computed({get:()=>e.value,set:i=>n(l||"update:modelValue",i)})}let pe=0;function O(e){const n=t.getCurrentInstance(),l=(n==null?void 0:n.props.id)||(n==null?void 0:n.attrs.id);return e?`${D}-${e}-${pe++}`:l?`${D}-${l}-${pe++}`:`${D}-${pe++}`}const Ht=t.defineComponent({name:"CdxCheckbox",props:{modelValue:{type:[Boolean,Array],default:!1},inputValue:{type:[String,Number,Boolean],default:!1},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.computed(()=>({"cdx-checkbox--inline":e.inline})),i=t.ref(),s=O("checkbox"),r=()=>{i.value.click()},a=q(t.toRef(e,"modelValue"),n);return{rootClasses:l,input:i,checkboxId:s,clickInput:r,wrappedModel:a}}}),il="",jt=["id","value","disabled",".indeterminate"],Ut=t.createElementVNode("span",{class:"cdx-checkbox__icon"},null,-1),Wt=["for"];function Qt(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-checkbox",e.rootClasses])},[t.withDirectives(t.createElementVNode("input",{id:e.checkboxId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-checkbox__input",type:"checkbox",value:e.inputValue,disabled:e.disabled,".indeterminate":e.indeterminate,onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers((...a)=>e.clickInput&&e.clickInput(...a),["prevent"]),["enter"]))},null,40,jt),[[t.vModelCheckbox,e.wrappedModel]]),Ut,t.createElementVNode("label",{class:"cdx-checkbox__label",for:e.checkboxId},[t.renderSlot(e.$slots,"default")],8,Wt)],2)}const Gt=x(Ht,[["render",Qt]]),Zt={error:_e,warning:ke,success:we},Jt=t.defineComponent({name:"CdxInfoChip",components:{CdxIcon:z},props:{status:{type:String,default:"notice",validator:F},icon:{type:[String,Object],default:null}},setup(e){const n=t.computed(()=>({[`cdx-info-chip__icon--${e.status}`]:!0})),l=t.computed(()=>e.status==="notice"?e.icon:Zt[e.status]);return{iconClass:n,computedIcon:l}}}),rl="",Xt={class:"cdx-info-chip"},Yt={class:"cdx-info-chip--text"};function en(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon");return t.openBlock(),t.createElementBlock("div",Xt,[e.computedIcon?(t.openBlock(),t.createBlock(a,{key:0,class:t.normalizeClass(["cdx-info-chip__icon",e.iconClass]),icon:e.computedIcon},null,8,["class","icon"])):t.createCommentVNode("",!0),t.createElementVNode("span",Yt,[t.renderSlot(e.$slots,"default")])])}const tn=x(Jt,[["render",en]]);function Ve(e){return e.replace(/([\\{}()|.?*+\-^$[\]])/g,"\\$1")}const nn="[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-᪾ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ-᳴᳷-᳹᷀-᷹᷻-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯]";function xe(e,n){if(!e)return[n,"",""];const l=Ve(e),i=new RegExp(l+nn+"*","i").exec(n);if(!i||i.index===void 0)return[n,"",""];const s=i.index,r=s+i[0].length,a=n.slice(s,r),d=n.slice(0,s),o=n.slice(r,n.length);return[d,a,o]}const on=Object.freeze(Object.defineProperty({__proto__:null,regExpEscape:Ve,splitStringAtMatch:xe},Symbol.toStringTag,{value:"Module"})),ln=t.defineComponent({name:"CdxSearchResultTitle",props:{title:{type:String,required:!0},searchQuery:{type:String,default:""}},setup:e=>({titleChunks:t.computed(()=>xe(e.searchQuery,String(e.title)))})}),dl="",an={class:"cdx-search-result-title"},sn={class:"cdx-search-result-title__match"};function rn(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("span",an,[t.createElementVNode("bdi",null,[t.createTextVNode(t.toDisplayString(e.titleChunks[0]),1),t.createElementVNode("span",sn,t.toDisplayString(e.titleChunks[1]),1),t.createTextVNode(t.toDisplayString(e.titleChunks[2]),1)])])}const Ne=x(ln,[["render",rn]]),dn=t.defineComponent({name:"CdxMenuItem",components:{CdxIcon:z,CdxThumbnail:ue,CdxSearchResultTitle:Ne},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:()=>({})}},emits:["change"],setup:(e,{emit:n})=>{const l=()=>{e.highlighted||n("change","highlighted",!0)},i=()=>{n("change","highlighted",!1)},s=c=>{c.button===0&&n("change","active",!0)},r=()=>{n("change","selected",!0)},a=t.computed(()=>e.searchQuery.length>0),d=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--enabled":!e.disabled,"cdx-menu-item--disabled":e.disabled,"cdx-menu-item--highlight-query":a.value,"cdx-menu-item--bold-label":e.boldLabel,"cdx-menu-item--has-description":!!e.description,"cdx-menu-item--hide-description-overflow":e.hideDescriptionOverflow})),o=t.computed(()=>e.url?"a":"span"),u=t.computed(()=>e.label||String(e.value));return{onMouseMove:l,onMouseLeave:i,onMouseDown:s,onClick:r,highlightQuery:a,rootClasses:d,contentTag:o,title:u}}}),cl="",cn=["id","aria-disabled","aria-selected"],un={class:"cdx-menu-item__text"},pn=["lang"],mn=["lang"],fn=["lang"],hn=["lang"];function gn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-thumbnail"),d=t.resolveComponent("cdx-icon"),o=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,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,b,h,I,_;return[e.showThumbnail?(t.openBlock(),t.createBlock(a,{key:0,thumbnail:e.thumbnail,class:"cdx-menu-item__thumbnail"},null,8,["thumbnail"])):e.icon?(t.openBlock(),t.createBlock(d,{key:1,icon:e.icon,class:"cdx-menu-item__icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createElementVNode("span",un,[e.highlightQuery?(t.openBlock(),t.createBlock(o,{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,pn)),e.match?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(" ")+" "),e.highlightQuery?(t.openBlock(),t.createBlock(o,{key:0,title:e.match,"search-query":e.searchQuery,lang:(b=e.language)==null?void 0:b.match},null,8,["title","search-query","lang"])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"cdx-menu-item__text__match",lang:(h=e.language)==null?void 0:h.match},[t.createElementVNode("bdi",null,t.toDisplayString(e.match),1)],8,mn))],64)):t.createCommentVNode("",!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:(I=e.language)==null?void 0:I.supportingText},[t.createElementVNode("bdi",null,t.toDisplayString(e.supportingText),1)],8,fn)],64)):t.createCommentVNode("",!0),e.description?(t.openBlock(),t.createElementBlock("span",{key:4,class:"cdx-menu-item__text__description",lang:(_=e.language)==null?void 0:_.description},[t.createElementVNode("bdi",null,t.toDisplayString(e.description),1)],8,hn)):t.createCommentVNode("",!0)])]}),_:1},8,["href"]))])],42,cn)}const Ee=x(dn,[["render",gn]]),bn=t.defineComponent({name:"CdxProgressBar",props:{inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(e){return{rootClasses: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}))}}}),ul="",yn=["aria-disabled"],Cn=[t.createElementVNode("div",{class:"cdx-progress-bar__bar"},null,-1)];function kn(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-progress-bar",e.rootClasses]),role:"progressbar","aria-disabled":e.disabled,"aria-valuemin":"0","aria-valuemax":"100"},Cn,10,yn)}const Me=x(bn,[["render",kn]]);function ne(e,n){const l=t.ref(!1);let i=!1;if(typeof window!="object"||!("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype))return l;const s=new window.IntersectionObserver(r=>{const a=r[0];a&&(l.value=a.isIntersecting)},n);return t.onMounted(()=>{i=!0,e.value&&s.observe(e.value)}),t.onUnmounted(()=>{i=!1,s.disconnect()}),t.watch(e,r=>{i&&(s.disconnect(),l.value=!1,r&&s.observe(r))}),l}function j(e,n=t.computed(()=>({}))){const l=t.computed(()=>{const r=se(n.value,[]);return e.class&&e.class.split(" ").forEach(d=>{r[d]=!0}),r}),i=t.computed(()=>{if("style"in e)return e.style}),s=t.computed(()=>{const o=e,{class:r,style:a}=o;return se(o,["class","style"])});return{rootClasses:l,rootStyle:i,otherAttrs:s}}const $n=t.defineComponent({name:"CdxMenu",components:{CdxMenuItem:Ee,CdxProgressBar:Me},inheritAttrs:!1,props:{menuItems:{type:Array,required:!0},footer:{type:Object,default:null},selected:{type:[String,Number,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:["clearActive","getHighlightedMenuItem","getHighlightedViaKeyboard","delegateKeyNavigation"],setup(e,{emit:n,slots:l,attrs:i}){const s=t.computed(()=>(e.footer&&e.menuItems?[...e.menuItems,e.footer]:e.menuItems).map($=>je(He({},$),{id:O("menu-item")}))),r=t.computed(()=>l["no-results"]?e.showNoResultsSlot!==null?e.showNoResultsSlot:s.value.length===0:!1),a=t.ref(null),d=t.ref(!1),o=t.ref(null);function u(){return s.value.find(f=>f.value===e.selected)}function c(f,$){var M;if(!($&&$.disabled))switch(f){case"selected":n("update:selected",(M=$==null?void 0:$.value)!=null?M:null),n("update:expanded",!1),o.value=null;break;case"highlighted":a.value=$||null,d.value=!1;break;case"highlightedViaKeyboard":a.value=$||null,d.value=!0;break;case"active":o.value=$||null;break}}const b=t.computed(()=>{if(a.value!==null)return s.value.findIndex(f=>f.value===a.value.value)});function h(f){f&&(c("highlightedViaKeyboard",f),n("menu-item-keyboard-navigation",f))}function I(f){var L;const $=X=>{for(let U=X-1;U>=0;U--)if(!s.value[U].disabled)return s.value[U]};f=f||s.value.length;const M=(L=$(f))!=null?L:$(s.value.length);h(M)}function _(f){const $=L=>s.value.find((X,U)=>!X.disabled&&U>L);f=f!=null?f:-1;const M=$(f)||$(-1);h(M)}function N(f,$=!0){function M(){n("update:expanded",!0),c("highlighted",u())}function L(){$&&(f.preventDefault(),f.stopPropagation())}switch(f.key){case"Enter":case" ":return L(),e.expanded?(a.value&&d.value&&n("update:selected",a.value.value),n("update:expanded",!1)):M(),!0;case"Tab":return e.expanded&&(a.value&&d.value&&n("update:selected",a.value.value),n("update:expanded",!1)),!0;case"ArrowUp":return L(),e.expanded?(a.value===null&&c("highlightedViaKeyboard",u()),I(b.value)):M(),A(),!0;case"ArrowDown":return L(),e.expanded?(a.value===null&&c("highlightedViaKeyboard",u()),_(b.value)):M(),A(),!0;case"Home":return L(),e.expanded?(a.value===null&&c("highlightedViaKeyboard",u()),_()):M(),A(),!0;case"End":return L(),e.expanded?(a.value===null&&c("highlightedViaKeyboard",u()),I()):M(),A(),!0;case"Escape":return L(),n("update:expanded",!1),!0;default:return!1}}function k(){c("active")}const w=[],S=t.ref(void 0),V=ne(S,{threshold:.8});t.watch(V,f=>{f&&n("load-more")});function P(f,$){if(f){w[$]=f.$el;const M=e.visibleItemLimit;if(!M||e.menuItems.length<M)return;const L=Math.min(M,Math.max(2,Math.floor(.2*e.menuItems.length)));$===e.menuItems.length-L&&(S.value=f.$el)}}function A(){if(!e.visibleItemLimit||e.visibleItemLimit>e.menuItems.length||b.value===void 0)return;const f=b.value>=0?b.value:0;w[f].scrollIntoView({behavior:"smooth",block:"nearest"})}const v=t.ref(null),C=t.ref(null);function g(){if(C.value=null,!e.visibleItemLimit||w.length<=e.visibleItemLimit){v.value=null;return}const f=w[0],$=w[e.visibleItemLimit];if(v.value=m(f,$),e.footer){const M=w[w.length-1];C.value=M.scrollHeight}}function m(f,$){const M=f.getBoundingClientRect().top;return $.getBoundingClientRect().top-M+2}t.onMounted(()=>{document.addEventListener("mouseup",k)}),t.onUnmounted(()=>{document.removeEventListener("mouseup",k)}),t.watch(t.toRef(e,"expanded"),f=>be(this,null,function*(){const $=u();!f&&a.value&&$===void 0&&c("highlighted"),f&&$!==void 0&&c("highlighted",$),f&&(yield t.nextTick(),g(),yield t.nextTick(),A())})),t.watch(t.toRef(e,"menuItems"),f=>be(this,null,function*(){f.length<w.length&&(w.length=f.length),e.expanded&&(yield t.nextTick(),g(),yield t.nextTick(),A())}),{deep:!0});const T=t.computed(()=>({"max-height":v.value?`${v.value}px`:void 0,"overflow-y":v.value?"scroll":void 0,"margin-bottom":C.value?`${C.value}px`:void 0})),E=t.computed(()=>({"cdx-menu--has-footer":!!e.footer,"cdx-menu--has-sticky-footer":!!e.footer&&!!v.value})),{rootClasses:K,rootStyle:Q,otherAttrs:ge}=j(i,E);return{listBoxStyle:T,rootClasses:K,rootStyle:Q,otherAttrs:ge,assignTemplateRef:P,computedMenuItems:s,computedShowNoResultsSlot:r,highlightedMenuItem:a,highlightedViaKeyboard:d,activeMenuItem:o,handleMenuItemChange:c,handleKeyNavigation:N}},methods:{getHighlightedMenuItem(){return this.highlightedMenuItem},getHighlightedViaKeyboard(){return this.highlightedViaKeyboard},clearActive(){this.handleMenuItemChange("active")},delegateKeyNavigation(e,n=!0){return this.handleKeyNavigation(e,n)}}}),ml="",_n={key:0,class:"cdx-menu__pending cdx-menu-item"},Bn={key:1,class:"cdx-menu__no-results cdx-menu-item"};function wn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-menu-item"),d=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({class:"cdx-menu__listbox",role:"listbox","aria-multiselectable":"false",style:e.listBoxStyle},e.otherAttrs),[e.showPending&&e.computedMenuItems.length===0&&e.$slots.pending?(t.openBlock(),t.createElementBlock("li",_n,[t.renderSlot(e.$slots,"pending")])):t.createCommentVNode("",!0),e.computedShowNoResultsSlot?(t.openBlock(),t.createElementBlock("li",Bn,[t.renderSlot(e.$slots,"no-results")])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.computedMenuItems,(o,u)=>{var c,b;return t.openBlock(),t.createBlock(a,t.mergeProps({key:o.value,ref_for:!0,ref:h=>e.assignTemplateRef(h,u)},o,{selected:o.value===e.selected,active:o.value===((c=e.activeMenuItem)==null?void 0:c.value),highlighted:o.value===((b=e.highlightedMenuItem)==null?void 0:b.value),"show-thumbnail":e.showThumbnail,"bold-label":e.boldLabel,"hide-description-overflow":e.hideDescriptionOverflow,"search-query":e.searchQuery,onChange:(h,I)=>e.handleMenuItemChange(h,I&&o),onClick:h=>e.$emit("menu-item-click",o)}),{default:t.withCtx(()=>{var h,I;return[t.renderSlot(e.$slots,"default",{menuItem:o,active:o.value===((h=e.activeMenuItem)==null?void 0:h.value)&&o.value===((I=e.highlightedMenuItem)==null?void 0:I.value)})]}),_:2},1040,["selected","active","highlighted","show-thumbnail","bold-label","hide-description-overflow","search-query","onChange","onClick"])}),128)),e.showPending?(t.openBlock(),t.createBlock(d,{key:2,class:"cdx-menu__progress-bar",inline:!0})):t.createCommentVNode("",!0)],16)],6)),[[t.vShow,e.expanded]])}const J=x($n,[["render",wn]]),Sn=B(Z),In=B(te),Vn=t.defineComponent({name:"CdxTextInput",components:{CdxIcon:z},inheritAttrs:!1,expose:["focus"],props:{modelValue:{type:[String,Number],default:""},inputType:{type:String,default:"text",validator:Sn},status:{type:String,default:"default",validator:In},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"],setup(e,{emit:n,attrs:l}){const i=q(t.toRef(e,"modelValue"),n),s=t.computed(()=>e.clearable&&!!i.value&&!e.disabled),r=t.computed(()=>({"cdx-text-input--has-start-icon":!!e.startIcon,"cdx-text-input--has-end-icon":!!e.endIcon,"cdx-text-input--clearable":s.value,[`cdx-text-input--status-${e.status}`]:!0})),{rootClasses:a,rootStyle:d,otherAttrs:o}=j(l,r),u=t.computed(()=>({"cdx-text-input__input--has-value":!!i.value}));return{wrappedModel:i,isClearable:s,rootClasses:a,rootStyle:d,otherAttrs:o,inputClasses:u,onClear:()=>{i.value=""},onInput:k=>{n("input",k)},onChange:k=>{n("change",k)},onKeydown:k=>{(k.key==="Home"||k.key==="End")&&!k.ctrlKey&&!k.metaKey||n("keydown",k)},onFocus:k=>{n("focus",k)},onBlur:k=>{n("blur",k)},cdxIconClear:rt}},methods:{focus(){this.$refs.input.focus()}}}),fl="",xn=["type","disabled"];function Nn(e,n,l,i,s,r){const a=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({ref:"input","onUpdate:modelValue":n[0]||(n[0]=d=>e.wrappedModel=d),class:["cdx-text-input__input",e.inputClasses]},e.otherAttrs,{type:e.inputType,disabled:e.disabled,onInput:n[1]||(n[1]=(...d)=>e.onInput&&e.onInput(...d)),onChange:n[2]||(n[2]=(...d)=>e.onChange&&e.onChange(...d)),onFocus:n[3]||(n[3]=(...d)=>e.onFocus&&e.onFocus(...d)),onBlur:n[4]||(n[4]=(...d)=>e.onBlur&&e.onBlur(...d)),onKeydown:n[5]||(n[5]=(...d)=>e.onKeydown&&e.onKeydown(...d))}),null,16,xn),[[t.vModelDynamic,e.wrappedModel]]),e.startIcon?(t.openBlock(),t.createBlock(a,{key:0,icon:e.startIcon,class:"cdx-text-input__icon-vue cdx-text-input__start-icon"},null,8,["icon"])):t.createCommentVNode("",!0),e.endIcon?(t.openBlock(),t.createBlock(a,{key:1,icon:e.endIcon,class:"cdx-text-input__icon-vue cdx-text-input__end-icon"},null,8,["icon"])):t.createCommentVNode("",!0),e.isClearable?(t.openBlock(),t.createBlock(a,{key:2,icon:e.cdxIconClear,class:"cdx-text-input__icon-vue cdx-text-input__clear-icon",onMousedown:n[6]||(n[6]=t.withModifiers(()=>{},["prevent"])),onClick:e.onClear},null,8,["icon","onClick"])):t.createCommentVNode("",!0)],6)}const oe=x(Vn,[["render",Nn]]);function le(e){const n=t.ref({width:void 0,height:void 0});if(typeof window!="object"||!("ResizeObserver"in window)||!("ResizeObserverEntry"in window))return n;const l=new window.ResizeObserver(s=>{const r=s[0];r&&(n.value={width:r.borderBoxSize[0].inlineSize,height:r.borderBoxSize[0].blockSize})});let i=!1;return t.onMounted(()=>{i=!0,e.value&&l.observe(e.value)}),t.onUnmounted(()=>{i=!1,l.disconnect()}),t.watch(e,s=>{i&&(l.disconnect(),n.value={width:void 0,height:void 0},s&&l.observe(s))}),n}const En=B(te),me=t.defineComponent({name:"CdxCombobox",components:{CdxButton:W,CdxIcon:z,CdxMenu:J,CdxTextInput:oe},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:En}},emits:["update:selected","load-more"],setup(e,{emit:n,attrs:l,slots:i}){const s=t.ref(),r=t.ref(),a=t.ref(),d=O("combobox"),o=t.toRef(e,"selected"),u=q(o,n,"update:selected"),c=t.ref(!1),b=t.ref(!1),h=t.computed(()=>{var g,m;return(m=(g=a.value)==null?void 0:g.getHighlightedMenuItem())==null?void 0:m.id}),I=t.computed(()=>({"cdx-combobox--expanded":c.value,"cdx-combobox--disabled":e.disabled})),_=le(r),N=t.computed(()=>{var g;return`${(g=_.value.width)!=null?g:0}px`}),{rootClasses:k,rootStyle:w,otherAttrs:S}=j(l,I);function V(){b.value&&c.value?c.value=!1:(e.menuItems.length>0||i["no-results"])&&(c.value=!0)}function P(){c.value=b.value&&c.value}function A(){e.disabled||(b.value=!0)}function v(){var g;e.disabled||(g=s.value)==null||g.focus()}function C(g){!a.value||e.disabled||e.menuItems.length===0||g.key===" "||a.value.delegateKeyNavigation(g)}return t.watch(c,()=>{b.value=!1}),{input:s,inputWrapper:r,currentWidthInPx:N,menu:a,menuId:d,modelWrapper:u,expanded:c,highlightedId:h,onInputFocus:V,onInputBlur:P,onKeydown:C,onButtonClick:v,onButtonMousedown:A,cdxIconExpand:Be,rootClasses:k,rootStyle:w,otherAttrs:S}}}),Te=()=>{t.useCssVars(e=>({"21ba103d":e.currentWidthInPx}))},Le=me.setup;me.setup=Le?(e,n)=>(Te(),Le(e,n)):Te;const hl="",Mn={ref:"inputWrapper",class:"cdx-combobox__input-wrapper"};function Tn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-text-input"),d=t.resolveComponent("cdx-icon"),o=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",Mn,[t.createVNode(a,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,"aria-owns":e.menuId,disabled:e.disabled,status:e.status,"aria-autocomplete":"list",autocomplete:"off",role:"combobox",onKeydown:e.onKeydown,onFocus:e.onInputFocus,onBlur:e.onInputBlur}),null,16,["modelValue","aria-activedescendant","aria-expanded","aria-controls","aria-owns","disabled","status","onKeydown","onFocus","onBlur"]),t.createVNode(o,{class:"cdx-combobox__expand-button","aria-hidden":"true",disabled:e.disabled,tabindex:"-1",type:"button",onMousedown:e.onButtonMousedown,onClick:e.onButtonClick},{default:t.withCtx(()=>[t.createVNode(d,{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[1]||(n[1]=c=>e.modelWrapper=c),expanded:e.expanded,"onUpdate:expanded":n[2]||(n[2]=c=>e.expanded=c),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[3]||(n[3]=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 Ln=x(me,[["render",Tn]]),An=t.defineComponent({name:"CdxDialog",components:{CdxButton:W,CdxIcon:z},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},closeButtonLabel:{type:String,default:""},primaryAction:{type:Object,default:null},defaultAction:{type:Object,default:null},stackedActions:{type:Boolean,default:!1}},emits:["update:open","primary","default"],setup(e,{emit:n}){const l=O("dialog-label"),i=t.ref(),s=t.ref(),r=t.ref(),a=t.ref(),d=t.ref(),o=t.computed(()=>!e.hideTitle||!!e.closeButtonLabel),u=t.computed(()=>!!e.primaryAction||!!e.defaultAction),c=t.computed(()=>({"cdx-dialog--vertical-actions":e.stackedActions,"cdx-dialog--horizontal-actions":!e.stackedActions})),b=t.ref(0);function h(){n("update:open",!1)}function I(){N(i.value)}function _(){N(i.value,!0)}function N(k,w=!1){let S=Array.from(k.querySelectorAll(` input, select, textarea, button, object, a, area, [contenteditable], [tabindex]:not([tabindex^="-"]) - `));w&&(S=S.reverse());for(const V of S)if(V.focus(),document.activeElement===V)return!0;return!1}return t.watch(t.toRef(e,"open"),C=>{C?(g.value=window.innerWidth-document.documentElement.clientWidth,document.documentElement.style.setProperty("margin-right",`${g.value}px`),document.body.classList.add("cdx-dialog-open"),t.nextTick(()=>{var w;E(s.value)||(w=r.value)==null||w.focus()})):(document.body.classList.remove("cdx-dialog-open"),document.documentElement.style.removeProperty("margin-right"))}),{close:b,cdxIconClose:_e,labelId:l,rootClasses:c,dialogElement:i,focusTrapStart:a,focusTrapEnd:d,focusFirst:I,focusLast:_,dialogBody:s,focusHolder:r,showHeader:o,showFooterActions:u}}}),bl="",Kn=["aria-label","aria-labelledby"],Dn={key:0,class:"cdx-dialog__header__title-group"},zn=["id"],Rn={key:0,class:"cdx-dialog__header__subtitle"},vn={ref:"focusHolder",class:"cdx-dialog-focus-trap",tabindex:"-1"},On={key:0,class:"cdx-dialog__footer__text"},Fn={key:1,class:"cdx-dialog__footer__actions"};function qn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createBlock(t.Transition,{name:"cdx-dialog-fade",appear:""},{default:t.withCtx(()=>[e.open?(t.openBlock(),t.createElementBlock("div",{key:0,class:"cdx-dialog-backdrop",onClick:n[5]||(n[5]=(...o)=>e.close&&e.close(...o)),onKeyup:n[6]||(n[6]=t.withKeys((...o)=>e.close&&e.close(...o),["escape"]))},[t.createElementVNode("div",{ref:"focusTrapStart",tabindex:"0",onFocus:n[0]||(n[0]=(...o)=>e.focusLast&&e.focusLast(...o))},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,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("",!0):(t.openBlock(),t.createElementBlock("div",Dn,[t.createElementVNode("h2",{id:e.labelId,class:"cdx-dialog__header__title"},t.toDisplayString(e.title),9,zn),e.subtitle?(t.openBlock(),t.createElementBlock("p",Rn,t.toDisplayString(e.subtitle),1)):t.createCommentVNode("",!0)])),e.closeButtonLabel?(t.openBlock(),t.createBlock(d,{key:1,class:"cdx-dialog__header__close-button",weight:"quiet",type:"button","aria-label":e.closeButtonLabel,onClick:e.close},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconClose,"icon-label":e.closeButtonLabel},null,8,["icon","icon-label"])]),_:1},8,["aria-label","onClick"])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",vn,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",On,[t.renderSlot(e.$slots,"footer-text")])):t.createCommentVNode("",!0),e.showFooterActions?(t.openBlock(),t.createElementBlock("div",Fn,[e.primaryAction?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-dialog__footer__primary-action",weight:"primary",action:e.primaryAction.actionType,disabled:e.primaryAction.disabled,onClick:n[1]||(n[1]=o=>e.$emit("primary"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.primaryAction.label),1)]),_:1},8,["action","disabled"])):t.createCommentVNode("",!0),e.defaultAction?(t.openBlock(),t.createBlock(d,{key:1,class:"cdx-dialog__footer__default-action",disabled:e.defaultAction.disabled,onClick:n[2]||(n[2]=o=>e.$emit("default"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.defaultAction.label),1)]),_:1},8,["disabled"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)],16,Kn),t.createElementVNode("div",{ref:"focusTrapEnd",tabindex:"0",onFocus:n[4]||(n[4]=(...o)=>e.focusFirst&&e.focusFirst(...o))},null,544)],32)):t.createCommentVNode("",!0)]),_:3})}const Pn=N(An,[["render",qn]]),Hn=B(ne),he=t.defineComponent({name:"CdxLookup",components:{CdxMenu:X,CdxTextInput:le},inheritAttrs:!1,props:{selected:{type:[String,Number,null],required:!0},menuItems:{type:Array,required:!0},initialInputValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})},status:{type:String,default:"default",validator:Hn}},emits:["update:selected","input","load-more"],setup:(e,{emit:n,attrs:l,slots:i})=>{const s=t.ref(),r=t.ref(),a=v("lookup-menu"),d=t.ref(!1),o=t.ref(!1),u=t.ref(!1),c=t.toRef(e,"selected"),g=P(c,n,"update:selected"),b=t.computed(()=>e.menuItems.find(m=>m.value===e.selected)),I=t.computed(()=>{var m,$;return($=(m=r.value)==null?void 0:m.getHighlightedMenuItem())==null?void 0:$.id}),_=t.ref(e.initialInputValue),E=ae(s),C=t.computed(()=>{var m;return`${(m=E.value.width)!=null?m:0}px`}),w=t.computed(()=>({"cdx-lookup--disabled":e.disabled,"cdx-lookup--pending":d.value})),{rootClasses:S,rootStyle:V,otherAttrs:H}=U(l,w);function R(m){b.value&&b.value.label!==m&&b.value.value!==m&&(g.value=null),m===""?(o.value=!1,d.value=!1):d.value=!0,n("input",m)}function A(){u.value=!0,_.value!==null&&_.value!==""&&(e.menuItems.length>0||i["no-results"])&&(o.value=!0)}function O(){u.value=!1,o.value=!1}function h(m){!r.value||e.disabled||e.menuItems.length===0&&!i["no-results"]||m.key===" "||r.value.delegateKeyNavigation(m)}return t.watch(c,m=>{if(m!==null){const $=b.value?b.value.label||b.value.value:"";_.value!==$&&(_.value=$,n("input",_.value))}}),t.watch(t.toRef(e,"menuItems"),m=>{u.value&&d.value&&(m.length>0||i["no-results"])&&(o.value=!0),m.length===0&&!i["no-results"]&&(o.value=!1),d.value=!1}),{rootElement:s,currentWidthInPx:C,menu:r,menuId:a,highlightedId:I,inputValue:_,modelWrapper:g,expanded:o,onInputBlur:O,rootClasses:S,rootStyle:V,otherAttrs:H,onUpdateInput:R,onInputFocus:A,onKeydown:h}}}),Ae=()=>{t.useCssVars(e=>({"51c485f8":e.currentWidthInPx}))},Ke=he.setup;he.setup=Ke?(e,n)=>(Ae(),Ke(e,n)):Ae;const gl="";function jn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-text-input"),d=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(a,t.mergeProps({modelValue:e.inputValue,"onUpdate:modelValue":n[0]||(n[0]=o=>e.inputValue=o)},e.otherAttrs,{class:"cdx-lookup__input",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-controls":e.menuId,"aria-owns":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,disabled:e.disabled,status:e.status,"onUpdate:modelValue":e.onUpdateInput,onFocus:e.onInputFocus,onBlur:e.onInputBlur,onKeydown:e.onKeydown}),null,16,["modelValue","aria-controls","aria-owns","aria-expanded","aria-activedescendant","disabled","status","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[1]||(n[1]=o=>e.modelWrapper=o),expanded:e.expanded,"onUpdate:expanded":n[2]||(n[2]=o=>e.expanded=o),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[3]||(n[3]=o=>e.$emit("load-more"))}),{default:t.withCtx(({menuItem:o})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:o})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}const Un=N(he,[["render",jn]]),Wn={notice:ct,error:$e,warning:ke,success:we},Qn=t.defineComponent({name:"CdxMessage",components:{CdxButton:Q,CdxIcon:D},props:{type:{type:String,default:"notice",validator:q},inline:{type:Boolean,default:!1},icon:{type:[String,Object],default:null},fadeIn:{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 l=t.ref(!1),i=t.computed(()=>e.inline===!1&&e.dismissButtonLabel.length>0),s=t.computed(()=>e.autoDismiss===!1?!1:e.autoDismiss===!0?4e3:e.autoDismiss),r=t.computed(()=>({"cdx-message--inline":e.inline,"cdx-message--block":!e.inline,"cdx-message--user-dismissable":i.value,[`cdx-message--${e.type}`]:!0})),a=t.computed(()=>e.icon&&e.type==="notice"?e.icon:Wn[e.type]),d=t.ref("");function o(u){l.value||(d.value=u==="user-dismissed"?"cdx-message-leave-active-user":"cdx-message-leave-active-system",l.value=!0,n(u))}return t.onMounted(()=>{s.value&&setTimeout(()=>o("auto-dismissed"),s.value)}),{dismissed:l,userDismissable:i,rootClasses:r,leaveActiveClass:d,computedIcon:a,onDismiss:o,cdxIconClose:_e}}}),yl="",Gn=["aria-live","role"],Zn={class:"cdx-message__content"};function Jn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=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("",!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(a,{class:"cdx-message__icon--vue",icon:e.computedIcon},null,8,["icon"]),t.createElementVNode("div",Zn,[t.renderSlot(e.$slots,"default")]),e.userDismissable?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-message__dismiss-button",weight:"quiet",type:"button","aria-label":e.dismissButtonLabel,onClick:n[0]||(n[0]=o=>e.onDismiss("user-dismissed"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconClose,"icon-label":e.dismissButtonLabel},null,8,["icon","icon-label"])]),_:1},8,["aria-label"])):t.createCommentVNode("",!0)],10,Gn))]),_:3},8,["appear","leave-active-class"])}const Xn=N(Qn,[["render",Jn]]),Yn=t.defineComponent({name:"CdxRadio",props:{modelValue:{type:[String,Number,Boolean],default:""},inputValue:{type:[String,Number,Boolean],default:!1},name:{type:String,default:""},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.computed(()=>({"cdx-radio--inline":e.inline})),i=t.ref(),s=v("radio"),r=()=>{i.value.focus()},a=P(t.toRef(e,"modelValue"),n);return{rootClasses:l,input:i,radioId:s,focusInput:r,wrappedModel:a}}}),Cl="",eo=["id","name","value","disabled"],to=t.createElementVNode("span",{class:"cdx-radio__icon"},null,-1),no=["for"];function oo(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-radio",e.rootClasses])},[t.withDirectives(t.createElementVNode("input",{id:e.radioId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-radio__input",type:"radio",name:e.name,value:e.inputValue,disabled:e.disabled},null,8,eo),[[t.vModelRadio,e.wrappedModel]]),to,t.createElementVNode("label",{class:"cdx-radio__label",for:e.radioId,onClick:n[1]||(n[1]=(...a)=>e.focusInput&&e.focusInput(...a))},[t.renderSlot(e.$slots,"default")],8,no)],2)}const lo=N(Yn,[["render",oo]]),ao=B(ne),so=t.defineComponent({name:"CdxSearchInput",components:{CdxButton:Q,CdxTextInput:le},inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},buttonLabel:{type:String,default:""},status:{type:String,default:"default",validator:ao}},emits:["update:modelValue","submit-click"],setup(e,{emit:n,attrs:l}){const i=P(t.toRef(e,"modelValue"),n),s=t.computed(()=>({"cdx-search-input--has-end-button":!!e.buttonLabel})),{rootClasses:r,rootStyle:a,otherAttrs:d}=U(l,s);return{wrappedModel:i,rootClasses:r,rootStyle:a,otherAttrs:d,handleSubmit:()=>{n("submit-click",i.value)},searchIcon:mt}},methods:{focus(){this.$refs.textInput.focus()}}}),kl="",io={class:"cdx-search-input__input-wrapper"};function ro(e,n,l,i,s,r){const a=t.resolveComponent("cdx-text-input"),d=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",io,[t.createVNode(a,t.mergeProps({ref:"textInput",modelValue:e.wrappedModel,"onUpdate:modelValue":n[0]||(n[0]=o=>e.wrappedModel=o),class:"cdx-search-input__text-input","input-type":"search","start-icon":e.searchIcon,status:e.status},e.otherAttrs,{onKeydown:t.withKeys(e.handleSubmit,["enter"])}),null,16,["modelValue","start-icon","status","onKeydown"]),t.renderSlot(e.$slots,"default")]),e.buttonLabel?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-search-input__end-button",onClick:e.handleSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.buttonLabel),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)],6)}const De=N(so,[["render",ro]]),be=t.defineComponent({name:"CdxSelect",components:{CdxIcon:D,CdxMenu:X},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}},emits:["update:selected","load-more"],setup(e,{emit:n}){const l=t.ref(),i=t.ref(),s=v("select-handle"),r=v("select-menu"),a=t.ref(!1),d=P(t.toRef(e,"selected"),n,"update:selected"),o=t.computed(()=>e.menuItems.find(S=>S.value===e.selected)),u=t.computed(()=>o.value?o.value.label||o.value.value:e.defaultLabel),c=ae(l),g=t.computed(()=>{var S;return`${(S=c.value.width)!=null?S:0}px`}),b=t.computed(()=>{if(e.defaultIcon&&!o.value)return e.defaultIcon;if(o.value&&o.value.icon)return o.value.icon}),I=t.computed(()=>({"cdx-select-vue--enabled":!e.disabled,"cdx-select-vue--disabled":e.disabled,"cdx-select-vue--expanded":a.value,"cdx-select-vue--value-selected":!!o.value,"cdx-select-vue--no-selections":!o.value,"cdx-select-vue--has-start-icon":!!b.value})),_=t.computed(()=>{var S,V;return(V=(S=i.value)==null?void 0:S.getHighlightedMenuItem())==null?void 0:V.id});function E(){a.value=!1}function C(){var S;e.disabled||(a.value=!a.value,(S=l.value)==null||S.focus())}function w(S){var V;e.disabled||(V=i.value)==null||V.delegateKeyNavigation(S)}return{handle:l,handleId:s,menu:i,menuId:r,modelWrapper:d,selectedMenuItem:o,highlightedId:_,expanded:a,onBlur:E,currentLabel:u,currentWidthInPx:g,rootClasses:I,onClick:C,onKeydown:w,startIcon:b,cdxIconExpand:Be}}}),ze=()=>{t.useCssVars(e=>({46589886:e.currentWidthInPx}))},Re=be.setup;be.setup=Re?(e,n)=>(ze(),Re(e,n)):ze;const _l="",co=["aria-disabled"],uo=["aria-owns","aria-labelledby","aria-activedescendant","aria-expanded"],po=["id"];function mo(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-select-vue",e.rootClasses]),"aria-disabled":e.disabled},[t.createElementVNode("div",{ref:"handle",class:"cdx-select-vue__handle",tabindex:"0",role:"combobox","aria-autocomplete":"list","aria-owns":e.menuId,"aria-labelledby":e.handleId,"aria-activedescendant":e.highlightedId,"aria-haspopup":"listbox","aria-expanded":e.expanded,onClick:n[0]||(n[0]=(...o)=>e.onClick&&e.onClick(...o)),onBlur:n[1]||(n[1]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[2]||(n[2]=(...o)=>e.onKeydown&&e.onKeydown(...o))},[t.createElementVNode("span",{id:e.handleId,role:"textbox","aria-readonly":"true"},[t.renderSlot(e.$slots,"label",{selectedMenuItem:e.selectedMenuItem,defaultLabel:e.defaultLabel},()=>[t.createTextVNode(t.toDisplayString(e.currentLabel),1)])],8,po),e.startIcon?(t.openBlock(),t.createBlock(a,{key:0,icon:e.startIcon,class:"cdx-select-vue__start-icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createVNode(a,{icon:e.cdxIconExpand,class:"cdx-select-vue__indicator"},null,8,["icon"])],40,uo),t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[3]||(n[3]=o=>e.modelWrapper=o),expanded:e.expanded,"onUpdate:expanded":n[4]||(n[4]=o=>e.expanded=o),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[5]||(n[5]=o=>e.$emit("load-more"))}),{default:t.withCtx(({menuItem:o})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:o})]),_:3},16,["id","selected","expanded","menu-items"])],10,co)}const fo=N(be,[["render",mo]]),ho=t.defineComponent({name:"CdxTab",props:{name:{type:String,required:!0},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},setup(e){const n=t.inject(ye),l=t.inject(Ce);if(!n||!l)throw new Error("Tab component must be used inside a Tabs component");const i=n.value.get(e.name)||{},s=t.computed(()=>e.name===l.value);return{tab:i,isActive:s}}}),$l="",bo=["id","aria-hidden","aria-labelledby"];function go(e,n,l,i,s,r){return t.withDirectives((t.openBlock(),t.createElementBlock("section",{id:e.tab.id,"aria-hidden":!e.isActive,"aria-labelledby":`${e.tab.id}-label`,class:"cdx-tab",role:"tabpanel",tabindex:"-1"},[t.renderSlot(e.$slots,"default")],8,bo)),[[t.vShow,e.isActive]])}const yo=N(ho,[["render",go]]),Co=t.defineComponent({name:"CdxTabs",components:{CdxButton:Q,CdxIcon:D},props:{active:{type:String,required:!0},framed:{type:Boolean,default:!1}},emits:["update:active"],expose:["select","next","prev"],setup(e,{slots:n,emit:l}){const i=t.ref(),s=t.ref(),r=t.ref(),a=t.ref(),d=t.ref(),o=ce(i),u=t.computed(()=>{var T;const h=[],m=(T=n.default)==null?void 0:T.call(n);m&&m.forEach($);function $(x){x&&typeof x=="object"&&"type"in x&&(typeof x.type=="object"&&"name"in x.type&&x.type.name==="CdxTab"?h.push(x):"children"in x&&Array.isArray(x.children)&&x.children.forEach($))}return h});if(!u.value||u.value.length===0)throw new Error("Slot content cannot be empty");const c=t.computed(()=>u.value.reduce((h,m)=>{var $;if(($=m.props)!=null&&$.name&&typeof m.props.name=="string"){if(h.get(m.props.name))throw new Error("Tab names must be unique");h.set(m.props.name,{name:m.props.name,id:v(m.props.name),label:m.props.label||m.props.name,disabled:m.props.disabled})}return h},new Map)),g=P(t.toRef(e,"active"),l,"update:active"),b=t.computed(()=>Array.from(c.value.keys())),I=t.computed(()=>b.value.indexOf(g.value)),_=t.computed(()=>{var h;return(h=c.value.get(g.value))==null?void 0:h.id});t.provide(Ce,g),t.provide(ye,c);const E=t.ref(),C=t.ref(),w=oe(E,{threshold:.95}),S=oe(C,{threshold:.95});function V(h,m){const $=h;$&&(m===0?E.value=$:m===b.value.length-1&&(C.value=$))}function H(h){var T;const m=h===g.value,$=!!((T=c.value.get(h))!=null&&T.disabled);return{"cdx-tabs__list__item--selected":m,"cdx-tabs__list__item--enabled":!$,"cdx-tabs__list__item--disabled":$}}const R=t.computed(()=>({"cdx-tabs--framed":e.framed,"cdx-tabs--quiet":!e.framed}));function A(h){if(!s.value||!a.value||!d.value)return 0;const m=o.value==="rtl"?d.value:a.value,$=o.value==="rtl"?a.value:d.value,T=h.offsetLeft,x=T+h.clientWidth,F=s.value.scrollLeft+m.clientWidth,Z=s.value.scrollLeft+s.value.clientWidth-$.clientWidth;return T<F?T-F:x>Z?x-Z:0}function O(h){var x;if(!s.value||!a.value||!d.value)return;const m=h==="next"&&o.value==="ltr"||h==="prev"&&o.value==="rtl"?1:-1;let $=0,T=h==="next"?s.value.firstElementChild:s.value.lastElementChild;for(;T;){const F=h==="next"?T.nextElementSibling:T.previousElementSibling;if($=A(T),Math.sign($)===m){F&&Math.abs($)<.25*s.value.clientWidth&&($=A(F));break}T=F}s.value.scrollBy({left:$,behavior:"smooth"}),(x=r.value)==null||x.focus()}return t.watch(g,()=>{if(_.value===void 0||!s.value||!a.value||!d.value)return;const h=document.getElementById(`${_.value}-label`);h&&s.value.scrollBy({left:A(h),behavior:"smooth"})}),{activeTab:g,activeTabIndex:I,activeTabId:_,currentDirection:o,rootElement:i,listElement:s,focusHolder:r,prevScroller:a,nextScroller:d,rootClasses:R,tabNames:b,tabsData:c,firstLabelVisible:w,lastLabelVisible:S,getLabelClasses:H,assignTemplateRefIfNecessary:V,scrollTabs:O,cdxIconPrevious:pt,cdxIconNext:ut}},methods:{select(e){const n=this.tabsData.get(e);n&&!(n!=null&&n.disabled)&&(this.activeTab=e)},selectNonDisabled(e,n){const l=this.tabsData.get(this.tabNames[e+n]);l&&(l.disabled?this.selectNonDisabled(e+n,n):this.select(l.name))},next(){this.selectNonDisabled(this.activeTabIndex,1)},prev(){this.selectNonDisabled(this.activeTabIndex,-1)},onLeftArrowKeypress(){this.currentDirection==="rtl"?this.next():this.prev()},onRightArrowKeypress(){this.currentDirection==="rtl"?this.prev():this.next()},onDownArrowKeypress(){var e;this.activeTabId&&((e=document.getElementById(this.activeTabId))==null||e.focus())}}}),Bl="",ko={ref:"focusHolder",tabindex:"-1"},_o={ref:"prevScroller",class:"cdx-tabs__prev-scroller"},$o=["aria-activedescendant"],Bo=["id"],wo=["href","aria-disabled","aria-selected","onClick","onKeyup"],So={ref:"nextScroller",class:"cdx-tabs__next-scroller"},Io={class:"cdx-tabs__content"};function Vo(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{ref:"rootElement",class:t.normalizeClass(["cdx-tabs",e.rootClasses])},[t.createElementVNode("div",{class:"cdx-tabs__header",tabindex:"0",onKeydown:[n[4]||(n[4]=t.withKeys(t.withModifiers((...o)=>e.onRightArrowKeypress&&e.onRightArrowKeypress(...o),["prevent"]),["right"])),n[5]||(n[5]=t.withKeys(t.withModifiers((...o)=>e.onDownArrowKeypress&&e.onDownArrowKeypress(...o),["prevent"]),["down"])),n[6]||(n[6]=t.withKeys(t.withModifiers((...o)=>e.onLeftArrowKeypress&&e.onLeftArrowKeypress(...o),["prevent"]),["left"]))]},[t.createElementVNode("div",ko,null,512),t.withDirectives(t.createElementVNode("div",_o,[t.createVNode(d,{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]=o=>e.scrollTabs("prev"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconPrevious},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.firstLabelVisible]]),t.createElementVNode("ul",{ref:"listElement",class:"cdx-tabs__list",role:"tablist","aria-activedescendant":e.activeTabId},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabsData.values(),(o,u)=>(t.openBlock(),t.createElementBlock("li",{id:`${o.id}-label`,key:u,ref_for:!0,ref:c=>e.assignTemplateRefIfNecessary(c,u),class:t.normalizeClass([e.getLabelClasses(o.name),"cdx-tabs__list__item"]),role:"presentation"},[t.createElementVNode("a",{href:`#${o.id}`,role:"tab",tabIndex:"-1","aria-disabled":o.disabled,"aria-selected":o.name===e.activeTab,onClick:t.withModifiers(c=>e.select(o.name),["prevent"]),onKeyup:t.withKeys(c=>e.select(o.name),["enter"])},t.toDisplayString(o.label),41,wo)],10,Bo))),128))],8,$o),t.withDirectives(t.createElementVNode("div",So,[t.createVNode(d,{class:"cdx-tabs__scroll-button",weight:"quiet",type:"button",tabindex:"-1","aria-hidden":!0,onMousedown:n[2]||(n[2]=t.withModifiers(()=>{},["prevent"])),onClick:n[3]||(n[3]=o=>e.scrollTabs("next"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconNext},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.lastLabelVisible]])],32),t.createElementVNode("div",Io,[t.renderSlot(e.$slots,"default")])],2)}const xo=N(Co,[["render",Vo]]),No=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}){const l=t.ref(!1);return{rootClasses: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--is-active":l.value})),onClick:()=>{n("update:modelValue",!e.modelValue)},setActive:a=>{l.value=a}}}}),wl="",Eo=["aria-pressed","disabled"];function Mo(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-toggle-button",e.rootClasses]),"aria-pressed":e.modelValue,disabled:e.disabled,onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a)),onKeydown:n[1]||(n[1]=t.withKeys(a=>e.setActive(!0),["space","enter"])),onKeyup:n[2]||(n[2]=t.withKeys(a=>e.setActive(!1),["space","enter"]))},[t.renderSlot(e.$slots,"default")],42,Eo)}const ve=N(No,[["render",Mo]]),To=t.defineComponent({name:"CdxToggleButtonGroup",components:{CdxIcon:D,CdxToggleButton:ve},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}){function l(s){return Array.isArray(e.modelValue)?e.modelValue.indexOf(s.value)!==-1:e.modelValue!==null?e.modelValue===s.value:!1}function i(s,r){if(Array.isArray(e.modelValue)){const a=e.modelValue.indexOf(s.value)!==-1;r&&!a?n("update:modelValue",e.modelValue.concat(s.value)):!r&&a&&n("update:modelValue",e.modelValue.filter(d=>d!==s.value))}else r&&e.modelValue!==s.value&&n("update:modelValue",s.value)}return{getButtonLabel:Ie,isSelected:l,onUpdate:i}}}),Sl="",Lo={class:"cdx-toggle-button-group"};function Ao(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-toggle-button");return t.openBlock(),t.createElementBlock("div",Lo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.buttons,o=>(t.openBlock(),t.createBlock(d,{key:o.value,"model-value":e.isSelected(o),disabled:o.disabled||e.disabled,"aria-label":o.ariaLabel,"onUpdate:modelValue":u=>e.onUpdate(o,u)},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{button:o,selected:e.isSelected(o)},()=>[o.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:o.icon},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.getButtonLabel(o)),1)])]),_:2},1032,["model-value","disabled","aria-label","onUpdate:modelValue"]))),128))])}const Ko=N(To,[["render",Ao]]),Do=t.defineComponent({name:"CdxToggleSwitch",inheritAttrs:!1,props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{attrs:n,emit:l}){const i=t.ref(),s=v("toggle-switch"),{rootClasses:r,rootStyle:a,otherAttrs:d}=U(n),o=P(t.toRef(e,"modelValue"),l);return{input:i,inputId:s,rootClasses:r,rootStyle:a,otherAttrs:d,wrappedModel:o,clickInput:()=>{i.value.click()}}}}),Il="",zo=["id","disabled"],Ro=["for"],vo=t.createElementVNode("span",{class:"cdx-toggle-switch__switch"},[t.createElementVNode("span",{class:"cdx-toggle-switch__switch__grip"})],-1);function Oo(e,n,l,i,s,r){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]=a=>e.wrappedModel=a),class:"cdx-toggle-switch__input",type:"checkbox",disabled:e.disabled},e.otherAttrs,{onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers((...a)=>e.clickInput&&e.clickInput(...a),["prevent"]),["enter"]))}),null,16,zo),[[t.vModelCheckbox,e.wrappedModel]]),e.$slots.default?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.inputId,class:"cdx-toggle-switch__label"},[t.renderSlot(e.$slots,"default")],8,Ro)):t.createCommentVNode("",!0),vo],6)}const Fo=N(Do,[["render",Oo]]),qo=t.defineComponent({name:"CdxTypeaheadSearch",components:{CdxIcon:D,CdxMenu:X,CdxSearchInput:De},inheritAttrs:!1,props:{id:{type:String,required:!0},formAction:{type:String,required:!0},searchResultsLabel:{type:String,required:!0},searchResults:{type:Array,required:!0},buttonLabel:{type:String,default:""},initialInputValue:{type:String,default:""},searchFooterUrl:{type:String,default:""},debounceInterval:{type:Number,default:Ue},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:l,slots:i}){const{searchResults:s,searchFooterUrl:r,debounceInterval:a}=t.toRefs(e),d=t.ref(),o=t.ref(),u=v("typeahead-search-menu"),c=t.ref(!1),g=t.ref(!1),b=t.ref(!1),I=t.ref(!1),_=t.ref(e.initialInputValue),E=t.ref(""),C=t.computed(()=>{var y,z;return(z=(y=o.value)==null?void 0:y.getHighlightedMenuItem())==null?void 0:z.id}),w=t.ref(null),S=t.computed(()=>({"cdx-typeahead-search__menu-message--has-thumbnail":e.showThumbnail})),V=t.computed(()=>e.searchResults.find(y=>y.value===w.value)),H=t.computed(()=>r.value?{value:G,url:r.value}:void 0),R=t.computed(()=>({"cdx-typeahead-search--show-thumbnail":e.showThumbnail,"cdx-typeahead-search--expanded":c.value,"cdx-typeahead-search--auto-expand-width":e.showThumbnail&&e.autoExpandWidth})),{rootClasses:A,rootStyle:O,otherAttrs:h}=U(n,R);function m(y){return y}const $=t.computed(()=>({visibleItemLimit:e.visibleItemLimit,showThumbnail:e.showThumbnail,boldLabel:!0,hideDescriptionOverflow:!0}));let T,x;function F(y,z=!1){V.value&&V.value.label!==y&&V.value.value!==y&&(w.value=null),x!==void 0&&(clearTimeout(x),x=void 0),y===""?c.value=!1:(g.value=!0,i["search-results-pending"]&&(x=setTimeout(()=>{I.value&&(c.value=!0),b.value=!0},We))),T!==void 0&&(clearTimeout(T),T=void 0);const j=()=>{l("input",y)};z?j():T=setTimeout(()=>{j()},a.value)}function Z(y){if(y===G){w.value=null,_.value=E.value;return}w.value=y,y!==null&&(_.value=V.value?V.value.label||String(V.value.value):"")}function f(){I.value=!0,(E.value||b.value)&&(c.value=!0)}function k(){I.value=!1,c.value=!1}function M(y){const Oe=y,{id:z}=Oe,j=ie(Oe,["id"]);if(j.value===G){l("search-result-click",{searchResult:null,index:s.value.length,numberOfResults:s.value.length});return}L(j)}function L(y){const z={searchResult:y,index:s.value.findIndex(j=>j.value===y.value),numberOfResults:s.value.length};l("search-result-click",z)}function Y(y){if(y.value===G){_.value=E.value;return}_.value=y.value?y.label||String(y.value):""}function W(y){var z;c.value=!1,(z=o.value)==null||z.clearActive(),M(y)}function Jo(y){if(V.value)L(V.value),y.stopPropagation(),window.location.assign(V.value.url),y.preventDefault();else{const z={searchResult:null,index:-1,numberOfResults:s.value.length};l("submit",z)}}function Xo(y){if(!o.value||!E.value||y.key===" ")return;const z=o.value.getHighlightedMenuItem(),j=o.value.getHighlightedViaKeyboard();switch(y.key){case"Enter":z&&(z.value===G&&j?window.location.assign(r.value):o.value.delegateKeyNavigation(y,!1)),c.value=!1;break;case"Tab":c.value=!1;break;default:o.value.delegateKeyNavigation(y);break}}return t.onMounted(()=>{e.initialInputValue&&F(e.initialInputValue,!0)}),t.watch(t.toRef(e,"searchResults"),()=>{E.value=_.value.trim(),I.value&&g.value&&E.value.length>0&&(c.value=!0),x!==void 0&&(clearTimeout(x),x=void 0),g.value=!1,b.value=!1}),{form:d,menu:o,menuId:u,highlightedId:C,selection:w,menuMessageClass:S,footer:H,asSearchResult:m,inputValue:_,searchQuery:E,expanded:c,showPending:b,rootClasses:A,rootStyle:O,otherAttrs:h,menuConfig:$,onUpdateInputValue:F,onUpdateMenuSelection:Z,onFocus:f,onBlur:k,onSearchResultClick:M,onSearchResultKeyboardNavigation:Y,onSearchFooterClick:W,onSubmit:Jo,onKeydown:Xo,MenuFooterValue:G,articleIcon:it}},methods:{focus(){this.$refs.searchInput.focus()}}}),Vl="",Po=["id","action"],Ho={class:"cdx-typeahead-search__menu-message__text"},jo={class:"cdx-typeahead-search__menu-message__text"},Uo=["href","onClickCapture"],Wo={class:"cdx-typeahead-search__search-footer__text"},Qo={class:"cdx-typeahead-search__search-footer__query"};function Go(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-menu"),o=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(o,t.mergeProps({ref:"searchInput",modelValue:e.inputValue,"onUpdate:modelValue":n[3]||(n[3]=u=>e.inputValue=u),"button-label":e.buttonLabel},e.otherAttrs,{class:"cdx-typeahead-search__input",name:"search",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-owns":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(d,t.mergeProps({id:e.menuId,ref:"menu",expanded:e.expanded,"onUpdate:expanded":n[0]||(n[0]=u=>e.expanded=u),"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.searchResultsLabel,"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-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",Ho,[t.renderSlot(e.$slots,"search-results-pending")])],2)]),"no-results":t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["cdx-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",jo,[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-typeahead-search__search-footer",{"cdx-typeahead-search__search-footer__active":c}]),href:e.asSearchResult(u).url,onClickCapture:t.withModifiers(g=>e.onSearchFooterClick(e.asSearchResult(u)),["stop"])},[t.createVNode(a,{class:"cdx-typeahead-search__search-footer__icon",icon:e.articleIcon},null,8,["icon"]),t.createElementVNode("span",Wo,[t.renderSlot(e.$slots,"search-footer-text",{searchQuery:e.searchQuery},()=>[t.createElementVNode("strong",Qo,t.toDisplayString(e.searchQuery),1)])])],42,Uo)):t.createCommentVNode("",!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","aria-owns","aria-expanded","aria-activedescendant","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.renderSlot(e.$slots,"default")],40,Po)],6)}const Zo=N(qo,[["render",Go]]);p.CdxButton=Q,p.CdxButtonGroup=Tt,p.CdxCard=Pt,p.CdxCheckbox=Gt,p.CdxCombobox=Ln,p.CdxDialog=Pn,p.CdxIcon=D,p.CdxInfoChip=tn,p.CdxLookup=Un,p.CdxMenu=X,p.CdxMenuItem=Ee,p.CdxMessage=Xn,p.CdxProgressBar=Me,p.CdxRadio=lo,p.CdxSearchInput=De,p.CdxSearchResultTitle=Ne,p.CdxSelect=fo,p.CdxTab=yo,p.CdxTabs=xo,p.CdxTextInput=le,p.CdxThumbnail=pe,p.CdxToggleButton=ve,p.CdxToggleButtonGroup=Ko,p.CdxToggleSwitch=Fo,p.CdxTypeaheadSearch=Zo,p.stringHelpers=on,p.useComputedDirection=ce,p.useComputedLanguage=Se,p.useGeneratedId=v,p.useIntersectionObserver=oe,p.useModelWrapper=P,p.useResizeObserver=ae,p.useSplitAttributes=U,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}); + `));w&&(S=S.reverse());for(const V of S)if(V.focus(),document.activeElement===V)return!0;return!1}return t.watch(t.toRef(e,"open"),k=>{k?(b.value=window.innerWidth-document.documentElement.clientWidth,document.documentElement.style.setProperty("margin-right",`${b.value}px`),document.body.classList.add("cdx-dialog-open"),t.nextTick(()=>{var w;N(s.value)||(w=r.value)==null||w.focus()})):(document.body.classList.remove("cdx-dialog-open"),document.documentElement.style.removeProperty("margin-right"))}),{close:h,cdxIconClose:$e,labelId:l,rootClasses:c,dialogElement:i,focusTrapStart:a,focusTrapEnd:d,focusFirst:I,focusLast:_,dialogBody:s,focusHolder:r,showHeader:o,showFooterActions:u}}}),gl="",Kn=["aria-label","aria-labelledby"],Dn={key:0,class:"cdx-dialog__header__title-group"},zn=["id"],Rn={key:0,class:"cdx-dialog__header__subtitle"},vn={ref:"focusHolder",class:"cdx-dialog-focus-trap",tabindex:"-1"},On={key:0,class:"cdx-dialog__footer__text"},Fn={key:1,class:"cdx-dialog__footer__actions"};function qn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createBlock(t.Transition,{name:"cdx-dialog-fade",appear:""},{default:t.withCtx(()=>[e.open?(t.openBlock(),t.createElementBlock("div",{key:0,class:"cdx-dialog-backdrop",onClick:n[5]||(n[5]=(...o)=>e.close&&e.close(...o)),onKeyup:n[6]||(n[6]=t.withKeys((...o)=>e.close&&e.close(...o),["escape"]))},[t.createElementVNode("div",{ref:"focusTrapStart",tabindex:"0",onFocus:n[0]||(n[0]=(...o)=>e.focusLast&&e.focusLast(...o))},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,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("",!0):(t.openBlock(),t.createElementBlock("div",Dn,[t.createElementVNode("h2",{id:e.labelId,class:"cdx-dialog__header__title"},t.toDisplayString(e.title),9,zn),e.subtitle?(t.openBlock(),t.createElementBlock("p",Rn,t.toDisplayString(e.subtitle),1)):t.createCommentVNode("",!0)])),e.closeButtonLabel?(t.openBlock(),t.createBlock(d,{key:1,class:"cdx-dialog__header__close-button",weight:"quiet",type:"button","aria-label":e.closeButtonLabel,onClick:e.close},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconClose,"icon-label":e.closeButtonLabel},null,8,["icon","icon-label"])]),_:1},8,["aria-label","onClick"])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0),t.createElementVNode("div",vn,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",On,[t.renderSlot(e.$slots,"footer-text")])):t.createCommentVNode("",!0),e.showFooterActions?(t.openBlock(),t.createElementBlock("div",Fn,[e.primaryAction?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-dialog__footer__primary-action",weight:"primary",action:e.primaryAction.actionType,disabled:e.primaryAction.disabled,onClick:n[1]||(n[1]=o=>e.$emit("primary"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.primaryAction.label),1)]),_:1},8,["action","disabled"])):t.createCommentVNode("",!0),e.defaultAction?(t.openBlock(),t.createBlock(d,{key:1,class:"cdx-dialog__footer__default-action",disabled:e.defaultAction.disabled,onClick:n[2]||(n[2]=o=>e.$emit("default"))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.defaultAction.label),1)]),_:1},8,["disabled"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)],16,Kn),t.createElementVNode("div",{ref:"focusTrapEnd",tabindex:"0",onFocus:n[4]||(n[4]=(...o)=>e.focusFirst&&e.focusFirst(...o))},null,544)],32)):t.createCommentVNode("",!0)]),_:3})}const Pn=x(An,[["render",qn]]),Hn=B(te),fe=t.defineComponent({name:"CdxLookup",components:{CdxMenu:J,CdxTextInput:oe},inheritAttrs:!1,props:{selected:{type:[String,Number,null],required:!0},menuItems:{type:Array,required:!0},initialInputValue:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},menuConfig:{type:Object,default:()=>({})},status:{type:String,default:"default",validator:Hn}},emits:["update:selected","input","load-more"],setup:(e,{emit:n,attrs:l,slots:i})=>{const s=t.ref(),r=t.ref(),a=O("lookup-menu"),d=t.ref(!1),o=t.ref(!1),u=t.ref(!1),c=t.toRef(e,"selected"),b=q(c,n,"update:selected"),h=t.computed(()=>e.menuItems.find(m=>m.value===e.selected)),I=t.computed(()=>{var m,T;return(T=(m=r.value)==null?void 0:m.getHighlightedMenuItem())==null?void 0:T.id}),_=t.ref(e.initialInputValue),N=le(s),k=t.computed(()=>{var m;return`${(m=N.value.width)!=null?m:0}px`}),w=t.computed(()=>({"cdx-lookup--disabled":e.disabled,"cdx-lookup--pending":d.value})),{rootClasses:S,rootStyle:V,otherAttrs:P}=j(l,w);function A(m){h.value&&h.value.label!==m&&h.value.value!==m&&(b.value=null),m===""?(o.value=!1,d.value=!1):d.value=!0,n("input",m)}function v(){u.value=!0,_.value!==null&&_.value!==""&&(e.menuItems.length>0||i["no-results"])&&(o.value=!0)}function C(){u.value=!1,o.value=!1}function g(m){!r.value||e.disabled||e.menuItems.length===0&&!i["no-results"]||m.key===" "||r.value.delegateKeyNavigation(m)}return t.watch(c,m=>{if(m!==null){const T=h.value?h.value.label||h.value.value:"";_.value!==T&&(_.value=T,n("input",_.value))}}),t.watch(t.toRef(e,"menuItems"),m=>{u.value&&d.value&&(m.length>0||i["no-results"])&&(o.value=!0),m.length===0&&!i["no-results"]&&(o.value=!1),d.value=!1}),{rootElement:s,currentWidthInPx:k,menu:r,menuId:a,highlightedId:I,inputValue:_,modelWrapper:b,expanded:o,onInputBlur:C,rootClasses:S,rootStyle:V,otherAttrs:P,onUpdateInput:A,onInputFocus:v,onKeydown:g}}}),Ae=()=>{t.useCssVars(e=>({"51c485f8":e.currentWidthInPx}))},Ke=fe.setup;fe.setup=Ke?(e,n)=>(Ae(),Ke(e,n)):Ae;const bl="";function jn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-text-input"),d=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(a,t.mergeProps({modelValue:e.inputValue,"onUpdate:modelValue":n[0]||(n[0]=o=>e.inputValue=o)},e.otherAttrs,{class:"cdx-lookup__input",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-controls":e.menuId,"aria-owns":e.menuId,"aria-expanded":e.expanded,"aria-activedescendant":e.highlightedId,disabled:e.disabled,status:e.status,"onUpdate:modelValue":e.onUpdateInput,onFocus:e.onInputFocus,onBlur:e.onInputBlur,onKeydown:e.onKeydown}),null,16,["modelValue","aria-controls","aria-owns","aria-expanded","aria-activedescendant","disabled","status","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[1]||(n[1]=o=>e.modelWrapper=o),expanded:e.expanded,"onUpdate:expanded":n[2]||(n[2]=o=>e.expanded=o),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[3]||(n[3]=o=>e.$emit("load-more"))}),{default:t.withCtx(({menuItem:o})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:o})]),"no-results":t.withCtx(()=>[t.renderSlot(e.$slots,"no-results")]),_:3},16,["id","selected","expanded","menu-items"])],6)}const Un=x(fe,[["render",jn]]),Wn={notice:ct,error:_e,warning:ke,success:we},Qn=t.defineComponent({name:"CdxMessage",components:{CdxButton:W,CdxIcon:z},props:{type:{type:String,default:"notice",validator:F},inline:{type:Boolean,default:!1},icon:{type:[String,Object],default:null},fadeIn:{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 l=t.ref(!1),i=t.computed(()=>e.inline===!1&&e.dismissButtonLabel.length>0),s=t.computed(()=>e.autoDismiss===!1?!1:e.autoDismiss===!0?4e3:e.autoDismiss),r=t.computed(()=>({"cdx-message--inline":e.inline,"cdx-message--block":!e.inline,"cdx-message--user-dismissable":i.value,[`cdx-message--${e.type}`]:!0})),a=t.computed(()=>e.icon&&e.type==="notice"?e.icon:Wn[e.type]),d=t.ref("");function o(u){l.value||(d.value=u==="user-dismissed"?"cdx-message-leave-active-user":"cdx-message-leave-active-system",l.value=!0,n(u))}return t.onMounted(()=>{s.value&&setTimeout(()=>o("auto-dismissed"),s.value)}),{dismissed:l,userDismissable:i,rootClasses:r,leaveActiveClass:d,computedIcon:a,onDismiss:o,cdxIconClose:$e}}}),yl="",Gn=["aria-live","role"],Zn={class:"cdx-message__content"};function Jn(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=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("",!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(a,{class:"cdx-message__icon--vue",icon:e.computedIcon},null,8,["icon"]),t.createElementVNode("div",Zn,[t.renderSlot(e.$slots,"default")]),e.userDismissable?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-message__dismiss-button",weight:"quiet",type:"button","aria-label":e.dismissButtonLabel,onClick:n[0]||(n[0]=o=>e.onDismiss("user-dismissed"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconClose,"icon-label":e.dismissButtonLabel},null,8,["icon","icon-label"])]),_:1},8,["aria-label"])):t.createCommentVNode("",!0)],10,Gn))]),_:3},8,["appear","leave-active-class"])}const Xn=x(Qn,[["render",Jn]]),Yn=t.defineComponent({name:"CdxRadio",props:{modelValue:{type:[String,Number,Boolean],default:""},inputValue:{type:[String,Number,Boolean],default:!1},name:{type:String,default:""},disabled:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:n}){const l=t.computed(()=>({"cdx-radio--inline":e.inline})),i=t.ref(),s=O("radio"),r=()=>{i.value.focus()},a=q(t.toRef(e,"modelValue"),n);return{rootClasses:l,input:i,radioId:s,focusInput:r,wrappedModel:a}}}),Cl="",eo=["id","name","value","disabled"],to=t.createElementVNode("span",{class:"cdx-radio__icon"},null,-1),no=["for"];function oo(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["cdx-radio",e.rootClasses])},[t.withDirectives(t.createElementVNode("input",{id:e.radioId,ref:"input","onUpdate:modelValue":n[0]||(n[0]=a=>e.wrappedModel=a),class:"cdx-radio__input",type:"radio",name:e.name,value:e.inputValue,disabled:e.disabled},null,8,eo),[[t.vModelRadio,e.wrappedModel]]),to,t.createElementVNode("label",{class:"cdx-radio__label",for:e.radioId,onClick:n[1]||(n[1]=(...a)=>e.focusInput&&e.focusInput(...a))},[t.renderSlot(e.$slots,"default")],8,no)],2)}const lo=x(Yn,[["render",oo]]),ao=B(te),so=t.defineComponent({name:"CdxSearchInput",components:{CdxButton:W,CdxTextInput:oe},inheritAttrs:!1,props:{modelValue:{type:[String,Number],default:""},buttonLabel:{type:String,default:""},status:{type:String,default:"default",validator:ao}},emits:["update:modelValue","submit-click"],setup(e,{emit:n,attrs:l}){const i=q(t.toRef(e,"modelValue"),n),s=t.computed(()=>({"cdx-search-input--has-end-button":!!e.buttonLabel})),{rootClasses:r,rootStyle:a,otherAttrs:d}=j(l,s);return{wrappedModel:i,rootClasses:r,rootStyle:a,otherAttrs:d,handleSubmit:()=>{n("submit-click",i.value)},searchIcon:mt}},methods:{focus(){this.$refs.textInput.focus()}}}),kl="",io={class:"cdx-search-input__input-wrapper"};function ro(e,n,l,i,s,r){const a=t.resolveComponent("cdx-text-input"),d=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",io,[t.createVNode(a,t.mergeProps({ref:"textInput",modelValue:e.wrappedModel,"onUpdate:modelValue":n[0]||(n[0]=o=>e.wrappedModel=o),class:"cdx-search-input__text-input","input-type":"search","start-icon":e.searchIcon,status:e.status},e.otherAttrs,{onKeydown:t.withKeys(e.handleSubmit,["enter"])}),null,16,["modelValue","start-icon","status","onKeydown"]),t.renderSlot(e.$slots,"default")]),e.buttonLabel?(t.openBlock(),t.createBlock(d,{key:0,class:"cdx-search-input__end-button",onClick:e.handleSubmit},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.buttonLabel),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)],6)}const De=x(so,[["render",ro]]),he=t.defineComponent({name:"CdxSelect",components:{CdxIcon:z,CdxMenu:J},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}},emits:["update:selected","load-more"],setup(e,{emit:n}){const l=t.ref(),i=t.ref(),s=O("select-handle"),r=O("select-menu"),a=t.ref(!1),d=q(t.toRef(e,"selected"),n,"update:selected"),o=t.computed(()=>e.menuItems.find(S=>S.value===e.selected)),u=t.computed(()=>o.value?o.value.label||o.value.value:e.defaultLabel),c=le(l),b=t.computed(()=>{var S;return`${(S=c.value.width)!=null?S:0}px`}),h=t.computed(()=>{if(e.defaultIcon&&!o.value)return e.defaultIcon;if(o.value&&o.value.icon)return o.value.icon}),I=t.computed(()=>({"cdx-select-vue--enabled":!e.disabled,"cdx-select-vue--disabled":e.disabled,"cdx-select-vue--expanded":a.value,"cdx-select-vue--value-selected":!!o.value,"cdx-select-vue--no-selections":!o.value,"cdx-select-vue--has-start-icon":!!h.value})),_=t.computed(()=>{var S,V;return(V=(S=i.value)==null?void 0:S.getHighlightedMenuItem())==null?void 0:V.id});function N(){a.value=!1}function k(){var S;e.disabled||(a.value=!a.value,(S=l.value)==null||S.focus())}function w(S){var V;e.disabled||(V=i.value)==null||V.delegateKeyNavigation(S)}return{handle:l,handleId:s,menu:i,menuId:r,modelWrapper:d,selectedMenuItem:o,highlightedId:_,expanded:a,onBlur:N,currentLabel:u,currentWidthInPx:b,rootClasses:I,onClick:k,onKeydown:w,startIcon:h,cdxIconExpand:Be}}}),ze=()=>{t.useCssVars(e=>({"79331f78":e.currentWidthInPx}))},Re=he.setup;he.setup=Re?(e,n)=>(ze(),Re(e,n)):ze;const $l="",co=["aria-disabled"],uo=["aria-owns","aria-labelledby","aria-activedescendant","aria-expanded"],po=["id"];function mo(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-menu");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cdx-select-vue",e.rootClasses]),"aria-disabled":e.disabled},[t.createElementVNode("div",{ref:"handle",class:"cdx-select-vue__handle",tabindex:"0",role:"combobox","aria-autocomplete":"list","aria-owns":e.menuId,"aria-labelledby":e.handleId,"aria-activedescendant":e.highlightedId,"aria-haspopup":"listbox","aria-expanded":e.expanded,onClick:n[0]||(n[0]=(...o)=>e.onClick&&e.onClick(...o)),onBlur:n[1]||(n[1]=(...o)=>e.onBlur&&e.onBlur(...o)),onKeydown:n[2]||(n[2]=(...o)=>e.onKeydown&&e.onKeydown(...o))},[t.createElementVNode("span",{id:e.handleId,role:"textbox","aria-readonly":"true"},[t.renderSlot(e.$slots,"label",{selectedMenuItem:e.selectedMenuItem,defaultLabel:e.defaultLabel},()=>[t.createTextVNode(t.toDisplayString(e.currentLabel),1)])],8,po),e.startIcon?(t.openBlock(),t.createBlock(a,{key:0,icon:e.startIcon,class:"cdx-select-vue__start-icon"},null,8,["icon"])):t.createCommentVNode("",!0),t.createVNode(a,{icon:e.cdxIconExpand,class:"cdx-select-vue__indicator"},null,8,["icon"])],40,uo),t.createVNode(d,t.mergeProps({id:e.menuId,ref:"menu",selected:e.modelWrapper,"onUpdate:selected":n[3]||(n[3]=o=>e.modelWrapper=o),expanded:e.expanded,"onUpdate:expanded":n[4]||(n[4]=o=>e.expanded=o),"menu-items":e.menuItems},e.menuConfig,{onLoadMore:n[5]||(n[5]=o=>e.$emit("load-more"))}),{default:t.withCtx(({menuItem:o})=>[t.renderSlot(e.$slots,"menu-item",{menuItem:o})]),_:3},16,["id","selected","expanded","menu-items"])],10,co)}const fo=x(he,[["render",mo]]),ho=t.defineComponent({name:"CdxTab",props:{name:{type:String,required:!0},label:{type:String,default:""},disabled:{type:Boolean,default:!1}},setup(e){const n=t.inject(ye),l=t.inject(Ce);if(!n||!l)throw new Error("Tab component must be used inside a Tabs component");const i=n.value.get(e.name)||{},s=t.computed(()=>e.name===l.value);return{tab:i,isActive:s}}}),_l="",go=["id","aria-hidden","aria-labelledby"];function bo(e,n,l,i,s,r){return t.withDirectives((t.openBlock(),t.createElementBlock("section",{id:e.tab.id,"aria-hidden":!e.isActive,"aria-labelledby":`${e.tab.id}-label`,class:"cdx-tab",role:"tabpanel",tabindex:"-1"},[t.renderSlot(e.$slots,"default")],8,go)),[[t.vShow,e.isActive]])}const yo=x(ho,[["render",bo]]),Co=t.defineComponent({name:"CdxTabs",components:{CdxButton:W,CdxIcon:z},props:{active:{type:String,required:!0},framed:{type:Boolean,default:!1}},emits:["update:active"],expose:["select","next","prev"],setup(e,{slots:n,emit:l}){const i=t.ref(),s=t.ref(),r=t.ref(),a=t.ref(),d=t.ref(),o=de(i),u=t.computed(()=>{var T;const C=[],g=(T=n.default)==null?void 0:T.call(n);g&&g.forEach(m);function m(E){E&&typeof E=="object"&&"type"in E&&(typeof E.type=="object"&&"name"in E.type&&E.type.name==="CdxTab"?C.push(E):"children"in E&&Array.isArray(E.children)&&E.children.forEach(m))}return C});if(!u.value||u.value.length===0)throw new Error("Slot content cannot be empty");const c=t.computed(()=>u.value.reduce((C,g)=>{var m;if((m=g.props)!=null&&m.name&&typeof g.props.name=="string"){if(C.get(g.props.name))throw new Error("Tab names must be unique");C.set(g.props.name,{name:g.props.name,id:O(g.props.name),label:g.props.label||g.props.name,disabled:g.props.disabled})}return C},new Map)),b=q(t.toRef(e,"active"),l,"update:active"),h=t.computed(()=>Array.from(c.value.keys())),I=t.computed(()=>h.value.indexOf(b.value)),_=t.computed(()=>{var C;return(C=c.value.get(b.value))==null?void 0:C.id});t.provide(Ce,b),t.provide(ye,c);const N=t.ref(),k=t.ref(),w=ne(N,{threshold:.95}),S=ne(k,{threshold:.95});function V(C,g){const m=C;m&&(g===0?N.value=m:g===h.value.length-1&&(k.value=m))}const P=t.computed(()=>({"cdx-tabs--framed":e.framed,"cdx-tabs--quiet":!e.framed}));function A(C){if(!s.value||!a.value||!d.value)return 0;const g=o.value==="rtl"?d.value:a.value,m=o.value==="rtl"?a.value:d.value,T=C.offsetLeft,E=T+C.clientWidth,K=s.value.scrollLeft+g.clientWidth,Q=s.value.scrollLeft+s.value.clientWidth-m.clientWidth;return T<K?T-K:E>Q?E-Q:0}function v(C){var E;if(!s.value||!a.value||!d.value)return;const g=C==="next"&&o.value==="ltr"||C==="prev"&&o.value==="rtl"?1:-1;let m=0,T=C==="next"?s.value.firstElementChild:s.value.lastElementChild;for(;T;){const K=C==="next"?T.nextElementSibling:T.previousElementSibling;if(m=A(T),Math.sign(m)===g){K&&Math.abs(m)<.25*s.value.clientWidth&&(m=A(K));break}T=K}s.value.scrollBy({left:m,behavior:"smooth"}),(E=r.value)==null||E.focus()}return t.watch(b,()=>{if(_.value===void 0||!s.value||!a.value||!d.value)return;const C=document.getElementById(`${_.value}-label`);C&&s.value.scrollBy({left:A(C),behavior:"smooth"})}),{activeTab:b,activeTabIndex:I,activeTabId:_,currentDirection:o,rootElement:i,listElement:s,focusHolder:r,prevScroller:a,nextScroller:d,rootClasses:P,tabNames:h,tabsData:c,firstLabelVisible:w,lastLabelVisible:S,assignTemplateRefIfNecessary:V,scrollTabs:v,cdxIconPrevious:pt,cdxIconNext:ut}},methods:{select(e){const n=this.tabsData.get(e);n&&!(n!=null&&n.disabled)&&(this.activeTab=e)},selectNonDisabled(e,n){const l=this.tabsData.get(this.tabNames[e+n]);l&&(l.disabled?this.selectNonDisabled(e+n,n):this.select(l.name))},next(){this.selectNonDisabled(this.activeTabIndex,1)},prev(){this.selectNonDisabled(this.activeTabIndex,-1)},onLeftArrowKeypress(){this.currentDirection==="rtl"?this.next():this.prev()},onRightArrowKeypress(){this.currentDirection==="rtl"?this.prev():this.next()},onDownArrowKeypress(){var e;this.activeTabId&&((e=document.getElementById(this.activeTabId))==null||e.focus())}}}),Bl="",ko={ref:"focusHolder",tabindex:"-1"},$o={ref:"prevScroller",class:"cdx-tabs__prev-scroller"},_o=["aria-activedescendant"],Bo=["id"],wo=["href","aria-disabled","aria-selected","onClick","onKeyup"],So={ref:"nextScroller",class:"cdx-tabs__next-scroller"},Io={class:"cdx-tabs__content"};function Vo(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-button");return t.openBlock(),t.createElementBlock("div",{ref:"rootElement",class:t.normalizeClass(["cdx-tabs",e.rootClasses])},[t.createElementVNode("div",{class:"cdx-tabs__header",tabindex:"0",onKeydown:[n[4]||(n[4]=t.withKeys(t.withModifiers((...o)=>e.onRightArrowKeypress&&e.onRightArrowKeypress(...o),["prevent"]),["right"])),n[5]||(n[5]=t.withKeys(t.withModifiers((...o)=>e.onDownArrowKeypress&&e.onDownArrowKeypress(...o),["prevent"]),["down"])),n[6]||(n[6]=t.withKeys(t.withModifiers((...o)=>e.onLeftArrowKeypress&&e.onLeftArrowKeypress(...o),["prevent"]),["left"]))]},[t.createElementVNode("div",ko,null,512),t.withDirectives(t.createElementVNode("div",$o,[t.createVNode(d,{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]=o=>e.scrollTabs("prev"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconPrevious},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.firstLabelVisible]]),t.createElementVNode("ul",{ref:"listElement",class:"cdx-tabs__list",role:"tablist","aria-activedescendant":e.activeTabId},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tabsData.values(),(o,u)=>(t.openBlock(),t.createElementBlock("li",{id:`${o.id}-label`,key:u,ref_for:!0,ref:c=>e.assignTemplateRefIfNecessary(c,u),class:"cdx-tabs__list__item",role:"presentation"},[t.createElementVNode("a",{href:`#${o.id}`,role:"tab",tabIndex:"-1","aria-disabled":o.disabled,"aria-selected":o.name===e.activeTab,onClick:t.withModifiers(c=>e.select(o.name),["prevent"]),onKeyup:t.withKeys(c=>e.select(o.name),["enter"])},t.toDisplayString(o.label),41,wo)],8,Bo))),128))],8,_o),t.withDirectives(t.createElementVNode("div",So,[t.createVNode(d,{class:"cdx-tabs__scroll-button",weight:"quiet",type:"button",tabindex:"-1","aria-hidden":!0,onMousedown:n[2]||(n[2]=t.withModifiers(()=>{},["prevent"])),onClick:n[3]||(n[3]=o=>e.scrollTabs("next"))},{default:t.withCtx(()=>[t.createVNode(a,{icon:e.cdxIconNext},null,8,["icon"])]),_:1})],512),[[t.vShow,!e.lastLabelVisible]])],32),t.createElementVNode("div",Io,[t.renderSlot(e.$slots,"default")])],2)}const xo=x(Co,[["render",Vo]]),No=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}){const l=t.ref(!1);return{rootClasses: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--is-active":l.value})),onClick:()=>{n("update:modelValue",!e.modelValue)},setActive:a=>{l.value=a}}}}),wl="",Eo=["aria-pressed","disabled"];function Mo(e,n,l,i,s,r){return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["cdx-toggle-button",e.rootClasses]),"aria-pressed":e.modelValue,disabled:e.disabled,onClick:n[0]||(n[0]=(...a)=>e.onClick&&e.onClick(...a)),onKeydown:n[1]||(n[1]=t.withKeys(a=>e.setActive(!0),["space","enter"])),onKeyup:n[2]||(n[2]=t.withKeys(a=>e.setActive(!1),["space","enter"]))},[t.renderSlot(e.$slots,"default")],42,Eo)}const ve=x(No,[["render",Mo]]),To=t.defineComponent({name:"CdxToggleButtonGroup",components:{CdxIcon:z,CdxToggleButton:ve},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}){function l(s){return Array.isArray(e.modelValue)?e.modelValue.indexOf(s.value)!==-1:e.modelValue!==null?e.modelValue===s.value:!1}function i(s,r){if(Array.isArray(e.modelValue)){const a=e.modelValue.indexOf(s.value)!==-1;r&&!a?n("update:modelValue",e.modelValue.concat(s.value)):!r&&a&&n("update:modelValue",e.modelValue.filter(d=>d!==s.value))}else r&&e.modelValue!==s.value&&n("update:modelValue",s.value)}return{getButtonLabel:Ie,isSelected:l,onUpdate:i}}}),Sl="",Lo={class:"cdx-toggle-button-group"};function Ao(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-toggle-button");return t.openBlock(),t.createElementBlock("div",Lo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.buttons,o=>(t.openBlock(),t.createBlock(d,{key:o.value,"model-value":e.isSelected(o),disabled:o.disabled||e.disabled,"aria-label":o.ariaLabel,"onUpdate:modelValue":u=>e.onUpdate(o,u)},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{button:o,selected:e.isSelected(o)},()=>[o.icon?(t.openBlock(),t.createBlock(a,{key:0,icon:o.icon},null,8,["icon"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.getButtonLabel(o)),1)])]),_:2},1032,["model-value","disabled","aria-label","onUpdate:modelValue"]))),128))])}const Ko=x(To,[["render",Ao]]),Do=t.defineComponent({name:"CdxToggleSwitch",inheritAttrs:!1,props:{modelValue:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{attrs:n,emit:l}){const i=t.ref(),s=O("toggle-switch"),{rootClasses:r,rootStyle:a,otherAttrs:d}=j(n),o=q(t.toRef(e,"modelValue"),l);return{input:i,inputId:s,rootClasses:r,rootStyle:a,otherAttrs:d,wrappedModel:o,clickInput:()=>{i.value.click()}}}}),Il="",zo=["id","disabled"],Ro=["for"],vo=t.createElementVNode("span",{class:"cdx-toggle-switch__switch"},[t.createElementVNode("span",{class:"cdx-toggle-switch__switch__grip"})],-1);function Oo(e,n,l,i,s,r){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]=a=>e.wrappedModel=a),class:"cdx-toggle-switch__input",type:"checkbox",disabled:e.disabled},e.otherAttrs,{onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers((...a)=>e.clickInput&&e.clickInput(...a),["prevent"]),["enter"]))}),null,16,zo),[[t.vModelCheckbox,e.wrappedModel]]),e.$slots.default?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.inputId,class:"cdx-toggle-switch__label"},[t.renderSlot(e.$slots,"default")],8,Ro)):t.createCommentVNode("",!0),vo],6)}const Fo=x(Do,[["render",Oo]]),qo=t.defineComponent({name:"CdxTypeaheadSearch",components:{CdxIcon:z,CdxMenu:J,CdxSearchInput:De},inheritAttrs:!1,props:{id:{type:String,required:!0},formAction:{type:String,required:!0},searchResultsLabel:{type:String,required:!0},searchResults:{type:Array,required:!0},buttonLabel:{type:String,default:""},initialInputValue:{type:String,default:""},searchFooterUrl:{type:String,default:""},debounceInterval:{type:Number,default:Ue},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:l,slots:i}){const{searchResults:s,searchFooterUrl:r,debounceInterval:a}=t.toRefs(e),d=t.ref(),o=t.ref(),u=O("typeahead-search-menu"),c=t.ref(!1),b=t.ref(!1),h=t.ref(!1),I=t.ref(!1),_=t.ref(e.initialInputValue),N=t.ref(""),k=t.computed(()=>{var y,R;return(R=(y=o.value)==null?void 0:y.getHighlightedMenuItem())==null?void 0:R.id}),w=t.ref(null),S=t.computed(()=>({"cdx-typeahead-search__menu-message--has-thumbnail":e.showThumbnail})),V=t.computed(()=>e.searchResults.find(y=>y.value===w.value)),P=t.computed(()=>r.value?{value:G,url:r.value}:void 0),A=t.computed(()=>({"cdx-typeahead-search--show-thumbnail":e.showThumbnail,"cdx-typeahead-search--expanded":c.value,"cdx-typeahead-search--auto-expand-width":e.showThumbnail&&e.autoExpandWidth})),{rootClasses:v,rootStyle:C,otherAttrs:g}=j(n,A);function m(y){return y}const T=t.computed(()=>({visibleItemLimit:e.visibleItemLimit,showThumbnail:e.showThumbnail,boldLabel:!0,hideDescriptionOverflow:!0}));let E,K;function Q(y,R=!1){V.value&&V.value.label!==y&&V.value.value!==y&&(w.value=null),K!==void 0&&(clearTimeout(K),K=void 0),y===""?c.value=!1:(b.value=!0,i["search-results-pending"]&&(K=setTimeout(()=>{I.value&&(c.value=!0),h.value=!0},We))),E!==void 0&&(clearTimeout(E),E=void 0);const H=()=>{l("input",y)};R?H():E=setTimeout(()=>{H()},a.value)}function ge(y){if(y===G){w.value=null,_.value=N.value;return}w.value=y,y!==null&&(_.value=V.value?V.value.label||String(V.value.value):"")}function f(){I.value=!0,(N.value||h.value)&&(c.value=!0)}function $(){I.value=!1,c.value=!1}function M(y){const Oe=y,{id:R}=Oe,H=se(Oe,["id"]);if(H.value===G){l("search-result-click",{searchResult:null,index:s.value.length,numberOfResults:s.value.length});return}L(H)}function L(y){const R={searchResult:y,index:s.value.findIndex(H=>H.value===y.value),numberOfResults:s.value.length};l("search-result-click",R)}function X(y){if(y.value===G){_.value=N.value;return}_.value=y.value?y.label||String(y.value):""}function U(y){var R;c.value=!1,(R=o.value)==null||R.clearActive(),M(y)}function Jo(y){if(V.value)L(V.value),y.stopPropagation(),window.location.assign(V.value.url),y.preventDefault();else{const R={searchResult:null,index:-1,numberOfResults:s.value.length};l("submit",R)}}function Xo(y){if(!o.value||!N.value||y.key===" ")return;const R=o.value.getHighlightedMenuItem(),H=o.value.getHighlightedViaKeyboard();switch(y.key){case"Enter":R&&(R.value===G&&H?window.location.assign(r.value):o.value.delegateKeyNavigation(y,!1)),c.value=!1;break;case"Tab":c.value=!1;break;default:o.value.delegateKeyNavigation(y);break}}return t.onMounted(()=>{e.initialInputValue&&Q(e.initialInputValue,!0)}),t.watch(t.toRef(e,"searchResults"),()=>{N.value=_.value.trim(),I.value&&b.value&&N.value.length>0&&(c.value=!0),K!==void 0&&(clearTimeout(K),K=void 0),b.value=!1,h.value=!1}),{form:d,menu:o,menuId:u,highlightedId:k,selection:w,menuMessageClass:S,footer:P,asSearchResult:m,inputValue:_,searchQuery:N,expanded:c,showPending:h,rootClasses:v,rootStyle:C,otherAttrs:g,menuConfig:T,onUpdateInputValue:Q,onUpdateMenuSelection:ge,onFocus:f,onBlur:$,onSearchResultClick:M,onSearchResultKeyboardNavigation:X,onSearchFooterClick:U,onSubmit:Jo,onKeydown:Xo,MenuFooterValue:G,articleIcon:it}},methods:{focus(){this.$refs.searchInput.focus()}}}),Vl="",Po=["id","action"],Ho={class:"cdx-typeahead-search__menu-message__text"},jo={class:"cdx-typeahead-search__menu-message__text"},Uo=["href","onClickCapture"],Wo={class:"cdx-typeahead-search__search-footer__text"},Qo={class:"cdx-typeahead-search__search-footer__query"};function Go(e,n,l,i,s,r){const a=t.resolveComponent("cdx-icon"),d=t.resolveComponent("cdx-menu"),o=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(o,t.mergeProps({ref:"searchInput",modelValue:e.inputValue,"onUpdate:modelValue":n[3]||(n[3]=u=>e.inputValue=u),"button-label":e.buttonLabel},e.otherAttrs,{class:"cdx-typeahead-search__input",name:"search",role:"combobox",autocomplete:"off","aria-autocomplete":"list","aria-owns":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(d,t.mergeProps({id:e.menuId,ref:"menu",expanded:e.expanded,"onUpdate:expanded":n[0]||(n[0]=u=>e.expanded=u),"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.searchResultsLabel,"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-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",Ho,[t.renderSlot(e.$slots,"search-results-pending")])],2)]),"no-results":t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["cdx-typeahead-search__menu-message",e.menuMessageClass])},[t.createElementVNode("span",jo,[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-typeahead-search__search-footer",{"cdx-typeahead-search__search-footer__active":c}]),href:e.asSearchResult(u).url,onClickCapture:t.withModifiers(b=>e.onSearchFooterClick(e.asSearchResult(u)),["stop"])},[t.createVNode(a,{class:"cdx-typeahead-search__search-footer__icon",icon:e.articleIcon},null,8,["icon"]),t.createElementVNode("span",Wo,[t.renderSlot(e.$slots,"search-footer-text",{searchQuery:e.searchQuery},()=>[t.createElementVNode("strong",Qo,t.toDisplayString(e.searchQuery),1)])])],42,Uo)):t.createCommentVNode("",!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","aria-owns","aria-expanded","aria-activedescendant","onUpdate:modelValue","onFocus","onBlur","onKeydown"]),t.renderSlot(e.$slots,"default")],40,Po)],6)}const Zo=x(qo,[["render",Go]]);p.CdxButton=W,p.CdxButtonGroup=Tt,p.CdxCard=Pt,p.CdxCheckbox=Gt,p.CdxCombobox=Ln,p.CdxDialog=Pn,p.CdxIcon=z,p.CdxInfoChip=tn,p.CdxLookup=Un,p.CdxMenu=J,p.CdxMenuItem=Ee,p.CdxMessage=Xn,p.CdxProgressBar=Me,p.CdxRadio=lo,p.CdxSearchInput=De,p.CdxSearchResultTitle=Ne,p.CdxSelect=fo,p.CdxTab=yo,p.CdxTabs=xo,p.CdxTextInput=oe,p.CdxThumbnail=ue,p.CdxToggleButton=ve,p.CdxToggleButtonGroup=Ko,p.CdxToggleSwitch=Fo,p.CdxTypeaheadSearch=Zo,p.stringHelpers=on,p.useComputedDirection=de,p.useComputedLanguage=Se,p.useGeneratedId=O,p.useIntersectionObserver=ne,p.useModelWrapper=q,p.useResizeObserver=le,p.useSplitAttributes=j,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}); |