UNPKG

@ownclouders/design-system

Version:

ownCloud Design System is based on VueDesign Systems and is used to design ownCloud UI components

5 lines 127 kB
"use strict";var Io=Object.create;var le=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var Mo=Object.getOwnPropertyNames;var zo=Object.getPrototypeOf,Ao=Object.prototype.hasOwnProperty;var Fo=(e,o,n,a)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of Mo(o))!Ao.call(e,s)&&s!==n&&le(e,s,{get:()=>o[s],enumerable:!(a=Po(o,s))||a.enumerable});return e};var ie=(e,o,n)=>(n=e!=null?Io(zo(e)):{},Fo(o||!e||!e.__esModule?le(n,"default",{value:e,enumerable:!0}):n,e));const p=require("./uniqueId-ettl1pl0.js"),t=require("vue"),dt=require("vue-inline-svg"),_=require("vue3-gettext"),K=require("tippy.js"),Ro=require("@popperjs/core"),Ho=require("deepmerge"),jo=require("lodash-es"),ut=require("focus-trap-vue"),ce=require("luxon"),xo=require("fuse.js"),Ko=require("./index-DgRHrSdS.js");dt.name="inline-svg";const pt=t.defineComponent({name:"OcIcon",status:"ready",release:"1.0.0",components:{InlineSvg:dt},inheritAttrs:!0,props:{name:{type:String,default:"info"},fillType:{type:String,required:!1,default:"fill",validator:e=>["fill","line","none"].includes(e)},accessibleLabel:{type:String,default:""},type:{type:String,default:"span"},size:{type:String,default:"medium",validator:e=>p.AVAILABLE_SIZES.some(o=>o===e)},variation:{type:String,default:"passive",validator:e=>["passive","primary","danger","success","warning","brand","inherit"].includes(e)},color:{type:String,required:!1,default:""}},emits:["loaded"],computed:{svgTitleId(){return p.uniqueId("oc-icon-title-")},nameWithFillType(){const e="icons/",o=this.fillType.toLowerCase();return o==="none"?`${e}${this.name}.svg`:`${e}${this.name}-${o}.svg`}},methods:{sizeClass(e){return this.prefix(p.getSizeClass(e))},variationClass(e){return this.prefix(e)},prefix(e){if(e!==null)return`oc-icon-${e}`},transformSvgElement(e){if(this.accessibleLabel!==""){const o=document.createElement("title");o.setAttribute("id",this.svgTitleId),o.appendChild(document.createTextNode(this.accessibleLabel)),e.insertBefore(o,e.firstChild)}return e}}}),de={},m=(e,o)=>{const n=e.__vccOpts||e;for(const[a,s]of o)n[a]=s;return n};function Go(e,o,n,a,s,r){const l=t.resolveComponent("inline-svg");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.type),{class:t.normalizeClass([{"oc-button-reset":e.type==="button"},"oc-icon",e.sizeClass(e.size),e.variationClass(e.variation)])},{default:t.withCtx(()=>[t.createVNode(l,{src:e.nameWithFillType,"transform-source":e.transformSvgElement,"aria-hidden":e.accessibleLabel===""?"true":null,"aria-labelledby":e.accessibleLabel===""?null:e.svgTitleId,focusable:e.accessibleLabel===""?"false":null,style:t.normalizeStyle(e.color!==""?{fill:e.color}:{}),onLoaded:o[0]||(o[0]=i=>e.$emit("loaded"))},null,8,["src","transform-source","aria-hidden","aria-labelledby","focusable","style"])]),_:1},8,["class"])}typeof de=="function"&&de(pt);const C=m(pt,[["render",Go]]),mt=t.defineComponent({name:"OcApplicationIcon",components:{OcIcon:C},status:"ready",release:"15.0.0",props:{icon:{type:String,required:!0},colorPrimary:{type:String,required:!1,default:""},colorSecondary:{type:String,required:!1,default:""}},setup(e){const o=t.computed(()=>"rgba(255,255,255,0.7)"),n=(c,k)=>`linear-gradient(90deg, ${c} 0%, ${k} 100%)`,a=t.computed(()=>p.getHexFromCssVar(e.colorPrimary)),s=t.computed(()=>p.getHexFromCssVar(e.colorSecondary)),r=t.computed(()=>!!e.colorPrimary),l=t.computed(()=>!!e.colorSecondary),i=t.computed(()=>{const c=p.generateHashedColorForString(e.icon);return p.rgbToHex(p.setDesiredContrastRatio(p.hexToRgb(c),p.hexToRgb("#ffffff"),4))}),u=t.computed(()=>{const c=t.unref(r)?t.unref(a):t.unref(i),k=t.unref(l)?t.unref(s):p.calculateShadeColor(p.hexToRgb(c),40),f=p.calculateShadeColor(p.hexToRgb(c),-25),$=p.calculateShadeColor(p.hexToRgb(c),45);return{background:n(c,k),boxShadow:`inset ${$} 0px 0px 1px 0px,${f} 0px 0px 1px 0px`}});return{iconColor:o,iconStyle:u}}}),ue={};function Uo(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon");return t.openBlock(),t.createElementBlock("div",{class:"oc-application-icon oc-flex-inline oc-flex-middle oc-flex-center",style:t.normalizeStyle(e.iconStyle)},[t.createVNode(l,{name:e.icon,color:e.iconColor,size:"medium"},null,8,["name","color"])],4)}typeof ue=="function"&&ue(mt);const ft=m(mt,[["render",Uo]]),ht=t.defineComponent({name:"OcImg",status:"ready",release:"1.0.0",props:{src:{required:!0,type:String,default:null},alt:{type:String,required:!1,default:""},title:{type:String,required:!1,default:null},loadingType:{type:String,required:!1,default:"eager",validator:e=>["eager","lazy"].includes(e)}},computed:{ariaHidden(){return this.alt.length===0}}}),pe={},Wo=["src","alt","aria-hidden","title","loading"];function Xo(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("img",{src:e.src,alt:e.alt,"aria-hidden":`${e.ariaHidden}`,title:e.title,loading:e.loadingType},null,8,Wo)}typeof pe=="function"&&pe(ht);const M=m(ht,[["render",Xo]]),Qo=e=>e.split(/[ -]/).map(o=>o.replace(/[^\p{L}\p{Nd}]/giu,"")).filter(Boolean).map(o=>o.charAt(0)).slice(0,3).join("").toUpperCase(),gt=t.defineComponent({name:"OcAvatar",status:"ready",release:"1.0.0",components:{OcImg:M},props:{src:{type:String,default:""},userName:{type:String,default:""},accessibleLabel:{type:String,required:!1,default:""},width:{type:Number,required:!1,default:50}},data(){return{backgroundColors:["#b82015","#c21c53","#9C27B0","#673AB7","#3F51B5","#106892","#055c68","#208377","#1a761d","#476e1a","#636d0b","#8e5c11","#795548","#465a64"],imgError:!1}},computed:{background(){return this.isImage?"":this.randomBackgroundColor(this.userName.length,this.backgroundColors)},isImage(){return!this.imgError&&!!this.src},style(){const e={width:`${this.width}px`,height:`${this.width}px`,lineHeight:`${this.width}px`},o={backgroundColor:this.background,fontSize:`${Math.floor(this.width/2.5)}px`,fontFamily:"Helvetica, Arial, sans-serif",color:"white"};return Object.assign(e,o),e},userInitial(){return this.isImage?"":Qo(this.userName)}},methods:{onImgError(){this.imgError=!0},randomBackgroundColor(e,o){return o[e%o.length]}}}),me={},Jo=["width","aria-label","aria-hidden","focusable","role","data-test-user-name"],Yo={key:1,class:"avatarInitials"};function Zo(e,o,n,a,s,r){const l=t.resolveComponent("oc-img");return t.openBlock(),t.createElementBlock("span",{class:"vue-avatar--wrapper oc-avatar",style:t.normalizeStyle(e.style),width:e.width,"aria-label":e.accessibleLabel===""?null:e.accessibleLabel,"aria-hidden":e.accessibleLabel===""?"true":null,focusable:e.accessibleLabel===""?"false":null,role:e.accessibleLabel===""?null:"img","data-test-user-name":e.userName},[e.isImage?(t.openBlock(),t.createBlock(l,{key:0,"loading-type":"lazy",class:"avatarImg",src:e.src,onError:e.onImgError},null,8,["src","onError"])):(t.openBlock(),t.createElementBlock("span",Yo,t.toDisplayString(e.userInitial),1))],12,Jo)}typeof me=="function"&&me(gt);const z=m(gt,[["render",Zo]]),yt=t.defineComponent({name:"OcAvatarCount",status:"ready",release:"2.1.0",props:{count:{type:Number,required:!0},size:{type:Number,required:!1,default:30}},computed:{fontSize(){return Math.floor(this.size/2.5)+"px"}}}),fe={},en=["textContent"];function tn(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("span",{class:"oc-avatar-count",style:t.normalizeStyle({width:e.size+"px",height:e.size+"px",fontSize:e.fontSize}),textContent:t.toDisplayString(`+${e.count}`)},null,12,en)}typeof fe=="function"&&fe(yt);const G=m(yt,[["render",tn]]),bt=t.defineComponent({name:"OcAvatarItem",status:"ready",release:"10.0.0",components:{OcIcon:C},props:{name:{type:String,required:!0},icon:{type:String,required:!1,default:null},iconColor:{type:String,required:!1,default:"var(--oc-color-text-inverse)"},iconFillType:{type:String,required:!1,default:"fill"},iconSize:{type:String,required:!1,default:"small"},background:{type:String,required:!1,default:"var(--oc-color-swatch-passive-default)"},accessibleLabel:{type:String,required:!1,default:""},width:{type:Number,required:!1,default:30}},computed:{avatarWidth(){return this.width+"px"},hasIcon(){return this.icon!==null},backgroundColor(){return this.background||this.pickBackgroundColor},pickBackgroundColor(){const e=["#b82015","#c21c53","#9C27B0","#673AB7","#3F51B5","#106892","#055c68","#208377","#1a761d","#476e1a","#636d0b","#8e5c11","#795548","#465a64"];return e[Math.floor(Math.random()*e.length)]}}}),he={},on=["data-test-item-name","aria-label","aria-hidden","focusable","role"];function nn(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon");return t.openBlock(),t.createElementBlock("div",{"data-test-item-name":e.name,"aria-label":e.accessibleLabel===""?null:e.accessibleLabel,"aria-hidden":e.accessibleLabel===""?"true":null,focusable:e.accessibleLabel===""?"false":null,role:e.accessibleLabel===""?null:"img"},[t.createElementVNode("span",{class:"oc-avatar-item",style:t.normalizeStyle({backgroundColor:e.backgroundColor,"--icon-color":e.iconColor,"--width":e.avatarWidth})},[e.hasIcon?(t.openBlock(),t.createBlock(l,{key:0,name:e.icon,size:e.iconSize,"fill-type":e.iconFillType},null,8,["name","size","fill-type"])):t.createCommentVNode("",!0)],4)],8,on)}typeof he=="function"&&he(bt);const D=m(bt,[["render",nn]]),kt=t.defineComponent({name:"OcAvatarFederated",status:"ready",release:"10.0.0",components:{OcAvatarItem:D},props:{name:{type:String,required:!0},accessibleLabel:{type:String,required:!1,default:""},width:{type:Number,required:!1,default:30},iconSize:{type:String,required:!1,default:"small"}}}),ge={};function an(e,o,n,a,s,r){const l=t.resolveComponent("oc-avatar-item");return t.openBlock(),t.createBlock(l,{width:e.width,"icon-size":e.iconSize,icon:"earth","icon-fill-type":"line","icon-color":"#85C1BA",name:e.name,"accessible-label":e.accessibleLabel},null,8,["width","icon-size","name","accessible-label"])}typeof ge=="function"&&ge(kt);const N=m(kt,[["render",an]]),$t=t.defineComponent({name:"OcAvatarGroup",status:"ready",release:"10.0.0",components:{OcAvatarItem:D},props:{name:{type:String,required:!0},accessibleLabel:{type:String,required:!1,default:""},width:{type:Number,required:!1,default:30},iconSize:{type:String,required:!1,default:"small"}}}),ye={};function rn(e,o,n,a,s,r){const l=t.resolveComponent("oc-avatar-item");return t.openBlock(),t.createBlock(l,{width:e.width,"icon-size":e.iconSize,icon:"group",name:e.name,"accessible-label":e.accessibleLabel},null,8,["width","icon-size","name","accessible-label"])}typeof ye=="function"&&ye($t);const q=m($t,[["render",rn]]),vt=t.defineComponent({name:"OcAvatarGuest",status:"ready",release:"10.0.0",components:{OcAvatarItem:D},props:{name:{type:String,required:!0},accessibleLabel:{type:String,required:!1,default:""},width:{type:Number,required:!1,default:30},iconSize:{type:String,required:!1,default:"small"}}}),be={};function sn(e,o,n,a,s,r){const l=t.resolveComponent("oc-avatar-item");return t.openBlock(),t.createBlock(l,{width:e.width,"icon-size":e.iconSize,icon:"global","icon-fill-type":"line","icon-color":"#D78841",name:e.name,"accessible-label":e.accessibleLabel},null,8,["width","icon-size","name","accessible-label"])}typeof be=="function"&&be(vt);const L=m(vt,[["render",sn]]),Ct=t.defineComponent({name:"OcAvatarLink",status:"ready",release:"2.1.0",components:{OcAvatarItem:D},props:{name:{type:String,required:!0},accessibleLabel:{type:String,required:!1,default:""},width:{type:Number,required:!1,default:30},iconSize:{type:String,required:!1,default:"small"}}}),ke={};function ln(e,o,n,a,s,r){const l=t.resolveComponent("oc-avatar-item");return t.openBlock(),t.createBlock(l,{width:e.width,"icon-size":e.iconSize,icon:"link",name:e.name,"accessible-label":e.accessibleLabel},null,8,["width","icon-size","name","accessible-label"])}typeof ke=="function"&&ke(Ct);const I=m(Ct,[["render",ln]]),E={user:0,group:1,link:3,guest:4,remote:6},wt=t.defineComponent({name:"OcAvatars",status:"ready",release:"2.1.0",components:{OcAvatar:z,OcAvatarCount:G,OcAvatarLink:I,OcAvatarGroup:q,OcAvatarFederated:N,OcAvatarGuest:L},props:{items:{type:Array,required:!0},stacked:{type:Boolean,required:!1,default:!1},isTooltipDisplayed:{type:Boolean,required:!1,default:!1},maxDisplayed:{type:Number,required:!1,default:null},accessibleDescription:{type:String,required:!1,default:null}},computed:{isOverlapping(){return this.maxDisplayed&&this.maxDisplayed<this.items.length},tooltip(){if(this.isTooltipDisplayed){const e=this.avatars.map(n=>n.displayName);this.otherItems.length>0&&e.push(...this.otherItems.map(n=>n.name));let o=e.join(", ");return this.isOverlapping&&(o+=` +${this.items.length-this.maxDisplayed}`),o}return null},avatars(){const e=this.items.filter(o=>o.shareType===E.user);return this.isOverlapping?e.slice(0,this.maxDisplayed):e},otherItems(){const e=this.items.filter(o=>o.shareType!==E.user);return this.isOverlapping?this.maxDisplayed<=this.avatars.length?[]:e.slice(0,this.maxDisplayed-this.avatars.length):e}},methods:{getAvatarComponentForItem(e){switch(e.shareType){case E.link:return I;case E.remote:return N;case E.group:return q;case E.guest:return L}}}}),$e={},cn=["textContent"];function dn(e,o,n,a,s,r){const l=t.resolveComponent("oc-avatar"),i=t.resolveComponent("oc-avatar-count"),u=t.resolveDirective("oc-tooltip");return t.openBlock(),t.createElementBlock("span",null,[t.withDirectives((t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["oc-avatars",{"oc-avatars-stacked":e.stacked}]),"aria-hidden":"true"},[e.avatars.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.avatars,c=>(t.openBlock(),t.createBlock(l,{key:c.username,src:c.avatar,"user-name":c.displayName,width:30},null,8,["src","user-name"]))),128)):t.createCommentVNode("",!0),e.otherItems.length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.otherItems,(c,k)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.getAvatarComponentForItem(c)),{key:c.name+k,name:c.name},null,8,["name"]))),128)):t.createCommentVNode("",!0),e.isOverlapping?(t.openBlock(),t.createBlock(i,{key:2,count:e.items.length-e.maxDisplayed},null,8,["count"])):t.createCommentVNode("",!0)],2)),[[u,e.tooltip]]),e.accessibleDescription?(t.openBlock(),t.createElementBlock("span",{key:0,class:"oc-invisible-sr",textContent:t.toDisplayString(e.accessibleDescription)},null,8,cn)):t.createCommentVNode("",!0)])}typeof $e=="function"&&$e(wt);const St=m(wt,[["render",dn]]),Bt=t.defineComponent({name:"OcButton",status:"ready",release:"1.0.0",props:{type:{type:String,default:"button",validator:e=>["button","a","router-link"].includes(e)},disabled:{type:Boolean,default:!1},size:{type:String,default:"medium",validator:e=>["small","medium","large"].includes(e)},href:{type:String,default:null},target:{type:String,default:null,validator:e=>["_blank","_self","_parent","_top"].includes(e)},to:{type:[String,Object],default:null},ariaLabel:{type:String,default:null},submit:{type:String,default:"button",validator:e=>["null","button","submit","reset"].includes(e)},variation:{type:String,default:"passive",validator:e=>["passive","primary","danger","success","warning","brand"].includes(e)},appearance:{type:String,default:"outline",validator:e=>["filled","outline","raw","raw-inverse"].includes(e)},justifyContent:{type:String,default:"center",validator:e=>["left","center","right","space-around","space-between","space-evenly"].includes(e)},gapSize:{type:String,default:"medium",validator:e=>["none","xsmall","small","medium","large","xlarge"].includes(e)},showSpinner:{type:Boolean,default:!1}},emits:["click"],computed:{$_ocButton_buttonClass(){return["oc-button","oc-rounded",`oc-button-${p.getSizeClass(this.size)}`,`oc-button-justify-content-${this.justifyContent}`,`oc-button-gap-${p.getSizeClass(this.gapSize)}`,`oc-button-${this.variation}`,`oc-button-${this.variation}-${this.appearance}`]},additionalAttributes(){return{...this.href&&{href:this.href},...this.target&&{target:this.target},...this.to&&{to:this.to},...this.type==="button"&&{type:this.submit},...this.type==="button"&&{disabled:this.disabled}}},handlers(){return{...this.type==="button"&&{click:this.$_ocButton_onClick}}}},methods:{$_ocButton_onClick(e){this.$emit("click",e)}}}),ve={};function un(e,o,n,a,s,r){const l=t.resolveComponent("oc-spinner");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.type),t.mergeProps(e.additionalAttributes,{"aria-label":e.ariaLabel,class:e.$_ocButton_buttonClass},t.toHandlers(e.handlers)),{default:t.withCtx(()=>[e.showSpinner?(t.openBlock(),t.createBlock(l,{key:0,size:"small",class:"spinner"})):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"default")]),_:3},16,["aria-label","class"])}typeof ve=="function"&&ve(Bt);const w=m(Bt,[["render",un]]),Ot={name:"hideOnEsc",defaultValue:!0,fn({hide:e}){const o=n=>{n.code==="Escape"&&e()};return{onShow:()=>{document.addEventListener("keydown",o)},onHide:()=>{document.removeEventListener("keydown",o)}}}},pn={name:"ariaHidden",defaultValue:!0,fn(e){return{onCreate(){e.popper.setAttribute("aria-hidden","true")}}}},P=e=>{if(e)try{e.destroy()}catch{}},Ce=(e,{value:o={}})=>{if(Object.prototype.toString.call(o)!=="[object Object]"&&(o={content:o}),o.content!==0&&!o.content||o.content===""){P(e.tooltip),e.tooltip=null;return}const n=Ho.all([{ignoreAttributes:!0,interactive:!0,aria:{content:null,expanded:!1}},o]);if(!e.tooltip){e.tooltip=K(e,{...n,plugins:[Ot,pn]});return}e.tooltip.setProps(n)},mn={name:"OcTooltip",beforeMount:Ce,updated:Ce,unmounted:e=>P(e.tooltip)},Et=t.defineComponent({name:"OcDrop",status:"ready",release:"1.0.0",props:{dropId:{type:String,required:!1,default:()=>p.uniqueId("oc-drop-")},popperOptions:{type:Object,required:!1,default:()=>({})},toggle:{type:String,default:""},position:{type:String,default:"bottom-start",validator:e=>!!e.match(/((top|right|bottom|left|auto)|(top|right|bottom|left|auto)-(start|end))/)},mode:{type:String,default:"click",validator:e=>!!e.match(/(click|hover|manual)/)},closeOnClick:{type:Boolean,required:!1},isNested:{type:Boolean,required:!1},target:{type:String,required:!1,default:null},paddingSize:{type:String,required:!1,default:"medium",validator:e=>[...p.AVAILABLE_SIZES,"remove"].some(o=>o===e)},offset:{type:String,required:!1,default:void 0}},emits:["hideDrop","showDrop"],setup(e){const o=t.useTemplateRef("drop"),n=t.ref(null),a=i=>{var u;(u=t.unref(n))==null||u.show(i)},s=i=>{var u;(u=t.unref(n))==null||u.hide(i)},r=()=>{e.closeOnClick&&s()},l=i=>{const u=t.unref(o).closest(".tippy-box");i.relatedTarget&&!u.contains(i.relatedTarget)&&s()};return t.onMounted(()=>{t.unref(o).addEventListener("focusout",l)}),t.onBeforeUnmount(()=>{t.unref(o).removeEventListener("focusout",l)}),{drop:o,tippy:n,show:a,hide:s,onClick:r}},computed:{triggerMapping(){return{hover:"mouseenter focus"}[this.mode]||this.mode},paddingClass(){return`oc-p-${p.getSizeClass(this.paddingSize)}`}},watch:{position(){this.tippy.setProps({placement:this.position})},mode(){this.tippy.setProps({trigger:this.triggerMapping})}},beforeUnmount(){P(this.tippy)},mounted(){var a;P(this.tippy);const e=this.target?document.querySelector(this.target):this.toggle?document.querySelector(this.toggle):this.$el.previousElementSibling,o=this.$refs.drop;if(!e||!o)return;const n={trigger:this.triggerMapping,placement:this.position,arrow:!1,hideOnClick:!0,interactive:!0,plugins:[Ot],theme:"none",maxWidth:416,offset:this.offset??0,...!this.isNested&&{onShow:s=>{this.$emit("showDrop"),K.hideAll({exclude:s})},onHide:()=>{this.$emit("hideDrop")}},popperOptions:{...this.popperOptions,modifiers:[...(a=this.popperOptions)!=null&&a.modifiers?this.popperOptions.modifiers:[],{name:"fixVerticalPosition",enabled:!0,phase:"beforeWrite",requiresIfExists:["offset","preventOverflow","flip"],fn({state:s}){const r=Ro.detectOverflow(s),l=s.modifiersData.fullHeight||s.elements.popper.offsetHeight,i=r.top*-1-10,u=i+l+r.bottom*-1,c=u-i,k=u-c;l>c&&l>k&&(s.styles.popper.top=`-${i}px`,s.modifiersData.fullHeight=l),l>u&&(s.styles.popper.maxHeight=`${u-10}px`,s.styles.popper.overflowY="auto",s.styles.popper.overflowX="hidden")}}]},content:o};this.target&&(n.triggerTarget=this.toggle?document.querySelector(this.toggle):this.$el.previousElementSibling),this.tippy=K(e,n)}}),we={},fn=["id"];function hn(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("div",{id:e.dropId,ref:"drop",class:"oc-drop oc-box-shadow-medium oc-rounded",onClick:o[0]||(o[0]=(...l)=>e.onClick&&e.onClick(...l))},[e.$slots.default?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["oc-card oc-card-body oc-background-secondary",e.paddingClass])},[t.renderSlot(e.$slots,"default")],2)):t.renderSlot(e.$slots,"special",{key:1})],8,fn)}typeof we=="function"&&we(Et);const A=m(Et,[["render",hn]]),Vt=t.defineComponent({name:"OcBreadcrumb",status:"ready",release:"1.0.0",components:{OcDrop:A,OcIcon:C,OcButton:w},props:{id:{type:String,required:!1,default:()=>p.uniqueId("oc-breadcrumbs-")},items:{type:Array,required:!0},variation:{type:String,required:!1,default:"default",validator:e=>e==="lead"||e==="default"},contextMenuPadding:{type:String,required:!1,default:"medium",validator:e=>[...p.AVAILABLE_SIZES,"remove"].some(o=>o===e)},maxWidth:{type:Number,required:!1,default:-1},truncationOffset:{type:Number,required:!1,default:2},showContextActions:{type:Boolean,default:!1}},emits:[p.EVENT_ITEM_DROPPED_BREADCRUMB],setup(e,{emit:o}){const{$gettext:n}=_.useGettext(),a=t.ref([]),s=t.ref([]),r=t.ref(e.items.slice()),l=g=>document.querySelector(`.oc-breadcrumb-list [data-item-id="${g}"]`),i=(g,S)=>!(!g.id||S===t.unref(r).length-1||g.isTruncationPlaceholder||g.isStaticNav),u=(g,S)=>{if(i(g,S)&&typeof g.to=="object"){const B=g.to;B.path=B.path||"/",o(p.EVENT_ITEM_DROPPED_BREADCRUMB,B)}},c=()=>{let g=100;return a.value.forEach(S=>{var T;const B=l(S.id),O=((T=B==null?void 0:B.getBoundingClientRect())==null?void 0:T.width)||0;g+=O}),g},k=g=>{const S=e.maxWidth;if(!S)return;const B=c();if(!(S<B)||a.value.length<=e.truncationOffset+1)return;const T=a.value.splice(g,1);s.value.push(T[0]),k(g)},f=t.computed(()=>s.value.length>=1?t.unref(s)[t.unref(s).length-1]:{to:{}}),$=()=>{r.value=[...e.items],r.value.length>e.truncationOffset-1&&r.value.splice(e.truncationOffset-1,0,{text:"...",allowContextActions:!1,to:{},isTruncationPlaceholder:!0}),a.value=[...r.value],s.value=[],t.nextTick(()=>{k(e.truncationOffset)})};t.watch([()=>e.maxWidth,()=>e.items],$,{immediate:!0});const d=t.computed(()=>{if(!(e.items.length===0||!e.items))return[...e.items].reverse()[0]}),b=t.computed(()=>{var g;return(g=[...e.items].reverse()[1])==null?void 0:g.to}),h=t.computed(()=>n("Show actions for current folder"));return{currentFolder:d,parentFolderTo:b,contextMenuLabel:h,getAriaCurrent:g=>e.items.length-1===g?"page":null,visibleItems:a,hiddenItems:s,renderBreadcrumb:$,displayItems:r,lastHiddenItem:f,dropItemEvent:u,dropItemStyling:(g,S,B,O)=>{var re,se;if(!i(g,S)||(((re=O.dataTransfer)==null?void 0:re.types)||[]).some(Lo=>Lo==="Files")||(se=O.currentTarget)!=null&&se.contains(O.relatedTarget))return;const ne=l(g.id).children[0].classList,ae="oc-breadcrumb-item-dragover";B?ne.remove(ae):ne.add(ae)}}}}),Se={},gn=["id","aria-label"],yn={class:"oc-breadcrumb-list oc-flex oc-m-rm oc-p-rm"},bn=["data-key","data-item-id","aria-hidden","onDragenter","onDragleave","onMouseleave","onDrop"],kn={class:"oc-breadcrumb-item-text oc-breadcrumb-item-navigable"},$n=["textContent"],vn=["aria-current","textContent"],Cn={key:0,class:"oc-breadcrumb-mobile-current"},wn=["textContent"];function Sn(e,o,n,a,s,r){const l=t.resolveComponent("router-link"),i=t.resolveComponent("oc-button"),u=t.resolveComponent("oc-icon"),c=t.resolveComponent("oc-drop"),k=t.resolveDirective("oc-tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("nav",{id:e.id,class:t.normalizeClass(`oc-breadcrumb oc-breadcrumb-${e.variation}`),"aria-label":e.$gettext("Breadcrumbs")},[t.createElementVNode("ol",yn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.displayItems,(f,$)=>(t.openBlock(),t.createElementBlock("li",{key:$,"data-key":$,"data-item-id":f.id,"aria-hidden":f.isTruncationPlaceholder,class:t.normalizeClass(["oc-breadcrumb-list-item","oc-flex","oc-flex-middle",{"oc-invisible-sr":e.hiddenItems.indexOf(f)!==-1||f.isTruncationPlaceholder&&e.hiddenItems.length===0}]),onDragover:o[0]||(o[0]=t.withModifiers(()=>{},["prevent"])),onDragenter:t.withModifiers(d=>e.dropItemStyling(f,$,!1,d),["prevent"]),onDragleave:t.withModifiers(d=>e.dropItemStyling(f,$,!0,d),["prevent"]),onMouseleave:d=>e.dropItemStyling(f,$,!0,d),onDrop:d=>e.dropItemEvent(f,$)},[f.to?(t.openBlock(),t.createBlock(l,{key:0,"aria-current":e.getAriaCurrent($),to:f.isTruncationPlaceholder?e.lastHiddenItem.to:f.to},{default:t.withCtx(()=>[t.createElementVNode("span",kn,t.toDisplayString(f.text),1)]),_:2},1032,["aria-current","to"])):f.onClick?(t.openBlock(),t.createBlock(i,{key:1,"aria-current":e.getAriaCurrent($),appearance:"raw",class:"oc-flex",onClick:f.onClick},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(["oc-breadcrumb-item-text","oc-breadcrumb-item-navigable",{"oc-breadcrumb-item-text-last":$===e.displayItems.length-1}]),textContent:t.toDisplayString(f.text)},null,10,$n)]),_:2},1032,["aria-current","onClick"])):(t.openBlock(),t.createElementBlock("span",{key:2,class:"oc-breadcrumb-item-text","aria-current":e.getAriaCurrent($),tabindex:"-1",textContent:t.toDisplayString(f.text)},null,8,vn)),$!==e.displayItems.length-1?(t.openBlock(),t.createBlock(u,{key:3,color:"var(--oc-color-text-default)",name:"arrow-right-s",class:"oc-mx-xs","fill-type":"line"})):t.createCommentVNode("",!0),e.showContextActions&&$===e.displayItems.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.withDirectives((t.openBlock(),t.createBlock(i,{id:"oc-breadcrumb-contextmenu-trigger","aria-label":e.contextMenuLabel,appearance:"raw"},{default:t.withCtx(()=>[t.createVNode(u,{name:"more-2",color:"var(--oc-color-text-default)"})]),_:1},8,["aria-label"])),[[k,e.contextMenuLabel]]),t.createVNode(c,{"drop-id":"oc-breadcrumb-contextmenu",toggle:"#oc-breadcrumb-contextmenu-trigger",mode:"click","close-on-click":"","padding-size":e.contextMenuPadding},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"contextMenu")]),_:3},8,["padding-size"])],64)):t.createCommentVNode("",!0)],42,bn))),128))]),e.parentFolderTo&&e.displayItems.length>1?(t.openBlock(),t.createBlock(i,{key:0,appearance:"raw",type:"router-link","aria-label":e.$gettext("Navigate one level up"),to:e.parentFolderTo,class:"oc-breadcrumb-mobile-navigation"},{default:t.withCtx(()=>[t.createVNode(u,{name:"arrow-left-s","fill-type":"line",size:"large",class:"oc-mr-m"})]),_:1},8,["aria-label","to"])):t.createCommentVNode("",!0)],10,gn),e.displayItems.length>1?(t.openBlock(),t.createElementBlock("div",Cn,[t.createElementVNode("span",{class:"oc-text-truncate","aria-current":"page",textContent:t.toDisplayString(e.currentFolder.text)},null,8,wn)])):t.createCommentVNode("",!0)],64)}typeof Se=="function"&&Se(Vt);const _t=m(Vt,[["render",Sn]]),Dt=t.defineComponent({name:"OcCheckbox",status:"ready",release:"1.0.0",props:{id:{type:String,required:!1,default:()=>p.uniqueId("oc-checkbox-")},disabled:{type:Boolean,default:!1},modelValue:{type:[Boolean,Array],required:!1,default:!1},option:{required:!1,default:null},label:{type:String,required:!0,default:null},labelHidden:{type:Boolean,default:!1},size:{type:String,required:!1,default:"medium",validator:e=>["small","medium","large"].includes(e)},outline:{type:Boolean,required:!1,default:!1}},emits:["click","update:modelValue"],computed:{model:{get(){return this.modelValue},set:function(e){this.$emit("update:modelValue",e)}},classes(){return["oc-checkbox","oc-rounded","oc-checkbox-"+p.getSizeClass(this.size),{"oc-checkbox-checked":this.isChecked}]},labelClasses(){return{"oc-cursor-pointer":!this.disabled}},isChecked(){return typeof this.model=="boolean"?this.model:this.model.some(e=>jo.isEqual(e,this.option))}},methods:{keydownEnter(e){this.model=!this.model,this.$emit("click",e)}}}),Be={},Bn=["id","value","disabled","aria-label"],On=["for","textContent"];function En(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("span",{onClick:o[2]||(o[2]=l=>e.$emit("click",l))},[t.withDirectives(t.createElementVNode("input",{id:e.id,"onUpdate:modelValue":o[0]||(o[0]=l=>e.model=l),type:"checkbox",name:"checkbox",class:t.normalizeClass(e.classes),value:e.option,disabled:e.disabled,"aria-label":e.labelHidden?e.label:null,onKeydown:o[1]||(o[1]=t.withKeys((...l)=>e.keydownEnter&&e.keydownEnter(...l),["enter"]))},null,42,Bn),[[t.vModelCheckbox,e.model]]),e.labelHidden?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("label",{key:0,for:e.id,class:t.normalizeClass(e.labelClasses),textContent:t.toDisplayString(e.label)},null,10,On))])}typeof Be=="function"&&Be(Dt);const Tt=m(Dt,[["render",En]]),Nt=t.defineComponent({name:"OcInfoDrop",status:"unreleased",components:{OcButton:w,OcIcon:C,OcDrop:A,FocusTrap:ut.FocusTrap},props:{dropId:{type:String,required:!1,default:()=>p.uniqueId("oc-info-drop-")},toggle:{type:String,required:!1,default:""},mode:{type:String,required:!1,default:"click",validator:e=>["click","hover","manual"].includes(e)},target:{type:String,required:!1,default:null},title:{type:String,required:!0},text:{type:String,required:!1,default:""},list:{type:Array,required:!1,default:()=>[]},endText:{type:String,required:!1,default:""},readMoreLink:{type:String,required:!1,default:""}},setup(e){const o=t.ref(!1),n=t.computed(()=>(e.list||[]).filter(a=>!!a.text));return{dropOpen:o,listItems:n}}}),Oe={},Vn={class:"info-drop-content"},_n={class:"oc-flex oc-flex-between info-header oc-border-b oc-pb-s"},Dn=["textContent"],Tn=["textContent"],Nn={key:1,class:"info-list"},qn=["textContent"];function Ln(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-button"),u=t.resolveComponent("focus-trap"),c=t.resolveComponent("oc-drop"),k=t.resolveDirective("oc-tooltip");return t.openBlock(),t.createBlock(c,{ref:"drop",class:"oc-width-1-1 oc-info-drop","drop-id":e.dropId,toggle:e.toggle,mode:e.mode,"close-on-click":"",onHideDrop:o[0]||(o[0]=()=>e.dropOpen=!1),onShowDrop:o[1]||(o[1]=()=>e.dropOpen=!0)},{default:t.withCtx(()=>[t.createVNode(u,{active:e.dropOpen},{default:t.withCtx(()=>[t.createElementVNode("div",Vn,[t.createElementVNode("div",_n,[t.createElementVNode("h4",{class:"oc-m-rm info-title",textContent:t.toDisplayString(e.$gettext(e.title))},null,8,Dn),t.withDirectives((t.openBlock(),t.createBlock(i,{appearance:"raw","aria-label":e.$gettext("Close")},{default:t.withCtx(()=>[t.createVNode(l,{name:"close","fill-type":"line",size:"medium",variation:"inherit"})]),_:1},8,["aria-label"])),[[k,e.$gettext("Close")]])]),e.text?(t.openBlock(),t.createElementBlock("p",{key:0,class:"info-text",textContent:t.toDisplayString(e.$gettext(e.text))},null,8,Tn)):t.createCommentVNode("",!0),e.listItems.length?(t.openBlock(),t.createElementBlock("dl",Nn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.listItems,(f,$)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(f.headline?"dt":"dd"),{key:$},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$gettext(f.text)),1)]),_:2},1024))),128))])):t.createCommentVNode("",!0),e.endText?(t.openBlock(),t.createElementBlock("p",{key:2,class:"info-text-end",textContent:t.toDisplayString(e.$gettext(e.endText))},null,8,qn)):t.createCommentVNode("",!0),e.readMoreLink?(t.openBlock(),t.createBlock(i,{key:3,type:"a",appearance:"raw",size:"small",class:"info-more-link",href:e.readMoreLink,target:"_blank"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$gettext("Read more")),1)]),_:1},8,["href"])):t.createCommentVNode("",!0)])]),_:1},8,["active"])]),_:1},8,["drop-id","toggle","mode"])}typeof Oe=="function"&&Oe(Nt);const U=m(Nt,[["render",Ln]]),qt=t.defineComponent({name:"OcContextualHelper",status:"unreleased",components:{OcButton:w,OcIcon:C,OcInfoDrop:U},props:{title:{type:String,required:!0},text:{type:String,required:!1,default:""},list:{type:Array,required:!1,default:()=>[]},endText:{type:String,required:!1,default:""},readMoreLink:{type:String,required:!1,default:""}},computed:{dropId(){return p.uniqueId("oc-contextual-helper-")},buttonId(){return`${this.dropId}-button`},toggleId(){return`#${this.buttonId}`}}}),Ee={},In={class:"oc-contextual-helper"};function Pn(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-button"),u=t.resolveComponent("oc-info-drop");return t.openBlock(),t.createElementBlock("div",In,[t.createVNode(i,{id:e.buttonId,"aria-label":e.$gettext("Show more information"),appearance:"raw"},{default:t.withCtx(()=>[t.createVNode(l,{name:"question","fill-type":"line",size:"small"})]),_:1},8,["id","aria-label"]),t.createVNode(u,t.mergeProps({"drop-id":e.dropId,toggle:e.toggleId},e.$props),null,16,["drop-id","toggle"])])}typeof Ee=="function"&&Ee(qt);const Lt=m(qt,[["render",Pn]]),It=t.defineComponent({name:"OcDatepicker",status:"ready",release:"1.0.0",props:{label:{type:String,required:!0},isClearable:{type:Boolean,default:!0},currentDate:{type:Object,required:!1,default:null},minDate:{type:Object,required:!1,default:null}},emits:["dateChanged"],setup(e,{emit:o}){const{$gettext:n,current:a}=_.useGettext(),s=t.ref(""),r=t.computed(()=>{const u=ce.DateTime.fromISO(t.unref(s)).endOf("day");return u.isValid?u:null}),l=t.computed(()=>!e.minDate||!t.unref(r)?!1:t.unref(r)<e.minDate),i=t.computed(()=>t.unref(l)?n("The date must be after %{date}",{date:e.minDate.minus({day:1}).setLocale(a).toLocaleString(ce.DateTime.DATE_SHORT)}):"");return t.watch(()=>e.currentDate,()=>{if(e.currentDate){s.value=e.currentDate.toISODate();return}s.value=void 0},{immediate:!0}),t.watch(r,()=>{o("dateChanged",{date:t.unref(r),error:t.unref(l)})},{deep:!0}),{dateInputString:s,errorMessage:i}}}),Ve={};function Mn(e,o,n,a,s,r){var i;const l=t.resolveComponent("oc-text-input");return t.openBlock(),t.createBlock(l,t.mergeProps({modelValue:e.dateInputString,"onUpdate:modelValue":o[0]||(o[0]=u=>e.dateInputString=u)},e.$attrs,{label:e.label,type:"date",min:(i=e.minDate)==null?void 0:i.toISODate(),"fix-message-line":!0,"error-message":e.errorMessage,"clear-button-enabled":e.isClearable,"clear-button-accessible-label":e.$gettext("Clear date"),class:"oc-date-picker"}),null,16,["modelValue","label","min","error-message","clear-button-enabled","clear-button-accessible-label"])}typeof Ve=="function"&&Ve(It);const Pt=m(It,[["render",Mn]]),Mt=t.defineComponent({name:"OcDropzone",status:"ready",release:"0.0.1"}),_e={},zn={class:"oc-dropzone"};function An(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("div",zn,[t.renderSlot(e.$slots,"default")])}typeof _e=="function"&&_e(Mt);const zt=m(Mt,[["render",An]]),Fn=t.defineComponent({name:"OcFilterChip",status:"ready",release:"15.0.0",props:{id:{type:String,required:!1,default:()=>p.uniqueId("oc-filter-chip-")},filterLabel:{type:String,required:!0},selectedItemNames:{type:Array,required:!1,default:()=>[]},isToggle:{type:Boolean,default:!1},isToggleActive:{type:Boolean,default:!1},raw:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!1}},emits:["clearFilter","hideDrop","showDrop","toggleFilter"],setup(e,{expose:o}){const n=t.ref(),a=t.computed(()=>e.isToggle?e.isToggleActive:!!e.selectedItemNames.length);return o({hideDrop:()=>{var r;(r=t.unref(n))==null||r.hide()}}),{filterActive:a,dropRef:n}}}),Rn=["textContent"],Hn=["textContent"];function jn(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-button"),u=t.resolveComponent("oc-drop"),c=t.resolveDirective("oc-tooltip");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["oc-filter-chip oc-flex",{"oc-filter-chip-toggle":e.isToggle,"oc-filter-chip-raw":e.raw}])},[t.createVNode(i,{id:e.id,class:t.normalizeClass(["oc-filter-chip-button oc-pill",{"oc-filter-chip-button-selected":e.filterActive}]),appearance:"raw",onClick:o[0]||(o[0]=k=>e.isToggle?e.$emit("toggleFilter"):!1)},{default:t.withCtx(()=>[t.createVNode(l,{class:t.normalizeClass(e.filterActive?"oc-filter-check-icon-active":"oc-filter-check-icon-inactive"),name:"check",size:"small",color:"var(--oc-color-text-inverse)"},null,8,["class"]),t.createElementVNode("span",{class:"oc-text-truncate oc-filter-chip-label",textContent:t.toDisplayString(e.selectedItemNames.length?e.selectedItemNames[0]:e.filterLabel)},null,8,Rn),e.selectedItemNames.length>1?(t.openBlock(),t.createElementBlock("span",{key:0,textContent:t.toDisplayString(` +${e.selectedItemNames.length-1}`)},null,8,Hn)):t.createCommentVNode("",!0),!e.filterActive&&!e.isToggle?(t.openBlock(),t.createBlock(l,{key:1,name:"arrow-down-s",size:"small"})):t.createCommentVNode("",!0)]),_:1},8,["id","class"]),e.isToggle?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(u,{key:0,ref:"dropRef",toggle:"#"+e.id,class:"oc-filter-chip-drop",mode:"click","padding-size":"small","close-on-click":e.closeOnClick,onHideDrop:o[1]||(o[1]=k=>e.$emit("hideDrop")),onShowDrop:o[2]||(o[2]=k=>e.$emit("showDrop"))},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["toggle","close-on-click"])),e.filterActive?t.withDirectives((t.openBlock(),t.createBlock(i,{key:1,class:"oc-filter-chip-clear oc-px-xs",appearance:"raw","aria-label":e.$gettext("Clear filter"),onClick:o[3]||(o[3]=k=>e.$emit("clearFilter"))},{default:t.withCtx(()=>[t.createVNode(l,{name:"close",size:"small",color:"var(--oc-color-text-inverse)"})]),_:1},8,["aria-label"])),[[c,e.$gettext("Clear filter")]]):t.createCommentVNode("",!0)],2)}const At=m(Fn,[["render",jn]]),Ft=t.defineComponent({name:"OcGrid",status:"ready",release:"1.0.0",props:{gutter:{type:String,default:"collapse",validator:e=>["small","medium","large","collapse"].includes(e)},flex:{type:[Boolean],default:!1}},computed:{classes(){const e=[];return e.push("oc-grid-"+this.gutter),this.flex&&(e.push("oc-flex"),e.push("oc-flex-middle")),e}}}),De={};function xn(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes)},[t.renderSlot(e.$slots,"default")],2)}typeof De=="function"&&De(Ft);const W=m(Ft,[["render",xn]]),Rt=t.defineComponent({name:"OcHiddenAnnouncer",status:"ready",release:"1.0.0",props:{level:{type:String,required:!1,default:"polite",validator:e=>["polite","assertive","off"].includes(e)},announcement:{type:String,required:!0}},data(){return{id:Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}}}),Te={},Kn=["id","aria-live","textContent"];function Gn(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("span",{id:e.id,class:"oc-invisible-sr oc-hidden-announcer","aria-live":e.level,"aria-atomic":"true",textContent:t.toDisplayString(e.announcement)},null,8,Kn)}typeof Te=="function"&&Te(Rt);const Ht=m(Rt,[["render",Gn]]),jt=t.defineComponent({name:"OcList",status:"ready",release:"12.0.0",props:{raw:{type:Boolean,default:!1,required:!1}}}),Ne={};function Un(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("ul",{class:t.normalizeClass(["oc-list oc-my-rm oc-mx-rm",{"oc-list-raw":e.raw}])},[t.renderSlot(e.$slots,"default")],2)}typeof Ne=="function"&&Ne(jt);const xt=m(jt,[["render",Un]]),Kt=t.defineComponent({name:"OcLoader",status:"ready",release:"1.0.0",props:{ariaLabel:{type:String,default:"Loading"},flat:{type:Boolean,default:!1}}}),qe={},Wn=["aria-label"];function Xn(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["oc-loader",{"oc-loader-flat":e.flat}]),"aria-label":e.ariaLabel},null,10,Wn)}typeof qe=="function"&&qe(Kt);const Gt=m(Kt,[["render",Xn]]),Ut=t.defineComponent({name:"OcLogo",status:"ready",release:"7.3.0",components:{OcImg:M},props:{src:{type:String,required:!0},alt:{type:String,required:!0}}}),Le={};function Qn(e,o,n,a,s,r){const l=t.resolveComponent("oc-img");return t.openBlock(),t.createBlock(l,{class:"oc-logo",src:e.src,alt:e.alt},null,8,["src","alt"])}typeof Le=="function"&&Le(Ut);const Wt=m(Ut,[["render",Qn]]),Jn=["value","type","disabled"],Yn={class:"oc-flex oc-text-small oc-text-input-password-policy-rule-wrapper oc-pt-s"},Zn=["textContent"],Ie="file-copy",ea=t.defineComponent({name:"OCTextInputPassword",components:{OcButton:w,OcIcon:C},status:"ready",release:"1.0.0",__name:"_OcTextInputPassword",props:{value:{},passwordPolicy:{default:()=>({rules:[],check:()=>!1,missing:()=>({rules:[]})})},generatePasswordMethod:{type:Function,default:null},hasWarning:{type:Boolean,default:!1},hasError:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["passwordChallengeCompleted","passwordChallengeFailed","passwordGenerated","input","change"],setup(e,{emit:o}){const n=o,a=t.useAttrs(),s=t.ref(null),{$gettext:r}=_.useGettext(),l=t.ref(!1),i=t.ref(Ie),u=t.computed(()=>!!Object.keys(e.passwordPolicy.rules||{}).length),c=t.computed(()=>e.passwordPolicy.missing(t.unref(e.value))),k=d=>{var h;const b={};for(let y=0;y<d.format.length;y++)b[`param${y+1}`]=(h=d.format[y])==null?void 0:h.toString();return r(d.message,b,!0)},f=()=>{navigator.clipboard.writeText(t.unref(e.value)),i.value="check",setTimeout(()=>i.value=Ie,500)},$=()=>{const d=e.generatePasswordMethod(),b=new Event("input",{bubbles:!0});Object.defineProperty(b,"target",{value:s.value}),n("input",b),n("passwordGenerated",d)};return t.watch(()=>e.value,d=>{if(Object.keys(e.passwordPolicy).length){if(!e.passwordPolicy.check(d))return n("passwordChallengeFailed");n("passwordChallengeCompleted")}}),(d,b)=>{const h=t.resolveComponent("oc-contextual-helper"),y=t.resolveComponent("portal"),v=t.resolveDirective("oc-tooltip");return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:t.normalizeClass(["oc-text-input-password-wrapper",{"oc-text-input-password-wrapper-warning":d.hasWarning,"oc-text-input-password-wrapper-danger":d.hasError}])},[t.createElementVNode("input",t.mergeProps(t.unref(a),{ref_key:"passwordInput",ref:s,value:d.value,type:l.value?"text":"password",disabled:d.disabled,onInput:b[0]||(b[0]=g=>d.$emit("input",g)),onChange:b[1]||(b[1]=g=>d.$emit("change",g))}),null,16,Jn),d.value&&!d.disabled?t.withDirectives((t.openBlock(),t.createBlock(w,{key:0,"aria-label":l.value?t.unref(r)("Hide password"):t.unref(r)("Show password"),class:"oc-text-input-show-password-toggle oc-px-s oc-background-default",appearance:"raw",size:"small",onClick:b[2]||(b[2]=g=>l.value=!l.value)},{default:t.withCtx(()=>[t.createVNode(C,{size:"small",name:l.value?"eye-off":"eye"},null,8,["name"])]),_:1},8,["aria-label"])),[[v,l.value?t.unref(r)("Hide password"):t.unref(r)("Show password")]]):t.createCommentVNode("",!0),d.value&&!d.disabled?t.withDirectives((t.openBlock(),t.createBlock(w,{key:1,"aria-label":t.unref(r)("Copy password"),class:"oc-text-input-copy-password-button oc-px-s oc-background-default",appearance:"raw",size:"small",onClick:f},{default:t.withCtx(()=>[t.createVNode(C,{size:"small",name:i.value},null,8,["name"])]),_:1},8,["aria-label"])),[[v,t.unref(r)("Copy password")]]):t.createCommentVNode("",!0),d.generatePasswordMethod&&!d.disabled?t.withDirectives((t.openBlock(),t.createBlock(w,{key:2,"aria-label":t.unref(r)("Generate password"),class:"oc-text-input-generate-password-button oc-px-s oc-background-default",appearance:"raw",size:"small",onClick:$},{default:t.withCtx(()=>[t.createVNode(C,{size:"small",name:"refresh","fill-type":"line"})]),_:1},8,["aria-label"])),[[v,t.unref(r)("Generate password")]]):t.createCommentVNode("",!0)],2),u.value?(t.openBlock(),t.createBlock(y,{key:0,to:"app.design-system.password-policy"},{default:t.withCtx(()=>[t.createElementVNode("div",Yn,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value.rules,(g,S)=>(t.openBlock(),t.createElementBlock("div",{key:S,class:"oc-flex oc-flex-middle oc-text-input-password-policy-rule"},[t.createVNode(C,{size:"small",class:"oc-mr-xs",name:g.verified?"checkbox-circle":"close-circle",variation:g.verified?"success":"danger"},null,8,["name","variation"]),t.createElementVNode("span",{class:t.normalizeClass([{"oc-text-input-success":g.verified},{"oc-text-input-danger":!g.verified}]),textContent:t.toDisplayString(k(g))},null,10,Zn),g.helperMessage?(t.openBlock(),t.createBlock(h,{key:0,text:g.helperMessage,title:t.unref(r)("Password policy")},null,8,["text","title"])):t.createCommentVNode("",!0)]))),128))])]),_:1})):t.createCommentVNode("",!0)],64)}}}),Xt=t.defineComponent({name:"OcTextInput",components:{OcIcon:C,OcButton:w,OcTextInputPassword:ea},status:"ready",release:"1.0.0",inheritAttrs:!1,props:{id:{type:String,required:!1,default:()=>p.uniqueId("oc-textinput-")},type:{type:String,default:"text",validator:e=>["text","number","email","password"].includes(e)},modelValue:{type:String,required:!1,default:null},selectionRange:{type:Array,required:!1,default:null},clearButtonEnabled:{type:Boolean,required:!1,default:!1},clearButtonAccessibleLabel:{type:String,required:!1,default:""},defaultValue:{type:String,required:!1,default:null},disabled:{type:Boolean,default:!1},label:{type:String,required:!0,default:null},warningMessage:{type:String,default:null},errorMessage:{type:String,default:null},fixMessageLine:{type:Boolean,default:!1},descriptionMessage:{type:String,default:null},readOnly:{type:Boolean,default:!1},passwordPolicy:{type:Object,default:()=>({})},generatePasswordMethod:{type:Function,required:!1,default:null}},emits:["change","update:modelValue","focus","passwordChallengeCompleted","passwordChallengeFailed","enterKeyDown"],computed:{showMessageLine(){return this.fixMessageLine||!!this.warningMessage||!!this.errorMessage||!!this.descriptionMessage},messageId(){return`${this.id}-message`},additionalListeners(){return this.type==="password"?{passwordGenerated:this.onInput}:{}},additionalAttributes(){const e={};(this.warningMessage||this.errorMessage||this.descriptionMessage)&&(e["aria-describedby"]=this.messageId),this.defaultValue&&(e.placeholder=this.defaultValue),this.type==="password"&&(e["password-policy"]=this.passwordPolicy,e["generate-password-method"]=this.generatePasswordMethod,e["has-warning"]=!!this.warningMessage,e["has-error"]=!!this.errorMessage);const{change:o,input:n,focus:a,class:s,...r}=this.$attrs;return{...r,...e}},ariaInvalid(){return(!!this.errorMessage).toString()},messageText(){return this.errorMessage?this.errorMessage:this.warningMessage?this.warningMessage:this.descriptionMessage},showClearButton(){return!this.disabled&&this.clearButtonEnabled&&!!this.modelValue},clearButtonAccessibleLabelValue(){return this.clearButtonAccessibleLabel||this.$gettext("Clear input")},displayValue(){return this.modelValue||""},inputComponent(){return this.type==="password"?"oc-text-input-password":"input"}},methods:{focus(){this.$refs.input.focus()},onClear(){this.focus(),this.onInput(null),this.onChange(null)},onChange(e){this.$emit("change",e)},onInput(e){this.$emit("update:modelValue",e)},async onFocus(e){await t.nextTick(),e.select(),this.selectionRange&&this.selectionRange.length>1&&e.setSelectionRange(this.selectionRange[0],this.selectionRange[1]),this.$emit("focus",e.value)}}}),Pe={},ta=["for","textContent"],oa={class:"oc-position-relative"},na=["id","textContent"];function aa(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-button"),u=t.resolveComponent("portal-target");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.$attrs.class)},[t.renderSlot(e.$slots,"label",{},()=>[t.createElementVNode("label",{class:"oc-label",for:e.id,textContent:t.toDisplayString(e.label)},null,8,ta)]),t.createElementVNode("div",oa,[e.readOnly?(t.openBlock(),t.createBlock(l,{key:0,name:"lock",size:"small",class:"oc-mt-s oc-ml-s oc-position-absolute"})):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.inputComponent),t.mergeProps({id:e.id},e.additionalAttributes,{ref:"input","aria-invalid":e.ariaInvalid,class:["oc-text-input oc-input oc-rounded",{"oc-text-input-warning":!!e.warningMessage,"oc-text-input-danger":!!e.errorMessage,"oc-pl-l":!!e.readOnly,"clear-action-visible":e.showClearButton}],type:e.type,value:e.displayValue,disabled:e.disabled||e.readOnly},t.toHandlers(e.additionalListeners),{onChange:o[0]||(o[0]=c=>e.onChange(c.target.value)),onInput:o[1]||(o[1]=c=>e.onInput(c.target.value)),onPasswordChallengeCompleted:o[2]||(o[2]=c=>e.$emit("passwordChallengeCompleted")),onPasswordChallengeFailed:o[3]||(o[3]=c=>e.$emit("passwordChallengeFailed")),onFocus:o[4]||(o[4]=c=>e.onFocus(c.target)),onKeydown:o[5]||(o[5]=t.withKeys(c=>e.$emit("enterKeyDown"),["enter"]))}),null,16,["id","aria-invalid","class","type","value","disabled"])),e.showClearButton?(t.openBlock(),t.createBlock(i,{key:1,"aria-label":e.clearButtonAccessibleLabelValue,class:t.normalizeClass(["oc-pr-s oc-position-center-right oc-text-input-btn-clear",{"oc-mr-l":e.type==="date"}]),appearance:"raw",onClick:e.onClear},{default:t.withCtx(()=>[t.createVNode(l,{name:"close",size:"small",variation:"passive"})]),_:1},8,["aria-label","class","onClick"])):t.createCommentVNode("",!0)]),e.showMessageLine?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["oc-text-input-message",{"oc-text-input-description":!!e.descriptionMessage,"oc-text-input-warning":!!e.warningMessage,"oc-text-input-danger":!!e.errorMessage}])},[e.messageText!==null&&e.descriptionMessage?(t.openBlock(),t.createBlock(l,{key:0,name:"information",size:"small","fill-type":"line","accessible-label":"info","aria-hidden":"true"})):t.createCommentVNode("",!0),t.createElementVNode("span",{id:e.messageId,class:t.normalizeClass({"oc-text-input-description":!!e.descriptionMessage,"oc-text-input-warning":!!e.warningMessage,"oc-text-input-danger":!!e.errorMessage}),textContent:t.toDisplayString(e.messageText)},null,10,na)],2)):t.createCommentVNode("",!0),e.type==="password"?(t.openBlock(),t.createBlock(u,{key:1,name:"app.design-system.password-policy"})):t.createCommentVNode("",!0)],2)}typeof Pe=="function"&&Pe(Xt);const X=m(Xt,[["render",aa]]),Qt=t.defineComponent({name:"OcModal",status:"ready",release:"1.3.0",components:{OcButton:w,OcIcon:C,OcTextInput:X,FocusTrap:ut.FocusTrap},props:{elementId:{type:String,required:!1,default:null},elementClass:{type:String,required:!1,default:null},variation:{type:String,required:!1,default:"passive",validator:e=>["passive","primary","danger","success","warning","info"].includes(e)},icon:{type:String,required:!1,default:null},title:{type:String,required:!0},message:{type:String,required:!1,default:null},contextualHelperLabel:{type:String,required:!1,default:""},contextualHelperData:{type:Object,required:!1,default:null},buttonCancelText:{type:String,required:!1,default:"Cancel"},buttonConfirmText:{type:String,required:!1,default:"Confirm"},buttonConfirmDisabled:{type:Boolean,required:!1,default:!1},hideConfirmButton:{type:Boolean,required:!1,default:!1},hasInput:{type:Boolean,required:!1,default:!1},inputType:{type:String,default:"text"},inputValue:{type:String,required:!1,default:null},inputSelectionRange:{type:Array,required:!1,default:null},inputLabel:{type:String,required:!1,default:null},inputDescription:{type:String,required:!1,default:null},inputError:{type:String,required:!1,default:null},focusTrapInitial:{type:[String,Boolean],required:!1,default:null,validator:e=>!(typeof e=="boolean"&&e===!0)},hideActions:{type:Boolean,default:!1},isLoading:{type:Boolean,required:!1,default:!1}},emits:["cancel","confirm","input"],setup(e){const o=t.ref(!1),n=t.ref("filled"),a=t.ref(),s=t.ref(),r=t.computed(()=>({getShadowRoot:!0})),l=()=>{o.value=!1,n.value="filled"},i=()=>{o.value=!0,n.value="outline"};return t.watch(()=>e.isLoading,()=>{if(!e.isLoading)return l();setTimeout(()=>{if(!e.isLoading)return l();i()},700)},{immediate:!0}),{showSpinner:o,buttonConfirmAppearance:n,tabbableOptions:r,ocModal:a,ocModalInput:s}},data(){return{userInputValue:null}},computed:{initialFocusRef(){return this.focusTrapInitial||this.focusTrapInitial===!1?this.focusTrapInitial:()=>{var e;return((e=this.ocModalInput)==null?void 0:e.$el)||this.ocModal}},classes(){return["oc-modal",`oc-modal-${this.variation}`,this.elementClass]},iconName(){if(this.icon)return this.icon;switch(this.variation){case"danger":return"alert";case"warning":return"error-warning";case"success":return"checkbox-circle";case"info":return"information";default:return""}}},watch:{inputValue:{handler:"inputAssignPropAsValue",immediate:!0}},methods:{cancelModalAction(){this.$emit("cancel")},confirm(){this.buttonConfirmDisabled||this.inputError||this.$emit("confirm",this.userInputValue)},inputOnInput(e){this.$emit("input",e)},inputAssignPropAsValue(e){this.userInputValue=e}}}),Me={},ra={class:"oc-modal-background"},sa=["id"],la={class:"oc-modal-title"},ia=["textContent"],ca={class:"oc-modal-body"},da={key:"modal-slot-content",class:"oc-modal-body-message"},ua=["textContent"],pa=["textContent"],ma={key:0,class:"oc-modal-body-actions oc-flex oc-flex-right"},fa={class:"oc-modal-body-actions-grid"};function ha(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-contextual-helper"),u=t.resolveComponent("oc-text-input"),c=t.resolveComponent("oc-button"),k=t.resolveComponent("focus-trap");return t.openBlock(),t.createElementBlock("div",ra,[t.createVNode(k,{active:!0,"initial-focus":e.initialFocusRef,"tabbable-options":e.tabbableOptions},{default:t.withCtx(()=>[t.createElementVNode("div",{id:e.elementId,ref:"ocModal",class:t.normalizeClass(e.classes),tabindex:"0",role:"dialog","aria-modal":"true","aria-labelledby":"oc-modal-title",onKeydown:o[1]||(o[1]=t.withKeys((...f)=>e.cancelModalAction&&e.cancelModalAction(...f),["esc"]))},[t.createElementVNode("div",la,[e.iconName!==""?(t.openBlock(),t.createBlock(l,{key:0,name:e.iconName,variation:e.variation},null,8,["name","variation"])):t.createCommentVNode("",!0),t.createElementVNode("h2",{id:"oc-modal-title",class:"oc-text-truncate",textContent:t.toDisplayString(e.title)},null,8,ia)]),t.createElementVNode("div",ca,[e.$slots.content?(t.openBlock(),t.createElementBlock("div",da,[t.renderSlot(e.$slots,"content")])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.message?(t.openBlock(),t.createElementBlock("p",{key:"modal-message",class:t.normalizeClass(["oc-modal-body-message oc-mt-rm",{"oc-mb-rm":!e.hasInput||e.contextualHelperData}]),textContent:t.toDisplayString(e.message)},null,10,ua)):t.createCommentVNode("",!0),e.contextualHelperData?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["oc-modal-body-contextual-helper",{"oc-mb-rm":!e.hasInput}])},[t.createElementVNode("span",{class:"text",textContent:t.toDisplayString(e.contextualHelperLabel)},null,8,pa),t.createVNode(i,t.mergeProps({class:"oc-pl-xs"},e.contextualHelperData),null,16)],2)):t.createCommentVNode("",!0),e.hasInput?(t.openBlock(),t.createBlock(u,{key:"modal-input",ref:"ocModalInput",modelValue:e.userInputValue,"onUpdate:modelValue":[o[0]||(o[0]=f=>e.userInputValue=f),e.inputOnInput],class:"oc-modal-body-input","error-message":e.inputError,label:e.inputLabel,type:e.inputType,"description-message":e.inputDescription,"fix-message-line":!0,"selection-range":e.inputSelectionRange,onEnterKeyDown:e.confirm},null,8,["modelValue","error-message","label","type","description-message","selection-range","onUpdate:modelValue","onEnterKeyDown"])):t.createCommentVNode("",!0)],64))]),e.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ma,[t.createElementVNode("div",fa,[t.createVNode(c,{class:"oc-modal-body-actions-cancel",variation:"passive",appearance:"outline",disabled:e.isLoading,onClick:e.cancelModalAction},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$gettext(e.buttonCancelText)),1)]),_:1},8,["disabled","onClick"]),e.hideConfirmButton?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(c,{key:0,class:"oc-modal-body-actions-confirm oc-ml-s",variation:"primary",appearance:e.buttonConfirmAppearance,disabled:e.isLoading||e.buttonConfirmDisabled||!!e.inputError,"show-spinner":e.showSpinner,onClick:e.confirm},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$gettext(e.buttonConfirmText)),1)]),_:1},8,["appearance","disabled","show-spinner","onClick"]))])]))],42,sa)]),_:3},8,["initial-focus","tabbable-options"])])}typeof Me=="function"&&Me(Qt);const Jt=m(Qt,[["render",ha]]),Yt=t.defineComponent({name:"OcErrorLog",status:"ready",release:"2.0.0",props:{content:{type:String,required:!0}},setup(e){const{$gettext:o}=_.useGettext(),n=t.ref(!1);return{contentLabel:t.computed(()=>o("Copy the following information and pass them to technical support to troubleshoot the problem:")),showCopied:n,copyContentToClipboard:()=>{navigator.clipboard.writeText(e.content),n.value=!0,setTimeout(()=>n.value=!1,500)}}}}),ze={},ga={class:"oc-error-log"},ya={class:"oc-flex oc-flex-between oc-mt-s"},ba={class:"oc-flex"},ka={key:0,class:"oc-flex oc-flex-middle"},$a=["textContent"];function va(e,o,n,a,s,r){const l=t.resolveComponent("oc-textarea"),i=t.resolveComponent("oc-icon"),u=t.resolveComponent("oc-button");return t.openBlock(),t.createElementBlock("div",ga,[t.createVNode(l,{class:"oc-error-log-textarea oc-mt-s oc-text-small",label:e.contentLabel,"model-value":e.content,rows:"4",readonly:""},null,8,["label","model-value"]),t.createElementVNode("div",ya,[t.createElementVNode("div",ba,[e.showCopied?(t.openBlock(),t.createElementBlock("div",ka,[t.createVNode(i,{variation:"success",name:"checkbox-circle"}),t.createElementVNode("p",{class:"oc-error-log-content-copied oc-ml-s oc-my-rm",textContent:t.toDisplayString(e.$gettext("Copied"))},null,8,$a)])):t.createCommentVNode("",!0)]),t.createVNode(u,{size:"small",variation:"primary",appearance:"filled",onClick:e.copyContentToClipboard},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.$gettext("Copy")),1)]),_:1},8,["onClick"])])])}typeof ze=="function"&&ze(Yt);const Q=m(Yt,[["render",va]]),Zt=t.defineComponent({name:"OcNotificationMessage",status:"ready",release:"1.0.0",components:{OcErrorLog:Q,OcIcon:C,OcButton:w},props:{status:{type:String,required:!1,default:"passive",validator:e=>["passive","primary","success","warning","danger"].includes(e)},title:{type:String,required:!0},message:{type:String,required:!1,default:null},errorLogContent:{type:String,required:!1,default:null},timeout:{type:Number,required:!1,default:5,validator:e=>e>0}},emits:["close"],setup:function(){return{showErrorLog:t.ref(!1)}},computed:{classes(){return`oc-notification-message-${this.status}`},iconVariation(){return this.status},isStatusDanger(){return this.status==="danger"},role(){return this.isStatusDanger?"alert":"status"},ariaLive(){return this.isStatusDanger?"assertive":"polite"}},mounted(){this.timeout!==0&&setTimeout(()=>{this.close()},this.timeout*1e3)},methods:{close(){this.$emit("close")}}}),Ae={},Ca=["role","aria-live"],wa={class:"oc-flex oc-flex-middle oc-flex-between oc-width-1-1"},Sa={class:"oc-flex oc-flex-middle"},Ba={class:"oc-notification-message-title"},Oa={key:0,class:"oc-flex oc-flex-between oc-width-1-1 oc-mt-s"},Ea=["textContent"],Va=["textContent"];function _a(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-button"),u=t.resolveComponent("oc-error-log");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["oc-fade-in oc-flex oc-flex-wrap oc-notification-message oc-box-shadow-medium oc-rounded oc-p-m",e.classes])},[t.createElementVNode("div",{class:"oc-flex oc-flex-wrap oc-flex-middle oc-flex-1",role:e.role,"aria-live":e.ariaLive},[t.createElementVNode("div",wa,[t.createElementVNode("div",Sa,[t.createVNode(l,{variation:e.iconVariation,name:"information","fill-type":"line",class:"oc-mr-s"},null,8,["variation"]),t.createElementVNode("div",Ba,t.toDisplayString(e.title),1)]),t.createVNode(i,{appearance:"raw","aria-label":e.$gettext("Close"),onClick:e.close},{default:t.withCtx(()=>[t.createVNode(l,{name:"close"})]),_:1},8,["aria-label","onClick"])]),e.message||e.errorLogContent?(t.openBlock(),t.createElementBlock("div",Oa,[e.message?(t.openBlock(),t.createElementBlock("span",{key:0,class:"oc-notification-message-content oc-text-muted oc-mr-s",textContent:t.toDisplayString(e.message)},null,8,Ea)):t.createCommentVNode("",!0),e.errorLogContent?(t.openBlock(),t.createBlock(i,{key:1,class:"oc-notification-message-error-log-toggle-button","gap-size":"none",appearance:"raw",onClick:o[0]||(o[0]=c=>e.showErrorLog=!e.showErrorLog)},{default:t.withCtx(()=>[t.createElementVNode("span",{textContent:t.toDisplayString(e.$gettext("Details"))},null,8,Va),t.createVNode(l,{name:e.showErrorLog?"arrow-up-s":"arrow-down-s"},null,8,["name"])]),_:1})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showErrorLog?(t.openBlock(),t.createBlock(u,{key:1,class:"oc-mt-m",content:e.errorLogContent},null,8,["content"])):t.createCommentVNode("",!0)],8,Ca)],2)}typeof Ae=="function"&&Ae(Zt);const eo=m(Zt,[["render",_a]]),to=t.defineComponent({name:"OcNotifications",status:"ready",release:"1.0.0",props:{position:{type:String,required:!1,default:"default",validator:e=>["default","top-left","top-center","top-right"].includes(e)}},computed:{classes(){return`oc-notification-${this.position}`}}}),Fe={};function Da(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["oc-notification oc-mb-s",e.classes])},[t.renderSlot(e.$slots,"default")],2)}typeof Fe=="function"&&Fe(to);const oo=m(to,[["render",Da]]);var Ta=Object.defineProperty,Na=Object.defineProperties,qa=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,La=Object.prototype.hasOwnProperty,Ia=Object.prototype.propertyIsEnumerable,He=(e,o,n)=>o in e?Ta(e,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[o]=n,V=(e,o)=>{for(var n in o||(o={}))La.call(o,n)&&He(e,n,o[n]);if(Re)for(var n of Re(o))Ia.call(o,n)&&He(e,n,o[n]);return e},je=(e,o)=>Na(e,qa(o));const Pa={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(e){this.autoscroll&&e&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var e;const o=((e=this.$refs.dropdownMenu)==null?void 0:e.children[this.typeAheadPointer])||!1;if(o){const n=this.getDropdownViewport(),{top:a,bottom:s,height:r}=o.getBoundingClientRect();if(a<n.top)return this.$refs.dropdownMenu.scrollTop=o.offsetTop;if(s>n.bottom)return this.$refs.dropdownMenu.scrollTop=o.offsetTop-(n.height-r)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},Ma={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let e=0;e<this.filteredOptions.length;e++)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},open(e){e&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let e=this.typeAheadPointer-1;e>=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown(){for(let e=this.typeAheadPointer+1;e<this.filteredOptions.length;e++)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadSelect(){const e=this.filteredOptions[this.typeAheadPointer];e&&this.selectable(e)&&this.select(e)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},za={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(e){this.mutableLoading=e}},methods:{toggleLoading(e=null){return e==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=e}}},J=(e,o)=>{const n=e.__vccOpts||e;for(const[a,s]of o)n[a]=s;return n},Aa={},Fa={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},Ra=t.createElementVNode("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),Ha=[Ra];function ja(e,o){return t.openBlock(),t.createElementBlock("svg",Fa,Ha)}const xa=J(Aa,[["render",ja]]),Ka={},Ga={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Ua=t.createElementVNode("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),Wa=[Ua];function Xa(e,o){return t.openBlock(),t.createElementBlock("svg",Ga,Wa)}const Qa=J(Ka,[["render",Xa]]),xe={Deselect:xa,OpenIndicator:Qa},Ja={mounted(e,{instance:o}){if(o.appendToBody){const{height:n,top:a,left:s,width:r}=o.$refs.toggle.getBoundingClientRect();let l=window.scrollX||window.pageXOffset,i=window.scrollY||window.pageYOffset;e.unbindPosition=o.calculatePosition(e,o,{width:r+"px",left:l+s+"px",top:i+a+n+"px"}),document.body.appendChild(e)}},unmounted(e,{instance:o}){o.appendToBody&&(e.unbindPosition&&typeof e.unbindPosition=="function"&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}};function Ya(e){const o={};return Object.keys(e).sort().forEach(n=>{o[n]=e[n]}),JSON.stringify(o)}let Za=0;function er(){return++Za}const tr={components:V({},xe),directives:{appendToBody:Ja},mixins:[Pa,Ma,za],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:e=>e},selectable:{type:Function,default:e=>!0},getOptionLabel:{type:Function,default(e){return typeof e=="object"?e.hasOwnProperty(this.label)?e[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(e)}.
https://vue-select.org/api/props.html#getoptionlabel`):e}},getOptionKey:{type:Function,default(e){if(typeof e!="object")return e;try{return e.hasOwnProperty("id")?e.id:Ya(e)}catch(o){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option.
https://vue-select.org/api/props.html#getoptionkey`,e,o)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(e,o,n){return(o||"").toLocaleLowerCase().indexOf(n.toLocaleLowerCase())>-1}},filter:{type:Function,default(e,o){return e.filter(n=>{let a=this.getOptionLabel(n);return typeof a=="number"&&(a=a.toString()),this.filterBy(n,a,o)})}},createOption:{type:Function,default(e){return typeof this.optionList[0]=="object"?{[this.label]:e}:e}},resetOnOptionsChange:{default:!1,validator:e=>["function","boolean"].includes(typeof e)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:e,multiple:o}){return e&&!o}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(e,o)=>e},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(e,o,{width:n,top:a,left:s}){e.style.top=a,e.style.left=s,e.style.width=n}},dropdownShouldOpen:{type:Function,default({noDrop:e,open:o,mutableLoading:n}){return e?!1:o&&!n}},uid:{type:[String,Number],default:()=>er()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let e=this.modelValue;return this.isTrackingValues&&(e=this.$data._value),e!=null&&e!==""?[].concat(e):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const e={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:V({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:o=>this.search=o.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:e,listFooter:e,header:je(V({},e),{deselect:this.deselect}),footer:je(V({},e),{deselect:this.deselect})}},childComponents(){return V(V({},xe),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const e=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return e;const o=this.search.length?this.filter(e,this.search,this):e;if(this.taggable&&this.search.length){const n=this.createOption(this.search);this.optionExists(n)||o.unshift(n)}return o},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(e,o){const n=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(e,o,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&n()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(e){this.isTrackingValues&&this.setInternalValueFromOptions(e)}},multiple(){this.clearSelection()},open(e){this.$emit(e?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(e){Array.isArray(e)?this.$data._value=e.map(o=>this.findOptionFromReducedValue(o)):this.$data._value=this.findOptionFromReducedValue(e)},select(e){this.$emit("option:selecting",e),this.isOptionSelected(e)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(e):(this.taggable&&!this.optionExists(e)&&(this.$emit("option:created",e),this.pushTag(e)),this.multiple&&(e=this.selectedValue.concat(e)),this.updateValue(e),this.$emit("option:selected",e)),this.onAfterSelect(e)},deselect(e){this.$emit("option:deselecting",e),this.updateValue(this.selectedValue.filter(o=>!this.optionComparator(o,e))),this.$emit("option:deselected",e)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(e){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(e){typeof this.modelValue>"u"&&(this.$data._value=e),e!==null&&(Array.isArray(e)?e=e.map(o=>this.reduce(o)):e=this.reduce(e)),this.$emit("update:modelValue",e)},toggleDropdown(e){const o=e.target!==this.searchEl;o&&e.preventDefault();const n=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||n.filter(Boolean).some(a=>a.contains(e.target)||a===e.target)){e.preventDefault();return}this.open&&o?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(e){return this.selectedValue.some(o=>this.optionComparator(o,e))},isOptionDeselectable(e){return this.isOptionSelected(e)&&this.deselectFromDropdown},optionComparator(e,o){return this.getOptionKey(e)===this.getOptionKey(o)},findOptionFromReducedValue(e){const o=a=>JSON.stringify(this.reduce(a))===JSON.stringify(e),n=[...this.options,...this.pushedTags].filter(o);return n.length===1?n[0]:n.find(a=>this.optionComparator(a,this.$data._value))||e},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let e=null;this.multiple&&(e=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(e)}},optionExists(e){return this.optionList.some(o=>this.optionComparator(o,e))},normalizeOptionForSlot(e){return typeof e=="object"?e:{[this.label]:e}},pushTag(e){this.pushedTags.push(e)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:e,multiple:o}=this;this.clearSearchOnBlur({clearSearchOnSelect:e,multiple:o})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(e){const o=s=>(s.preventDefault(),!this.isComposing&&this.typeAheadSelect()),n={8:s=>this.maybeDeleteValue(),9:s=>this.onTab(),27:s=>this.onEscape(),38:s=>(s.preventDefault(),this.typeAheadUp()),40:s=>(s.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(s=>n[s]=o);const a=this.mapKeydown(n,this);if(typeof a[e.keyCode]=="function")return a[e.keyCode](e)}}},or=["dir"],nr=["id","aria-expanded","aria-owns"],ar={ref:"selectedOptions",class:"vs__selected-options"},rr=["disabled","title","aria-label","onClick"],sr={ref:"actions",class:"vs__actions"},lr=["disabled"],ir={class:"vs__spinner"},cr=["id"],dr=["id","aria-selected","onMouseover","onClick"],ur={key:0,class:"vs__no-options"},pr=t.createTextVNode(" Sorry, no matching options. "),mr=["id"];function fr(e,o,n,a,s,r){const l=t.resolveDirective("append-to-body");return t.openBlock(),t.createElementBlock("div",{dir:n.dir,class:t.normalizeClass(["v-select",r.stateClasses])},[t.renderSlot(e.$slots,"header",t.normalizeProps(t.guardReactiveProps(r.scope.header))),t.createElementVNode("div",{id:`vs${n.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":r.dropdownOpen.toString(),"aria-owns":`vs${n.uid}__listbox`,"aria-label":"Search for option",onMousedown:o[1]||(o[1]=i=>r.toggleDropdown(i))},[t.createElementVNode("div",ar,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.selectedValue,(i,u)=>t.renderSlot(e.$slots,"selected-option-container",{option:r.normalizeOptionForSlot(i),deselect:r.deselect,multiple:n.multiple,disabled:n.disabled},()=>[(t.openBlock(),t.createElementBlock("span",{key:n.getOptionKey(i),class:"vs__selected"},[t.renderSlot(e.$slots,"selected-option",t.normalizeProps(t.guardReactiveProps(r.normalizeOptionForSlot(i))),()=>[t.createTextVNode(t.toDisplayString(n.getOptionLabel(i)),1)]),n.multiple?(t.openBlock(),t.createElementBlock("button",{key:0,ref_for:!0,ref:c=>s.deselectButtons[u]=c,disabled:n.disabled,type:"button",class:"vs__deselect",title:`Deselect ${n.getOptionLabel(i)}`,"aria-label":`Deselect ${n.getOptionLabel(i)}`,onClick:c=>r.deselect(i)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.childComponents.Deselect)))],8,rr)):t.createCommentVNode("",!0)]))])),256)),t.renderSlot(e.$slots,"search",t.normalizeProps(t.guardReactiveProps(r.scope.search)),()=>[t.createElementVNode("input",t.mergeProps({class:"vs__search"},r.scope.search.attributes,t.toHandlers(r.scope.search.events)),null,16)])],512),t.createElementVNode("div",sr,[t.withDirectives(t.createElementVNode("button",{ref:"clearButton",disabled:n.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:o[0]||(o[0]=(...i)=>r.clearSelection&&r.clearSelection(...i))},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.childComponents.Deselect)))],8,lr),[[t.vShow,r.showClearButton]]),t.renderSlot(e.$slots,"open-indicator",t.normalizeProps(t.guardReactiveProps(r.scope.openIndicator)),()=>[n.noDrop?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.childComponents.OpenIndicator),t.normalizeProps(t.mergeProps({key:0},r.scope.openIndicator.attributes)),null,16))]),t.renderSlot(e.$slots,"spinner",t.normalizeProps(t.guardReactiveProps(r.scope.spinner)),()=>[t.withDirectives(t.createElementVNode("div",ir,"Loading...",512),[[t.vShow,e.mutableLoading]])])],512)],40,nr),t.createVNode(t.Transition,{name:n.transition},{default:t.withCtx(()=>[r.dropdownOpen?t.withDirectives((t.openBlock(),t.createElementBlock("ul",{id:`vs${n.uid}__listbox`,ref:"dropdownMenu",key:`vs${n.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:o[2]||(o[2]=t.withModifiers((...i)=>r.onMousedown&&r.onMousedown(...i),["prevent"])),onMouseup:o[3]||(o[3]=(...i)=>r.onMouseUp&&r.onMouseUp(...i))},[t.renderSlot(e.$slots,"list-header",t.normalizeProps(t.guardReactiveProps(r.scope.listHeader))),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.filteredOptions,(i,u)=>(t.openBlock(),t.createElementBlock("li",{id:`vs${n.uid}__option-${u}`,key:n.getOptionKey(i),role:"option",class:t.normalizeClass(["vs__dropdown-option",{"vs__dropdown-option--deselect":r.isOptionDeselectable(i)&&u===e.typeAheadPointer,"vs__dropdown-option--selected":r.isOptionSelected(i),"vs__dropdown-option--highlight":u===e.typeAheadPointer,"vs__dropdown-option--disabled":!n.selectable(i)}]),"aria-selected":u===e.typeAheadPointer?!0:null,onMouseover:c=>n.selectable(i)?e.typeAheadPointer=u:null,onClick:t.withModifiers(c=>n.selectable(i)?r.select(i):null,["prevent","stop"])},[t.renderSlot(e.$slots,"option",t.normalizeProps(t.guardReactiveProps(r.normalizeOptionForSlot(i))),()=>[t.createTextVNode(t.toDisplayString(n.getOptionLabel(i)),1)])],42,dr))),128)),r.filteredOptions.length===0?(t.openBlock(),t.createElementBlock("li",ur,[t.renderSlot(e.$slots,"no-options",t.normalizeProps(t.guardReactiveProps(r.scope.noOptions)),()=>[pr])])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"list-footer",t.normalizeProps(t.guardReactiveProps(r.scope.listFooter)))],40,cr)),[[l]]):(t.openBlock(),t.createElementBlock("ul",{key:1,id:`vs${n.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,mr))]),_:3},8,["name"]),t.renderSlot(e.$slots,"footer",t.normalizeProps(t.guardReactiveProps(r.scope.footer)))],10,or)}const hr=J(tr,[["render",fr]]),no=t.defineComponent({name:"OcSelect",status:"ready",release:"4.3.0",components:{VueSelect:hr},inheritAttrs:!0,props:{id:{type:String,required:!1,default:()=>p.uniqueId("oc-select-")},filter:{type:Function,required:!1,default:(e,o,n)=>{if(e.length<1)return[];const a=new xo(e,{...n.label&&{keys:[n.label]},shouldSort:!0,threshold:0,ignoreLocation:!0,distance:100,minMatchCharLength:1});return o.length?a.search(o).map(({item:s})=>s):e}},disabled:{type:Boolean,required:!1,default:!1},label:{type:String,required:!0},labelHidden:{type:Boolean,required:!1,default:!1},contextualHelper:{type:Object,required:!1,default:null},optionLabel:{type:String,default:"label"},getOptionLabel:{type:Function,default(e){if(typeof e=="object"){const o=this.optionLabel||this.label;return e.hasOwnProperty(o)?e[o]:console.warn(`[vue-select warn]: Label key "option.${o}" does not exist in options object ${JSON.stringify(e)}.
https://vue-select.org/api/props.html#getoptionlabel`)}return e}},searchable:{type:Boolean,required:!1,default:!0},clearable:{type:Boolean,required:!1,default:!1},loading:{type:Boolean,required:!1,default:!1},warningMessage:{type:String,default:null},errorMessage:{type:String,default:null},fixMessageLine:{type:Boolean,default:!1},descriptionMessage:{type:String,default:null},multiple:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},positionFixed:{type:Boolean,default:!1}},emits:["search:input","update:modelValue"],setup(e,{emit:o}){const{$gettext:n}=_.useGettext(),a=t.ref(),s=()=>{const y=t.unref(a).$el.querySelector("div:first-child");y==null||y.setAttribute("aria-label",`${e.label} - ${n("Search for option")}`)},r=y=>{o("search:input",y.target.value)},l=t.ref(!1),i=y=>{l.value=y},u=({noDrop:y,open:v,mutableLoading:g})=>!y&&v&&!g&&t.unref(l),c=()=>{i(!0)},k=()=>{i(!1)},f=async()=>{const v=t.unref(a).$refs.dropdownMenu.querySelectorAll("li")[t.unref(a).typeAheadPointer];v&&(await t.nextTick(),v.classList.add("keyboard-outline"))},$=y=>({...y,13:v=>{if(!t.unref(l)){i(!0);return}y[13](v),t.unref(a).searchEl.focus()},40:async v=>{v.preventDefault(),t.unref(a).typeAheadDown(),t.unref(h)&&await f()},38:async v=>{v.preventDefault(),t.unref(a).typeAheadUp(),t.unref(h)&&await f()}}),d=async y=>{if(y.key==="Enter"||y.key==="Tab"){t.unref(h)&&await f();return}i(!0)},b=()=>{const y=t.unref(a).$refs.dropdownMenu;if(!y)return;const v=t.unref(a).$refs.toggle.getBoundingClientRect(),S=Math.min(window.innerHeight-v.bottom-25,window.innerHeight);y.style.maxHeight=`${S}px`,y.style.width=`${v.width}px`,y.style.top=`${v.top+v.height+1}px`,y.style.left=`${v.left}px`},h=t.computed(()=>{var y;return(y=t.unref(a))==null?void 0:y.dropdownOpen});return t.watch(h,async()=>{e.positionFixed&&t.unref(h)&&(await t.nextTick(),b())}),t.onMounted(()=>{s(),e.positionFixed&&window.addEventListener("resize",b)}),t.onBeforeUnmount(()=>{e.positionFixed&&window.removeEventListener("resize",b)}),{select:a,userInput:r,selectDropdownShouldOpen:u,selectMapKeydown:$,onSelectKeyDown:d,onSelectBlur:k,onSelectClick:c}},computed:{additionalAttributes(){const e={};return e["input-id"]=this.id,e.getOptionLabel=this.getOptionLabel,e.label=this.optionLabel,{...this.$attrs,...e}},showMessageLine(){return this.fixMessageLine||!!this.warningMessage||!!this.errorMessage||!!this.descriptionMessage},messageText(){return this.errorMessage?this.errorMessage:this.warningMessage?this.warningMessage:this.descriptionMessage},messageId(){return`${this.id}-message`}}}),Ke={},gr=["for","textContent"],yr=["textContent"],br={key:0,class:"oc-flex oc-flex-middle oc-ml-s oc-mr-xs"},kr=["id","textContent"];function $r(e,o,n,a,s,r){var f,$;const l=t.resolveComponent("oc-contextual-helper"),i=t.resolveComponent("oc-spinner"),u=t.resolveComponent("oc-icon"),c=t.resolveComponent("oc-button"),k=t.resolveComponent("vue-select");return t.openBlock(),t.createElementBlock("div",null,[e.labelHidden?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("label",{key:0,"aria-hidden":!0,for:e.id,class:"oc-label",textContent:t.toDisplayString(e.label)},null,8,gr)),(f=e.contextualHelper)!=null&&f.isEnabled?(t.openBlock(),t.createBlock(l,t.mergeProps({key:1},($=e.contextualHelper)==null?void 0:$.data,{class:"oc-pl-xs"}),null,16)):t.createCommentVNode("",!0),t.createVNode(k,t.mergeProps({ref:"select",disabled:e.disabled||e.readOnly,filter:e.filter,loading:e.loading,searchable:e.searchable,clearable:e.clearable,multiple:e.multiple,class:["oc-select",{"oc-select-position-fixed":e.positionFixed}],style:{background:"transparent"},"dropdown-should-open":e.selectDropdownShouldOpen,"map-keydown":e.selectMapKeydown},e.additionalAttributes,{"onUpdate:modelValue":o[2]||(o[2]=d=>e.$emit("update:modelValue",d)),onClick:o[3]||(o[3]=d=>e.onSelectClick()),"onSearch:blur":o[4]||(o[4]=d=>e.onSelectBlur()),onKeydown:o[5]||(o[5]=d=>e.onSelectKeyDown(d))}),t.createSlots({search:t.withCtx(({attributes:d,events:b})=>[t.createElementVNode("input",t.mergeProps({class:"vs__search"},d,{onInput:o[0]||(o[0]=(...h)=>e.userInput&&e.userInput(...h))},t.toHandlers(b,!0)),null,16)]),"no-options":t.withCtx(()=>[t.createElementVNode("div",{textContent:t.toDisplayString(e.$gettext("No options available."))},null,8,yr)]),spinner:t.withCtx(({loading:d})=>[d?(t.openBlock(),t.createBlock(i,{key:0})):t.createCommentVNode("",!0)]),"selected-option-container":t.withCtx(({option:d,deselect:b})=>[t.createElementVNode("span",{class:t.normalizeClass(["vs__selected",{"vs__selected-readonly":d.readonly}])},[t.renderSlot(e.$slots,"selected-option",t.normalizeProps(t.guardReactiveProps(d)),()=>[e.readOnly?(t.openBlock(),t.createBlock(u,{key:0,name:"lock",class:"oc-mr-xs",size:"small"})):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.getOptionLabel(d)),1)]),e.multiple?(t.openBlock(),t.createElementBlock("span",br,[d.readonly?(t.openBlock(),t.createBlock(u,{key:0,class:"vs__deselect-lock",name:"lock",size:"small"})):(t.openBlock(),t.createBlock(c,{key:1,appearance:"raw",title:e.$gettext("Deselect %{label}",{label:e.getOptionLabel(d)}),"aria-label":e.$gettext("Deselect %{label}",{label:e.getOptionLabel(d)}),class:"vs__deselect oc-mx-rm",onMousedown:o[1]||(o[1]=t.withModifiers(()=>{},["stop","prevent"])),onClick:h=>b(d)},{default:t.withCtx(()=>[t.createVNode(u,{name:"close",size:"small"})]),_:2},1032,["title","aria-label","onClick"]))])):t.createCommentVNode("",!0)],2)]),_:2},[t.renderList(e.$slots,(d,b)=>({name:b,fn:t.withCtx(h=>[b!=="search"?t.renderSlot(e.$slots,b,t.normalizeProps(t.mergeProps({key:0},h))):t.createCommentVNode("",!0)])}))]),1040,["disabled","filter","loading","searchable","clearable","multiple","class","dropdown-should-open","map-keydown"]),e.showMessageLine?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["oc-text-input-message",{"oc-text-input-description":!!e.descriptionMessage,"oc-text-input-warning":!!e.warningMessage,"oc-text-input-danger":!!e.errorMessage}])},[e.messageText!==null&&e.descriptionMessage?(t.openBlock(),t.createBlock(u,{key:0,name:"information",size:"small","fill-type":"line"})):t.createCommentVNode("",!0),t.createElementVNode("span",{id:e.messageId,class:t.normalizeClass({"oc-text-input-description":!!e.descriptionMessage,"oc-text-input-warning":!!e.warningMessage,"oc-text-input-danger":!!e.errorMessage}),textContent:t.toDisplayString(e.messageText)},null,10,kr)],2)):t.createCommentVNode("",!0)])}typeof Ke=="function"&&Ke(no);const Y=m(no,[["render",$r]]),ao=t.defineComponent({name:"OcPageSize",status:"ready",release:"8.0.0",components:{OcSelect:Y},props:{options:{type:Array,required:!0},label:{type:String,required:!0},selected:{type:[String,Number],required:!0},selectId:{type:String,required:!1,default:()=>p.uniqueId("oc-page-size-")}},emits:["change"],methods:{emitChange(e){this.$emit("change",e)}}}),Ge={},vr={class:"oc-page-size"},Cr=["for","textContent"];function wr(e,o,n,a,s,r){const l=t.resolveComponent("oc-select");return t.openBlock(),t.createElementBlock("div",vr,[t.createElementVNode("label",{class:"oc-page-size-label",for:e.selectId,"data-testid":"oc-page-size-label","aria-hidden":!0,textContent:t.toDisplayString(e.label)},null,8,Cr),t.createVNode(l,{"input-id":e.selectId,class:"oc-page-size-select","data-testid":"oc-page-size-select","model-value":e.selected,label:e.label,"label-hidden":!0,options:e.options,clearable:!1,searchable:!1,"onUpdate:modelValue":e.emitChange},null,8,["input-id","model-value","label","options","onUpdate:modelValue"])])}typeof Ge=="function"&&Ge(ao);const ro=m(ao,[["render",wr]]),so=t.defineComponent({name:"OcPagination",status:"ready",release:"7.2.0",components:{OcIcon:C},props:{pages:{type:Number,required:!0},currentPage:{type:Number,required:!0},maxDisplayed:{type:Number,required:!1,default:null,validator:e=>e%2===0?(console.error("maxDisplayed needs to be an odd number"),!1):!0},currentRoute:{type:Object,required:!0}},computed:{displayedPages(){let e=[];for(let o=0;o<this.pages;o++)e.push(o+1);if(this.maxDisplayed&&this.maxDisplayed+1<this.pages){const o=this.$_currentPage-1,n=Math.floor(this.maxDisplayed/2);return e=e.slice(Math.max(0,o-n),o+n+1),this.$_currentPage>2&&(Number(e[0])>2?e.unshift(1,"..."):e.unshift(1)),this.$_currentPage<this.pages-1&&(Number(e[e.length-1])<this.pages-1?e.push("...",this.pages):e.push(this.pages)),e}return e},isPrevPageAvailable(){return this.$_currentPage>1},isNextPageAvailable(){return this.$_currentPage<this.pages},previousPageLink(){return this.bindPageLink(this.$_currentPage-1)},nextPageLink(){return this.bindPageLink(this.$_currentPage+1)},$_currentPage(){return Math.max(1,Math.min(this.currentPage,this.pages))}},methods:{pageLabel(e){return this.$gettext("Go to page %{ page }",{page:e.toString()})},isCurrentPage(e){return this.$_currentPage===e},pageComponent(e){return e==="..."||this.isCurrentPage(e)?"span":"router-link"},bindPageProps(e){if(e==="...")return;if(this.isCurrentPage(e))return{"aria-current":"page"};const o=this.bindPageLink(e);return{"aria-label":this.pageLabel(e),to:o}},pageClass(e){const o=["oc-pagination-list-item-page"];return this.isCurrentPage(e)?o.push("oc-pagination-list-item-current"):e==="..."?o.push("oc-pagination-list-item-ellipsis"):o.push("oc-pagination-list-item-link"),o},bindPageLink(e){return{name:this.currentRoute.name,query:{...this.currentRoute.query,page:e},params:this.currentRoute.params}}}}),Ue={},Sr=["aria-label"],Br={class:"oc-pagination-list"},Or={key:0,class:"oc-pagination-list-item"},Er={key:1,class:"oc-pagination-list-item"};function Vr(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("router-link");return t.openBlock(),t.createElementBlock("nav",{class:"oc-pagination","aria-label":e.$gettext("Pagination")},[t.createElementVNode("ol",Br,[e.isPrevPageAvailable?(t.openBlock(),t.createElementBlock("li",Or,[t.createVNode(i,{class:"oc-pagination-list-item-prev","aria-label":e.$gettext("Go to the previous page"),to:e.previousPageLink},{default:t.withCtx(()=>[t.createVNode(l,{name:"arrow-drop-left","fill-type":"line"})]),_:1},8,["aria-label","to"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.displayedPages,(u,c)=>(t.openBlock(),t.createElementBlock("li",{key:c,class:"oc-pagination-list-item"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.pageComponent(u)),t.mergeProps({class:e.pageClass(u),ref_for:!0},e.bindPageProps(u)),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(u),1)]),_:2},1040,["class"]))]))),128)),e.isNextPageAvailable?(t.openBlock(),t.createElementBlock("li",Er,[t.createVNode(i,{class:"oc-pagination-list-item-next","aria-label":e.$gettext("Go to the next page"),to:e.nextPageLink},{default:t.withCtx(()=>[t.createVNode(l,{name:"arrow-drop-right","fill-type":"line"})]),_:1},8,["aria-label","to"])])):t.createCommentVNode("",!0)])],8,Sr)}typeof Ue=="function"&&Ue(so);const lo=m(so,[["render",Vr]]),io=t.defineComponent({name:"OcProgress",status:"ready",release:"1.0.0",props:{value:{type:Number,required:!1,default:0},max:{type:Number,required:!1,default:void 0,validator:e=>e>0},size:{type:String,required:!1,default:"default",validator:e=>["default","small"].includes(e)},variation:{type:String,required:!1,default:"primary",validator:e=>["primary","passive","success","warning","danger"].includes(e)},indeterminate:{type:Boolean,required:!1,default:!1}},computed:{classes(){return`oc-progress oc-progress-${this.size} oc-progress-${this.variation}`},progressValue(){return this.max?`${this.value/this.max*100}%`:"-"}}}),We={},_r=["aria-valuemax","aria-valuenow"],Dr={key:1,class:"oc-progress-indeterminate"};function Tr(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.classes),"aria-valuemax":e.max,"aria-valuenow":e.value,"aria-busy":"true","aria-valuemin":"0",role:"progressbar"},[e.indeterminate?(t.openBlock(),t.createElementBlock("div",Dr,o[0]||(o[0]=[t.createElementVNode("div",{class:"oc-progress-indeterminate-first"},null,-1),t.createElementVNode("div",{class:"oc-progress-indeterminate-second"},null,-1)]))):(t.openBlock(),t.createElementBlock("div",{key:0,class:"oc-progress-current",style:t.normalizeStyle({width:e.progressValue})},null,4))],10,_r)}typeof We=="function"&&We(io);const co=m(io,[["render",Tr]]),uo=t.defineComponent({name:"OcProgressPie",status:"ready",release:"1.0.0",props:{progress:{type:Number,default:0,required:!0,validator:e=>e>=0&&e<=100},max:{type:Number,default:100},showLabel:{type:Boolean,default:!1}},computed:{_fill(){return Math.round(100/this.max*this.progress)},_label(){return this.max===100?this.progress+"%":`${this.progress}/${this.max}`}}}),Xe={},Nr=["data-fill"],qr=["textContent"];function Lr(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("div",{class:"oc-progress-pie","data-fill":e._fill},[o[0]||(o[0]=t.createElementVNode("div",{class:"oc-progress-pie-container"},null,-1)),e.showLabel?(t.openBlock(),t.createElementBlock("label",{key:0,class:"oc-progress-pie-label oc-text-muted",textContent:t.toDisplayString(e._label)},null,8,qr)):t.createCommentVNode("",!0)],8,Nr)}typeof Xe=="function"&&Xe(uo);const po=m(uo,[["render",Lr]]),mo=t.defineComponent({name:"OcRadio",status:"ready",release:"1.0.0",props:{id:{type:String,required:!1,default:()=>p.uniqueId("oc-radio-")},disabled:{type:Boolean,default:!1},modelValue:{type:[String,Number,Boolean,Object],required:!1,default:!1},option:{required:!1,default:null},label:{type:String,required:!0,default:null},hideLabel:{type:Boolean,required:!1,default:!1},size:{type:String,required:!1,default:"medium",validator:e=>["small","medium","large"].includes(e)}},emits:["update:modelValue"],computed:{model:{get(){return this.modelValue},set(e){this.$emit("update:modelValue",e)}},classes(){return["oc-radio","oc-radio-"+p.getSizeClass(this.size)]},labelClasses(){return{"oc-invisible-sr":this.hideLabel,"oc-cursor-pointer":!this.disabled}}}}),Qe={},Ir=["id","aria-checked","value","disabled"],Pr=["for","textContent"];function Mr(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("span",null,[t.withDirectives(t.createElementVNode("input",{id:e.id,"onUpdate:modelValue":o[0]||(o[0]=l=>e.model=l),type:"radio",name:"radio",class:t.normalizeClass(e.classes),"aria-checked":e.option===e.modelValue,value:e.option,disabled:e.disabled},null,10,Ir),[[t.vModelRadio,e.model]]),t.createElementVNode("label",{for:e.id,class:t.normalizeClass(e.labelClasses),textContent:t.toDisplayString(e.label)},null,10,Pr)])}typeof Qe=="function"&&Qe(mo);const fo=m(mo,[["render",Mr]]),ho=t.defineComponent({name:"OcSpinner",status:"ready",release:"1.0.0",props:{ariaLabel:{type:String,required:!1,default:""},size:{type:String,default:"medium",validator:e=>["xsmall","small","medium","large","xlarge","xxlarge","xxxlarge"].includes(e)}},computed:{$_ocSpinner_class(){return["oc-spinner",`oc-spinner-${p.getSizeClass(this.size)}`]}}}),Je={},zr=["aria-label"];function Ar(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(e.$_ocSpinner_class),"aria-label":e.ariaLabel,tabindex:"-1",role:"img"},null,10,zr)}typeof Je=="function"&&Je(ho);const F=m(ho,[["render",Ar]]),go=t.defineComponent({name:"OcRecipient",status:"ready",release:"8.2.0",components:{OcAvatar:z,OcIcon:C,OcSpinner:F},props:{recipient:{type:Object,required:!0,validator:e=>{if(!Object.prototype.hasOwnProperty.call(e,"name"))throw new Error("Recipient name is not defined");if(typeof e.name!="string")throw new Error("Recipient name is not a string");if(e.name.length<1)throw new Error("Recipient name is empty");if(Object.prototype.hasOwnProperty.call(e,"icon")){if(!Object.prototype.hasOwnProperty.call(e.icon,"name"))throw new Error("Recipient icon name is not defined");if(typeof e.icon.name!="string")throw new Error("Recipient icon name is not a string");if(e.icon.name.length<1)throw new Error("Recipient icon name is empty");if(!Object.prototype.hasOwnProperty.call(e.icon,"label"))throw new Error("Recipient icon label is not defined");if(typeof e.icon.label!="string")throw new Error("Recipient icon label is not a string");if(e.icon.label.length<1)throw new Error("Recipient icon label is empty")}return!0}}}}),Ye={},Fr={class:"oc-recipient"},Rr=["textContent"];function Hr(e,o,n,a,s,r){const l=t.resolveComponent("oc-spinner"),i=t.resolveComponent("oc-avatar"),u=t.resolveComponent("oc-icon");return t.openBlock(),t.createElementBlock("span",Fr,[e.recipient.hasAvatar?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.recipient.isLoadingAvatar?(t.openBlock(),t.createBlock(l,{key:"recipient-avatar-spinner",size:"small","aria-label":e.$gettext("Loading avatar"),"data-testid":"recipient-avatar-spinner"},null,8,["aria-label"])):(t.openBlock(),t.createBlock(i,{key:e.recipient.avatar||e.recipient.name,"data-testid":"recipient-avatar",class:"oc-recipient-avatar",src:e.recipient.avatar,"user-name":e.recipient.name,width:16.8},null,8,["src","user-name"]))],64)):e.recipient.icon&&e.recipient.icon.name?(t.openBlock(),t.createBlock(u,{key:1,class:"oc-recipient-icon",size:"small",name:e.recipient.icon.name,"accessible-label":e.recipient.icon.label,"data-testid":"recipient-icon"},null,8,["name","accessible-label"])):t.createCommentVNode("",!0),t.createElementVNode("p",{class:"oc-recipient-name","data-testid":"recipient-name",textContent:t.toDisplayString(e.recipient.name)},null,8,Rr),t.renderSlot(e.$slots,"append")])}typeof Ye=="function"&&Ye(go);const yo=m(go,[["render",Hr]]),R=t.defineComponent({name:"OcSearchBar",status:"ready",release:"1.0.0",components:{OcButton:w,OcGrid:W,OcIcon:C,OcSpinner:F},props:{value:{type:String,required:!1,default:null},icon:{type:String,required:!1,default:"search"},placeholder:{type:String,required:!1,default:""},label:{type:String,required:!0,default:""},small:{type:Boolean,default:!1},buttonLabel:{type:[String],required:!1,default:"Search"},buttonHidden:{type:[Boolean],required:!1,default:!1},typeAhead:{type:Boolean,required:!1,default:!1},trimQuery:{type:Boolean,required:!1,default:!0},loading:{type:Boolean,required:!1,default:!1},isFilter:{type:Boolean,required:!1,default:!1},loadingAccessibleLabel:{type:String,required:!1,default:""},showCancelButton:{type:Boolean,required:!1,default:!1},cancelButtonVariation:{type:String,required:!1,default:"primary",validator:e=>["passive","primary","danger","success","warning","brand"].includes(e)},cancelButtonAppearance:{type:String,required:!1,default:"raw",validator:e=>["outline","filled","raw","raw-inverse"].includes(e)},cancelHandler:{type:Function,required:!1,default:()=>{}}},emits:["advancedSearch","clear","input","keyup","search"],setup(e){const o=t.useSlots(),n=t.ref("");t.watch(()=>e.value,()=>{e.value||(n.value="")});const a=t.computed(()=>{var s;return((s=o.locationFilter)==null?void 0:s.call(o).length)>0?"125px":"48px"});return{query:n,inputIconRightPadding:a}},computed:{searchQuery(){return this.value===null?this.query:this.value},spinnerSize(){return this.small?"xsmall":"medium"},inputClass(){const e=["oc-search-input","oc-input"];return!this.buttonHidden&&e.push("oc-search-input-button"),e},loadingAccessibleLabelValue(){return this.loadingAccessibleLabel||this.$gettext("Loading results")}},methods:{focusSearchInput(){this.$refs.searchInput.focus()},onSearch(){this.$emit("search",this.query)},onType(e){this.query=this.trimQuery?e.trim():e,this.$emit("input",e),this.typeAhead&&this.onSearch(e)},onCancel(){this.query="",this.onType(""),this.onSearch(),this.cancelHandler()}}}),Ze=()=>{t.useCssVars(e=>({"580961d8":e.inputIconRightPadding}))},et=R.setup;R.setup=et?(e,o)=>(Ze(),et(e,o)):Ze;const tt={},jr={class:"oc-width-expand oc-position-relative"},xr=["aria-label","value","disabled","placeholder"],Kr=["textContent"];function Gr(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-spinner"),u=t.resolveComponent("oc-button"),c=t.resolveComponent("oc-grid"),k=t.resolveDirective("oc-tooltip");return t.openBlock(),t.createBlock(c,{flex:"",role:e.isFilter?void 0:"search",class:t.normalizeClass(["oc-search oc-flex-middle",{"oc-search-small":e.small}])},{default:t.withCtx(()=>[t.createElementVNode("div",jr,[t.createElementVNode("input",{ref:"searchInput",class:t.normalizeClass(e.inputClass),"aria-label":e.label,value:e.searchQuery,disabled:e.loading,placeholder:e.placeholder,onInput:o[0]||(o[0]=f=>e.onType(f.target.value)),onKeydown:o[1]||(o[1]=t.withKeys((...f)=>e.onSearch&&e.onSearch(...f),["enter"])),onKeyup:o[2]||(o[2]=f=>e.$emit("keyup",f))},null,42,xr),t.renderSlot(e.$slots,"locationFilter"),e.icon?t.withDirectives((t.openBlock(),t.createBlock(u,{key:0,"aria-label":e.$gettext("Search"),class:"oc-position-small oc-position-center-right oc-mt-rm",appearance:"raw",onClick:o[3]||(o[3]=t.withModifiers(f=>e.$emit("advancedSearch",f),["prevent","stop"]))},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(l,{name:e.icon,size:"small","fill-type":"line",variation:"passive"},null,8,["name"]),[[t.vShow,!e.loading]]),t.withDirectives(t.createVNode(i,{size:e.spinnerSize,"aria-label":e.loadingAccessibleLabelValue},null,8,["size","aria-label"]),[[t.vShow,e.loading]])]),_:1},8,["aria-label"])),[[k,e.$gettext("Search")]]):t.createCommentVNode("",!0)]),t.createElementVNode("div",{class:t.normalizeClass(["oc-search-button-wrapper",{"oc-invisible-sr":e.buttonHidden}])},[t.createVNode(u,{class:"oc-search-button",variation:"primary",appearance:"filled",size:e.small?"small":"medium",disabled:e.loading||e.searchQuery.length<1,onClick:e.onSearch},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.buttonLabel),1)]),_:1},8,["size","disabled","onClick"])],2),e.showCancelButton?(t.openBlock(),t.createBlock(u,{key:0,variation:e.cancelButtonVariation,appearance:e.cancelButtonAppearance,class:"oc-ml-m",onClick:e.onCancel},{default:t.withCtx(()=>[t.createElementVNode("span",{textContent:t.toDisplayString(e.$gettext("Cancel"))},null,8,Kr)]),_:1},8,["variation","appearance","onClick"])):t.createCommentVNode("",!0)]),_:3},8,["role","class"])}typeof tt=="function"&&tt(R);const bo=m(R,[["render",Gr]]),ko=t.defineComponent({name:"OcStatusIndicators",status:"ready",release:"2.0.1",components:{OcIcon:C,OcButton:w},props:{resource:{type:Object,required:!0},indicators:{type:Array,required:!0},disableHandler:{type:Boolean,default:!1}},setup(){const e=t.ref({});return{accessibleDescriptionIds:e,hasHandler:a=>Object.prototype.hasOwnProperty.call(a,"handler"),getIndicatorDescriptionId:a=>a.accessibleDescription?(t.unref(e)[a.id]||(t.unref(e)[a.id]=p.uniqueId("oc-indicator-description-")),t.unref(e)[a.id]):null}}}),ot={},Ur={class:"oc-status-indicators"},Wr=["id","textContent"];function Xr(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-button"),u=t.resolveDirective("oc-tooltip");return t.openBlock(),t.createElementBlock("div",Ur,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.indicators,c=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.hasHandler(c)&&!e.disableHandler?t.withDirectives((t.openBlock(),t.createBlock(i,{id:c.id,key:`${c.id}-handler`,class:"oc-status-indicators-indicator oc-ml-xs","aria-label":e.$gettext(c.label),"aria-describedby":e.getIndicatorDescriptionId(c),appearance:"raw","data-testid":c.id,"data-test-indicator-type":c.type,onClick:k=>c.handler(e.resource)},{default:t.withCtx(()=>[t.createVNode(l,{name:c.icon,size:"small","fill-type":c.fillType,variation:"inherit"},null,8,["name","fill-type"])]),_:2},1032,["id","aria-label","aria-describedby","data-testid","data-test-indicator-type","onClick"])),[[u,e.$gettext(c.label)]]):t.withDirectives((t.openBlock(),t.createBlock(l,{id:c.id,key:c.id,tabindex:"-1",size:"small",class:"oc-status-indicators-indicator oc-ml-xs",name:c.icon,"fill-type":c.fillType,"accessible-label":e.$gettext(c.label),"aria-describedby":e.getIndicatorDescriptionId(c),"data-testid":c.id,"data-test-indicator-type":c.type},null,8,["id","name","fill-type","accessible-label","aria-describedby","data-testid","data-test-indicator-type"])),[[u,e.$gettext(c.label)]]),e.getIndicatorDescriptionId(c)?(t.openBlock(),t.createElementBlock("p",{id:e.getIndicatorDescriptionId(c),key:e.getIndicatorDescriptionId(c),class:"oc-invisible-sr",textContent:t.toDisplayString(e.$gettext(c.accessibleDescription))},null,8,Wr)):t.createCommentVNode("",!0)],64))),256))])}typeof ot=="function"&&ot(ko);const $o=m(ko,[["render",Xr]]),vo=t.defineComponent({name:"OcSwitch",status:"ready",release:"1.0.0",props:{checked:{type:Boolean,required:!1,default:!1},label:{type:String,required:!0,default:null},labelId:{type:String,required:!1,default:()=>p.uniqueId("oc-switch-label-")}},emits:["update:checked"],methods:{toggle(){this.$emit("update:checked",!this.checked)}}}),nt={},Qr=["id","textContent"],Jr=["aria-checked","aria-labelledby"];function Yr(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("span",{key:`oc-switch-${e.checked.toString()}`,class:"oc-switch"},[t.createElementVNode("span",{id:e.labelId,textContent:t.toDisplayString(e.label)},null,8,Qr),t.createElementVNode("button",{"data-testid":"oc-switch-btn",class:"oc-switch-btn",role:"switch","aria-checked":e.checked,"aria-labelledby":e.labelId,onClick:o[0]||(o[0]=(...l)=>e.toggle&&e.toggle(...l))},null,8,Jr)])}typeof nt=="function"&&nt(vo);const Co=m(vo,[["render",Yr]]),Zr=t.defineComponent({name:"OcThead",status:"ready",release:"2.1.0"}),es={class:"oc-thead"};function ts(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("thead",es,[t.renderSlot(e.$slots,"default")])}const Z=m(Zr,[["render",ts]]),os=t.defineComponent({name:"OcTbody",status:"ready",release:"2.1.0"});function ns(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("tbody",null,[t.renderSlot(e.$slots,"default")])}const ee=m(os,[["render",ns]]),as=t.defineComponent({name:"OcTableCell",status:"ready",release:"2.1.0",props:{type:{type:String,default:"td",required:!1,validator:e=>["td","th"].includes(e)},alignH:{type:String,default:"left",validator:e=>["left","center","right"].includes(e)},alignV:{type:String,default:"middle",validator:e=>["top","middle","bottom"].includes(e)},width:{type:String,default:"auto",validator:e=>["auto","shrink","expand"].includes(e)},wrap:{type:String,default:null,validator:e=>["break","nowrap","truncate"].includes(e)||!e}},emits:["click"],computed:{cellClasses(){const e=["oc-table-cell",`oc-table-cell-align-${this.alignH}`,`oc-table-cell-align-${this.alignV}`,`oc-table-cell-width-${this.width}`];return this.wrap&&e.push(`oc-text-${this.wrap}`),e}}});function rs(e,o,n,a,s,r){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.type),{class:t.normalizeClass(e.cellClasses),onClick:o[0]||(o[0]=l=>e.$emit("click",l))},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["class"])}const H=m(as,[["render",rs]]),ss=t.defineComponent({name:"OcTd",status:"ready",release:"2.1.0",components:{OcTableCell:H},props:{alignH:{type:String,default:"left",validator:e=>["left","center","right"].includes(e)},alignV:{type:String,default:"middle",validator:e=>["top","middle","bottom"].includes(e)},width:{type:String,default:"auto",validator:e=>["auto","shrink","expand"].includes(e)},wrap:{type:String,default:null,validator:e=>["break","nowrap","truncate"].includes(e)||!e}}});function ls(e,o,n,a,s,r){const l=t.resolveComponent("oc-table-cell");return t.openBlock(),t.createBlock(l,{type:"td","align-h":e.alignH,"align-v":e.alignV,width:e.width,wrap:e.wrap,class:"oc-td"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["align-h","align-v","width","wrap"])}const j=m(ss,[["render",ls]]),is=t.defineComponent({name:"OcTr",status:"ready",release:"1.0.0",components:{OcTd:j},props:{lazy:{type:Object,required:!1,default:null}},emits:["contextmenu","click","dragstart","drop","dragenter","dragleave","dragover","mouseleave","itemVisible"],setup(e,{emit:o}){const n=t.customRef((l,i)=>{let u;return{get(){return l(),u},set(c){u=c,i()}}}),a=t.computed(()=>e.lazy?e.lazy.colspan:1),{isVisible:s}=e.lazy?Ko.useIsVisible({...e.lazy,target:n,onVisibleCallback:()=>o("itemVisible")}):{isVisible:t.ref(!0)},r=t.computed(()=>!t.unref(s));return e.lazy||o("itemVisible"),{observerTarget:n,isHidden:r,lazyColspan:a}}});function cs(e,o,n,a,s,r){const l=t.resolveComponent("oc-td");return t.openBlock(),t.createElementBlock("tr",{ref:"observerTarget",onClick:o[0]||(o[0]=i=>e.$emit("click",i)),onContextmenu:o[1]||(o[1]=i=>e.$emit("contextmenu",i)),onDragstart:o[2]||(o[2]=i=>e.$emit("dragstart",i)),onDrop:o[3]||(o[3]=i=>e.$emit("drop",i)),onDragenter:o[4]||(o[4]=i=>e.$emit("dragenter",i)),onDragleave:o[5]||(o[5]=i=>e.$emit("dragleave",i)),onDragover:o[6]||(o[6]=i=>e.$emit("dragover",i)),onMouseleave:o[7]||(o[7]=i=>e.$emit("mouseleave",i))},[e.isHidden?(t.openBlock(),t.createBlock(l,{key:0,colspan:e.lazyColspan},{default:t.withCtx(()=>o[8]||(o[8]=[t.createElementVNode("span",{class:"shimmer"},null,-1)])),_:1},8,["colspan"])):t.renderSlot(e.$slots,"default",{key:1})],544)}const te=m(is,[["render",cs]]),ds=t.defineComponent({name:"OcTh",status:"ready",release:"2.1.0",components:{OcTableCell:H},props:{alignH:{type:String,default:"left",validator:e=>["left","center","right"].includes(e)},alignV:{type:String,default:"middle",validator:e=>["top","middle","bottom"].includes(e)},width:{type:String,default:"auto",validator:e=>["auto","shrink","expand"].includes(e)},wrap:{type:String,default:"nowrap",validator:e=>["break","nowrap","truncate"].includes(e)}},emits:["click"]});function us(e,o,n,a,s,r){const l=t.resolveComponent("oc-table-cell");return t.openBlock(),t.createBlock(l,{type:"th","align-h":e.alignH,"align-v":e.alignV,width:e.width,wrap:e.wrap,class:"oc-th",onClick:o[0]||(o[0]=i=>e.$emit("click",i))},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["align-h","align-v","width","wrap"])}const oe=m(ds,[["render",us]]),at="asc",x="desc",wo=t.defineComponent({name:"OcTable",status:"ready",release:"2.1.0",components:{OcThead:Z,OcTbody:ee,OcTr:te,OcTh:oe,OcTd:j,OcButton:w},props:{data:{type:Array,required:!0},idKey:{type:String,default:"id"},itemDomSelector:{type:Function,required:!1,default(e){return e[this.idKey]}},fields:{type:Array,required:!0},hasHeader:{type:Boolean,default:!0},sticky:{type:Boolean,required:!1,default:!1},hover:{type:Boolean,default:!1},highlighted:{type:[String,Array],default:null},disabled:{type:Array,default:()=>[]},headerPosition:{type:Number,required:!1,default:0},paddingX:{type:String,required:!1,default:"small",validator:e=>["xsmall","small","medium","large","xlarge"].includes(e)},dragDrop:{type:Boolean,required:!1,default:!1},selection:{type:Array,required:!1,default:()=>[]},lazy:{type:Boolean,default:!1},sortDir:{type:String,required:!1,default:void 0,validator:e=>e===void 0||["asc","desc"].includes(e)},sortBy:{type:String,required:!1,default:void 0},groupingSettings:{type:Object,required:!1,default:null}},emits:[p.EVENT_ITEM_DROPPED,p.EVENT_ITEM_DRAGGED,p.EVENT_THEAD_CLICKED,p.EVENT_TROW_CLICKED,p.EVENT_TROW_MOUNTED,p.EVENT_TROW_CONTEXTMENU,p.EVENT_SORT,"dropRowStyling","itemVisible"],setup(){return{constants:{EVENT_THEAD_CLICKED:p.EVENT_THEAD_CLICKED,EVENT_TROW_CLICKED:p.EVENT_TROW_CLICKED,EVENT_TROW_MOUNTED:p.EVENT_TROW_MOUNTED,EVENT_TROW_CONTEXTMENU:p.EVENT_TROW_CONTEXTMENU}}},computed:{isSortable(){return this.fields.some(e=>e.sortable)},tableClasses(){const e=["oc-table"];return this.hover&&e.push("oc-table-hover"),this.sticky&&e.push("oc-table-sticky"),e},fullColspan(){return this.fields.length}},methods:{dragOver(e){e.preventDefault()},dragStart(e,o){this.$emit(p.EVENT_ITEM_DRAGGED,e,o)},dropRowEvent(e,o){this.$emit(p.EVENT_ITEM_DROPPED,e,o)},dropRowStyling(e,o,n){this.$emit("dropRowStyling",e,o,n)},isFieldTypeSlot(e){return e.type==="slot"},isFieldTypeCallback(e){return["callback","function"].indexOf(e.type)>=0},extractFieldTitle(e){return Object.prototype.hasOwnProperty.call(e,"title")?e.title:e.name},extractTableProps(){return{class:this.tableClasses}},extractThProps(e,o){const n=this.extractCellProps(e);return n.class=`oc-table-header-cell oc-table-header-cell-${e.name}`,Object.prototype.hasOwnProperty.call(e,"thClass")&&(n.class+=` ${e.thClass}`),this.sticky&&(n.style=`top: ${this.headerPosition}px;`),o===0&&(n.class+=` oc-pl-${p.getSizeClass(this.paddingX)} `),o===this.fields.length-1&&(n.class+=` oc-pr-${p.getSizeClass(this.paddingX)}`),this.extractSortThProps(n,e),n},extractTbodyTrProps(e,o){return{...this.lazy&&{lazy:{colspan:this.fullColspan}},class:["oc-tbody-tr",`oc-tbody-tr-${this.itemDomSelector(e)||o}`,this.isHighlighted(e)?"oc-table-highlighted":void 0,this.isDisabled(e)?"oc-table-disabled":void 0].filter(Boolean)}},extractTdProps(e,o,n){const a=this.extractCellProps(e);return a.class=`oc-table-data-cell oc-table-data-cell-${e.name}`,Object.prototype.hasOwnProperty.call(e,"tdClass")&&(a.class+=` ${e.tdClass}`),Object.prototype.hasOwnProperty.call(e,"wrap")&&(a.wrap=e.wrap),o===0&&(a.class+=` oc-pl-${p.getSizeClass(this.paddingX)} `),o===this.fields.length-1&&(a.class+=` oc-pr-${p.getSizeClass(this.paddingX)}`),Object.prototype.hasOwnProperty.call(e,"accessibleLabelCallback")&&(a["aria-label"]=e.accessibleLabelCallback(n)),a},extractCellProps(e){return{...(e==null?void 0:e.alignH)&&{alignH:e.alignH},...(e==null?void 0:e.alignV)&&{alignV:e.alignV},...(e==null?void 0:e.width)&&{width:e.width},class:void 0,wrap:void 0,style:void 0}},isHighlighted(e){return this.highlighted?Array.isArray(this.highlighted)?this.highlighted.indexOf(e[this.idKey])>-1:this.highlighted===e[this.idKey]:!1},isDisabled(e){return this.disabled.length?this.disabled.indexOf(e[this.idKey])>-1:!1},cellKey(e,o,n){const a=[n[this.idKey],o+1].filter(Boolean);return this.isFieldTypeSlot(e)?[...a,e.name].join("-"):this.isFieldTypeCallback(e)?[...a,e.callback(n[e.name])].join("-"):[...a,n[e.name]].join("-")},getSortLabel(e){return this.$gettext("Sort by %{ name }",{name:e})},extractSortThProps(e,o){if(!this.fieldIsSortable(o))return;let n="none";this.sortBy===o.name&&(n=this.sortDir===at?"ascending":"descending"),e["aria-sort"]=n},fieldIsSortable({sortable:e}){return!!e},handleSort(e){if(!this.fieldIsSortable(e))return;let o=this.sortDir;this.sortBy===e.name&&this.sortDir!==void 0&&(o=this.sortDir===x?at:x),(this.sortBy!==e.name||this.sortDir===void 0)&&(o=e.sortDir||x),this.$emit("sort",{sortBy:e.name,sortDir:o})}}}),rt={},ps={key:0,class:"oc-table-thead-content"},ms=["textContent"],fs={key:1},hs={key:0,class:"oc-table-thead-content"},gs=["textContent"],ys={key:1,class:"oc-table-footer"},bs={class:"oc-table-footer-row"},ks=["colspan"];function $s(e,o,n,a,s,r){const l=t.resolveComponent("oc-icon"),i=t.resolveComponent("oc-button"),u=t.resolveComponent("oc-th"),c=t.resolveComponent("oc-tr"),k=t.resolveComponent("oc-thead"),f=t.resolveComponent("oc-td"),$=t.resolveComponent("oc-tbody");return t.openBlock(),t.createElementBlock("table",t.mergeProps(e.extractTableProps(),{class:"has-item-context-menu"}),[e.hasHeader?(t.openBlock(),t.createBlock(k,{key:0},{default:t.withCtx(()=>[t.createVNode(c,{class:"oc-table-header-row"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.fields,(d,b)=>(t.openBlock(),t.createBlock(u,t.mergeProps({key:`oc-thead-${d.name}`,ref_for:!0},e.extractThProps(d,b)),{default:t.withCtx(()=>[d.sortable?(t.openBlock(),t.createBlock(i,{key:0,"aria-label":e.getSortLabel(d.name),appearance:"raw",class:"oc-button-sort oc-width-1-1",onClick:h=>e.handleSort(d)},{default:t.withCtx(()=>[d.headerType==="slot"?(t.openBlock(),t.createElementBlock("span",ps,[t.renderSlot(e.$slots,d.name+"Header")])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"oc-table-thead-content header-text",textContent:t.toDisplayString(e.extractFieldTitle(d))},null,8,ms)),t.createVNode(l,{name:e.sortDir==="asc"?"arrow-down":"arrow-up","fill-type":"line",class:t.normalizeClass({"oc-invisible-sr":e.sortBy!==d.name}),size:"small",variation:"passive"},null,8,["name","class"])]),_:2},1032,["aria-label","onClick"])):(t.openBlock(),t.createElementBlock("div",fs,[d.headerType==="slot"?(t.openBlock(),t.createElementBlock("span",hs,[t.renderSlot(e.$slots,d.name+"Header")])):(t.openBlock(),t.createElementBlock("span",{key:1,class:"oc-table-thead-content header-text",textContent:t.toDisplayString(e.extractFieldTitle(d))},null,8,gs))]))]),_:2},1040))),128))]),_:3})]),_:3})):t.createCommentVNode("",!0),t.createVNode($,{class:"has-item-context-menu"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.data,(d,b)=>(t.openBlock(),t.createBlock(c,t.mergeProps({key:`oc-tbody-tr-${e.itemDomSelector(d)||b}`,ref_for:!0,ref:`row-${b}`},e.extractTbodyTrProps(d,b),{"data-item-id":d[e.idKey],draggable:e.dragDrop,onClick:h=>e.$emit(e.constants.EVENT_TROW_CLICKED,[d,h]),onContextmenu:h=>e.$emit(e.constants.EVENT_TROW_CONTEXTMENU,e.$refs[`row-${b}`][0],h,d),onVnodeMounted:h=>e.$emit(e.constants.EVENT_TROW_MOUNTED,d,e.$refs[`row-${b}`][0]),onDragstart:h=>e.dragStart(d,h),onDrop:h=>e.dropRowEvent(e.itemDomSelector(d),h),onDragenter:t.withModifiers(h=>e.dropRowStyling(e.itemDomSelector(d),!1,h),["prevent"]),onDragleave:t.withModifiers(h=>e.dropRowStyling(e.itemDomSelector(d),!0,h),["prevent"]),onMouseleave:h=>e.dropRowStyling(e.itemDomSelector(d),!0,h),onDragover:o[0]||(o[0]=h=>e.dragOver(h)),onItemVisible:h=>e.$emit("itemVisible",d)}),{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.fields,(h,y)=>(t.openBlock(),t.createBlock(f,t.mergeProps({key:"oc-tbody-td-"+e.cellKey(h,y,d),ref_for:!0},e.extractTdProps(h,y,d)),{default:t.withCtx(()=>[e.isFieldTypeSlot(h)?t.renderSlot(e.$slots,h.name,{key:0,item:d}):e.isFieldTypeCallback(h)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(h.callback(d[h.name])),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(d[h.name]),1)],64))]),_:2},1040))),128))]),_:2},1040,["data-item-id","draggable","onClick","onContextmenu","onVnodeMounted","onDragstart","onDrop","onDragenter","onDragleave","onMouseleave","onItemVisible"]))),128))]),_:3}),e.$slots.footer?(t.openBlock(),t.createElementBlock("tfoot",ys,[t.createElementVNode("tr",bs,[t.createElementVNode("td",{colspan:e.fullColspan,class:"oc-table-footer-cell"},[t.renderSlot(e.$slots,"footer")],8,ks)])])):t.createCommentVNode("",!0)],16)}typeof rt=="function"&&rt(wo);const So=m(wo,[["render",$s]]),vs=t.defineComponent({name:"OcTfoot",status:"ready",release:"2.1.0"});function Cs(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("tfoot",null,[t.renderSlot(e.$slots,"default")])}const Bo=m(vs,[["render",Cs]]),Oo=t.defineComponent({name:"OcTableSimple",status:"ready",release:"2.1.0",props:{hover:{type:Boolean,default:!1}},computed:{tableClasses(){const e=["oc-table-simple"];return this.hover&&e.push("oc-table-simple-hover"),e}}}),st={};function ws(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("table",{class:t.normalizeClass(e.tableClasses)},[t.renderSlot(e.$slots,"default")],2)}typeof st=="function"&&st(Oo);const Eo=m(Oo,[["render",ws]]),Vo=t.defineComponent({name:"OcTag",status:"ready",release:"2.0.0",props:{type:{type:String,required:!1,default:"span",validator:e=>["span","button","router-link","a"].includes(e)},to:{type:[String,Object],required:!1,default:null},size:{type:String,default:"medium",validator:e=>["small","medium","large"].includes(e)},rounded:{type:Boolean,default:!1,required:!1}},emits:["click"],computed:{$_ocTag_class(){const e=["oc-tag",`oc-tag-${p.getSizeClass(this.size)}`];return this.type==="router-link"||this.type==="a"?e.push("oc-tag-link"):e.push(`oc-tag-${this.type}`),this.rounded&&e.push("oc-tag-rounded"),e}},methods:{$_ocTag_click(e){this.$emit("click",e)}}}),lt={};function Ss(e,o,n,a,s,r){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.type),{class:t.normalizeClass(e.$_ocTag_class),to:e.to,onClick:e.$_ocTag_click},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["class","to","onClick"])}typeof lt=="function"&&lt(Vo);const _o=m(Vo,[["render",Ss]]),Do=t.defineComponent({name:"OcTextarea",status:"ready",release:"1.0.0",props:{id:{type:String,required:!1,default:()=>p.uniqueId("oc-textarea-")},modelValue:{type:String,default:null},label:{type:String,required:!0,default:null},warningMessage:{type:String,default:null},errorMessage:{type:String,default:null},descriptionMessage:{type:String,default:null},fixMessageLine:{type:Boolean,default:!1},submitOnEnter:{type:Boolean,required:!1,default:!0}},emits:["update:modelValue","focus","change","keydown"],computed:{showMessageLine(){return this.fixMessageLine||!!this.warningMessage||!!this.errorMessage||!!this.descriptionMessage},messageId(){return`${this.id}-message`},additionalAttributes(){const e={};return(this.warningMessage||this.errorMessage||this.descriptionMessage)&&(e["aria-describedby"]=this.messageId),{...this.$attrs,...e}},ariaInvalid(){return(!!this.errorMessage).toString()},messageText(){return this.errorMessage?this.errorMessage:this.warningMessage?this.warningMessage:this.descriptionMessage}},methods:{focus(){this.$refs.input.focus()},onInput(e){this.$emit("update:modelValue",e)},onFocus(e){this.$emit("focus",e)},onKeyDown(e){var n;const o=((n=e.key)==null?void 0:n.toLowerCase())==="enter";this.submitOnEnter&&o&&!e.ctrlKey&&!e.shiftKey&&this.$emit("change",e.target.value),this.$emit("keydown",e)}}}),it={},Bs=["for","textContent"],Os=["id","value","aria-invalid"],Es={key:0,class:"oc-textarea-message"},Vs=["id","textContent"];function _s(e,o,n,a,s,r){return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("label",{class:"oc-label",for:e.id,textContent:t.toDisplayString(e.label)},null,8,Bs),t.createElementVNode("textarea",t.mergeProps({id:e.id},e.additionalAttributes,{class:["oc-textarea oc-rounded",{"oc-textarea-warning":!!e.warningMessage,"oc-textarea-danger":!!e.errorMessage}],value:e.modelValue,"aria-invalid":e.ariaInvalid,onInput:o[0]||(o[0]=l=>e.onInput(l.target.value)),onFocus:o[1]||(o[1]=l=>e.onFocus(l.target.value)),onKeydown:o[2]||(o[2]=l=>e.onKeyDown(l))}),null,16,Os),e.showMessageLine?(t.openBlock(),t.createElementBlock("div",Es,[t.createElementVNode("span",{id:e.messageId,class:t.normalizeClass({"oc-textarea-description":!!e.descriptionMessage,"oc-textarea-warning":!!e.warningMessage,"oc-textarea-danger":!!e.errorMessage}),textContent:t.toDisplayString(e.messageText)},null,10,Vs)])):t.createCommentVNode("",!0)])}typeof it=="function"&&it(Do);const To=m(Do,[["render",_s]]),No=t.defineComponent({name:"OcEmojiPicker",status:"ready",release:"1.0.0",props:{theme:{type:String,default:"light",validator:e=>["light","dark"].includes(e)}},emits:["emojiSelect","clickOutside"],setup(e,{emit:o}){const n=_.useGettext(),{$gettext:a}=n,s=t.ref(),r=t.ref(!0);return t.watch([()=>e.theme,n.current],async()=>{r.value=!0,await t.nextTick();const l={search:a("Search"),search_no_results_1:a("Oh no!"),search_no_results_2:a("That emoji couldn’t be found"),pick:a("Pick an emoji…"),add_custom:a("Add custom emoji"),categories:{activity:a("Activity"),custom:a("Custom"),flags:a("Flags"),foods:a("Food & Drink"),frequent:a("Frequently used"),nature:a("Animals & Nature"),objects:a("Objects"),people:a("Smileys & People"),places:a("Travel & Places"),search:a("Search Results"),symbols:a("Symbols")},skins:{choose:a("Choose default skin tone"),1:a("Default"),2:a("Light"),3:a("Medium-Light"),4:a("Medium"),5:a("Medium-Dark"),6:a("Dark")}},i=(await import("@emoji-mart/data")).default,u={onEmojiSelect:f=>o("emojiSelect",f.native),onClickOutside:()=>o("clickOutside"),i18n:l,data:i,autoFocus:!0,theme:e.theme},{Picker:c}=await import("emoji-mart"),k=new c(u);r.value=!1,await t.nextTick(),t.unref(s).innerHTML="",t.unref(s).appendChild(k)},{immediate:!0}),{emojiPickerRef:s,isLoading:r}}}),ct={},Ds={key:0,class:"oc-flex oc-flex-center"},Ts={key:1,ref:"emojiPickerRef"};function Ns(e,o,n,a,s,r){const l=t.resolveComponent("oc-spinner");return e.isLoading?(t.openBlock(),t.createElementBlock("div",Ds,[t.createVNode(l,{size:"large"})])):(t.openBlock(),t.createElementBlock("div",Ts,null,512))}typeof ct=="function"&&ct(No);const qo=m(No,[["render",Ns]]),qs=Object.freeze(Object.defineProperty({__proto__:null,OcApplicationIcon:ft,OcAvatar:z,OcAvatarCount:G,OcAvatarFederated:N,OcAvatarGroup:q,OcAvatarGuest:L,OcAvatarItem:D,OcAvatarLink:I,OcAvatars:St,OcBreadcrumb:_t,OcButton:w,OcCheckbox:Tt,OcContextualHelper:Lt,OcDatepicker:Pt,OcDrop:A,OcDropzone:zt,OcEmojiPicker:qo,OcErrorLog:Q,OcFilterChip:At,OcGrid:W,OcHiddenAnnouncer:Ht,OcIcon:C,OcImage:M,OcInfoDrop:U,OcList:xt,OcLoader:Gt,OcLogo:Wt,OcModal:Jt,OcNotificationMessage:eo,OcNotifications:oo,OcPageSize:ro,OcPagination:lo,OcProgress:co,OcProgressPie:po,OcRadio:fo,OcRecipient:yo,OcSearchBar:bo,OcSelect:Y,OcSpinner:F,OcStatusIndicators:$o,OcSwitch:Co,OcTable:So,OcTableBody:ee,OcTableCell:H,OcTableCellData:j,OcTableCellHead:oe,OcTableFooter:Bo,OcTableHeader:Z,OcTableRow:te,OcTableSimple:Eo,OcTag:_o,OcTextInput:X,OcTextarea:To},Symbol.toStringTag,{value:"Module"}));exports.OcApplicationIcon=ft;exports.OcAvatar=z;exports.OcAvatarCount=G;exports.OcAvatarFederated=N;exports.OcAvatarGroup=q;exports.OcAvatarGuest=L;exports.OcAvatarItem=D;exports.OcAvatarLink=I;exports.OcAvatars=St;exports.OcBreadcrumb=_t;exports.OcButton=w;exports.OcCheckbox=Tt;exports.OcContextualHelper=Lt;exports.OcDatepicker=Pt;exports.OcDrop=A;exports.OcDropzone=zt;exports.OcEmojiPicker=qo;exports.OcErrorLog=Q;exports.OcFilterChip=At;exports.OcGrid=W;exports.OcHiddenAnnouncer=Ht;exports.OcIcon=C;exports.OcImg=M;exports.OcInfoDrop=U;exports.OcList=xt;exports.OcLoader=Gt;exports.OcLogo=Wt;exports.OcModal=Jt;exports.OcNotificationMessage=eo;exports.OcNotifications=oo;exports.OcPageSize=ro;exports.OcPagination=lo;exports.OcProgress=co;exports.OcProgressPie=po;exports.OcRadio=fo;exports.OcRecipient=yo;exports.OcSearchBar=bo;exports.OcSelect=Y;exports.OcSpinner=F;exports.OcStatusIndicators=$o;exports.OcSwitch=Co;exports.OcTable=So;exports.OcTableCell=H;exports.OcTableSimple=Eo;exports.OcTag=_o;exports.OcTbody=ee;exports.OcTd=j;exports.OcTextInput=X;exports.OcTextarea=To;exports.OcTh=oe;exports.OcThead=Z;exports.OcTooltip=mn;exports.OcTr=te;exports._OcTableFooter=Bo;exports.components=qs;