1
0
mirror of https://github.com/ZeroCatDev/Classworks.git synced 2026-08-12 17:40:32 +00:00
Classworks/assets/VSkeletonLoader-BwErr64p.js

2 lines
2.6 KiB
JavaScript

import{H as k,b as x,af as S,ag as w,a as C}from"./index-BvGH7GyK.js";import{j as L,k as B,an as P,u as V,w as y,p as T,m as A}from"./vendor-vuetify-KiFW-YAv.js";import{k as r,m as _,F as j,e as F,n as D}from"./vendor-vue-Hxtt57UU.js";const E={actions:"button@2",article:"heading, paragraph",avatar:"avatar",button:"button",card:"image, heading","card-avatar":"image, list-item-avatar",chip:"chip","chip-group":"chip@8","date-picker":"list-item, heading, divider, date-picker-options, date-picker-days, actions","date-picker-options":"text, avatar@2","date-picker-days":"avatar@28",divider:"divider",heading:"heading",image:"image","list-item":"text","list-item-avatar":"avatar, text","list-item-two-line":"sentences","list-item-avatar-two-line":"avatar, sentences","list-item-three-line":"paragraph","list-item-avatar-three-line":"avatar, paragraph",ossein:"ossein",paragraph:"text@3",sentences:"text@2",subtitle:"text",table:"table-heading, table-thead, table-tbody, table-tfoot","table-heading":"heading, text","table-thead":"heading@6","table-tbody":"table-row-divider@6","table-row-divider":"table-row, divider","table-row":"table-cell@6","table-cell":"text","table-tfoot":"text@2, avatar@2",text:"text"};function s(e){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return r("div",{class:D(["v-skeleton-loader__bone",`v-skeleton-loader__${e}`])},[a])}function d(e,a){const[t,n]=e.split("@");return Array.from({length:n}).map(()=>i(t,a))}function i(e,a){if(!e)return[];if(e.includes(","))return c(e,a);if(e.includes("@"))return d(e,a);if(!(e in a))return[s(e)];const t=a[e];let n=[];return e===t||(t.includes(",")?n=c(t,a):t.includes("@")?n=d(t,a):n.push(i(t,a))),[s(e,n)]}function c(e,a){return e.replace(/\s/g,"").split(",").map(t=>i(t,a))}const $=T({boilerplate:Boolean,color:String,loading:Boolean,loadingText:{type:String,default:"$vuetify.loading"},type:{type:[String,Array],default:"ossein"},types:Object,...C(),...w(),...A()},"VSkeletonLoader"),N=L()({name:"VSkeletonLoader",inheritAttrs:!1,props:$(),setup(e,a){let{attrs:t,slots:n}=a;const{backgroundColorClasses:u,backgroundColorStyles:g}=k(()=>e.color),{dimensionStyles:m}=x(e),{elevationClasses:v}=S(e),{themeClasses:b}=B(e),{t:h}=P(),p=F(()=>i(y(e.type).join(","),{...E,...e.types}));return V(()=>{var l;const o=!n.default||e.loading,f=e.boilerplate||!o?{}:{ariaLive:"polite",ariaLabel:h(e.loadingText),role:"alert"};return o?r("div",_({class:["v-skeleton-loader",{"v-skeleton-loader--boilerplate":e.boilerplate},b.value,u.value,v.value],style:[g.value,m.value]},f,t),[p.value]):r(j,null,[(l=n.default)==null?void 0:l.call(n)])}),{}}});export{N as V};