mediacube-ui-v2 0.0.101 → 0.0.102
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/mediacube-ui-v2.js +1055 -1055
- package/dist/mediacube-ui-v2.umd.cjs +1 -1
- package/package.json +1 -1
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/var ji;(function(a){a.pop="pop",a.push="push"})(ji||(ji={}));var Ui;(function(a){a.back="back",a.forward="forward",a.unknown=""})(Ui||(Ui={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var qi;(function(a){a[a.aborted=4]="aborted",a[a.cancelled=8]="cancelled",a[a.duplicated=16]="duplicated"})(qi||(qi={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),Symbol(process.env.NODE_ENV!=="production"?"router":"");const Rg=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function zg(a){return e.inject(Rg)}const Ig={class:"mc-side-bar-center"},Yg={key:1,class:"mc-side-bar-center__content"},Wi=e.defineComponent({__name:"McSideBarCenter",props:{title:{type:String,default:""},menuMain:{type:Array,default:()=>[]},counts:{type:Object,default:()=>({})},chatraConfig:{type:Object,default:()=>({})},compact:{type:Boolean,default:!1}},emits:["open-side-bar","handlerChatraClick"],setup(a,{emit:t}){const n=zg(),r=Da(),o=e.inject("provideData",{}),l=t,i=a,c=e.ref(!0),s=e.ref([]),p=e.computed(()=>o.currentThemeConfig||xa[d.SidebarTheme.Black]);e.onBeforeMount(()=>{f()}),e.watch(()=>i.menuMain,()=>{f()},{deep:!0}),e.watch(()=>i.compact,()=>{f()}),e.watch(()=>n,(h,g)=>{if(c.value=!0,g.path!==h.path){const y=s.value.find(B=>{var T;return B.to===h.path||((T=B.menu)==null?void 0:T.find(C=>C.to===h.path))});y!=null&&y.menu&&!i.compact&&(y.open=!0)}e.nextTick(()=>{s.value.forEach(y=>{const B=y.to===h.path,T=y.menu&&y.menu.some(C=>{var k,V;return((k=C.to)==null?void 0:k.match(h==null?void 0:h.path))||((V=h.path)==null?void 0:V.match(C.to))});B||T||(y.open=!1)}),c.value=!1})});const u=h=>({open:h.open,active:h.active(),"with-submenu":h.menu&&h.menu.length,[`mc-side-bar--${p.value.mode||"black"}__button`]:!0,"purple-hover":p.value.mainMenuLinks.variable==="black-flat",[`mc-button--variation-${p.value.mainMenuLinks.variable}`]:!!p.value.mainMenuLinks.variable,"mc-side-bar--black__button mc-button nuxt-link-active":h.menu&&h.menu.length&&!h.open&&h.active()}),m=()=>{i.compact&&l("open-side-bar")},f=()=>{c.value=!0,s.value=i.menuMain.map(h=>{const g=()=>{var y;return h.menu&&h.menu.some(B=>{var T;return(T=n==null?void 0:n.path)==null?void 0:T.match(B.to)})||!!((y=n==null?void 0:n.path)!=null&&y.match(h.to))};return{id:r.timestamp(5),...h,active:g,indicator:()=>h.menu&&h.menu.some(y=>{var B;return!!((B=i.counts)!=null&&B[y.count_key])}),open:!i.compact&&g()}}),c.value=!1};return(h,g)=>(e.openBlock(),e.createElementBlock("div",Ig,[a.title?(e.openBlock(),e.createBlock(e.unref(ke),{key:0,class:"mc-side-bar-center__title",color:a.compact?"transparent":"dark-gray"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.title),1)]),_:1},8,["color"])):e.createCommentVNode("",!0),s.value&&s.value.length?e.withDirectives((e.openBlock(),e.createElementBlock("div",Yg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,y=>(e.openBlock(),e.createElementBlock("div",{key:y.id,class:e.normalizeClass([{"item-active":y.active()},"mc-side-bar-center__content-item item"])},[e.createElementVNode("div",{class:e.normalizeClass(["item__head",u(y)]),onClick:m},[e.createVNode(e.unref(Qa),{info:y.menu&&y.menu.length?null:y.info||i.counts[y.count_key]||null,href:y.href,to:y.to,icon:y.icon,"icon-color":y.iconColor,title:y.name,compact:a.compact,"is-active":y.active(),"with-submenu":y.menu&&!!y.menu.length,"with-indicator":y.indicator()&&!y.open,"with-tooltip":"",class:"item__head-button--no-hover"},null,8,["info","href","to","icon","icon-color","title","compact","is-active","with-submenu","with-indicator"]),y.menu&&y.menu.length&&!a.compact?(e.openBlock(),e.createBlock(e.unref(Ee),{key:0,variation:y.active()?"white-link":"gray-link",size:e.unref(d.ButtonSize).MCompact,class:e.normalizeClass(["item__head-arrow",{rotate:y.active()?y.active()&&y.open:y.open}]),onClick:B=>y.open=!y.open},{"icon-prepend":e.withCtx(()=>[e.createVNode(e.unref(Be),{name:"arrow_forward"})]),_:2},1032,["variation","size","class","onClick"])):e.createCommentVNode("",!0)],2),y.menu&&y.menu.length?(e.openBlock(),e.createBlock(ro,{key:0,class:"item__submenu",active:y.active()?y.active()&&y.open:y.open},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.menu,(B,T)=>(e.openBlock(),e.createBlock(e.unref(Qa),{key:T,info:a.counts[B.count_key],href:B.href,to:B.to,icon:B.icon,"icon-color":B.iconColor,title:B.name,compact:a.compact,"with-tooltip":""},null,8,["info","href","to","icon","icon-color","title","compact"]))),128))]),_:2},1032,["active"])):e.createCommentVNode("",!0)],2))),128))],512)),[[e.vShow,!c.value]]):e.createCommentVNode("",!0),a.chatraConfig.title?(e.openBlock(),e.createBlock(e.unref(no),{key:2,color:"dark-gray","indent-top":"150","indent-bottom":"150","indent-left":a.compact?"50":"100","indent-right":a.compact?"50":"100"},null,8,["indent-left","indent-right"])):e.createCommentVNode("",!0),a.chatraConfig.title?(e.openBlock(),e.createBlock(e.unref(Qa),{key:3,icon:"chat_messages",title:a.chatraConfig.title,compact:a.compact,"with-tooltip":"",onClick:g[0]||(g[0]=y=>l("handlerChatraClick"))},null,8,["title","compact"])):e.createCommentVNode("",!0)]))}}),Hg=["src","alt"],jg=["src","alt"],Ug=["src"],Ki=e.defineComponent({__name:"McSideBarTop",props:{menuApps:{type:Array,default:()=>[]},logoTitle:{type:String,default:"Dashboard"},logoTitleVariation:{type:String,default:d.TitleVariations.Subtitle},logoSrc:{type:String,default:""},logoIcon:{type:String,default:""},dropdownPosition:{type:String,default:d.DropdownPositions.Left},compact:{type:Boolean,default:!1}},setup(a){const t=ct(),n=e.inject("provideData",{}),r=a,o=e.ref(!1),l=e.computed(()=>n.currentThemeConfig||xa[d.SidebarTheme.Black]),i=e.computed(()=>t.isEmpty(r.menuApps)?null:r.menuApps.filter(c=>!Object.prototype.hasOwnProperty.call(c,"isVisible")||c.isVisible));return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mc-side-bar-top",`mc-side-bar-top--theme-${l.value.dropdownActivator}`])},[i.value?(e.openBlock(),e.createBlock(e.unref(Tn),{key:1,modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=p=>o.value=p),position:a.dropdownPosition,items:i.value},{activator:e.withCtx(()=>[e.createVNode(e.unref(Kt),null,{left:e.withCtx(()=>[a.logoSrc?(e.openBlock(),e.createElementBlock("img",{key:0,class:"mc-side-bar-top__img",src:a.logoSrc,width:"24",height:"24",alt:a.logoTitle},null,8,jg)):a.logoIcon?(e.openBlock(),e.createBlock(e.unref(Be),{key:1,class:"rotate",name:a.logoIcon},null,8,["name"])):e.createCommentVNode("",!0)]),top:e.withCtx(()=>[e.createVNode(e.unref(Ee),{variation:`${l.value.dropdownActivator}-link`,size:a.compact?e.unref(d.ButtonSize).LCompact:e.unref(d.ButtonSize).L,class:"mc-side-bar-top__activator-btn"},{"icon-append":e.withCtx(()=>[e.createVNode(e.unref(Be),{class:"rotate",name:"arrow_drop_down",color:"gray"})]),default:e.withCtx(()=>[a.compact?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ke),{key:0,weight:e.unref(d.Weights).SemiBold,variation:a.logoTitleVariation},{"icon-append":e.withCtx(()=>[e.renderSlot(c.$slots,"title-append")]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.logoTitle)+" ",1)]),_:3},8,["weight","variation"]))]),_:3},8,["variation","size"])]),_:3})]),item:e.withCtx(({item:p})=>[e.createVNode(e.unref(Ee),{"full-width":"","text-align":e.unref(d.HorizontalAlignment).Left,variation:"black-flat",href:p.href,to:p.to,target:p.target,"is-active":p.isActive,exact:p.exact},{"icon-prepend":e.withCtx(()=>[p.icon?(e.openBlock(),e.createBlock(e.unref(Be),{key:0,name:p.icon},null,8,["name"])):p.image?(e.openBlock(),e.createElementBlock("img",{key:1,src:p.image,width:"24",height:"24",alt:"service image"},null,8,Ug)):e.createCommentVNode("",!0)]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(p.name),1)]),_:2},1032,["text-align","href","to","target","is-active","exact"])]),_:3},8,["modelValue","position","items"])):(e.openBlock(),e.createBlock(e.unref(Kt),{key:0},e.createSlots({top:e.withCtx(()=>[a.compact?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(ke),{key:0,weight:e.unref(d.Weights).SemiBold,variation:a.logoTitleVariation},{"icon-append":e.withCtx(()=>[e.renderSlot(c.$slots,"title-append")]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.logoTitle)+" ",1)]),_:3},8,["weight","variation"]))]),_:2},[a.logoSrc?{name:"left",fn:e.withCtx(()=>[e.createElementVNode("img",{class:"mc-side-bar-top__img",src:a.logoSrc,width:"24",height:"24",alt:a.logoTitle},null,8,Hg)]),key:"0"}:void 0]),1024))],2))}}),qg=["id","aria-hidden","href","to"],Wg=e.defineComponent({__name:"McTab",props:{id:{type:String,default:""},name:{type:String,required:!0,default:""},prefix:{type:String,default:""},suffix:{type:String,default:""},appendCount:{type:Number,default:null},appendCountColor:{type:String},isDisabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!0},iconPrepend:{type:String,default:""},iconAppend:{type:String,default:""},iconPrependColor:{type:String,default:""},iconAppendColor:{type:String,default:""},to:{type:Object,default:null},href:{type:String,default:""}},setup(a){const t=e.inject("selfRegisterTabMethod",()=>{}),n=e.useAttrs(),r=a,o=Ve("tab"),l=e.ref(!1),i=e.ref(!0),c=e.computed(()=>r.appendCountColor||o.component.count),s=e.computed(()=>r.id?r.id:r.name.toLowerCase().replace(/ /g,"-")),p=e.computed(()=>r.isDisabled?"#":`#${s.value}`),u=e.computed(()=>!!r.appendCount||r.appendCount===0),m=e.computed(()=>`--mc-tab-append-count-color: ${o.colors[c.value]}`),f=e.computed(()=>[r.prefix,r.name,r.suffix].filter(Boolean).join("")),h=e.computed(()=>r.visible?f.value:"");e.onMounted(()=>{if(t){const B={isActive:l.value,isVisible:i.value,computedId:s.value,hash:p.value,hasAppendCount:u.value,appendCountStyles:m.value,header:h.value,id:r.id,name:r.name,to:r.to,href:r.href,iconAppendColor:r.iconAppendColor,iconPrependColor:r.iconPrependColor,iconAppend:r.iconAppend,iconPrepend:r.iconPrepend,visible:r.visible,isDisabled:r.isDisabled,appendCountColor:c.value,appendCount:r.appendCount,suffix:r.suffix,prefix:r.prefix,showTab:g,hideTab:y,onClick:n.onClick,...n};t(B)}});const g=()=>{l.value=!0},y=()=>{l.value=!1};return(B,T)=>e.withDirectives((e.openBlock(),e.createElementBlock("section",{id:a.id,"aria-hidden":!l.value,class:"tabs-component-panel",role:"tabpanel",href:a.href,to:a.to},[a.visible?e.renderSlot(B.$slots,"default",{key:0}):e.createCommentVNode("",!0)],8,qg)),[[e.vShow,l.value]])}}),Gi=e.defineComponent({__name:"McWrapScroll",props:{wrap:{type:Boolean,default:!1},gutterY:{type:Number,default:0},gutterX:{type:Number,default:0},justify:{type:String,default:d.ColumnJustifyAlignment.Left},scrollable:{type:Boolean,default:!0},gutterBottom:{type:String,default:null},hasScroll:{type:Boolean,default:!1},withBlur:{type:Boolean,default:!1},moreSpace:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},scrollSpeed:{type:Number,default:1},tagName:{type:String,default:"div"}},emits:["content-scrolled"],setup(a,{emit:t}){const n=t,r=a,o=e.reactive({scroll_pos:0,start_client_pos:0,distance:0,is_drag:!1,mouse_is_down:!1}),l=e.ref(!1),i=e.ref(!1),c=e.ref(null),s=e.ref(null),p=e.computed(()=>({wrap:r.wrap,align:d.ColumnAlignment.Top,gutterY:r.gutterY,gutterX:r.gutterX,justify:r.justify})),u=e.computed(()=>({"mc-wrap-scroll":!0,"mc-wrap-scroll--scrollable":r.scrollable,"mc-wrap-scroll--no-scrollbar":!r.hasScroll,"mc-wrap-scroll--more-space":r.moreSpace})),m=e.computed(()=>({"--mc-wrap-scroll-bottom":st[r.gutterBottom]})),f=e.computed(()=>({"mc-wrap-scroll__wrapper--left-blur":r.withBlur&&l.value,"mc-wrap-scroll__wrapper--right-blur":r.withBlur&&i.value,"mc-wrap-scroll__wrapper--more-space":r.moreSpace}));e.onMounted(()=>{window.addEventListener("mousemove",T),window.addEventListener("mouseup",C),h(),setTimeout(()=>g(),10)}),e.onBeforeUnmount(()=>{window.removeEventListener("mousemove",T),window.removeEventListener("mouseup",C),s.value&&s.value.removeEventListener("scroll",g),c.value&&c.value.disconnect()});const h=()=>{s.value&&(s.value.addEventListener("scroll",g),r.withBlur&&y())},g=()=>{var k;if(n("content-scrolled"),!!r.withBlur&&s.value)try{const V=Math.ceil((k=s.value.getBoundingClientRect())==null?void 0:k.width),x=Math.ceil(s.value.scrollWidth),w=Math.ceil(s.value.scrollLeft);l.value=r.rtl?x>V&&x-10>Math.abs(w)+V:!!w,i.value=r.rtl?Math.abs(w)>1:x>V&&x>Math.abs(w)+V}catch{l.value=!1,i.value=!1}},y=()=>{if(s.value)try{c.value=new MutationObserver(g);const k={attributes:!0,childList:!0,subtree:!0};c.value.observe(s.value,k)}catch{console.error("Error when try to create observer in McWrapScroll")}else console.error("Error when try to create observer in McWrapScroll")},B=k=>{if(s.value){const V=o;if(V.start_client_pos=k.clientX,V.mouse_is_down=!0,V.scroll_pos=s.value.scrollLeft,window.getSelection){let x=window.getSelection();x==null||x.removeAllRanges()}}},T=k=>{if(s.value){const V=o;if(!V.mouse_is_down)return;V.distance=k.clientX-V.start_client_pos,Math.abs(V.distance)>2&&!V.is_drag&&(V.is_drag=!0),V.is_drag&&s.value.scrollTo({left:V.scroll_pos-V.distance*r.scrollSpeed})}},C=()=>{o.is_drag&&(o.is_drag=!1),o.mouse_is_down=!1};return(k,V)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.tagName),{class:e.normalizeClass([f.value,"mc-wrap-scroll__wrapper"])},{default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"scrollContainer",ref:s,class:e.normalizeClass(u.value),style:e.normalizeStyle(m.value),onMousedown:B},[e.createVNode(e.unref(Xa),e.mergeProps(p.value,{style:{"pointer-events":o.is_drag?"none":"auto"},class:"mc-wrap-scroll__row"}),{default:e.withCtx(()=>[e.renderSlot(k.$slots,"default")]),_:3},16,["style"])],38)]),_:3},8,["class"]))}}),Kg={class:"tabs-component"},Gg=["aria-controls","aria-selected","href","onClick"],Xg={class:"tabs-component-tab__tab-name"},Qg={class:"tabs-component-panels"},Zg=e.defineComponent({__name:"McTabs",props:{modelValue:{type:String,default:null},tabVariation:{type:String,default:d.TabVariations.Captions},color:{type:String},accentColor:{type:String},uppercase:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},sticky:{type:Boolean,default:!1}},emits:["update:modelValue","tab-changed","clicked"],setup(a,{emit:t}){const n=t,r=e.inject("dsOptions",{}),o=a,l=Ve("tabs"),i=e.ref([]),c=e.computed(()=>o.color||l.component.color),s=e.computed(()=>o.accentColor||l.component.accentColor),p=e.computed(()=>({"mc-tabs":!0,[`mc-tabs--tab-variation-${o.tabVariation}`]:!!o.tabVariation,"mc-tabs--uppercase":!!o.uppercase,"mc-tabs--sticky":!!o.sticky})),u=e.computed(()=>({"--mc-tabs-color":l.colors[c.value],"--mc-tabs-accent-color":l.colors[s.value]})),m=e.computed({get(){return o.modelValue},set(k){n("update:modelValue",k)}}),f=e.computed(()=>i.value.filter(k=>k.visible&&!k.isDisabled));e.onMounted(()=>{y()}),e.onUpdated(()=>{setTimeout(()=>{T()},10)});const h=k=>{i.value.forEach(V=>{V.isActive=V.computedId===k,V.isActive?V.showTab():V.hideTab()})},g=k=>{i.value.push(k)},y=()=>{let[k]=f.value;const V=i.value.find(x=>x.computedId===o.modelValue);V&&!V.isDisabled&&(k=V),k&&C(k)},B=k=>{n("tab-changed",{tab:k})},T=()=>{var x;if(o.loading)return;const k=(x=i.value)==null?void 0:x.find(w=>w.isActive);if(!(k!=null&&k.isDisabled))return;const[V]=f.value;C(V)},C=(k,V)=>{if(V==null||V.preventDefault(),!k.isDisabled){if(k.onClick&&typeof k.onClick=="function")return k.onClick(k);if(k.href){window.open(k.href,"_blank");return}if(k.to&&r.router){r.router.push(k.to);return}B(k),h(k.computedId),m.value=k.computedId}};return e.watch(()=>o.loading,(k,V)=>{!k&&V&&e.nextTick(()=>{y()})}),e.provide("selfRegisterTabMethod",g),(k,V)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(p.value),style:e.normalizeStyle(u.value)},[e.createElementVNode("div",Kg,[e.createVNode(Gi,{"tag-name":"ul",role:"tablist",scrollable:"",class:"tabs-component-tabs"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(x,w)=>e.withDirectives((e.openBlock(),e.createElementBlock("li",{key:w,class:e.normalizeClass([{"is-active":x.isActive,"is-disabled":x.isDisabled},"tabs-component-tab"]),role:"presentation"},[e.createElementVNode("a",{"aria-controls":x.hash,"aria-selected":x.isActive,href:x.href||x.hash||"javascript:void(0)",class:"tabs-component-tab-a",role:"tab",onClick:v=>C(x,v)},[e.createElementVNode("span",Xg,[x.iconPrepend?(e.openBlock(),e.createBlock(e.unref(Be),{key:0,name:x.iconPrepend,color:x.iconPrependColor},null,8,["name","color"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(x.header),1),x.iconAppend?(e.openBlock(),e.createBlock(e.unref(Be),{key:1,name:x.iconAppend,color:x.iconAppendColor},null,8,["name","color"])):e.createCommentVNode("",!0)])],8,Gg)],2)),[[e.vShow,x.isVisible]])),128))]),_:1}),e.createElementVNode("div",Qg,[e.renderSlot(k.$slots,"default")])])],6))}}),Xi=e.defineComponent({__name:"McDrawer",props:{modelValue:{type:Boolean,default:!1},duration:{type:Number,default:300},position:{type:String,default:d.DrawerPositions.Right},closeVisible:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},iconClose:{type:String,default:"close"},width:{type:Number,default:300}},emits:["toggle","open","close","update:modelValue"],setup(a,{emit:t}){const n=t,r=a,o=e.ref(0),l=e.ref(100),i=e.computed(()=>r.position===d.DrawerPositions.Right),c=e.computed(()=>i.value?100:-100),s=e.computed(()=>({[i.value?d.DrawerPositions.Right:d.DrawerPositions.Left]:0})),p=e.ref(o.value),u=e.ref(c.value),m=Wr(u,{duration:r.duration,transition:Ur.easeOutQuart}),f=Wr(p,{duration:r.duration,transition:Ur.easeOutQuart}),h=e.computed(()=>({visibility:f.value?"visible":"hidden",zIndex:f.value?1:-1})),g=e.computed(()=>({transform:`translateX(${m.value}%)`,width:`${r.width}px`,[r.position]:0,...s.value})),y=e.computed(()=>({"mc-drawer__overlay":!0,"mc-drawer__overlay--hidden":!r.showOverlay})),B=()=>{p.value=l.value,u.value=p.value===0?100:0,r.modelValue||(n("update:modelValue",!0),n("open"))},T=()=>{p.value=o.value,u.value=p.value===0?i.value?100:-100:0,r.modelValue&&(n("update:modelValue",!1),n("close"))},C=()=>{r.showOverlay&&T()};return e.watch(()=>r.modelValue,k=>{k?B():T()},{immediate:!0}),(k,V)=>(e.openBlock(),e.createElementBlock("div",{class:"mc-drawer__wrapper",style:e.normalizeStyle(h.value)},[e.createElementVNode("div",{class:e.normalizeClass(y.value),style:e.normalizeStyle(h.value),onClick:e.withModifiers(C,["stop"])},null,6),e.createElementVNode("div",{class:"mc-drawer",style:e.normalizeStyle(g.value),onClick:V[0]||(V[0]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(k.$slots,"default"),a.closeVisible?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"mc-drawer__btn-close",onClick:e.withModifiers(T,["prevent"])},[e.createVNode(e.unref(Be),{class:"mc-drawer__icon-close",name:a.iconClose},null,8,["name"]),e.createVNode(e.unref(Be),{class:"mc-drawer__icon-close--small",name:a.iconClose,size:"200"},null,8,["name"])])):e.createCommentVNode("",!0)],4)],4))}}),Jg={class:"mc-drawer-content-template"},ey={key:0,class:"mc-drawer-content-template__header"},ty={class:"mc-drawer-content-template__body"},ay={class:"mc-drawer-content-template__body-inner"},ny={key:1,class:"mc-drawer-content-template__footer"},ry=e.defineComponent({__name:"McDrawerContentTemplate",props:{title:{type:String,default:""},titleEllipsis:{type:Boolean,default:!1}},setup(a){const t=a;return(n,r)=>(e.openBlock(),e.createElementBlock("div",Jg,[n.$slots.title||t.title?(e.openBlock(),e.createElementBlock("div",ey,[e.renderSlot(n.$slots,"title",{},()=>[e.createVNode(e.unref(ke),{variation:e.unref(d.TitleVariations).Subtitle,ellipsis:t.titleEllipsis,weight:e.unref(d.Weights).SemiBold},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1},8,["variation","ellipsis","weight"])])])):e.createCommentVNode("",!0),e.createElementVNode("div",ty,[r[0]||(r[0]=e.createElementVNode("div",{class:"mc-drawer-content-template__tint"},null,-1)),e.createElementVNode("div",ay,[e.renderSlot(n.$slots,"default")])]),n.$slots.footer?(e.openBlock(),e.createElementBlock("div",ny,[e.renderSlot(n.$slots,"footer")])):e.createCommentVNode("",!0)]))}}),oy=["onClose"],Qi=e.defineComponent({__name:"McModalContainer",props:{modalServiceState:{type:Object,default:()=>({})},reactiveProps:{type:Object,default:()=>({})}},setup(a){const t=a,n=e.computed(()=>({zIndex:t.reactiveProps.modals.length?99999:-1,visibility:t.reactiveProps.modals.length?"visible":"hidden"})),r=o=>{o.close(),setTimeout(()=>{t.reactiveProps.modals.every(l=>!l.modelValue)&&t.modalServiceState.closeServiceState()},300)};return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"mc-modal-container",style:e.normalizeStyle(n.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.reactiveProps.modals,i=>(e.openBlock(),e.createElementBlock("div",{key:i.id,onClose:()=>r(i)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({modelValue:i.modelValue,"onUpdate:modelValue":c=>i.modelValue=c,ref_for:!0},i.componentProps,{onClosed:()=>r(i)}),null,16,["modelValue","onUpdate:modelValue","onClosed"]))],40,oy))),128))],4))}}),ly={key:0,class:"mc-modal__wrapper"},iy={key:0,class:"mc-modal__header"},sy={class:"mc-modal__title"},cy={class:"mc-modal__control",id:"mcModalFooter"},dy=e.defineComponent({__name:"McModal",props:{modelValue:{type:Boolean,default:!1},name:{type:String},maxWidth:{type:Number,default:510},minWidth:{type:Number,default:480},duration:{type:Number,default:200},closeVisible:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},clickBackdropToClose:{type:Boolean,default:!0},arrowVisible:{type:Boolean,default:!1},secondaryModal:{type:Boolean,default:!1},scrollableContent:{type:Boolean,default:!0},separators:{type:Boolean,default:!0},headerAlign:{type:String,default:"center"},topPadding:{type:Boolean,default:!1},variation:{type:String,default:"default"}},emits:["before-open","before-close","opened","closed","back","update:modelValue"],setup(a,{emit:t}){const n=t,r=a,o=e.ref(0),l=Wr(o,{duration:r.duration||300,transition:Ur.easeOutQuart}),i=e.ref(null),c=e.ref(null),s=e.reactive({scrolled_top:!1,scrolled_bottom:!1,resize_observer:{},small_indents:!1,can_shorten_modal:!1,modal_params:{},indent:{regular:"400",small:"150"},footer:{button:{regular:"600",small:"500"}},header:{title:{line_height:{regular:"300",small:"250"}}}}),p=e.computed(()=>({"mc-modal--arrow-visible":r.arrowVisible,"mc-modal--scrolled-top":s.scrolled_top,"mc-modal--scrolled-bottom":s.scrolled_bottom,"mc-modal--scrollable":r.scrollableContent,"mc-modal--top-padding":r.topPadding,"mc-modal--small-indents":s.small_indents,[`mc-modal--variation-${r.variation}`]:!!r.variation,[`mc-modal--header-align-${r.headerAlign}`]:(r.closeVisible||r.arrowVisible)&&!!r.headerAlign})),u=e.computed(()=>({"--mc-modal-padding":st[s.indent.regular],"--mc-modal-padding-small":st[s.indent.small],"--mc-modal-header-line-height":an[s.header.title.line_height.regular],"--mc-modal-header-line-height-small":an[s.header.title.line_height.small],"--mc-modal-button-height":Vt[s.footer.button.regular],"--mc-modal-button-height-small":Vt[s.footer.button.small],"--mc-modal-max-width":`${r.maxWidth+24}px`,"--mc-modal-min-width":`${r.minWidth-24}px`,"--mc-modal-state-number":l.value})),m=(x=!0)=>{x||(s.scrolled_top=!1,s.scrolled_bottom=!1,s.small_indents=!1),setTimeout(()=>{if(i.value){const{scrollTop:w,scrollHeight:v,clientHeight:M}=i.value,L=2;s.scrolled_top=w>L,s.small_indents=s.scrolled_top&&s.can_shorten_modal,s.scrolled_bottom=w+M<v-L}},x?0:300)},f=()=>{n("before-close"),i.value&&(s.resize_observer&&s.resize_observer.unobserve(i.value),i.value.removeEventListener("scroll",()=>m()))},h=()=>{r.separators&&(y(),i.value&&(i.value.addEventListener("scroll",()=>m(),{passive:!0}),s.resize_observer=new ResizeObserver(()=>T()),s.resize_observer.observe(i.value)),m()),n("opened")},g=x=>{n("back",x)},y=()=>{try{c.value&&Object.keys(u.value).forEach(x=>{var v;const w=parseInt((v=getComputedStyle(c.value))==null?void 0:v.getPropertyValue(x));w&&(s.modal_params[x]=w)})}catch(x){console.error(x)}},B=()=>{var L,E,F,G,W,D,$,A,Y;const x=(+((L=s.modal_params)==null?void 0:L["--mc-modal-padding"])-+((E=s.modal_params)==null?void 0:E["--mc-modal-padding-small"]))*3+ +((F=s.modal_params)==null?void 0:F["--mc-modal-padding-small"]),w=+((G=s.modal_params)==null?void 0:G["--mc-modal-header-line-height"])-+((W=s.modal_params)==null?void 0:W["--mc-modal-header-line-height-small"]),v=+((D=s.modal_params)==null?void 0:D["--mc-modal-button-height"])-+(($=s.modal_params)==null?void 0:$["--mc-modal-button-height-small"]),M=x+w+v;!s.small_indents&&i.value&&(s.can_shorten_modal=((A=i.value)==null?void 0:A.scrollHeight)-((Y=i.value)==null?void 0:Y.clientHeight)>M)},T=()=>{B(),m()},C=()=>{o.value=1,n("before-open"),n("update:modelValue",!0),e.nextTick(()=>h())},k=()=>{o.value=0,setTimeout(()=>{f(),n("update:modelValue",!1),n("closed")},r.duration||300)},V=()=>{r.clickBackdropToClose&&k()};return e.watch(()=>r.modelValue,x=>{x?C():k()},{immediate:!0}),(x,w)=>r.modelValue?(e.openBlock(),e.createElementBlock("div",ly,[r.showOverlay?(e.openBlock(),e.createElementBlock("div",{key:0,class:"mc-modal__overlay",onClick:e.withModifiers(V,["stop"])})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["mc-modal",p.value]),style:e.normalizeStyle(u.value)},[e.createElementVNode("div",{ref_key:"modalInner",ref:c,class:"mc-modal__inner"},[x.$slots.title?(e.openBlock(),e.createElementBlock("div",iy,[e.createElementVNode("div",sy,[e.renderSlot(x.$slots,"title")])])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"mcModalBody",ref:i,class:"mc-modal__body"},[e.renderSlot(x.$slots,"default")],512),e.createElementVNode("div",cy,[e.renderSlot(x.$slots,"footer")])],512),a.arrowVisible?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"mc-modal__btn-back",onClick:e.withModifiers(g,["prevent"])},[e.createVNode(e.unref(Be),{name:"arrow_leftward",class:"mc-modal__icon-back"})])):e.createCommentVNode("",!0),a.closeVisible?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"mc-modal__btn-close",onClick:e.withModifiers(k,["prevent"])},[e.createVNode(e.unref(Be),{class:"mc-modal__icon-close",width:"24",height:"24",name:"close"})])):e.createCommentVNode("",!0)],6)])):e.createCommentVNode("",!0)}}),Nt={defaultHeaderHeight:40,defaultRowHeight:40,defaultFooterRowHeight:40,defaultTableFirstColWidth:251},uy={class:"mc-table__table"},my={class:"mc-table__table_header"},py={class:"mc-table__table_header-row"},hy={class:"mc-table__table_header-cell_content"},fy={class:"mc-table__table_header-cell_content-left"},gy={class:"mc-table__table_header-cell_content-right"},yy={class:"mc-table__table_body"},ky=["onClick"],by={class:"mc-table__table_body-cell_content"},_y={class:"mc-table__table_body-cell_content-left"},wy={key:0,class:"mc-table__table_body-cell_content-right"},Cy={key:0,class:"mc-table__table_body-row mc-table__table_body-row--fake"},Sy={class:"mc-table__table_body-cell_content"},By={key:0,class:"mc-table__table_body-cell_content-right"},vy={key:0,class:"mc-table__table_footer"},Vy={class:"mc-table__table_footer-row"},xy=e.defineComponent({__name:"McTable",props:{columns:{type:Array,required:!0,default:()=>[]},data:{type:Array,required:!0,default:()=>[]},totals:{type:Object,default:()=>({})},sort:{type:Object,default:()=>({})},fixedFirstColumn:{type:Boolean,default:!0},fixedLastColumn:{type:Boolean,default:!1},hasLoadMore:{type:Boolean,default:!0},height:{type:[Number,String],default:"auto"},headerRowHeight:{type:Number,default:Nt.defaultHeaderHeight},rowHeight:{type:Number,default:Nt.defaultRowHeight},footerRowHeight:{type:Number,default:Nt.defaultFooterRowHeight},skeletonLoading:{type:Boolean,default:!1},bottomLoading:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},placeholders:{type:Object,default:()=>({})},noDataIcon:{type:String,default:null},noDataImg:{type:String,default:Ai},toTableCardProps:{type:Object,default:()=>({})}},emits:["loading","row-click","sort","table-card-opened"],setup(a,{emit:t}){const n=e.inject("dsOptions",{}),r={no_data:"No data",loading:"Loading...",all_loaded:"All loaded",total:"Total"},o=t,l=ct(),i=e.useSlots(),c=a,s=e.ref({state:!1}),p=e.ref(null),u=e.computed(()=>!l.isEmpty(c.data)),m=e.computed(()=>!l.isEmpty(c.totals)),f=e.computed(()=>c.fixedFirstColumn||c.fixedLastColumn),h=e.reactive(l.deepMerge(r,c.placeholders)),g=e.reactive({firstColHasShadow:!1,lastColHasShadow:!1}),y=e.computed(()=>({"mc-table":!0,"mc-table--card-opened":s.value.state})),B=e.computed(()=>{const[F]=c.columns;return(s.value.state?[F]:c.columns).map((G,W)=>{const D=c.fixedFirstColumn&&W===0,$=c.fixedLastColumn&&W===c.columns.length-1;return{...G,fixedFirst:D,fixedLast:$,style:{...G.width?{"--mc-table-cell-width":`${G.width}px`,"--mc-table-cell-max-width":`${G.width}px`,"--mc-table-cell-min-width":`${G.width}px`}:{"--mc-table-cell-min-width":G.minWidth&&`${G.minWidth}px`,"--mc-table-cell-width":"100%"}}}})}),T=e.computed(()=>B.value.map(F=>({...F,class:{"mc-table__table_header-cell":!0,"mc-table__table_header-cell--fixed-first":F.fixedFirst,"mc-table__table_header-cell--fixed-last":F.fixedLast,"mc-table__table_header-cell--shadow-first":F.fixedFirst&&g.firstColHasShadow,"mc-table__table_header-cell--shadow-last":F.fixedLast&&g.lastColHasShadow}}))),C=e.computed(()=>B.value.map(F=>({...F,class:{"mc-table__table_body-cell":!0,"mc-table__table_body-cell--fixed-first":F.fixedFirst,"mc-table__table_body-cell--fixed-last":F.fixedLast,"mc-table__table_body-cell--shadow-first":F.fixedFirst&&g.firstColHasShadow,"mc-table__table_body-cell--shadow-last":F.fixedLast&&g.lastColHasShadow}}))),k=e.computed(()=>B.value.map(F=>({...F,class:{"mc-table__table_footer-cell":!0,"mc-table__table_footer-cell--fixed-first":F.fixedFirst,"mc-table__table_footer-cell--fixed-last":F.fixedLast,"mc-table__table_footer-cell--shadow-first":F.fixedFirst&&g.firstColHasShadow,"mc-table__table_footer-cell--shadow-last":F.fixedLast&&g.lastColHasShadow}}))),V=e.computed(()=>({"--mc-table-height":typeof c.height=="number"?`${c.height}px`:c.height,"--mc-table-header-row-height":l.isNumber(c.headerRowHeight)?`${c.headerRowHeight}px`:"40px","--mc-table-row-height":l.isNumber(c.rowHeight)?`${c.rowHeight}px`:"40px","--mc-table-footer-row-height":l.isNumber(c.footerRowHeight)?`${c.footerRowHeight}px`:"40px"})),x=e.computed(()=>({tableColumns:c.columns,tableData:c.data,tableTotals:c.totals,tableSort:c.sort,tableHeaderRowHeight:c.headerRowHeight,tableFooterRowHeight:c.footerRowHeight,tableFixedFirstColumn:c.fixedFirstColumn,tableCardProps:c.toTableCardProps}));e.onMounted(()=>{v()}),e.onBeforeUnmount(()=>{M()});const w=pi(()=>{if(p.value){const{scrollLeft:F,scrollWidth:G,clientWidth:W}=p.value,D=c.fixedFirstColumn&&F>0,$=c.fixedLastColumn&&F+W<G;g.firstColHasShadow!==D&&(g.firstColHasShadow=D),g.lastColHasShadow!==$&&(g.lastColHasShadow=$)}},5),v=()=>{f.value&&p.value&&(w(),p.value.addEventListener("scroll",w))},M=()=>{f.value&&p.value&&p.value.removeEventListener("scroll",w)},L=F=>{o("row-click",F)},E=F=>{s.value=F,o("table-card-opened",F)};return(F,G)=>{const W=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",{class:"mc-table__container",style:e.normalizeStyle(V.value)},[e.createElementVNode("div",{ref_key:"mcTable",ref:p,class:e.normalizeClass(y.value)},[e.createElementVNode("div",uy,[e.createElementVNode("div",my,[e.createElementVNode("div",py,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(D,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,class:e.normalizeClass(D.class),style:e.normalizeStyle(D.style)},[e.createElementVNode("div",hy,[e.createElementVNode("div",fy,[D.sortable?(e.openBlock(),e.createBlock(e.unref(Ji),{key:0,column:D.field,sort:a.sort,onChange:G[0]||(G[0]=A=>o("sort",A))},null,8,["column","sort"])):e.createCommentVNode("",!0),e.renderSlot(F.$slots,"header-cell",{column:D,cellIndex:$},()=>[e.createVNode(e.unref(ke),{"text-align":D.align,weight:e.unref(d.Weights).SemiBold,"pre-line":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(D.header),1)]),_:2},1032,["text-align","weight"])])]),e.createElementVNode("div",gy,[e.renderSlot(F.$slots,`${D.field}-header-right`,{column:D,cellIndex:$}),e.renderSlot(F.$slots,`${D.field}-total`,{column:D,cellIndex:$},()=>[D.total?(e.openBlock(),e.createBlock(e.unref(Ma),{key:0,title:D.total,variation:"hover-gray","text-color":"gray",size:e.unref(d.ChipSize).S},null,8,["title","size"])):e.createCommentVNode("",!0)])])])],6))),128))])]),e.createElementVNode("div",yy,[c.skeletonLoading?(e.openBlock(),e.createBlock(e.unref(Zi),{key:0,columns:C.value},null,8,["columns"])):e.createCommentVNode("",!0),u.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.data,(D,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,class:e.normalizeClass(["mc-table__table_body-row",{"mc-table__table_body-row--active":String(s.value.id)===String(D.id)}]),onClick:()=>L(D)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(A,Y)=>(e.openBlock(),e.createElementBlock("div",{key:Y,class:e.normalizeClass(A.class),style:e.normalizeStyle(A.style)},[e.createElementVNode("div",by,[e.createElementVNode("div",_y,[e.renderSlot(F.$slots,A.field,{row:D,rowIndex:$,column:A,cellIndex:Y,cellValue:D[A.field]},()=>[e.createVNode(e.unref(ke),{"text-align":A.align,ellipsis:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(D[A.field]),1)]),_:2},1032,["text-align"])])]),e.unref(i)[`${A.field}-right`]?(e.openBlock(),e.createElementBlock("div",wy,[e.renderSlot(F.$slots,`${A.field}-right`)])):e.createCommentVNode("",!0)])],6))),128))],10,ky))),128)),s.value.state?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Cy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(D,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,class:e.normalizeClass(D.class),style:e.normalizeStyle(D.style)},[e.createElementVNode("div",Sy,[G[2]||(G[2]=e.createElementVNode("div",{class:"mc-table__table_body-cell_content-left"},null,-1)),e.unref(i)[`${D.field}-right`]?(e.openBlock(),e.createElementBlock("div",By)):e.createCommentVNode("",!0)])],6))),128))]))],64)):e.createCommentVNode("",!0),c.hasLoadMore?(e.openBlock(),e.createBlock(e.unref($i),{key:2,active:c.hasLoadMore,onLoading:G[1]||(G[1]=D=>o("loading"))},null,8,["active"])):e.createCommentVNode("",!0)]),m.value?(e.openBlock(),e.createElementBlock("div",vy,[e.createElementVNode("div",Vy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(D,$)=>(e.openBlock(),e.createElementBlock("div",{key:$,class:e.normalizeClass(D.class),style:e.normalizeStyle(D.style)},[e.renderSlot(F.$slots,"footer-cell",{column:D,cellIndex:$,cellValue:a.totals[D.field]},()=>[e.createVNode(e.unref(ke),{"text-align":D.align,weight:e.unref(d.Weights).SemiBold},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.totals[D.field]),1)]),_:2},1032,["text-align","weight"])])],6))),128))])])):e.createCommentVNode("",!0)])],2),e.renderSlot(F.$slots,"default",e.mergeProps(x.value,{onSetTableCardState:E}),()=>[e.unref(n).router?(e.openBlock(),e.createBlock(W,e.mergeProps({key:0},x.value,{onSetTableCardState:E}),null,16)):e.createCommentVNode("",!0)]),a.bottomLoading?(e.openBlock(),e.createBlock(e.unref(vo),{key:0})):e.createCommentVNode("",!0),a.loading?(e.openBlock(),e.createBlock(e.unref(Yi),{key:1})):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(Ni),{key:2,variation:"small",title:h.no_data,img:c.noDataImg,icon:c.noDataIcon},null,8,["title","img","icon"]))],4)}}}),Dy={class:"mc-table-card-header"},Ty={class:"mc-table-card-header__left"},Ey={class:"mc-table-card-header__right"},My=e.defineComponent({__name:"McTableCardHeader",props:{buttonBackText:{type:String,default:"Back"},backTo:{type:String,default:null}},setup(a){const t=a,n=Ve("tableCard");return(r,o)=>(e.openBlock(),e.createElementBlock("section",Dy,[e.createElementVNode("div",Ty,[e.renderSlot(r.$slots,"default",{},()=>[e.createVNode(e.unref(Ee),{to:t.backTo,exact:"",variation:`${e.unref(n).component.backLink}-link`,size:e.unref(d.ButtonSize).Xs},{"icon-prepend":e.withCtx(()=>[e.createVNode(e.unref(Be),{name:"arrow_backward"})]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(t.buttonBackText),1)]),_:1},8,["to","variation","size"])])]),e.createElementVNode("div",Ey,[e.renderSlot(r.$slots,"right")])]))}}),$y={key:0,class:"mc-table-card__header"},Ay=e.defineComponent({__name:"McTableCard",props:{id:{type:[String,Number]},tableColumns:{type:Array,default:()=>[]},tableData:{type:Array,default:()=>[]},tableTotals:{type:Object,default:()=>({})},tableSort:{type:Object,default:()=>({})},tableFixedFirstColumn:{type:Boolean,default:!0},tableHeaderRowHeight:{type:Number,default:Nt.defaultHeaderHeight},tableFooterRowHeight:{type:Number,default:Nt.defaultFooterRowHeight},tableCardProps:{type:Object,default:()=>({})},footerBlur:{type:Boolean,default:!1}},emits:["set-table-card-state","card-id-updated"],setup(a,{emit:t}){const n=e.useSlots(),r=t,o=a,l=ct(),i=e.computed(()=>{const[g]=o.tableColumns;return g!=null&&g.width?g.width:Nt.defaultTableFirstColWidth}),c=e.ref(null),s=e.ref(!0),p=e.computed(()=>({"mc-table-card__footer":!!n.footer,"mc-table-card__footer--with-blur":o.footerBlur&&!s.value})),u=e.computed(()=>({"--table-card-header-height":l.isNumber(o.tableHeaderRowHeight)?`${o.tableHeaderRowHeight+-1}px`:`${Nt.defaultHeaderHeight}px`,"--table-card-footer-height":l.isNumber(o.tableFooterRowHeight)?`${o.tableFooterRowHeight+-1}px`:`${Nt.defaultFooterRowHeight}px`,marginLeft:`${i.value}px`}));e.onMounted(()=>{o.footerBlur&&m(),h({state:!0,id:o.id})}),e.onBeforeUnmount(()=>{c.value&&c.value.removeEventListener("scroll",f),h({state:!1})});const m=()=>{try{s.value=!1,c.value&&c.value.addEventListener("scroll",f)}catch(g){console.error(g)}},f=()=>{try{if(c.value){const{offsetHeight:g,scrollTop:y,scrollHeight:B}=c.value;s.value=g+y===B}}catch(g){s.value=!0,console.error(g)}},h=g=>{r("set-table-card-state",g)};return e.watch(()=>o.footerBlur,g=>{g?m():c.value&&c.value.removeEventListener("scroll",f)}),e.watch(()=>o.id,g=>{const y={state:!0,id:g};h(y),r("card-id-updated",y)}),(g,y)=>(e.openBlock(),e.createElementBlock("div",{class:"mc-table-card",style:e.normalizeStyle(u.value)},[g.$slots.header?(e.openBlock(),e.createElementBlock("div",$y,[e.renderSlot(g.$slots,"header")])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"bodyEl",ref:c,class:"mc-table-card__body"},[e.renderSlot(g.$slots,"default",e.normalizeProps(e.guardReactiveProps(o)))],512),g.$slots.footer||a.footerBlur?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(p.value)},[e.renderSlot(g.$slots,"footer")],2)):e.createCommentVNode("",!0)],4))}}),Ny={class:"mc-table-skeleton-loading skeleton-load-wrapper"},Fy={key:0,class:"mc-table-skeleton-loading__loader mc-table-skeleton-loading__loader--more-height"},Oy={key:2,class:"mc-table-skeleton-loading__loader"},Zi=e.defineComponent({__name:"McTableSkeletonLoading",props:{columns:{type:Array,required:!0,default:()=>[]}},setup(a){const t=a,n=e.computed(()=>{const[r]=t.columns;return r.width});return(r,o)=>(e.openBlock(),e.createElementBlock("section",Ny,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.columns,(l,i)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(l.style),class:"mc-table-skeleton-loading__col",key:`skeleton-col__${i}`},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(36,(c,s)=>e.createElementVNode("div",{key:`skeleton-cell-${s}`,class:"mc-table-skeleton-loading__cell"},[s?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Fy,o[0]||(o[0]=[e.createElementVNode("div",{class:"mc-table-skeleton-loading__loader_line"},null,-1)]))),i?(e.openBlock(),e.createElementBlock("div",Oy,o[2]||(o[2]=[e.createElementVNode("div",{class:"mc-table-skeleton-loading__loader_line"},null,-1)]))):(e.openBlock(),e.createElementBlock("div",{key:1,class:"mc-table-skeleton-loading__loader",style:e.normalizeStyle({minWidth:`${n.value}px`})},o[1]||(o[1]=[e.createElementVNode("div",{class:"mc-table-skeleton-loading__loader_avatar"},null,-1),e.createElementVNode("div",{class:"mc-table-skeleton-loading__loader_preview-content"},[e.createElementVNode("div",{class:"mc-table-skeleton-loading__loader_line"}),e.createElementVNode("div",{class:"mc-table-skeleton-loading__loader_line"})],-1)]),4))])),64))],4))),128))]))}}),Ji=e.defineComponent({__name:"McTableSort",props:{sort:{type:Object,default:()=>({})},column:{type:String,default:null}},emits:["change"],setup(a,{emit:t}){const n=t,r=a,o=e.computed(()=>r.column===r.sort.sort_column),l=e.computed(()=>{switch(!0){case(r.sort.sort_direction==="asc"&&o.value):return{direction:"asc",next_direction:"desc",icon:"arrow_downward"};case(r.sort.sort_direction==="desc"&&o.value):return{direction:"desc",next_direction:"asc",icon:"arrow_upward"};default:return{direction:null,next_direction:"asc",icon:"arrow_up_down"}}}),i=()=>{n("change",{sort_column:r.column,sort_direction:l.value.next_direction})};return(c,s)=>(e.openBlock(),e.createElementBlock("div",{class:"mc-table-sort",onClick:i},[e.createVNode(e.unref(Be),{size:"200",name:l.value.icon,color:o.value?"black":"gray"},null,8,["name","color"])]))}});function Py(a,t){const n=e.ref(t),r=e.ref(Date.now()),o=e.ref(null);function l(){r.value=Date.now(),o.value=setTimeout(()=>a(),n.value)}function i(){n.value=n.value-(Date.now()-r.value),o.value&&clearTimeout(o.value)}return{start:l,pause:i}}const sa=e.defineComponent({__name:"McToast",props:{id:{type:Number},duration:{type:Number,default:null},position:{type:String,default:d.ToastPositions.BottomCenter},variation:{type:String},icon:{type:String,default:null},title:{type:String,default:null},description:{type:String,default:null},closable:{type:Boolean,default:!1},show_time:{type:Boolean,default:!1},actions:{type:Array,default:()=>[]},toast:{type:Object,default:()=>({})}},emits:["close"],setup(a,{emit:t}){const n=t,r=a,o=e.computed(()=>r.variation||l.component.variation),l=Ve("toast"),i=Py(r.toast.destroy,r.duration),c=e.computed(()=>({"mc-toast":!0,[`mc-toast--variation-${o.value}`]:!0})),s=e.computed(()=>({"--mc-toast-background-color":l.colors[o.value]})),p=()=>{n("close",r.toast)},u=m=>{m&&m(),r.toast.destroy()};return e.onMounted(()=>{i.start()}),(m,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(c.value),style:e.normalizeStyle(s.value),onMouseenter:f[0]||(f[0]=h=>e.unref(i).pause()),onMouseleave:f[1]||(f[1]=h=>e.unref(i).start())},[e.createVNode(e.unref(Kt),{size:e.unref(d.PreviewSizes).L},e.createSlots({_:2},[r.icon?{name:"left",fn:e.withCtx(()=>[e.createVNode(e.unref(Be),{name:r.icon,size:"300"},null,8,["name"])]),key:"0"}:void 0,r.title?{name:"top",fn:e.withCtx(()=>[e.createVNode(e.unref(ke),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.title),1)]),_:1})]),key:"1"}:void 0,r.description?{name:"bottom",fn:e.withCtx(()=>[e.createVNode(e.unref(ke),null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.description),1)]),_:1})]),key:"2"}:void 0,r.closable||r.actions.length?{name:"right",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.actions,h=>(e.openBlock(),e.createBlock(e.unref(Ee),{key:`toast-${h.handler}`,size:e.unref(d.ButtonSize).Xs,variation:h.variation||"gray-outline",weight:e.unref(d.Weights).Normal,onClick:()=>u(h.handler)},e.createSlots({default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(h.title),1)]),_:2},[h.icon?{name:"icon-prepend",fn:e.withCtx(()=>[e.createVNode(e.unref(Be),{name:h.icon},null,8,["name"])]),key:"0"}:void 0]),1032,["size","variation","weight","onClick"]))),128)),r.closable?(e.openBlock(),e.createBlock(e.unref(Ee),{key:0,onClick:p,variation:"gray-link"},{"icon-append":e.withCtx(()=>[e.createVNode(e.unref(Be),{name:"close"})]),_:1})):e.createCommentVNode("",!0)]),key:"3"}:void 0]),1032,["size"])],38))}}),Ly={class:"mc-top-bar"},Ry={class:"mc-top-bar__inner"},zy={key:0,class:"mc-top-bar__left"},Iy={class:"mc-top-bar__right"},Yy=e.defineComponent({__name:"McTopBar",props:{user:{type:Object,default:()=>({})},menuLangs:{type:Array,default:()=>[]},defaultLang:{type:String,default:"Выберите язык"},currentLang:{type:String,default:null}},setup(a){const t=a,n=e.ref(null),r=e.ref(!1),o=e.ref(!1);return(l,i)=>(e.openBlock(),e.createElementBlock("div",Ly,[e.createElementVNode("div",Ry,[l.$slots.left?(e.openBlock(),e.createElementBlock("div",zy,[e.renderSlot(l.$slots,"left")])):e.createCommentVNode("",!0),e.createElementVNode("div",Iy,[e.renderSlot(l.$slots,"right"),a.menuLangs&&a.menuLangs.length?(e.openBlock(),e.createBlock(e.unref(Tn),{key:0,ref_key:"menuLangsDD",ref:n,items:a.menuLangs,modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=c=>r.value=c),"list-min-width":"auto",class:"mc-top-bar__menu-langs"},{activator:e.withCtx(()=>[e.createVNode(e.unref(Ee),{variation:"black-link",uppercase:""},{"icon-append":e.withCtx(()=>[e.createVNode(e.unref(Be),{class:"rotate",name:"arrow_drop_down"})]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.currentLang||a.defaultLang)+" ",1)]),_:1})]),item:e.withCtx(({item:c})=>[e.createVNode(e.unref(Ee),{to:c.to||c.href,exact:c.exact,variation:"black-flat","text-align":e.unref(d.HorizontalAlignment).Left,"full-width":""},{"icon-prepend":e.withCtx(()=>[e.createVNode(e.unref(Be),{name:`flag_${c.name.toLowerCase()}`},null,8,["name"])]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(c.name),1)]),_:2},1032,["to","exact","text-align"])]),_:1},8,["items","modelValue"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"user",{},()=>[t.user?(e.openBlock(),e.createBlock(e.unref(Tn),{key:0,modelValue:o.value,"onUpdate:modelValue":i[1]||(i[1]=c=>o.value=c),position:e.unref(d.DropdownPositions).Right},{activator:e.withCtx(()=>[e.createVNode(e.unref(Ee),{variation:"white-flat",size:e.unref(d.ButtonSize).MCompact},{"icon-prepend":e.withCtx(()=>[e.createVNode(e.unref(Wn),{src:t.user.avatar,rounded:"",size:"400"},null,8,["src"])]),_:1},8,["size"])]),default:e.withCtx(()=>[e.renderSlot(l.$slots,"user-dropdown-panel")]),_:3},8,["modelValue","position"])):e.createCommentVNode("",!0)])])]),e.createVNode(e.unref(no),{color:"hover-gray","indent-top":"100"}),e.renderSlot(l.$slots,"bottom")]))}}),Hy=e.defineComponent({__name:"McVirtualScroll",props:{items:{type:Array,default:()=>[],required:!0},containerHeight:{type:Number,required:!0},itemHeight:{type:Number,default:20,required:!0},buffer:{type:Number,default:1}},setup(a){const t=a,n=e.ref(null),r=e.ref(0),o=e.ref([]),l=e.ref(0),i=e.computed(()=>({height:`${t.containerHeight}px`,overflowY:"auto",position:"relative"}));e.onMounted(()=>{c(),e.nextTick(s)});const c=()=>{l.value=t.items.length*t.itemHeight},s=()=>{var y;const u=((y=n.value)==null?void 0:y.clientHeight)||0,m=Math.floor(r.value/t.itemHeight),f=Math.min(t.items.length-1,Math.floor((r.value+u)/t.itemHeight)),h=t.buffer||5,g=[];for(let B=Math.max(0,m-h);B<=Math.min(f+h,t.items.length-1);B++)g.push({key:B,data:t.items[B],index:B,top:B*t.itemHeight});o.value=g},p=()=>{var u;r.value=((u=n.value)==null?void 0:u.scrollTop)||0,requestAnimationFrame(s)};return e.watch(()=>t.items,()=>{c(),e.nextTick(s)}),(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"mc-virtual-scroll",ref_key:"containerRef",ref:n,onScroll:p,style:e.normalizeStyle(i.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,f=>(e.openBlock(),e.createElementBlock("div",{key:`mc-virtual-scroll__item-${f.key}`,class:"mc-virtual-scroll__item",style:e.normalizeStyle({top:`${f.top}px`})},[e.renderSlot(u.$slots,"item",{item:f.data,index:f.index})],4))),128)),e.createElementVNode("div",{style:e.normalizeStyle({height:`${l.value}px`})},null,4)],36))}}),es=e.defineComponent({__name:"McDrawerContainer",props:{drawerServiceState:{type:Object,default:()=>({})},reactiveProps:{type:Object,default:()=>({})}},setup(a){const t=a,n=e.computed(()=>({zIndex:t.reactiveProps.drawers.length?10002:-1,visibility:t.reactiveProps.drawers.length?"visible":"hidden"})),r=o=>{var l;o.close(),setTimeout(()=>{t.reactiveProps.drawers.every(i=>!i.modelValue)&&t.drawerServiceState.closeServiceState()},((l=o==null?void 0:o.drawerProps)==null?void 0:l.duration)||300)};return(o,l)=>(e.openBlock(),e.createElementBlock("div",{class:"mc-drawer-container",style:e.normalizeStyle(n.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.reactiveProps.drawers,(i,c)=>(e.openBlock(),e.createBlock(e.unref(Xi),e.mergeProps({key:i.id,modelValue:i.modelValue,"onUpdate:modelValue":s=>i.modelValue=s,ref_for:!0},i.drawerProps,{"show-overlay":c+1===t.reactiveProps.drawers.length,onClose:()=>r(i)}),{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i.component),e.mergeProps({ref_for:!0},i.componentProps,{onCloseDrawer:()=>r(i)}),null,16,["onCloseDrawer"]))]),_:2},1040,["modelValue","onUpdate:modelValue","show-overlay","onClose"]))),128))],4))}}),jy=()=>{oo.isOpen=!1,Gt.drawers=[]},oo=e.reactive({isOpen:!1,closeServiceState:jy}),ts=e.shallowRef(null),lo=e.shallowRef({}),Gt=e.reactive({drawers:[]}),Uy=()=>{const a=document.createElement("div");a.id="drawer-container",document.body.appendChild(a);const t=e.h(es,{drawerServiceState:oo,reactiveProps:Gt});t.appContext=ts.value,e.render(t,a)},qy=()=>{document.getElementById("drawer-container")||Uy()},Wy=(a,t={},n={})=>{if(!lo.value[a])return console.warn(`The component is not provided in Mediacube-ui DS
|
|
6
6
|
Check and add to app.use(MediacubeUI, { drawerComponents: {...} })`);qy();const r=Date.now(),o={component:e.markRaw(lo.value[a]),componentName:a,drawerProps:t,componentProps:n,modelValue:!0,id:r,close:()=>{const l=Gt.drawers.findLast(i=>i.id===r);l&&(l.modelValue=!1),setTimeout(()=>{Gt.drawers=Gt.drawers.filter(i=>i.id!==(l==null?void 0:l.id))},(t==null?void 0:t.duration)||300)}};Gt.drawers.push(o),oo.isOpen=!0},Ky=a=>{const t=Gt.drawers.findLast(n=>n.componentName===a);t&&t.close()},Gy=()=>{Gt.drawers.forEach(a=>{a.close()})};function Xy(){const a=e.getCurrentInstance();ts.value=(a==null?void 0:a.appContext)||null;const t=e.inject("dsOptions",{});return t.drawerComponents&&(lo.value=t.drawerComponents),{showDrawer:Wy,closeDrawer:Ky,closeAllDrawers:Gy}}class Za{static encode(t){if(t.constructor!==Object)return t;try{return btoa(encodeURI(JSON.stringify(t)))}catch(n){return console.error(n),t}}static decode(t){if(!t)return t;try{return JSON.parse(decodeURI(atob(t)))}catch(n){return console.error(n),t}}}function vt(a){const t=e.ref(!0),n=e.ref(a),r=e.computed(()=>{var i,c;return n.value===null||!((i=n.value)!=null&&i.length)||!t.value?null:(c=n.value.join(", "))==null?void 0:c.replace(/-/gm,"‑")});return{is_error_visible:t,errorText:r,toggleErrorVisible:function(){t.value=!1},setError:function(i){n.value=i,t.value=!0}}}class Qy{static loadAsString(t,n){if(!t||!n)return t;const r=new XMLHttpRequest;return r.open("GET",t,!1),r.setRequestHeader("Content-Type",n),r.send(),r.status===200?r.responseText:(console.error(`Ошибка загрузки SVG: ${r.status}`),"")}}function Zy(a){return a==null?!0:Array.isArray(a)||typeof a=="string"?a.length===0:typeof a=="object"?Object.keys(a).length===0:!1}function as(a,t){if(a===t)return!0;if(typeof a!="object"||typeof t!="object"||a===null||t===null||Array.isArray(a)!==Array.isArray(t))return!1;const n=Object.keys(a),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n)if(!as(a[o],t[o]))return!1;return!0}function io(a){if(a===null||typeof a!="object")return a;if(Array.isArray(a))return a.map(io);const t={};for(const n in a)rs(a,n)&&(t[n]=io(a[n]));return t}function Jy(a,t){return a.reduce((n,r)=>(n.some(o=>t(o,r))||n.push(r),n),[])}function ns(a,t){for(const n in t)t[n]instanceof Object&&n in a&&Object.assign(t[n],ns(a[n],t[n]));return Object.assign(a||{},t),a}function so(a,t){if(!a)return a;if(a.constructor===Array)return a.map(n=>so(n,t));if(a.constructor===Object){const n={};return t.forEach(r=>{const[o,...l]=r.split(".");l.length===0?n[o]=a==null?void 0:a[o]:n[o]={...n[o]||{},...so((a==null?void 0:a[o])??{},[l.join(".")])}}),n}return a}function rs(a,t){return Object.prototype.hasOwnProperty.call(a,t)}function e0(a){return typeof a=="number"}function t0(a){return a&&a.charAt(0).toUpperCase()+a.slice(1)}function a0(a,t){function n(o){return o&&o.constructor===Object}function r(o,l){return new Proxy({},{get(i,c){const s=o==null?void 0:o[c],p=l==null?void 0:l[c];return n(s)||n(p)?r(s||{},p||{}):p!==void 0?p:s},set(i,c,s){return n(l)?(l[c]=s,!0):!1},ownKeys(){return Array.from(new Set([...Object.keys(o),...Object.keys(l)]))},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}})}return e.reactive(r(a,t))}function n0(a,t,n){const r=t.split("."),o=r.pop();let l=a;for(const i of r)i in l||(l[i]={}),l=l[i];l[o]=n}function r0(a,t){if((t==null?void 0:t.constructor)===String)return t.split(".").reduce((n,r)=>n?n[r]:void 0,a)}function ct(){return{isEmpty:Zy,isEqual:as,cloneDeep:io,uniqWith:Jy,deepMerge:ns,hasProperty:rs,isNumber:e0,upperFirst:t0,pickDeep:so,mergeReactiveDefaults:a0,setNested:n0,getNested:r0}}const o0=()=>{co.isOpen=!1,Xt.modals=[]},co=e.reactive({isOpen:!1,closeServiceState:o0}),os=e.shallowRef(null),uo=e.shallowRef({}),Xt=e.reactive({modals:[]}),l0=()=>{const a=document.createElement("div");a.id="modal-container",document.body.appendChild(a);const t=e.h(Qi,{modalServiceState:co,reactiveProps:Xt});t.appContext=os.value,e.render(t,a)},i0=()=>{document.getElementById("modal-container")||l0()},s0=(a,t={})=>{if(!uo.value[a])return console.warn(`The component is not provided in Mediacube-ui DS
|
|
7
|
-
Check and add to app.use(MediacubeUI, { modalComponents: {...} })`);i0();const n=Date.now(),r={component:e.markRaw(uo.value[a]),componentName:a,componentProps:t,modelValue:!0,id:n,close:()=>{const o=Xt.modals.findLast(l=>l.id===n);o&&(o.modelValue=!1),setTimeout(()=>{Xt.modals=Xt.modals.filter(l=>l.id!==(o==null?void 0:o.id))},300)}};Xt.modals.push(r),co.isOpen=!0},c0=a=>{const t=Xt.modals.findLast(n=>n.componentName===a);t&&t.close()},d0=()=>{Xt.modals.forEach(a=>{a.close()})};function u0(){const a=e.getCurrentInstance();os.value=(a==null?void 0:a.appContext)||null;const t=e.inject("dsOptions",{});return t.modalComponents&&(uo.value=t.modalComponents),{showModal:s0,closeModal:c0,closeAllModals:d0}}function m0(a=0){if(!a)return Date.now();const t=Math.pow(10,a-1),n=Math.pow(10,a)-1;return+(String(Date.now())+String(Math.floor(Math.random()*(n-t+1))+t))}function Da(){return{timestamp:m0}}const ls=bn(a=>{a()},150),$n=e.ref([]),Ja=ct();class is{constructor(t,n){le(this,"id");le(this,"target");le(this,"content");le(this,"visible",e.ref(!1));le(this,"position",e.ref({top:null,left:null,translate:"translate(0, 0)"}));le(this,"placement");le(this,"size");le(this,"arrow");le(this,"color");le(this,"textColor");le(this,"showTooltip",()=>{var n;this.updateTooltipPosition(),this.visible.value=!0;let t=document.getElementById(String(this.id));if(!t){const r=document.createElement("div");r.classList.add("mc-tooltip"),r.id=String(this.id),r.innerText=this.content||"",r.style.setProperty("--tooltip-color",this.color),r.style.setProperty("--tooltip-text-color",this.textColor),r.setAttribute("tooltip-placement",this.placement),r.setAttribute("tooltip-size",this.size),r.setAttribute("tooltip-arrow",String(this.arrow)),(n=document.getElementById("tooltip-container"))==null||n.appendChild(r)}if(t=document.getElementById(String(this.id)),t){t.style.visibility="visible";for(const r in this.position.value)r&&Ja.hasProperty(this.position.value,r)&&(t.style[r]=`${this.position.value[r]}px`);t.style.transform=this.position.value.translate}});le(this,"hideTooltip",()=>{this.visible.value=!1;const t=document.getElementById(String(this.id));t&&(t.style.visibility="hidden",setTimeout(()=>{!this.visible.value&&this.destroy()},3e3))});le(this,"updateTooltipPosition",()=>{const{top:t,left:n,width:r,height:o}=this.target.getBoundingClientRect(),l=t+window.scrollY,i=n+window.scrollX,c=4,s=this.arrow?4:0;switch(this.placement){case d.TooltipPositions.Right:this.position.value={top:l,left:i+r+(c+s),translate:`translate(0, calc(-50% + ${o/2}px))`};break;case d.TooltipPositions.Left:this.position.value={top:l,left:i-(c+s),translate:`translate(-100%, calc(-50% + ${o/2}px))`};break;case d.TooltipPositions.Top:this.position.value={top:l-(c+s),left:i+r/2,translate:"translate(-50%, -100%)"};break;case d.TooltipPositions.Bottom:this.position.value={top:l+o+(c+s),left:i+r/2,translate:"translate(-50%, 0%)"};break}});le(this,"destroy",()=>{this.target.removeEventListener("mouseenter",this.showTooltip),this.target.removeEventListener("mouseleave",this.hideTooltip),$n.value=$n.value.filter(n=>n.id!==this.id);const t=document.getElementById(String(this.id));t&&t.remove()});this.target=t,this.content=n.content,this.placement=n.placement||d.TooltipPositions.Top,this.size=n.size||d.TooltipSizes.M,this.id=Da().timestamp(5),this.arrow=Ja.hasProperty(n,"arrow")?!!n.arrow:!0,this.color=n.color||Ea.black,this.textColor=n.textColor||Ea.white,this.target.onmouseenter=this.showTooltip,this.target.onmouseleave=this.hideTooltip,$n.value.push(this)}}const An=ls(()=>{$n.value.forEach(a=>a.updateTooltipPosition())}),p0=()=>{const a=document.createElement("div");a.id="tooltip-container",document.body.appendChild(a)},h0=()=>{document.getElementById("tooltip-container")||p0()};function mo(){const a=e.ref(null);return{mounted(t,n){h0(),n.value.content&&(a.value=new is(t,n.value),window.addEventListener("scroll",()=>An),window.addEventListener("resize",()=>An))},updated(t,n){!a.value||!a.value.id||ls(()=>{var i;const r=["arrow","color","content","placement","size","textColor"],o=Ja.pickDeep({...a.value},r),l=Ja.pickDeep(n.value,r);Ja.isEqual(o,l)||((i=a.value)==null||i.destroy(),a.value=new is(t,n.value))})},beforeUnmount(){var t;(t=a.value)==null||t.destroy(),window.removeEventListener("scroll",()=>An),window.removeEventListener("resize",()=>An)}}}const f0={class:"mc-toasts-container"},g0={key:0,class:"mc-toasts-container__top mc-toasts-container__top--left"},y0={key:1,class:"mc-toasts-container__top mc-toasts-container__top--center"},k0={key:2,class:"mc-toasts-container__top mc-toasts-container__top--right"},b0={key:3,class:"mc-toasts-container__bottom mc-toasts-container__bottom--left"},_0={key:4,class:"mc-toasts-container__bottom mc-toasts-container__bottom--center"},w0={key:5,class:"mc-toasts-container__bottom mc-toasts-container__bottom--right"},C0=e.defineComponent({__name:"McToastContainer",props:{reactiveProps:{type:Object,default:()=>({toasts:[]})}},setup(a){const t=a,n=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.TopLeft).reverse()),r=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.TopCenter).reverse()),o=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.TopRight).reverse()),l=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.BottomLeft)),i=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position==="bottom-center")),c=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.BottomRight));return(s,p)=>(e.openBlock(),e.createElementBlock("div",f0,[n.value.length?(e.openBlock(),e.createElementBlock("div",g0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),r.value.length?(e.openBlock(),e.createElementBlock("div",y0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),o.value.length?(e.openBlock(),e.createElementBlock("div",k0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",b0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),i.value.length?(e.openBlock(),e.createElementBlock("div",_0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),c.value.length?(e.openBlock(),e.createElementBlock("div",w0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0)]))}}),Nn={position:d.ToastPositions.BottomCenter,duration:3e3},po=e.shallowRef({duration:Nn.duration,position:Nn.position}),Ta=e.reactive({toasts:[]});class ss{constructor({id:t,duration:n,position:r,variation:o="white",icon:l,title:i="",description:c="",closable:s,show_time:p,actions:u=[]}){le(this,"id");le(this,"duration");le(this,"position");le(this,"variation");le(this,"icon");le(this,"title");le(this,"description");le(this,"closable");le(this,"show_time");le(this,"actions");le(this,"destroy",()=>{Ta.toasts=Ta.toasts.filter(t=>t.id!==this.id)});this.id=t||Da().timestamp(5),this.duration=n||po.value.duration||Nn.duration,this.position=r||po.value.position||Nn.position,this.variation=o,this.icon=l,this.title=i,this.description=c,this.closable=s||!1,this.show_time=p||!1,this.actions=u}}function S0(a){cs();const t=new ss(a);Ta.toasts.push(t)}function B0(a){cs();const t="info",n="black",r=new ss({icon:t,variation:n,...a});Ta.toasts.push(r)}function v0(){Ta.toasts.forEach(a=>a.destroy())}const V0=()=>{const a=document.createElement("div");a.id="toast-container",document.body.appendChild(a);const t=e.h(C0,{reactiveProps:Ta});e.render(t,a)},cs=()=>{document.getElementById("toast-container")||V0()};function x0(){const a=e.inject("dsOptions",{});return a.toasts&&(po.value=a.toasts),{show:S0,info:B0,hideAll:v0}}const D0="data:image/png;base64,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",T0={"$animation-slide-up":"slide-up 0.3s","$animation-slide-up-with-margin":"slide-up-with-margin 0.3s","$animation-spinner":"rotate 1.2s infinite cubic-bezier(0.55, 0, 0.1, 1)","$animation-glow":"glow 1.5s ease-in-out infinite"},E0={"$shadow-xs":"0 2px 8px rgba(0, 0, 0, 0.16)","$shadow-s":"0 4px 12px rgba(0, 0, 0, 0.16)","$shadow-m":"0 12px 32px rgba(0, 0, 0, 0.24)","$shadow-l":"0 24px 40px rgba(0, 0, 0, 0.16)","$shadow-xs-blue":"0px 2px 8px rgba(51, 68, 153, 0.1)","$shadow-s-blue":"0 4px 12px rgba(51, 68, 153, 0.1)","$shadow-m-blue":"0 12px 32px rgba(51, 68, 153, 0.2)","$shadow-xs-purple":"0px 2px 8px rgba(91, 44, 205, 0.1)","$shadow-s-purple":"0 4px 12px rgba(91, 44, 205, 0.1)","$shadow-m-purple":"0 12px 32px rgba(91, 44, 205, 0.2)","$token-shadows":{xs:"0 2px 8px rgba(0, 0, 0, 0.16)",s:"0 4px 12px rgba(0, 0, 0, 0.16)",m:"0 12px 32px rgba(0, 0, 0, 0.24)",l:"0 24px 40px rgba(0, 0, 0, 0.16)","xs-blue":"0px 2px 8px rgba(51, 68, 153, 0.1)","s-blue":"0 4px 12px rgba(51, 68, 153, 0.1)","m-blue":"0 12px 32px rgba(51, 68, 153, 0.2)","xs-purple":"0px 2px 8px rgba(91, 44, 205, 0.1)","s-purple":"0 4px 12px rgba(91, 44, 205, 0.1)","m-purple":"0 12px 32px rgba(91, 44, 205, 0.2)"}},M0={"$easing-swift":"cubic-bezier(0.55, 0, 0.1, 1)"},$0={"$font-family-main":"'Inter', sans-serif","$font-family-additional":"'Source Serif Pro', serif"},A0={"$gradient-pink":"linear-gradient(180deg, #F5576C 0%, #F093FB 100%)","$gradient-violet":"linear-gradient(180deg, #E41AFE 0%, #8035F8 100%)","$gradient-blue":"linear-gradient(180deg, #1ADBFE 0%, #3580F8 100%)","$gradient-yellow":"linear-gradient(180deg, #FEE41A 0%, #F89B35 100%)","$gradient-green":"linear-gradient(180deg, #C9DD4C 0%, #63BE7E 100%)","$gradient-red":"linear-gradient(180deg, #F26567 0%, #F79440 100%)","$gradient-purple":"linear-gradient(270deg, #9a47ed 0%, #8446ff 100%)","$gradient-purple-pink":"linear-gradient(90deg, #722eff 2%, #fe6ffc 100%)","$gradient-blue-purple":"linear-gradient(90deg, #18bfe3 20%, #8756ff 70%)","$gradient-dark-blue":"linear-gradient(90deg, #5550EF 0%, #7F4EFF 100%)","$gradient-primary-radial":"radial-gradient(rgb(179, 211, 255), rgb(62, 132, 244))"},N0={"$letter-spacing-m":"0.4px","$letter-spacing-l":"1px"},F0={"$opacity-disabled":"0.6","$opacity-active":"0.7","$opacity-hover":"0.8"},O0={"$z-index-sticky-tabs":"49","$z-index-dropdown":"100","$z-index-sticky":"100","$z-index-overlay-page":"7000","$z-index-modal":"8000","$z-index-top-line":"8000","$z-index-header":"10000","$z-index-notification":"10001","$z-index-overlay":"10002","$z-index-toasted":"10003"},ds=ct(),P0={install(a,t={}){const n={drawerComponents:{},modalComponents:{},toasts:{},defaultAvatar:D0,router:null,colors:So,themes:Ln,theme:d.Themes.Light},r=e.reactive({...n,...t,colors:t.colors?ds.mergeReactiveDefaults(n.colors,t.colors):n.colors,themes:t.themes?ds.mergeReactiveDefaults(n.themes,t.themes):n.themes});a.config.globalProperties.$dsOptions=r,a.provide("dsOptions",r)}};d.AvatarSizes=Co,d.Colors=Ea,d.Durations=us,d.FontSizes=ms,d.FontWeights=Yn,d.LineHeights=an,d.McAccordion=tg,d.McAvatar=Wn,d.McBadge=ks,d.McBottomLoader=vo,d.McButton=Ee,d.McCell=rg,d.McChip=Ma,d.McCollapse=ig,d.McDatepicker=ci,d.McDraggable=Wp,d.McDrawer=Xi,d.McDrawerContainer=es,d.McDrawerContentTemplate=ry,d.McDropdown=Tn,d.McDropdownPanel=Oi,d.McFieldCheckbox=th,d.McFieldRadio=ki,d.McFieldRadioGroup=uh,d.McFieldRange=$h,d.McFieldSelect=Jr,d.McFieldText=Va,d.McFieldToggle=Af,d.McFilter=wg,d.McFilterChip=En,d.McFilterTags=Pi,d.McFilterTypeDate=Li,d.McFilterTypeRange=Ri,d.McFilterTypeRelation=zi,d.McFilterTypeText=Ii,d.McGridCol=Mn,d.McGridRow=Xa,d.McInfinityLoadingTrigger=$i,d.McModal=dy,d.McModalContainer=Qi,d.McNoData=Ni,d.McNotification=If,d.McOverlay=Yi,d.McPreview=Kt,d.McProgress=Uf,d.McSeparator=no,d.McSideBar=Pg,d.McSideBarBottom=Hi,d.McSideBarButton=Qa,d.McSideBarCenter=Wi,d.McSideBarTop=Ki,d.McSlideUpDown=ro,d.McStack=Gf,d.McSvgIcon=Be,d.McTab=Wg,d.McTable=xy,d.McTableCard=Ay,d.McTableCardHeader=My,d.McTableSkeletonLoading=Zi,d.McTableSort=Ji,d.McTabs=Zg,d.McTitle=ke,d.McToast=sa,d.McTooltip=Wt,d.McTopBar=Yy,d.McVirtualScroll=Hy,d.McWrapScroll=Gi,d.MediaQueries=ps,d.Radiuses=Bo,d.Sizes=Vt,d.Spaces=st,d.TABLE=Nt,d.ThemesColors=So,d.UiThemes=Ln,d.UseEncodeDecode=Za,d.UseFile=Qy,d.animations=T0,d.borderRadius=Un,d.boxShadows=E0,d.colors=Pn,d.dayjs=fe,d.dayjsLocales=Xo,d.default=P0,d.durations=Rn,d.easings=M0,d.fontFamilies=$0,d.fontSizes=zn,d.fontWeights=In,d.gradients=A0,d.letterSpacings=N0,d.lineHeights=Hn,d.mcGridColAdaptiveProps=hc,d.mcSvgIconAdaptiveProps=fc,d.mcTitleAdaptiveProps=gc,d.mediaQueries=jn,d.opacities=F0,d.sizes=bt,d.spacings=qn,d.useDrawer=Xy,d.useFieldErrors=vt,d.useHelper=ct,d.useModal=u0,d.useRandomNumber=Da,d.useTheme=Ve,d.useToast=x0,d.useTooltip=mo,d.zIndexes=O0,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
7
|
+
Check and add to app.use(MediacubeUI, { modalComponents: {...} })`);i0();const n=Date.now(),r={component:e.markRaw(uo.value[a]),componentName:a,componentProps:t,modelValue:!0,id:n,close:()=>{const o=Xt.modals.findLast(l=>l.id===n);o&&(o.modelValue=!1),setTimeout(()=>{Xt.modals=Xt.modals.filter(l=>l.id!==(o==null?void 0:o.id))},300)}};Xt.modals.push(r),co.isOpen=!0},c0=a=>{const t=Xt.modals.findLast(n=>n.componentName===a);t&&t.close()},d0=()=>{Xt.modals.forEach(a=>{a.close()})};function u0(){const a=e.getCurrentInstance();os.value=(a==null?void 0:a.appContext)||null;const t=e.inject("dsOptions",{});return t.modalComponents&&(uo.value=t.modalComponents),{showModal:s0,closeModal:c0,closeAllModals:d0}}function m0(a=0){if(!a)return Date.now();const t=Math.pow(10,a-1),n=Math.pow(10,a)-1;return+(String(Date.now())+String(Math.floor(Math.random()*(n-t+1))+t))}function Da(){return{timestamp:m0}}const ls=bn(a=>{a()},150),$n=e.ref([]),Ja=ct();class is{constructor(t,n){le(this,"id");le(this,"target");le(this,"content");le(this,"visible",e.ref(!1));le(this,"position",e.ref({top:null,left:null,translate:"translate(0, 0)"}));le(this,"placement");le(this,"size");le(this,"arrow");le(this,"color");le(this,"textColor");le(this,"showTooltip",()=>{var n;this.updateTooltipPosition(),this.visible.value=!0;let t=document.getElementById(String(this.id));if(!t){const r=document.createElement("div");r.classList.add("mc-tooltip"),r.id=String(this.id),r.innerText=this.content||"",r.style.setProperty("--tooltip-color",this.color),r.style.setProperty("--tooltip-text-color",this.textColor),r.setAttribute("tooltip-placement",this.placement),r.setAttribute("tooltip-size",this.size),r.setAttribute("tooltip-arrow",String(this.arrow)),(n=document.getElementById("tooltip-container"))==null||n.appendChild(r)}if(t=document.getElementById(String(this.id)),t){t.style.visibility="visible";for(const r in this.position.value)r&&Ja.hasProperty(this.position.value,r)&&(t.style[r]=`${this.position.value[r]}px`);t.style.transform=this.position.value.translate}});le(this,"hideTooltip",()=>{this.visible.value=!1;const t=document.getElementById(String(this.id));t&&(t.style.visibility="hidden",setTimeout(()=>{!this.visible.value&&this.destroy()},3e3))});le(this,"updateTooltipPosition",()=>{const{top:t,left:n,width:r,height:o}=this.target.getBoundingClientRect(),l=t+window.scrollY,i=n+window.scrollX,c=4,s=this.arrow?4:0;switch(this.placement){case d.TooltipPositions.Right:this.position.value={top:l,left:i+r+(c+s),translate:`translate(0, calc(-50% + ${o/2}px))`};break;case d.TooltipPositions.Left:this.position.value={top:l,left:i-(c+s),translate:`translate(-100%, calc(-50% + ${o/2}px))`};break;case d.TooltipPositions.Top:this.position.value={top:l-(c+s),left:i+r/2,translate:"translate(-50%, -100%)"};break;case d.TooltipPositions.Bottom:this.position.value={top:l+o+(c+s),left:i+r/2,translate:"translate(-50%, 0%)"};break}});le(this,"destroy",()=>{this.target.removeEventListener("mouseenter",this.showTooltip),this.target.removeEventListener("mouseleave",this.hideTooltip),$n.value=$n.value.filter(n=>n.id!==this.id);const t=document.getElementById(String(this.id));t&&t.remove()});this.target=t,this.content=n.content,this.placement=n.placement||d.TooltipPositions.Top,this.size=n.size||d.TooltipSizes.M,this.id=Da().timestamp(5),this.arrow=Ja.hasProperty(n,"arrow")?!!n.arrow:!0,this.color=n.color||Ea.black,this.textColor=n.textColor||Ea.white,this.target.onmouseenter=this.showTooltip,this.target.onmouseleave=this.hideTooltip,$n.value.push(this)}}const An=ls(()=>{$n.value.forEach(a=>a.updateTooltipPosition())}),p0=()=>{const a=document.createElement("div");a.id="tooltip-container",document.body.appendChild(a)},h0=()=>{document.getElementById("tooltip-container")||p0()};function mo(){const a=e.ref(null);return{mounted(t,n){h0(),n.value.content&&(a.value=new is(t,n.value),window.addEventListener("scroll",()=>An),window.addEventListener("resize",()=>An))},updated(t,n){!a.value||!a.value.id||ls(()=>{var i;const r=["arrow","color","content","placement","size","textColor"],o=Ja.pickDeep({...a.value},r),l=Ja.pickDeep(n.value,r);Ja.isEqual(o,l)||((i=a.value)==null||i.destroy(),a.value=new is(t,n.value))})},beforeUnmount(){var t;(t=a.value)==null||t.destroy(),window.removeEventListener("scroll",()=>An),window.removeEventListener("resize",()=>An)}}}const f0={class:"mc-toasts-container"},g0={key:0,class:"mc-toasts-container__top mc-toasts-container__top--left"},y0={key:1,class:"mc-toasts-container__top mc-toasts-container__top--center"},k0={key:2,class:"mc-toasts-container__top mc-toasts-container__top--right"},b0={key:3,class:"mc-toasts-container__bottom mc-toasts-container__bottom--left"},_0={key:4,class:"mc-toasts-container__bottom mc-toasts-container__bottom--center"},w0={key:5,class:"mc-toasts-container__bottom mc-toasts-container__bottom--right"},C0=e.defineComponent({__name:"McToastContainer",props:{reactiveProps:{type:Object,default:()=>({toasts:[]})}},setup(a){const t=a,n=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.TopLeft).reverse()),r=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.TopCenter).reverse()),o=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.TopRight).reverse()),l=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.BottomLeft)),i=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position==="bottom-center")),c=e.computed(()=>t.reactiveProps.toasts.filter(s=>s.position===d.ToastPositions.BottomRight));return(s,p)=>(e.openBlock(),e.createElementBlock("div",f0,[n.value.length?(e.openBlock(),e.createElementBlock("div",g0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),r.value.length?(e.openBlock(),e.createElementBlock("div",y0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),o.value.length?(e.openBlock(),e.createElementBlock("div",k0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),l.value.length?(e.openBlock(),e.createElementBlock("div",b0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),i.value.length?(e.openBlock(),e.createElementBlock("div",_0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0),c.value.length?(e.openBlock(),e.createElementBlock("div",w0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,u=>(e.openBlock(),e.createBlock(sa,e.mergeProps({key:u.id,ref_for:!0},u,{toast:u,onClose:()=>u.destroy()}),null,16,["toast","onClose"]))),128))])):e.createCommentVNode("",!0)]))}}),Nn={position:d.ToastPositions.BottomCenter,duration:3e3},po=e.shallowRef({duration:Nn.duration,position:Nn.position}),Ta=e.reactive({toasts:[]});class ss{constructor({id:t,duration:n,position:r,variation:o="white",icon:l,title:i="",description:c="",closable:s,show_time:p,actions:u=[]}){le(this,"id");le(this,"duration");le(this,"position");le(this,"variation");le(this,"icon");le(this,"title");le(this,"description");le(this,"closable");le(this,"show_time");le(this,"actions");le(this,"destroy",()=>{Ta.toasts=Ta.toasts.filter(t=>t.id!==this.id)});this.id=t||Da().timestamp(5),this.duration=n||po.value.duration||Nn.duration,this.position=r||po.value.position||Nn.position,this.variation=o,this.icon=l,this.title=i,this.description=c,this.closable=s||!1,this.show_time=p||!1,this.actions=u}}function S0(a){cs();const t=new ss(a);Ta.toasts.push(t)}function B0(a){cs();const t="info",n="black",r=new ss({icon:t,variation:n,...a});Ta.toasts.push(r)}function v0(){Ta.toasts.forEach(a=>a.destroy())}const V0=()=>{const a=document.createElement("div");a.id="toast-container",document.body.appendChild(a);const t=e.h(C0,{reactiveProps:Ta});e.render(t,a)},cs=()=>{document.getElementById("toast-container")||V0()};function x0(){const a=e.inject("dsOptions",{});return a.toasts&&(po.value=a.toasts),{show:S0,info:B0,hideAll:v0}}const D0="data:image/png;base64,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",T0={"$animation-slide-up":"slide-up 0.3s","$animation-slide-up-with-margin":"slide-up-with-margin 0.3s","$animation-spinner":"rotate 1.2s infinite cubic-bezier(0.55, 0, 0.1, 1)","$animation-glow":"glow 1.5s ease-in-out infinite"},E0={"$shadow-xs":"0 2px 8px rgba(0, 0, 0, 0.16)","$shadow-s":"0 4px 12px rgba(0, 0, 0, 0.16)","$shadow-m":"0 12px 32px rgba(0, 0, 0, 0.24)","$shadow-l":"0 24px 40px rgba(0, 0, 0, 0.16)","$shadow-xs-blue":"0px 2px 8px rgba(51, 68, 153, 0.1)","$shadow-s-blue":"0 4px 12px rgba(51, 68, 153, 0.1)","$shadow-m-blue":"0 12px 32px rgba(51, 68, 153, 0.2)","$shadow-xs-purple":"0px 2px 8px rgba(91, 44, 205, 0.1)","$shadow-s-purple":"0 4px 12px rgba(91, 44, 205, 0.1)","$shadow-m-purple":"0 12px 32px rgba(91, 44, 205, 0.2)","$token-shadows":{xs:"0 2px 8px rgba(0, 0, 0, 0.16)",s:"0 4px 12px rgba(0, 0, 0, 0.16)",m:"0 12px 32px rgba(0, 0, 0, 0.24)",l:"0 24px 40px rgba(0, 0, 0, 0.16)","xs-blue":"0px 2px 8px rgba(51, 68, 153, 0.1)","s-blue":"0 4px 12px rgba(51, 68, 153, 0.1)","m-blue":"0 12px 32px rgba(51, 68, 153, 0.2)","xs-purple":"0px 2px 8px rgba(91, 44, 205, 0.1)","s-purple":"0 4px 12px rgba(91, 44, 205, 0.1)","m-purple":"0 12px 32px rgba(91, 44, 205, 0.2)"}},M0={"$easing-swift":"cubic-bezier(0.55, 0, 0.1, 1)"},$0={"$font-family-main":"'Inter', sans-serif","$font-family-additional":"'Source Serif Pro', serif"},A0={"$gradient-pink":"linear-gradient(180deg, #F5576C 0%, #F093FB 100%)","$gradient-violet":"linear-gradient(180deg, #E41AFE 0%, #8035F8 100%)","$gradient-blue":"linear-gradient(180deg, #1ADBFE 0%, #3580F8 100%)","$gradient-yellow":"linear-gradient(180deg, #FEE41A 0%, #F89B35 100%)","$gradient-green":"linear-gradient(180deg, #C9DD4C 0%, #63BE7E 100%)","$gradient-red":"linear-gradient(180deg, #F26567 0%, #F79440 100%)","$gradient-purple":"linear-gradient(270deg, #9a47ed 0%, #8446ff 100%)","$gradient-purple-pink":"linear-gradient(90deg, #722eff 2%, #fe6ffc 100%)","$gradient-blue-purple":"linear-gradient(90deg, #18bfe3 20%, #8756ff 70%)","$gradient-dark-blue":"linear-gradient(90deg, #5550EF 0%, #7F4EFF 100%)","$gradient-primary-radial":"radial-gradient(rgb(179, 211, 255), rgb(62, 132, 244))"},N0={"$letter-spacing-m":"0.4px","$letter-spacing-l":"1px"},F0={"$opacity-disabled":"0.6","$opacity-active":"0.7","$opacity-hover":"0.8"},O0={"$z-index-sticky-tabs":"49","$z-index-dropdown":"100","$z-index-sticky":"100","$z-index-overlay-page":"7000","$z-index-modal":"8000","$z-index-top-line":"8000","$z-index-header":"10000","$z-index-notification":"10001","$z-index-overlay":"10002","$z-index-toasted":"10003"},ds=ct(),P0={install(a,t={}){const n={drawerComponents:{},modalComponents:{},toasts:{},defaultAvatar:D0,router:null,colors:So,themes:Ln,theme:d.Themes.Light},r=e.shallowReactive({...n,...t,colors:t.colors?ds.mergeReactiveDefaults(n.colors,t.colors):n.colors,themes:t.themes?ds.mergeReactiveDefaults(n.themes,t.themes):n.themes});a.config.globalProperties.$dsOptions=r,a.provide("dsOptions",r)}};d.AvatarSizes=Co,d.Colors=Ea,d.Durations=us,d.FontSizes=ms,d.FontWeights=Yn,d.LineHeights=an,d.McAccordion=tg,d.McAvatar=Wn,d.McBadge=ks,d.McBottomLoader=vo,d.McButton=Ee,d.McCell=rg,d.McChip=Ma,d.McCollapse=ig,d.McDatepicker=ci,d.McDraggable=Wp,d.McDrawer=Xi,d.McDrawerContainer=es,d.McDrawerContentTemplate=ry,d.McDropdown=Tn,d.McDropdownPanel=Oi,d.McFieldCheckbox=th,d.McFieldRadio=ki,d.McFieldRadioGroup=uh,d.McFieldRange=$h,d.McFieldSelect=Jr,d.McFieldText=Va,d.McFieldToggle=Af,d.McFilter=wg,d.McFilterChip=En,d.McFilterTags=Pi,d.McFilterTypeDate=Li,d.McFilterTypeRange=Ri,d.McFilterTypeRelation=zi,d.McFilterTypeText=Ii,d.McGridCol=Mn,d.McGridRow=Xa,d.McInfinityLoadingTrigger=$i,d.McModal=dy,d.McModalContainer=Qi,d.McNoData=Ni,d.McNotification=If,d.McOverlay=Yi,d.McPreview=Kt,d.McProgress=Uf,d.McSeparator=no,d.McSideBar=Pg,d.McSideBarBottom=Hi,d.McSideBarButton=Qa,d.McSideBarCenter=Wi,d.McSideBarTop=Ki,d.McSlideUpDown=ro,d.McStack=Gf,d.McSvgIcon=Be,d.McTab=Wg,d.McTable=xy,d.McTableCard=Ay,d.McTableCardHeader=My,d.McTableSkeletonLoading=Zi,d.McTableSort=Ji,d.McTabs=Zg,d.McTitle=ke,d.McToast=sa,d.McTooltip=Wt,d.McTopBar=Yy,d.McVirtualScroll=Hy,d.McWrapScroll=Gi,d.MediaQueries=ps,d.Radiuses=Bo,d.Sizes=Vt,d.Spaces=st,d.TABLE=Nt,d.ThemesColors=So,d.UiThemes=Ln,d.UseEncodeDecode=Za,d.UseFile=Qy,d.animations=T0,d.borderRadius=Un,d.boxShadows=E0,d.colors=Pn,d.dayjs=fe,d.dayjsLocales=Xo,d.default=P0,d.durations=Rn,d.easings=M0,d.fontFamilies=$0,d.fontSizes=zn,d.fontWeights=In,d.gradients=A0,d.letterSpacings=N0,d.lineHeights=Hn,d.mcGridColAdaptiveProps=hc,d.mcSvgIconAdaptiveProps=fc,d.mcTitleAdaptiveProps=gc,d.mediaQueries=jn,d.opacities=F0,d.sizes=bt,d.spacings=qn,d.useDrawer=Xy,d.useFieldErrors=vt,d.useHelper=ct,d.useModal=u0,d.useRandomNumber=Da,d.useTheme=Ve,d.useToast=x0,d.useTooltip=mo,d.zIndexes=O0,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|