43 lines
5.4 KiB
JavaScript
43 lines
5.4 KiB
JavaScript
import{Ct as e,E as t,I as n,M as r,N as i,O as a,T as o,Vt as s,X as c,a as l,j as u,ot as d,q as f,st as p,vt as m,w as h}from"./client-CmW03vy2.js";import{G as g,H as _,M as v,N as y,V as b,q as x,r as S}from"./light-CU7ioAUB.js";import{i as C}from"./css-DEmdllcC.js";import{t as w}from"./use-compitable-DJUG1t76.js";import{t as T}from"./fade-in.cssr-DdVg7Jnt.js";import{t as E}from"./Alert-Byy2NOEo.js";import{n as D}from"./es-BkmQwXAV.js";import{M as O,N as k,Q as A,s as j}from"./index-DVruj17R.js";import{t as M}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as N}from"./HeaderText-CVs5Vb5h.js";var P=b([b(`@keyframes spin-rotate`,`
|
|
from {
|
|
transform: rotate(0);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
`),_(`spin-container`,`
|
|
position: relative;
|
|
`,[_(`spin-body`,`
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 50%;
|
|
transform: translateX(-50%) translateY(-50%);
|
|
`,[T()])]),_(`spin-body`,`
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
`),_(`spin`,`
|
|
display: inline-flex;
|
|
height: var(--n-size);
|
|
width: var(--n-size);
|
|
font-size: var(--n-size);
|
|
color: var(--n-color);
|
|
`,[g(`rotate`,`
|
|
animation: spin-rotate 2s linear infinite;
|
|
`)]),_(`spin-description`,`
|
|
display: inline-block;
|
|
font-size: var(--n-font-size);
|
|
color: var(--n-text-color);
|
|
transition: color .3s var(--n-bezier);
|
|
margin-top: 8px;
|
|
`),_(`spin-content`,`
|
|
opacity: 1;
|
|
transition: opacity .3s var(--n-bezier);
|
|
pointer-events: all;
|
|
`,[g(`spinning`,`
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
pointer-events: none;
|
|
opacity: var(--n-opacity-spinning);
|
|
`)])]),F={small:20,medium:18,large:16},I=i({name:`Spin`,props:Object.assign(Object.assign(Object.assign({},S.props),{contentClass:String,contentStyle:[Object,String],description:String,size:{type:[String,Number],default:`medium`},show:{type:Boolean,default:!0},rotate:{type:Boolean,default:!0},spinning:{type:Boolean,validator:()=>!0,default:void 0},delay:Number}),k),slots:Object,setup(e){let{mergedClsPrefixRef:t,inlineThemeDisabled:n}=y(e),r=S(`Spin`,`-spin`,P,j,e,t),i=h(()=>{let{size:t}=e,{common:{cubicBezierEaseInOut:n},self:i}=r.value,{opacitySpinning:a,color:o,textColor:s}=i;return{"--n-bezier":n,"--n-opacity-spinning":a,"--n-size":typeof t==`number`?C(t):i[x(`size`,t)],"--n-color":o,"--n-text-color":s}}),a=n?v(`spin`,h(()=>{let{size:t}=e;return typeof t==`number`?String(t):t[0]}),i,e):void 0,o=w(e,[`spinning`,`show`]),s=m(!1);return d(t=>{let n;if(o.value){let{delay:r}=e;if(r){n=window.setTimeout(()=>{s.value=!0},r),t(()=>{clearTimeout(n)});return}}s.value=o.value}),{mergedClsPrefix:t,active:s,mergedStrokeWidth:h(()=>{let{strokeWidth:t}=e;if(t!==void 0)return t;let{size:n}=e;return F[typeof n==`number`?`medium`:n]}),cssVars:n?void 0:i,themeClass:a?.themeClass,onRender:a?.onRender}},render(){var e;let{$slots:t,mergedClsPrefix:r,description:i}=this,a=t.icon&&this.rotate,o=(i||t.description)&&n(`div`,{class:`${r}-spin-description`},i||t.description?.call(t)),s=t.icon?n(`div`,{class:[`${r}-spin-body`,this.themeClass]},n(`div`,{class:[`${r}-spin`,a&&`${r}-spin--rotate`],style:t.default?``:this.cssVars},t.icon()),o):n(`div`,{class:[`${r}-spin-body`,this.themeClass]},n(O,{clsPrefix:r,style:t.default?``:this.cssVars,stroke:this.stroke,"stroke-width":this.mergedStrokeWidth,radius:this.radius,scale:this.scale,class:`${r}-spin`}),o);return(e=this.onRender)==null||e.call(this),t.default?n(`div`,{class:[`${r}-spin-container`,this.themeClass],style:this.cssVars},n(`div`,{class:[`${r}-spin-content`,this.active&&`${r}-spin-content--spinning`,this.contentClass],style:this.contentStyle},t),n(A,{name:`fade-in-transition`},{default:()=>this.active?s:null})):s}}),L={class:`center-block-custom`},R={class:`width700 doc-page`},z={class:`doc-title`},B={key:0,class:`doc-loading`},V={key:2,class:`paper-block`},H={class:`paper`},U={class:`doc-text`},W={class:`docs-links`},G=M(i({__name:`DocsPage`,props:{kind:{}},setup(n){let i=n,d={terms:`Пользовательское соглашение`,privacy:`Политика конфиденциальности`,consent:`Согласие на обработку персональных данных`},h=m(``),g=m(!0),_=m(``);return f(async()=>{let e=D(),t={terms:()=>e.GetTerms({}),privacy:()=>e.GetPrivacy({}),consent:()=>e.GetConsent({})};try{let e=await t[i.kind]();h.value=e.text||``}catch(e){_.value=e instanceof Error?e.message:`Не удалось загрузить документ`}finally{g.value=!1}}),(n,f)=>(c(),a(`div`,L,[o(`div`,R,[o(`h1`,z,[r(N,null,{default:p(()=>[u(s(d[i.kind]),1)]),_:1})]),g.value?(c(),a(`div`,B,[r(e(I),{size:`large`})])):_.value?(c(),t(e(E),{key:1,type:`error`,"show-icon":!1,class:`doc-error`},{default:p(()=>[u(s(_.value),1)]),_:1})):(c(),a(`div`,V,[o(`div`,H,[o(`p`,U,s(h.value),1)]),f[0]||=o(`div`,{class:`paper-shadow paper-shadow-left`},null,-1),f[1]||=o(`div`,{class:`paper-shadow paper-shadow-right`},null,-1)])),o(`div`,W,[f[5]||=u(` Смотрите также: `,-1),r(e(l),{to:`/user-agreement`,class:`docs-link`},{default:p(()=>[...f[2]||=[u(`Пользовательское соглашение`,-1)]]),_:1}),f[6]||=u(` · `,-1),r(e(l),{to:`/privacy-policy`,class:`docs-link`},{default:p(()=>[...f[3]||=[u(`Политика конфиденциальности`,-1)]]),_:1}),f[7]||=u(` · `,-1),r(e(l),{to:`/consent`,class:`docs-link`},{default:p(()=>[...f[4]||=[u(`Согласие на обработку персональных данных`,-1)]]),_:1})])])]))}}),[[`__scopeId`,`data-v-a0534098`]]);export{G as t}; |