@avakhula/ui 0.0.505-alpha.101 → 0.0.505-alpha.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2143,10 +2143,21 @@ const Eu = {
2143
2143
  (n = (t = this.$refs.trigger) == null ? void 0 : t.querySelector("a, button, [tabindex]")) == null || n.focus(), document.body.classList.remove("modal-open"), this.$emit("close");
2144
2144
  },
2145
2145
  setFocusOnModal(t) {
2146
- var n, e;
2147
- !((n = this.$refs.modal) != null && n.contains(t.target)) && !((e = this.$refs.modal) != null && e.contains(t.relatedTarget)) && this.isActive && this.$refs.modal.querySelector(
2148
- "[tabindex], a, button, input, select, textarea"
2149
- ).focus();
2146
+ if (!this.isActive)
2147
+ return;
2148
+ const e = Array.from(
2149
+ document.querySelectorAll(".modal.is-active")
2150
+ ).sort(
2151
+ (r, o) => +(getComputedStyle(r).zIndex || 0) - +(getComputedStyle(o).zIndex || 0)
2152
+ ).at(-1);
2153
+ if (e === this.$refs.modal && !e.contains(t.target) && !e.contains(t.relatedTarget)) {
2154
+ const r = e.querySelector(
2155
+ `a[href], button:not([disabled]),
2156
+ textarea, input:not([type="hidden"]),
2157
+ select, [tabindex]:not([tabindex="-1"])`
2158
+ );
2159
+ r == null || r.focus();
2160
+ }
2150
2161
  },
2151
2162
  clickOutside(t) {
2152
2163
  var n;
@@ -2157,6 +2168,10 @@ const Eu = {
2157
2168
  }
2158
2169
  },
2159
2170
  computed: {
2171
+ classes() {
2172
+ const t = ["modal"];
2173
+ return this.classList.length && t.push(this.classList), this.isActive && t.push("is-active"), t;
2174
+ },
2160
2175
  bodyStyles() {
2161
2176
  const t = {};
2162
2177
  return this.size === en.S && (t.width = "380px", t.minHeight = "160px", t.maxHeight = "680px"), this.size === en.M && (t.width = "600px", t.minHeight = "260px", t.maxHeight = "680px"), this.size === en.L && (t.width = "850px", t.minHeight = "400px", t.maxHeight = "680px"), this.size === en.XL && (t.width = "80vw", t.maxWidth = "1400px"), t;
@@ -2203,7 +2218,7 @@ function Tu(t, n, e, r, o, i) {
2203
2218
  ], 544)) : ue("", !0),
2204
2219
  (G(), _e(ha, { to: "body" }, [
2205
2220
  Ne(ae("div", {
2206
- class: ge(["modal", e.classList]),
2221
+ class: ge(i.classes),
2207
2222
  ref: "modal"
2208
2223
  }, [
2209
2224
  Ne((G(), te("div", {
@@ -2241,7 +2256,7 @@ function Tu(t, n, e, r, o, i) {
2241
2256
  ]))
2242
2257
  ], 64);
2243
2258
  }
2244
- const mp = /* @__PURE__ */ Te(Eu, [["render", Tu], ["__scopeId", "data-v-ad9343ef"]]);
2259
+ const mp = /* @__PURE__ */ Te(Eu, [["render", Tu], ["__scopeId", "data-v-12ec5923"]]);
2245
2260
  function qa(t) {
2246
2261
  return "#" + t.toLowerCase().replace(/ /g, "-");
2247
2262
  }
@@ -11547,6 +11562,10 @@ const Z1 = {
11547
11562
  errorMessage: {
11548
11563
  type: String,
11549
11564
  default: ""
11565
+ },
11566
+ disabled: {
11567
+ type: Boolean,
11568
+ default: !1
11550
11569
  }
11551
11570
  },
11552
11571
  emits: ["update:modelValue", "onReady"],
@@ -11609,7 +11628,8 @@ function J1(t, n, e, r, o, i) {
11609
11628
  "dropdown-options": { showSearchBox: !0, showFlags: !0, tabindex: 0 },
11610
11629
  defaultCountry: o.defaultCountry,
11611
11630
  ignoredCountries: e.ignoredCountries,
11612
- class: { error: e.error || e.errorMessage.length },
11631
+ class: { error: e.error || e.errorMessage.length, disabled: e.disabled },
11632
+ disabled: e.disabled,
11613
11633
  "style-classes": "ib-phone-input",
11614
11634
  ref: "vueTel"
11615
11635
  }), {
@@ -11617,7 +11637,7 @@ function J1(t, n, e, r, o, i) {
11617
11637
  pe(l, { name: "chevron-down-outline" })
11618
11638
  ]),
11619
11639
  _: 1
11620
- }, 16, ["modelValue", "onCountryChanged", "input-options", "auto-default-country", "defaultCountry", "ignoredCountries", "class"])), [
11640
+ }, 16, ["modelValue", "onCountryChanged", "input-options", "auto-default-country", "defaultCountry", "ignoredCountries", "class", "disabled"])), [
11621
11641
  [u, i.clickOutside]
11622
11642
  ])
11623
11643
  ], 64);
@@ -1,4 +1,6 @@
1
- (function(pe,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(pe=typeof globalThis<"u"?globalThis:pe||self,i(pe.MyLib={},pe.Vue))})(this,function(pe,i){"use strict";const H0="",_e=(t,n)=>{const e=t.__vccOpts||t;for(const[o,a]of n)e[o]=a;return e},Va={name:"IbIcon",props:{name:{type:String,required:!0},classes:{type:String,default:""},styles:{type:[String,Object],default:""}},mounted(){const t=setInterval(()=>{var n,e;(e=(n=this.$refs.icon)==null?void 0:n.shadowRoot)!=null&&e.querySelector("title")&&(this.$refs.icon.shadowRoot.querySelector("title").innerHTML="",clearInterval(t))},1e3)}},qa=["name"];function Fa(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("ion-icon",{style:i.normalizeStyle(e.styles),name:e.name,class:i.normalizeClass(e.classes+" ib-icon icon-"+e.name),ref:"icon"},null,14,qa)}const Le=_e(Va,[["render",Fa]]);function pt(){return"_"+Math.random().toString(36).substr(2,9)}const Fi={methods:{enter(t){const n=getComputedStyle(t).width;t.style.width=n,t.style.position="absolute",t.style.visibility="hidden",t.style.height="auto";const e=getComputedStyle(t).height;t.style.width=null,t.style.position=null,t.style.visibility=null,t.style.height=0,getComputedStyle(t).height,requestAnimationFrame(()=>{t.style.height=e})},afterEnter(t){t.style.height="auto"},leave(t){const n=getComputedStyle(t).height;t.style.height=n,getComputedStyle(t).height,requestAnimationFrame(()=>{t.style.height=0})}}},z0="",Ha={name:"IbAccordion",mixins:[Fi],props:{isOpen:{type:Boolean,default:!1}},watch:{isOpen(t){this.isActive=t}},data(){return{isActive:this.isOpen,uuid:pt()}},methods:{onClick(){this.isActive=!this.isActive,this.isActive?this.$emit("open",this.isActive):this.$emit("close",this.isActive)}},components:{IbIcon:Le}},za=["id","aria-controls","aria-expanded"],Ua=["id","aria-labelledby"],Ka={class:"accordion-content-wrapper"};function Ga(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["ib-accordion",{active:a.isActive}])},[i.createElementVNode("button",{class:"accordion-title",id:"accordion"+a.uuid,"aria-controls":"accordion-section-"+a.uuid,"aria-expanded":a.isActive,type:"button",onClick:n[0]||(n[0]=i.withModifiers((...s)=>r.onClick&&r.onClick(...s),["prevent"]))},[i.renderSlot(t.$slots,"title",{},void 0,!0),i.createVNode(l,{class:"chevron-icon",name:"chevron-down-outline"})],8,za),i.createVNode(i.Transition,{name:"expand",onEnter:t.enter,onAfterEnter:t.afterEnter,onLeave:t.leave},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{role:"region",class:"accordion-content",id:"accordion-section-"+a.uuid,"aria-labelledby":"accordion"+a.uuid},[i.createElementVNode("div",Ka,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],8,Ua),[[i.vShow,a.isActive]])]),_:3},8,["onEnter","onAfterEnter","onLeave"])],2)}const Wa=_e(Ha,[["render",Ga],["__scopeId","data-v-8ece19c1"]]),Kt={primary:"primary",secondary:"secondary",tertiary:"tertiary",ghost:"ghost",danger:"danger",ghostDanger:"ghostDanger"};function Pr(t,n=[]){for(let e in t)e.startsWith("on")&&(n.length===0||n.includes(e))&&delete t[e];return t}const U0="",Ya={name:"IbButton",props:{kind:{type:String,default:Kt.primary},disabled:{type:Boolean,required:!1,default:!1},preventDefault:{type:Boolean,default:null},confirmMessage:{type:String,default:""},block:{type:Boolean,default:!1},href:{type:String,default:""},linkMethod:{type:String,default:"get"},disableAfterClick:{type:Boolean,default:!1},postOptions:{type:Object,default:()=>({})}},data(){return{isDisabled:this.disabled}},watch:{disabled(t){this.isDisabled=t}},methods:{onMouseenter(t){this.$emit("mouseenter",t)},onMouseleave(t){this.$emit("mouseleave",t)},onClick(t){if((this.preventDefault||this.isDisabled)&&t.preventDefault(),this.confirmMessage.length>0&&!confirm(this.confirmMessage)){t.preventDefault();return}!this.isDisabled&&this.href.length&&!this.preventDefault&&this.linkMethod.toUpperCase()!=="GET"&&(t.preventDefault(),this.$refs.form.submit()),this.isDisabled||this.$emit("click",t),this.disableAfterClick&&!this.disabled&&(this.isDisabled=!0)}},computed:{classes(){const t=["ib-button"];return t.push(`ib-btn-${this.kind}`),this.isDisabled&&t.push("ib-btn-disabled"),this.block&&t.push("ib-btn-block"),this.href.length&&t.push("ib-btn-link"),this.hasIcon&&t.push("ib-btn-has-icon"),t},attrs(){const t=Pr({...this.$attrs},["onClick"]);return t.class=[...this.classes,t.class],t.disabled=this.isDisabled,this.href.length&&(t.href=this.href),t},hasIcon(){return!!this.$slots.icon},formMethod(){return this.linkMethod==="GET"?"GET":"POST"},token(){var t;return(t=document.head.querySelector('meta[name="csrf-token"]'))==null?void 0:t.content}},inheritAttrs:!1},Za=["method","action"],Ja=["value"],Xa=["value"],Qa=["name","value"];function el(t,n,e,o,a,r){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.href.length?"a":"button"),i.mergeProps({onClick:n[0]||(n[0]=l=>r.onClick(l)),onMouseenter:r.onMouseenter,onMouseleave:r.onMouseleave},r.attrs),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"icon"),i.renderSlot(t.$slots,"default"),e.href.length&&e.linkMethod.toUpperCase()!=="GET"?i.withDirectives((i.openBlock(),i.createElementBlock("form",{key:0,ref:"form",method:r.formMethod,action:e.href},[i.createElementVNode("input",{type:"hidden",name:"_method",value:e.linkMethod},null,8,Ja),i.createElementVNode("input",{type:"hidden",name:"_token",value:r.token},null,8,Xa),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.keys(e.postOptions),(l,s)=>(i.openBlock(),i.createElementBlock("input",{key:s,type:"hidden",name:l,value:e.postOptions[l]},null,8,Qa))),128))],8,Za)),[[i.vShow,!1]]):i.createCommentVNode("",!0)]),_:3},16,["onMouseenter","onMouseleave"])}const Hi=_e(Ya,[["render",el]]),tl=["top","right","bottom","left"],zi=["start","end"],Ui=tl.reduce((t,n)=>t.concat(n,n+"-"+zi[0],n+"-"+zi[1]),[]),Ki=Math.min,yn=Math.max,Yn=Math.round,jt=t=>({x:t,y:t}),nl={left:"right",right:"left",bottom:"top",top:"bottom"},rl={start:"end",end:"start"};function Gi(t,n){return typeof t=="function"?t(n):t}function Zn(t){return t.split("-")[0]}function Gt(t){return t.split("-")[1]}function il(t){return t==="x"?"y":"x"}function Wi(t){return t==="y"?"height":"width"}function Yi(t){return["top","bottom"].includes(Zn(t))?"y":"x"}function Zi(t){return il(Yi(t))}function ol(t,n,e){e===void 0&&(e=!1);const o=Gt(t),a=Zi(t),r=Wi(a);let l=a==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[r]>n.floating[r]&&(l=Ji(l)),[l,Ji(l)]}function al(t){return t.replace(/start|end/g,n=>rl[n])}function Ji(t){return t.replace(/left|right|bottom|top/g,n=>nl[n])}function ll(t){return{top:0,right:0,bottom:0,left:0,...t}}function sl(t){return typeof t!="number"?ll(t):{top:t,right:t,bottom:t,left:t}}function Jn(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Xi(t,n,e){let{reference:o,floating:a}=t;const r=Yi(n),l=Zi(n),s=Wi(l),u=Zn(n),c=r==="y",p=o.x+o.width/2-a.width/2,f=o.y+o.height/2-a.height/2,d=o[s]/2-a[s]/2;let h;switch(u){case"top":h={x:p,y:o.y-a.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-a.width,y:f};break;default:h={x:o.x,y:o.y}}switch(Gt(n)){case"start":h[l]-=d*(e&&c?-1:1);break;case"end":h[l]+=d*(e&&c?-1:1);break}return h}const dl=async(t,n,e)=>{const{placement:o="bottom",strategy:a="absolute",middleware:r=[],platform:l}=e,s=r.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(n));let c=await l.getElementRects({reference:t,floating:n,strategy:a}),{x:p,y:f}=Xi(c,o,u),d=o,h={},v=0;for(let m=0;m<s.length;m++){const{name:_,fn:y}=s[m],{x:g,y:w,data:b,reset:k}=await y({x:p,y:f,initialPlacement:o,placement:d,strategy:a,middlewareData:h,rects:c,platform:l,elements:{reference:t,floating:n}});p=g??p,f=w??f,h={...h,[_]:{...h[_],...b}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(d=k.placement),k.rects&&(c=k.rects===!0?await l.getElementRects({reference:t,floating:n,strategy:a}):k.rects),{x:p,y:f}=Xi(c,d,u)),m=-1)}return{x:p,y:f,placement:d,strategy:a,middlewareData:h}};async function cl(t,n){var e;n===void 0&&(n={});const{x:o,y:a,platform:r,rects:l,elements:s,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Gi(n,t),v=sl(h),_=s[d?f==="floating"?"reference":"floating":f],y=Jn(await r.getClippingRect({element:(e=await(r.isElement==null?void 0:r.isElement(_)))==null||e?_:_.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:p,strategy:u})),g=f==="floating"?{...l.floating,x:o,y:a}:l.reference,w=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),b=await(r.isElement==null?void 0:r.isElement(w))?await(r.getScale==null?void 0:r.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Jn(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:w,strategy:u}):g);return{top:(y.top-k.top+v.top)/b.y,bottom:(k.bottom-y.bottom+v.bottom)/b.y,left:(y.left-k.left+v.left)/b.x,right:(k.right-y.right+v.right)/b.x}}function ul(t,n,e){return(t?[...e.filter(a=>Gt(a)===t),...e.filter(a=>Gt(a)!==t)]:e.filter(a=>Zn(a)===a)).filter(a=>t?Gt(a)===t||(n?al(a)!==a:!1):!0)}const fl=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(n){var e,o,a;const{rects:r,middlewareData:l,placement:s,platform:u,elements:c}=n,{crossAxis:p=!1,alignment:f,allowedPlacements:d=Ui,autoAlignment:h=!0,...v}=Gi(t,n),m=f!==void 0||d===Ui?ul(f||null,h,d):d,_=await cl(n,v),y=((e=l.autoPlacement)==null?void 0:e.index)||0,g=m[y];if(g==null)return{};const w=ol(g,r,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(s!==g)return{reset:{placement:m[0]}};const b=[_[Zn(g)],_[w[0]],_[w[1]]],k=[...((o=l.autoPlacement)==null?void 0:o.overflows)||[],{placement:g,overflows:b}],T=m[y+1];if(T)return{data:{index:y+1,overflows:k},reset:{placement:T}};const S=k.map(E=>{const C=Gt(E.placement);return[E.placement,C&&p?E.overflows.slice(0,2).reduce((O,N)=>O+N,0):E.overflows[0],E.overflows]}).sort((E,C)=>E[1]-C[1]),B=((a=S.filter(E=>E[2].slice(0,Gt(E[0])?2:3).every(C=>C<=0))[0])==null?void 0:a[0])||S[0][0];return B!==s?{data:{index:y+1,overflows:k},reset:{placement:B}}:{}}}};function Vt(t){return Qi(t)?(t.nodeName||"").toLowerCase():"#document"}function ct(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function qt(t){var n;return(n=(Qi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Qi(t){return t instanceof Node||t instanceof ct(t).Node}function Tt(t){return t instanceof Element||t instanceof ct(t).Element}function _t(t){return t instanceof HTMLElement||t instanceof ct(t).HTMLElement}function eo(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ct(t).ShadowRoot}function bn(t){const{overflow:n,overflowX:e,overflowY:o,display:a}=mt(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(a)}function hl(t){return["table","td","th"].includes(Vt(t))}function Ir(t){const n=Mr(),e=mt(t);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!n&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!n&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(e.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(e.contain||"").includes(o))}function pl(t){let n=on(t);for(;_t(n)&&!Xn(n);){if(Ir(n))return n;n=on(n)}return null}function Mr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Xn(t){return["html","body","#document"].includes(Vt(t))}function mt(t){return ct(t).getComputedStyle(t)}function Qn(t){return Tt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function on(t){if(Vt(t)==="html")return t;const n=t.assignedSlot||t.parentNode||eo(t)&&t.host||qt(t);return eo(n)?n.host:n}function to(t){const n=on(t);return Xn(n)?t.ownerDocument?t.ownerDocument.body:t.body:_t(n)&&bn(n)?n:to(n)}function Br(t,n,e){var o;n===void 0&&(n=[]),e===void 0&&(e=!0);const a=to(t),r=a===((o=t.ownerDocument)==null?void 0:o.body),l=ct(a);return r?n.concat(l,l.visualViewport||[],bn(a)?a:[],l.frameElement&&e?Br(l.frameElement):[]):n.concat(a,Br(a,[],e))}function no(t){const n=mt(t);let e=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const a=_t(t),r=a?t.offsetWidth:e,l=a?t.offsetHeight:o,s=Yn(e)!==r||Yn(o)!==l;return s&&(e=r,o=l),{width:e,height:o,$:s}}function ro(t){return Tt(t)?t:t.contextElement}function an(t){const n=ro(t);if(!_t(n))return jt(1);const e=n.getBoundingClientRect(),{width:o,height:a,$:r}=no(n);let l=(r?Yn(e.width):e.width)/o,s=(r?Yn(e.height):e.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const ml=jt(0);function io(t){const n=ct(t);return!Mr()||!n.visualViewport?ml:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function gl(t,n,e){return n===void 0&&(n=!1),!e||n&&e!==ct(t)?!1:n}function vn(t,n,e,o){n===void 0&&(n=!1),e===void 0&&(e=!1);const a=t.getBoundingClientRect(),r=ro(t);let l=jt(1);n&&(o?Tt(o)&&(l=an(o)):l=an(t));const s=gl(r,e,o)?io(r):jt(0);let u=(a.left+s.x)/l.x,c=(a.top+s.y)/l.y,p=a.width/l.x,f=a.height/l.y;if(r){const d=ct(r),h=o&&Tt(o)?ct(o):o;let v=d,m=v.frameElement;for(;m&&o&&h!==v;){const _=an(m),y=m.getBoundingClientRect(),g=mt(m),w=y.left+(m.clientLeft+parseFloat(g.paddingLeft))*_.x,b=y.top+(m.clientTop+parseFloat(g.paddingTop))*_.y;u*=_.x,c*=_.y,p*=_.x,f*=_.y,u+=w,c+=b,v=ct(m),m=v.frameElement}}return Jn({width:p,height:f,x:u,y:c})}const yl=[":popover-open",":modal"];function oo(t){return yl.some(n=>{try{return t.matches(n)}catch{return!1}})}function bl(t){let{elements:n,rect:e,offsetParent:o,strategy:a}=t;const r=a==="fixed",l=qt(o),s=n?oo(n.floating):!1;if(o===l||s&&r)return e;let u={scrollLeft:0,scrollTop:0},c=jt(1);const p=jt(0),f=_t(o);if((f||!f&&!r)&&((Vt(o)!=="body"||bn(l))&&(u=Qn(o)),_t(o))){const d=vn(o);c=an(o),p.x=d.x+o.clientLeft,p.y=d.y+o.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-u.scrollLeft*c.x+p.x,y:e.y*c.y-u.scrollTop*c.y+p.y}}function vl(t){return Array.from(t.getClientRects())}function ao(t){return vn(qt(t)).left+Qn(t).scrollLeft}function _l(t){const n=qt(t),e=Qn(t),o=t.ownerDocument.body,a=yn(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),r=yn(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-e.scrollLeft+ao(t);const s=-e.scrollTop;return mt(o).direction==="rtl"&&(l+=yn(n.clientWidth,o.clientWidth)-a),{width:a,height:r,x:l,y:s}}function $l(t,n){const e=ct(t),o=qt(t),a=e.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,u=0;if(a){r=a.width,l=a.height;const c=Mr();(!c||c&&n==="fixed")&&(s=a.offsetLeft,u=a.offsetTop)}return{width:r,height:l,x:s,y:u}}function wl(t,n){const e=vn(t,!0,n==="fixed"),o=e.top+t.clientTop,a=e.left+t.clientLeft,r=_t(t)?an(t):jt(1),l=t.clientWidth*r.x,s=t.clientHeight*r.y,u=a*r.x,c=o*r.y;return{width:l,height:s,x:u,y:c}}function lo(t,n,e){let o;if(n==="viewport")o=$l(t,e);else if(n==="document")o=_l(qt(t));else if(Tt(n))o=wl(n,e);else{const a=io(t);o={...n,x:n.x-a.x,y:n.y-a.y}}return Jn(o)}function so(t,n){const e=on(t);return e===n||!Tt(e)||Xn(e)?!1:mt(e).position==="fixed"||so(e,n)}function kl(t,n){const e=n.get(t);if(e)return e;let o=Br(t,[],!1).filter(s=>Tt(s)&&Vt(s)!=="body"),a=null;const r=mt(t).position==="fixed";let l=r?on(t):t;for(;Tt(l)&&!Xn(l);){const s=mt(l),u=Ir(l);!u&&s.position==="fixed"&&(a=null),(r?!u&&!a:!u&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||bn(l)&&!u&&so(t,l))?o=o.filter(p=>p!==l):a=s,l=on(l)}return n.set(t,o),o}function Cl(t){let{element:n,boundary:e,rootBoundary:o,strategy:a}=t;const l=[...e==="clippingAncestors"?kl(n,this._c):[].concat(e),o],s=l[0],u=l.reduce((c,p)=>{const f=lo(n,p,a);return c.top=yn(f.top,c.top),c.right=Ki(f.right,c.right),c.bottom=Ki(f.bottom,c.bottom),c.left=yn(f.left,c.left),c},lo(n,s,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ol(t){const{width:n,height:e}=no(t);return{width:n,height:e}}function El(t,n,e){const o=_t(n),a=qt(n),r=e==="fixed",l=vn(t,!0,r,n);let s={scrollLeft:0,scrollTop:0};const u=jt(0);if(o||!o&&!r)if((Vt(n)!=="body"||bn(a))&&(s=Qn(n)),o){const f=vn(n,!0,r,n);u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}else a&&(u.x=ao(a));const c=l.left+s.scrollLeft-u.x,p=l.top+s.scrollTop-u.y;return{x:c,y:p,width:l.width,height:l.height}}function co(t,n){return!_t(t)||mt(t).position==="fixed"?null:n?n(t):t.offsetParent}function uo(t,n){const e=ct(t);if(!_t(t)||oo(t))return e;let o=co(t,n);for(;o&&hl(o)&&mt(o).position==="static";)o=co(o,n);return o&&(Vt(o)==="html"||Vt(o)==="body"&&mt(o).position==="static"&&!Ir(o))?e:o||pl(t)||e}const Sl=async function(t){const n=this.getOffsetParent||uo,e=this.getDimensions;return{reference:El(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,...await e(t.floating)}}};function xl(t){return mt(t).direction==="rtl"}const Tl={convertOffsetParentRelativeRectToViewportRelativeRect:bl,getDocumentElement:qt,getClippingRect:Cl,getOffsetParent:uo,getElementRects:Sl,getClientRects:vl,getDimensions:Ol,getScale:an,isElement:Tt,isRTL:xl},Nl=fl,Al=(t,n,e)=>{const o=new Map,a={platform:Tl,...e},r={...a.platform,_c:o};return dl(t,n,{...a,platform:r})},K0="",Dl={name:"IbPopover",props:{position:{type:[String,Array],default:"top"},alwaysVisible:{type:Boolean,default:!1},attachToBody:{type:Boolean,default:!1}},data(){return{parentNode:null,isVisible:!!this.alwaysVisible,activePosition:null}},mounted(){this.$nextTick(()=>{var t,n,e,o;this.parentNode=this.$el.parentNode,this.alwaysVisible||((t=this.parentNode)==null||t.addEventListener("focus",this.showPopover,!0),(n=this.parentNode)==null||n.addEventListener("blur",this.hidePopover,!0),(e=this.parentNode)==null||e.addEventListener("mouseover",this.showPopover),(o=this.parentNode)==null||o.addEventListener("mouseleave",this.hidePopover))})},methods:{showPopover(){this.isVisible||(this.isVisible=!0,Al(this.parentNode,this.$refs.popover,{middleware:[Nl({allowedPlacements:this.position})]}).then(({x:t,y:n,placement:e})=>{this.activePosition=e,Object.assign(this.$refs.popover.style,{left:`${t}px`,top:`${n}px`})}))},hidePopover(){this.isVisible=!1}},computed:{classes(){const t=["ib-popover"];return t.push(`ib-${this.activePosition}`),this.isVisible&&t.push("active"),t}},beforeUnmount(){!this.alwaysVisible&&this.parentNode&&(this.parentNode.removeEventListener("focus",this.showPopover,!0),this.parentNode.removeEventListener("blur",this.hidePopover,!0),this.parentNode.removeEventListener("mouseover",this.showPopover,!0),this.parentNode.removeEventListener("mouseleave",this.hidePopover,!0))}};function Pl(t,n,e,o,a,r){return e.attachToBody?(i.openBlock(),i.createBlock(i.Teleport,{key:0,to:"body"},[i.createVNode(i.Transition,null,{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{ref:"popover",class:i.normalizeClass(r.classes)},[i.renderSlot(t.$slots,"default",{},void 0,!0)],2),[[i.vShow,a.isVisible]])]),_:3})])):(i.openBlock(),i.createBlock(i.Transition,{key:1},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{ref:"popover",class:i.normalizeClass(r.classes)},[i.renderSlot(t.$slots,"default",{},void 0,!0)],2),[[i.vShow,a.isVisible]])]),_:3}))}const fo=_e(Dl,[["render",Pl],["__scopeId","data-v-9e816e9b"]]),G0="",Il={name:"IbTooltip",props:{position:{type:String},title:{type:String},text:{type:String},alwaysVisible:{type:Boolean,default:!1}},computed:{classList(){const t=["ib-tooltip"];return this.title&&t.push("ib-tooltip-large"),t}},components:{IbPopover:fo}},Ml={key:0};function Bl(t,n,e,o,a,r){const l=i.resolveComponent("ib-popover");return i.openBlock(),i.createBlock(l,{position:e.position,"always-visible":e.alwaysVisible,class:i.normalizeClass(r.classList)},{default:i.withCtx(()=>[e.title?(i.openBlock(),i.createElementBlock("b",Ml,i.toDisplayString(e.title),1)):i.createCommentVNode("",!0),i.createElementVNode("p",null,i.toDisplayString(e.text),1)]),_:1},8,["position","always-visible","class"])}const ln=_e(Il,[["render",Bl],["__scopeId","data-v-6fb94ac5"]]),ho={[Kt.primary]:Kt.primary,[Kt.tertiary]:Kt.tertiary,[Kt.ghost]:Kt.ghost,white:"white"},po={xs:"xs",s:"s",m:"m"},W0="",Ll={name:"IbIconButton",props:{kind:{type:String,default:ho.primary,validator:t=>Object.keys(ho).includes(t)},size:{type:String,default:po.s,validator:t=>Object.keys(po).includes(t)},rounded:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},href:{type:String,default:""},helpText:{type:String,default:""},disabledFocus:{type:Boolean,default:!1},preventDefault:{type:Boolean,default:!1}},data(){return{tooltipVisible:!1}},computed:{classes(){const t=["ib-icon-button"];return t.push(`ib-icon-btn-${this.kind}`),t.push(`ib-icon-btn-${this.size}`),this.rounded&&t.push("ib-icon-btn-rounded"),this.disabled&&t.push("ib-icon-btn-disabled"),t},attrs(){const t={...this.$attrs};return t.class=[...this.classes,t.class],this.disabledFocus&&(t.tabindex="-1"),t}},components:{IbButton:Hi,IbTooltip:ln},inheritAttrs:!1};function Rl(t,n,e,o,a,r){const l=i.resolveComponent("ib-tooltip"),s=i.resolveComponent("ib-button");return i.openBlock(),i.createBlock(s,i.mergeProps(r.attrs,{href:e.href,kind:e.kind,disabled:e.disabled,"prevent-default":e.preventDefault}),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default"),e.helpText.length?(i.openBlock(),i.createBlock(l,{key:0,text:e.helpText},null,8,["text"])):i.createCommentVNode("",!0)]),_:3},16,["href","kind","disabled","prevent-default"])}const ut=_e(Ll,[["render",Rl]]),er={alert:"alert",error:"error",warning:"warning",info:"info",success:"success"},Y0="",jl={name:"IbAlert",props:{type:{type:String,default:er.alert,validator:t=>Object.keys(er).includes(t)},showIcon:{type:Boolean,default:!1},showCloseButton:{type:Boolean,default:!1},title:{type:String,default:""},additionalTitleText:{type:String,default:""}},mounted(){this.checkHeight(),this.$refs.content&&(this.contentObserver=new ResizeObserver(()=>{this.checkHeight()}),this.contentObserver.observe(this.$refs.content)),window.addEventListener("resize",()=>this.checkHeight())},data(){return{contentObserver:null}},methods:{close(){this.$emit("close")},checkHeight(){var e;if(!this.$refs.content)return;const t=getComputedStyle(this.$refs.content),n=(e=this.$refs.content)==null?void 0:e.parentElement.offsetWidth;!n||!t||(parseInt(t.width)<=n&&this.$refs.content.classList.remove("large"),parseInt(t.height)>37&&this.showIcon&&(this.title.length?this.$refs.content.classList.add("large"):this.$refs.content.classList.add("medium")))}},computed:{classes(){const t=["ib-alert"];return t.push(`ib-alert-${this.type}`),this.title.length&&t.push("has-title"),this.showIcon&&t.push("has-icon"),this.showCloseButton&&t.push("has-close-button"),this.$slots.link&&t.push("has-link"),t},iconName(){return this.type===er.info?"information-circle-outline":this.type===er.success?"checkmark-circle-outline":"alert-circle-outline"}},beforeUnmount(){var t;(t=this.contentObserver)==null||t.disconnect(),window.removeEventListener("resize",()=>this.checkHeight())},components:{IbIcon:Le,IbIconButton:ut}},Vl={ref:"content",class:"content"},ql={class:"content-head"},Fl={key:1,class:"ib-alert-title"},Hl={class:"text-content"},zl={class:"link"};function Ul(t,n,e,o,a,r){var u;const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",{role:"alert",class:i.normalizeClass(r.classes)},[i.createElementVNode("div",Vl,[i.createElementVNode("span",ql,[e.showIcon?(i.openBlock(),i.createBlock(l,{key:0,class:"ib-alert-icon",name:r.iconName},null,8,["name"])):i.createCommentVNode("",!0),(u=e.title)!=null&&u.length?(i.openBlock(),i.createElementBlock("b",Fl,i.toDisplayString(e.title),1)):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"title",{},void 0,!0)]),i.createElementVNode("span",Hl,[i.renderSlot(t.$slots,"default",{},void 0,!0)]),i.createElementVNode("div",zl,[i.renderSlot(t.$slots,"link",{},void 0,!0)])],512),e.showCloseButton?(i.openBlock(),i.createBlock(s,{key:0,class:"close-button",kind:"ghost","prevent-default":!0,onClick:r.close},{default:i.withCtx(()=>[i.createVNode(l,{class:"close-button-icon",name:"close-outline"})]),_:1},8,["onClick"])):i.createCommentVNode("",!0)],2)}const Ft=_e(jl,[["render",Ul],["__scopeId","data-v-8437bad2"]]),Kl={M:"m",L:"l",XL:"xl"},Gl={SQUARE:"square",CIRCLE:"circle"},Z0="",Wl={name:"IbAvatar",props:{firstName:{type:String,default:""},lastName:{type:String,default:""},src:{type:String,default:""},userAvatar:{type:Boolean,default:!1},size:{type:String,default:Kl.M},type:{type:String,default:Gl.CIRCLE}},computed:{classList(){return["avatar",`avatar-size-${this.size}`,`avatar-type-${this.type}`]},validateName(){var t,n;return((t=this.firstName)==null?void 0:t.trim().length)!==0&&((n=this.lastName)==null?void 0:n.trim().length)!==0},initials(){return this.firstName[0].toUpperCase()+this.lastName[0].toUpperCase()}},components:{IbIcon:Le}},Yl=["src","alt"];function Zl(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon");return e.src&&!e.userAvatar?(i.openBlock(),i.createElementBlock("img",{key:0,class:i.normalizeClass(r.classList),src:e.src,alt:e.firstName+""+e.lastName},null,10,Yl)):e.src&&e.userAvatar?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["user-avatar",r.classList]),style:i.normalizeStyle({backgroundImage:"url("+e.src+")"})},null,6)):r.validateName?(i.openBlock(),i.createElementBlock("div",{key:3,class:i.normalizeClass([r.classList,"default-avatar"])},i.toDisplayString(r.initials),3)):(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(["empty-avatar",r.classList])},[i.createVNode(l,{name:"camera-outline"})],2))}const Jl=_e(Wl,[["render",Zl],["__scopeId","data-v-63abd28e"]]),J0="",Xl={name:"IbBadge",props:{content:{type:[String,Number],default:""}},computed:{classes(){const t=["ib-badge"];return this.content.toString().length&&t.push("ib-badge-large"),t},normalizeContent(){return this.content>99?"99+":this.content}}};function Ql(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(r.classes)},i.toDisplayString(r.normalizeContent),3)}const es=_e(Xl,[["render",Ql],["__scopeId","data-v-328df75a"]]),X0="",ts={name:"IbButtonGroup"},ns={class:"ib-button-group"};function rs(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("div",ns,[i.renderSlot(t.$slots,"default")])}const is=_e(ts,[["render",rs]]),sn={success:"success",neutral:"neutral",info:"info",error:"error",new:"new",favorite:"favorite",pending:"pending"},Q0="",os={props:{status:{type:String,default:sn.neutral,validator:t=>Object.keys(sn).includes(t)},icon:{type:String,default:""},showIcon:{type:Boolean,default:!1}},computed:{classes(){const t=["ib-tag-pill"];return t.push(`ib-tag-pill-${this.status}`),t},iconName(){if(this.icon)return this.icon;switch(this.status){case sn.success:return"checkmark-outline";case sn.neutral:return"time-outline";case sn.info:return"information-circle-outline";case sn.error:return"close-outline";default:return""}}},components:{IbIcon:Le}};function as(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(r.classes)},[e.showIcon&&r.iconName.length?(i.openBlock(),i.createBlock(l,{key:0,name:r.iconName},null,8,["name"])):i.createCommentVNode("",!0),i.createElementVNode("span",null,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],2)}const ls=_e(os,[["render",as],["__scopeId","data-v-92406065"]]),ss={topLeft:"top-left",topCenter:"top-center",topRight:"top-right",rightTop:"right-top",rightCenter:"right-center",rightBottom:"right-bottom",bottomLeft:"bottom-left",bottomCenter:"bottom-center",bottomRight:"bottom-right",leftTop:"left-top",leftCenter:"left-center",leftBottom:"left-bottom"},ep="",tp="",ds={name:"IbTooltip",props:{position:{type:String,default:ss.topCenter},title:{type:String},isOpen:{type:Boolean,default:!1}},mounted(){this.$nextTick(()=>{this.parentNode=this.$el.parentNode,getComputedStyle(this.parentNode).position!=="absolute"&&(this.parentNode.style.position="relative")})},data(){return{isOpenedState:this.isOpen}},methods:{open(){this.isOpenedState=!0,this.$emit("open")},close(){this.isOpenedState=!1,this.$emit("close")}},computed:{classes(){const t=["ib-toggle-tip"];return t.push(`ib-${this.position}`),t}},watch:{isOpen(t){t?this.open():this.close()}},components:{IbIconButton:ut,IbIcon:Le}},cs={class:"ib-toggle-tip-head"},us={class:"ib-toggle-tip-content"},fs={class:"ib-toggle-tip-button-set"};function hs(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createBlock(i.Transition,null,{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(r.classes)},[i.createElementVNode("div",cs,[i.createElementVNode("p",null,i.toDisplayString(e.title),1),i.createVNode(s,{class:"close-button",kind:"ghost",onClick:i.withModifiers(r.close,["prevent"])},{default:i.withCtx(()=>[i.createVNode(l,{name:"close-outline"})]),_:1},8,["onClick"])]),i.createElementVNode("div",us,[i.renderSlot(t.$slots,"default",{},void 0,!0)]),i.createElementVNode("div",fs,[i.renderSlot(t.$slots,"buttons",{},void 0,!0)])],2),[[i.vShow,a.isOpenedState]])]),_:3})}const mo=_e(ds,[["render",hs],["__scopeId","data-v-9e7c679e"]]),Lr=27,go=32,ps=13,yo=9,ms=38,gs=37,ys=39,bo=40,bs=8,vs="click",{performance:tr}=window,_s=typeof(tr==null?void 0:tr.now)=="function"&&Date.now()>document.createEvent("Event").timeStamp?()=>tr.now():()=>Date.now(),_n=new Map;let $n=!1;const vo=t=>{_n.forEach(({bindTimeStamp:n,callback:e},o)=>{if(!(o.contains(t.target)||t.timeStamp<=n))try{e(t)}catch(a){console.error(a)}})},$s=()=>{$n||(document.addEventListener("click",vo,{capture:!0}),$n=!0)},ws=()=>{$n&&(document.removeEventListener("click",vo),$n=!1)},nr={created:(t,{value:n,arg:e="click"})=>{if(typeof n!="function")throw new Error(`[OutsideDirective] Value must be a function; got ${typeof n}!`);if(e!=="click")throw new Error(`[OutsideDirective] Cannot bind ${e} events; only click events are currently supported!`);_n.has(t)||($n||$s(),_n.set(t,{bindTimeStamp:_s(),callback:n}))},beforeUnmount:t=>{_n.delete(t),_n.size===0&&ws()}},wn={left:"left",right:"right",center:"center"},rr={top:"top",bottom:"bottom"},ip="",op="",ks={name:"IbDropdown",directives:{Outside:nr},props:{vertical:{type:String,default:rr.bottom},horizontal:{type:String,default:wn.left},triggerClass:{default:""},isOpened:{type:Boolean,default:!1},showCloseIcon:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},triggerType:{type:String,default:vs},destroyOnHide:{type:Boolean,default:!1}},watch:{isOpened(t){t?this.open():this.close()}},mounted(){this.$globalEvents.$on("dropdown:open",t=>{this.$el.contains(t.$el)||this.close()}),document.addEventListener("focus",this.closeOnEventOutside,!0),document.addEventListener("keyup",this.onKeyupDocument)},data(){return{isOpenedState:this.isOpened,timeout:null}},methods:{onKeydown(t){(t.keyCode===ps||t.keyCode===go)&&(t.preventDefault(),this.toggle()),t.keyCode===bo&&(t.preventDefault(),this.open())},onKeyupDocument(t){t.keyCode===Lr&&(t.preventDefault(),this.close())},toggle(){this.isOpenedState?this.close():this.open()},open(){this.disabled||(this.isOpenedState=!0,this.$emit("open"),this.$globalEvents.$emit("dropdown:open",this))},close(){if(this.isOpenedState){if(this.disabled)return;this.isOpenedState=!1,this.$emit("close")}},debouncedOpen(){this.timeout=setTimeout(()=>{this.open()},300)},debouncedClose(){this.close(),clearTimeout(this.timeout)},closeOnClickIfRequired(){this.closeOnClick&&this.close()},closeOnEventOutside(t){this.$el.contains(t.target)||this.close()}},computed:{classes(){const t=this.vertical===rr.bottom?" dropdown-bottom":" dropdown-top",n=this.horizontal===wn.left?" dropdown-left":this.horizontal===wn.right?" dropdown-right":" dropdown-center",e=this.isOpenedState?" active":"";return t+n+e},triggerClasses(){let t=this.isOpenedState?"active":"";return this.disabled&&(t+=" dropdown-trigger-disabled"),this.triggerClass+t},hasTrigger(){return!!this.$slots.trigger}},beforeUnmount(){document.removeEventListener("focus",this.closeOnEventOutside,!0),document.removeEventListener("keypress",this.onKeydownDocument)}},Cs={class:"ib-dropdown"},Os={class:"footer-slot"};function Es(t,n,e,o,a,r){const l=i.resolveDirective("outside");return i.withDirectives((i.openBlock(),i.createElementBlock("div",Cs,[r.hasTrigger&&e.triggerType==="click"?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["dropdown-trigger",r.triggerClasses]),ref:"dropdown",onKeydown:n[0]||(n[0]=(...s)=>r.onKeydown&&r.onKeydown(...s)),onClick:n[1]||(n[1]=i.withModifiers((...s)=>r.toggle&&r.toggle(...s),["prevent","stop"]))},[i.renderSlot(t.$slots,"trigger",{isOpened:a.isOpenedState},void 0,!0)],34)):i.createCommentVNode("",!0),r.hasTrigger&&e.triggerType==="hover"?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(["dropdown-trigger",r.triggerClasses]),onMouseenter:n[2]||(n[2]=(...s)=>r.debouncedOpen&&r.debouncedOpen(...s)),onMouseleave:n[3]||(n[3]=(...s)=>r.debouncedClose&&r.debouncedClose(...s))},[i.renderSlot(t.$slots,"trigger",{isOpened:a.isOpenedState},void 0,!0)],34)):i.createCommentVNode("",!0),!e.destroyOnHide||a.isOpenedState?i.withDirectives((i.openBlock(),i.createElementBlock("div",{key:2,ref:"body",class:i.normalizeClass("ib-dropdown-menu "+r.classes)},[i.createElementVNode("div",{class:"dropdown-body",onClick:n[5]||(n[5]=(...s)=>r.closeOnClickIfRequired&&r.closeOnClickIfRequired(...s))},[i.renderSlot(t.$slots,"body",{isOpenedState:a.isOpenedState},void 0,!0),e.showCloseIcon?(i.openBlock(),i.createElementBlock("span",{key:0,class:"close",onClick:n[4]||(n[4]=(...s)=>r.close&&r.close(...s))},[i.renderSlot(t.$slots,"close",{},void 0,!0)])):i.createCommentVNode("",!0)]),i.createElementVNode("div",Os,[i.renderSlot(t.$slots,"footer",{},void 0,!0)])],2)),[[i.vShow,a.isOpenedState]]):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"before",onClick:n[6]||(n[6]=(...s)=>r.close&&r.close(...s))},[i.renderSlot(t.$slots,"before",{},void 0,!0)])])),[[l,r.close]])}const ir=_e(ks,[["render",Es],["__scopeId","data-v-dfb4a39a"]]),ap="",Ss={name:"IbList",data(){return{rootClass:"ib-list"}},methods:{onKeydown(t){var n,e,o,a,r;if(t.keyCode===bo){if(this.$el.parentNode.closest(`.${this.rootClass}`))return;t.preventDefault();const l=document.activeElement,s=l.querySelector(`.${this.rootClass}`);let u=l.nextElementSibling?l.nextElementSibling:(n=l.parentNode.nextElementSibling)==null?void 0:n.childNodes[0];if(s&&window.getComputedStyle(s).display!=="none"){s.querySelector('a, button, input, [tabindex="0"]').focus();return}if(u){u.focus();return}const c=(o=(e=l.closest(`.${this.rootClass}`).parentNode)==null?void 0:e.parentNode)==null?void 0:o.nextElementSibling.childNodes[0];c&&c.nodeName!=="#text"&&c.focus()}if(t.keyCode===ms){if(this.$el.parentNode.closest(`.${this.rootClass}`))return;t.preventDefault();const l=document.activeElement,s=l.previousElementSibling?l.previousElementSibling:(a=l.parentNode.previousElementSibling)==null?void 0:a.childNodes[0];if(!s){l.closest(`.${this.rootClass}`).parentNode.focus();return}if(s&&s.nodeName!=="#text"){const u=s==null?void 0:s.querySelector(`.${this.rootClass}`);if(u&&window.getComputedStyle(u).display!=="none"){const c=Array.from(u.childNodes).filter(p=>p.nodeName!=="#text");(r=c[c.length-1])==null||r.childNodes[0].focus();return}s.focus()}}}}};function xs(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("ul",{class:i.normalizeClass(a.rootClass),onKeydown:n[0]||(n[0]=(...l)=>r.onKeydown&&r.onKeydown(...l))},[i.renderSlot(t.$slots,"default")],34)}const Rr=_e(Ss,[["render",xs]]),lp="",Ts={props:{vertical:{type:String,default:rr.bottom},horizontal:{type:String,default:wn.left},isOpened:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{proxyEvents(t){this.$emit(t.event,...t.args)}},data(){return{list:this.$refs.list}},computed:{hasTrigger(){return!!this.$slots.trigger}},components:{IbDropdown:ir,IbList:Rr}},Ns={class:"dropdown-list-wrapper"};function As(t,n,e,o,a,r){const l=i.resolveComponent("ib-list"),s=i.resolveComponent("ib-dropdown");return i.openBlock(),i.createElementBlock("div",Ns,[i.createVNode(s,i.mergeProps({horizontal:e.horizontal,vertical:e.vertical,isOpened:e.isOpened,closeOnClick:e.closeOnClick,disabled:e.disabled},t.$attrs,{ref:"dropdown",onAll:r.proxyEvents}),i.createSlots({body:i.withCtx(({isOpened:u})=>[i.createVNode(l,{ref:"list",class:"list"},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"body",{isOpenedState:u})]),_:2},1536)]),_:2},[r.hasTrigger?{name:"trigger",fn:i.withCtx(({isOpened:u})=>[i.renderSlot(t.$slots,"trigger",{isOpened:u})]),key:"0"}:void 0]),1040,["horizontal","vertical","isOpened","closeOnClick","disabled","onAll"])])}const or=_e(Ts,[["render",As]]),sp="",Ds={props:{checked:{type:Boolean,default:!1},href:{type:String}},computed:{attrs(){const t={class:"ib-dropdown-item"};return this.href&&(t.href=this.href),t}}},Ps={class:"dropdown-item-wrapper"},Is={class:"dropdown-item-icon"};function Ms(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("li",Ps,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.href?"a":"div"),i.mergeProps({class:e.checked?"active":""},r.attrs,{tabindex:"0"}),{default:i.withCtx(()=>[i.createElementVNode("p",null,[i.createElementVNode("div",Is,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),i.renderSlot(t.$slots,"default",{ref:"slot"},void 0,!0)])]),_:3},16,["class"]))])}const jr=_e(Ds,[["render",Ms],["__scopeId","data-v-11b4be9b"]]),Bs={common:"common",danger:"danger"},dp="",Ls={name:"IbSplitButton",props:{id:{type:String,default:()=>pt()},kind:{type:String,default:Bs.common},verticalPosition:{type:String,default:"bottom"},disabled:{type:Boolean,default:!1},saveSelected:{type:Boolean,default:!1}},mounted(){var t;if(this.childList=Array.from(this.$refs.list.children),(t=this.childList)==null||t.forEach((n,e)=>{n.addEventListener("click",()=>{this.childList[this.activeElemIdx].classList.remove("active"),this.saveSelected&&(this.activeElemIdx=e,localStorage.setItem(`split-button-${this.id}`,e))})}),this.saveSelected){const n=localStorage.getItem(`split-button-${this.id}`);n&&(this.activeElemIdx=n)}this.$nextTick(()=>{this.setActiveItem()}),this.listObserver=new MutationObserver(n=>{for(const e of n)if(e.type==="attributes"&&e.attributeName==="disabled"){this.mainButtonAttrs.disabled=e.target.disabled;break}}),this.listObserver.observe(this.$refs.list,{attributes:!0,subtree:!0})},data(){return{activeElemIdx:0,content:"",mainButtonAttrs:{},isLink:!1,childList:[],listObserver:null}},components:{IbIcon:Le,IbDropdownList:or},methods:{setActiveItem(){const t=this.$slots.default()[this.activeElemIdx].props;this.mainButtonAttrs=t,this.mainButtonAttrs&&"href"in this.mainButtonAttrs?this.isLink=!0:this.isLink=!1,this.childList[this.activeElemIdx].classList.add("active"),this.content=this.childList[this.activeElemIdx].textContent},onClickLink(t){if(this.disabled){t.preventDefault();return}}},computed:{classes(){const t=["split-button"];return t.push(`split-button-${this.kind}`),t}},watch:{activeElemIdx(){this.setActiveItem()}},beforeUnmount(){this.listObserver.disconnect(),this.listObserver=null}},Rs=["disabled"],js=["disabled"],Vs={ref:"list"};function qs(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-dropdown-list");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(r.classes)},[a.isLink?(i.openBlock(),i.createElementBlock("a",i.mergeProps({key:1,class:["split-button-main",{disabled:e.disabled}],disabled:e.disabled},a.mainButtonAttrs,{onClick:n[0]||(n[0]=(...u)=>r.onClickLink&&r.onClickLink(...u))}),i.toDisplayString(a.content),17,Rs)):(i.openBlock(),i.createElementBlock("button",i.mergeProps({key:0,class:"split-button-main"},a.mainButtonAttrs),i.toDisplayString(a.content),17)),i.createVNode(s,{disabled:e.disabled,closeOnClick:!0,vertical:e.verticalPosition,horizontal:e.verticalPosition==="top"?"right":"left"},{trigger:i.withCtx(()=>[i.createElementVNode("button",{disabled:e.disabled,class:"split-button-menu-trigger"},[i.createVNode(l,{name:"chevron-down-outline"})],8,js)]),body:i.withCtx(()=>[i.createElementVNode("div",Vs,[i.renderSlot(t.$slots,"default")],512)]),_:3},8,["disabled","vertical","horizontal"])],2)}const Fs=_e(Ls,[["render",qs]]),cp="",Hs={props:{href:{type:String,default:""}},computed:{attrs(){const t={};return this.href.length&&(t.href=this.href),t}}};function zs(t,n,e,o,a,r){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.href.length?"a":"button"),i.mergeProps(r.attrs,{class:"ib-dropdown-item"}),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16)}const Us=_e(Hs,[["render",zs],["__scopeId","data-v-4cf00feb"]]),Nt={S:"s",M:"m",L:"l",XL:"xl"},up="",Ks={name:"IbModal",directives:{Outside:nr},emits:{open:null,close:null},props:{active:{type:Boolean,default:!1},classList:{type:String,default:""},stopPropagation:{type:Boolean,default:!1},showCloseButton:{type:Boolean,default:!0},size:{type:String,default:Nt.S}},watch:{active(t){this.isActive=t}},mounted(){var n,e,o,a;const t=(e=(n=this.$refs)==null?void 0:n.modal)==null?void 0:e.querySelectorAll("[tabindex], a, button, input, select, textarea");(o=t[0])==null||o.addEventListener("keydown",r=>{r.keyCode===yo&&r.shiftKey&&(r.preventDefault(),t[t.length-1].focus())}),(a=t[t.length-1])==null||a.addEventListener("keydown",r=>{r.keyCode===yo&&!r.shiftKey&&(r.preventDefault(),t[0].focus())}),document.addEventListener("keydown",this.onKeydown),document.addEventListener("blur",this.setFocusOnModal,!0)},data(){return{isActive:this.active}},methods:{showModal(t){t?this.open():this.close()},onTriggerBlur(t){var n,e,o;!((n=this.$refs.modal)!=null&&n.contains(t.relatedTarget))&&this.isActive&&((o=(e=this.$refs.modal)==null?void 0:e.querySelector("a, button, [tabindex]"))==null||o.focus())},open(){this.isActive=!0,document.body.classList.add("modal-open"),this.$emit("open")},close(){var t,n;(n=(t=this.$refs.trigger)==null?void 0:t.querySelector("a, button, [tabindex]"))==null||n.focus(),document.body.classList.remove("modal-open"),this.$emit("close")},setFocusOnModal(t){var n,e;!((n=this.$refs.modal)!=null&&n.contains(t.target))&&!((e=this.$refs.modal)!=null&&e.contains(t.relatedTarget))&&this.isActive&&this.$refs.modal.querySelector("[tabindex], a, button, input, select, textarea").focus()},clickOutside(t){var n;this.stopPropagation||!((n=this.$refs.trigger)!=null&&n.contains(t.target))&&this.isActive&&this.close()},onKeydown(t){t.keyCode===Lr&&!this.stopPropagation&&this.isActive&&this.close()}},computed:{bodyStyles(){const t={};return this.size===Nt.S&&(t.width="380px",t.minHeight="160px",t.maxHeight="680px"),this.size===Nt.M&&(t.width="600px",t.minHeight="260px",t.maxHeight="680px"),this.size===Nt.L&&(t.width="850px",t.minHeight="400px",t.maxHeight="680px"),this.size===Nt.XL&&(t.width="80vw",t.maxWidth="1400px"),t},bodyClassList(){const t=["modal-body"];return this.size===Nt.S&&t.push("modal-body-s"),this.size===Nt.M&&t.push("modal-body-m"),this.size===Nt.L&&t.push("modal-body-l"),this.size===Nt.XL&&t.push("modal-body-xl"),t},hasTrigger(){return!!this.$slots.trigger},hasHeader(){return!!this.$slots.header},hasFooter(){return!!this.$slots.footer}},components:{IbIconButton:ut,IbIcon:Le},beforeUnmount(){this.isActive&&this.close(),document.removeEventListener("keydown",this.onKeydown),document.removeEventListener("blur",this.setFocusOnModal,!0)}},Gs={key:1,class:"modal-header"},Ws={key:2,class:"modal-footer"};function Ys(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),u=i.resolveDirective("outside");return i.openBlock(),i.createElementBlock(i.Fragment,null,[r.hasTrigger?(i.openBlock(),i.createElementBlock("div",{key:0,class:"modal-trigger",ref:"trigger",onBlurCapture:n[0]||(n[0]=(...c)=>r.onTriggerBlur&&r.onTriggerBlur(...c)),onClick:n[1]||(n[1]=(...c)=>r.open&&r.open(...c))},[i.renderSlot(t.$slots,"trigger",{},void 0,!0)],544)):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(["modal",e.classList]),ref:"modal"},[i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(r.bodyClassList),style:i.normalizeStyle(r.bodyStyles)},[e.showCloseButton?(i.openBlock(),i.createBlock(s,{key:0,class:"modal-close-icon",kind:"ghost",onClick:r.close},{default:i.withCtx(()=>[i.createVNode(l,{name:"close-outline"})]),_:1},8,["onClick"])):i.createCommentVNode("",!0),r.hasHeader?(i.openBlock(),i.createElementBlock("p",Gs,[i.renderSlot(t.$slots,"header",{showModal:r.showModal},void 0,!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["modal-content",{"without-title":!r.hasHeader}])},[i.renderSlot(t.$slots,"body",{showModal:r.showModal},void 0,!0)],2),r.hasFooter?(i.openBlock(),i.createElementBlock("div",Ws,[i.renderSlot(t.$slots,"footer",{showModal:r.showModal},void 0,!0)])):i.createCommentVNode("",!0)],6)),[[u,r.clickOutside]])],2),[[i.vShow,a.isActive]])]))],64)}const Zs=_e(Ks,[["render",Ys],["__scopeId","data-v-ad9343ef"]]);function _o(t){return"#"+t.toLowerCase().replace(/ /g,"-")}const fp="",Js={name:"IbTabDropdown",props:{tabs:{rype:Object,default:{}},selectedTab:{type:String,default:""}},data(){return{selectedTabByDropdown:"",isDisabledDropdown:this.setDisabledTab()}},methods:{createHref(t){return _o(t)},selectTab(t){this.selectedTabByDropdown=t,this.$emit("select-tab",t)},setDisabledTab(){return this.tabs.tabs.every(t=>t.disabled)}},computed:{isActive(){for(let t of this.tabs.tabs)if(t.id===this.selectedTab)return!0;return!1}},components:{IbDropdownList:or,IbDropdownItem:jr,IbIcon:Le}},Xs={class:"wrapper-tab-link dropdown-tab"},Qs=["tabindex"];function ed(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-dropdown-item"),u=i.resolveComponent("ib-dropdown-list");return i.openBlock(),i.createElementBlock("div",Xs,[i.createVNode(u,{disabled:a.isDisabledDropdown,"close-on-click":!0},{trigger:i.withCtx(()=>[i.createElementVNode("span",{class:i.normalizeClass(["tab-link",{active:a.selectedTabByDropdown===e.selectedTab||r.isActive,disabled:a.isDisabledDropdown}]),tabindex:a.isDisabledDropdown?-1:0},[i.createTextVNode(i.toDisplayString(e.tabs.name)+" ",1),i.createVNode(l,{name:"chevron-down"})],10,Qs)]),body:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.tabs.tabs,(c,p)=>(i.openBlock(),i.createBlock(s,{key:p,checked:c.id===e.selectedTab,href:r.createHref(c.id),tabindex:c.disabled?-1:0,class:i.normalizeClass([{disabled:c.disabled},"dropdown-tab-item"]),target:"_self",onClick:f=>r.selectTab(c.id)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.title),1)]),_:2},1032,["checked","href","tabindex","class","onClick"]))),128))]),_:1},8,["disabled"])])}const $o=_e(Js,[["render",ed]]),hp="",td={name:"IbTabs",props:{selectedTabId:{type:String,default:""}},data(){return{tabs:[],selectedTab:this.selectTabId}},watch:{selectedTabId(t){this.selectTab(t)}},created(){const t=[];this.$slots.default().forEach(n=>n.type===Symbol.for("v-fgt")?t.push(...n.children):t.push(n)),t.forEach(n=>{if(!n.props.name)this.tabs.push(n.props);else{const e=this.tabs.findIndex(o=>o.name===n.props.name);if(e!==-1)this.tabs[e].tabs.push(n.props);else{const o={name:n.props.name,tabs:[n.props]};this.tabs.push(o)}}});for(let n of this.tabs)if(!n.disabled)if(n.tabs){for(let e of n.tabs)if(!e.disabled){this.selectTab(e.id);return}}else{this.selectTab(n.id);return}},methods:{createHref(t){return _o(t)},selectTab(t){this.$emit("changeTab",t),this.selectedTab=t}},components:{IbTabDropdown:$o},emits:["changeTab"]},nd={class:"tabs"},rd={class:"tabs-list"},id={key:0,class:"wrapper-tab-link"},od=["href","tabindex","onClick"],ad={class:"tabs-content",ref:"tabHandler"};function ld(t,n,e,o,a,r){const l=i.resolveComponent("ib-tab-dropdown");return i.openBlock(),i.createElementBlock("div",nd,[i.createElementVNode("ul",rd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tabs,(s,u)=>(i.openBlock(),i.createElementBlock("li",{class:"tab-item",key:u},[s.name?(i.openBlock(),i.createBlock(l,{key:1,"selected-tab":a.selectedTab,tabs:s,onSelectTab:r.selectTab},null,8,["selected-tab","tabs","onSelectTab"])):(i.openBlock(),i.createElementBlock("div",id,[i.createElementVNode("a",{class:i.normalizeClass(["tab-link",{active:a.selectedTab===s.id,disabled:s.disabled}]),href:r.createHref(s.id),tabindex:s.disabled?-1:0,onClick:c=>r.selectTab(s.id),target:"_self"},i.toDisplayString(s.title),11,od)]))]))),128))]),i.createElementVNode("div",ad,[i.renderSlot(t.$slots,"default",{},void 0,!0)],512)])}const sd=_e(td,[["render",ld],["__scopeId","data-v-47d103be"]]),dd={name:"IbTab",props:{title:{type:String,required:!0},id:{type:String,required:!0},disabled:{type:Boolean,default:!1},initialized:{type:Boolean,default:!1},name:{type:String,default:null}},computed:{isTabActive(){return this.$parent.selectedTab===this.id}}};function cd(t,n,e,o,a,r){return i.withDirectives((i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default")],512)),[[i.vShow,r.isTabActive]])}const ud=_e(dd,[["render",cd]]),fd={LIST_VIEW:"list-sorting",GRID_VIEW:"grid-sorting",TABLE_VIEW:"table-sorting"},hd={TYPE_ASC:"asc",TYPE_DESC:"desc"},wo={topLeft:"top-left",topCenter:"top-center",topRight:"top-right",rightTop:"right-top",rightCenter:"right-center",rightBottom:"right-bottom",bottomLeft:"bottom-left",bottomCenter:"bottom-center",bottomRight:"bottom-right",leftTop:"left-top",leftCenter:"left-center",leftBottom:"left-bottom"};class ko{constructor(){this.tooltipInstance=null,this.tooltipContainer=null,this.uuid=null}getTooltipInstance(){return this.getTooltipInstance}getTooltipContainer(){return this.tooltipContainer}getId(){return this.uuid}generateUID(){this.uuid="tooltip_"+pt()}createTooltip(n,e,o){var r;if(!((r=e.text)!=null&&r.length))return;this.generateUID();const a=`
1
+ (function(pe,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],i):(pe=typeof globalThis<"u"?globalThis:pe||self,i(pe.MyLib={},pe.Vue))})(this,function(pe,i){"use strict";const H0="",_e=(t,n)=>{const e=t.__vccOpts||t;for(const[o,a]of n)e[o]=a;return e},Va={name:"IbIcon",props:{name:{type:String,required:!0},classes:{type:String,default:""},styles:{type:[String,Object],default:""}},mounted(){const t=setInterval(()=>{var n,e;(e=(n=this.$refs.icon)==null?void 0:n.shadowRoot)!=null&&e.querySelector("title")&&(this.$refs.icon.shadowRoot.querySelector("title").innerHTML="",clearInterval(t))},1e3)}},qa=["name"];function Fa(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("ion-icon",{style:i.normalizeStyle(e.styles),name:e.name,class:i.normalizeClass(e.classes+" ib-icon icon-"+e.name),ref:"icon"},null,14,qa)}const Le=_e(Va,[["render",Fa]]);function pt(){return"_"+Math.random().toString(36).substr(2,9)}const Fi={methods:{enter(t){const n=getComputedStyle(t).width;t.style.width=n,t.style.position="absolute",t.style.visibility="hidden",t.style.height="auto";const e=getComputedStyle(t).height;t.style.width=null,t.style.position=null,t.style.visibility=null,t.style.height=0,getComputedStyle(t).height,requestAnimationFrame(()=>{t.style.height=e})},afterEnter(t){t.style.height="auto"},leave(t){const n=getComputedStyle(t).height;t.style.height=n,getComputedStyle(t).height,requestAnimationFrame(()=>{t.style.height=0})}}},z0="",Ha={name:"IbAccordion",mixins:[Fi],props:{isOpen:{type:Boolean,default:!1}},watch:{isOpen(t){this.isActive=t}},data(){return{isActive:this.isOpen,uuid:pt()}},methods:{onClick(){this.isActive=!this.isActive,this.isActive?this.$emit("open",this.isActive):this.$emit("close",this.isActive)}},components:{IbIcon:Le}},za=["id","aria-controls","aria-expanded"],Ua=["id","aria-labelledby"],Ka={class:"accordion-content-wrapper"};function Ga(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["ib-accordion",{active:a.isActive}])},[i.createElementVNode("button",{class:"accordion-title",id:"accordion"+a.uuid,"aria-controls":"accordion-section-"+a.uuid,"aria-expanded":a.isActive,type:"button",onClick:n[0]||(n[0]=i.withModifiers((...s)=>r.onClick&&r.onClick(...s),["prevent"]))},[i.renderSlot(t.$slots,"title",{},void 0,!0),i.createVNode(l,{class:"chevron-icon",name:"chevron-down-outline"})],8,za),i.createVNode(i.Transition,{name:"expand",onEnter:t.enter,onAfterEnter:t.afterEnter,onLeave:t.leave},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{role:"region",class:"accordion-content",id:"accordion-section-"+a.uuid,"aria-labelledby":"accordion"+a.uuid},[i.createElementVNode("div",Ka,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],8,Ua),[[i.vShow,a.isActive]])]),_:3},8,["onEnter","onAfterEnter","onLeave"])],2)}const Wa=_e(Ha,[["render",Ga],["__scopeId","data-v-8ece19c1"]]),Kt={primary:"primary",secondary:"secondary",tertiary:"tertiary",ghost:"ghost",danger:"danger",ghostDanger:"ghostDanger"};function Pr(t,n=[]){for(let e in t)e.startsWith("on")&&(n.length===0||n.includes(e))&&delete t[e];return t}const U0="",Ya={name:"IbButton",props:{kind:{type:String,default:Kt.primary},disabled:{type:Boolean,required:!1,default:!1},preventDefault:{type:Boolean,default:null},confirmMessage:{type:String,default:""},block:{type:Boolean,default:!1},href:{type:String,default:""},linkMethod:{type:String,default:"get"},disableAfterClick:{type:Boolean,default:!1},postOptions:{type:Object,default:()=>({})}},data(){return{isDisabled:this.disabled}},watch:{disabled(t){this.isDisabled=t}},methods:{onMouseenter(t){this.$emit("mouseenter",t)},onMouseleave(t){this.$emit("mouseleave",t)},onClick(t){if((this.preventDefault||this.isDisabled)&&t.preventDefault(),this.confirmMessage.length>0&&!confirm(this.confirmMessage)){t.preventDefault();return}!this.isDisabled&&this.href.length&&!this.preventDefault&&this.linkMethod.toUpperCase()!=="GET"&&(t.preventDefault(),this.$refs.form.submit()),this.isDisabled||this.$emit("click",t),this.disableAfterClick&&!this.disabled&&(this.isDisabled=!0)}},computed:{classes(){const t=["ib-button"];return t.push(`ib-btn-${this.kind}`),this.isDisabled&&t.push("ib-btn-disabled"),this.block&&t.push("ib-btn-block"),this.href.length&&t.push("ib-btn-link"),this.hasIcon&&t.push("ib-btn-has-icon"),t},attrs(){const t=Pr({...this.$attrs},["onClick"]);return t.class=[...this.classes,t.class],t.disabled=this.isDisabled,this.href.length&&(t.href=this.href),t},hasIcon(){return!!this.$slots.icon},formMethod(){return this.linkMethod==="GET"?"GET":"POST"},token(){var t;return(t=document.head.querySelector('meta[name="csrf-token"]'))==null?void 0:t.content}},inheritAttrs:!1},Za=["method","action"],Ja=["value"],Xa=["value"],Qa=["name","value"];function el(t,n,e,o,a,r){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.href.length?"a":"button"),i.mergeProps({onClick:n[0]||(n[0]=l=>r.onClick(l)),onMouseenter:r.onMouseenter,onMouseleave:r.onMouseleave},r.attrs),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"icon"),i.renderSlot(t.$slots,"default"),e.href.length&&e.linkMethod.toUpperCase()!=="GET"?i.withDirectives((i.openBlock(),i.createElementBlock("form",{key:0,ref:"form",method:r.formMethod,action:e.href},[i.createElementVNode("input",{type:"hidden",name:"_method",value:e.linkMethod},null,8,Ja),i.createElementVNode("input",{type:"hidden",name:"_token",value:r.token},null,8,Xa),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Object.keys(e.postOptions),(l,s)=>(i.openBlock(),i.createElementBlock("input",{key:s,type:"hidden",name:l,value:e.postOptions[l]},null,8,Qa))),128))],8,Za)),[[i.vShow,!1]]):i.createCommentVNode("",!0)]),_:3},16,["onMouseenter","onMouseleave"])}const Hi=_e(Ya,[["render",el]]),tl=["top","right","bottom","left"],zi=["start","end"],Ui=tl.reduce((t,n)=>t.concat(n,n+"-"+zi[0],n+"-"+zi[1]),[]),Ki=Math.min,yn=Math.max,Yn=Math.round,jt=t=>({x:t,y:t}),nl={left:"right",right:"left",bottom:"top",top:"bottom"},rl={start:"end",end:"start"};function Gi(t,n){return typeof t=="function"?t(n):t}function Zn(t){return t.split("-")[0]}function Gt(t){return t.split("-")[1]}function il(t){return t==="x"?"y":"x"}function Wi(t){return t==="y"?"height":"width"}function Yi(t){return["top","bottom"].includes(Zn(t))?"y":"x"}function Zi(t){return il(Yi(t))}function ol(t,n,e){e===void 0&&(e=!1);const o=Gt(t),a=Zi(t),r=Wi(a);let l=a==="x"?o===(e?"end":"start")?"right":"left":o==="start"?"bottom":"top";return n.reference[r]>n.floating[r]&&(l=Ji(l)),[l,Ji(l)]}function al(t){return t.replace(/start|end/g,n=>rl[n])}function Ji(t){return t.replace(/left|right|bottom|top/g,n=>nl[n])}function ll(t){return{top:0,right:0,bottom:0,left:0,...t}}function sl(t){return typeof t!="number"?ll(t):{top:t,right:t,bottom:t,left:t}}function Jn(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function Xi(t,n,e){let{reference:o,floating:a}=t;const r=Yi(n),l=Zi(n),s=Wi(l),u=Zn(n),c=r==="y",p=o.x+o.width/2-a.width/2,f=o.y+o.height/2-a.height/2,d=o[s]/2-a[s]/2;let h;switch(u){case"top":h={x:p,y:o.y-a.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-a.width,y:f};break;default:h={x:o.x,y:o.y}}switch(Gt(n)){case"start":h[l]-=d*(e&&c?-1:1);break;case"end":h[l]+=d*(e&&c?-1:1);break}return h}const dl=async(t,n,e)=>{const{placement:o="bottom",strategy:a="absolute",middleware:r=[],platform:l}=e,s=r.filter(Boolean),u=await(l.isRTL==null?void 0:l.isRTL(n));let c=await l.getElementRects({reference:t,floating:n,strategy:a}),{x:p,y:f}=Xi(c,o,u),d=o,h={},v=0;for(let m=0;m<s.length;m++){const{name:_,fn:y}=s[m],{x:g,y:w,data:b,reset:k}=await y({x:p,y:f,initialPlacement:o,placement:d,strategy:a,middlewareData:h,rects:c,platform:l,elements:{reference:t,floating:n}});p=g??p,f=w??f,h={...h,[_]:{...h[_],...b}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(d=k.placement),k.rects&&(c=k.rects===!0?await l.getElementRects({reference:t,floating:n,strategy:a}):k.rects),{x:p,y:f}=Xi(c,d,u)),m=-1)}return{x:p,y:f,placement:d,strategy:a,middlewareData:h}};async function cl(t,n){var e;n===void 0&&(n={});const{x:o,y:a,platform:r,rects:l,elements:s,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Gi(n,t),v=sl(h),_=s[d?f==="floating"?"reference":"floating":f],y=Jn(await r.getClippingRect({element:(e=await(r.isElement==null?void 0:r.isElement(_)))==null||e?_:_.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(s.floating)),boundary:c,rootBoundary:p,strategy:u})),g=f==="floating"?{...l.floating,x:o,y:a}:l.reference,w=await(r.getOffsetParent==null?void 0:r.getOffsetParent(s.floating)),b=await(r.isElement==null?void 0:r.isElement(w))?await(r.getScale==null?void 0:r.getScale(w))||{x:1,y:1}:{x:1,y:1},k=Jn(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:w,strategy:u}):g);return{top:(y.top-k.top+v.top)/b.y,bottom:(k.bottom-y.bottom+v.bottom)/b.y,left:(y.left-k.left+v.left)/b.x,right:(k.right-y.right+v.right)/b.x}}function ul(t,n,e){return(t?[...e.filter(a=>Gt(a)===t),...e.filter(a=>Gt(a)!==t)]:e.filter(a=>Zn(a)===a)).filter(a=>t?Gt(a)===t||(n?al(a)!==a:!1):!0)}const fl=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(n){var e,o,a;const{rects:r,middlewareData:l,placement:s,platform:u,elements:c}=n,{crossAxis:p=!1,alignment:f,allowedPlacements:d=Ui,autoAlignment:h=!0,...v}=Gi(t,n),m=f!==void 0||d===Ui?ul(f||null,h,d):d,_=await cl(n,v),y=((e=l.autoPlacement)==null?void 0:e.index)||0,g=m[y];if(g==null)return{};const w=ol(g,r,await(u.isRTL==null?void 0:u.isRTL(c.floating)));if(s!==g)return{reset:{placement:m[0]}};const b=[_[Zn(g)],_[w[0]],_[w[1]]],k=[...((o=l.autoPlacement)==null?void 0:o.overflows)||[],{placement:g,overflows:b}],T=m[y+1];if(T)return{data:{index:y+1,overflows:k},reset:{placement:T}};const S=k.map(E=>{const C=Gt(E.placement);return[E.placement,C&&p?E.overflows.slice(0,2).reduce((O,N)=>O+N,0):E.overflows[0],E.overflows]}).sort((E,C)=>E[1]-C[1]),B=((a=S.filter(E=>E[2].slice(0,Gt(E[0])?2:3).every(C=>C<=0))[0])==null?void 0:a[0])||S[0][0];return B!==s?{data:{index:y+1,overflows:k},reset:{placement:B}}:{}}}};function Vt(t){return Qi(t)?(t.nodeName||"").toLowerCase():"#document"}function ct(t){var n;return(t==null||(n=t.ownerDocument)==null?void 0:n.defaultView)||window}function qt(t){var n;return(n=(Qi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:n.documentElement}function Qi(t){return t instanceof Node||t instanceof ct(t).Node}function Tt(t){return t instanceof Element||t instanceof ct(t).Element}function _t(t){return t instanceof HTMLElement||t instanceof ct(t).HTMLElement}function eo(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof ct(t).ShadowRoot}function bn(t){const{overflow:n,overflowX:e,overflowY:o,display:a}=mt(t);return/auto|scroll|overlay|hidden|clip/.test(n+o+e)&&!["inline","contents"].includes(a)}function hl(t){return["table","td","th"].includes(Vt(t))}function Ir(t){const n=Mr(),e=mt(t);return e.transform!=="none"||e.perspective!=="none"||(e.containerType?e.containerType!=="normal":!1)||!n&&(e.backdropFilter?e.backdropFilter!=="none":!1)||!n&&(e.filter?e.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(e.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(e.contain||"").includes(o))}function pl(t){let n=on(t);for(;_t(n)&&!Xn(n);){if(Ir(n))return n;n=on(n)}return null}function Mr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Xn(t){return["html","body","#document"].includes(Vt(t))}function mt(t){return ct(t).getComputedStyle(t)}function Qn(t){return Tt(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function on(t){if(Vt(t)==="html")return t;const n=t.assignedSlot||t.parentNode||eo(t)&&t.host||qt(t);return eo(n)?n.host:n}function to(t){const n=on(t);return Xn(n)?t.ownerDocument?t.ownerDocument.body:t.body:_t(n)&&bn(n)?n:to(n)}function Br(t,n,e){var o;n===void 0&&(n=[]),e===void 0&&(e=!0);const a=to(t),r=a===((o=t.ownerDocument)==null?void 0:o.body),l=ct(a);return r?n.concat(l,l.visualViewport||[],bn(a)?a:[],l.frameElement&&e?Br(l.frameElement):[]):n.concat(a,Br(a,[],e))}function no(t){const n=mt(t);let e=parseFloat(n.width)||0,o=parseFloat(n.height)||0;const a=_t(t),r=a?t.offsetWidth:e,l=a?t.offsetHeight:o,s=Yn(e)!==r||Yn(o)!==l;return s&&(e=r,o=l),{width:e,height:o,$:s}}function ro(t){return Tt(t)?t:t.contextElement}function an(t){const n=ro(t);if(!_t(n))return jt(1);const e=n.getBoundingClientRect(),{width:o,height:a,$:r}=no(n);let l=(r?Yn(e.width):e.width)/o,s=(r?Yn(e.height):e.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const ml=jt(0);function io(t){const n=ct(t);return!Mr()||!n.visualViewport?ml:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function gl(t,n,e){return n===void 0&&(n=!1),!e||n&&e!==ct(t)?!1:n}function vn(t,n,e,o){n===void 0&&(n=!1),e===void 0&&(e=!1);const a=t.getBoundingClientRect(),r=ro(t);let l=jt(1);n&&(o?Tt(o)&&(l=an(o)):l=an(t));const s=gl(r,e,o)?io(r):jt(0);let u=(a.left+s.x)/l.x,c=(a.top+s.y)/l.y,p=a.width/l.x,f=a.height/l.y;if(r){const d=ct(r),h=o&&Tt(o)?ct(o):o;let v=d,m=v.frameElement;for(;m&&o&&h!==v;){const _=an(m),y=m.getBoundingClientRect(),g=mt(m),w=y.left+(m.clientLeft+parseFloat(g.paddingLeft))*_.x,b=y.top+(m.clientTop+parseFloat(g.paddingTop))*_.y;u*=_.x,c*=_.y,p*=_.x,f*=_.y,u+=w,c+=b,v=ct(m),m=v.frameElement}}return Jn({width:p,height:f,x:u,y:c})}const yl=[":popover-open",":modal"];function oo(t){return yl.some(n=>{try{return t.matches(n)}catch{return!1}})}function bl(t){let{elements:n,rect:e,offsetParent:o,strategy:a}=t;const r=a==="fixed",l=qt(o),s=n?oo(n.floating):!1;if(o===l||s&&r)return e;let u={scrollLeft:0,scrollTop:0},c=jt(1);const p=jt(0),f=_t(o);if((f||!f&&!r)&&((Vt(o)!=="body"||bn(l))&&(u=Qn(o)),_t(o))){const d=vn(o);c=an(o),p.x=d.x+o.clientLeft,p.y=d.y+o.clientTop}return{width:e.width*c.x,height:e.height*c.y,x:e.x*c.x-u.scrollLeft*c.x+p.x,y:e.y*c.y-u.scrollTop*c.y+p.y}}function vl(t){return Array.from(t.getClientRects())}function ao(t){return vn(qt(t)).left+Qn(t).scrollLeft}function _l(t){const n=qt(t),e=Qn(t),o=t.ownerDocument.body,a=yn(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),r=yn(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-e.scrollLeft+ao(t);const s=-e.scrollTop;return mt(o).direction==="rtl"&&(l+=yn(n.clientWidth,o.clientWidth)-a),{width:a,height:r,x:l,y:s}}function $l(t,n){const e=ct(t),o=qt(t),a=e.visualViewport;let r=o.clientWidth,l=o.clientHeight,s=0,u=0;if(a){r=a.width,l=a.height;const c=Mr();(!c||c&&n==="fixed")&&(s=a.offsetLeft,u=a.offsetTop)}return{width:r,height:l,x:s,y:u}}function wl(t,n){const e=vn(t,!0,n==="fixed"),o=e.top+t.clientTop,a=e.left+t.clientLeft,r=_t(t)?an(t):jt(1),l=t.clientWidth*r.x,s=t.clientHeight*r.y,u=a*r.x,c=o*r.y;return{width:l,height:s,x:u,y:c}}function lo(t,n,e){let o;if(n==="viewport")o=$l(t,e);else if(n==="document")o=_l(qt(t));else if(Tt(n))o=wl(n,e);else{const a=io(t);o={...n,x:n.x-a.x,y:n.y-a.y}}return Jn(o)}function so(t,n){const e=on(t);return e===n||!Tt(e)||Xn(e)?!1:mt(e).position==="fixed"||so(e,n)}function kl(t,n){const e=n.get(t);if(e)return e;let o=Br(t,[],!1).filter(s=>Tt(s)&&Vt(s)!=="body"),a=null;const r=mt(t).position==="fixed";let l=r?on(t):t;for(;Tt(l)&&!Xn(l);){const s=mt(l),u=Ir(l);!u&&s.position==="fixed"&&(a=null),(r?!u&&!a:!u&&s.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||bn(l)&&!u&&so(t,l))?o=o.filter(p=>p!==l):a=s,l=on(l)}return n.set(t,o),o}function Cl(t){let{element:n,boundary:e,rootBoundary:o,strategy:a}=t;const l=[...e==="clippingAncestors"?kl(n,this._c):[].concat(e),o],s=l[0],u=l.reduce((c,p)=>{const f=lo(n,p,a);return c.top=yn(f.top,c.top),c.right=Ki(f.right,c.right),c.bottom=Ki(f.bottom,c.bottom),c.left=yn(f.left,c.left),c},lo(n,s,a));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function Ol(t){const{width:n,height:e}=no(t);return{width:n,height:e}}function El(t,n,e){const o=_t(n),a=qt(n),r=e==="fixed",l=vn(t,!0,r,n);let s={scrollLeft:0,scrollTop:0};const u=jt(0);if(o||!o&&!r)if((Vt(n)!=="body"||bn(a))&&(s=Qn(n)),o){const f=vn(n,!0,r,n);u.x=f.x+n.clientLeft,u.y=f.y+n.clientTop}else a&&(u.x=ao(a));const c=l.left+s.scrollLeft-u.x,p=l.top+s.scrollTop-u.y;return{x:c,y:p,width:l.width,height:l.height}}function co(t,n){return!_t(t)||mt(t).position==="fixed"?null:n?n(t):t.offsetParent}function uo(t,n){const e=ct(t);if(!_t(t)||oo(t))return e;let o=co(t,n);for(;o&&hl(o)&&mt(o).position==="static";)o=co(o,n);return o&&(Vt(o)==="html"||Vt(o)==="body"&&mt(o).position==="static"&&!Ir(o))?e:o||pl(t)||e}const Sl=async function(t){const n=this.getOffsetParent||uo,e=this.getDimensions;return{reference:El(t.reference,await n(t.floating),t.strategy),floating:{x:0,y:0,...await e(t.floating)}}};function xl(t){return mt(t).direction==="rtl"}const Tl={convertOffsetParentRelativeRectToViewportRelativeRect:bl,getDocumentElement:qt,getClippingRect:Cl,getOffsetParent:uo,getElementRects:Sl,getClientRects:vl,getDimensions:Ol,getScale:an,isElement:Tt,isRTL:xl},Nl=fl,Al=(t,n,e)=>{const o=new Map,a={platform:Tl,...e},r={...a.platform,_c:o};return dl(t,n,{...a,platform:r})},K0="",Dl={name:"IbPopover",props:{position:{type:[String,Array],default:"top"},alwaysVisible:{type:Boolean,default:!1},attachToBody:{type:Boolean,default:!1}},data(){return{parentNode:null,isVisible:!!this.alwaysVisible,activePosition:null}},mounted(){this.$nextTick(()=>{var t,n,e,o;this.parentNode=this.$el.parentNode,this.alwaysVisible||((t=this.parentNode)==null||t.addEventListener("focus",this.showPopover,!0),(n=this.parentNode)==null||n.addEventListener("blur",this.hidePopover,!0),(e=this.parentNode)==null||e.addEventListener("mouseover",this.showPopover),(o=this.parentNode)==null||o.addEventListener("mouseleave",this.hidePopover))})},methods:{showPopover(){this.isVisible||(this.isVisible=!0,Al(this.parentNode,this.$refs.popover,{middleware:[Nl({allowedPlacements:this.position})]}).then(({x:t,y:n,placement:e})=>{this.activePosition=e,Object.assign(this.$refs.popover.style,{left:`${t}px`,top:`${n}px`})}))},hidePopover(){this.isVisible=!1}},computed:{classes(){const t=["ib-popover"];return t.push(`ib-${this.activePosition}`),this.isVisible&&t.push("active"),t}},beforeUnmount(){!this.alwaysVisible&&this.parentNode&&(this.parentNode.removeEventListener("focus",this.showPopover,!0),this.parentNode.removeEventListener("blur",this.hidePopover,!0),this.parentNode.removeEventListener("mouseover",this.showPopover,!0),this.parentNode.removeEventListener("mouseleave",this.hidePopover,!0))}};function Pl(t,n,e,o,a,r){return e.attachToBody?(i.openBlock(),i.createBlock(i.Teleport,{key:0,to:"body"},[i.createVNode(i.Transition,null,{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{ref:"popover",class:i.normalizeClass(r.classes)},[i.renderSlot(t.$slots,"default",{},void 0,!0)],2),[[i.vShow,a.isVisible]])]),_:3})])):(i.openBlock(),i.createBlock(i.Transition,{key:1},{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{ref:"popover",class:i.normalizeClass(r.classes)},[i.renderSlot(t.$slots,"default",{},void 0,!0)],2),[[i.vShow,a.isVisible]])]),_:3}))}const fo=_e(Dl,[["render",Pl],["__scopeId","data-v-9e816e9b"]]),G0="",Il={name:"IbTooltip",props:{position:{type:String},title:{type:String},text:{type:String},alwaysVisible:{type:Boolean,default:!1}},computed:{classList(){const t=["ib-tooltip"];return this.title&&t.push("ib-tooltip-large"),t}},components:{IbPopover:fo}},Ml={key:0};function Bl(t,n,e,o,a,r){const l=i.resolveComponent("ib-popover");return i.openBlock(),i.createBlock(l,{position:e.position,"always-visible":e.alwaysVisible,class:i.normalizeClass(r.classList)},{default:i.withCtx(()=>[e.title?(i.openBlock(),i.createElementBlock("b",Ml,i.toDisplayString(e.title),1)):i.createCommentVNode("",!0),i.createElementVNode("p",null,i.toDisplayString(e.text),1)]),_:1},8,["position","always-visible","class"])}const ln=_e(Il,[["render",Bl],["__scopeId","data-v-6fb94ac5"]]),ho={[Kt.primary]:Kt.primary,[Kt.tertiary]:Kt.tertiary,[Kt.ghost]:Kt.ghost,white:"white"},po={xs:"xs",s:"s",m:"m"},W0="",Ll={name:"IbIconButton",props:{kind:{type:String,default:ho.primary,validator:t=>Object.keys(ho).includes(t)},size:{type:String,default:po.s,validator:t=>Object.keys(po).includes(t)},rounded:{type:Boolean,required:!1,default:!1},disabled:{type:Boolean,required:!1,default:!1},href:{type:String,default:""},helpText:{type:String,default:""},disabledFocus:{type:Boolean,default:!1},preventDefault:{type:Boolean,default:!1}},data(){return{tooltipVisible:!1}},computed:{classes(){const t=["ib-icon-button"];return t.push(`ib-icon-btn-${this.kind}`),t.push(`ib-icon-btn-${this.size}`),this.rounded&&t.push("ib-icon-btn-rounded"),this.disabled&&t.push("ib-icon-btn-disabled"),t},attrs(){const t={...this.$attrs};return t.class=[...this.classes,t.class],this.disabledFocus&&(t.tabindex="-1"),t}},components:{IbButton:Hi,IbTooltip:ln},inheritAttrs:!1};function Rl(t,n,e,o,a,r){const l=i.resolveComponent("ib-tooltip"),s=i.resolveComponent("ib-button");return i.openBlock(),i.createBlock(s,i.mergeProps(r.attrs,{href:e.href,kind:e.kind,disabled:e.disabled,"prevent-default":e.preventDefault}),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default"),e.helpText.length?(i.openBlock(),i.createBlock(l,{key:0,text:e.helpText},null,8,["text"])):i.createCommentVNode("",!0)]),_:3},16,["href","kind","disabled","prevent-default"])}const ut=_e(Ll,[["render",Rl]]),er={alert:"alert",error:"error",warning:"warning",info:"info",success:"success"},Y0="",jl={name:"IbAlert",props:{type:{type:String,default:er.alert,validator:t=>Object.keys(er).includes(t)},showIcon:{type:Boolean,default:!1},showCloseButton:{type:Boolean,default:!1},title:{type:String,default:""},additionalTitleText:{type:String,default:""}},mounted(){this.checkHeight(),this.$refs.content&&(this.contentObserver=new ResizeObserver(()=>{this.checkHeight()}),this.contentObserver.observe(this.$refs.content)),window.addEventListener("resize",()=>this.checkHeight())},data(){return{contentObserver:null}},methods:{close(){this.$emit("close")},checkHeight(){var e;if(!this.$refs.content)return;const t=getComputedStyle(this.$refs.content),n=(e=this.$refs.content)==null?void 0:e.parentElement.offsetWidth;!n||!t||(parseInt(t.width)<=n&&this.$refs.content.classList.remove("large"),parseInt(t.height)>37&&this.showIcon&&(this.title.length?this.$refs.content.classList.add("large"):this.$refs.content.classList.add("medium")))}},computed:{classes(){const t=["ib-alert"];return t.push(`ib-alert-${this.type}`),this.title.length&&t.push("has-title"),this.showIcon&&t.push("has-icon"),this.showCloseButton&&t.push("has-close-button"),this.$slots.link&&t.push("has-link"),t},iconName(){return this.type===er.info?"information-circle-outline":this.type===er.success?"checkmark-circle-outline":"alert-circle-outline"}},beforeUnmount(){var t;(t=this.contentObserver)==null||t.disconnect(),window.removeEventListener("resize",()=>this.checkHeight())},components:{IbIcon:Le,IbIconButton:ut}},Vl={ref:"content",class:"content"},ql={class:"content-head"},Fl={key:1,class:"ib-alert-title"},Hl={class:"text-content"},zl={class:"link"};function Ul(t,n,e,o,a,r){var u;const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createElementBlock("div",{role:"alert",class:i.normalizeClass(r.classes)},[i.createElementVNode("div",Vl,[i.createElementVNode("span",ql,[e.showIcon?(i.openBlock(),i.createBlock(l,{key:0,class:"ib-alert-icon",name:r.iconName},null,8,["name"])):i.createCommentVNode("",!0),(u=e.title)!=null&&u.length?(i.openBlock(),i.createElementBlock("b",Fl,i.toDisplayString(e.title),1)):i.createCommentVNode("",!0),i.renderSlot(t.$slots,"title",{},void 0,!0)]),i.createElementVNode("span",Hl,[i.renderSlot(t.$slots,"default",{},void 0,!0)]),i.createElementVNode("div",zl,[i.renderSlot(t.$slots,"link",{},void 0,!0)])],512),e.showCloseButton?(i.openBlock(),i.createBlock(s,{key:0,class:"close-button",kind:"ghost","prevent-default":!0,onClick:r.close},{default:i.withCtx(()=>[i.createVNode(l,{class:"close-button-icon",name:"close-outline"})]),_:1},8,["onClick"])):i.createCommentVNode("",!0)],2)}const Ft=_e(jl,[["render",Ul],["__scopeId","data-v-8437bad2"]]),Kl={M:"m",L:"l",XL:"xl"},Gl={SQUARE:"square",CIRCLE:"circle"},Z0="",Wl={name:"IbAvatar",props:{firstName:{type:String,default:""},lastName:{type:String,default:""},src:{type:String,default:""},userAvatar:{type:Boolean,default:!1},size:{type:String,default:Kl.M},type:{type:String,default:Gl.CIRCLE}},computed:{classList(){return["avatar",`avatar-size-${this.size}`,`avatar-type-${this.type}`]},validateName(){var t,n;return((t=this.firstName)==null?void 0:t.trim().length)!==0&&((n=this.lastName)==null?void 0:n.trim().length)!==0},initials(){return this.firstName[0].toUpperCase()+this.lastName[0].toUpperCase()}},components:{IbIcon:Le}},Yl=["src","alt"];function Zl(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon");return e.src&&!e.userAvatar?(i.openBlock(),i.createElementBlock("img",{key:0,class:i.normalizeClass(r.classList),src:e.src,alt:e.firstName+""+e.lastName},null,10,Yl)):e.src&&e.userAvatar?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["user-avatar",r.classList]),style:i.normalizeStyle({backgroundImage:"url("+e.src+")"})},null,6)):r.validateName?(i.openBlock(),i.createElementBlock("div",{key:3,class:i.normalizeClass([r.classList,"default-avatar"])},i.toDisplayString(r.initials),3)):(i.openBlock(),i.createElementBlock("div",{key:2,class:i.normalizeClass(["empty-avatar",r.classList])},[i.createVNode(l,{name:"camera-outline"})],2))}const Jl=_e(Wl,[["render",Zl],["__scopeId","data-v-63abd28e"]]),J0="",Xl={name:"IbBadge",props:{content:{type:[String,Number],default:""}},computed:{classes(){const t=["ib-badge"];return this.content.toString().length&&t.push("ib-badge-large"),t},normalizeContent(){return this.content>99?"99+":this.content}}};function Ql(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("span",{class:i.normalizeClass(r.classes)},i.toDisplayString(r.normalizeContent),3)}const es=_e(Xl,[["render",Ql],["__scopeId","data-v-328df75a"]]),X0="",ts={name:"IbButtonGroup"},ns={class:"ib-button-group"};function rs(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("div",ns,[i.renderSlot(t.$slots,"default")])}const is=_e(ts,[["render",rs]]),sn={success:"success",neutral:"neutral",info:"info",error:"error",new:"new",favorite:"favorite",pending:"pending"},Q0="",os={props:{status:{type:String,default:sn.neutral,validator:t=>Object.keys(sn).includes(t)},icon:{type:String,default:""},showIcon:{type:Boolean,default:!1}},computed:{classes(){const t=["ib-tag-pill"];return t.push(`ib-tag-pill-${this.status}`),t},iconName(){if(this.icon)return this.icon;switch(this.status){case sn.success:return"checkmark-outline";case sn.neutral:return"time-outline";case sn.info:return"information-circle-outline";case sn.error:return"close-outline";default:return""}}},components:{IbIcon:Le}};function as(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(r.classes)},[e.showIcon&&r.iconName.length?(i.openBlock(),i.createBlock(l,{key:0,name:r.iconName},null,8,["name"])):i.createCommentVNode("",!0),i.createElementVNode("span",null,[i.renderSlot(t.$slots,"default",{},void 0,!0)])],2)}const ls=_e(os,[["render",as],["__scopeId","data-v-92406065"]]),ss={topLeft:"top-left",topCenter:"top-center",topRight:"top-right",rightTop:"right-top",rightCenter:"right-center",rightBottom:"right-bottom",bottomLeft:"bottom-left",bottomCenter:"bottom-center",bottomRight:"bottom-right",leftTop:"left-top",leftCenter:"left-center",leftBottom:"left-bottom"},ep="",tp="",ds={name:"IbTooltip",props:{position:{type:String,default:ss.topCenter},title:{type:String},isOpen:{type:Boolean,default:!1}},mounted(){this.$nextTick(()=>{this.parentNode=this.$el.parentNode,getComputedStyle(this.parentNode).position!=="absolute"&&(this.parentNode.style.position="relative")})},data(){return{isOpenedState:this.isOpen}},methods:{open(){this.isOpenedState=!0,this.$emit("open")},close(){this.isOpenedState=!1,this.$emit("close")}},computed:{classes(){const t=["ib-toggle-tip"];return t.push(`ib-${this.position}`),t}},watch:{isOpen(t){t?this.open():this.close()}},components:{IbIconButton:ut,IbIcon:Le}},cs={class:"ib-toggle-tip-head"},us={class:"ib-toggle-tip-content"},fs={class:"ib-toggle-tip-button-set"};function hs(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button");return i.openBlock(),i.createBlock(i.Transition,null,{default:i.withCtx(()=>[i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(r.classes)},[i.createElementVNode("div",cs,[i.createElementVNode("p",null,i.toDisplayString(e.title),1),i.createVNode(s,{class:"close-button",kind:"ghost",onClick:i.withModifiers(r.close,["prevent"])},{default:i.withCtx(()=>[i.createVNode(l,{name:"close-outline"})]),_:1},8,["onClick"])]),i.createElementVNode("div",us,[i.renderSlot(t.$slots,"default",{},void 0,!0)]),i.createElementVNode("div",fs,[i.renderSlot(t.$slots,"buttons",{},void 0,!0)])],2),[[i.vShow,a.isOpenedState]])]),_:3})}const mo=_e(ds,[["render",hs],["__scopeId","data-v-9e7c679e"]]),Lr=27,go=32,ps=13,yo=9,ms=38,gs=37,ys=39,bo=40,bs=8,vs="click",{performance:tr}=window,_s=typeof(tr==null?void 0:tr.now)=="function"&&Date.now()>document.createEvent("Event").timeStamp?()=>tr.now():()=>Date.now(),_n=new Map;let $n=!1;const vo=t=>{_n.forEach(({bindTimeStamp:n,callback:e},o)=>{if(!(o.contains(t.target)||t.timeStamp<=n))try{e(t)}catch(a){console.error(a)}})},$s=()=>{$n||(document.addEventListener("click",vo,{capture:!0}),$n=!0)},ws=()=>{$n&&(document.removeEventListener("click",vo),$n=!1)},nr={created:(t,{value:n,arg:e="click"})=>{if(typeof n!="function")throw new Error(`[OutsideDirective] Value must be a function; got ${typeof n}!`);if(e!=="click")throw new Error(`[OutsideDirective] Cannot bind ${e} events; only click events are currently supported!`);_n.has(t)||($n||$s(),_n.set(t,{bindTimeStamp:_s(),callback:n}))},beforeUnmount:t=>{_n.delete(t),_n.size===0&&ws()}},wn={left:"left",right:"right",center:"center"},rr={top:"top",bottom:"bottom"},ip="",op="",ks={name:"IbDropdown",directives:{Outside:nr},props:{vertical:{type:String,default:rr.bottom},horizontal:{type:String,default:wn.left},triggerClass:{default:""},isOpened:{type:Boolean,default:!1},showCloseIcon:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},triggerType:{type:String,default:vs},destroyOnHide:{type:Boolean,default:!1}},watch:{isOpened(t){t?this.open():this.close()}},mounted(){this.$globalEvents.$on("dropdown:open",t=>{this.$el.contains(t.$el)||this.close()}),document.addEventListener("focus",this.closeOnEventOutside,!0),document.addEventListener("keyup",this.onKeyupDocument)},data(){return{isOpenedState:this.isOpened,timeout:null}},methods:{onKeydown(t){(t.keyCode===ps||t.keyCode===go)&&(t.preventDefault(),this.toggle()),t.keyCode===bo&&(t.preventDefault(),this.open())},onKeyupDocument(t){t.keyCode===Lr&&(t.preventDefault(),this.close())},toggle(){this.isOpenedState?this.close():this.open()},open(){this.disabled||(this.isOpenedState=!0,this.$emit("open"),this.$globalEvents.$emit("dropdown:open",this))},close(){if(this.isOpenedState){if(this.disabled)return;this.isOpenedState=!1,this.$emit("close")}},debouncedOpen(){this.timeout=setTimeout(()=>{this.open()},300)},debouncedClose(){this.close(),clearTimeout(this.timeout)},closeOnClickIfRequired(){this.closeOnClick&&this.close()},closeOnEventOutside(t){this.$el.contains(t.target)||this.close()}},computed:{classes(){const t=this.vertical===rr.bottom?" dropdown-bottom":" dropdown-top",n=this.horizontal===wn.left?" dropdown-left":this.horizontal===wn.right?" dropdown-right":" dropdown-center",e=this.isOpenedState?" active":"";return t+n+e},triggerClasses(){let t=this.isOpenedState?"active":"";return this.disabled&&(t+=" dropdown-trigger-disabled"),this.triggerClass+t},hasTrigger(){return!!this.$slots.trigger}},beforeUnmount(){document.removeEventListener("focus",this.closeOnEventOutside,!0),document.removeEventListener("keypress",this.onKeydownDocument)}},Cs={class:"ib-dropdown"},Os={class:"footer-slot"};function Es(t,n,e,o,a,r){const l=i.resolveDirective("outside");return i.withDirectives((i.openBlock(),i.createElementBlock("div",Cs,[r.hasTrigger&&e.triggerType==="click"?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["dropdown-trigger",r.triggerClasses]),ref:"dropdown",onKeydown:n[0]||(n[0]=(...s)=>r.onKeydown&&r.onKeydown(...s)),onClick:n[1]||(n[1]=i.withModifiers((...s)=>r.toggle&&r.toggle(...s),["prevent","stop"]))},[i.renderSlot(t.$slots,"trigger",{isOpened:a.isOpenedState},void 0,!0)],34)):i.createCommentVNode("",!0),r.hasTrigger&&e.triggerType==="hover"?(i.openBlock(),i.createElementBlock("span",{key:1,class:i.normalizeClass(["dropdown-trigger",r.triggerClasses]),onMouseenter:n[2]||(n[2]=(...s)=>r.debouncedOpen&&r.debouncedOpen(...s)),onMouseleave:n[3]||(n[3]=(...s)=>r.debouncedClose&&r.debouncedClose(...s))},[i.renderSlot(t.$slots,"trigger",{isOpened:a.isOpenedState},void 0,!0)],34)):i.createCommentVNode("",!0),!e.destroyOnHide||a.isOpenedState?i.withDirectives((i.openBlock(),i.createElementBlock("div",{key:2,ref:"body",class:i.normalizeClass("ib-dropdown-menu "+r.classes)},[i.createElementVNode("div",{class:"dropdown-body",onClick:n[5]||(n[5]=(...s)=>r.closeOnClickIfRequired&&r.closeOnClickIfRequired(...s))},[i.renderSlot(t.$slots,"body",{isOpenedState:a.isOpenedState},void 0,!0),e.showCloseIcon?(i.openBlock(),i.createElementBlock("span",{key:0,class:"close",onClick:n[4]||(n[4]=(...s)=>r.close&&r.close(...s))},[i.renderSlot(t.$slots,"close",{},void 0,!0)])):i.createCommentVNode("",!0)]),i.createElementVNode("div",Os,[i.renderSlot(t.$slots,"footer",{},void 0,!0)])],2)),[[i.vShow,a.isOpenedState]]):i.createCommentVNode("",!0),i.createElementVNode("div",{class:"before",onClick:n[6]||(n[6]=(...s)=>r.close&&r.close(...s))},[i.renderSlot(t.$slots,"before",{},void 0,!0)])])),[[l,r.close]])}const ir=_e(ks,[["render",Es],["__scopeId","data-v-dfb4a39a"]]),ap="",Ss={name:"IbList",data(){return{rootClass:"ib-list"}},methods:{onKeydown(t){var n,e,o,a,r;if(t.keyCode===bo){if(this.$el.parentNode.closest(`.${this.rootClass}`))return;t.preventDefault();const l=document.activeElement,s=l.querySelector(`.${this.rootClass}`);let u=l.nextElementSibling?l.nextElementSibling:(n=l.parentNode.nextElementSibling)==null?void 0:n.childNodes[0];if(s&&window.getComputedStyle(s).display!=="none"){s.querySelector('a, button, input, [tabindex="0"]').focus();return}if(u){u.focus();return}const c=(o=(e=l.closest(`.${this.rootClass}`).parentNode)==null?void 0:e.parentNode)==null?void 0:o.nextElementSibling.childNodes[0];c&&c.nodeName!=="#text"&&c.focus()}if(t.keyCode===ms){if(this.$el.parentNode.closest(`.${this.rootClass}`))return;t.preventDefault();const l=document.activeElement,s=l.previousElementSibling?l.previousElementSibling:(a=l.parentNode.previousElementSibling)==null?void 0:a.childNodes[0];if(!s){l.closest(`.${this.rootClass}`).parentNode.focus();return}if(s&&s.nodeName!=="#text"){const u=s==null?void 0:s.querySelector(`.${this.rootClass}`);if(u&&window.getComputedStyle(u).display!=="none"){const c=Array.from(u.childNodes).filter(p=>p.nodeName!=="#text");(r=c[c.length-1])==null||r.childNodes[0].focus();return}s.focus()}}}}};function xs(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("ul",{class:i.normalizeClass(a.rootClass),onKeydown:n[0]||(n[0]=(...l)=>r.onKeydown&&r.onKeydown(...l))},[i.renderSlot(t.$slots,"default")],34)}const Rr=_e(Ss,[["render",xs]]),lp="",Ts={props:{vertical:{type:String,default:rr.bottom},horizontal:{type:String,default:wn.left},isOpened:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},methods:{proxyEvents(t){this.$emit(t.event,...t.args)}},data(){return{list:this.$refs.list}},computed:{hasTrigger(){return!!this.$slots.trigger}},components:{IbDropdown:ir,IbList:Rr}},Ns={class:"dropdown-list-wrapper"};function As(t,n,e,o,a,r){const l=i.resolveComponent("ib-list"),s=i.resolveComponent("ib-dropdown");return i.openBlock(),i.createElementBlock("div",Ns,[i.createVNode(s,i.mergeProps({horizontal:e.horizontal,vertical:e.vertical,isOpened:e.isOpened,closeOnClick:e.closeOnClick,disabled:e.disabled},t.$attrs,{ref:"dropdown",onAll:r.proxyEvents}),i.createSlots({body:i.withCtx(({isOpened:u})=>[i.createVNode(l,{ref:"list",class:"list"},{default:i.withCtx(()=>[i.renderSlot(t.$slots,"body",{isOpenedState:u})]),_:2},1536)]),_:2},[r.hasTrigger?{name:"trigger",fn:i.withCtx(({isOpened:u})=>[i.renderSlot(t.$slots,"trigger",{isOpened:u})]),key:"0"}:void 0]),1040,["horizontal","vertical","isOpened","closeOnClick","disabled","onAll"])])}const or=_e(Ts,[["render",As]]),sp="",Ds={props:{checked:{type:Boolean,default:!1},href:{type:String}},computed:{attrs(){const t={class:"ib-dropdown-item"};return this.href&&(t.href=this.href),t}}},Ps={class:"dropdown-item-wrapper"},Is={class:"dropdown-item-icon"};function Ms(t,n,e,o,a,r){return i.openBlock(),i.createElementBlock("li",Ps,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.href?"a":"div"),i.mergeProps({class:e.checked?"active":""},r.attrs,{tabindex:"0"}),{default:i.withCtx(()=>[i.createElementVNode("p",null,[i.createElementVNode("div",Is,[i.renderSlot(t.$slots,"icon",{},void 0,!0)]),i.renderSlot(t.$slots,"default",{ref:"slot"},void 0,!0)])]),_:3},16,["class"]))])}const jr=_e(Ds,[["render",Ms],["__scopeId","data-v-11b4be9b"]]),Bs={common:"common",danger:"danger"},dp="",Ls={name:"IbSplitButton",props:{id:{type:String,default:()=>pt()},kind:{type:String,default:Bs.common},verticalPosition:{type:String,default:"bottom"},disabled:{type:Boolean,default:!1},saveSelected:{type:Boolean,default:!1}},mounted(){var t;if(this.childList=Array.from(this.$refs.list.children),(t=this.childList)==null||t.forEach((n,e)=>{n.addEventListener("click",()=>{this.childList[this.activeElemIdx].classList.remove("active"),this.saveSelected&&(this.activeElemIdx=e,localStorage.setItem(`split-button-${this.id}`,e))})}),this.saveSelected){const n=localStorage.getItem(`split-button-${this.id}`);n&&(this.activeElemIdx=n)}this.$nextTick(()=>{this.setActiveItem()}),this.listObserver=new MutationObserver(n=>{for(const e of n)if(e.type==="attributes"&&e.attributeName==="disabled"){this.mainButtonAttrs.disabled=e.target.disabled;break}}),this.listObserver.observe(this.$refs.list,{attributes:!0,subtree:!0})},data(){return{activeElemIdx:0,content:"",mainButtonAttrs:{},isLink:!1,childList:[],listObserver:null}},components:{IbIcon:Le,IbDropdownList:or},methods:{setActiveItem(){const t=this.$slots.default()[this.activeElemIdx].props;this.mainButtonAttrs=t,this.mainButtonAttrs&&"href"in this.mainButtonAttrs?this.isLink=!0:this.isLink=!1,this.childList[this.activeElemIdx].classList.add("active"),this.content=this.childList[this.activeElemIdx].textContent},onClickLink(t){if(this.disabled){t.preventDefault();return}}},computed:{classes(){const t=["split-button"];return t.push(`split-button-${this.kind}`),t}},watch:{activeElemIdx(){this.setActiveItem()}},beforeUnmount(){this.listObserver.disconnect(),this.listObserver=null}},Rs=["disabled"],js=["disabled"],Vs={ref:"list"};function qs(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-dropdown-list");return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(r.classes)},[a.isLink?(i.openBlock(),i.createElementBlock("a",i.mergeProps({key:1,class:["split-button-main",{disabled:e.disabled}],disabled:e.disabled},a.mainButtonAttrs,{onClick:n[0]||(n[0]=(...u)=>r.onClickLink&&r.onClickLink(...u))}),i.toDisplayString(a.content),17,Rs)):(i.openBlock(),i.createElementBlock("button",i.mergeProps({key:0,class:"split-button-main"},a.mainButtonAttrs),i.toDisplayString(a.content),17)),i.createVNode(s,{disabled:e.disabled,closeOnClick:!0,vertical:e.verticalPosition,horizontal:e.verticalPosition==="top"?"right":"left"},{trigger:i.withCtx(()=>[i.createElementVNode("button",{disabled:e.disabled,class:"split-button-menu-trigger"},[i.createVNode(l,{name:"chevron-down-outline"})],8,js)]),body:i.withCtx(()=>[i.createElementVNode("div",Vs,[i.renderSlot(t.$slots,"default")],512)]),_:3},8,["disabled","vertical","horizontal"])],2)}const Fs=_e(Ls,[["render",qs]]),cp="",Hs={props:{href:{type:String,default:""}},computed:{attrs(){const t={};return this.href.length&&(t.href=this.href),t}}};function zs(t,n,e,o,a,r){return i.openBlock(),i.createBlock(i.resolveDynamicComponent(e.href.length?"a":"button"),i.mergeProps(r.attrs,{class:"ib-dropdown-item"}),{default:i.withCtx(()=>[i.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},16)}const Us=_e(Hs,[["render",zs],["__scopeId","data-v-4cf00feb"]]),Nt={S:"s",M:"m",L:"l",XL:"xl"},up="",Ks={name:"IbModal",directives:{Outside:nr},emits:{open:null,close:null},props:{active:{type:Boolean,default:!1},classList:{type:String,default:""},stopPropagation:{type:Boolean,default:!1},showCloseButton:{type:Boolean,default:!0},size:{type:String,default:Nt.S}},watch:{active(t){this.isActive=t}},mounted(){var n,e,o,a;const t=(e=(n=this.$refs)==null?void 0:n.modal)==null?void 0:e.querySelectorAll("[tabindex], a, button, input, select, textarea");(o=t[0])==null||o.addEventListener("keydown",r=>{r.keyCode===yo&&r.shiftKey&&(r.preventDefault(),t[t.length-1].focus())}),(a=t[t.length-1])==null||a.addEventListener("keydown",r=>{r.keyCode===yo&&!r.shiftKey&&(r.preventDefault(),t[0].focus())}),document.addEventListener("keydown",this.onKeydown),document.addEventListener("blur",this.setFocusOnModal,!0)},data(){return{isActive:this.active}},methods:{showModal(t){t?this.open():this.close()},onTriggerBlur(t){var n,e,o;!((n=this.$refs.modal)!=null&&n.contains(t.relatedTarget))&&this.isActive&&((o=(e=this.$refs.modal)==null?void 0:e.querySelector("a, button, [tabindex]"))==null||o.focus())},open(){this.isActive=!0,document.body.classList.add("modal-open"),this.$emit("open")},close(){var t,n;(n=(t=this.$refs.trigger)==null?void 0:t.querySelector("a, button, [tabindex]"))==null||n.focus(),document.body.classList.remove("modal-open"),this.$emit("close")},setFocusOnModal(t){if(!this.isActive)return;const e=Array.from(document.querySelectorAll(".modal.is-active")).sort((o,a)=>+(getComputedStyle(o).zIndex||0)-+(getComputedStyle(a).zIndex||0)).at(-1);if(e===this.$refs.modal&&!e.contains(t.target)&&!e.contains(t.relatedTarget)){const o=e.querySelector(`a[href], button:not([disabled]),
2
+ textarea, input:not([type="hidden"]),
3
+ select, [tabindex]:not([tabindex="-1"])`);o==null||o.focus()}},clickOutside(t){var n;this.stopPropagation||!((n=this.$refs.trigger)!=null&&n.contains(t.target))&&this.isActive&&this.close()},onKeydown(t){t.keyCode===Lr&&!this.stopPropagation&&this.isActive&&this.close()}},computed:{classes(){const t=["modal"];return this.classList.length&&t.push(this.classList),this.isActive&&t.push("is-active"),t},bodyStyles(){const t={};return this.size===Nt.S&&(t.width="380px",t.minHeight="160px",t.maxHeight="680px"),this.size===Nt.M&&(t.width="600px",t.minHeight="260px",t.maxHeight="680px"),this.size===Nt.L&&(t.width="850px",t.minHeight="400px",t.maxHeight="680px"),this.size===Nt.XL&&(t.width="80vw",t.maxWidth="1400px"),t},bodyClassList(){const t=["modal-body"];return this.size===Nt.S&&t.push("modal-body-s"),this.size===Nt.M&&t.push("modal-body-m"),this.size===Nt.L&&t.push("modal-body-l"),this.size===Nt.XL&&t.push("modal-body-xl"),t},hasTrigger(){return!!this.$slots.trigger},hasHeader(){return!!this.$slots.header},hasFooter(){return!!this.$slots.footer}},components:{IbIconButton:ut,IbIcon:Le},beforeUnmount(){this.isActive&&this.close(),document.removeEventListener("keydown",this.onKeydown),document.removeEventListener("blur",this.setFocusOnModal,!0)}},Gs={key:1,class:"modal-header"},Ws={key:2,class:"modal-footer"};function Ys(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-icon-button"),u=i.resolveDirective("outside");return i.openBlock(),i.createElementBlock(i.Fragment,null,[r.hasTrigger?(i.openBlock(),i.createElementBlock("div",{key:0,class:"modal-trigger",ref:"trigger",onBlurCapture:n[0]||(n[0]=(...c)=>r.onTriggerBlur&&r.onTriggerBlur(...c)),onClick:n[1]||(n[1]=(...c)=>r.open&&r.open(...c))},[i.renderSlot(t.$slots,"trigger",{},void 0,!0)],544)):i.createCommentVNode("",!0),(i.openBlock(),i.createBlock(i.Teleport,{to:"body"},[i.withDirectives(i.createElementVNode("div",{class:i.normalizeClass(r.classes),ref:"modal"},[i.withDirectives((i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(r.bodyClassList),style:i.normalizeStyle(r.bodyStyles)},[e.showCloseButton?(i.openBlock(),i.createBlock(s,{key:0,class:"modal-close-icon",kind:"ghost",onClick:r.close},{default:i.withCtx(()=>[i.createVNode(l,{name:"close-outline"})]),_:1},8,["onClick"])):i.createCommentVNode("",!0),r.hasHeader?(i.openBlock(),i.createElementBlock("p",Gs,[i.renderSlot(t.$slots,"header",{showModal:r.showModal},void 0,!0)])):i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["modal-content",{"without-title":!r.hasHeader}])},[i.renderSlot(t.$slots,"body",{showModal:r.showModal},void 0,!0)],2),r.hasFooter?(i.openBlock(),i.createElementBlock("div",Ws,[i.renderSlot(t.$slots,"footer",{showModal:r.showModal},void 0,!0)])):i.createCommentVNode("",!0)],6)),[[u,r.clickOutside]])],2),[[i.vShow,a.isActive]])]))],64)}const Zs=_e(Ks,[["render",Ys],["__scopeId","data-v-12ec5923"]]);function _o(t){return"#"+t.toLowerCase().replace(/ /g,"-")}const fp="",Js={name:"IbTabDropdown",props:{tabs:{rype:Object,default:{}},selectedTab:{type:String,default:""}},data(){return{selectedTabByDropdown:"",isDisabledDropdown:this.setDisabledTab()}},methods:{createHref(t){return _o(t)},selectTab(t){this.selectedTabByDropdown=t,this.$emit("select-tab",t)},setDisabledTab(){return this.tabs.tabs.every(t=>t.disabled)}},computed:{isActive(){for(let t of this.tabs.tabs)if(t.id===this.selectedTab)return!0;return!1}},components:{IbDropdownList:or,IbDropdownItem:jr,IbIcon:Le}},Xs={class:"wrapper-tab-link dropdown-tab"},Qs=["tabindex"];function ed(t,n,e,o,a,r){const l=i.resolveComponent("ib-icon"),s=i.resolveComponent("ib-dropdown-item"),u=i.resolveComponent("ib-dropdown-list");return i.openBlock(),i.createElementBlock("div",Xs,[i.createVNode(u,{disabled:a.isDisabledDropdown,"close-on-click":!0},{trigger:i.withCtx(()=>[i.createElementVNode("span",{class:i.normalizeClass(["tab-link",{active:a.selectedTabByDropdown===e.selectedTab||r.isActive,disabled:a.isDisabledDropdown}]),tabindex:a.isDisabledDropdown?-1:0},[i.createTextVNode(i.toDisplayString(e.tabs.name)+" ",1),i.createVNode(l,{name:"chevron-down"})],10,Qs)]),body:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(e.tabs.tabs,(c,p)=>(i.openBlock(),i.createBlock(s,{key:p,checked:c.id===e.selectedTab,href:r.createHref(c.id),tabindex:c.disabled?-1:0,class:i.normalizeClass([{disabled:c.disabled},"dropdown-tab-item"]),target:"_self",onClick:f=>r.selectTab(c.id)},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(c.title),1)]),_:2},1032,["checked","href","tabindex","class","onClick"]))),128))]),_:1},8,["disabled"])])}const $o=_e(Js,[["render",ed]]),hp="",td={name:"IbTabs",props:{selectedTabId:{type:String,default:""}},data(){return{tabs:[],selectedTab:this.selectTabId}},watch:{selectedTabId(t){this.selectTab(t)}},created(){const t=[];this.$slots.default().forEach(n=>n.type===Symbol.for("v-fgt")?t.push(...n.children):t.push(n)),t.forEach(n=>{if(!n.props.name)this.tabs.push(n.props);else{const e=this.tabs.findIndex(o=>o.name===n.props.name);if(e!==-1)this.tabs[e].tabs.push(n.props);else{const o={name:n.props.name,tabs:[n.props]};this.tabs.push(o)}}});for(let n of this.tabs)if(!n.disabled)if(n.tabs){for(let e of n.tabs)if(!e.disabled){this.selectTab(e.id);return}}else{this.selectTab(n.id);return}},methods:{createHref(t){return _o(t)},selectTab(t){this.$emit("changeTab",t),this.selectedTab=t}},components:{IbTabDropdown:$o},emits:["changeTab"]},nd={class:"tabs"},rd={class:"tabs-list"},id={key:0,class:"wrapper-tab-link"},od=["href","tabindex","onClick"],ad={class:"tabs-content",ref:"tabHandler"};function ld(t,n,e,o,a,r){const l=i.resolveComponent("ib-tab-dropdown");return i.openBlock(),i.createElementBlock("div",nd,[i.createElementVNode("ul",rd,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.tabs,(s,u)=>(i.openBlock(),i.createElementBlock("li",{class:"tab-item",key:u},[s.name?(i.openBlock(),i.createBlock(l,{key:1,"selected-tab":a.selectedTab,tabs:s,onSelectTab:r.selectTab},null,8,["selected-tab","tabs","onSelectTab"])):(i.openBlock(),i.createElementBlock("div",id,[i.createElementVNode("a",{class:i.normalizeClass(["tab-link",{active:a.selectedTab===s.id,disabled:s.disabled}]),href:r.createHref(s.id),tabindex:s.disabled?-1:0,onClick:c=>r.selectTab(s.id),target:"_self"},i.toDisplayString(s.title),11,od)]))]))),128))]),i.createElementVNode("div",ad,[i.renderSlot(t.$slots,"default",{},void 0,!0)],512)])}const sd=_e(td,[["render",ld],["__scopeId","data-v-47d103be"]]),dd={name:"IbTab",props:{title:{type:String,required:!0},id:{type:String,required:!0},disabled:{type:Boolean,default:!1},initialized:{type:Boolean,default:!1},name:{type:String,default:null}},computed:{isTabActive(){return this.$parent.selectedTab===this.id}}};function cd(t,n,e,o,a,r){return i.withDirectives((i.openBlock(),i.createElementBlock("div",null,[i.renderSlot(t.$slots,"default")],512)),[[i.vShow,r.isTabActive]])}const ud=_e(dd,[["render",cd]]),fd={LIST_VIEW:"list-sorting",GRID_VIEW:"grid-sorting",TABLE_VIEW:"table-sorting"},hd={TYPE_ASC:"asc",TYPE_DESC:"desc"},wo={topLeft:"top-left",topCenter:"top-center",topRight:"top-right",rightTop:"right-top",rightCenter:"right-center",rightBottom:"right-bottom",bottomLeft:"bottom-left",bottomCenter:"bottom-center",bottomRight:"bottom-right",leftTop:"left-top",leftCenter:"left-center",leftBottom:"left-bottom"};class ko{constructor(){this.tooltipInstance=null,this.tooltipContainer=null,this.uuid=null}getTooltipInstance(){return this.getTooltipInstance}getTooltipContainer(){return this.tooltipContainer}getId(){return this.uuid}generateUID(){this.uuid="tooltip_"+pt()}createTooltip(n,e,o){var r;if(!((r=e.text)!=null&&r.length))return;this.generateUID();const a=`
2
4
  position: absolute;
3
5
  top: 0px;
4
6
  left: 0px;
@@ -86,7 +88,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
86
88
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nh(t,n){if(t){if(typeof t=="string")return ra(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ra(t,n)}}function ra(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}var rh=["MOBILE","PREMIUM_RATE","TOLL_FREE","SHARED_COST","VOIP","PERSONAL_NUMBER","PAGER","UAN","VOICEMAIL"];function oi(t,n,e){if(n=n||{},!(!t.country&&!t.countryCallingCode)){e=new nt(e),e.selectNumberingPlan(t.country,t.countryCallingCode);var o=n.v2?t.nationalNumber:t.phone;if(Dt(o,e.nationalNumberPattern())){if(ai(o,"FIXED_LINE",e))return e.type("MOBILE")&&e.type("MOBILE").pattern()===""||!e.type("MOBILE")||ai(o,"MOBILE",e)?"FIXED_LINE_OR_MOBILE":"FIXED_LINE";for(var a=th(rh),r;!(r=a()).done;){var l=r.value;if(ai(o,l,e))return l}}}}function ai(t,n,e){return n=e.type(n),!n||!n.pattern()||n.possibleLengths()&&n.possibleLengths().indexOf(t.length)<0?!1:Dt(t,n.pattern())}function ih(t,n,e){if(n=n||{},e=new nt(e),e.selectNumberingPlan(t.country,t.countryCallingCode),e.hasTypes())return oi(t,n,e.metadata)!==void 0;var o=n.v2?t.nationalNumber:t.phone;return Dt(o,e.nationalNumberPattern())}function oh(t,n,e){var o=new nt(e),a=o.getCountryCodesForCallingCode(t);return a?a.filter(function(r){return ah(n,r,e)}):[]}function ah(t,n,e){var o=new nt(e);return o.selectNumberingPlan(n),o.numberingPlan.possibleLengths().indexOf(t.length)>=0}function lh(t){return t.replace(new RegExp("[".concat(cr,"]+"),"g")," ").trim()}var sh=/(\$\d)/;function dh(t,n,e){var o=e.useInternationalFormat,a=e.withNationalPrefix;e.carrierCode,e.metadata;var r=t.replace(new RegExp(n.pattern()),o?n.internationalFormat():a&&n.nationalPrefixFormattingRule()?n.format().replace(sh,n.nationalPrefixFormattingRule()):n.format());return o?lh(r):r}var ch=/^[\d]+(?:[~\u2053\u223C\uFF5E][\d]+)?$/;function uh(t,n,e){var o=new nt(e);if(o.selectNumberingPlan(t,n),o.defaultIDDPrefix())return o.defaultIDDPrefix();if(ch.test(o.IDDPrefix()))return o.IDDPrefix()}function fh(t){var n=t.number,e=t.ext;if(!n)return"";if(n[0]!=="+")throw new Error('"formatRFC3966()" expects "number" to be in E.164 format.');return"tel:".concat(n).concat(e?";ext="+e:"")}function hh(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=ph(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
87
89
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ph(t,n){if(t){if(typeof t=="string")return ia(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ia(t,n)}}function ia(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}function oa(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),e.push.apply(e,o)}return e}function aa(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?oa(Object(e),!0).forEach(function(o){mh(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):oa(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function mh(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var la={formatExtension:function(t,n,e){return"".concat(t).concat(e.ext()).concat(n)}};function gh(t,n,e,o){if(e?e=aa(aa({},la),e):e=la,o=new nt(o),t.country&&t.country!=="001"){if(!o.hasCountry(t.country))throw new Error("Unknown country: ".concat(t.country));o.country(t.country)}else if(t.countryCallingCode)o.selectNumberingPlan(t.countryCallingCode);else return t.phone||"";var a=o.countryCallingCode(),r=e.v2?t.nationalNumber:t.phone,l;switch(n){case"NATIONAL":return r?(l=pr(r,t.carrierCode,"NATIONAL",o,e),li(l,t.ext,o,e.formatExtension)):"";case"INTERNATIONAL":return r?(l=pr(r,null,"INTERNATIONAL",o,e),l="+".concat(a," ").concat(l),li(l,t.ext,o,e.formatExtension)):"+".concat(a);case"E.164":return"+".concat(a).concat(r);case"RFC3966":return fh({number:"+".concat(a).concat(r),ext:t.ext});case"IDD":if(!e.fromCountry)return;var s=bh(r,t.carrierCode,a,e.fromCountry,o);return li(s,t.ext,o,e.formatExtension);default:throw new Error('Unknown "format" argument passed to "formatNumber()": "'.concat(n,'"'))}}function pr(t,n,e,o,a){var r=yh(o.formats(),t);return r?dh(t,r,{useInternationalFormat:e==="INTERNATIONAL",withNationalPrefix:!(r.nationalPrefixIsOptionalWhenFormattingInNationalFormat()&&a&&a.nationalPrefix===!1),carrierCode:n,metadata:o}):t}function yh(t,n){for(var e=hh(t),o;!(o=e()).done;){var a=o.value;if(a.leadingDigitsPatterns().length>0){var r=a.leadingDigitsPatterns()[a.leadingDigitsPatterns().length-1];if(n.search(r)!==0)continue}if(Dt(n,a.pattern()))return a}}function li(t,n,e,o){return n?o(t,n,e):t}function bh(t,n,e,o,a){var r=ri(o,a.metadata);if(r===e){var l=pr(t,n,"NATIONAL",a);return e==="1"?e+" "+l:l}var s=uh(o,void 0,a.metadata);if(s)return"".concat(s," ").concat(e," ").concat(pr(t,null,"INTERNATIONAL",a))}function sa(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),e.push.apply(e,o)}return e}function da(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?sa(Object(e),!0).forEach(function(o){vh(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):sa(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function vh(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function _h(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function ca(t,n){for(var e=0;e<n.length;e++){var o=n[e];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function $h(t,n,e){return n&&ca(t.prototype,n),e&&ca(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var wh=function(){function t(n,e,o){if(_h(this,t),!n)throw new TypeError("`country` or `countryCallingCode` not passed");if(!e)throw new TypeError("`nationalNumber` not passed");if(!o)throw new TypeError("`metadata` not passed");var a=Ch(n,o),r=a.country,l=a.countryCallingCode;this.country=r,this.countryCallingCode=l,this.nationalNumber=e,this.number="+"+this.countryCallingCode+this.nationalNumber,this.getMetadata=function(){return o}}return $h(t,[{key:"setExt",value:function(n){this.ext=n}},{key:"getPossibleCountries",value:function(){return this.country?[this.country]:oh(this.countryCallingCode,this.nationalNumber,this.getMetadata())}},{key:"isPossible",value:function(){return eh(this,{v2:!0},this.getMetadata())}},{key:"isValid",value:function(){return ih(this,{v2:!0},this.getMetadata())}},{key:"isNonGeographic",value:function(){var n=new nt(this.getMetadata());return n.isNonGeographicCallingCode(this.countryCallingCode)}},{key:"isEqual",value:function(n){return this.number===n.number&&this.ext===n.ext}},{key:"getType",value:function(){return oi(this,{v2:!0},this.getMetadata())}},{key:"format",value:function(n,e){return gh(this,n,e?da(da({},e),{},{v2:!0}):{v2:!0},this.getMetadata())}},{key:"formatNational",value:function(n){return this.format("NATIONAL",n)}},{key:"formatInternational",value:function(n){return this.format("INTERNATIONAL",n)}},{key:"getURI",value:function(n){return this.format("RFC3966",n)}}]),t}(),kh=function(t){return/^[A-Z]{2}$/.test(t)};function Ch(t,n){var e,o,a=new nt(n);return kh(t)?(e=t,a.selectNumberingPlan(e),o=a.countryCallingCode()):o=t,{country:e,countryCallingCode:o}}var Oh=new RegExp("(["+yt+"])");function Eh(t,n,e,o){if(n){var a=new nt(o);a.selectNumberingPlan(n,e);var r=new RegExp(a.IDDPrefix());if(t.search(r)===0){t=t.slice(t.match(r)[0].length);var l=t.match(Oh);if(!(l&&l[1]!=null&&l[1].length>0&&l[1]==="0"))return t}}}function Sh(t,n){if(t&&n.numberingPlan.nationalPrefixForParsing()){var e=new RegExp("^(?:"+n.numberingPlan.nationalPrefixForParsing()+")"),o=e.exec(t);if(o){var a,r,l=o.length-1,s=l>0&&o[l];if(n.nationalPrefixTransformRule()&&s)a=t.replace(e,n.nationalPrefixTransformRule()),l>1&&(r=o[1]);else{var u=o[0];a=t.slice(u.length),s&&(r=o[1])}var c;if(s){var p=t.indexOf(o[1]),f=t.slice(0,p);f===n.numberingPlan.nationalPrefix()&&(c=n.numberingPlan.nationalPrefix())}else c=o[0];return{nationalNumber:a,nationalPrefix:c,carrierCode:r}}}return{nationalNumber:t}}function si(t,n){var e=Sh(t,n),o=e.carrierCode,a=e.nationalNumber;if(a!==t){if(!xh(t,a,n))return{nationalNumber:t};if(n.possibleLengths()&&!Th(a,n))return{nationalNumber:t}}return{nationalNumber:a,carrierCode:o}}function xh(t,n,e){return!(Dt(t,e.nationalNumberPattern())&&!Dt(n,e.nationalNumberPattern()))}function Th(t,n){switch(ii(t,n)){case"TOO_SHORT":case"INVALID_LENGTH":return!1;default:return!0}}function Nh(t,n,e,o){var a=n?ri(n,o):e;if(t.indexOf(a)===0){o=new nt(o),o.selectNumberingPlan(n,e);var r=t.slice(a.length),l=si(r,o),s=l.nationalNumber,u=si(t,o),c=u.nationalNumber;if(!Dt(c,o.nationalNumberPattern())&&Dt(s,o.nationalNumberPattern())||ii(c,o)==="TOO_LONG")return{countryCallingCode:a,number:r}}return{number:t}}function Ah(t,n,e,o){if(!t)return{};var a;if(t[0]!=="+"){var r=Eh(t,n,e,o);if(r&&r!==t)a=!0,t="+"+r;else{if(n||e){var l=Nh(t,n,e,o),s=l.countryCallingCode,u=l.number;if(s)return{countryCallingCodeSource:"FROM_NUMBER_WITHOUT_PLUS_SIGN",countryCallingCode:s,number:u}}return{number:t}}}if(t[1]==="0")return{};o=new nt(o);for(var c=2;c-1<=_f&&c<=t.length;){var p=t.slice(1,c);if(o.hasCallingCode(p))return o.selectNumberingPlan(p),{countryCallingCodeSource:a?"FROM_NUMBER_WITH_IDD":"FROM_NUMBER_WITH_PLUS_SIGN",countryCallingCode:p,number:t.slice(c)};c++}return{}}function Dh(t,n){var e=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=Ph(t))||n&&t&&typeof t.length=="number"){e&&(t=e);var o=0;return function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
88
90
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ph(t,n){if(t){if(typeof t=="string")return ua(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ua(t,n)}}function ua(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}function Ih(t,n){var e=n.countries,o=n.defaultCountry,a=n.metadata;a=new nt(a);for(var r=[],l=Dh(e),s;!(s=l()).done;){var u=s.value;if(a.country(u),a.leadingDigits()){if(t&&t.search(a.leadingDigits())===0)return u}else if(oi({phone:t,country:u},void 0,a.metadata))if(o){if(u===o)return u;r.push(u)}else return u}if(r.length>0)return r[0]}function Mh(t,n){var e=n.nationalNumber,o=n.defaultCountry,a=n.metadata,r=a.getCountryCodesForCallingCode(t);if(r)return r.length===1?r[0]:Ih(e,{countries:r,defaultCountry:o,metadata:a.metadata})}var fa="+",Bh="[\\-\\.\\(\\)]?",ha="(["+yt+"]|"+Bh+")",Lh="^\\"+fa+ha+"*["+yt+"]"+ha+"*$",Rh=new RegExp(Lh,"g"),di=yt,jh="["+di+"]+((\\-)*["+di+"])*",Vh="a-zA-Z",qh="["+Vh+"]+((\\-)*["+di+"])*",Fh="^("+jh+"\\.)*"+qh+"\\.?$",Hh=new RegExp(Fh,"g"),pa="tel:",ci=";phone-context=",zh=";isub=";function Uh(t){var n=t.indexOf(ci);if(n<0)return null;var e=n+ci.length;if(e>=t.length)return"";var o=t.indexOf(";",e);return o>=0?t.substring(e,o):t.substring(e)}function Kh(t){return t===null?!0:t.length===0?!1:Rh.test(t)||Hh.test(t)}function Gh(t,n){var e=n.extractFormattedPhoneNumber,o=Uh(t);if(!Kh(o))throw new At("NOT_A_NUMBER");var a;if(o===null)a=e(t)||"";else{a="",o.charAt(0)===fa&&(a+=o);var r=t.indexOf(pa),l;r>=0?l=r+pa.length:l=0;var s=t.indexOf(ci);a+=t.substring(l,s)}var u=a.indexOf(zh);if(u>0&&(a=a.substring(0,u)),a!=="")return a}var Wh=250,Yh=new RegExp("["+ti+yt+"]"),Zh=new RegExp("[^"+yt+"#]+$");function Jh(t,n,e){if(n=n||{},e=new nt(e),n.defaultCountry&&!e.hasCountry(n.defaultCountry))throw n.v2?new At("INVALID_COUNTRY"):new Error("Unknown country: ".concat(n.defaultCountry));var o=Qh(t,n.v2,n.extract),a=o.number,r=o.ext,l=o.error;if(!a){if(n.v2)throw l==="TOO_SHORT"?new At("TOO_SHORT"):new At("NOT_A_NUMBER");return{}}var s=t1(a,n.defaultCountry,n.defaultCallingCode,e),u=s.country,c=s.nationalNumber,p=s.countryCallingCode,f=s.countryCallingCodeSource,d=s.carrierCode;if(!e.hasSelectedNumberingPlan()){if(n.v2)throw new At("INVALID_COUNTRY");return{}}if(!c||c.length<ei){if(n.v2)throw new At("TOO_SHORT");return{}}if(c.length>vf){if(n.v2)throw new At("TOO_LONG");return{}}if(n.v2){var h=new wh(p,c,e.metadata);return u&&(h.country=u),d&&(h.carrierCode=d),r&&(h.ext=r),h.__countryCallingCodeSource=f,h}var v=(n.extended?e.hasSelectedNumberingPlan():u)?Dt(c,e.nationalNumberPattern()):!1;return n.extended?{country:u,countryCallingCode:p,carrierCode:d,valid:v,possible:v?!0:!!(n.extended===!0&&e.possibleLengths()&&na(c,e)),phone:c,ext:r}:v?e1(u,c,r):{}}function Xh(t,n,e){if(t){if(t.length>Wh){if(e)throw new At("TOO_LONG");return}if(n===!1)return t;var o=t.search(Yh);if(!(o<0))return t.slice(o).replace(Zh,"")}}function Qh(t,n,e){var o=Gh(t,{extractFormattedPhoneNumber:function(r){return Xh(r,e,n)}});if(!o)return{};if(!Hf(o))return zf(o)?{error:"TOO_SHORT"}:{};var a=Uf(o);return a.ext?a:{number:o}}function e1(t,n,e){var o={country:t,phone:n};return e&&(o.ext=e),o}function t1(t,n,e,o){var a=Ah(Qo(t),n,e,o.metadata),r=a.countryCallingCodeSource,l=a.countryCallingCode,s=a.number,u;if(l)o.selectNumberingPlan(l);else if(s&&(n||e))o.selectNumberingPlan(n,e),n&&(u=n),l=e||ri(n,o.metadata);else return{};if(!s)return{countryCallingCodeSource:r,countryCallingCode:l};var c=si(Qo(s),o),p=c.nationalNumber,f=c.carrierCode,d=Mh(l,{nationalNumber:p,defaultCountry:n,metadata:o});return d&&(u=d,d==="001"||o.country(u)),{country:u,countryCallingCode:l,countryCallingCodeSource:r,nationalNumber:p,carrierCode:f}}function ma(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),e.push.apply(e,o)}return e}function ga(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?ma(Object(e),!0).forEach(function(o){n1(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ma(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function n1(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function r1(t,n,e){return Jh(t,ga(ga({},n),{},{v2:!0}),e)}function ya(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),e.push.apply(e,o)}return e}function i1(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?ya(Object(e),!0).forEach(function(o){o1(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):ya(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function o1(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function a1(t,n){return c1(t)||d1(t,n)||s1(t,n)||l1()}function l1(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
89
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s1(t,n){if(t){if(typeof t=="string")return ba(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ba(t,n)}}function ba(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}function d1(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var o=[],a=!0,r=!1,l,s;try{for(e=e.call(t);!(a=(l=e.next()).done)&&(o.push(l.value),!(n&&o.length===n));a=!0);}catch(u){r=!0,s=u}finally{try{!a&&e.return!=null&&e.return()}finally{if(r)throw s}}return o}}function c1(t){if(Array.isArray(t))return t}function u1(t){var n=Array.prototype.slice.call(t),e=a1(n,4),o=e[0],a=e[1],r=e[2],l=e[3],s,u,c;if(typeof o=="string")s=o;else throw new TypeError("A text for parsing must be a string.");if(!a||typeof a=="string")l?(u=r,c=l):(u=void 0,c=r),a&&(u=i1({defaultCountry:a},u));else if(ur(a))r?(u=a,c=r):c=a;else throw new Error("Invalid second argument: ".concat(a));return{text:s,options:u,metadata:c}}function va(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),e.push.apply(e,o)}return e}function _a(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?va(Object(e),!0).forEach(function(o){f1(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):va(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function f1(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function h1(t,n,e){n&&n.defaultCountry&&!Bf(n.defaultCountry,e)&&(n=_a(_a({},n),{},{defaultCountry:void 0}));try{return r1(t,n,e)}catch(o){if(!(o instanceof At))throw o}}function p1(){var t=u1(arguments),n=t.text,e=t.options,o=t.metadata;return h1(n,e,o)}function ui(){return ff(p1,arguments)}const m1={beforeMount(t,n,e){if(typeof n.value!="function"){const o=e.context.name;let a=`[Vue-click-outside:] provided expression ${n.expression} is not a function, but has to be`;o&&(a+=`Found in component ${o}`),console.warn(a)}t.clickOutsideEvent=function(o){const a=o.composedPath?o.composedPath():o.path;t===o.target||t.contains(o.target)||a.includes(t)||n.value(o,t)},document.body.addEventListener("click",t.clickOutsideEvent)},unmounted(t){document.body.removeEventListener("click",t.clickOutsideEvent)}},g1=["aria-expanded","tabindex"],y1={class:"vti__selection"},b1={key:1,class:"vti__country-code"},v1={class:"vti__dropdown-arrow"},_1={key:0,class:"vti__search_box_container"},$1=["placeholder"],w1=["onClick","onMousemove","aria-selected"],k1={key:1},C1=["type","autocomplete","autofocus","disabled","id","maxlength","name","placeholder","readonly","required","tabindex","value","aria-describedby"],O1=i.defineComponent({name:"VueTelInput",directives:{clickOutside:m1},__name:"vue-tel-input",props:i.mergeModels({allCountries:{type:Array,default:()=>tt("allCountries")},autoFormat:{type:Boolean,default:()=>tt("autoFormat")},customValidate:{type:[Boolean,RegExp],default:()=>tt("customValidate")},defaultCountry:{type:[String,Number],default:()=>tt("defaultCountry")},disabled:{type:Boolean,default:()=>tt("disabled")},autoDefaultCountry:{type:Boolean,default:()=>tt("autoDefaultCountry")},dropdownOptions:{type:Object,default:()=>tt("dropdownOptions")},ignoredCountries:{type:Array,default:()=>tt("ignoredCountries")},inputOptions:{type:Object,default:()=>tt("inputOptions")},invalidMsg:{type:String,default:()=>tt("invalidMsg")},mode:{type:String,default:()=>tt("mode")},onlyCountries:{type:Array,default:()=>tt("onlyCountries")},preferredCountries:{type:Array,default:()=>tt("preferredCountries")},validCharactersOnly:{type:Boolean,default:()=>tt("validCharactersOnly")},styleClasses:{type:[String,Array,Object],default:()=>tt("styleClasses")}},{modelValue:{type:String},modelModifiers:{}}),emits:i.mergeModels(["blur","close","country-changed","enter","focus","on-input","open","space","validate"],["update:modelValue"]),setup(t,{expose:n,emit:e}){const o=i.shallowRef(),a=i.shallowRef(),r=i.shallowRef(),l=e,s=t,u=i.useModel(t,"modelValue");i.watch(u,(A,I)=>{S()?c.phone=A??"":i.nextTick(()=>{c.phone=I??"",B()})});const c=i.reactive({phone:"",activeCountryCode:void 0,open:!1,finishMounted:!1,selectedIndex:null,typeToFindInput:"",typeToFindTimer:void 0,dropdownOpenDirection:"below",parsedPlaceholder:s.inputOptions.placeholder,searchQuery:""});i.watch(()=>c.open,A=>{A?(D(),l("open")):l("close")});const p=i.computed(()=>s.onlyCountries.length?s.allCountries.filter(({iso2:A})=>s.onlyCountries.some(I=>Tn(I)===A)):s.ignoredCountries.length?s.allCountries.filter(({iso2:A})=>!s.ignoredCountries.includes(Tn(A))&&!s.ignoredCountries.includes(xn(A))):s.allCountries),f=i.computed(()=>g(c.activeCountryCode));i.watch(f,(A,I)=>{if(!A&&I!=null&&I.iso2){c.activeCountryCode=I.iso2;return}A!=null&&A.iso2&&l("country-changed",A)});const d=i.computed(()=>{var A;const I=xn(s.mode);return I==="auto"?(A=c.phone)!=null&&A.startsWith("+")?"international":"national":["national","international","e.164","rfc3966","idd"].includes(I)?I:(console.error('Invalid value of prop "mode"'),"international")}),h=i.computed(()=>{const A=[...y(s.preferredCountries).map(U=>({...U,preferred:!0})),...p.value];if(!s.dropdownOptions.showSearchBox)return A;const I=c.searchQuery.toLowerCase().replace(/[~`!@#$%^&*()+={}\[\];:\'\"<>.,\/\\\?-_]/g,"");return A.filter(U=>new RegExp(I,"i").test(U.name)||new RegExp(I,"i").test(U.iso2)||new RegExp(I,"i").test(U.dialCode))}),v=i.computed(()=>{var A;const I=c.phone.startsWith("+")?ui(c.phone):ui(c.phone,c.activeCountryCode),U={country:I==null?void 0:I.country,countryCode:I==null?void 0:I.country,formatted:c.phone,valid:I==null?void 0:I.isValid(),possible:(A=I==null?void 0:I.isPossible)==null?void 0:A.call(I),nationalNumber:I==null?void 0:I.nationalNumber};return U.valid&&(U.formatted=I==null?void 0:I.format(Tn(d.value))),I!=null&&I.country&&(s.ignoredCountries.length||s.onlyCountries.length)&&!g(I.country)&&(U.valid=!1,U.possible=!1,I.country=null),I?{...U,...I}:U});i.watch(()=>v.value.countryCode,A=>{A&&(c.activeCountryCode=A)}),i.watch(()=>v.value.valid,()=>{l("validate",v.value)}),i.watch(()=>v.value.formatted,A=>{!s.autoFormat||s.customValidate||(E(A),i.nextTick(()=>{A&&!u.value&&(c.phone=A)}))}),i.watch(()=>s.inputOptions.placeholder,m),i.onMounted(()=>{u.value&&(c.phone=u.value.trim()),T(),_().then(()=>{var A;!c.phone&&(A=s.inputOptions)!=null&&A.showDialCode&&c.activeCountryCode&&(c.phone=`+${c.activeCountryCode}`),l("validate",v.value)}).catch(console.error).then(()=>{c.finishMounted=!0})});function m(){c.parsedPlaceholder=s.inputOptions.placeholder}function _(){return new Promise(A=>{var I;if(((I=c.phone)==null?void 0:I[0])==="+"){A();return}if(s.defaultCountry){if(typeof s.defaultCountry=="string"){k(s.defaultCountry),A();return}if(typeof s.defaultCountry=="number"){const F=w(s.defaultCountry);if(F){k(F.iso2),A();return}}}const U=s.preferredCountries[0]||p.value[0];s.autoDefaultCountry?lf().then(F=>{k(F||c.activeCountryCode)}).catch(F=>{console.warn(F),k(U)}).then(()=>{A()}):(k(U),A())})}function y(A=[]){return A.map(g).filter(Boolean)}function g(A=""){return p.value.find(I=>I.iso2===Tn(A))}function w(A){return p.value.find(I=>Number(I.dialCode)===A)}function b(A,I){const U=c.selectedIndex===A,F=A===s.preferredCountries.length-1,L=s.preferredCountries.some(z=>Tn(z)===I);return{highlighted:U,"last-preferred":F,preferred:L}}function k(A){var I,U,F;let L=A;if(typeof L=="string"&&(L=g(L)),!!L){if(((I=c.phone)==null?void 0:I[0])==="+"&&L.iso2&&v.value.nationalNumber){c.activeCountryCode=L.iso2,c.phone=((U=ui(v.value.nationalNumber,L.iso2))==null?void 0:U.formatInternational())??"";return}if((F=s.inputOptions)!=null&&F.showDialCode&&L){c.phone=`+${L.dialCode}`,c.activeCountryCode=L.iso2;return}c.activeCountryCode=L.iso2,E(c.phone)}}function T(){const A=c.phone;if(s.validCharactersOnly){const I=c.phone.match(/[()\-+0-9\s]*/g);c.phone=I.join("")}if(s.customValidate&&s.customValidate instanceof RegExp){const I=c.phone.match(s.customValidate);c.phone=I.join("")}A!==c.phone&&E(c.phone)}function S(){return s.validCharactersOnly&&!/^[()\-+0-9\s]*$/.test(c.phone)?!1:s.customValidate?x():!0}function x(){return s.customValidate instanceof RegExp?s.customValidate.test(c.phone):!1}function B(){var A;(A=r.value)==null||A.setCustomValidity(v.value.valid?"":s.invalidMsg),E(c.phone)}function E(A){u.value=A,l("on-input",A,v.value,r.value)}function C(A){l("blur",A)}function O(A){sf(r.value,c.phone.length),l("focus",A)}function N(A){l("enter",A)}function R(A){l("space",A)}function q(){var A;(A=r.value)==null||A.focus()}function W(){var A;(A=r.value)==null||A.blur()}function Y(){s.disabled||s.dropdownOptions.disabled||(c.searchQuery="",c.open=!c.open)}function re(){c.open=!1}function K(A){if(A.keyCode===40){A.preventDefault(),c.open=!0,c.selectedIndex===null?c.selectedIndex=0:c.selectedIndex=Math.min(h.value.length-1,c.selectedIndex+1);const I=a.value.children[c.selectedIndex];I.focus(),I.offsetTop+I.clientHeight>a.value.scrollTop+a.value.clientHeight&&(a.value.scrollTop=I.offsetTop-a.value.clientHeight+I.clientHeight)}else if(A.keyCode===38){A.preventDefault(),c.open=!0,c.selectedIndex===null?c.selectedIndex=h.value.length-1:c.selectedIndex=Math.max(0,c.selectedIndex-1);const I=a.value.children[c.selectedIndex];I.focus(),I.offsetTop<a.value.scrollTop&&(a.value.scrollTop=I.offsetTop)}else if(A.keyCode===13)c.selectedIndex!==null&&k(h.value[c.selectedIndex]),c.open=!c.open;else if(c.open){c.typeToFindInput+=A.key,clearTimeout(c.typeToFindTimer),c.typeToFindTimer=setTimeout(()=>{c.typeToFindInput=""},700);const I=h.value.slice(s.preferredCountries.length).findIndex(U=>xn(U.name).startsWith(c.typeToFindInput));if(I>=0){c.selectedIndex=s.preferredCountries.length+I;const U=a.value.children[c.selectedIndex],F=U.offsetTop<a.value.scrollTop,L=U.offsetTop+U.clientHeight>a.value.scrollTop+a.value.clientHeight;(F||L)&&(a.value.scrollTop=U.offsetTop-a.value.clientHeight/2)}}}function V(){c.selectedIndex=h.value.map(A=>A.iso2).indexOf(c.activeCountryCode),c.open=!1}function D(){window.innerHeight-o.value.getBoundingClientRect().bottom>200?c.dropdownOpenDirection="below":c.dropdownOpenDirection="above"}return n({focus:q,blur:W}),(A,I)=>{const U=i.resolveDirective("click-outside");return i.openBlock(),i.createElementBlock("div",{ref_key:"refRoot",ref:o,class:i.normalizeClass(["vue-tel-input",t.styleClasses,{disabled:t.disabled}])},[i.withDirectives((i.openBlock(),i.createElementBlock("div",{"aria-label":"Country Code Selector","aria-haspopup":"listbox","aria-expanded":c.open,role:"button",class:i.normalizeClass(["vti__dropdown",{open:c.open,disabled:t.dropdownOptions.disabled}]),tabindex:t.dropdownOptions.tabindex,onKeydown:[K,i.withKeys(Y,["space"]),i.withKeys(V,["esc"]),i.withKeys(V,["tab"])],onClick:Y},[i.createElementVNode("span",y1,[t.dropdownOptions.showFlags?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["vti__flag",i.unref(xn)(c.activeCountryCode)])},null,2)):i.createCommentVNode("",!0),t.dropdownOptions.showDialCodeInSelection?(i.openBlock(),i.createElementBlock("span",b1," +"+i.toDisplayString(f.value&&f.value.dialCode),1)):i.createCommentVNode("",!0),i.renderSlot(A.$slots,"arrow-icon",{open:c.open},()=>[i.createElementVNode("span",v1,i.toDisplayString(c.open?"▲":"▼"),1)])]),c.open?(i.openBlock(),i.createElementBlock("ul",{key:0,ref_key:"refList",ref:a,class:i.normalizeClass(["vti__dropdown-list",c.dropdownOpenDirection]),role:"listbox"},[t.dropdownOptions.showSearchBox?(i.openBlock(),i.createElementBlock("div",_1,[i.renderSlot(A.$slots,"search-icon"),i.withDirectives(i.createElementVNode("input",{class:i.normalizeClass(["vti__input","vti__search_box"]),"aria-label":"Search by country name or country code",placeholder:t.dropdownOptions.searchBoxPlaceholder||(h.value.length?h.value[0].name:""),type:"text","onUpdate:modelValue":I[0]||(I[0]=F=>c.searchQuery=F),onClick:I[1]||(I[1]=i.withModifiers(()=>{},["stop"]))},null,8,$1),[[i.vModelText,c.searchQuery]])])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.value,(F,L)=>(i.openBlock(),i.createElementBlock("li",{role:"option",class:i.normalizeClass(["vti__dropdown-item",b(L,F.iso2)]),key:F.iso2+(F.preferred?"-preferred":""),tabindex:"-1",onClick:z=>k(F),onMousemove:z=>c.selectedIndex=L,"aria-selected":c.activeCountryCode===F.iso2&&!F.preferred},[t.dropdownOptions.showFlags?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["vti__flag",i.unref(xn)(F.iso2)])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("strong",null,i.toDisplayString(F.name),1),t.dropdownOptions.showDialCodeInList?(i.openBlock(),i.createElementBlock("span",k1," +"+i.toDisplayString(F.dialCode),1)):i.createCommentVNode("",!0)],42,w1))),128))],2)):i.createCommentVNode("",!0)],42,g1)),[[U,re]]),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":I[2]||(I[2]=F=>c.phone=F),ref_key:"refInput",ref:r,type:t.inputOptions.type,autocomplete:t.inputOptions.autocomplete,autofocus:t.inputOptions.autofocus,class:i.normalizeClass(["vti__input","vti__phone",t.inputOptions.styleClasses]),disabled:t.disabled,id:t.inputOptions.id,maxlength:t.inputOptions.maxlength,name:t.inputOptions.name,placeholder:c.parsedPlaceholder,readonly:t.inputOptions.readonly,required:t.inputOptions.required,tabindex:t.inputOptions.tabindex,value:u.value,"aria-describedby":t.inputOptions["aria-describedby"],onBlur:C,onFocus:O,onInput:B,onKeyup:[i.withKeys(N,["enter"]),i.withKeys(R,["space"])]},null,42,C1),[[i.vModelDynamic,c.phone]]),i.renderSlot(A.$slots,"icon-right")],2)}}}),Lp="",Rp="",E1={directives:{Outside:nr},props:{modelValue:{type:String},value:String,inputName:{type:String,default:"phone"},autoDefaultCountry:{type:Boolean,default:!0},ignoredCountries:{type:Array,default:()=>[]},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""}},emits:["update:modelValue","onReady"],components:{VueTelInput:O1,IbAlert:Ft,IbIcon:Le},data(){return{vueTel:null,dialCode:"",defaultCountry:"US",allowChange:!1}},mounted(){this.vueTel=this.$refs.vueTel,this.$emit("onReady")},computed:{phone:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{countryChanged(t){this.$globalEvents.$on("countrySelectValue",n=>{this.vueTel.choose(n)}),!this.phone||this.phone.length-1<this.dialCode.length?this.phone="+"+t.dialCode:this.dialCode&&(this.phone=this.phone.replace(this.dialCode,t.dialCode)),this.dialCode=t.dialCode},clickOutside(){this.vueTel.open&&this.vueTel.clickedOutside()}}};function S1(t,n,e,o,a,r){const l=i.resolveComponent("ib-alert"),s=i.resolveComponent("ib-icon"),u=i.resolveComponent("vue-tel-input"),c=i.resolveDirective("outside");return i.openBlock(),i.createElementBlock(i.Fragment,null,[e.errorMessage.length?(i.openBlock(),i.createBlock(l,{key:0,class:"ib-phone-error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.withDirectives((i.openBlock(),i.createBlock(u,i.mergeProps({modelValue:r.phone,"onUpdate:modelValue":n[0]||(n[0]=p=>r.phone=p)},t.$attrs,{onCountryChanged:r.countryChanged,"input-options":{name:e.inputName,id:e.inputName,autocomplete:"off"},"auto-default-country":e.autoDefaultCountry,"dropdown-options":{showSearchBox:!0,showFlags:!0,tabindex:0},defaultCountry:a.defaultCountry,ignoredCountries:e.ignoredCountries,class:{error:e.error||e.errorMessage.length},"style-classes":"ib-phone-input",ref:"vueTel"}),{"arrow-icon":i.withCtx(()=>[i.createVNode(s,{name:"chevron-down-outline"})]),_:1},16,["modelValue","onCountryChanged","input-options","auto-default-country","defaultCountry","ignoredCountries","class"])),[[c,r.clickOutside]])],64)}const x1=_e(E1,[["render",S1]]);var $a={exports:{}};/*!
91
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s1(t,n){if(t){if(typeof t=="string")return ba(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);if(e==="Object"&&t.constructor&&(e=t.constructor.name),e==="Map"||e==="Set")return Array.from(t);if(e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return ba(t,n)}}function ba(t,n){(n==null||n>t.length)&&(n=t.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=t[e];return o}function d1(t,n){var e=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(e!=null){var o=[],a=!0,r=!1,l,s;try{for(e=e.call(t);!(a=(l=e.next()).done)&&(o.push(l.value),!(n&&o.length===n));a=!0);}catch(u){r=!0,s=u}finally{try{!a&&e.return!=null&&e.return()}finally{if(r)throw s}}return o}}function c1(t){if(Array.isArray(t))return t}function u1(t){var n=Array.prototype.slice.call(t),e=a1(n,4),o=e[0],a=e[1],r=e[2],l=e[3],s,u,c;if(typeof o=="string")s=o;else throw new TypeError("A text for parsing must be a string.");if(!a||typeof a=="string")l?(u=r,c=l):(u=void 0,c=r),a&&(u=i1({defaultCountry:a},u));else if(ur(a))r?(u=a,c=r):c=a;else throw new Error("Invalid second argument: ".concat(a));return{text:s,options:u,metadata:c}}function va(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),e.push.apply(e,o)}return e}function _a(t){for(var n=1;n<arguments.length;n++){var e=arguments[n]!=null?arguments[n]:{};n%2?va(Object(e),!0).forEach(function(o){f1(t,o,e[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):va(Object(e)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(e,o))})}return t}function f1(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function h1(t,n,e){n&&n.defaultCountry&&!Bf(n.defaultCountry,e)&&(n=_a(_a({},n),{},{defaultCountry:void 0}));try{return r1(t,n,e)}catch(o){if(!(o instanceof At))throw o}}function p1(){var t=u1(arguments),n=t.text,e=t.options,o=t.metadata;return h1(n,e,o)}function ui(){return ff(p1,arguments)}const m1={beforeMount(t,n,e){if(typeof n.value!="function"){const o=e.context.name;let a=`[Vue-click-outside:] provided expression ${n.expression} is not a function, but has to be`;o&&(a+=`Found in component ${o}`),console.warn(a)}t.clickOutsideEvent=function(o){const a=o.composedPath?o.composedPath():o.path;t===o.target||t.contains(o.target)||a.includes(t)||n.value(o,t)},document.body.addEventListener("click",t.clickOutsideEvent)},unmounted(t){document.body.removeEventListener("click",t.clickOutsideEvent)}},g1=["aria-expanded","tabindex"],y1={class:"vti__selection"},b1={key:1,class:"vti__country-code"},v1={class:"vti__dropdown-arrow"},_1={key:0,class:"vti__search_box_container"},$1=["placeholder"],w1=["onClick","onMousemove","aria-selected"],k1={key:1},C1=["type","autocomplete","autofocus","disabled","id","maxlength","name","placeholder","readonly","required","tabindex","value","aria-describedby"],O1=i.defineComponent({name:"VueTelInput",directives:{clickOutside:m1},__name:"vue-tel-input",props:i.mergeModels({allCountries:{type:Array,default:()=>tt("allCountries")},autoFormat:{type:Boolean,default:()=>tt("autoFormat")},customValidate:{type:[Boolean,RegExp],default:()=>tt("customValidate")},defaultCountry:{type:[String,Number],default:()=>tt("defaultCountry")},disabled:{type:Boolean,default:()=>tt("disabled")},autoDefaultCountry:{type:Boolean,default:()=>tt("autoDefaultCountry")},dropdownOptions:{type:Object,default:()=>tt("dropdownOptions")},ignoredCountries:{type:Array,default:()=>tt("ignoredCountries")},inputOptions:{type:Object,default:()=>tt("inputOptions")},invalidMsg:{type:String,default:()=>tt("invalidMsg")},mode:{type:String,default:()=>tt("mode")},onlyCountries:{type:Array,default:()=>tt("onlyCountries")},preferredCountries:{type:Array,default:()=>tt("preferredCountries")},validCharactersOnly:{type:Boolean,default:()=>tt("validCharactersOnly")},styleClasses:{type:[String,Array,Object],default:()=>tt("styleClasses")}},{modelValue:{type:String},modelModifiers:{}}),emits:i.mergeModels(["blur","close","country-changed","enter","focus","on-input","open","space","validate"],["update:modelValue"]),setup(t,{expose:n,emit:e}){const o=i.shallowRef(),a=i.shallowRef(),r=i.shallowRef(),l=e,s=t,u=i.useModel(t,"modelValue");i.watch(u,(A,I)=>{S()?c.phone=A??"":i.nextTick(()=>{c.phone=I??"",B()})});const c=i.reactive({phone:"",activeCountryCode:void 0,open:!1,finishMounted:!1,selectedIndex:null,typeToFindInput:"",typeToFindTimer:void 0,dropdownOpenDirection:"below",parsedPlaceholder:s.inputOptions.placeholder,searchQuery:""});i.watch(()=>c.open,A=>{A?(D(),l("open")):l("close")});const p=i.computed(()=>s.onlyCountries.length?s.allCountries.filter(({iso2:A})=>s.onlyCountries.some(I=>Tn(I)===A)):s.ignoredCountries.length?s.allCountries.filter(({iso2:A})=>!s.ignoredCountries.includes(Tn(A))&&!s.ignoredCountries.includes(xn(A))):s.allCountries),f=i.computed(()=>g(c.activeCountryCode));i.watch(f,(A,I)=>{if(!A&&I!=null&&I.iso2){c.activeCountryCode=I.iso2;return}A!=null&&A.iso2&&l("country-changed",A)});const d=i.computed(()=>{var A;const I=xn(s.mode);return I==="auto"?(A=c.phone)!=null&&A.startsWith("+")?"international":"national":["national","international","e.164","rfc3966","idd"].includes(I)?I:(console.error('Invalid value of prop "mode"'),"international")}),h=i.computed(()=>{const A=[...y(s.preferredCountries).map(U=>({...U,preferred:!0})),...p.value];if(!s.dropdownOptions.showSearchBox)return A;const I=c.searchQuery.toLowerCase().replace(/[~`!@#$%^&*()+={}\[\];:\'\"<>.,\/\\\?-_]/g,"");return A.filter(U=>new RegExp(I,"i").test(U.name)||new RegExp(I,"i").test(U.iso2)||new RegExp(I,"i").test(U.dialCode))}),v=i.computed(()=>{var A;const I=c.phone.startsWith("+")?ui(c.phone):ui(c.phone,c.activeCountryCode),U={country:I==null?void 0:I.country,countryCode:I==null?void 0:I.country,formatted:c.phone,valid:I==null?void 0:I.isValid(),possible:(A=I==null?void 0:I.isPossible)==null?void 0:A.call(I),nationalNumber:I==null?void 0:I.nationalNumber};return U.valid&&(U.formatted=I==null?void 0:I.format(Tn(d.value))),I!=null&&I.country&&(s.ignoredCountries.length||s.onlyCountries.length)&&!g(I.country)&&(U.valid=!1,U.possible=!1,I.country=null),I?{...U,...I}:U});i.watch(()=>v.value.countryCode,A=>{A&&(c.activeCountryCode=A)}),i.watch(()=>v.value.valid,()=>{l("validate",v.value)}),i.watch(()=>v.value.formatted,A=>{!s.autoFormat||s.customValidate||(E(A),i.nextTick(()=>{A&&!u.value&&(c.phone=A)}))}),i.watch(()=>s.inputOptions.placeholder,m),i.onMounted(()=>{u.value&&(c.phone=u.value.trim()),T(),_().then(()=>{var A;!c.phone&&(A=s.inputOptions)!=null&&A.showDialCode&&c.activeCountryCode&&(c.phone=`+${c.activeCountryCode}`),l("validate",v.value)}).catch(console.error).then(()=>{c.finishMounted=!0})});function m(){c.parsedPlaceholder=s.inputOptions.placeholder}function _(){return new Promise(A=>{var I;if(((I=c.phone)==null?void 0:I[0])==="+"){A();return}if(s.defaultCountry){if(typeof s.defaultCountry=="string"){k(s.defaultCountry),A();return}if(typeof s.defaultCountry=="number"){const F=w(s.defaultCountry);if(F){k(F.iso2),A();return}}}const U=s.preferredCountries[0]||p.value[0];s.autoDefaultCountry?lf().then(F=>{k(F||c.activeCountryCode)}).catch(F=>{console.warn(F),k(U)}).then(()=>{A()}):(k(U),A())})}function y(A=[]){return A.map(g).filter(Boolean)}function g(A=""){return p.value.find(I=>I.iso2===Tn(A))}function w(A){return p.value.find(I=>Number(I.dialCode)===A)}function b(A,I){const U=c.selectedIndex===A,F=A===s.preferredCountries.length-1,L=s.preferredCountries.some(z=>Tn(z)===I);return{highlighted:U,"last-preferred":F,preferred:L}}function k(A){var I,U,F;let L=A;if(typeof L=="string"&&(L=g(L)),!!L){if(((I=c.phone)==null?void 0:I[0])==="+"&&L.iso2&&v.value.nationalNumber){c.activeCountryCode=L.iso2,c.phone=((U=ui(v.value.nationalNumber,L.iso2))==null?void 0:U.formatInternational())??"";return}if((F=s.inputOptions)!=null&&F.showDialCode&&L){c.phone=`+${L.dialCode}`,c.activeCountryCode=L.iso2;return}c.activeCountryCode=L.iso2,E(c.phone)}}function T(){const A=c.phone;if(s.validCharactersOnly){const I=c.phone.match(/[()\-+0-9\s]*/g);c.phone=I.join("")}if(s.customValidate&&s.customValidate instanceof RegExp){const I=c.phone.match(s.customValidate);c.phone=I.join("")}A!==c.phone&&E(c.phone)}function S(){return s.validCharactersOnly&&!/^[()\-+0-9\s]*$/.test(c.phone)?!1:s.customValidate?x():!0}function x(){return s.customValidate instanceof RegExp?s.customValidate.test(c.phone):!1}function B(){var A;(A=r.value)==null||A.setCustomValidity(v.value.valid?"":s.invalidMsg),E(c.phone)}function E(A){u.value=A,l("on-input",A,v.value,r.value)}function C(A){l("blur",A)}function O(A){sf(r.value,c.phone.length),l("focus",A)}function N(A){l("enter",A)}function R(A){l("space",A)}function q(){var A;(A=r.value)==null||A.focus()}function W(){var A;(A=r.value)==null||A.blur()}function Y(){s.disabled||s.dropdownOptions.disabled||(c.searchQuery="",c.open=!c.open)}function re(){c.open=!1}function K(A){if(A.keyCode===40){A.preventDefault(),c.open=!0,c.selectedIndex===null?c.selectedIndex=0:c.selectedIndex=Math.min(h.value.length-1,c.selectedIndex+1);const I=a.value.children[c.selectedIndex];I.focus(),I.offsetTop+I.clientHeight>a.value.scrollTop+a.value.clientHeight&&(a.value.scrollTop=I.offsetTop-a.value.clientHeight+I.clientHeight)}else if(A.keyCode===38){A.preventDefault(),c.open=!0,c.selectedIndex===null?c.selectedIndex=h.value.length-1:c.selectedIndex=Math.max(0,c.selectedIndex-1);const I=a.value.children[c.selectedIndex];I.focus(),I.offsetTop<a.value.scrollTop&&(a.value.scrollTop=I.offsetTop)}else if(A.keyCode===13)c.selectedIndex!==null&&k(h.value[c.selectedIndex]),c.open=!c.open;else if(c.open){c.typeToFindInput+=A.key,clearTimeout(c.typeToFindTimer),c.typeToFindTimer=setTimeout(()=>{c.typeToFindInput=""},700);const I=h.value.slice(s.preferredCountries.length).findIndex(U=>xn(U.name).startsWith(c.typeToFindInput));if(I>=0){c.selectedIndex=s.preferredCountries.length+I;const U=a.value.children[c.selectedIndex],F=U.offsetTop<a.value.scrollTop,L=U.offsetTop+U.clientHeight>a.value.scrollTop+a.value.clientHeight;(F||L)&&(a.value.scrollTop=U.offsetTop-a.value.clientHeight/2)}}}function V(){c.selectedIndex=h.value.map(A=>A.iso2).indexOf(c.activeCountryCode),c.open=!1}function D(){window.innerHeight-o.value.getBoundingClientRect().bottom>200?c.dropdownOpenDirection="below":c.dropdownOpenDirection="above"}return n({focus:q,blur:W}),(A,I)=>{const U=i.resolveDirective("click-outside");return i.openBlock(),i.createElementBlock("div",{ref_key:"refRoot",ref:o,class:i.normalizeClass(["vue-tel-input",t.styleClasses,{disabled:t.disabled}])},[i.withDirectives((i.openBlock(),i.createElementBlock("div",{"aria-label":"Country Code Selector","aria-haspopup":"listbox","aria-expanded":c.open,role:"button",class:i.normalizeClass(["vti__dropdown",{open:c.open,disabled:t.dropdownOptions.disabled}]),tabindex:t.dropdownOptions.tabindex,onKeydown:[K,i.withKeys(Y,["space"]),i.withKeys(V,["esc"]),i.withKeys(V,["tab"])],onClick:Y},[i.createElementVNode("span",y1,[t.dropdownOptions.showFlags?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["vti__flag",i.unref(xn)(c.activeCountryCode)])},null,2)):i.createCommentVNode("",!0),t.dropdownOptions.showDialCodeInSelection?(i.openBlock(),i.createElementBlock("span",b1," +"+i.toDisplayString(f.value&&f.value.dialCode),1)):i.createCommentVNode("",!0),i.renderSlot(A.$slots,"arrow-icon",{open:c.open},()=>[i.createElementVNode("span",v1,i.toDisplayString(c.open?"▲":"▼"),1)])]),c.open?(i.openBlock(),i.createElementBlock("ul",{key:0,ref_key:"refList",ref:a,class:i.normalizeClass(["vti__dropdown-list",c.dropdownOpenDirection]),role:"listbox"},[t.dropdownOptions.showSearchBox?(i.openBlock(),i.createElementBlock("div",_1,[i.renderSlot(A.$slots,"search-icon"),i.withDirectives(i.createElementVNode("input",{class:i.normalizeClass(["vti__input","vti__search_box"]),"aria-label":"Search by country name or country code",placeholder:t.dropdownOptions.searchBoxPlaceholder||(h.value.length?h.value[0].name:""),type:"text","onUpdate:modelValue":I[0]||(I[0]=F=>c.searchQuery=F),onClick:I[1]||(I[1]=i.withModifiers(()=>{},["stop"]))},null,8,$1),[[i.vModelText,c.searchQuery]])])):i.createCommentVNode("",!0),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(h.value,(F,L)=>(i.openBlock(),i.createElementBlock("li",{role:"option",class:i.normalizeClass(["vti__dropdown-item",b(L,F.iso2)]),key:F.iso2+(F.preferred?"-preferred":""),tabindex:"-1",onClick:z=>k(F),onMousemove:z=>c.selectedIndex=L,"aria-selected":c.activeCountryCode===F.iso2&&!F.preferred},[t.dropdownOptions.showFlags?(i.openBlock(),i.createElementBlock("span",{key:0,class:i.normalizeClass(["vti__flag",i.unref(xn)(F.iso2)])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("strong",null,i.toDisplayString(F.name),1),t.dropdownOptions.showDialCodeInList?(i.openBlock(),i.createElementBlock("span",k1," +"+i.toDisplayString(F.dialCode),1)):i.createCommentVNode("",!0)],42,w1))),128))],2)):i.createCommentVNode("",!0)],42,g1)),[[U,re]]),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":I[2]||(I[2]=F=>c.phone=F),ref_key:"refInput",ref:r,type:t.inputOptions.type,autocomplete:t.inputOptions.autocomplete,autofocus:t.inputOptions.autofocus,class:i.normalizeClass(["vti__input","vti__phone",t.inputOptions.styleClasses]),disabled:t.disabled,id:t.inputOptions.id,maxlength:t.inputOptions.maxlength,name:t.inputOptions.name,placeholder:c.parsedPlaceholder,readonly:t.inputOptions.readonly,required:t.inputOptions.required,tabindex:t.inputOptions.tabindex,value:u.value,"aria-describedby":t.inputOptions["aria-describedby"],onBlur:C,onFocus:O,onInput:B,onKeyup:[i.withKeys(N,["enter"]),i.withKeys(R,["space"])]},null,42,C1),[[i.vModelDynamic,c.phone]]),i.renderSlot(A.$slots,"icon-right")],2)}}}),Lp="",Rp="",E1={directives:{Outside:nr},props:{modelValue:{type:String},value:String,inputName:{type:String,default:"phone"},autoDefaultCountry:{type:Boolean,default:!0},ignoredCountries:{type:Array,default:()=>[]},error:{type:Boolean,default:!1},errorMessage:{type:String,default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","onReady"],components:{VueTelInput:O1,IbAlert:Ft,IbIcon:Le},data(){return{vueTel:null,dialCode:"",defaultCountry:"US",allowChange:!1}},mounted(){this.vueTel=this.$refs.vueTel,this.$emit("onReady")},computed:{phone:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{countryChanged(t){this.$globalEvents.$on("countrySelectValue",n=>{this.vueTel.choose(n)}),!this.phone||this.phone.length-1<this.dialCode.length?this.phone="+"+t.dialCode:this.dialCode&&(this.phone=this.phone.replace(this.dialCode,t.dialCode)),this.dialCode=t.dialCode},clickOutside(){this.vueTel.open&&this.vueTel.clickedOutside()}}};function S1(t,n,e,o,a,r){const l=i.resolveComponent("ib-alert"),s=i.resolveComponent("ib-icon"),u=i.resolveComponent("vue-tel-input"),c=i.resolveDirective("outside");return i.openBlock(),i.createElementBlock(i.Fragment,null,[e.errorMessage.length?(i.openBlock(),i.createBlock(l,{key:0,class:"ib-phone-error-message"},{default:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(e.errorMessage),1)]),_:1})):i.createCommentVNode("",!0),i.withDirectives((i.openBlock(),i.createBlock(u,i.mergeProps({modelValue:r.phone,"onUpdate:modelValue":n[0]||(n[0]=p=>r.phone=p)},t.$attrs,{onCountryChanged:r.countryChanged,"input-options":{name:e.inputName,id:e.inputName,autocomplete:"off"},"auto-default-country":e.autoDefaultCountry,"dropdown-options":{showSearchBox:!0,showFlags:!0,tabindex:0},defaultCountry:a.defaultCountry,ignoredCountries:e.ignoredCountries,class:{error:e.error||e.errorMessage.length,disabled:e.disabled},disabled:e.disabled,"style-classes":"ib-phone-input",ref:"vueTel"}),{"arrow-icon":i.withCtx(()=>[i.createVNode(s,{name:"chevron-down-outline"})]),_:1},16,["modelValue","onCountryChanged","input-options","auto-default-country","defaultCountry","ignoredCountries","class","disabled"])),[[c,r.clickOutside]])],64)}const x1=_e(E1,[["render",S1]]);var $a={exports:{}};/*!
90
92
  * Quill Editor v1.3.7
91
93
  * https://quilljs.com/
92
94
  * Copyright (c) 2014, Jason Chen