1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- import{U as v,T as c,Y as ee,Z as P,V as H,ax as te,ay as re,d as Z,W as ne,$ as K,C as F,a5 as T,a1 as oe,bq as se,bn as ie,k as g,dE as ae,j as le,bh as ce,g as de,D as ue,f as A,O as pe,L as X,co as be,cP as fe,cU as ge}from"./index-e497b666.js";import{g as me}from"./get-slot-1efb97e5.js";function j(e,t="default",r=[]){const{children:n}=e;if(n!==null&&typeof n=="object"&&!Array.isArray(n)){const s=n[t];if(typeof s=="function")return s()}return r}const J="DESCRIPTION_ITEM_FLAG";function he(e){return typeof e=="object"&&e&&!Array.isArray(e)?e.type&&e.type[J]:!1}const ve=v([c("descriptions",{fontSize:"var(--n-font-size)"},[c("descriptions-separator",`
- display: inline-block;
- margin: 0 8px 0 2px;
- `),c("descriptions-table-wrapper",[c("descriptions-table",[c("descriptions-table-row",[c("descriptions-table-header",{padding:"var(--n-th-padding)"}),c("descriptions-table-content",{padding:"var(--n-td-padding)"})])])]),ee("bordered",[c("descriptions-table-wrapper",[c("descriptions-table",[c("descriptions-table-row",[v("&:last-child",[c("descriptions-table-content",{paddingBottom:0})])])])])]),P("left-label-placement",[c("descriptions-table-content",[v("> *",{verticalAlign:"top"})])]),P("left-label-align",[v("th",{textAlign:"left"})]),P("center-label-align",[v("th",{textAlign:"center"})]),P("right-label-align",[v("th",{textAlign:"right"})]),P("bordered",[c("descriptions-table-wrapper",`
- border-radius: var(--n-border-radius);
- overflow: hidden;
- background: var(--n-merged-td-color);
- border: 1px solid var(--n-merged-border-color);
- `,[c("descriptions-table",[c("descriptions-table-row",[v("&:not(:last-child)",[c("descriptions-table-content",{borderBottom:"1px solid var(--n-merged-border-color)"}),c("descriptions-table-header",{borderBottom:"1px solid var(--n-merged-border-color)"})]),c("descriptions-table-header",`
- font-weight: 400;
- background-clip: padding-box;
- background-color: var(--n-merged-th-color);
- `,[v("&:not(:last-child)",{borderRight:"1px solid var(--n-merged-border-color)"})]),c("descriptions-table-content",[v("&:not(:last-child)",{borderRight:"1px solid var(--n-merged-border-color)"})])])])])]),c("descriptions-header",`
- font-weight: var(--n-th-font-weight);
- font-size: 18px;
- transition: color .3s var(--n-bezier);
- line-height: var(--n-line-height);
- margin-bottom: 16px;
- color: var(--n-title-text-color);
- `),c("descriptions-table-wrapper",`
- transition:
- background-color .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- `,[c("descriptions-table",`
- width: 100%;
- border-collapse: separate;
- border-spacing: 0;
- box-sizing: border-box;
- `,[c("descriptions-table-row",`
- box-sizing: border-box;
- transition: border-color .3s var(--n-bezier);
- `,[c("descriptions-table-header",`
- font-weight: var(--n-th-font-weight);
- line-height: var(--n-line-height);
- display: table-cell;
- box-sizing: border-box;
- color: var(--n-th-text-color);
- transition:
- color .3s var(--n-bezier),
- background-color .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- `),c("descriptions-table-content",`
- vertical-align: top;
- line-height: var(--n-line-height);
- display: table-cell;
- box-sizing: border-box;
- color: var(--n-td-text-color);
- transition:
- color .3s var(--n-bezier),
- background-color .3s var(--n-bezier),
- border-color .3s var(--n-bezier);
- `,[H("content",`
- transition: color .3s var(--n-bezier);
- display: inline-block;
- color: var(--n-td-text-color);
- `)]),H("label",`
- font-weight: var(--n-th-font-weight);
- transition: color .3s var(--n-bezier);
- display: inline-block;
- margin-right: 14px;
- color: var(--n-th-text-color);
- `)])])])]),c("descriptions-table-wrapper",`
- --n-merged-th-color: var(--n-th-color);
- --n-merged-td-color: var(--n-td-color);
- --n-merged-border-color: var(--n-border-color);
- `),te(c("descriptions-table-wrapper",`
- --n-merged-th-color: var(--n-th-color-modal);
- --n-merged-td-color: var(--n-td-color-modal);
- --n-merged-border-color: var(--n-border-color-modal);
- `)),re(c("descriptions-table-wrapper",`
- --n-merged-th-color: var(--n-th-color-popover);
- --n-merged-td-color: var(--n-td-color-popover);
- --n-merged-border-color: var(--n-border-color-popover);
- `))]),ye=Object.assign(Object.assign({},K.props),{title:String,column:{type:Number,default:3},columns:Number,labelPlacement:{type:String,default:"top"},labelAlign:{type:String,default:"left"},separator:{type:String,default:":"},size:{type:String,default:"medium"},bordered:Boolean,labelStyle:[Object,String],contentStyle:[Object,String]}),Ye=Z({name:"Descriptions",props:ye,setup(e){const{mergedClsPrefixRef:t,inlineThemeDisabled:r}=ne(e),n=K("Descriptions","-descriptions",ve,ae,e,t),s=F(()=>{const{size:o,bordered:l}=e,{common:{cubicBezierEaseInOut:d},self:{titleTextColor:i,thColor:u,thColorModal:b,thColorPopover:f,thTextColor:m,thFontWeight:D,tdTextColor:S,tdColor:p,tdColorModal:_,tdColorPopover:R,borderColor:h,borderColorModal:y,borderColorPopover:O,borderRadius:x,lineHeight:w,[T("fontSize",o)]:C,[T(l?"thPaddingBordered":"thPadding",o)]:$,[T(l?"tdPaddingBordered":"tdPadding",o)]:I}}=n.value;return{"--n-title-text-color":i,"--n-th-padding":$,"--n-td-padding":I,"--n-font-size":C,"--n-bezier":d,"--n-th-font-weight":D,"--n-line-height":w,"--n-th-text-color":m,"--n-td-text-color":S,"--n-th-color":u,"--n-th-color-modal":b,"--n-th-color-popover":f,"--n-td-color":p,"--n-td-color-modal":_,"--n-td-color-popover":R,"--n-border-radius":x,"--n-border-color":h,"--n-border-color-modal":y,"--n-border-color-popover":O}}),a=r?oe("descriptions",F(()=>{let o="";const{size:l,bordered:d}=e;return d&&(o+="a"),o+=l[0],o}),s,e):void 0;return{mergedClsPrefix:t,cssVars:r?void 0:s,themeClass:a==null?void 0:a.themeClass,onRender:a==null?void 0:a.onRender,compitableColumn:se(e,["columns","column"]),inlineThemeDisabled:r}},render(){const e=this.$slots.default,t=e?ie(e()):[];t.length;const{compitableColumn:r,labelPlacement:n,labelAlign:s,size:a,bordered:o,title:l,cssVars:d,mergedClsPrefix:i,separator:u,onRender:b}=this;b==null||b();const f=t.filter(p=>he(p)),m={span:0,row:[],secondRow:[],rows:[]},S=f.reduce((p,_,R)=>{const h=_.props||{},y=f.length-1===R,O=["label"in h?h.label:j(_,"label")],x=[j(_)],w=h.span||1,C=p.span;p.span+=w;const $=h.labelStyle||h["label-style"]||this.labelStyle,I=h.contentStyle||h["content-style"]||this.contentStyle;if(n==="left")o?p.row.push(g("th",{class:`${i}-descriptions-table-header`,colspan:1,style:$},O),g("td",{class:`${i}-descriptions-table-content`,colspan:y?(r-C)*2+1:w*2-1,style:I},x)):p.row.push(g("td",{class:`${i}-descriptions-table-content`,colspan:y?(r-C)*2:w*2},g("span",{class:`${i}-descriptions-table-content__label`,style:$},[...O,u&&g("span",{class:`${i}-descriptions-separator`},u)]),g("span",{class:`${i}-descriptions-table-content__content`,style:I},x)));else{const k=y?(r-C)*2:w*2;p.row.push(g("th",{class:`${i}-descriptions-table-header`,colspan:k,style:$},O)),p.secondRow.push(g("td",{class:`${i}-descriptions-table-content`,colspan:k,style:I},x))}return(p.span>=r||y)&&(p.span=0,p.row.length&&(p.rows.push(p.row),p.row=[]),n!=="left"&&p.secondRow.length&&(p.rows.push(p.secondRow),p.secondRow=[])),p},m).rows.map(p=>g("tr",{class:`${i}-descriptions-table-row`},p));return g("div",{style:d,class:[`${i}-descriptions`,this.themeClass,`${i}-descriptions--${n}-label-placement`,`${i}-descriptions--${s}-label-align`,`${i}-descriptions--${a}-size`,o&&`${i}-descriptions--bordered`]},l||this.$slots.header?g("div",{class:`${i}-descriptions-header`},l||me(this,"header")):null,g("div",{class:`${i}-descriptions-table-wrapper`},g("table",{class:`${i}-descriptions-table`},g("tbody",null,S))))}}),we={label:String,span:{type:Number,default:1},labelStyle:[Object,String],contentStyle:[Object,String]},Ve=Z({name:"DescriptionsItem",[J]:!0,props:we,render(){return null}});var N;const E=typeof window<"u",Se=e=>typeof e=="function",_e=e=>typeof e=="string",Oe=()=>{};E&&((N=window==null?void 0:window.navigator)!=null&&N.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function z(e){return typeof e=="function"?e():le(e)}function xe(e){return e}function M(e){return be()?(fe(e),!0):!1}function Ce(e,t=!0){ce()?de(e):t?e():ue(e)}const $e=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,Ie=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Pe=(e,t,r,n)=>{let s=e<12?"AM":"PM";return n&&(s=s.split("").reduce((a,o)=>a+=`${o}.`,"")),r?s.toLowerCase():s},Ae=(e,t,r={})=>{var n;const s=e.getFullYear(),a=e.getMonth(),o=e.getDate(),l=e.getHours(),d=e.getMinutes(),i=e.getSeconds(),u=e.getMilliseconds(),b=e.getDay(),f=(n=r.customMeridiem)!=null?n:Pe,m={YY:()=>String(s).slice(-2),YYYY:()=>s,M:()=>a+1,MM:()=>`${a+1}`.padStart(2,"0"),MMM:()=>e.toLocaleDateString(r.locales,{month:"short"}),MMMM:()=>e.toLocaleDateString(r.locales,{month:"long"}),D:()=>String(o),DD:()=>`${o}`.padStart(2,"0"),H:()=>String(l),HH:()=>`${l}`.padStart(2,"0"),h:()=>`${l%12||12}`.padStart(1,"0"),hh:()=>`${l%12||12}`.padStart(2,"0"),m:()=>String(d),mm:()=>`${d}`.padStart(2,"0"),s:()=>String(i),ss:()=>`${i}`.padStart(2,"0"),SSS:()=>`${u}`.padStart(3,"0"),d:()=>b,dd:()=>e.toLocaleDateString(r.locales,{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(r.locales,{weekday:"short"}),dddd:()=>e.toLocaleDateString(r.locales,{weekday:"long"}),A:()=>f(l,d),AA:()=>f(l,d,!1,!0),a:()=>f(l,d,!0),aa:()=>f(l,d,!0,!0)};return t.replace(Ie,(D,S)=>S||m[D]())},ze=e=>{if(e===null)return new Date(NaN);if(e===void 0)return new Date;if(e instanceof Date)return new Date(e);if(typeof e=="string"&&!/Z$/i.test(e)){const t=e.match($e);if(t){const r=t[2]-1||0,n=(t[7]||"0").substring(0,3);return new Date(t[1],r,t[3]||1,t[4]||0,t[5]||0,t[6]||0,n)}}return new Date(e)};function Ge(e,t="HH:mm:ss",r={}){return F(()=>Ae(ze(z(e)),z(t),r))}function De(e,t=1e3,r={}){const{immediate:n=!0,immediateCallback:s=!1}=r;let a=null;const o=A(!1);function l(){a&&(clearInterval(a),a=null)}function d(){o.value=!1,l()}function i(){const u=z(t);u<=0||(o.value=!0,s&&e(),l(),a=setInterval(e,u))}if(n&&E&&i(),pe(t)||Se(t)){const u=X(t,()=>{o.value&&E&&i()});M(u)}return M(d),{isActive:o,pause:d,resume:i}}function Ee(e){var t;const r=z(e);return(t=r==null?void 0:r.$el)!=null?t:r}const L=E?window:void 0;function B(...e){let t,r,n,s;if(_e(e[0])||Array.isArray(e[0])?([r,n,s]=e,t=L):[t,r,n,s]=e,!t)return Oe;Array.isArray(r)||(r=[r]),Array.isArray(n)||(n=[n]);const a=[],o=()=>{a.forEach(u=>u()),a.length=0},l=(u,b,f,m)=>(u.addEventListener(b,f,m),()=>u.removeEventListener(b,f,m)),d=X(()=>[Ee(t),z(s)],([u,b])=>{o(),u&&a.push(...r.flatMap(f=>n.map(m=>l(u,f,m,b))))},{immediate:!0,flush:"post"}),i=()=>{d(),o()};return M(i),i}const W=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Q="__vueuse_ssr_handlers__";W[Q]=W[Q]||{};function Me(e,t={}){const{immediate:r=!0,window:n=L}=t,s=A(!1);let a=0,o=null;function l(u){if(!s.value||!n)return;const b=u-a;e({delta:b,timestamp:u}),a=u,o=n.requestAnimationFrame(l)}function d(){!s.value&&n&&(s.value=!0,o=n.requestAnimationFrame(l))}function i(){s.value=!1,o!=null&&n&&(n.cancelAnimationFrame(o),o=null)}return r&&d(),M(i),{isActive:ge(s),pause:i,resume:d}}var Re=Object.defineProperty,Y=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,V=(e,t,r)=>t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Le=(e,t)=>{for(var r in t||(t={}))Te.call(t,r)&&V(e,r,t[r]);if(Y)for(var r of Y(t))Fe.call(t,r)&&V(e,r,t[r]);return e};function qe(e={}){const{controls:t=!1,interval:r="requestAnimationFrame"}=e,n=A(new Date),s=()=>n.value=new Date,a=r==="requestAnimationFrame"?Me(s,{immediate:!0}):De(s,r,{immediate:!0});return t?Le({now:n},a):n}var G;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(G||(G={}));var ke=Object.defineProperty,q=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,U=(e,t,r)=>t in e?ke(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Ne=(e,t)=>{for(var r in t||(t={}))He.call(t,r)&&U(e,r,t[r]);if(q)for(var r of q(t))je.call(t,r)&&U(e,r,t[r]);return e};const Be={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};Ne({linear:xe},Be);function Ue(e={}){const{window:t=L,initialWidth:r=1/0,initialHeight:n=1/0,listenOrientation:s=!0,includeScrollbar:a=!0}=e,o=A(r),l=A(n),d=()=>{t&&(a?(o.value=t.innerWidth,l.value=t.innerHeight):(o.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight))};return d(),Ce(d),B("resize",d,{passive:!0}),s&&B("orientationchange",d,{passive:!0}),{width:o,height:l}}export{Ve as _,Ye as a,Ge as b,qe as c,Ue as u};
|