generated from VLADIMIR/template_frontend
464 lines
48 KiB
JavaScript
464 lines
48 KiB
JavaScript
import{A as e,E as t,H as n,M as r,N as i,Q as a,R as o,S as s,T as c,V as l,X as u,Y as d,Z as f,_ as p,ct as m,k as h,o as g,ot as _,p as v,rt as y,v as b,w as x,y as S}from"./vue-router-CyfP71JJ.js";import{$ as C,E as w,G as T,I as E,J as D,K as O,M as ee,N as k,Q as A,R as j,X as M,Y as N,Z as P,j as F,o as I,r as L,z as R}from"./light-CPiNeYrP.js";import{a as z,i as B,l as te,n as V,o as H,r as U,t as W}from"./Follower-BU8lqjCU.js";import{a as ne,o as re,t as ie}from"./utils-CALXt-xa.js";import{O as ae,d as oe,f as G,g as K,k as q,r as se,t as J,w as Y}from"./Input-CbjoGhTU.js";import{a as X,c as Z,o as ce}from"./resolve-slot-tPBGpQg9.js";import{a as Q}from"./light-CeesScux.js";import{t as le}from"./use-compitable-Dm6CEJAS.js";import{c as ue,n as de,s as fe,t as pe}from"./use-message-CG9_uVsZ.js";import{t as $}from"./call-ChHlm4-m.js";import{t as me}from"./Card-BPELx-RI.js";import{t as he}from"./Add-7_W3iwiV.js";import{t as ge}from"./Space-DiK7i7Mu.js";import{B as _e,G as ve,J as ye,K as be,N as xe,P as Se,Q as Ce,S as we,V as Te,W as Ee,X as De,Y as Oe,i as ke,q as Ae,y as je}from"./index-DN1-lqty.js";import{a as Me,n as Ne,t as Pe}from"./HeaderMenu-Cw3qZ0wy.js";var Fe=V(`.v-x-scroll`,{overflow:`auto`,scrollbarWidth:`none`},[V(`&::-webkit-scrollbar`,{width:0,height:0})]),Ie=t({name:`XScroll`,props:{disabled:Boolean,onScroll:Function},setup(){let e=y(null);function t(e){!(e.currentTarget.offsetWidth<e.currentTarget.scrollWidth)||e.deltaY===0||(e.currentTarget.scrollLeft+=e.deltaY+e.deltaX,e.preventDefault())}let n=j();return Fe.mount({id:`vueuc/x-scroll`,head:!0,anchorMetaName:U,ssr:n}),Object.assign({selfRef:e,handleWheel:t},{scrollTo(...t){var n;(n=e.value)==null||n.scrollTo(...t)}})},render(){return h(`div`,{ref:`selfRef`,onScroll:this.onScroll,onWheel:this.disabled?void 0:this.handleWheel,class:`v-x-scroll`},this.$slots)}}),Le=/\s/;function Re(e){for(var t=e.length;t--&&Le.test(e.charAt(t)););return t}var ze=/^\s+/;function Be(e){return e&&e.slice(0,Re(e)+1).replace(ze,``)}var Ve=NaN,He=/^[-+]0x[0-9a-f]+$/i,Ue=/^0b[01]+$/i,We=/^0o[0-7]+$/i,Ge=parseInt;function Ke(e){if(typeof e==`number`)return e;if(Ee(e))return Ve;if(w(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=w(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Be(e);var n=Ue.test(e);return n||We.test(e)?Ge(e.slice(2),n?2:8):He.test(e)?Ve:+e}var qe=function(){return F.Date.now()},Je=`Expected a function`,Ye=Math.max,Xe=Math.min;function Ze(e,t,n){var r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0;if(typeof e!=`function`)throw TypeError(Je);t=Ke(t)||0,w(n)&&(u=!!n.leading,d=`maxWait`in n,a=d?Ye(Ke(n.maxWait)||0,t):a,f=`trailing`in n?!!n.trailing:f);function p(t){var n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function m(e){return l=e,s=setTimeout(_,t),u?p(e):o}function h(e){var n=e-c,r=e-l,i=t-n;return d?Xe(i,a-r):i}function g(e){var n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){var e=qe();if(g(e))return v(e);s=setTimeout(_,h(e))}function v(e){return s=void 0,f&&r?p(e):(r=i=void 0,o)}function y(){s!==void 0&&clearTimeout(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:v(qe())}function x(){var e=qe(),n=g(e);if(r=arguments,i=this,c=e,n){if(s===void 0)return m(c);if(d)return clearTimeout(s),s=setTimeout(_,t),p(c)}return s===void 0&&(s=setTimeout(_,t)),o}return x.cancel=y,x.flush=b,x}var Qe=`Expected a function`;function $e(e,t,n){var r=!0,i=!0;if(typeof e!=`function`)throw TypeError(Qe);return w(n)&&(r=`leading`in n?!!n.leading:r,i=`trailing`in n?!!n.trailing:i),Ze(e,t,{leading:r,maxWait:t,trailing:i})}var et=T([O(`auto-complete`,`
|
|
z-index: auto;
|
|
position: relative;
|
|
display: inline-flex;
|
|
width: 100%;
|
|
`),O(`auto-complete-menu`,`
|
|
margin: 4px 0;
|
|
box-shadow: var(--n-menu-box-shadow);
|
|
`,[se({originalTransition:`background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier)`})])]);function tt(e){return e.map(nt)}function nt(e){return typeof e==`string`?{label:e,value:e}:e.type===`group`?{type:`group`,label:e.label??e.name,value:e.value??e.name,key:e.key||e.name,children:e.children.map(e=>nt(e))}:e}var rt=t({name:`AutoComplete`,props:Object.assign(Object.assign({},L.props),{to:H.propTo,menuProps:Object,append:Boolean,bordered:{type:Boolean,default:void 0},clearable:{type:Boolean,default:void 0},defaultValue:{type:String,default:null},loading:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},placeholder:String,placement:{type:String,default:`bottom-start`},value:String,blurAfterSelect:Boolean,clearAfterSelect:Boolean,getShow:Function,showEmpty:Boolean,inputProps:Object,renderOption:Function,renderLabel:Function,size:String,options:{type:Array,default:()=>[]},zIndex:Number,status:String,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onSelect:[Function,Array],onBlur:[Function,Array],onFocus:[Function,Array],scrollbarProps:Object,onInput:[Function,Array]}),slots:Object,setup(e){let{mergedBorderedRef:t,namespaceRef:n,mergedClsPrefixRef:r,inlineThemeDisabled:i,mergedComponentPropsRef:a}=k(e),o=fe(e,{mergedSize:t=>{let{size:n}=e;if(n)return n;let{mergedSize:r}=t||{};return r?.value?r.value:a?.value?.AutoComplete?.size||`medium`}}),{mergedSizeRef:s,mergedDisabledRef:c,mergedStatusRef:l}=o,u=y(null),d=y(null),f=y(e.defaultValue),p=Y(_(e,`value`),f),m=y(!1),h=y(!1),g=L(`AutoComplete`,`-auto-complete`,et,we,e,r),v=b(()=>tt(e.options)),x=b(()=>{let{getShow:t}=e;return t?t(p.value||``):!!p.value}),S=b(()=>x.value&&m.value&&(e.showEmpty?!0:!!v.value.length)),C=b(()=>re(v.value,ie(`value`,`children`)));function w(t){let{"onUpdate:value":n,onUpdateValue:r,onInput:i}=e,{nTriggerFormInput:a,nTriggerFormChange:s}=o;r&&$(r,t),n&&$(n,t),i&&$(i,t),f.value=t,a(),s()}function T(t){let{onSelect:n}=e,{nTriggerFormInput:r,nTriggerFormChange:i}=o;n&&$(n,t),r(),i()}function E(t){let{onBlur:n}=e,{nTriggerFormBlur:r}=o;n&&$(n,t),r()}function D(t){let{onFocus:n}=e,{nTriggerFormFocus:r}=o;n&&$(n,t),r()}function O(){h.value=!0}function A(){window.setTimeout(()=>{h.value=!1},0)}function j(e){var t,n;switch(e.key){case`Enter`:if(!h.value){let t=d.value?.getPendingTmNode();t&&(M(t.rawNode),e.preventDefault())}break;case`ArrowDown`:(t=d.value)==null||t.next();break;case`ArrowUp`:(n=d.value)==null||n.prev();break}}function M(t){t?.value!==void 0&&(T(t.value),e.clearAfterSelect?w(null):t.label!==void 0&&w(e.append?`${p.value}${t.label}`:t.label),m.value=!1,e.blurAfterSelect&&B())}function N(){w(null)}function P(e){m.value=!0,D(e)}function F(e){m.value=!1,E(e)}function I(e){m.value=!0,w(e)}function R(e){M(e.rawNode)}function z(e){u.value?.contains(q(e))||(m.value=!1)}function B(){var e;u.value?.contains(document.activeElement)&&((e=document.activeElement)==null||e.blur())}let te=b(()=>{let{common:{cubicBezierEaseInOut:e},self:{menuBoxShadow:t}}=g.value;return{"--n-menu-box-shadow":t,"--n-bezier":e}}),V=i?ee(`auto-complete`,void 0,te,e):void 0,U=y(null),W={focus:()=>{var e;(e=U.value)==null||e.focus()},blur:()=>{var e;(e=U.value)==null||e.blur()}};return{focus:W.focus,blur:W.blur,inputInstRef:U,uncontrolledValue:f,mergedValue:p,isMounted:Ae(),adjustedTo:H(e),menuInstRef:d,triggerElRef:u,treeMate:C,mergedSize:s,mergedDisabled:c,active:S,mergedStatus:l,handleClear:N,handleFocus:P,handleBlur:F,handleInput:I,handleToggle:R,handleClickOutsideMenu:z,handleCompositionStart:O,handleCompositionEnd:A,handleKeyDown:j,mergedTheme:g,cssVars:i?void 0:te,themeClass:V?.themeClass,onRender:V?.onRender,mergedBordered:t,namespace:n,mergedClsPrefix:r}},render(){let{mergedClsPrefix:e}=this;return h(`div`,{class:`${e}-auto-complete`,ref:`triggerElRef`,onKeydown:this.handleKeyDown,onCompositionstart:this.handleCompositionStart,onCompositionend:this.handleCompositionEnd},h(z,null,{default:()=>[h(B,null,{default:()=>{let e=this.$slots.default;if(e)return oe(`default`,e,{handleInput:this.handleInput,handleFocus:this.handleFocus,handleBlur:this.handleBlur,value:this.mergedValue});let{mergedTheme:t}=this;return h(J,{ref:`inputInstRef`,status:this.mergedStatus,theme:t.peers.Input,themeOverrides:t.peerOverrides.Input,bordered:this.mergedBordered,value:this.mergedValue,placeholder:this.placeholder,size:this.mergedSize,disabled:this.mergedDisabled,clearable:this.clearable,loading:this.loading,inputProps:this.inputProps,onClear:this.handleClear,onFocus:this.handleFocus,onUpdateValue:this.handleInput,onBlur:this.handleBlur},{suffix:()=>{var e;return(e=this.$slots).suffix?.call(e)},prefix:()=>{var e;return(e=this.$slots).prefix?.call(e)}})}}),h(W,{show:this.active,to:this.adjustedTo,containerClass:this.namespace,zIndex:this.zIndex,teleportDisabled:this.adjustedTo===H.tdkey,placement:this.placement,width:`target`},{default:()=>h(Oe,{name:`fade-in-scale-up-transition`,appear:this.isMounted},{default:()=>{var t;if((t=this.onRender)==null||t.call(this),!this.active)return null;let{menuProps:n}=this;return a(h(ne,Object.assign({},n,{clsPrefix:e,ref:`menuInstRef`,theme:this.mergedTheme.peers.InternalSelectMenu,themeOverrides:this.mergedTheme.peerOverrides.InternalSelectMenu,"auto-pending":!0,class:[`${e}-auto-complete-menu`,this.themeClass,n?.class],style:[n?.style,this.cssVars],treeMate:this.treeMate,multiple:!1,renderLabel:this.renderLabel,renderOption:this.renderOption,size:`medium`,onToggle:this.handleToggle,scrollbarProps:this.scrollbarProps}),{empty:()=>{var e;return(e=this.$slots).empty?.call(e)}}),[[K,this.handleClickOutsideMenu,void 0,{capture:!0}]])}})})]}))}}),it=R(`n-checkbox-group`);t({name:`CheckboxGroup`,props:{min:Number,max:Number,size:String,value:Array,defaultValue:{type:Array,default:null},disabled:{type:Boolean,default:void 0},"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onChange:[Function,Array]},setup(e){let{mergedClsPrefixRef:t}=k(e),r=fe(e),{mergedSizeRef:i,mergedDisabledRef:a}=r,o=y(e.defaultValue),s=Y(b(()=>e.value),o),c=b(()=>s.value?.length||0),l=b(()=>Array.isArray(s.value)?new Set(s.value):new Set);function u(t,n){let{nTriggerFormInput:i,nTriggerFormChange:a}=r,{onChange:c,"onUpdate:value":l,onUpdateValue:u}=e;if(Array.isArray(s.value)){let e=Array.from(s.value),r=e.findIndex(e=>e===n);t?~r||(e.push(n),u&&$(u,e,{actionType:`check`,value:n}),l&&$(l,e,{actionType:`check`,value:n}),i(),a(),o.value=e,c&&$(c,e)):~r&&(e.splice(r,1),u&&$(u,e,{actionType:`uncheck`,value:n}),l&&$(l,e,{actionType:`uncheck`,value:n}),c&&$(c,e),o.value=e,i(),a())}else t?(u&&$(u,[n],{actionType:`check`,value:n}),l&&$(l,[n],{actionType:`check`,value:n}),c&&$(c,[n]),o.value=[n],i(),a()):(u&&$(u,[],{actionType:`uncheck`,value:n}),l&&$(l,[],{actionType:`uncheck`,value:n}),c&&$(c,[]),o.value=[],i(),a())}return n(it,{checkedCountRef:c,maxRef:_(e,`max`),minRef:_(e,`min`),valueSetRef:l,disabledRef:a,mergedSizeRef:i,toggleCheckbox:u}),{mergedClsPrefix:t}},render(){return h(`div`,{class:`${this.mergedClsPrefix}-checkbox-group`,role:`group`},this.$slots)}});var at=()=>h(`svg`,{viewBox:`0 0 64 64`,class:`check-icon`},h(`path`,{d:`M50.42,16.76L22.34,39.45l-8.1-11.46c-1.12-1.58-3.3-1.96-4.88-0.84c-1.58,1.12-1.95,3.3-0.84,4.88l10.26,14.51 c0.56,0.79,1.42,1.31,2.38,1.45c0.16,0.02,0.32,0.03,0.48,0.03c0.8,0,1.57-0.27,2.2-0.78l30.99-25.03c1.5-1.21,1.74-3.42,0.52-4.92 C54.13,15.78,51.93,15.55,50.42,16.76z`})),ot=()=>h(`svg`,{viewBox:`0 0 100 100`,class:`line-icon`},h(`path`,{d:`M80.2,55.5H21.4c-2.8,0-5.1-2.5-5.1-5.5l0,0c0-3,2.3-5.5,5.1-5.5h58.7c2.8,0,5.1,2.5,5.1,5.5l0,0C85.2,53.1,82.9,55.5,80.2,55.5z`})),st=T([O(`checkbox`,`
|
|
font-size: var(--n-font-size);
|
|
outline: none;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
flex-wrap: nowrap;
|
|
align-items: flex-start;
|
|
word-break: break-word;
|
|
line-height: var(--n-size);
|
|
--n-merged-color-table: var(--n-color-table);
|
|
`,[N(`show-label`,`line-height: var(--n-label-line-height);`),T(`&:hover`,[O(`checkbox-box`,[D(`border`,`border: var(--n-border-checked);`)])]),T(`&:focus:not(:active)`,[O(`checkbox-box`,[D(`border`,`
|
|
border: var(--n-border-focus);
|
|
box-shadow: var(--n-box-shadow-focus);
|
|
`)])]),N(`inside-table`,[O(`checkbox-box`,`
|
|
background-color: var(--n-merged-color-table);
|
|
`)]),N(`checked`,[O(`checkbox-box`,`
|
|
background-color: var(--n-color-checked);
|
|
`,[O(`checkbox-icon`,[T(`.check-icon`,`
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
`)])])]),N(`indeterminate`,[O(`checkbox-box`,[O(`checkbox-icon`,[T(`.check-icon`,`
|
|
opacity: 0;
|
|
transform: scale(.5);
|
|
`),T(`.line-icon`,`
|
|
opacity: 1;
|
|
transform: scale(1);
|
|
`)])])]),N(`checked, indeterminate`,[T(`&:focus:not(:active)`,[O(`checkbox-box`,[D(`border`,`
|
|
border: var(--n-border-checked);
|
|
box-shadow: var(--n-box-shadow-focus);
|
|
`)])]),O(`checkbox-box`,`
|
|
background-color: var(--n-color-checked);
|
|
border-left: 0;
|
|
border-top: 0;
|
|
`,[D(`border`,{border:`var(--n-border-checked)`})])]),N(`disabled`,{cursor:`not-allowed`},[N(`checked`,[O(`checkbox-box`,`
|
|
background-color: var(--n-color-disabled-checked);
|
|
`,[D(`border`,{border:`var(--n-border-disabled-checked)`}),O(`checkbox-icon`,[T(`.check-icon, .line-icon`,{fill:`var(--n-check-mark-color-disabled-checked)`})])])]),O(`checkbox-box`,`
|
|
background-color: var(--n-color-disabled);
|
|
`,[D(`border`,`
|
|
border: var(--n-border-disabled);
|
|
`),O(`checkbox-icon`,[T(`.check-icon, .line-icon`,`
|
|
fill: var(--n-check-mark-color-disabled);
|
|
`)])]),D(`label`,`
|
|
color: var(--n-text-color-disabled);
|
|
`)]),O(`checkbox-box-wrapper`,`
|
|
position: relative;
|
|
width: var(--n-size);
|
|
flex-shrink: 0;
|
|
flex-grow: 0;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
`),O(`checkbox-box`,`
|
|
position: absolute;
|
|
left: 0;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
height: var(--n-size);
|
|
width: var(--n-size);
|
|
display: inline-block;
|
|
box-sizing: border-box;
|
|
border-radius: var(--n-border-radius);
|
|
background-color: var(--n-color);
|
|
transition: background-color 0.3s var(--n-bezier);
|
|
`,[D(`border`,`
|
|
transition:
|
|
border-color .3s var(--n-bezier),
|
|
box-shadow .3s var(--n-bezier);
|
|
border-radius: inherit;
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
bottom: 0;
|
|
border: var(--n-border);
|
|
`),O(`checkbox-icon`,`
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
position: absolute;
|
|
left: 1px;
|
|
right: 1px;
|
|
top: 1px;
|
|
bottom: 1px;
|
|
`,[T(`.check-icon, .line-icon`,`
|
|
width: 100%;
|
|
fill: var(--n-check-mark-color);
|
|
opacity: 0;
|
|
transform: scale(0.5);
|
|
transform-origin: center;
|
|
transition:
|
|
fill 0.3s var(--n-bezier),
|
|
transform 0.3s var(--n-bezier),
|
|
opacity 0.3s var(--n-bezier),
|
|
border-color 0.3s var(--n-bezier);
|
|
`),Se({left:`1px`,top:`1px`})])]),D(`label`,`
|
|
color: var(--n-text-color);
|
|
transition: color .3s var(--n-bezier);
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
padding: var(--n-label-padding);
|
|
font-weight: var(--n-label-font-weight);
|
|
`,[T(`&:empty`,{display:`none`})])]),A(O(`checkbox`,`
|
|
--n-merged-color-table: var(--n-color-table-modal);
|
|
`)),C(O(`checkbox`,`
|
|
--n-merged-color-table: var(--n-color-table-popover);
|
|
`))]),ct=t({name:`Checkbox`,props:Object.assign(Object.assign({},L.props),{size:String,checked:{type:[Boolean,String,Number],default:void 0},defaultChecked:{type:[Boolean,String,Number],default:!1},value:[String,Number],disabled:{type:Boolean,default:void 0},indeterminate:Boolean,label:String,focusable:{type:Boolean,default:!0},checkedValue:{type:[Boolean,String,Number],default:!0},uncheckedValue:{type:[Boolean,String,Number],default:!1},"onUpdate:checked":[Function,Array],onUpdateChecked:[Function,Array],privateInsideTable:Boolean,onChange:[Function,Array]}),setup(t){let n=e(it,null),r=y(null),{mergedClsPrefixRef:i,inlineThemeDisabled:a,mergedRtlRef:o,mergedComponentPropsRef:s}=k(t),c=y(t.defaultChecked),l=Y(_(t,`checked`),c),u=ye(()=>{if(n){let e=n.valueSetRef.value;return e&&t.value!==void 0?e.has(t.value):!1}else return l.value===t.checkedValue}),d=fe(t,{mergedSize(e){let{size:r}=t;if(r!==void 0)return r;if(n){let{value:e}=n.mergedSizeRef;if(e!==void 0)return e}if(e){let{mergedSize:t}=e;if(t!==void 0)return t.value}return s?.value?.Checkbox?.size||`medium`},mergedDisabled(e){let{disabled:r}=t;if(r!==void 0)return r;if(n){if(n.disabledRef.value)return!0;let{maxRef:{value:e},checkedCountRef:t}=n;if(e!==void 0&&t.value>=e&&!u.value)return!0;let{minRef:{value:r}}=n;if(r!==void 0&&t.value<=r&&u.value)return!0}return e?e.disabled.value:!1}}),{mergedDisabledRef:f,mergedSizeRef:p}=d,m=L(`Checkbox`,`-checkbox`,st,je,t,i);function h(e){if(n&&t.value!==void 0)n.toggleCheckbox(!u.value,t.value);else{let{onChange:n,"onUpdate:checked":r,onUpdateChecked:i}=t,{nTriggerFormInput:a,nTriggerFormChange:o}=d,s=u.value?t.uncheckedValue:t.checkedValue;r&&$(r,s,e),i&&$(i,s,e),n&&$(n,s,e),a(),o(),c.value=s}}function g(e){f.value||h(e)}function v(e){if(!f.value)switch(e.key){case` `:case`Enter`:h(e)}}function x(e){switch(e.key){case` `:e.preventDefault()}}let S={focus:()=>{var e;(e=r.value)==null||e.focus()},blur:()=>{var e;(e=r.value)==null||e.blur()}},C=I(`Checkbox`,o,i),w=b(()=>{let{value:e}=p,{common:{cubicBezierEaseInOut:t},self:{borderRadius:n,color:r,colorChecked:i,colorDisabled:a,colorTableHeader:o,colorTableHeaderModal:s,colorTableHeaderPopover:c,checkMarkColor:l,checkMarkColorDisabled:u,border:d,borderFocus:f,borderDisabled:h,borderChecked:g,boxShadowFocus:_,textColor:v,textColorDisabled:y,checkMarkColorDisabledChecked:b,colorDisabledChecked:x,borderDisabledChecked:S,labelPadding:C,labelLineHeight:w,labelFontWeight:T,[P(`fontSize`,e)]:E,[P(`size`,e)]:D}}=m.value;return{"--n-label-line-height":w,"--n-label-font-weight":T,"--n-size":D,"--n-bezier":t,"--n-border-radius":n,"--n-border":d,"--n-border-checked":g,"--n-border-focus":f,"--n-border-disabled":h,"--n-border-disabled-checked":S,"--n-box-shadow-focus":_,"--n-color":r,"--n-color-checked":i,"--n-color-table":o,"--n-color-table-modal":s,"--n-color-table-popover":c,"--n-color-disabled":a,"--n-color-disabled-checked":x,"--n-text-color":v,"--n-text-color-disabled":y,"--n-check-mark-color":l,"--n-check-mark-color-disabled":u,"--n-check-mark-color-disabled-checked":b,"--n-font-size":E,"--n-label-padding":C}}),T=a?ee(`checkbox`,b(()=>p.value[0]),w,t):void 0;return Object.assign(d,S,{rtlEnabled:C,selfRef:r,mergedClsPrefix:i,mergedDisabled:f,renderedChecked:u,mergedTheme:m,labelId:Q(),handleClick:g,handleKeyUp:v,handleKeyDown:x,cssVars:a?void 0:w,themeClass:T?.themeClass,onRender:T?.onRender})},render(){var e;let{$slots:t,renderedChecked:n,mergedDisabled:r,indeterminate:i,privateInsideTable:a,cssVars:o,labelId:s,label:c,mergedClsPrefix:l,focusable:u,handleKeyUp:d,handleKeyDown:f,handleClick:p}=this;(e=this.onRender)==null||e.call(this);let m=X(t.default,e=>c||e?h(`span`,{class:`${l}-checkbox__label`,id:s},c||e):null);return h(`div`,{ref:`selfRef`,class:[`${l}-checkbox`,this.themeClass,this.rtlEnabled&&`${l}-checkbox--rtl`,n&&`${l}-checkbox--checked`,r&&`${l}-checkbox--disabled`,i&&`${l}-checkbox--indeterminate`,a&&`${l}-checkbox--inside-table`,m&&`${l}-checkbox--show-label`],tabindex:r||!u?void 0:0,role:`checkbox`,"aria-checked":i?`mixed`:n,"aria-labelledby":s,style:o,onKeyup:d,onKeydown:f,onClick:p,onMousedown:()=>{ae(`selectstart`,window,e=>{e.preventDefault()},{once:!0})}},h(`div`,{class:`${l}-checkbox-box-wrapper`},`\xA0`,h(`div`,{class:`${l}-checkbox-box`},h(_e,null,{default:()=>this.indeterminate?h(`div`,{key:`indeterminate`,class:`${l}-checkbox-icon`},ot()):h(`div`,{key:`check`,class:`${l}-checkbox-icon`},at())}),h(`div`,{class:`${l}-checkbox-box__border`}))),m)}}),lt=R(`n-tabs`),ut={tab:[String,Number,Object,Function],name:{type:[String,Number],required:!0},disabled:Boolean,displayDirective:{type:String,default:`if`},closable:{type:Boolean,default:void 0},tabProps:Object,label:[String,Number,Object,Function]},dt=t({__TAB_PANE__:!0,name:`TabPane`,alias:[`TabPanel`],props:ut,slots:Object,setup(t){let n=e(lt,null);return n||E(`tab-pane`,"`n-tab-pane` must be placed inside `n-tabs`."),{style:n.paneStyleRef,class:n.paneClassRef,mergedClsPrefix:n.mergedClsPrefixRef}},render(){return h(`div`,{class:[`${this.mergedClsPrefix}-tab-pane`,this.class],style:this.style},this.$slots)}}),ft=t({__TAB__:!0,inheritAttrs:!1,name:`Tab`,props:Object.assign({internalLeftPadded:Boolean,internalAddable:Boolean,internalCreatedByPane:Boolean},be(ut,[`displayDirective`])),setup(t){let{mergedClsPrefixRef:n,valueRef:r,typeRef:i,closableRef:a,tabStyleRef:o,addTabStyleRef:s,tabClassRef:c,addTabClassRef:l,tabChangeIdRef:u,onBeforeLeaveRef:d,triggerRef:f,handleAdd:p,activateTab:m,handleClose:h}=e(lt);return{trigger:f,mergedClosable:b(()=>{if(t.internalAddable)return!1;let{closable:e}=t;return e===void 0?a.value:e}),style:o,addStyle:s,tabClass:c,addTabClass:l,clsPrefix:n,value:r,type:i,handleClose(e){e.stopPropagation(),!t.disabled&&h(t.name)},activateTab(){if(t.disabled)return;if(t.internalAddable){p();return}let{name:e}=t,n=++u.id;if(e!==r.value){let{value:i}=d;i?Promise.resolve(i(t.name,r.value)).then(t=>{t&&u.id===n&&m(e)}):m(e)}}}},render(){let{internalAddable:e,clsPrefix:t,name:n,disabled:i,label:a,tab:o,value:s,mergedClosable:c,trigger:l,$slots:{default:u}}=this,d=a??o;return h(`div`,{class:`${t}-tabs-tab-wrapper`},this.internalLeftPadded?h(`div`,{class:`${t}-tabs-tab-pad`}):null,h(`div`,Object.assign({key:n,"data-name":n,"data-disabled":i?!0:void 0},r({class:[`${t}-tabs-tab`,s===n&&`${t}-tabs-tab--active`,i&&`${t}-tabs-tab--disabled`,c&&`${t}-tabs-tab--closable`,e&&`${t}-tabs-tab--addable`,e?this.addTabClass:this.tabClass],onClick:l===`click`?this.activateTab:void 0,onMouseenter:l===`hover`?this.activateTab:void 0,style:e?this.addStyle:this.style},this.internalCreatedByPane?this.tabProps||{}:this.$attrs)),h(`span`,{class:`${t}-tabs-tab__label`},e?h(v,null,h(`div`,{class:`${t}-tabs-tab__height-placeholder`},`\xA0`),h(Te,{clsPrefix:t},{default:()=>h(he,null)})):u?u():typeof d==`object`?d:ve(d??n)),c&&this.type===`card`?h(xe,{clsPrefix:t,class:`${t}-tabs-tab__close`,onClick:this.handleClose,disabled:i}):null))}}),pt=O(`tabs`,`
|
|
box-sizing: border-box;
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition:
|
|
background-color .3s var(--n-bezier),
|
|
border-color .3s var(--n-bezier);
|
|
`,[N(`segment-type`,[O(`tabs-rail`,[T(`&.transition-disabled`,[O(`tabs-capsule`,`
|
|
transition: none;
|
|
`)])])]),N(`top`,[O(`tab-pane`,`
|
|
padding: var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left);
|
|
`)]),N(`left`,[O(`tab-pane`,`
|
|
padding: var(--n-pane-padding-right) var(--n-pane-padding-bottom) var(--n-pane-padding-left) var(--n-pane-padding-top);
|
|
`)]),N(`left, right`,`
|
|
flex-direction: row;
|
|
`,[O(`tabs-bar`,`
|
|
width: 2px;
|
|
right: 0;
|
|
transition:
|
|
top .2s var(--n-bezier),
|
|
max-height .2s var(--n-bezier),
|
|
background-color .3s var(--n-bezier);
|
|
`),O(`tabs-tab`,`
|
|
padding: var(--n-tab-padding-vertical);
|
|
`)]),N(`right`,`
|
|
flex-direction: row-reverse;
|
|
`,[O(`tab-pane`,`
|
|
padding: var(--n-pane-padding-left) var(--n-pane-padding-top) var(--n-pane-padding-right) var(--n-pane-padding-bottom);
|
|
`),O(`tabs-bar`,`
|
|
left: 0;
|
|
`)]),N(`bottom`,`
|
|
flex-direction: column-reverse;
|
|
justify-content: flex-end;
|
|
`,[O(`tab-pane`,`
|
|
padding: var(--n-pane-padding-bottom) var(--n-pane-padding-right) var(--n-pane-padding-top) var(--n-pane-padding-left);
|
|
`),O(`tabs-bar`,`
|
|
top: 0;
|
|
`)]),O(`tabs-rail`,`
|
|
position: relative;
|
|
padding: 3px;
|
|
border-radius: var(--n-tab-border-radius);
|
|
width: 100%;
|
|
background-color: var(--n-color-segment);
|
|
transition: background-color .3s var(--n-bezier);
|
|
display: flex;
|
|
align-items: center;
|
|
`,[O(`tabs-capsule`,`
|
|
border-radius: var(--n-tab-border-radius);
|
|
position: absolute;
|
|
pointer-events: none;
|
|
background-color: var(--n-tab-color-segment);
|
|
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .08);
|
|
transition: transform 0.3s var(--n-bezier);
|
|
`),O(`tabs-tab-wrapper`,`
|
|
flex-basis: 0;
|
|
flex-grow: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
`,[O(`tabs-tab`,`
|
|
overflow: hidden;
|
|
border-radius: var(--n-tab-border-radius);
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
`,[N(`active`,`
|
|
font-weight: var(--n-font-weight-strong);
|
|
color: var(--n-tab-text-color-active);
|
|
`),T(`&:hover`,`
|
|
color: var(--n-tab-text-color-hover);
|
|
`)])])]),N(`flex`,[O(`tabs-nav`,`
|
|
width: 100%;
|
|
position: relative;
|
|
`,[O(`tabs-wrapper`,`
|
|
width: 100%;
|
|
`,[O(`tabs-tab`,`
|
|
margin-right: 0;
|
|
`)])])]),O(`tabs-nav`,`
|
|
box-sizing: border-box;
|
|
line-height: 1.5;
|
|
display: flex;
|
|
transition: border-color .3s var(--n-bezier);
|
|
`,[D(`prefix, suffix`,`
|
|
display: flex;
|
|
align-items: center;
|
|
`),D(`prefix`,`padding-right: 16px;`),D(`suffix`,`padding-left: 16px;`)]),N(`top, bottom`,[T(`>`,[O(`tabs-nav`,[O(`tabs-nav-scroll-wrapper`,[T(`&::before`,`
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
width: 20px;
|
|
`),T(`&::after`,`
|
|
top: 0;
|
|
bottom: 0;
|
|
right: 0;
|
|
width: 20px;
|
|
`),N(`shadow-start`,[T(`&::before`,`
|
|
box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
`)]),N(`shadow-end`,[T(`&::after`,`
|
|
box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, .12);
|
|
`)])])])])]),N(`left, right`,[O(`tabs-nav-scroll-content`,`
|
|
flex-direction: column;
|
|
`),T(`>`,[O(`tabs-nav`,[O(`tabs-nav-scroll-wrapper`,[T(`&::before`,`
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 20px;
|
|
`),T(`&::after`,`
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
height: 20px;
|
|
`),N(`shadow-start`,[T(`&::before`,`
|
|
box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, .12);
|
|
`)]),N(`shadow-end`,[T(`&::after`,`
|
|
box-shadow: inset 0 -10px 8px -8px rgba(0, 0, 0, .12);
|
|
`)])])])])]),O(`tabs-nav-scroll-wrapper`,`
|
|
flex: 1;
|
|
position: relative;
|
|
overflow: hidden;
|
|
`,[O(`tabs-nav-y-scroll`,`
|
|
height: 100%;
|
|
width: 100%;
|
|
overflow-y: auto;
|
|
scrollbar-width: none;
|
|
`,[T(`&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb`,`
|
|
width: 0;
|
|
height: 0;
|
|
display: none;
|
|
`)]),T(`&::before, &::after`,`
|
|
transition: box-shadow .3s var(--n-bezier);
|
|
pointer-events: none;
|
|
content: "";
|
|
position: absolute;
|
|
z-index: 1;
|
|
`)]),O(`tabs-nav-scroll-content`,`
|
|
display: flex;
|
|
position: relative;
|
|
min-width: 100%;
|
|
min-height: 100%;
|
|
width: fit-content;
|
|
box-sizing: border-box;
|
|
`),O(`tabs-wrapper`,`
|
|
display: inline-flex;
|
|
flex-wrap: nowrap;
|
|
position: relative;
|
|
`),O(`tabs-tab-wrapper`,`
|
|
display: flex;
|
|
flex-wrap: nowrap;
|
|
flex-shrink: 0;
|
|
flex-grow: 0;
|
|
`),O(`tabs-tab`,`
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
flex-wrap: nowrap;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
color: var(--n-tab-text-color);
|
|
font-size: var(--n-tab-font-size);
|
|
background-clip: padding-box;
|
|
padding: var(--n-tab-padding);
|
|
transition:
|
|
box-shadow .3s var(--n-bezier),
|
|
color .3s var(--n-bezier),
|
|
background-color .3s var(--n-bezier),
|
|
border-color .3s var(--n-bezier);
|
|
`,[N(`disabled`,{cursor:`not-allowed`}),D(`close`,`
|
|
margin-left: 6px;
|
|
transition:
|
|
background-color .3s var(--n-bezier),
|
|
color .3s var(--n-bezier);
|
|
`),D(`label`,`
|
|
display: flex;
|
|
align-items: center;
|
|
z-index: 1;
|
|
`)]),O(`tabs-bar`,`
|
|
position: absolute;
|
|
bottom: 0;
|
|
height: 2px;
|
|
border-radius: 1px;
|
|
background-color: var(--n-bar-color);
|
|
transition:
|
|
left .2s var(--n-bezier),
|
|
max-width .2s var(--n-bezier),
|
|
opacity .3s var(--n-bezier),
|
|
background-color .3s var(--n-bezier);
|
|
`,[T(`&.transition-disabled`,`
|
|
transition: none;
|
|
`),N(`disabled`,`
|
|
background-color: var(--n-tab-text-color-disabled)
|
|
`)]),O(`tabs-pane-wrapper`,`
|
|
position: relative;
|
|
overflow: hidden;
|
|
transition: max-height .2s var(--n-bezier);
|
|
`),O(`tab-pane`,`
|
|
color: var(--n-pane-text-color);
|
|
width: 100%;
|
|
transition:
|
|
color .3s var(--n-bezier),
|
|
background-color .3s var(--n-bezier),
|
|
opacity .2s var(--n-bezier);
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
`,[T(`&.next-transition-leave-active, &.prev-transition-leave-active, &.next-transition-enter-active, &.prev-transition-enter-active`,`
|
|
transition:
|
|
color .3s var(--n-bezier),
|
|
background-color .3s var(--n-bezier),
|
|
transform .2s var(--n-bezier),
|
|
opacity .2s var(--n-bezier);
|
|
`),T(`&.next-transition-leave-active, &.prev-transition-leave-active`,`
|
|
position: absolute;
|
|
`),T(`&.next-transition-enter-from, &.prev-transition-leave-to`,`
|
|
transform: translateX(32px);
|
|
opacity: 0;
|
|
`),T(`&.next-transition-leave-to, &.prev-transition-enter-from`,`
|
|
transform: translateX(-32px);
|
|
opacity: 0;
|
|
`),T(`&.next-transition-leave-from, &.next-transition-enter-to, &.prev-transition-leave-from, &.prev-transition-enter-to`,`
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
`)]),O(`tabs-tab-pad`,`
|
|
box-sizing: border-box;
|
|
width: var(--n-tab-gap);
|
|
flex-grow: 0;
|
|
flex-shrink: 0;
|
|
`),N(`line-type, bar-type`,[O(`tabs-tab`,`
|
|
font-weight: var(--n-tab-font-weight);
|
|
box-sizing: border-box;
|
|
vertical-align: bottom;
|
|
`,[T(`&:hover`,{color:`var(--n-tab-text-color-hover)`}),N(`active`,`
|
|
color: var(--n-tab-text-color-active);
|
|
font-weight: var(--n-tab-font-weight-active);
|
|
`),N(`disabled`,{color:`var(--n-tab-text-color-disabled)`})])]),O(`tabs-nav`,[N(`line-type`,[N(`top`,[D(`prefix, suffix`,`
|
|
border-bottom: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-nav-scroll-content`,`
|
|
border-bottom: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-bar`,`
|
|
bottom: -1px;
|
|
`)]),N(`left`,[D(`prefix, suffix`,`
|
|
border-right: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-nav-scroll-content`,`
|
|
border-right: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-bar`,`
|
|
right: -1px;
|
|
`)]),N(`right`,[D(`prefix, suffix`,`
|
|
border-left: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-nav-scroll-content`,`
|
|
border-left: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-bar`,`
|
|
left: -1px;
|
|
`)]),N(`bottom`,[D(`prefix, suffix`,`
|
|
border-top: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-nav-scroll-content`,`
|
|
border-top: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-bar`,`
|
|
top: -1px;
|
|
`)]),D(`prefix, suffix`,`
|
|
transition: border-color .3s var(--n-bezier);
|
|
`),O(`tabs-nav-scroll-content`,`
|
|
transition: border-color .3s var(--n-bezier);
|
|
`),O(`tabs-bar`,`
|
|
border-radius: 0;
|
|
`)]),N(`card-type`,[D(`prefix, suffix`,`
|
|
transition: border-color .3s var(--n-bezier);
|
|
`),O(`tabs-pad`,`
|
|
flex-grow: 1;
|
|
transition: border-color .3s var(--n-bezier);
|
|
`),O(`tabs-tab-pad`,`
|
|
transition: border-color .3s var(--n-bezier);
|
|
`),O(`tabs-tab`,`
|
|
font-weight: var(--n-tab-font-weight);
|
|
border: 1px solid var(--n-tab-border-color);
|
|
background-color: var(--n-tab-color);
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
vertical-align: bottom;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: var(--n-tab-font-size);
|
|
color: var(--n-tab-text-color);
|
|
`,[N(`addable`,`
|
|
padding-left: 8px;
|
|
padding-right: 8px;
|
|
font-size: 16px;
|
|
justify-content: center;
|
|
`,[D(`height-placeholder`,`
|
|
width: 0;
|
|
font-size: var(--n-tab-font-size);
|
|
`),M(`disabled`,[T(`&:hover`,`
|
|
color: var(--n-tab-text-color-hover);
|
|
`)])]),N(`closable`,`padding-right: 8px;`),N(`active`,`
|
|
background-color: #0000;
|
|
font-weight: var(--n-tab-font-weight-active);
|
|
color: var(--n-tab-text-color-active);
|
|
`),N(`disabled`,`color: var(--n-tab-text-color-disabled);`)])]),N(`left, right`,`
|
|
flex-direction: column;
|
|
`,[D(`prefix, suffix`,`
|
|
padding: var(--n-tab-padding-vertical);
|
|
`),O(`tabs-wrapper`,`
|
|
flex-direction: column;
|
|
`),O(`tabs-tab-wrapper`,`
|
|
flex-direction: column;
|
|
`,[O(`tabs-tab-pad`,`
|
|
height: var(--n-tab-gap-vertical);
|
|
width: 100%;
|
|
`)])]),N(`top`,[N(`card-type`,[O(`tabs-scroll-padding`,`border-bottom: 1px solid var(--n-tab-border-color);`),D(`prefix, suffix`,`
|
|
border-bottom: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-tab`,`
|
|
border-top-left-radius: var(--n-tab-border-radius);
|
|
border-top-right-radius: var(--n-tab-border-radius);
|
|
`,[N(`active`,`
|
|
border-bottom: 1px solid #0000;
|
|
`)]),O(`tabs-tab-pad`,`
|
|
border-bottom: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-pad`,`
|
|
border-bottom: 1px solid var(--n-tab-border-color);
|
|
`)])]),N(`left`,[N(`card-type`,[O(`tabs-scroll-padding`,`border-right: 1px solid var(--n-tab-border-color);`),D(`prefix, suffix`,`
|
|
border-right: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-tab`,`
|
|
border-top-left-radius: var(--n-tab-border-radius);
|
|
border-bottom-left-radius: var(--n-tab-border-radius);
|
|
`,[N(`active`,`
|
|
border-right: 1px solid #0000;
|
|
`)]),O(`tabs-tab-pad`,`
|
|
border-right: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-pad`,`
|
|
border-right: 1px solid var(--n-tab-border-color);
|
|
`)])]),N(`right`,[N(`card-type`,[O(`tabs-scroll-padding`,`border-left: 1px solid var(--n-tab-border-color);`),D(`prefix, suffix`,`
|
|
border-left: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-tab`,`
|
|
border-top-right-radius: var(--n-tab-border-radius);
|
|
border-bottom-right-radius: var(--n-tab-border-radius);
|
|
`,[N(`active`,`
|
|
border-left: 1px solid #0000;
|
|
`)]),O(`tabs-tab-pad`,`
|
|
border-left: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-pad`,`
|
|
border-left: 1px solid var(--n-tab-border-color);
|
|
`)])]),N(`bottom`,[N(`card-type`,[O(`tabs-scroll-padding`,`border-top: 1px solid var(--n-tab-border-color);`),D(`prefix, suffix`,`
|
|
border-top: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-tab`,`
|
|
border-bottom-left-radius: var(--n-tab-border-radius);
|
|
border-bottom-right-radius: var(--n-tab-border-radius);
|
|
`,[N(`active`,`
|
|
border-top: 1px solid #0000;
|
|
`)]),O(`tabs-tab-pad`,`
|
|
border-top: 1px solid var(--n-tab-border-color);
|
|
`),O(`tabs-pad`,`
|
|
border-top: 1px solid var(--n-tab-border-color);
|
|
`)])])])]),mt=$e,ht=t({name:`Tabs`,props:Object.assign(Object.assign({},L.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:`click`},type:{type:String,default:`bar`},closable:Boolean,justifyContent:String,size:String,placement:{type:String,default:`top`},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),slots:Object,setup(e,{slots:t}){let{mergedClsPrefixRef:r,inlineThemeDisabled:a,mergedComponentPropsRef:s}=k(e),c=L(`Tabs`,`-tabs`,pt,ke,e,r),l=y(null),f=y(null),p=y(null),m=y(null),h=y(null),g=y(null),v=y(!0),x=y(!0),S=le(e,[`labelSize`,`size`]),C=b(()=>S.value?S.value:s?.value?.Tabs?.size||`medium`),w=le(e,[`activeName`,`value`]),T=y(w.value??e.defaultValue??(t.default?ue(t.default())[0]?.props?.name:null)),E=Y(w,T),D={id:0},O=b(()=>{if(!(!e.justifyContent||e.type===`card`))return{display:`flex`,justifyContent:e.justifyContent}});d(E,()=>{D.id=0,F(),I()});function A(){let{value:e}=E;return e===null?null:l.value?.querySelector(`[data-name="${e}"]`)}function j(t){if(e.type===`card`)return;let{value:n}=f;if(!n)return;let i=n.style.opacity===`0`;if(t){let a=`${r.value}-tabs-bar--disabled`,{barWidth:o,placement:s}=e;if(t.dataset.disabled===`true`?n.classList.add(a):n.classList.remove(a),[`top`,`bottom`].includes(s)){if(N([`top`,`maxHeight`,`height`]),typeof o==`number`&&t.offsetWidth>=o){let e=Math.floor((t.offsetWidth-o)/2)+t.offsetLeft;n.style.left=`${e}px`,n.style.maxWidth=`${o}px`}else n.style.left=`${t.offsetLeft}px`,n.style.maxWidth=`${t.offsetWidth}px`;n.style.width=`8192px`,i&&(n.style.transition=`none`),n.offsetWidth,i&&(n.style.transition=``,n.style.opacity=`1`)}else{if(N([`left`,`maxWidth`,`width`]),typeof o==`number`&&t.offsetHeight>=o){let e=Math.floor((t.offsetHeight-o)/2)+t.offsetTop;n.style.top=`${e}px`,n.style.maxHeight=`${o}px`}else n.style.top=`${t.offsetTop}px`,n.style.maxHeight=`${t.offsetHeight}px`;n.style.height=`8192px`,i&&(n.style.transition=`none`),n.offsetHeight,i&&(n.style.transition=``,n.style.opacity=`1`)}}}function M(){if(e.type===`card`)return;let{value:t}=f;t&&(t.style.opacity=`0`)}function N(e){let{value:t}=f;if(t)for(let n of e)t.style[n]=``}function F(){if(e.type===`card`)return;let t=A();t?j(t):M()}function I(){let e=h.value?.$el;if(!e)return;let t=A();if(!t)return;let{scrollLeft:n,offsetWidth:r}=e,{offsetLeft:i,offsetWidth:a}=t;n>i?e.scrollTo({top:0,left:i,behavior:`smooth`}):i+a>n+r&&e.scrollTo({top:0,left:i+a-r,behavior:`smooth`})}let R=y(null),z=0,B=null;function V(e){let t=R.value;if(t){z=e.getBoundingClientRect().height;let n=`${z}px`,r=()=>{t.style.height=n,t.style.maxHeight=n};B?(r(),B(),B=null):B=r}}function H(e){let t=R.value;if(t){let n=e.getBoundingClientRect().height,r=()=>{document.body.offsetHeight,t.style.maxHeight=`${n}px`,t.style.height=`${Math.max(z,n)}px`};B?(B(),B=null,r()):B=r}}function U(){let t=R.value;if(t){t.style.maxHeight=``,t.style.height=``;let{paneWrapperStyle:n}=e;if(typeof n==`string`)t.style.cssText=n;else if(n){let{maxHeight:e,height:r}=n;e!==void 0&&(t.style.maxHeight=e),r!==void 0&&(t.style.height=r)}}}let W={value:[]},ne=y(`next`);function re(e){let t=E.value,n=`next`;for(let r of W.value){if(r===t)break;if(r===e){n=`prev`;break}}ne.value=n,ie(e)}function ie(t){let{onActiveNameChange:n,onUpdateValue:r,"onUpdate:value":i}=e;n&&$(n,t),r&&$(r,t),i&&$(i,t),T.value=t}function ae(t){let{onClose:n}=e;n&&$(n,t)}let oe=!0;function G(){let{value:e}=f;if(!e)return;oe||=!1;let t=`transition-disabled`;e.classList.add(t),F(),e.classList.remove(t)}let K=y(null);function q({transitionDisabled:e}){let t=l.value;if(!t)return;e&&t.classList.add(`transition-disabled`);let n=A();n&&K.value&&(K.value.style.width=`${n.offsetWidth}px`,K.value.style.height=`${n.offsetHeight}px`,K.value.style.transform=`translateX(${n.offsetLeft-ce(getComputedStyle(t).paddingLeft)}px)`,e&&K.value.offsetWidth),e&&t.classList.remove(`transition-disabled`)}d([E],()=>{e.type===`segment`&&i(()=>{q({transitionDisabled:!1})})}),o(()=>{e.type===`segment`&&q({transitionDisabled:!0})});let se=0;function J(t){if(t.contentRect.width===0&&t.contentRect.height===0||se===t.contentRect.width)return;se=t.contentRect.width;let{type:n}=e;if((n===`line`||n===`bar`)&&(oe||e.justifyContent?.startsWith(`space`))&&G(),n!==`segment`){let{placement:t}=e;me((t===`top`||t===`bottom`?h.value?.$el:g.value)||null)}}let X=mt(J,64);d([()=>e.justifyContent,()=>e.size],()=>{i(()=>{let{type:t}=e;(t===`line`||t===`bar`)&&G()})});let Q=y(!1);function de(t){let{target:n,contentRect:{width:r,height:i}}=t,a=n.parentElement.parentElement.offsetWidth,o=n.parentElement.parentElement.offsetHeight,{placement:s}=e;if(!Q.value)s===`top`||s===`bottom`?a<r&&(Q.value=!0):o<i&&(Q.value=!0);else{let{value:e}=m;if(!e)return;s===`top`||s===`bottom`?a-r>e.$el.offsetWidth&&(Q.value=!1):o-i>e.$el.offsetHeight&&(Q.value=!1)}me(h.value?.$el||null)}let fe=mt(de,64);function pe(){let{onAdd:t}=e;t&&t(),i(()=>{let e=A(),{value:t}=h;!e||!t||t.scrollTo({left:e.offsetLeft,top:0,behavior:`smooth`})})}function me(t){if(!t)return;let{placement:n}=e;if(n===`top`||n===`bottom`){let{scrollLeft:e,scrollWidth:n,offsetWidth:r}=t;v.value=e<=0,x.value=e+r>=n}else{let{scrollTop:e,scrollHeight:n,offsetHeight:r}=t;v.value=e<=0,x.value=e+r>=n}}let he=mt(e=>{me(e.target)},64);n(lt,{triggerRef:_(e,`trigger`),tabStyleRef:_(e,`tabStyle`),tabClassRef:_(e,`tabClass`),addTabStyleRef:_(e,`addTabStyle`),addTabClassRef:_(e,`addTabClass`),paneClassRef:_(e,`paneClass`),paneStyleRef:_(e,`paneStyle`),mergedClsPrefixRef:r,typeRef:_(e,`type`),closableRef:_(e,`closable`),valueRef:E,tabChangeIdRef:D,onBeforeLeaveRef:_(e,`onBeforeLeave`),activateTab:re,handleClose:ae,handleAdd:pe}),te(()=>{F(),I()}),u(()=>{let{value:e}=p;if(!e)return;let{value:t}=r,n=`${t}-tabs-nav-scroll-wrapper--shadow-start`,i=`${t}-tabs-nav-scroll-wrapper--shadow-end`;v.value?e.classList.remove(n):e.classList.add(n),x.value?e.classList.remove(i):e.classList.add(i)});let ge={syncBarPosition:()=>{F()}},_e=()=>{q({transitionDisabled:!0})},ve=b(()=>{let{value:t}=C,{type:n}=e,r=`${t}${{card:`Card`,bar:`Bar`,line:`Line`,segment:`Segment`}[n]}`,{self:{barColor:i,closeIconColor:a,closeIconColorHover:o,closeIconColorPressed:s,tabColor:l,tabBorderColor:u,paneTextColor:d,tabFontWeight:f,tabBorderRadius:p,tabFontWeightActive:m,colorSegment:h,fontWeightStrong:g,tabColorSegment:_,closeSize:v,closeIconSize:y,closeColorHover:b,closeColorPressed:x,closeBorderRadius:S,[P(`panePadding`,t)]:w,[P(`tabPadding`,r)]:T,[P(`tabPaddingVertical`,r)]:E,[P(`tabGap`,r)]:D,[P(`tabGap`,`${r}Vertical`)]:O,[P(`tabTextColor`,n)]:ee,[P(`tabTextColorActive`,n)]:k,[P(`tabTextColorHover`,n)]:A,[P(`tabTextColorDisabled`,n)]:j,[P(`tabFontSize`,t)]:M},common:{cubicBezierEaseInOut:N}}=c.value;return{"--n-bezier":N,"--n-color-segment":h,"--n-bar-color":i,"--n-tab-font-size":M,"--n-tab-text-color":ee,"--n-tab-text-color-active":k,"--n-tab-text-color-disabled":j,"--n-tab-text-color-hover":A,"--n-pane-text-color":d,"--n-tab-border-color":u,"--n-tab-border-radius":p,"--n-close-size":v,"--n-close-icon-size":y,"--n-close-color-hover":b,"--n-close-color-pressed":x,"--n-close-border-radius":S,"--n-close-icon-color":a,"--n-close-icon-color-hover":o,"--n-close-icon-color-pressed":s,"--n-tab-color":l,"--n-tab-font-weight":f,"--n-tab-font-weight-active":m,"--n-tab-padding":T,"--n-tab-padding-vertical":E,"--n-tab-gap":D,"--n-tab-gap-vertical":O,"--n-pane-padding-left":Z(w,`left`),"--n-pane-padding-right":Z(w,`right`),"--n-pane-padding-top":Z(w,`top`),"--n-pane-padding-bottom":Z(w,`bottom`),"--n-font-weight-strong":g,"--n-tab-color-segment":_}}),ye=a?ee(`tabs`,b(()=>`${C.value[0]}${e.type[0]}`),ve,e):void 0;return Object.assign({mergedClsPrefix:r,mergedValue:E,renderedNames:new Set,segmentCapsuleElRef:K,tabsPaneWrapperRef:R,tabsElRef:l,barElRef:f,addTabInstRef:m,xScrollInstRef:h,scrollWrapperElRef:p,addTabFixed:Q,tabWrapperStyle:O,handleNavResize:X,mergedSize:C,handleScroll:he,handleTabsResize:fe,cssVars:a?void 0:ve,themeClass:ye?.themeClass,animationDirection:ne,renderNameListRef:W,yScrollElRef:g,handleSegmentResize:_e,onAnimationBeforeLeave:V,onAnimationEnter:H,onAnimationAfterEnter:U,onRender:ye?.onRender},ge)},render(){let{mergedClsPrefix:e,type:t,placement:n,addTabFixed:r,addable:i,mergedSize:a,renderNameListRef:o,onRender:s,paneWrapperClass:c,paneWrapperStyle:l,$slots:{default:u,prefix:d,suffix:f}}=this;s?.();let p=u?ue(u()).filter(e=>e.type.__TAB_PANE__===!0):[],m=u?ue(u()).filter(e=>e.type.__TAB__===!0):[],g=!m.length,_=t===`card`,v=t===`segment`,y=!_&&!v&&this.justifyContent;o.value=[];let b=()=>{let t=h(`div`,{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},y?null:h(`div`,{class:`${e}-tabs-scroll-padding`,style:n===`top`||n===`bottom`?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?p.map((e,t)=>(o.value.push(e.props.name),yt(h(ft,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0&&(!y||y===`center`||y===`start`||y===`end`)}),e.children?{default:e.children.tab}:void 0)))):m.map((e,t)=>(o.value.push(e.props.name),yt(t!==0&&!y?vt(e):e))),!r&&i&&_?_t(i,(g?p.length:m.length)!==0):null,y?null:h(`div`,{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return h(`div`,{ref:`tabsElRef`,class:`${e}-tabs-nav-scroll-content`},_&&i?h(G,{onResize:this.handleTabsResize},{default:()=>t}):t,_?h(`div`,{class:`${e}-tabs-pad`}):null,_?null:h(`div`,{ref:`barElRef`,class:`${e}-tabs-bar`}))},x=v?`top`:n;return h(`div`,{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${a}-size`,y&&`${e}-tabs--flex`,`${e}-tabs--${x}`],style:this.cssVars},h(`div`,{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${x}`,`${e}-tabs-nav`]},X(d,t=>t&&h(`div`,{class:`${e}-tabs-nav__prefix`},t)),v?h(G,{onResize:this.handleSegmentResize},{default:()=>h(`div`,{class:`${e}-tabs-rail`,ref:`tabsElRef`},h(`div`,{class:`${e}-tabs-capsule`,ref:`segmentCapsuleElRef`},h(`div`,{class:`${e}-tabs-wrapper`},h(`div`,{class:`${e}-tabs-tab`}))),g?p.map((e,t)=>(o.value.push(e.props.name),h(ft,Object.assign({},e.props,{internalCreatedByPane:!0,internalLeftPadded:t!==0}),e.children?{default:e.children.tab}:void 0))):m.map((e,t)=>(o.value.push(e.props.name),t===0?e:vt(e))))}):h(G,{onResize:this.handleNavResize},{default:()=>h(`div`,{class:`${e}-tabs-nav-scroll-wrapper`,ref:`scrollWrapperElRef`},[`top`,`bottom`].includes(x)?h(Ie,{ref:`xScrollInstRef`,onScroll:this.handleScroll},{default:b}):h(`div`,{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:`yScrollElRef`},b()))}),r&&i&&_?_t(i,!0):null,X(f,t=>t&&h(`div`,{class:`${e}-tabs-nav__suffix`},t))),g&&(this.animated&&(x===`top`||x===`bottom`)?h(`div`,{ref:`tabsPaneWrapperRef`,style:l,class:[`${e}-tabs-pane-wrapper`,c]},gt(p,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):gt(p,this.mergedValue,this.renderedNames)))}});function gt(e,t,n,r,i,o,s){let c=[];return e.forEach(e=>{let{name:r,displayDirective:i,"display-directive":o}=e.props,s=e=>i===e||o===e,l=t===r;if(e.key!==void 0&&(e.key=r),l||s(`show`)||s(`show:lazy`)&&n.has(r)){n.has(r)||n.add(r);let t=!s(`if`);c.push(t?a(e,[[Ce,l]]):e)}}),s?h(De,{name:`${s}-transition`,onBeforeLeave:r,onEnter:i,onAfterEnter:o},{default:()=>c}):c}function _t(e,t){return h(ft,{ref:`addTabInstRef`,key:`__addable`,name:`__addable`,internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e==`object`&&e.disabled})}function vt(e){let t=p(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function yt(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes(`internalLeftPadded`)||e.dynamicProps.push(`internalLeftPadded`):e.dynamicProps=[`internalLeftPadded`],e}var bt={class:`center-block-custom content-block center-middle-block-custom height80`},xt={class:`form-button-wrapper`},St={class:`form-label`},Ct={key:0},wt={key:1},Tt={class:`form-label`},Et={class:`form-label`},Dt={class:`form-button-wrapper`},Ot={class:`form-label`},kt={key:0},At={key:1},jt={class:`form-button-wrapper`},Mt={class:`form-label`},Nt={key:0},Pt={key:1},Ft=Ne(t({__name:`LoginPage`,setup(e){let t=Me(),n=g(),r=pe(),i=y(``),a=y(``),o=y(``),u=y(!1),d=y(!1),p=b(()=>[`@mail.ru`,`@yandex.ru`,`@gmail.com`].map(e=>{let t=a.value.split(`@`)[0];return{label:t+e,value:t+e}}));async function h(){if(!await t.login(a.value,o.value)&&t.error!=null){r.error(t.error);return}n.push(`/office`)}async function _(){if(!(!u.value||!d.value)){if(!await t.signup(i.value,a.value,u.value,d.value)&&t.error!=null){r.error(t.error);return}r.info(`Пароль отправлен на почту`),u.value=!1,d.value=!1}}async function v(){if(!await t.refreshPassword(a.value)&&t.error!=null){r.error(t.error);return}r.info(`Пароль отправлен на почту`)}return(e,n)=>(l(),s(`div`,bt,[c(m(me),{style:{"margin-bottom":`16px`},class:`sign-card`},{default:f(()=>[c(m(ht),{type:`line`,animated:``},{default:f(()=>[c(m(dt),{name:`signin`,tab:`Вход`},{default:f(()=>[c(m(ge),{vertical:``},{default:f(()=>[n[7]||=S(`div`,{class:`form-label`},`Почта`,-1),c(m(rt),{value:a.value,"onUpdate:value":n[0]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:p.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),n[8]||=S(`div`,{class:`form-label`},`Пароль`,-1),c(m(J),{value:o.value,"onUpdate:value":n[1]||=e=>o.value=e,type:`password`,placeholder:`********`},null,8,[`value`]),S(`div`,xt,[S(`div`,St,[c(m(de),{onClick:h,disabled:a.value.length==0||o.value.length==0},{default:f(()=>[m(t).isLoading?(l(),s(`span`,wt,` Подождите... `)):(l(),s(`span`,Ct,` Вход `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),c(m(dt),{name:`signup`,tab:`Регистрация`},{default:f(()=>[c(m(ge),{vertical:``},{default:f(()=>[n[11]||=S(`div`,{class:`form-label`},`Позывной`,-1),c(m(J),{value:i.value,"onUpdate:value":n[2]||=e=>i.value=e,type:`text`,placeholder:`Шерлок`},null,8,[`value`]),n[12]||=S(`div`,{class:`form-label`},`Почта`,-1),c(m(rt),{value:a.value,"onUpdate:value":n[3]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:p.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),S(`div`,Tt,[c(m(ct),{checked:u.value,"onUpdate:checked":n[4]||=e=>u.value=e},{default:f(()=>[...n[9]||=[x(` Я принимаю условия `,-1),S(`a`,{href:`/user-agreement`,target:`_blank`,class:`docs-link`},`пользовательского соглашения`,-1)]]),_:1},8,[`checked`])]),S(`div`,Et,[c(m(ct),{checked:d.value,"onUpdate:checked":n[5]||=e=>d.value=e},{default:f(()=>[...n[10]||=[x(` Я даю согласие на обработку `,-1),S(`a`,{href:`/privacy-policy`,target:`_blank`,class:`docs-link`},`персональных данных`,-1)]]),_:1},8,[`checked`])]),S(`div`,Dt,[S(`div`,Ot,[c(m(de),{onClick:_,disabled:i.value.length==0||a.value.length==0||!u.value||!d.value},{default:f(()=>[m(t).isLoading?(l(),s(`span`,At,` Подождите... `)):(l(),s(`span`,kt,` Регистрация `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1}),c(m(dt),{name:`new-password`,tab:`Новый пароль`},{default:f(()=>[c(m(ge),{vertical:``},{default:f(()=>[n[13]||=S(`div`,{class:`form-label`},`Почта`,-1),c(m(rt),{value:a.value,"onUpdate:value":n[6]||=e=>a.value=e,"input-props":{autocomplete:`disabled`},options:p.value,placeholder:`detective@mail.ru`,clearable:``},null,8,[`value`,`options`]),S(`div`,jt,[S(`div`,Mt,[c(m(de),{onClick:v,disabled:a.value.length==0},{default:f(()=>[m(t).isLoading?(l(),s(`span`,Pt,` Подождите... `)):(l(),s(`span`,Nt,` Прислать новый пароль `))]),_:1},8,[`disabled`])])])]),_:1})]),_:1})]),_:1})]),_:1})]))}}),[[`__scopeId`,`data-v-b7969e02`]]),It=t({__name:`LoginView`,setup(e){return(e,t)=>(l(),s(v,null,[c(Ft),c(Pe)],64))}});export{It as default}; |