doph-js 0.2.35 → 0.2.37

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/dophJs.js CHANGED
@@ -2296,18 +2296,24 @@ const Rs = {
2296
2296
  ])
2297
2297
  ]));
2298
2298
  }
2299
- }, On = { key: 0 }, An = { key: 1 }, Hn = {
2299
+ }, On = ["title"], An = ["title"], Hn = {
2300
2300
  __name: "DTabLabel",
2301
2301
  props: {
2302
2302
  tab: Object
2303
2303
  },
2304
2304
  setup(e) {
2305
2305
  const t = e;
2306
- return (o, n) => t.tab.label ? (d(), f("span", On, A(t.tab.label), 1)) : t.tab.icon ? (d(), f("span", An, [
2306
+ return (o, n) => t.tab.label ? (d(), f("span", {
2307
+ key: 0,
2308
+ title: t.tab.title ? t.tab.title : ""
2309
+ }, A(t.tab.label), 9, On)) : t.tab.icon ? (d(), f("span", {
2310
+ key: 1,
2311
+ title: t.tab.title ? t.tab.title : ""
2312
+ }, [
2307
2313
  oe(M(de), {
2308
2314
  component: t.tab.icon
2309
2315
  }, null, 8, ["component"])
2310
- ])) : $("", !0);
2316
+ ], 8, An)) : $("", !0);
2311
2317
  }
2312
2318
  };
2313
2319
  const Vn = { class: "d-tabs" }, zn = {
@@ -1,2 +1,2 @@
1
- (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.DophJs={},f.Vue))})(this,function(f,e){"use strict";const Pn="",Wn="",jn="",Xn="",Yn="",Y={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String,className:String},setup(t){const o=t,n=e.useSlots(),l=e.computed(()=>{const{className:c}=o;return c===void 0?"icon":["icon",c].join(" ")}),s=e.computed(()=>{const{color:c}=o;return c===void 0?null:c}),a=e.computed(()=>{const c=o.size??null;if(c!==void 0)return typeof c=="number"||/^\d+$/.test(c)?`${c}px`:c}),i=e.computed(()=>e.h("i",{class:l.value,style:{color:s.value,fontSize:a.value}},o.component?e.h(o.component):n));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(i)))}},R={state:{},getters:{getIcon(t){return R.state[t]},getIcons(){return R.state}},mutations:{addIcon(t,o){R.state.name=o},addIcons(t){for(const o in t)t.hasOwnProperty(o)&&(R.state[o]=t[o])}}};function _e(t){const o=t.value.getBoundingClientRect();let n=t.value,l=0,s=0;for(;n&&!isNaN(n.offsetLeft)&&!isNaN(n.offsetTop);)l+=n.offsetLeft-n.scrollLeft,s+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{top:s,left:l,x:o.x,y:o.y,width:o.width,height:o.height}}function rt(){function t(s){return s*Math.random()|0}function o(){return t(16).toString(16)}function n(s){let a="";for(let i=0;i<s;++i)a+=o();return a}function l(){return(t(16)&3|8).toString(16)}return n(8)+"-"+n(4)+"-4"+n(3)+"-"+l()+n(3)+"-"+n(12)}const Un="",W=(t,o)=>{const n=t.__vccOpts||t;for(const[l,s]of o)n[l]=s;return n},it={key:0,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ct=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],dt={key:1},pt={key:2,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},mt=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],H=W({__name:"DButton",props:{class:String,style:[String,Object],icon:String,scale:String,type:String,outline:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click","contextmenu"],setup(t,{expose:o,emit:n}){const l=t,s=e.useSlots(),a=e.ref(null),i=e.computed(()=>l.icon?R.getters.getIcon(l.icon):null),c=k=>{n("click",k)},r=k=>{n("contextmenu",k)},d=e.computed(()=>l.scale==="large"?"button-lg":l.scale==="small"?"button-sm":""),p=e.computed(()=>l.disabled?"disabled":""),u=k=>!!s[k],_=e.computed(()=>u("default")?"":l.scale==="large"?"d-button-lg-icon":l.scale==="small"?"d-button-sm-icon":"d-button-icon"),b=e.computed(()=>{const k=l.outline?"-outline":"";return l.type==="primary"?`button${k}-blue`:l.type==="success"?`button${k}-green`:l.type==="error"?`button${k}-red`:l.type==="warning"?`button${k}-orange`:l.type==="wait"?`button${k}-violet`:l.outline?`button${k}`:""});return o({elementSize:()=>_e(a)}),(k,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button",[l.class,d.value,b.value,p.value].join(" ")])},[e.renderSlot(k.$slots,"default",{},void 0,!0),l.loading?(e.openBlock(),e.createElementBlock("svg",it,ct)):e.createCommentVNode("",!0)],34)),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button button-ext",[l.class,d.value,_.value,b.value,p.value].join(" ")]),style:e.normalizeStyle(l.style)},[l.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:i.value,color:"inherit"},null,8,["component"])):e.createCommentVNode("",!0),e.unref(s).default?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(k.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),l.loading?(e.openBlock(),e.createElementBlock("svg",pt,mt)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-e5cd6ccd"]]),Kn="",ut={key:0,class:"d-input"},ft={key:0,class:"label"},ht=["type","placeholder"],gt={key:1,class:"d-input",style:{display:"flex","flex-direction":"column"}},yt={key:0,class:"label"},_t={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},kt={style:{flex:"1"}},bt=["type","placeholder"],Bt={key:2,class:"d-input",style:{display:"flex","flex-direction":"column"}},St={key:0,class:"label"},xt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},wt={style:{flex:"1"}},Dt=["type","placeholder"],$t=W({__name:"DInput",props:{label:String,placeholder:String,scale:String,modelValue:String,password:Boolean,pre:Object,post:Object,focus:Boolean},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.computed(()=>l.scale==="small"?"d-input-small":l.scale==="large"?"d-input-large":""),i=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{l.focus&&c()});const c=()=>{s.value.focus()};return o({focus:c}),(r,d)=>!l.post&&!l.pre?(e.openBlock(),e.createElementBlock("div",ut,[l.label?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),type:l.password?"password":"text",class:e.normalizeClass(a.value),placeholder:l.placeholder,style:{width:"100%"}},null,10,ht),[[e.vModelDynamic,i.value]])])):l.post&&l.post.click&&!l.pre?(e.openBlock(),e.createElementBlock("div",gt,[l.label?(e.openBlock(),e.createElementBlock("div",yt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_t,[e.createElementVNode("div",kt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,class:e.normalizeClass(["d-input-post-field",a.value]),"onUpdate:modelValue":d[1]||(d[1]=p=>i.value=p),type:l.password?"password":"text",placeholder:l.placeholder,style:{width:"100%"}},null,10,bt),[[e.vModelDynamic,i.value]])]),l.post.label?(e.openBlock(),e.createBlock(H,{key:0,scale:l.scale,class:e.normalizeClass(["d-input-post-button",l.post.class]),onClick:l.post.click,icon:l.post.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.post.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:l.scale,class:e.normalizeClass(["d-input-post-button",l.post.class]),onClick:l.post.click,icon:l.post.icon},null,8,["scale","onClick","icon","class"]))])])):!l.post&&l.pre&&l.pre.click?(e.openBlock(),e.createElementBlock("div",Bt,[l.label?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",xt,[l.pre.label?(e.openBlock(),e.createBlock(H,{key:0,scale:l.scale,class:e.normalizeClass(["d-input-pre-button",l.pre.class]),onClick:l.pre.click,icon:l.pre.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.pre.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:l.scale,class:e.normalizeClass(["d-input-pre-button",l.pre.class]),onClick:l.pre.click,icon:l.pre.icon},null,8,["scale","onClick","icon","class"])),e.createElementVNode("div",wt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,class:e.normalizeClass(["d-input-pre-field",a.value]),"onUpdate:modelValue":d[2]||(d[2]=p=>i.value=p),type:l.password?"password":"text",placeholder:l.placeholder,style:{width:"100%"}},null,10,Dt),[[e.vModelDynamic,i.value]])])])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a972038a"]]),ke={__name:"DBadge",props:{scale:String,type:String,class:String,stress:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>o.scale==="large"?"badge-lg":o.scale==="small"?"badge-sm":""),l=e.computed(()=>{const s=o.stress?"-stress":"";return o.type==="primary"?`badge${s}-blue`:o.type==="success"?`badge${s}-green`:o.type==="error"?`badge${s}-red`:o.type==="warning"?`badge${s}-orange`:o.type==="wait"?`badge${s}-violet`:o.stress?`badge${s}-gray`:""});return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",[o.class,n.value,l.value].join(" ")])},[e.renderSlot(s.$slots,"default")],2))}},j="0px",be={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(t){const o=t,n=r=>({height:r.style.height,width:r.style.width,position:r.style.position,visibility:r.style.visibility,overflow:r.style.overflow,paddingTop:r.style.paddingTop,paddingBottom:r.style.paddingBottom,borderTopWidth:r.style.borderTopWidth,borderBottomWidth:r.style.borderBottomWidth,marginTop:r.style.marginTop,marginBottom:r.style.marginBottom}),l=(r,d)=>{const{width:p}=getComputedStyle(r);r.style.width=p,r.style.position="absolute",r.style.visibility="hidden",r.style.height="";let{height:u}=getComputedStyle(r);return r.style.width=d.width,r.style.position=d.position,r.style.visibility=d.visibility,r.style.height=j,r.style.overflow="hidden",d.height&&d.height!==j?d.height:u},s=(r,d,p,u,_)=>{const b=r.animate(u,_);r.style.height=d.height,b.onfinish=()=>{r.style.overflow=d.overflow,p()}},a=(r,d)=>[{height:j,opacity:o.opacityClosed,paddingTop:j,paddingBottom:j,borderTopWidth:j,borderBottomWidth:j,marginTop:j,marginBottom:j},{height:r,opacity:o.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],i=(r,d)=>{const p=r,u=n(p),_=l(p,u),b=a(_,u),D={duration:o.duration,easing:o.easingEnter};s(p,u,d,b,D)},c=(r,d)=>{const p=r,u=n(p),{height:_}=getComputedStyle(p);p.style.height=_,p.style.overflow="hidden";const b=a(_,u).reverse(),D={duration:o.duration,easing:o.easingLeave};s(p,u,d,b,D)};return(r,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:i,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3}))}},Z={data:void 0},ae=t=>t.reduce((o,n)=>(o[n]=n)&&o,{}),V=ae(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),Ct=ae(["copy","move","link","none"]),Et=ae(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),Be={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:t=>t in Ct},effectAllowed:{validator:t=>t in Et},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(t){const o=t,n=e.useSlots(),l=e.ref(!1),s=e.computed(()=>l&&o.transferData),a=e.computed(()=>({position:"fixed",top:"-1000px"})),i=(c,r)=>{const d=r.dataTransfer;if([V.dragenter,V.dragover].includes(c)&&o.dropEffect&&(d.dropEffect=o.dropEffect),c===V.dragstart){if(o.effectAllowed&&(d.effectAllowed=o.effectAllowed),o.image||n.image){let p;o.image?(p=new Image,p.src=o.image):n.image&&(p=n.image[0].elm),d.setDragImage&&d.setDragImage(p,o.imageXOffset,o.imageYOffset)}o.transferData!==void 0&&(Z.data=o.transferData,r.dataTransfer.setData("text","")),l.value=!0}};return(c,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{draggable:o.draggable,onDrag:r[0]||(r[0]=d=>i(e.unref(V).drag,d)),onDragstart:r[1]||(r[1]=e.withModifiers(d=>i(e.unref(V).dragstart,d),["stop"])),onDragenter:r[2]||(r[2]=d=>i(e.unref(V).dragenter,d)),onDragleave:r[3]||(r[3]=d=>i(e.unref(V).dragleave,d)),onDragend:r[4]||(r[4]=d=>i(e.unref(V).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:s.value}),t.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"image",{transferData:s.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:s.value})]),_:3},40,["draggable"]))}},Qn="",Tt=t=>(e.pushScopeId("data-v-d8c92d5e"),t=t(),e.popScopeId(),t),Nt={key:0,style:{display:"none"}},Vt={key:1},Lt=[Tt(()=>e.createElementVNode("div",{class:"tree-divider"},null,-1))],Mt={key:2},It={class:"tree-divider-header"},zt={class:"item-title"},Rt={key:0,class:"tree-divider"},Ot={key:1},At={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},Ht={key:0,class:"sub-menu"},Se=W({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String},emits:["nodedrop","nodedragover","nodedragleave","nodeclick","nodecontext"],setup(t,{emit:o}){const n=t,l=e.ref(null),s=e.ref(!1),a=e.ref(!1),i=e.ref(!1),c=e.computed(()=>n.model.children&&n.model.children.length),r=e.computed(()=>(g.actions.isTreeExpanded(n.treeId)&&(n.model.expanded=n.model.expanded===void 0?!0:n.model.expanded),n.model.expanded)),d=w=>{o("nodeclick",{event:w,model:n.model})},p=w=>{o("nodeclick",w)},u=w=>{o("nodedrop",w)},_=w=>{o("nodecontext",w)},b=e.computed(()=>(g.actions.isItemSelected(n.treeId,n.model.id)?"selected":"")+(s.value?"node-over ":"")+(a.value?"node-top ":"")+(i.value?"node-bottom ":"")),D=e.computed(()=>n.search?!1:n.model.draggable===!0),k=w=>{o("nodedrop",{e:w,model:n.model});let y=Z.data;if(y===void 0||y.model===void 0)return s.value=!1,!1;if(y.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,y.model.id)||g.actions.isParentOfChild(n.treeId,n.items,y.model.id,n.model.id))return s.value=!1,a.value=!1,i.value=!1,!1;if(!g.state.trees[n.treeId].transfer&&y.id!==n.treeId)return!1;let C="";a.value?C="before":i.value?C="after":C="inside",g.actions.moveTreeNode(y.id,n.treeId,n.items,y.model.id,n.model.id,C),s.value=!1,a.value=!1,i.value=!1},N=w=>{o("nodedragover",{e:w,model:n.model});let y=Z.data;if(y===void 0||y.model===void 0)return s.value=!0,!1;if(y.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,y.model.id)||g.actions.isParentOfChild(n.treeId,n.items,y.model.id,n.model.id))return!1;const C=w.y,L=l.value.getBoundingClientRect().top,M=l.value.getBoundingClientRect().height,h=M/3;C>L&&C<=L+h?(s.value=!1,a.value=!0,i.value=!1):C<L+M&&C>=L+M-h?(s.value=!1,a.value=!1,i.value=!0):(s.value=!0,a.value=!1,i.value=!1)},$=()=>{s.value=!1,a.value=!1,i.value=!1},S=e.computed(()=>n.model.title.startsWith("-")),x=e.computed(()=>{if(n.model.title.startsWith("-")){let[w,...y]=n.model.title.split(" ");return y=y.join(" "),y}return null});return(w,y)=>{const C=e.resolveComponent("d-tree-item",!0),L=e.resolveDirective("touch");return e.unref(g).actions.beforeItem(n.treeId,t.model)?S.value&&!x.value?(e.openBlock(),e.createElementBlock("li",Vt,Lt)):S.value&&x.value?(e.openBlock(),e.createElementBlock("li",Mt,[e.createElementVNode("div",It,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,x.value)),1)])):(e.openBlock(),e.createBlock(Be,{key:3,tag:"li",class:"tree-item","transfer-data":{id:n.treeId,model:n.model},draggable:D.value,onDrop:e.withModifiers(k,["stop"]),onDragenter:y[1]||(y[1]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(N,["prevent","stop"]),onDragleave:e.withModifiers($,["prevent"])},{default:e.withCtx(()=>{var M,h;return[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"node",ref:l,class:e.normalizeClass(b.value),onContextmenu:y[0]||(y[0]=e.withModifiers(E=>o("nodecontext",{e:E,model:n.model}),["prevent"]))},[e.createElementVNode("div",null,[n.model.icons&&n.model.icons.pre&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:e.unref(R).getters.getIcon(n.model.icons.pre.component),size:18,color:n.model.icons.pre.color?n.model.icons.pre.color:"inherit",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.pre&&!c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(n.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.icon&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:2,component:e.unref(R).getters.getIcon(n.model.icons.icon.component),color:n.model.icons.icon.color?n.model.icons.icon.color:"inherit",size:n.model.icons.icon.size?n.model.icons.icon.size:null,className:n.model.icons.icon.class?n.model.icons.icon.class:null},null,8,["component","color","size","className"])):e.createCommentVNode("",!0),e.createElementVNode("div",zt,[S.value?(e.openBlock(),e.createElementBlock("div",Rt)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ot,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,n.model.title)),1))])]),e.createElementVNode("div",At,[((M=n.model.badge)==null?void 0:M.value)!==void 0&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ke),{key:0,class:e.normalizeClass([(h=n.model.badge)==null?void 0:h.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.post&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(n.model.icons.post.component),size:20,color:n.model.icons.post.color?n.model.icons.post.color:"inherit",class:e.normalizeClass(r.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],34)),[[L,d]]),e.createVNode(be,null,{default:e.withCtx(()=>[c.value&&r.value&&!n.search?(e.openBlock(),e.createElementBlock("ul",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.model.children,E=>(e.openBlock(),e.createBlock(C,{class:"tree-item",key:E.id,model:E,treeId:n.treeId,items:n.items,search:n.search,onNodeclick:p,onNodedrop:u,onNodecontext:_},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createElementBlock("li",Nt))}}},[["__scopeId","data-v-d8c92d5e"]]);function xe(t){return t=t||new Map,{all:t,on(o,n){const l=t.get(o);l?l.push(n):t.set(o,[n])},off(o,n){const l=t.get(o);l&&(n?l.splice(l.indexOf(n)>>>0,1):t.set(o,[]))},emit(o,n){let l=t.get(o);l&&l.slice().map(s=>{s(n)}),l=t.get("*"),l&&l.slice().map(s=>{s(o,n)})}}}const I=xe(),g={state:e.reactive({trees:{}}),getters:{getItems(t){return g.state.trees[t].items},getItemsSelect(t){return g.state.trees[t].selected},getParentId(t,o,n,l="id",s="children",a={}){return n&&t&&(t.find(i=>i[l]===n?(a.found=o,i):g.getters.getParentId(i[s],i.id,n,l,s,a)),a.found)?a.found:!1}},mutations:{setTreeItems(t,o){g.state.trees[t].items=o},setItemSelect(t,o){g.state.trees[t].noSelect||(g.state.trees[t].multiSelect?g.state.trees[t].selected.includes(o.id)?g.state.trees[t].selected=g.state.trees[t].selected.filter(function(n){return n!==o.id}):g.state.trees[t].selected=[...g.state.trees[t].selected,o.id]:g.state.trees[t].selected=[o.id])}},actions:{initTreeStore(t,o,n,l,s,a,i){g.state.trees[t]=[],g.state.trees[t].selected=[],g.state.trees[t].noSelect=o,g.state.trees[t].multiSelect=n,g.state.trees[t].expanded=l,g.state.trees[t].transfer=s,g.state.trees[t].renderTitle=a,g.state.trees[t].beforeItem=i},renderTitle(t,o){return g.state.trees[t].renderTitle?g.state.trees[t].renderTitle(o):o},beforeItem(t,o){return g.state.trees[t].beforeItem?g.state.trees[t].beforeItem(o):!0},isItemSelected(t,o){return g.state.trees[t].selected.includes(o)},toggleItem(t,o){o.expanded=o.expanded===void 0||!o.expanded,o.children&&o.children.length&&(o.expanded?I.emit(`expand-${t}`,{id:t,model:o}):I.emit(`collapse-${t}`,{id:t,model:o}))},isTreeExpanded(t){return g.state.trees[t].expanded},isChildOfParent(t,o,n,l){const s=g.actions.deepSearch(o,n);if(s&&s.children){for(let a=0;a<s.children.length;a++)if(s.children[a].id===l)return!0}return!1},isParentOfChild(t,o,n,l){const s=g.actions.deepSearch(o,n);return!!(s&&s.children&&g.actions.deepSearch(s.children,l))},deepSearch(t,o,n="id",l="children",s={}){return o&&t&&(t.find(a=>a[n]===o?(s.found=a,a):g.actions.deepSearch(a[l],o,n,l,s)),s.found)?s.found:!1},deepSearchByTitle(t,o,n="title",l="children",s=[]){if(o&&t&&(t.find(a=>{const i=new RegExp(o,"gi");a[n].toString().toLowerCase().match(i)!==null&&s.push(a),g.actions.deepSearchByTitle(a[l],o,n,l,s)}),s)){for(let a=0;a<s.length;a++);return s}return s},moveTreeNode(t,o,n,l,s,a){const i=g.actions.deleteTreeNode(n,l);g.actions.insertTreeNode(n,s,i,a),I.emit(`move-${o}`,{fromTreeId:t,toTreeId:o,moved:i.id,target:s,position:a})},insertTreeNode(t,o,n,l){if(t)for(let s=0;s<t.length;s++){if(t[s].id===o){let i=s;return l==="after"?(i++,t.splice(i,0,n)):l==="before"?t.splice(i,0,n):l==="inside"&&(Object.hasOwn(t[s],"children")||(t[s].children=[],t[s].opened=!0),t[s].children.splice(0,0,n)),t[s]}const a=this.insertTreeNode(t[s].children,o,n,l);if(a)return a}},deleteTreeNode(t,o){if(t)for(let n=0;n<t.length;n++){if(t[n].id===o){const s=t[n];return t.splice(n,1),s}const l=g.actions.deleteTreeNode(t[n].children,o);if(l)return l}}}},we={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(V),setup(t,{expose:o,emit:n}){let l=e.reactive({});const s=e.ref("false"),a=e.ref(null),i=new Set,c=e.computed(()=>s.value&&l),r=(p,u)=>{l=Z.data,n(p,u,l),p===V.dragenter&&(i.size||u.target===a.value)&&i.add(u.target),p===V.dragleave&&i.delete(u.target),p===V.drop&&i.clear(),s.value=!!i.size};return o({elementSize:()=>_e(a)}),(p,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{ref_key:"el",ref:a,onDragenter:u[0]||(u[0]=_=>r(e.unref(V).dragenter,_)),onDragleave:u[1]||(u[1]=_=>r(e.unref(V).dragleave,_)),onDragover:u[2]||(u[2]=e.withModifiers(_=>r(e.unref(V).dragover,_),["prevent"])),onDrop:u[3]||(u[3]=e.withModifiers(_=>r(e.unref(V).drop,_),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{transferData:c.value})]),_:3},544))}},re={__name:"DMenu",props:{class:String,items:Array,style:[String,Object],noSelect:{type:Boolean,default:!0},renderItemTitle:Function,beforeItem:Function,bodyAsParent:{type:Boolean,default:!0}},emits:["select"],setup(t,{expose:o,emit:n}){const l=t;let s=e.ref(null),a=e.ref(!1);const i=()=>{I.emit("menu-show-request"),a.value=!0},c=()=>{var _;(_=s.value)==null||_.collapseAll(),a.value=!1},r=()=>a.value;I.on("menu-show-request",()=>{c()}),o({show:i,hide:c,elementSize:()=>s.value.elementSize(),isShowed:r,itemsCount:()=>s.value.itemsCount()});const u=_=>{n("select",_),_.model.children||c()};return(_,b)=>{const D=e.resolveDirective("click-outside");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(a)?e.withDirectives((e.openBlock(),e.createBlock(ie,{key:0,ref_key:"treeRef",ref:s,items:l.items,"no-select":l.noSelect,class:e.normalizeClass(l.class),style:e.normalizeStyle(l.style),onSelect:u,"render-title":l.renderItemTitle,"before-item":l.beforeItem},null,8,["items","no-select","class","style","render-title","before-item"])),[[D,()=>c()]]):e.createCommentVNode("",!0)])}}},De={__name:"DContextMenu",props:{items:Array,renderItemTitle:Function,beforeItem:Function},emits:["select"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.ref(0),i=e.ref(0),c=e.computed(()=>({left:a.value+"px",top:i.value+"px"})),r=p=>{s.value.show(),e.nextTick(()=>{const u=s.value.elementSize(),_=window.innerWidth,b=window.innerHeight;a.value=_-p.pageX<u.width?p.pageX-u.width:p.pageX,i.value=b-p.pageY<u.height?p.pageY-u.height:p.pageY,s.value.itemsCount()===0&&s.value.hide()})},d=p=>{n("select",p)};return o({show:r}),(p,u)=>(e.openBlock(),e.createBlock(re,{ref_key:"dMenuRef",ref:s,onSelect:d,items:l.items,style:e.normalizeStyle(c.value),class:"context-menu","no-select":!0,"render-item-title":l.renderItemTitle,"before-item":l.beforeItem},null,8,["items","style","render-item-title","before-item"]))}},ie={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function,beforeItem:Function,search:String,context:Array,contextClick:{type:Function,default:()=>{}},contextBeforeClick:{type:Function,default:()=>!0}},emits:["select","collapse","expand","move","over","drop"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.ref(!1),i=e.ref(null),c=e.getCurrentInstance().uid;g.actions.initTreeStore(c,l.noSelect,l.multiSelect,l.expanded,l.transfer,l.renderTitle,l.beforeItem);const r=(h,E)=>{console.log(h,E)};I.on(`expand-${c}`,h=>{n("expand",h)}),I.on(`collapse-${c}`,h=>{n("collapse",h)}),I.on(`move-${c}`,h=>{n("move",h)});const d=e.computed(()=>l.search?g.actions.deepSearchByTitle(l.items,l.search):l.items),p=(h=null)=>{g.mutations.setItemSelect(c,h.model),g.actions.toggleItem(c,h.model),n("select",h)},u=(h=null)=>{n("over",h)},_=(h=null)=>{n("drop",h)},b=()=>s.value.elementSize(),D=()=>{for(let h=0;h<l.items.length;h++)l.items[h].expanded=!0},k=()=>{for(let h=0;h<l.items.length;h++)l.items[h].expanded=!1},N=()=>c,$=h=>g.actions.deepSearch(l.items,h),S=h=>{$(h)&&g.mutations.setItemSelect(c,$(h))},x=h=>{l.contextClick({e:h.e,model:h.model,target:i.value})},w=h=>l.contextBeforeClick({model:h,target:i.value}),y=e.computed(()=>l.context),C=h=>(y.value&&(i.value=h.model,a.value.show(h.e)),!1),L=()=>M(d.value),M=h=>{let E=0;for(let m=0;m<h.length;m++)E+=g.actions.beforeItem(c,h[m])?1:0,h[m].children&&h[m].children.length>0&&(E+=M(h[m].children));return E};return o({elementSize:b,expandAll:D,collapseAll:k,getId:N,getNode:$,selectNode:S,itemsCount:L}),(h,E)=>(e.openBlock(),e.createBlock(we,{ref_key:"treeRef",ref:s,class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,m=>(e.openBlock(),e.createBlock(Se,{key:m.id,model:m,treeId:e.unref(c),items:l.items,search:l.search,onNodeclick:p,onNodedragover:u,onNodedrop:_,onNodecontext:C},null,8,["model","treeId","items","search"]))),128)),y.value?(e.openBlock(),e.createBlock(De,{key:0,ref_key:"contextTreeRef",ref:a,items:y.value,onSelect:x,"before-item":w},null,8,["items"])):e.createCommentVNode("",!0)]),_:1},8,["onDrop"]))}},tl="",Ft=W({__name:"DAccordion",props:{items:Array,renderTitle:Function,noSelect:{type:Boolean,default:!0}},setup(t){const o=t;return(n,l)=>(e.openBlock(),e.createBlock(ie,{class:"accordion",items:o.items,"no-select":o.noSelect,"render-title":o.renderTitle},null,8,["items","no-select","render-title"]))}},[["__scopeId","data-v-642edace"]]),$e={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:l,zIndex:s,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=o,p=l?"fixed":"static",u=o.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${s};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(l,s)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ce={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:l,top:s,zIndex:a,minWidth:i,height:c,paddingLeft:r,transitionDuration:d,transitionTimingFunction:p}=o,u=l?"fixed":"static",_=o.useMinWidthLayout?`min-width: ${i}px;`:"";return`position:${u};top:${s}px;z-index:${a};${_}height:${c}px;padding-left:${r}px;transition-duration:${d}ms;transition-timing-function:${p};`});return(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ee={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:l,zIndex:s,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=o,p=l?"fixed":"static",u=o.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${s};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(l,s)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Te={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>{const{zIndex:l,width:s,paddingTop:a,transitionDuration:i,transitionTimingFunction:c}=o;return`z-index:${l};width:${s}px;padding-top:${a}px;transition-duration:${i}ms;transition-timing-function:${c};`});return(l,s)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ne={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(t){const o=t,n=e.computed(()=>{const{paddingTop:l,paddingBottom:s,paddingLeft:a,transitionDuration:i,transitionTimingFunction:c}=o,r=`overflow:${o.overflowHidden?"hidden":"visible"};`;return`padding-top:${l}px;padding-bottom:${s}px;padding-left:${a}px;${r}transition-duration:${i}ms;transition-timing-function:${c};`});return(l,s)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(n.value),class:"d-layout-content"},[e.renderSlot(l.$slots,"default")],4))}};function Pt(t){const o=e.ref(0),n=e.computed(()=>`transform: translateX(${-o.value}px);`);let l=!1;function s(p){o.value=p}function a(){var p;const u=((p=document.scrollingElement)===null||p===void 0?void 0:p.scrollLeft)||0;s(u)}function i(){a()}function c(){document.addEventListener("scroll",a)}function r(){l&&document.removeEventListener("scroll",a)}function d(){i(),c(),l=!0}return e.watch(t,p=>{p?d():r()},{immediate:!0}),e.onUnmounted(()=>{r()}),n}const Wt=1001,jt=999,Xt=998,Yt={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse","sidebar-mask-click"],setup(t,{emit:o}){const n=t,l=e.computed(()=>n.useMinWidthLayout?`min-width:${n.minWidth}px;`:""),s=e.computed(()=>n.useMinWidthLayout&&(n.fixedHeaderAndTab||n.fixedFooter)),a=Pt(s),i=e.computed(()=>n.fixedHeaderAndTab?a.value:""),c=e.computed(()=>n.fixedFooter?a.value:""),r=e.computed(()=>{const{transitionDuration:y,transitionTimingFunction:C}=n;return{transitionDuration:y,transitionTimingFunction:C}}),d=e.computed(()=>n.mode==="vertical"),p=e.computed(()=>n.isMobile||d.value?1003:1e3),u=e.computed({get(){return n.sidebarCollapse},set(y){o("update:sidebar-collapse",y)}});function _(){o("sidebar-mask-click")}const b=e.computed(()=>n.isMobile&&!u.value),D=e.computed(()=>{const{transitionDuration:y,transitionTimingFunction:C}=n;return`background-color:${n.maskBg};transition-duration:${y}ms;transition-timing-function:${C};`}),k=e.computed(()=>{const{sidebarWidth:y,sidebarCollapsedWidth:C}=n,L=n.isMobile?0:C,M=u.value?L:y;return n.sidebarVisible?M:0}),N=e.computed(()=>n.isMobile?0:k.value),$=e.computed(()=>d.value?N.value:0),S=e.computed(()=>!n.isMobile&&!d.value&&n.headerVisible?n.headerHeight:0),x=e.computed(()=>{let y=0;return n.fixedHeaderAndTab&&(n.headerVisible&&(y+=n.headerHeight),n.tabVisible&&(y+=n.tabHeight)),y}),w=e.computed(()=>n.fixedFooter&&n.footerVisible?n.footerHeight:0);return(y,C)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(l.value)},[t.headerVisible?(e.openBlock(),e.createBlock($e,e.mergeProps({key:0},r.value,{fixed:t.fixedHeaderAndTab,"z-index":Wt,"min-width":t.minWidth,height:t.headerHeight,"padding-left":$.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),t.tabVisible?(e.openBlock(),e.createBlock(Ce,e.mergeProps({key:1},r.value,{fixed:t.fixedHeaderAndTab,"z-index":jt,"min-width":t.minWidth,top:t.headerHeight,height:t.tabHeight,"padding-left":N.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),t.sidebarVisible?(e.openBlock(),e.createBlock(Te,e.mergeProps({key:2},r.value,{"z-index":p.value,width:k.value,"padding-top":S.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(D.value),onClick:_},null,4)):e.createCommentVNode("",!0),e.createVNode(Ne,e.mergeProps(r.value,{"padding-top":x.value,"padding-bottom":w.value,"padding-left":N.value,"overflow-hidden":t.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),t.footerVisible?(e.openBlock(),e.createBlock(Ee,e.mergeProps({key:4},r.value,{fixed:t.fixedFooter,"z-index":Xt,"min-width":t.minWidth,height:t.footerHeight,"padding-left":N.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},U={state:e.reactive({theme:"dark"}),getters:{theme(){return U.state.theme}},mutations:{setTheme(t){U.state.theme=t,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(t)}},actions:{toggleTheme(){U.state.theme=U.state.theme==="dark"?"light":"dark",document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(U.state.theme)}}},Ut={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(t){const o=t;return U.mutations.setTheme(o.theme),(n,l)=>e.renderSlot(n.$slots,"default")}},nl="",qt={__name:"DScrollProvider",props:{xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const o=t;e.useCssVars(a=>({e35a6f9a:n.value,e35a6f98:l.value}));const n=e.computed(()=>o.xHide?"hidden":"visible"),l=e.computed(()=>o.yHide?"hidden":"visible"),s=a=>{document.body.classList.add(a),document.documentElement.classList.add(a),document.documentElement.classList.add("d-global-scroll")};return e.onMounted(()=>{s("colored-scroller")}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(a.$slots,"default")]))}},ll="",Gt=W({__name:"DScroll",props:{autoHide:{type:Boolean,default:!0},xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const o=t;e.useCssVars(s=>({c07fa29a:n.value,c07fa298:l.value}));const n=e.computed(()=>o.xHide?"hidden":"visible"),l=e.computed(()=>o.yHide?"hidden":"visible");return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.autoHide?"d-scroll-hide":"d-scroll")},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}},[["__scopeId","data-v-d50b3609"]]),Zt={class:"modal-content"},Kt={class:"modal-header"},Jt={class:"modal-title"},Qt={class:"modal-body"},vt={class:"modal-footer"},ce={__name:"DModal",props:{show:Boolean,width:String,maxWidth:String},emits:["open","close"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.ref(!1);a.value=l==null?void 0:l.show;const i=()=>{a.value=!0,n("open",s)},c=()=>{a.value=!1,n("close",s)};return o({show:i,hide:c}),(r,d)=>{const p=e.resolveDirective("keydown");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:s,class:"modal"},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle({width:l.width,maxWidth:l.maxWidth})},[e.createElementVNode("div",Zt,[e.createElementVNode("div",Kt,[e.createElementVNode("h5",Jt,[e.renderSlot(r.$slots,"modal-title")])]),e.createElementVNode("div",Qt,[e.renderSlot(r.$slots,"default")]),e.createElementVNode("div",vt,[e.renderSlot(r.$slots,"modal-footer")])])],4)])),[[p,c,"Escape"]]):e.createCommentVNode("",!0)]),_:3})])}}},q=e.shallowRef();function de(t){t===void 0&&(t=q.value.comp.returnValue()),q.value.resolve(t),q.value=null}function Ve(t,o,n="default"){return new Promise(l=>{q.value={dialog:t,props:o,wrapper:n,resolve:l}})}var eo=(t,o)=>{const n=t.__vccOpts||t;for(const[l,s]of o)n[l]=s;return n};const to=e.defineComponent({name:"DialogWrapper",components:{},props:{name:{type:String,default:"default"},transitionAttrs:Object},setup(){const t=e.ref();return e.watch(t,()=>{q.value&&(q.value.comp=t.value)}),{dialogRef:q,dialogInstance:t}}});function oo(t,o,n,l,s,a){return e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.guardReactiveProps(t.transitionAttrs)),{default:e.withCtx(()=>[t.dialogRef&&t.dialogRef.wrapper===t.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.dialogRef.dialog),e.mergeProps({key:0},t.dialogRef.props,{ref:"dialogInstance"}),null,16)):e.createCommentVNode("",!0)]),_:1},16)}var no=eo(to,[["render",oo]]);const lo={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Le={__name:"DAlertDialog",props:{title:String,message:String},setup(t,{expose:o}){const n=t;return o({returnValue:()=>!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(ce,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",lo,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(de)())},{default:e.withCtx(()=>[e.createTextVNode("Закрыть")]),_:1})])]),_:1})]))}},so={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Me={__name:"DConfirmDialog",props:{title:String,message:String},setup(t,{expose:o}){const n=t;return o({returnValue:()=>!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(ce,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",so,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(de)())},{default:e.withCtx(()=>[e.createTextVNode("Да")]),_:1}),e.createVNode(H,{class:"button-red",onClick:a[1]||(a[1]=i=>e.unref(de)(!1))},{default:e.withCtx(()=>[e.createTextVNode("Нет")]),_:1})])]),_:1})]))}},ao={class:"dropdown"},ro={__name:"DDropdown",props:{class:String,icon:{type:[String,null],default:null},items:Array,menuStyle:Object,renderItemTitle:Function,beforeItem:Function,type:String,bodyAsParent:{type:Boolean,default:!0}},emits:["select","click"],setup(t,{expose:o,emit:n}){const l=t,s=e.useSlots(),a=e.ref(null),i=e.ref(null),c=e.ref(0),r=e.ref(0),d=b=>{if(n("click",b),a.value.isShowed()){a.value.hide();return}a.value.show(),e.nextTick(()=>{const D=a.value.elementSize(),k=i.value.elementSize(),N=window.innerWidth,$=window.innerHeight;c.value=N-(k.x+k.width)<D.width?k.left-D.width+k.width:k.left,r.value=$-(k.y+k.height)<D.height?k.top-D.height-5:k.height+k.top+5})},p=b=>{n("select",b)},u=e.computed(()=>({left:c.value+"px",top:r.value+"px",position:l.bodyAsParent?"absolute":"fixed",...l.menuStyle}));o({show:d});const _=b=>!!s[b];return(b,D)=>(e.openBlock(),e.createElementBlock("div",ao,[_("default")?(e.openBlock(),e.createBlock(H,{key:0,ref_key:"buttonRef",ref:i,class:e.normalizeClass(l.class),icon:l.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:l.type},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default")]),_:3},8,["class","icon","onClick","type"])):(e.openBlock(),e.createBlock(H,{key:1,ref_key:"buttonRef",ref:i,class:e.normalizeClass(l.class),icon:l.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:l.type},null,8,["class","icon","onClick","type"])),e.createVNode(re,{ref_key:"dMenuRef",ref:a,items:l.items,class:"dropdown-menu",style:e.normalizeStyle(u.value),"no-select":!0,onSelect:p,"render-item-title":l.renderItemTitle,"before-item":l.beforeItem,"body-as-parent":l.bodyAsParent},null,8,["items","style","render-item-title","before-item","body-as-parent"])]))}},io={},co={class:"d-panel"};function po(t,o){return e.openBlock(),e.createElementBlock("div",co,[e.renderSlot(t.$slots,"default")])}const Ie=W(io,[["render",po]]),mo={class:"card-header"},uo={class:"modal-title"},fo={class:"card-body"},ho={class:"card-footer"},go={__name:"DCard",setup(t){return(o,n)=>(e.openBlock(),e.createBlock(Ie,{class:"d-card"},{default:e.withCtx(()=>[e.createElementVNode("div",mo,[e.createElementVNode("h5",uo,[e.renderSlot(o.$slots,"title")])]),e.createElementVNode("div",fo,[e.renderSlot(o.$slots,"default")]),e.createElementVNode("div",ho,[e.renderSlot(o.$slots,"footer")])]),_:3}))}},yo=new Map;class _o{constructor(o,n,l){this.remaining=n,this.callback=o,this.notifyItem=l,this.resume()}pause(){clearTimeout(this.notifyItem.timer),this.remaining-=Date.now()-this.start}resume(){this.start=Date.now(),clearTimeout(this.notifyItem.timer),this.notifyItem.timer=setTimeout(this.callback,this.remaining)}}const pe="[-+]?[0-9]*.?[0-9]+",ze=[{name:"px",regexp:new RegExp(`^${pe}px$`)},{name:"%",regexp:new RegExp(`^${pe}%$`)},{name:"px",regexp:new RegExp(`^${pe}$`)}],ko=t=>{if(t==="auto")return{type:t,value:0};for(let o=0;o<ze.length;o++){const n=ze[o];if(n.regexp.test(t))return{type:n.name,value:parseFloat(t)}}return{type:"",value:t}},bo=t=>{switch(typeof t){case"number":return{type:"px",value:t};case"string":return ko(t);default:return{type:"",value:t}}},Re={x:new Set(["left","center","right"]),y:new Set(["top","bottom"])},Bo=(t=>()=>t++)(0),So=t=>typeof t!="string"?[]:t.split(/\s+/gi).filter(Boolean),xo=t=>{typeof t=="string"&&(t=So(t));let o=null,n=null;return t.forEach(l=>{Re.y.has(l)&&(n=l),Re.x.has(l)&&(o=l)}),{x:o,y:n}},me={position:["top","right"],cssAnimation:"fade",velocityAnimation:{enter:t=>({height:[t.clientHeight,0],opacity:[1,0]}),leave:{height:0,opacity:[0,1]}}},wo={__name:"VelocityGroup",emits:["enter","leave","after-leave"],setup(t,{emit:o}){const n=(a,i)=>{o("enter",a,i)},l=(a,i)=>{o("leave",a,i)},s=()=>{o("after-leave")};return(a,i)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",css:!1,onEnter:n,onLeave:l,onAfterLeave:s},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},Do=Object.assign({inheritAttrs:!1},{__name:"CssGroup",props:{name:String},setup(t){const o=t;return(n,l)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",name:o.name},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["name"]))}}),$o=["data-id"],Co=["onClick"],Eo=["innerHTML"],To=["innerHTML"],No={key:0,class:"d-notification-title"},Vo={class:"notification-content"},Lo={__name:"DNotificationProvider",props:{group:{type:String,default:""},width:{type:[String,Number],default:300},reverse:{type:Boolean,default:!1},position:{type:[String,Array,null],default:me.position},classes:{type:String,default:"d-notification"},animationType:{type:String,default:"css"},animation:{type:[String,Object],default:me.velocityAnimation},animationName:{type:String,default:me.cssAnimation},speed:{type:Number,default:300},duration:{type:Number,default:3e3},delay:{type:Number,default:0},max:{type:Number,default:1/0},ignoreDuplicates:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},pauseOnHover:{type:Boolean,default:!1},dangerouslySetInnerHtml:{type:Boolean,default:!1}},emits:["click","destroy","start"],setup(t,{emit:o}){const n=t,l={IDLE:0,DESTROYED:2},s=e.ref([]),a=e.ref(null),i=e.ref(yo.get("velocity")),c=e.computed(()=>n.animationType==="velocity"),r=e.computed(()=>c.value?wo:Do),d=e.computed(()=>s.value.filter(m=>m.state!==l.DESTROYED)),p=e.computed(()=>bo(n.width)),u=e.computed(()=>{const{x:m,y:T}=xo(n.position),B=p.value.value,A=p.value.type,X={width:B+A};return T&&(X[T]="0px"),m&&(m==="center"?X.left=`calc(50% - ${+B/2}${A})`:X[m]="0px"),X}),_=e.computed(()=>"bottom"in u.value),b=m=>{o("click",m),n.closeOnClick&&w(m)},D=()=>{var m;n.pauseOnHover&&((m=a.value)==null||m.pause())},k=()=>{var m;n.pauseOnHover&&((m=a.value)==null||m.resume())},N=m=>{if(m.group||(m.group=""),m.data||(m.data={}),n.group!==m.group)return;if(m.clean||m.clear){C();return}const T=typeof m.duration=="number"?m.duration:n.duration,B=typeof m.speed=="number"?m.speed:n.speed,A=typeof m.ignoreDuplicates=="boolean"?m.ignoreDuplicates:n.ignoreDuplicates,{title:X,text:ee,type:te,data:oe,id:ne}=m,P={id:ne||Bo(),title:X,text:ee,type:te,state:l.IDLE,speed:B,length:T+2*B,data:oe};T>=0&&(a.value=new _o(()=>w(P),P.length,P));const le=n.reverse?!_.value:_.value;let G=-1;const se=d.value.some(K=>K.title===m.title&&K.text===m.text);(!A||!se)&&(le?(s.value.push(P),o("start",P),d.value.length>n.max&&(G=0)):(s.value.unshift(P),o("start",P),d.value.length>n.max&&(G=d.value.length-1)),G!==-1&&w(d.value[G]))},$=m=>{y(m)},S=m=>["d-notification-template",n.classes,m.type||""],x=m=>c.value?void 0:{transition:`all ${m.speed}ms`},w=m=>{clearTimeout(m.timer),m.state=l.DESTROYED,E(),o("destroy",m)},y=m=>{const T=s.value.find(B=>B.id===m);T&&w(T)},C=()=>{d.value.forEach(w)},L=(m,T)=>{var A;const B=(A=n.animation)==null?void 0:A[m];return typeof B=="function"?B(T):B},M=(m,T)=>{if(!c.value)return;const B=L("enter",m);i.value(m,B,{duration:n.speed,complete:T})},h=(m,T)=>{if(!c.value)return;const B=L("leave",m);i.value(m,B,{duration:n.speed,complete:T})};function E(){s.value=s.value.filter(m=>m.state!==l.DESTROYED)}return e.onMounted(()=>{I.on("notification-add",N),I.on("notification-close",$)}),(m,T)=>(e.openBlock(),e.createElementBlock("div",{class:"d-notification-group",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{name:t.animationName,onEnter:M,onLeave:h,onAfterLeave:E},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,B=>(e.openBlock(),e.createElementBlock("div",{key:B.id,class:"d-notification-wrapper",style:e.normalizeStyle(x(B)),"data-id":B.id,onMouseenter:D,onMouseleave:k},[e.renderSlot(m.$slots,"body",{class:e.normalizeClass([t.classes,B.type]),item:B,close:()=>w(B)},()=>[e.createElementVNode("div",{class:e.normalizeClass(S(B)),onClick:A=>b(B)},[t.dangerouslySetInnerHtml?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-notification-title",innerHTML:B.timer},null,8,Eo)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"notification-content",innerHTML:B.text},null,8,To)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.title?(e.openBlock(),e.createElementBlock("div",No,e.toDisplayString(B.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Vo,e.toDisplayString(B.text),1)],64))],10,Co)])],44,$o))),128))]),_:3},40,["name"]))],4))}},Mo={class:"d-info-progress-icon-container"},Io={class:"d-info-progress-icon"},zo={class:"d-info-progress-data-container"},Ro=["innerHTML"],Oo={__name:"DInfoProgress",props:{style:[String,Object],label:String,progress:Number,icon:String,type:String},emits:["click"],setup(t,{emit:o}){const n=t,l=e.computed(()=>n.icon?R.getters.getIcon(n.icon):null);return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-info-progress",n.type?`d-info-progress-${n.type}`:null]),style:e.normalizeStyle(n.style),onClick:a[0]||(a[0]=i=>{o("click",i)})},[e.createElementVNode("div",Mo,[e.createElementVNode("div",Io,[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:l.value,color:"inherit",size:17},null,8,["component"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",zo,[e.createElementVNode("div",{class:"d-info-progress-line",style:e.normalizeStyle("width: "+n.progress+"%;")},null,4),e.createElementVNode("div",{class:"d-info-progress-label",innerHTML:t.label},null,8,Ro)])],6))}},Ao={class:"d-checkbox"},Ho=["id","checked","disabled"],Fo=["for"],Po={__name:"DCheckbox",props:{label:String,modelValue:Boolean,disabled:{type:Boolean,default:!1},change:Function,checked:Boolean},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,s=e.getCurrentInstance().uid,a=e.computed({get:()=>n.modelValue,set:i=>{o("update:modelValue",i)}});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ao,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),id:`i-${e.unref(s)}`,type:"checkbox",checked:n.checked,disabled:n.disabled,onChange:c[1]||(c[1]=(...r)=>n.change&&n.change(...r))},null,40,Ho),[[e.vModelCheckbox,a.value]]),e.createElementVNode("label",{for:`i-${e.unref(s)}`},e.toDisplayString(n.label),9,Fo)]))}};async function Oe(t,o){return await Ve(Me,{title:t,message:o})}async function Ae(t,o){return await Ve(Le,{title:t,message:o})}const Wo={__name:"DDialogProvider",setup(t){return window.alert=Ae,window.confirm=Oe,(o,n)=>(e.openBlock(),e.createBlock(e.unref(no)))}},jo={class:"d-select"},Xo={key:0,class:"label"},Yo=["value","selected","disabled"],Uo={__name:"DSelect",props:{label:String,size:String,options:Array,modelValue:String,scale:String},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,l=e.computed(()=>n.scale?"d-select-"+n.scale:""),s=e.computed({get:()=>n.modelValue,set:a=>{o("update:modelValue",a)}});for(let a=0;a<n.options.length;a++)if(n.options[a].selected){s.value=n.options[a].value;break}return(a,i)=>(e.openBlock(),e.createElementBlock("div",jo,[n.label?(e.openBlock(),e.createElementBlock("div",Xo,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),class:e.normalizeClass(l.value),style:e.normalizeStyle(n.size==="wide"?"width:100%":"")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,(c,r)=>(e.openBlock(),e.createElementBlock("option",{key:r,value:c.value,selected:c.selected,disabled:c.disabled},e.toDisplayString(c.label),9,Yo))),128))],6),[[e.vModelSelect,s.value]])]))}},qo={key:0},Go={key:1},Zo={__name:"DTabLabel",props:{tab:Object},setup(t){const o=t;return(n,l)=>o.tab.label?(e.openBlock(),e.createElementBlock("span",qo,e.toDisplayString(o.tab.label),1)):o.tab.icon?(e.openBlock(),e.createElementBlock("span",Go,[e.createVNode(e.unref(Y),{component:o.tab.icon},null,8,["component"])])):e.createCommentVNode("",!0)}},al="",Ko={class:"d-tabs"},Jo=W({__name:"DTabs",props:{tabs:Array},setup(t){const o=t,n=e.toRef(o,"tabs"),l=e.ref(0),s=a=>{l.value=a};return(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ko,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(c,r)=>(e.openBlock(),e.createBlock(Zo,{index:r,tab:c,class:e.normalizeClass(["d-tab-title",r===l.value?"active":""]),onClick:d=>s(r)},null,8,["index","tab","class","onClick"]))),256))]),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value[l.value].component)))],1024))],64))}},[["__scopeId","data-v-c98761cd"]]),il="",Qo={class:"d-grid"},vo=W({__name:"DGrid",props:{gap:{type:String,default:"1em"},colXs:{type:String,default:"repeat(1, 1fr)"},colSm:String,colMd:String,colLg:String,colXl:String,colXxl:String},setup(t){const o=t;e.useCssVars(p=>({"09eba472":r[0],"09eba434":r[1],"09eba3f6":r[2],"09eba3b8":r[3],"09eba37a":r[4],"09eba33c":r[5],"898eb2ac":o.gap}));const{colXs:n,colSm:l,colMd:s,colLg:a,colXl:i,colXxl:c}=e.toRefs(o),r=[n.value,l.value,s.value,a.value,i.value,c.value];let d=null;for(let p=0;p<r.length;p++)d||(d=r[0]),p>0&&(r[p]?d=r[p]:r[p]=d);return(p,u)=>(e.openBlock(),e.createElementBlock("div",Qo,[e.renderSlot(p.$slots,"default",{},void 0,!0)]))}},[["__scopeId","data-v-b45e8130"]]),en=["src","alt","title"],tn={__name:"DImage",props:{src:String,srcFail:String,alt:String,title:String,width:String,height:String,radius:String},setup(t){const o=t,n=e.ref(null),l=new Image;return l.onload=()=>{n.value=l.src},l.onerror=()=>{n.value=o.srcFail},e.onMounted(()=>{l.src=o.src}),(s,a)=>n.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.value,alt:o.alt,title:o.title,style:e.normalizeStyle({width:o.width,height:o.height,borderRadius:o.radius})},null,12,en)):e.createCommentVNode("",!0)}},dl="",on={class:"d-textarea"},nn={key:0,class:"label"},ln=["rows","cols","placeholder"],sn=W({__name:"DTextarea",props:{label:String,placeholder:String,scale:String,modelValue:String,rows:{type:Number,default:3},cols:{type:Number,default:null},focus:Boolean},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.computed(()=>l.scale==="small"?"d-textarea-small":l.scale==="large"?"d-textarea-large":""),i=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{l.focus&&c()});const c=()=>{s.value.focus()};return o({focus:c}),(r,d)=>(e.openBlock(),e.createElementBlock("div",on,[l.label?(e.openBlock(),e.createElementBlock("div",nn,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),rows:l.rows,cols:l.cols,placeholder:l.placeholder,class:e.normalizeClass(a.value),style:{width:"100%"}},null,10,ln),[[e.vModelText,i.value]])]))}},[["__scopeId","data-v-0e805d5d"]]);class an{constructor(o){this.fields=o}validate(){let o=!1;for(let n in this.fields)this.fields[n].ref.value.validate()===!0&&(o=!0);return!o}}class rn{validate(o,n="https"){return this._isValidURL(o)||(o=n+"://"+o),this._isValidURL(o)}message(o,n){let l="";switch(o){case"url":l=n;break}return l}_isValidURL(o){try{return new URL(o),!0}catch{return!1}}}const cn=new rn;class dn{validate(o=""){return o!==""}message(o){return o}}const pn=new dn;class mn{validate(o="",n=0){return o.length>=n}message(o){return o}}const un=new mn;class fn{validate(o="",n=0){return o.length<=n}message(o){return o}}const hn=new fn;class gn{validate(o){return/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(o)}message(o){return o}}const yn=new gn;class _n{validate(o){return!isNaN(parseFloat(o))&&!isNaN(o-0)}message(o){return o}}const kn=new _n,z={RulesUrl:cn,RulesRequired:pn,RulesMin:un,RulesMax:hn,RulesEmail:yn,RulesNumber:kn};class bn{validate(o,n){var s,a,i,c,r,d,p,u,_,b,D,k,N,$;let l="";if(n){let S=!1;for(let x in n)if(!S)switch(x){case"url":l=z.RulesUrl.validate(o,"https")||o.length===0?"":z.RulesUrl.message("url",(s=n[x])!=null&&s.message?(a=n[x])==null?void 0:a.message:"url_incorrect"),S=l!=="";break;case"required":l=z.RulesRequired.validate(o)?"":z.RulesRequired.message((i=n[x])!=null&&i.message?(c=n[x])==null?void 0:c.message:"required"),S=l!=="";break;case"min":l=z.RulesMin.validate(o,(r=n[x])==null?void 0:r.value)?"":z.RulesMin.message((d=n[x])!=null&&d.message?(p=n[x])==null?void 0:p.message:"very_small"),S=l!=="";break;case"max":l=z.RulesMax.validate(o,(u=n[x])==null?void 0:u.value)?"":z.RulesMax.message((_=n[x])!=null&&_.message?(b=n[x])==null?void 0:b.message:"vary_large"),S=l!=="";break;case"email":l=z.RulesEmail.validate(o)?"":z.RulesMax.message((D=n[x])!=null&&D.message?(k=n[x])==null?void 0:k.message:"email_incorrect"),S=l!=="";break;case"number":l=z.RulesNumber.validate(o)?"":z.RulesNumber.message((N=n[x])!=null&&N.message?($=n[x])==null?void 0:$.message:"number_incorrect"),S=l!=="";break}}return l}}const Bn=new bn,Sn={style:{display:"flex","flex-direction":"column"}},xn={key:0,class:"d-label"},wn={key:0,class:"text-red"},Dn={style:{display:"flex","flex-direction":"row"}},$n={style:{flex:"1",position:"relative"}},Cn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],En=["id","type","placeholder","disabled"],Tn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Nn={key:1,class:"d-help"},Vn={key:2,class:"d-error text-red"},Ln={__name:"DInputString",props:{form:Object,name:String,modelValue:String,label:String,error:String,help:String,placeholder:String,type:{type:String,default:"text"},pre:Object,post:Object,fieldRules:Object,scale:String,focus:Boolean,disabled:Boolean},emits:["update:modelValue","input"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(l.error),a=rt(),i=e.ref(!1),c=e.ref(null);//!props.form ? ref(null) : props.form.fields[props.name].ref
1
+ (function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f.DophJs={},f.Vue))})(this,function(f,e){"use strict";const Pn="",Wn="",jn="",Xn="",Yn="",Y={__name:"DIcon",props:{component:[Object,String],size:[Number,String],color:String,className:String},setup(t){const o=t,n=e.useSlots(),l=e.computed(()=>{const{className:c}=o;return c===void 0?"icon":["icon",c].join(" ")}),s=e.computed(()=>{const{color:c}=o;return c===void 0?null:c}),a=e.computed(()=>{const c=o.size??null;if(c!==void 0)return typeof c=="number"||/^\d+$/.test(c)?`${c}px`:c}),i=e.computed(()=>e.h("i",{class:l.value,style:{color:s.value,fontSize:a.value}},o.component?e.h(o.component):n));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(i)))}},R={state:{},getters:{getIcon(t){return R.state[t]},getIcons(){return R.state}},mutations:{addIcon(t,o){R.state.name=o},addIcons(t){for(const o in t)t.hasOwnProperty(o)&&(R.state[o]=t[o])}}};function _e(t){const o=t.value.getBoundingClientRect();let n=t.value,l=0,s=0;for(;n&&!isNaN(n.offsetLeft)&&!isNaN(n.offsetTop);)l+=n.offsetLeft-n.scrollLeft,s+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{top:s,left:l,x:o.x,y:o.y,width:o.width,height:o.height}}function rt(){function t(s){return s*Math.random()|0}function o(){return t(16).toString(16)}function n(s){let a="";for(let i=0;i<s;++i)a+=o();return a}function l(){return(t(16)&3|8).toString(16)}return n(8)+"-"+n(4)+"-4"+n(3)+"-"+l()+n(3)+"-"+n(12)}const Un="",W=(t,o)=>{const n=t.__vccOpts||t;for(const[l,s]of o)n[l]=s;return n},it={key:0,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ct=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],dt={key:1},pt={key:2,class:"loading-svg rotating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},mt=[e.createStaticVNode('<g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-v-e5cd6ccd><path d="M8.56 3.69a9 9 0 0 0-2.92 1.95" data-v-e5cd6ccd></path><path d="M3.69 8.56A9 9 0 0 0 3 12" data-v-e5cd6ccd></path><path d="M3.69 15.44a9 9 0 0 0 1.95 2.92" data-v-e5cd6ccd></path><path d="M8.56 20.31A9 9 0 0 0 12 21" data-v-e5cd6ccd></path><path d="M15.44 20.31a9 9 0 0 0 2.92-1.95" data-v-e5cd6ccd></path><path d="M20.31 15.44A9 9 0 0 0 21 12" data-v-e5cd6ccd></path><path d="M20.31 8.56a9 9 0 0 0-1.95-2.92" data-v-e5cd6ccd></path><path d="M15.44 3.69A9 9 0 0 0 12 3" data-v-e5cd6ccd></path></g>',1)],H=W({__name:"DButton",props:{class:String,style:[String,Object],icon:String,scale:String,type:String,outline:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["click","contextmenu"],setup(t,{expose:o,emit:n}){const l=t,s=e.useSlots(),a=e.ref(null),i=e.computed(()=>l.icon?R.getters.getIcon(l.icon):null),c=k=>{n("click",k)},r=k=>{n("contextmenu",k)},d=e.computed(()=>l.scale==="large"?"button-lg":l.scale==="small"?"button-sm":""),p=e.computed(()=>l.disabled?"disabled":""),u=k=>!!s[k],_=e.computed(()=>u("default")?"":l.scale==="large"?"d-button-lg-icon":l.scale==="small"?"d-button-sm-icon":"d-button-icon"),b=e.computed(()=>{const k=l.outline?"-outline":"";return l.type==="primary"?`button${k}-blue`:l.type==="success"?`button${k}-green`:l.type==="error"?`button${k}-red`:l.type==="warning"?`button${k}-orange`:l.type==="wait"?`button${k}-violet`:l.outline?`button${k}`:""});return o({elementSize:()=>_e(a)}),(k,N)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[i.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button",[l.class,d.value,b.value,p.value].join(" ")])},[e.renderSlot(k.$slots,"default",{},void 0,!0),l.loading?(e.openBlock(),e.createElementBlock("svg",it,ct)):e.createCommentVNode("",!0)],34)),i.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"el",ref:a,onClick:c,onContextmenu:r,class:e.normalizeClass(["button button-ext",[l.class,d.value,_.value,b.value,p.value].join(" ")]),style:e.normalizeStyle(l.style)},[l.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:i.value,color:"inherit"},null,8,["component"])):e.createCommentVNode("",!0),e.unref(s).default?(e.openBlock(),e.createElementBlock("div",dt,[e.renderSlot(k.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),l.loading?(e.openBlock(),e.createElementBlock("svg",pt,mt)):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)],64))}},[["__scopeId","data-v-e5cd6ccd"]]),Kn="",ut={key:0,class:"d-input"},ft={key:0,class:"label"},ht=["type","placeholder"],gt={key:1,class:"d-input",style:{display:"flex","flex-direction":"column"}},yt={key:0,class:"label"},_t={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},kt={style:{flex:"1"}},bt=["type","placeholder"],Bt={key:2,class:"d-input",style:{display:"flex","flex-direction":"column"}},St={key:0,class:"label"},xt={style:{display:"flex","align-items":"flex-end","justify-content":"flex-start"}},wt={style:{flex:"1"}},Dt=["type","placeholder"],$t=W({__name:"DInput",props:{label:String,placeholder:String,scale:String,modelValue:String,password:Boolean,pre:Object,post:Object,focus:Boolean},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.computed(()=>l.scale==="small"?"d-input-small":l.scale==="large"?"d-input-large":""),i=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{l.focus&&c()});const c=()=>{s.value.focus()};return o({focus:c}),(r,d)=>!l.post&&!l.pre?(e.openBlock(),e.createElementBlock("div",ut,[l.label?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),type:l.password?"password":"text",class:e.normalizeClass(a.value),placeholder:l.placeholder,style:{width:"100%"}},null,10,ht),[[e.vModelDynamic,i.value]])])):l.post&&l.post.click&&!l.pre?(e.openBlock(),e.createElementBlock("div",gt,[l.label?(e.openBlock(),e.createElementBlock("div",yt,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_t,[e.createElementVNode("div",kt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,class:e.normalizeClass(["d-input-post-field",a.value]),"onUpdate:modelValue":d[1]||(d[1]=p=>i.value=p),type:l.password?"password":"text",placeholder:l.placeholder,style:{width:"100%"}},null,10,bt),[[e.vModelDynamic,i.value]])]),l.post.label?(e.openBlock(),e.createBlock(H,{key:0,scale:l.scale,class:e.normalizeClass(["d-input-post-button",l.post.class]),onClick:l.post.click,icon:l.post.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.post.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:l.scale,class:e.normalizeClass(["d-input-post-button",l.post.class]),onClick:l.post.click,icon:l.post.icon},null,8,["scale","onClick","icon","class"]))])])):!l.post&&l.pre&&l.pre.click?(e.openBlock(),e.createElementBlock("div",Bt,[l.label?(e.openBlock(),e.createElementBlock("div",St,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.createElementVNode("div",xt,[l.pre.label?(e.openBlock(),e.createBlock(H,{key:0,scale:l.scale,class:e.normalizeClass(["d-input-pre-button",l.pre.class]),onClick:l.pre.click,icon:l.pre.icon},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.pre.label),1)]),_:1},8,["scale","onClick","icon","class"])):(e.openBlock(),e.createBlock(H,{key:1,scale:l.scale,class:e.normalizeClass(["d-input-pre-button",l.pre.class]),onClick:l.pre.click,icon:l.pre.icon},null,8,["scale","onClick","icon","class"])),e.createElementVNode("div",wt,[e.withDirectives(e.createElementVNode("input",{ref_key:"inputRef",ref:s,class:e.normalizeClass(["d-input-pre-field",a.value]),"onUpdate:modelValue":d[2]||(d[2]=p=>i.value=p),type:l.password?"password":"text",placeholder:l.placeholder,style:{width:"100%"}},null,10,Dt),[[e.vModelDynamic,i.value]])])])])):e.createCommentVNode("",!0)}},[["__scopeId","data-v-a972038a"]]),ke={__name:"DBadge",props:{scale:String,type:String,class:String,stress:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>o.scale==="large"?"badge-lg":o.scale==="small"?"badge-sm":""),l=e.computed(()=>{const s=o.stress?"-stress":"";return o.type==="primary"?`badge${s}-blue`:o.type==="success"?`badge${s}-green`:o.type==="error"?`badge${s}-red`:o.type==="warning"?`badge${s}-orange`:o.type==="wait"?`badge${s}-violet`:o.stress?`badge${s}-gray`:""});return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["badge",[o.class,n.value,l.value].join(" ")])},[e.renderSlot(s.$slots,"default")],2))}},j="0px",be={__name:"DCollapse",props:{duration:{type:Number,default:200},easingEnter:{type:String,default:"ease-in-out"},easingLeave:{type:String,default:"ease-in-out"},opacityClosed:{type:Number,default:0},opacityOpened:{type:Number,default:1}},setup(t){const o=t,n=r=>({height:r.style.height,width:r.style.width,position:r.style.position,visibility:r.style.visibility,overflow:r.style.overflow,paddingTop:r.style.paddingTop,paddingBottom:r.style.paddingBottom,borderTopWidth:r.style.borderTopWidth,borderBottomWidth:r.style.borderBottomWidth,marginTop:r.style.marginTop,marginBottom:r.style.marginBottom}),l=(r,d)=>{const{width:p}=getComputedStyle(r);r.style.width=p,r.style.position="absolute",r.style.visibility="hidden",r.style.height="";let{height:u}=getComputedStyle(r);return r.style.width=d.width,r.style.position=d.position,r.style.visibility=d.visibility,r.style.height=j,r.style.overflow="hidden",d.height&&d.height!==j?d.height:u},s=(r,d,p,u,_)=>{const b=r.animate(u,_);r.style.height=d.height,b.onfinish=()=>{r.style.overflow=d.overflow,p()}},a=(r,d)=>[{height:j,opacity:o.opacityClosed,paddingTop:j,paddingBottom:j,borderTopWidth:j,borderBottomWidth:j,marginTop:j,marginBottom:j},{height:r,opacity:o.opacityOpened,paddingTop:d.paddingTop,paddingBottom:d.paddingBottom,borderTopWidth:d.borderTopWidth,borderBottomWidth:d.borderBottomWidth,marginTop:d.marginTop,marginBottom:d.marginBottom}],i=(r,d)=>{const p=r,u=n(p),_=l(p,u),b=a(_,u),D={duration:o.duration,easing:o.easingEnter};s(p,u,d,b,D)},c=(r,d)=>{const p=r,u=n(p),{height:_}=getComputedStyle(p);p.style.height=_,p.style.overflow="hidden";const b=a(_,u).reverse(),D={duration:o.duration,easing:o.easingLeave};s(p,u,d,b,D)};return(r,d)=>(e.openBlock(),e.createBlock(e.Transition,{css:!1,onEnter:i,onLeave:c},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default")]),_:3}))}},Z={data:void 0},ae=t=>t.reduce((o,n)=>(o[n]=n)&&o,{}),V=ae(["drag","dragend","dragenter","dragleave","dragstart","dragover","drop"]),Ct=ae(["copy","move","link","none"]),Et=ae(["none","copy","copyLink","copyMove","link","linkMove","move","all","uninitialized"]),Be={__name:"DDrag",props:{draggable:{type:Boolean,default:!0},transferData:{},dropEffect:{validator:t=>t in Ct},effectAllowed:{validator:t=>t in Et},image:String,imageXOffset:{type:Number,default:0},imageYOffset:{type:Number,default:0},hideImageHtml:{type:Boolean,default:!1},tag:{type:String,default:"div"}},setup(t){const o=t,n=e.useSlots(),l=e.ref(!1),s=e.computed(()=>l&&o.transferData),a=e.computed(()=>({position:"fixed",top:"-1000px"})),i=(c,r)=>{const d=r.dataTransfer;if([V.dragenter,V.dragover].includes(c)&&o.dropEffect&&(d.dropEffect=o.dropEffect),c===V.dragstart){if(o.effectAllowed&&(d.effectAllowed=o.effectAllowed),o.image||n.image){let p;o.image?(p=new Image,p.src=o.image):n.image&&(p=n.image[0].elm),d.setDragImage&&d.setDragImage(p,o.imageXOffset,o.imageYOffset)}o.transferData!==void 0&&(Z.data=o.transferData,r.dataTransfer.setData("text","")),l.value=!0}};return(c,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{draggable:o.draggable,onDrag:r[0]||(r[0]=d=>i(e.unref(V).drag,d)),onDragstart:r[1]||(r[1]=e.withModifiers(d=>i(e.unref(V).dragstart,d),["stop"])),onDragenter:r[2]||(r[2]=d=>i(e.unref(V).dragenter,d)),onDragleave:r[3]||(r[3]=d=>i(e.unref(V).dragleave,d)),onDragend:r[4]||(r[4]=d=>i(e.unref(V).dragend,d))},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{transferData:s.value}),t.hideImageHtml?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(a.value)},[e.renderSlot(c.$slots,"image",{transferData:s.value})],4)):e.renderSlot(c.$slots,"image",{key:1,transferData:s.value})]),_:3},40,["draggable"]))}},Qn="",Tt=t=>(e.pushScopeId("data-v-d8c92d5e"),t=t(),e.popScopeId(),t),Nt={key:0,style:{display:"none"}},Vt={key:1},Lt=[Tt(()=>e.createElementVNode("div",{class:"tree-divider"},null,-1))],Mt={key:2},It={class:"tree-divider-header"},zt={class:"item-title"},Rt={key:0,class:"tree-divider"},Ot={key:1},At={style:{display:"flex","flex-direction":"row","justify-content":"flex-end"}},Ht={key:0,class:"sub-menu"},Se=W({__name:"DTreeItem",props:{model:Object,treeId:[String,Number],items:Array,search:String},emits:["nodedrop","nodedragover","nodedragleave","nodeclick","nodecontext"],setup(t,{emit:o}){const n=t,l=e.ref(null),s=e.ref(!1),a=e.ref(!1),i=e.ref(!1),c=e.computed(()=>n.model.children&&n.model.children.length),r=e.computed(()=>(g.actions.isTreeExpanded(n.treeId)&&(n.model.expanded=n.model.expanded===void 0?!0:n.model.expanded),n.model.expanded)),d=w=>{o("nodeclick",{event:w,model:n.model})},p=w=>{o("nodeclick",w)},u=w=>{o("nodedrop",w)},_=w=>{o("nodecontext",w)},b=e.computed(()=>(g.actions.isItemSelected(n.treeId,n.model.id)?"selected":"")+(s.value?"node-over ":"")+(a.value?"node-top ":"")+(i.value?"node-bottom ":"")),D=e.computed(()=>n.search?!1:n.model.draggable===!0),k=w=>{o("nodedrop",{e:w,model:n.model});let y=Z.data;if(y===void 0||y.model===void 0)return s.value=!1,!1;if(y.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,y.model.id)||g.actions.isParentOfChild(n.treeId,n.items,y.model.id,n.model.id))return s.value=!1,a.value=!1,i.value=!1,!1;if(!g.state.trees[n.treeId].transfer&&y.id!==n.treeId)return!1;let C="";a.value?C="before":i.value?C="after":C="inside",g.actions.moveTreeNode(y.id,n.treeId,n.items,y.model.id,n.model.id,C),s.value=!1,a.value=!1,i.value=!1},N=w=>{o("nodedragover",{e:w,model:n.model});let y=Z.data;if(y===void 0||y.model===void 0)return s.value=!0,!1;if(y.model.id===n.model.id||g.actions.isChildOfParent(n.treeId,n.items,n.model.id,y.model.id)||g.actions.isParentOfChild(n.treeId,n.items,y.model.id,n.model.id))return!1;const C=w.y,L=l.value.getBoundingClientRect().top,M=l.value.getBoundingClientRect().height,h=M/3;C>L&&C<=L+h?(s.value=!1,a.value=!0,i.value=!1):C<L+M&&C>=L+M-h?(s.value=!1,a.value=!1,i.value=!0):(s.value=!0,a.value=!1,i.value=!1)},$=()=>{s.value=!1,a.value=!1,i.value=!1},S=e.computed(()=>n.model.title.startsWith("-")),x=e.computed(()=>{if(n.model.title.startsWith("-")){let[w,...y]=n.model.title.split(" ");return y=y.join(" "),y}return null});return(w,y)=>{const C=e.resolveComponent("d-tree-item",!0),L=e.resolveDirective("touch");return e.unref(g).actions.beforeItem(n.treeId,t.model)?S.value&&!x.value?(e.openBlock(),e.createElementBlock("li",Vt,Lt)):S.value&&x.value?(e.openBlock(),e.createElementBlock("li",Mt,[e.createElementVNode("div",It,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,x.value)),1)])):(e.openBlock(),e.createBlock(Be,{key:3,tag:"li",class:"tree-item","transfer-data":{id:n.treeId,model:n.model},draggable:D.value,onDrop:e.withModifiers(k,["stop"]),onDragenter:y[1]||(y[1]=e.withModifiers(()=>{},["prevent"])),onDragover:e.withModifiers(N,["prevent","stop"]),onDragleave:e.withModifiers($,["prevent"])},{default:e.withCtx(()=>{var M,h;return[e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"node",ref:l,class:e.normalizeClass(b.value),onContextmenu:y[0]||(y[0]=e.withModifiers(E=>o("nodecontext",{e:E,model:n.model}),["prevent"]))},[e.createElementVNode("div",null,[n.model.icons&&n.model.icons.pre&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:e.unref(R).getters.getIcon(n.model.icons.pre.component),size:18,color:n.model.icons.pre.color?n.model.icons.pre.color:"inherit",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.pre&&!c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(n.model.icons.pre.component),size:18,color:"rgba(0,0,0,0)",class:e.normalizeClass(r.value?"tree-open-pre":"")},null,8,["component","class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.icon&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:2,component:e.unref(R).getters.getIcon(n.model.icons.icon.component),color:n.model.icons.icon.color?n.model.icons.icon.color:"inherit",size:n.model.icons.icon.size?n.model.icons.icon.size:null,className:n.model.icons.icon.class?n.model.icons.icon.class:null},null,8,["component","color","size","className"])):e.createCommentVNode("",!0),e.createElementVNode("div",zt,[S.value?(e.openBlock(),e.createElementBlock("div",Rt)):e.createCommentVNode("",!0),S.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ot,e.toDisplayString(e.unref(g).actions.renderTitle(n.treeId,n.model.title)),1))])]),e.createElementVNode("div",At,[((M=n.model.badge)==null?void 0:M.value)!==void 0&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ke),{key:0,class:e.normalizeClass([(h=n.model.badge)==null?void 0:h.class,"badge-sm"])},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.model.badge.value),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),n.model.icons&&n.model.icons.post&&c.value&&!n.search&&!S.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:1,component:e.unref(R).getters.getIcon(n.model.icons.post.component),size:20,color:n.model.icons.post.color?n.model.icons.post.color:"inherit",class:e.normalizeClass(r.value?"tree-open-post":"")},null,8,["component","color","class"])):e.createCommentVNode("",!0)])],34)),[[L,d]]),e.createVNode(be,null,{default:e.withCtx(()=>[c.value&&r.value&&!n.search?(e.openBlock(),e.createElementBlock("ul",Ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.model.children,E=>(e.openBlock(),e.createBlock(C,{class:"tree-item",key:E.id,model:E,treeId:n.treeId,items:n.items,search:n.search,onNodeclick:p,onNodedrop:u,onNodecontext:_},null,8,["model","treeId","items","search"]))),128))])):e.createCommentVNode("",!0)]),_:1})]}),_:1},8,["transfer-data","draggable","onDrop","onDragover","onDragleave"])):(e.openBlock(),e.createElementBlock("li",Nt))}}},[["__scopeId","data-v-d8c92d5e"]]);function xe(t){return t=t||new Map,{all:t,on(o,n){const l=t.get(o);l?l.push(n):t.set(o,[n])},off(o,n){const l=t.get(o);l&&(n?l.splice(l.indexOf(n)>>>0,1):t.set(o,[]))},emit(o,n){let l=t.get(o);l&&l.slice().map(s=>{s(n)}),l=t.get("*"),l&&l.slice().map(s=>{s(o,n)})}}}const I=xe(),g={state:e.reactive({trees:{}}),getters:{getItems(t){return g.state.trees[t].items},getItemsSelect(t){return g.state.trees[t].selected},getParentId(t,o,n,l="id",s="children",a={}){return n&&t&&(t.find(i=>i[l]===n?(a.found=o,i):g.getters.getParentId(i[s],i.id,n,l,s,a)),a.found)?a.found:!1}},mutations:{setTreeItems(t,o){g.state.trees[t].items=o},setItemSelect(t,o){g.state.trees[t].noSelect||(g.state.trees[t].multiSelect?g.state.trees[t].selected.includes(o.id)?g.state.trees[t].selected=g.state.trees[t].selected.filter(function(n){return n!==o.id}):g.state.trees[t].selected=[...g.state.trees[t].selected,o.id]:g.state.trees[t].selected=[o.id])}},actions:{initTreeStore(t,o,n,l,s,a,i){g.state.trees[t]=[],g.state.trees[t].selected=[],g.state.trees[t].noSelect=o,g.state.trees[t].multiSelect=n,g.state.trees[t].expanded=l,g.state.trees[t].transfer=s,g.state.trees[t].renderTitle=a,g.state.trees[t].beforeItem=i},renderTitle(t,o){return g.state.trees[t].renderTitle?g.state.trees[t].renderTitle(o):o},beforeItem(t,o){return g.state.trees[t].beforeItem?g.state.trees[t].beforeItem(o):!0},isItemSelected(t,o){return g.state.trees[t].selected.includes(o)},toggleItem(t,o){o.expanded=o.expanded===void 0||!o.expanded,o.children&&o.children.length&&(o.expanded?I.emit(`expand-${t}`,{id:t,model:o}):I.emit(`collapse-${t}`,{id:t,model:o}))},isTreeExpanded(t){return g.state.trees[t].expanded},isChildOfParent(t,o,n,l){const s=g.actions.deepSearch(o,n);if(s&&s.children){for(let a=0;a<s.children.length;a++)if(s.children[a].id===l)return!0}return!1},isParentOfChild(t,o,n,l){const s=g.actions.deepSearch(o,n);return!!(s&&s.children&&g.actions.deepSearch(s.children,l))},deepSearch(t,o,n="id",l="children",s={}){return o&&t&&(t.find(a=>a[n]===o?(s.found=a,a):g.actions.deepSearch(a[l],o,n,l,s)),s.found)?s.found:!1},deepSearchByTitle(t,o,n="title",l="children",s=[]){if(o&&t&&(t.find(a=>{const i=new RegExp(o,"gi");a[n].toString().toLowerCase().match(i)!==null&&s.push(a),g.actions.deepSearchByTitle(a[l],o,n,l,s)}),s)){for(let a=0;a<s.length;a++);return s}return s},moveTreeNode(t,o,n,l,s,a){const i=g.actions.deleteTreeNode(n,l);g.actions.insertTreeNode(n,s,i,a),I.emit(`move-${o}`,{fromTreeId:t,toTreeId:o,moved:i.id,target:s,position:a})},insertTreeNode(t,o,n,l){if(t)for(let s=0;s<t.length;s++){if(t[s].id===o){let i=s;return l==="after"?(i++,t.splice(i,0,n)):l==="before"?t.splice(i,0,n):l==="inside"&&(Object.hasOwn(t[s],"children")||(t[s].children=[],t[s].opened=!0),t[s].children.splice(0,0,n)),t[s]}const a=this.insertTreeNode(t[s].children,o,n,l);if(a)return a}},deleteTreeNode(t,o){if(t)for(let n=0;n<t.length;n++){if(t[n].id===o){const s=t[n];return t.splice(n,1),s}const l=g.actions.deleteTreeNode(t[n].children,o);if(l)return l}}}},we={__name:"DDrop",props:{tag:{type:String,default:"div"}},emits:Object.keys(V),setup(t,{expose:o,emit:n}){let l=e.reactive({});const s=e.ref("false"),a=e.ref(null),i=new Set,c=e.computed(()=>s.value&&l),r=(p,u)=>{l=Z.data,n(p,u,l),p===V.dragenter&&(i.size||u.target===a.value)&&i.add(u.target),p===V.dragleave&&i.delete(u.target),p===V.drop&&i.clear(),s.value=!!i.size};return o({elementSize:()=>_e(a)}),(p,u)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{ref_key:"el",ref:a,onDragenter:u[0]||(u[0]=_=>r(e.unref(V).dragenter,_)),onDragleave:u[1]||(u[1]=_=>r(e.unref(V).dragleave,_)),onDragover:u[2]||(u[2]=e.withModifiers(_=>r(e.unref(V).dragover,_),["prevent"])),onDrop:u[3]||(u[3]=e.withModifiers(_=>r(e.unref(V).drop,_),["prevent"]))},{default:e.withCtx(()=>[e.renderSlot(p.$slots,"default",{transferData:c.value})]),_:3},544))}},re={__name:"DMenu",props:{class:String,items:Array,style:[String,Object],noSelect:{type:Boolean,default:!0},renderItemTitle:Function,beforeItem:Function,bodyAsParent:{type:Boolean,default:!0}},emits:["select"],setup(t,{expose:o,emit:n}){const l=t;let s=e.ref(null),a=e.ref(!1);const i=()=>{I.emit("menu-show-request"),a.value=!0},c=()=>{var _;(_=s.value)==null||_.collapseAll(),a.value=!1},r=()=>a.value;I.on("menu-show-request",()=>{c()}),o({show:i,hide:c,elementSize:()=>s.value.elementSize(),isShowed:r,itemsCount:()=>s.value.itemsCount()});const u=_=>{n("select",_),_.model.children||c()};return(_,b)=>{const D=e.resolveDirective("click-outside");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(a)?e.withDirectives((e.openBlock(),e.createBlock(ie,{key:0,ref_key:"treeRef",ref:s,items:l.items,"no-select":l.noSelect,class:e.normalizeClass(l.class),style:e.normalizeStyle(l.style),onSelect:u,"render-title":l.renderItemTitle,"before-item":l.beforeItem},null,8,["items","no-select","class","style","render-title","before-item"])),[[D,()=>c()]]):e.createCommentVNode("",!0)])}}},De={__name:"DContextMenu",props:{items:Array,renderItemTitle:Function,beforeItem:Function},emits:["select"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.ref(0),i=e.ref(0),c=e.computed(()=>({left:a.value+"px",top:i.value+"px"})),r=p=>{s.value.show(),e.nextTick(()=>{const u=s.value.elementSize(),_=window.innerWidth,b=window.innerHeight;a.value=_-p.pageX<u.width?p.pageX-u.width:p.pageX,i.value=b-p.pageY<u.height?p.pageY-u.height:p.pageY,s.value.itemsCount()===0&&s.value.hide()})},d=p=>{n("select",p)};return o({show:r}),(p,u)=>(e.openBlock(),e.createBlock(re,{ref_key:"dMenuRef",ref:s,onSelect:d,items:l.items,style:e.normalizeStyle(c.value),class:"context-menu","no-select":!0,"render-item-title":l.renderItemTitle,"before-item":l.beforeItem},null,8,["items","style","render-item-title","before-item"]))}},ie={__name:"DTree",props:{items:Array,noSelect:Boolean,multiSelect:Boolean,expanded:Boolean,transfer:Boolean,renderTitle:Function,beforeItem:Function,search:String,context:Array,contextClick:{type:Function,default:()=>{}},contextBeforeClick:{type:Function,default:()=>!0}},emits:["select","collapse","expand","move","over","drop"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.ref(!1),i=e.ref(null),c=e.getCurrentInstance().uid;g.actions.initTreeStore(c,l.noSelect,l.multiSelect,l.expanded,l.transfer,l.renderTitle,l.beforeItem);const r=(h,E)=>{console.log(h,E)};I.on(`expand-${c}`,h=>{n("expand",h)}),I.on(`collapse-${c}`,h=>{n("collapse",h)}),I.on(`move-${c}`,h=>{n("move",h)});const d=e.computed(()=>l.search?g.actions.deepSearchByTitle(l.items,l.search):l.items),p=(h=null)=>{g.mutations.setItemSelect(c,h.model),g.actions.toggleItem(c,h.model),n("select",h)},u=(h=null)=>{n("over",h)},_=(h=null)=>{n("drop",h)},b=()=>s.value.elementSize(),D=()=>{for(let h=0;h<l.items.length;h++)l.items[h].expanded=!0},k=()=>{for(let h=0;h<l.items.length;h++)l.items[h].expanded=!1},N=()=>c,$=h=>g.actions.deepSearch(l.items,h),S=h=>{$(h)&&g.mutations.setItemSelect(c,$(h))},x=h=>{l.contextClick({e:h.e,model:h.model,target:i.value})},w=h=>l.contextBeforeClick({model:h,target:i.value}),y=e.computed(()=>l.context),C=h=>(y.value&&(i.value=h.model,a.value.show(h.e)),!1),L=()=>M(d.value),M=h=>{let E=0;for(let m=0;m<h.length;m++)E+=g.actions.beforeItem(c,h[m])?1:0,h[m].children&&h[m].children.length>0&&(E+=M(h[m].children));return E};return o({elementSize:b,expandAll:D,collapseAll:k,getId:N,getNode:$,selectNode:S,itemsCount:L}),(h,E)=>(e.openBlock(),e.createBlock(we,{ref_key:"treeRef",ref:s,class:"tree",tag:"ul",onDrop:e.withModifiers(r,["stop"])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,m=>(e.openBlock(),e.createBlock(Se,{key:m.id,model:m,treeId:e.unref(c),items:l.items,search:l.search,onNodeclick:p,onNodedragover:u,onNodedrop:_,onNodecontext:C},null,8,["model","treeId","items","search"]))),128)),y.value?(e.openBlock(),e.createBlock(De,{key:0,ref_key:"contextTreeRef",ref:a,items:y.value,onSelect:x,"before-item":w},null,8,["items"])):e.createCommentVNode("",!0)]),_:1},8,["onDrop"]))}},tl="",Ft=W({__name:"DAccordion",props:{items:Array,renderTitle:Function,noSelect:{type:Boolean,default:!0}},setup(t){const o=t;return(n,l)=>(e.openBlock(),e.createBlock(ie,{class:"accordion",items:o.items,"no-select":o.noSelect,"render-title":o.renderTitle},null,8,["items","no-select","render-title"]))}},[["__scopeId","data-v-642edace"]]),$e={__name:"DLayoutHeader",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:1001},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:l,zIndex:s,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=o,p=l?"fixed":"static",u=o.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${s};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(l,s)=>(e.openBlock(),e.createElementBlock("header",{class:"d-layout-header",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ce={__name:"DLayoutTab",props:{fixed:{type:Boolean,default:!0},top:{type:Number,default:56},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:l,top:s,zIndex:a,minWidth:i,height:c,paddingLeft:r,transitionDuration:d,transitionTimingFunction:p}=o,u=l?"fixed":"static",_=o.useMinWidthLayout?`min-width: ${i}px;`:"";return`position:${u};top:${s}px;z-index:${a};${_}height:${c}px;padding-left:${r}px;transition-duration:${d}ms;transition-timing-function:${p};`});return(l,s)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout-tab",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ee={__name:"DLayoutFooter",props:{fixed:{type:Boolean,default:!0},zIndex:{type:Number,default:999},minWidth:{type:Number,default:1280},height:{type:Number,default:56},paddingLeft:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},useMinWidthLayout:Boolean},setup(t){const o=t,n=e.computed(()=>{const{fixed:l,zIndex:s,minWidth:a,height:i,paddingLeft:c,transitionDuration:r,transitionTimingFunction:d}=o,p=l?"fixed":"static",u=o.useMinWidthLayout?`min-width:${a}px;`:"";return`position:${p};z-index:${s};${u}height:${i}px;padding-left:${c}px;transition-duration:${r}ms;transition-timing-function:${d};`});return(l,s)=>(e.openBlock(),e.createElementBlock("footer",{class:"d-layout-footer",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Te={__name:"DLayoutSidebar",props:{zIndex:{type:Number,default:1002},width:{type:Number,default:200},paddingTop:{type:Number,default:0},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1}},setup(t){const o=t,n=e.computed(()=>{const{zIndex:l,width:s,paddingTop:a,transitionDuration:i,transitionTimingFunction:c}=o;return`z-index:${l};width:${s}px;padding-top:${a}px;transition-duration:${i}ms;transition-timing-function:${c};`});return(l,s)=>(e.openBlock(),e.createElementBlock("aside",{class:"d-layout-sidebar",style:e.normalizeStyle(n.value)},[e.renderSlot(l.$slots,"default")],4))}},Ne={__name:"DLayoutContent",props:{paddingTop:{type:Number,default:0},paddingBottom:{type:Number,default:0},paddingLeft:{type:Number,default:0},overflowHidden:Boolean,transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"}},setup(t){const o=t,n=e.computed(()=>{const{paddingTop:l,paddingBottom:s,paddingLeft:a,transitionDuration:i,transitionTimingFunction:c}=o,r=`overflow:${o.overflowHidden?"hidden":"visible"};`;return`padding-top:${l}px;padding-bottom:${s}px;padding-left:${a}px;${r}transition-duration:${i}ms;transition-timing-function:${c};`});return(l,s)=>(e.openBlock(),e.createElementBlock("main",{style:e.normalizeStyle(n.value),class:"d-layout-content"},[e.renderSlot(l.$slots,"default")],4))}};function Pt(t){const o=e.ref(0),n=e.computed(()=>`transform: translateX(${-o.value}px);`);let l=!1;function s(p){o.value=p}function a(){var p;const u=((p=document.scrollingElement)===null||p===void 0?void 0:p.scrollLeft)||0;s(u)}function i(){a()}function c(){document.addEventListener("scroll",a)}function r(){l&&document.removeEventListener("scroll",a)}function d(){i(),c(),l=!0}return e.watch(t,p=>{p?d():r()},{immediate:!0}),e.onUnmounted(()=>{r()}),n}const Wt=1001,jt=999,Xt=998,Yt={__name:"DLayoutAdmin",props:{mode:{type:String,default:"vertical"},isMobile:{type:Boolean,default:!1},useMinWidthLayout:{type:Boolean,default:!1},minWidth:{type:Number,default:1200},headerVisible:{type:Boolean,default:!0},headerHeight:{type:Number,default:56},tabVisible:{type:Boolean,default:!0},tabHeight:{type:Number,default:44},fixedHeaderAndTab:{type:Boolean,default:!0},addMainOverflowHidden:{type:Boolean,default:!1},footerVisible:{type:Boolean,default:!0},footerHeight:{type:Number,default:48},fixedFooter:{type:Boolean,default:!0},sidebarVisible:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:200},sidebarCollapsedWidth:{type:Number,default:0},sidebarCollapse:{type:Boolean,default:!1},transitionDuration:{type:Number,default:300},transitionTimingFunction:{type:String,default:"ease-in-out"},collapse:{type:Boolean,default:!1},maskBg:{type:String,default:"rgba(0,0,0,0.3)"}},emits:["update:sidebar-collapse","sidebar-mask-click"],setup(t,{emit:o}){const n=t,l=e.computed(()=>n.useMinWidthLayout?`min-width:${n.minWidth}px;`:""),s=e.computed(()=>n.useMinWidthLayout&&(n.fixedHeaderAndTab||n.fixedFooter)),a=Pt(s),i=e.computed(()=>n.fixedHeaderAndTab?a.value:""),c=e.computed(()=>n.fixedFooter?a.value:""),r=e.computed(()=>{const{transitionDuration:y,transitionTimingFunction:C}=n;return{transitionDuration:y,transitionTimingFunction:C}}),d=e.computed(()=>n.mode==="vertical"),p=e.computed(()=>n.isMobile||d.value?1003:1e3),u=e.computed({get(){return n.sidebarCollapse},set(y){o("update:sidebar-collapse",y)}});function _(){o("sidebar-mask-click")}const b=e.computed(()=>n.isMobile&&!u.value),D=e.computed(()=>{const{transitionDuration:y,transitionTimingFunction:C}=n;return`background-color:${n.maskBg};transition-duration:${y}ms;transition-timing-function:${C};`}),k=e.computed(()=>{const{sidebarWidth:y,sidebarCollapsedWidth:C}=n,L=n.isMobile?0:C,M=u.value?L:y;return n.sidebarVisible?M:0}),N=e.computed(()=>n.isMobile?0:k.value),$=e.computed(()=>d.value?N.value:0),S=e.computed(()=>!n.isMobile&&!d.value&&n.headerVisible?n.headerHeight:0),x=e.computed(()=>{let y=0;return n.fixedHeaderAndTab&&(n.headerVisible&&(y+=n.headerHeight),n.tabVisible&&(y+=n.tabHeight)),y}),w=e.computed(()=>n.fixedFooter&&n.footerVisible?n.footerHeight:0);return(y,C)=>(e.openBlock(),e.createElementBlock("div",{class:"d-layout",style:e.normalizeStyle(l.value)},[t.headerVisible?(e.openBlock(),e.createBlock($e,e.mergeProps({key:0},r.value,{fixed:t.fixedHeaderAndTab,"z-index":Wt,"min-width":t.minWidth,height:t.headerHeight,"padding-left":$.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"header")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0),t.tabVisible?(e.openBlock(),e.createBlock(Ce,e.mergeProps({key:1},r.value,{fixed:t.fixedHeaderAndTab,"z-index":jt,"min-width":t.minWidth,top:t.headerHeight,height:t.tabHeight,"padding-left":N.value,style:i.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"tab")]),_:3},16,["fixed","min-width","top","height","padding-left","style"])):e.createCommentVNode("",!0),t.sidebarVisible?(e.openBlock(),e.createBlock(Te,e.mergeProps({key:2},r.value,{"z-index":p.value,width:k.value,"padding-top":S.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"sidebar")]),_:3},16,["z-index","width","padding-top"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("div",{key:3,class:"d-layout-sidebar-mask",style:e.normalizeStyle(D.value),onClick:_},null,4)):e.createCommentVNode("",!0),e.createVNode(Ne,e.mergeProps(r.value,{"padding-top":x.value,"padding-bottom":w.value,"padding-left":N.value,"overflow-hidden":t.addMainOverflowHidden}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"default")]),_:3},16,["padding-top","padding-bottom","padding-left","overflow-hidden"]),t.footerVisible?(e.openBlock(),e.createBlock(Ee,e.mergeProps({key:4},r.value,{fixed:t.fixedFooter,"z-index":Xt,"min-width":t.minWidth,height:t.footerHeight,"padding-left":N.value,style:c.value}),{default:e.withCtx(()=>[e.renderSlot(y.$slots,"footer")]),_:3},16,["fixed","min-width","height","padding-left","style"])):e.createCommentVNode("",!0)],4))}},U={state:e.reactive({theme:"dark"}),getters:{theme(){return U.state.theme}},mutations:{setTheme(t){U.state.theme=t,document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(t)}},actions:{toggleTheme(){U.state.theme=U.state.theme==="dark"?"light":"dark",document.documentElement.classList.remove("dark"),document.documentElement.classList.remove("light"),document.documentElement.classList.add(U.state.theme)}}},Ut={__name:"DConfigProvider",props:{theme:{type:String,default:"dark"}},setup(t){const o=t;return U.mutations.setTheme(o.theme),(n,l)=>e.renderSlot(n.$slots,"default")}},nl="",qt={__name:"DScrollProvider",props:{xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const o=t;e.useCssVars(a=>({e35a6f9a:n.value,e35a6f98:l.value}));const n=e.computed(()=>o.xHide?"hidden":"visible"),l=e.computed(()=>o.yHide?"hidden":"visible"),s=a=>{document.body.classList.add(a),document.documentElement.classList.add(a),document.documentElement.classList.add("d-global-scroll")};return e.onMounted(()=>{s("colored-scroller")}),(a,i)=>(e.openBlock(),e.createElementBlock("div",null,[e.renderSlot(a.$slots,"default")]))}},ll="",Gt=W({__name:"DScroll",props:{autoHide:{type:Boolean,default:!0},xHide:{type:Boolean,default:!0},yHide:{type:Boolean,default:!1}},setup(t){const o=t;e.useCssVars(s=>({c07fa29a:n.value,c07fa298:l.value}));const n=e.computed(()=>o.xHide?"hidden":"visible"),l=e.computed(()=>o.yHide?"hidden":"visible");return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(o.autoHide?"d-scroll-hide":"d-scroll")},[e.renderSlot(s.$slots,"default",{},void 0,!0)],2))}},[["__scopeId","data-v-d50b3609"]]),Zt={class:"modal-content"},Kt={class:"modal-header"},Jt={class:"modal-title"},Qt={class:"modal-body"},vt={class:"modal-footer"},ce={__name:"DModal",props:{show:Boolean,width:String,maxWidth:String},emits:["open","close"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.ref(!1);a.value=l==null?void 0:l.show;const i=()=>{a.value=!0,n("open",s)},c=()=>{a.value=!1,n("close",s)};return o({show:i,hide:c}),(r,d)=>{const p=e.resolveDirective("keydown");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:s,class:"modal"},[e.createElementVNode("div",{class:"modal-dialog",style:e.normalizeStyle({width:l.width,maxWidth:l.maxWidth})},[e.createElementVNode("div",Zt,[e.createElementVNode("div",Kt,[e.createElementVNode("h5",Jt,[e.renderSlot(r.$slots,"modal-title")])]),e.createElementVNode("div",Qt,[e.renderSlot(r.$slots,"default")]),e.createElementVNode("div",vt,[e.renderSlot(r.$slots,"modal-footer")])])],4)])),[[p,c,"Escape"]]):e.createCommentVNode("",!0)]),_:3})])}}},q=e.shallowRef();function de(t){t===void 0&&(t=q.value.comp.returnValue()),q.value.resolve(t),q.value=null}function Ve(t,o,n="default"){return new Promise(l=>{q.value={dialog:t,props:o,wrapper:n,resolve:l}})}var eo=(t,o)=>{const n=t.__vccOpts||t;for(const[l,s]of o)n[l]=s;return n};const to=e.defineComponent({name:"DialogWrapper",components:{},props:{name:{type:String,default:"default"},transitionAttrs:Object},setup(){const t=e.ref();return e.watch(t,()=>{q.value&&(q.value.comp=t.value)}),{dialogRef:q,dialogInstance:t}}});function oo(t,o,n,l,s,a){return e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.guardReactiveProps(t.transitionAttrs)),{default:e.withCtx(()=>[t.dialogRef&&t.dialogRef.wrapper===t.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.dialogRef.dialog),e.mergeProps({key:0},t.dialogRef.props,{ref:"dialogInstance"}),null,16)):e.createCommentVNode("",!0)]),_:1},16)}var no=eo(to,[["render",oo]]);const lo={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Le={__name:"DAlertDialog",props:{title:String,message:String},setup(t,{expose:o}){const n=t;return o({returnValue:()=>!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(ce,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",lo,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(de)())},{default:e.withCtx(()=>[e.createTextVNode("Закрыть")]),_:1})])]),_:1})]))}},so={style:{display:"flex","flex-direction":"row","justify-content":"center",gap:"5px"}},Me={__name:"DConfirmDialog",props:{title:String,message:String},setup(t,{expose:o}){const n=t;return o({returnValue:()=>!0}),(s,a)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode(ce,{show:!0},{"modal-title":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.message),1)]),"modal-footer":e.withCtx(()=>[e.createElementVNode("div",so,[e.createVNode(H,{onClick:a[0]||(a[0]=i=>e.unref(de)())},{default:e.withCtx(()=>[e.createTextVNode("Да")]),_:1}),e.createVNode(H,{class:"button-red",onClick:a[1]||(a[1]=i=>e.unref(de)(!1))},{default:e.withCtx(()=>[e.createTextVNode("Нет")]),_:1})])]),_:1})]))}},ao={class:"dropdown"},ro={__name:"DDropdown",props:{class:String,icon:{type:[String,null],default:null},items:Array,menuStyle:Object,renderItemTitle:Function,beforeItem:Function,type:String,bodyAsParent:{type:Boolean,default:!0}},emits:["select","click"],setup(t,{expose:o,emit:n}){const l=t,s=e.useSlots(),a=e.ref(null),i=e.ref(null),c=e.ref(0),r=e.ref(0),d=b=>{if(n("click",b),a.value.isShowed()){a.value.hide();return}a.value.show(),e.nextTick(()=>{const D=a.value.elementSize(),k=i.value.elementSize(),N=window.innerWidth,$=window.innerHeight;c.value=N-(k.x+k.width)<D.width?k.left-D.width+k.width:k.left,r.value=$-(k.y+k.height)<D.height?k.top-D.height-5:k.height+k.top+5})},p=b=>{n("select",b)},u=e.computed(()=>({left:c.value+"px",top:r.value+"px",position:l.bodyAsParent?"absolute":"fixed",...l.menuStyle}));o({show:d});const _=b=>!!s[b];return(b,D)=>(e.openBlock(),e.createElementBlock("div",ao,[_("default")?(e.openBlock(),e.createBlock(H,{key:0,ref_key:"buttonRef",ref:i,class:e.normalizeClass(l.class),icon:l.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:l.type},{default:e.withCtx(()=>[e.renderSlot(b.$slots,"default")]),_:3},8,["class","icon","onClick","type"])):(e.openBlock(),e.createBlock(H,{key:1,ref_key:"buttonRef",ref:i,class:e.normalizeClass(l.class),icon:l.icon,onClick:e.withModifiers(d,["stop","prevent"]),type:l.type},null,8,["class","icon","onClick","type"])),e.createVNode(re,{ref_key:"dMenuRef",ref:a,items:l.items,class:"dropdown-menu",style:e.normalizeStyle(u.value),"no-select":!0,onSelect:p,"render-item-title":l.renderItemTitle,"before-item":l.beforeItem,"body-as-parent":l.bodyAsParent},null,8,["items","style","render-item-title","before-item","body-as-parent"])]))}},io={},co={class:"d-panel"};function po(t,o){return e.openBlock(),e.createElementBlock("div",co,[e.renderSlot(t.$slots,"default")])}const Ie=W(io,[["render",po]]),mo={class:"card-header"},uo={class:"modal-title"},fo={class:"card-body"},ho={class:"card-footer"},go={__name:"DCard",setup(t){return(o,n)=>(e.openBlock(),e.createBlock(Ie,{class:"d-card"},{default:e.withCtx(()=>[e.createElementVNode("div",mo,[e.createElementVNode("h5",uo,[e.renderSlot(o.$slots,"title")])]),e.createElementVNode("div",fo,[e.renderSlot(o.$slots,"default")]),e.createElementVNode("div",ho,[e.renderSlot(o.$slots,"footer")])]),_:3}))}},yo=new Map;class _o{constructor(o,n,l){this.remaining=n,this.callback=o,this.notifyItem=l,this.resume()}pause(){clearTimeout(this.notifyItem.timer),this.remaining-=Date.now()-this.start}resume(){this.start=Date.now(),clearTimeout(this.notifyItem.timer),this.notifyItem.timer=setTimeout(this.callback,this.remaining)}}const pe="[-+]?[0-9]*.?[0-9]+",ze=[{name:"px",regexp:new RegExp(`^${pe}px$`)},{name:"%",regexp:new RegExp(`^${pe}%$`)},{name:"px",regexp:new RegExp(`^${pe}$`)}],ko=t=>{if(t==="auto")return{type:t,value:0};for(let o=0;o<ze.length;o++){const n=ze[o];if(n.regexp.test(t))return{type:n.name,value:parseFloat(t)}}return{type:"",value:t}},bo=t=>{switch(typeof t){case"number":return{type:"px",value:t};case"string":return ko(t);default:return{type:"",value:t}}},Re={x:new Set(["left","center","right"]),y:new Set(["top","bottom"])},Bo=(t=>()=>t++)(0),So=t=>typeof t!="string"?[]:t.split(/\s+/gi).filter(Boolean),xo=t=>{typeof t=="string"&&(t=So(t));let o=null,n=null;return t.forEach(l=>{Re.y.has(l)&&(n=l),Re.x.has(l)&&(o=l)}),{x:o,y:n}},me={position:["top","right"],cssAnimation:"fade",velocityAnimation:{enter:t=>({height:[t.clientHeight,0],opacity:[1,0]}),leave:{height:0,opacity:[0,1]}}},wo={__name:"VelocityGroup",emits:["enter","leave","after-leave"],setup(t,{emit:o}){const n=(a,i)=>{o("enter",a,i)},l=(a,i)=>{o("leave",a,i)},s=()=>{o("after-leave")};return(a,i)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",css:!1,onEnter:n,onLeave:l,onAfterLeave:s},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3}))}},Do=Object.assign({inheritAttrs:!1},{__name:"CssGroup",props:{name:String},setup(t){const o=t;return(n,l)=>(e.openBlock(),e.createBlock(e.TransitionGroup,{tag:"span",name:o.name},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},8,["name"]))}}),$o=["data-id"],Co=["onClick"],Eo=["innerHTML"],To=["innerHTML"],No={key:0,class:"d-notification-title"},Vo={class:"notification-content"},Lo={__name:"DNotificationProvider",props:{group:{type:String,default:""},width:{type:[String,Number],default:300},reverse:{type:Boolean,default:!1},position:{type:[String,Array,null],default:me.position},classes:{type:String,default:"d-notification"},animationType:{type:String,default:"css"},animation:{type:[String,Object],default:me.velocityAnimation},animationName:{type:String,default:me.cssAnimation},speed:{type:Number,default:300},duration:{type:Number,default:3e3},delay:{type:Number,default:0},max:{type:Number,default:1/0},ignoreDuplicates:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default:!0},pauseOnHover:{type:Boolean,default:!1},dangerouslySetInnerHtml:{type:Boolean,default:!1}},emits:["click","destroy","start"],setup(t,{emit:o}){const n=t,l={IDLE:0,DESTROYED:2},s=e.ref([]),a=e.ref(null),i=e.ref(yo.get("velocity")),c=e.computed(()=>n.animationType==="velocity"),r=e.computed(()=>c.value?wo:Do),d=e.computed(()=>s.value.filter(m=>m.state!==l.DESTROYED)),p=e.computed(()=>bo(n.width)),u=e.computed(()=>{const{x:m,y:T}=xo(n.position),B=p.value.value,A=p.value.type,X={width:B+A};return T&&(X[T]="0px"),m&&(m==="center"?X.left=`calc(50% - ${+B/2}${A})`:X[m]="0px"),X}),_=e.computed(()=>"bottom"in u.value),b=m=>{o("click",m),n.closeOnClick&&w(m)},D=()=>{var m;n.pauseOnHover&&((m=a.value)==null||m.pause())},k=()=>{var m;n.pauseOnHover&&((m=a.value)==null||m.resume())},N=m=>{if(m.group||(m.group=""),m.data||(m.data={}),n.group!==m.group)return;if(m.clean||m.clear){C();return}const T=typeof m.duration=="number"?m.duration:n.duration,B=typeof m.speed=="number"?m.speed:n.speed,A=typeof m.ignoreDuplicates=="boolean"?m.ignoreDuplicates:n.ignoreDuplicates,{title:X,text:ee,type:te,data:oe,id:ne}=m,P={id:ne||Bo(),title:X,text:ee,type:te,state:l.IDLE,speed:B,length:T+2*B,data:oe};T>=0&&(a.value=new _o(()=>w(P),P.length,P));const le=n.reverse?!_.value:_.value;let G=-1;const se=d.value.some(K=>K.title===m.title&&K.text===m.text);(!A||!se)&&(le?(s.value.push(P),o("start",P),d.value.length>n.max&&(G=0)):(s.value.unshift(P),o("start",P),d.value.length>n.max&&(G=d.value.length-1)),G!==-1&&w(d.value[G]))},$=m=>{y(m)},S=m=>["d-notification-template",n.classes,m.type||""],x=m=>c.value?void 0:{transition:`all ${m.speed}ms`},w=m=>{clearTimeout(m.timer),m.state=l.DESTROYED,E(),o("destroy",m)},y=m=>{const T=s.value.find(B=>B.id===m);T&&w(T)},C=()=>{d.value.forEach(w)},L=(m,T)=>{var A;const B=(A=n.animation)==null?void 0:A[m];return typeof B=="function"?B(T):B},M=(m,T)=>{if(!c.value)return;const B=L("enter",m);i.value(m,B,{duration:n.speed,complete:T})},h=(m,T)=>{if(!c.value)return;const B=L("leave",m);i.value(m,B,{duration:n.speed,complete:T})};function E(){s.value=s.value.filter(m=>m.state!==l.DESTROYED)}return e.onMounted(()=>{I.on("notification-add",N),I.on("notification-close",$)}),(m,T)=>(e.openBlock(),e.createElementBlock("div",{class:"d-notification-group",style:e.normalizeStyle(u.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(r.value),{name:t.animationName,onEnter:M,onLeave:h,onAfterLeave:E},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,B=>(e.openBlock(),e.createElementBlock("div",{key:B.id,class:"d-notification-wrapper",style:e.normalizeStyle(x(B)),"data-id":B.id,onMouseenter:D,onMouseleave:k},[e.renderSlot(m.$slots,"body",{class:e.normalizeClass([t.classes,B.type]),item:B,close:()=>w(B)},()=>[e.createElementVNode("div",{class:e.normalizeClass(S(B)),onClick:A=>b(B)},[t.dangerouslySetInnerHtml?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[B.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-notification-title",innerHTML:B.timer},null,8,Eo)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"notification-content",innerHTML:B.text},null,8,To)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[B.title?(e.openBlock(),e.createElementBlock("div",No,e.toDisplayString(B.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Vo,e.toDisplayString(B.text),1)],64))],10,Co)])],44,$o))),128))]),_:3},40,["name"]))],4))}},Mo={class:"d-info-progress-icon-container"},Io={class:"d-info-progress-icon"},zo={class:"d-info-progress-data-container"},Ro=["innerHTML"],Oo={__name:"DInfoProgress",props:{style:[String,Object],label:String,progress:Number,icon:String,type:String},emits:["click"],setup(t,{emit:o}){const n=t,l=e.computed(()=>n.icon?R.getters.getIcon(n.icon):null);return(s,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-info-progress",n.type?`d-info-progress-${n.type}`:null]),style:e.normalizeStyle(n.style),onClick:a[0]||(a[0]=i=>{o("click",i)})},[e.createElementVNode("div",Mo,[e.createElementVNode("div",Io,[n.icon?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(Y),{key:0,component:l.value,color:"inherit",size:17},null,8,["component"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",zo,[e.createElementVNode("div",{class:"d-info-progress-line",style:e.normalizeStyle("width: "+n.progress+"%;")},null,4),e.createElementVNode("div",{class:"d-info-progress-label",innerHTML:t.label},null,8,Ro)])],6))}},Ao={class:"d-checkbox"},Ho=["id","checked","disabled"],Fo=["for"],Po={__name:"DCheckbox",props:{label:String,modelValue:Boolean,disabled:{type:Boolean,default:!1},change:Function,checked:Boolean},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,s=e.getCurrentInstance().uid,a=e.computed({get:()=>n.modelValue,set:i=>{o("update:modelValue",i)}});return(i,c)=>(e.openBlock(),e.createElementBlock("div",Ao,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=r=>a.value=r),id:`i-${e.unref(s)}`,type:"checkbox",checked:n.checked,disabled:n.disabled,onChange:c[1]||(c[1]=(...r)=>n.change&&n.change(...r))},null,40,Ho),[[e.vModelCheckbox,a.value]]),e.createElementVNode("label",{for:`i-${e.unref(s)}`},e.toDisplayString(n.label),9,Fo)]))}};async function Oe(t,o){return await Ve(Me,{title:t,message:o})}async function Ae(t,o){return await Ve(Le,{title:t,message:o})}const Wo={__name:"DDialogProvider",setup(t){return window.alert=Ae,window.confirm=Oe,(o,n)=>(e.openBlock(),e.createBlock(e.unref(no)))}},jo={class:"d-select"},Xo={key:0,class:"label"},Yo=["value","selected","disabled"],Uo={__name:"DSelect",props:{label:String,size:String,options:Array,modelValue:String,scale:String},emits:["update:modelValue"],setup(t,{emit:o}){const n=t,l=e.computed(()=>n.scale?"d-select-"+n.scale:""),s=e.computed({get:()=>n.modelValue,set:a=>{o("update:modelValue",a)}});for(let a=0;a<n.options.length;a++)if(n.options[a].selected){s.value=n.options[a].value;break}return(a,i)=>(e.openBlock(),e.createElementBlock("div",jo,[n.label?(e.openBlock(),e.createElementBlock("div",Xo,e.toDisplayString(n.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=c=>s.value=c),class:e.normalizeClass(l.value),style:e.normalizeStyle(n.size==="wide"?"width:100%":"")},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.options,(c,r)=>(e.openBlock(),e.createElementBlock("option",{key:r,value:c.value,selected:c.selected,disabled:c.disabled},e.toDisplayString(c.label),9,Yo))),128))],6),[[e.vModelSelect,s.value]])]))}},qo=["title"],Go=["title"],Zo={__name:"DTabLabel",props:{tab:Object},setup(t){const o=t;return(n,l)=>o.tab.label?(e.openBlock(),e.createElementBlock("span",{key:0,title:o.tab.title?o.tab.title:""},e.toDisplayString(o.tab.label),9,qo)):o.tab.icon?(e.openBlock(),e.createElementBlock("span",{key:1,title:o.tab.title?o.tab.title:""},[e.createVNode(e.unref(Y),{component:o.tab.icon},null,8,["component"])],8,Go)):e.createCommentVNode("",!0)}},al="",Ko={class:"d-tabs"},Jo=W({__name:"DTabs",props:{tabs:Array},setup(t){const o=t,n=e.toRef(o,"tabs"),l=e.ref(0),s=a=>{l.value=a};return(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ko,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(c,r)=>(e.openBlock(),e.createBlock(Zo,{index:r,tab:c,class:e.normalizeClass(["d-tab-title",r===l.value?"active":""]),onClick:d=>s(r)},null,8,["index","tab","class","onClick"]))),256))]),(e.openBlock(),e.createBlock(e.KeepAlive,null,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.value[l.value].component)))],1024))],64))}},[["__scopeId","data-v-c98761cd"]]),il="",Qo={class:"d-grid"},vo=W({__name:"DGrid",props:{gap:{type:String,default:"1em"},colXs:{type:String,default:"repeat(1, 1fr)"},colSm:String,colMd:String,colLg:String,colXl:String,colXxl:String},setup(t){const o=t;e.useCssVars(p=>({"09eba472":r[0],"09eba434":r[1],"09eba3f6":r[2],"09eba3b8":r[3],"09eba37a":r[4],"09eba33c":r[5],"898eb2ac":o.gap}));const{colXs:n,colSm:l,colMd:s,colLg:a,colXl:i,colXxl:c}=e.toRefs(o),r=[n.value,l.value,s.value,a.value,i.value,c.value];let d=null;for(let p=0;p<r.length;p++)d||(d=r[0]),p>0&&(r[p]?d=r[p]:r[p]=d);return(p,u)=>(e.openBlock(),e.createElementBlock("div",Qo,[e.renderSlot(p.$slots,"default",{},void 0,!0)]))}},[["__scopeId","data-v-b45e8130"]]),en=["src","alt","title"],tn={__name:"DImage",props:{src:String,srcFail:String,alt:String,title:String,width:String,height:String,radius:String},setup(t){const o=t,n=e.ref(null),l=new Image;return l.onload=()=>{n.value=l.src},l.onerror=()=>{n.value=o.srcFail},e.onMounted(()=>{l.src=o.src}),(s,a)=>n.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:n.value,alt:o.alt,title:o.title,style:e.normalizeStyle({width:o.width,height:o.height,borderRadius:o.radius})},null,12,en)):e.createCommentVNode("",!0)}},dl="",on={class:"d-textarea"},nn={key:0,class:"label"},ln=["rows","cols","placeholder"],sn=W({__name:"DTextarea",props:{label:String,placeholder:String,scale:String,modelValue:String,rows:{type:Number,default:3},cols:{type:Number,default:null},focus:Boolean},emits:["update:modelValue"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(null),a=e.computed(()=>l.scale==="small"?"d-textarea-small":l.scale==="large"?"d-textarea-large":""),i=e.computed({get:()=>l.modelValue,set:r=>{n("update:modelValue",r)}});e.onMounted(()=>{l.focus&&c()});const c=()=>{s.value.focus()};return o({focus:c}),(r,d)=>(e.openBlock(),e.createElementBlock("div",on,[l.label?(e.openBlock(),e.createElementBlock("div",nn,e.toDisplayString(l.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("textarea",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":d[0]||(d[0]=p=>i.value=p),rows:l.rows,cols:l.cols,placeholder:l.placeholder,class:e.normalizeClass(a.value),style:{width:"100%"}},null,10,ln),[[e.vModelText,i.value]])]))}},[["__scopeId","data-v-0e805d5d"]]);class an{constructor(o){this.fields=o}validate(){let o=!1;for(let n in this.fields)this.fields[n].ref.value.validate()===!0&&(o=!0);return!o}}class rn{validate(o,n="https"){return this._isValidURL(o)||(o=n+"://"+o),this._isValidURL(o)}message(o,n){let l="";switch(o){case"url":l=n;break}return l}_isValidURL(o){try{return new URL(o),!0}catch{return!1}}}const cn=new rn;class dn{validate(o=""){return o!==""}message(o){return o}}const pn=new dn;class mn{validate(o="",n=0){return o.length>=n}message(o){return o}}const un=new mn;class fn{validate(o="",n=0){return o.length<=n}message(o){return o}}const hn=new fn;class gn{validate(o){return/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/.test(o)}message(o){return o}}const yn=new gn;class _n{validate(o){return!isNaN(parseFloat(o))&&!isNaN(o-0)}message(o){return o}}const kn=new _n,z={RulesUrl:cn,RulesRequired:pn,RulesMin:un,RulesMax:hn,RulesEmail:yn,RulesNumber:kn};class bn{validate(o,n){var s,a,i,c,r,d,p,u,_,b,D,k,N,$;let l="";if(n){let S=!1;for(let x in n)if(!S)switch(x){case"url":l=z.RulesUrl.validate(o,"https")||o.length===0?"":z.RulesUrl.message("url",(s=n[x])!=null&&s.message?(a=n[x])==null?void 0:a.message:"url_incorrect"),S=l!=="";break;case"required":l=z.RulesRequired.validate(o)?"":z.RulesRequired.message((i=n[x])!=null&&i.message?(c=n[x])==null?void 0:c.message:"required"),S=l!=="";break;case"min":l=z.RulesMin.validate(o,(r=n[x])==null?void 0:r.value)?"":z.RulesMin.message((d=n[x])!=null&&d.message?(p=n[x])==null?void 0:p.message:"very_small"),S=l!=="";break;case"max":l=z.RulesMax.validate(o,(u=n[x])==null?void 0:u.value)?"":z.RulesMax.message((_=n[x])!=null&&_.message?(b=n[x])==null?void 0:b.message:"vary_large"),S=l!=="";break;case"email":l=z.RulesEmail.validate(o)?"":z.RulesMax.message((D=n[x])!=null&&D.message?(k=n[x])==null?void 0:k.message:"email_incorrect"),S=l!=="";break;case"number":l=z.RulesNumber.validate(o)?"":z.RulesNumber.message((N=n[x])!=null&&N.message?($=n[x])==null?void 0:$.message:"number_incorrect"),S=l!=="";break}}return l}}const Bn=new bn,Sn={style:{display:"flex","flex-direction":"column"}},xn={key:0,class:"d-label"},wn={key:0,class:"text-red"},Dn={style:{display:"flex","flex-direction":"row"}},$n={style:{flex:"1",position:"relative"}},Cn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],En=["id","type","placeholder","disabled"],Tn=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41z",fill:"currentColor"})],-1)],Nn={key:1,class:"d-help"},Vn={key:2,class:"d-error text-red"},Ln={__name:"DInputString",props:{form:Object,name:String,modelValue:String,label:String,error:String,help:String,placeholder:String,type:{type:String,default:"text"},pre:Object,post:Object,fieldRules:Object,scale:String,focus:Boolean,disabled:Boolean},emits:["update:modelValue","input"],setup(t,{expose:o,emit:n}){const l=t,s=e.ref(l.error),a=rt(),i=e.ref(!1),c=e.ref(null);//!props.form ? ref(null) : props.form.fields[props.name].ref
2
2
  const r=e.computed({get:()=>l.modelValue,set:$=>{n("update:modelValue",$)}}),d=e.computed(()=>l.type==="password"?"password":"text"),p=e.computed(()=>l.scale),u=$=>{n("input",$),_()},_=()=>(s.value=Bn.validate(r.value,l.form.fields[l.name].rules),!!s.value);e.onMounted(()=>{b()});const b=()=>{var $;($=c.value)==null||$.focus()},D=()=>{r.value=""},k=$=>{i.value=$};return o({focus:b,setError:$=>{s.value=$},validate:_}),($,S)=>{var x,w,y,C,L,M,h,E,m,T,B,A,X,ee,te,oe,ne,P,le,G,se,ge,K,Ye,Ue,qe,Ge,Ze,Ke,Je,Qe,ve,et,tt,ot,nt,lt,st,at;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["d-input-string",p.value])},[e.createElementVNode("div",Sn,[l.label?(e.openBlock(),e.createElementBlock("div",xn,[e.createTextVNode(e.toDisplayString(l.label),1),(x=l.form)!=null&&x.fields[l.name].rules&&l.form.fields[l.name].rules.hasOwnProperty("required")?(e.openBlock(),e.createElementBlock("span",wn,"*")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Dn,[(y=(w=l.pre)==null?void 0:w.outside)!=null&&y.component?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["d-pre",l.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((L=(C=l.pre)==null?void 0:C.outside)==null?void 0:L.component)))],2)):(h=(M=l.pre)==null?void 0:M.outside)!=null&&h.text?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(["d-pre",l.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((m=(E=l.pre)==null?void 0:E.outside)==null?void 0:m.text),3)],2)):e.createCommentVNode("",!0),e.createElementVNode("div",$n,[(B=(T=l.pre)==null?void 0:T.inside)!=null&&B.action&&((X=(A=l.pre)==null?void 0:A.inside)==null?void 0:X.action)==="clear"&&((ee=r.value)==null?void 0:ee.length)>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"d-pre-inside-button",onClick:D},Cn)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{id:e.unref(a),ref_key:"inputRef",ref:c,"onUpdate:modelValue":S[0]||(S[0]=ye=>r.value=ye),style:{width:"100%"},type:d.value,placeholder:l.placeholder,onInput:u,onFocus:S[1]||(S[1]=ye=>k(!0)),onFocusout:S[2]||(S[2]=ye=>k(!1)),class:e.normalizeClass([(oe=(te=l.pre)==null?void 0:te.outside)!=null&&oe.component||(P=(ne=l.pre)==null?void 0:ne.outside)!=null&&P.text?"has-pre":"",(G=(le=l.post)==null?void 0:le.outside)!=null&&G.component||(ge=(se=l.post)==null?void 0:se.outside)!=null&&ge.text?"has-post":"",(Ye=(K=l.pre)==null?void 0:K.inside)!=null&&Ye.action?"has-pre-inside-button":"",(qe=(Ue=l.post)==null?void 0:Ue.inside)!=null&&qe.action?"has-post-inside-button":"",i.value?"focused":""]),disabled:l.disabled},null,42,En),[[e.vModelDynamic,r.value]]),(Ze=(Ge=l.post)==null?void 0:Ge.inside)!=null&&Ze.action&&((Je=(Ke=l.post)==null?void 0:Ke.inside)==null?void 0:Je.action)==="clear"&&((Qe=r.value)==null?void 0:Qe.length)>0?(e.openBlock(),e.createElementBlock("div",{key:1,class:"d-post-inside-button",onClick:D},Tn)):e.createCommentVNode("",!0)]),(et=(ve=l.post)==null?void 0:ve.outside)!=null&&et.component?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["d-post",l.disabled?"disabled":""])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((ot=(tt=l.post)==null?void 0:tt.outside)==null?void 0:ot.component)))],2)):(lt=(nt=l.post)==null?void 0:nt.outside)!=null&&lt.text?(e.openBlock(),e.createElementBlock("div",{key:3,class:e.normalizeClass(["d-post",l.disabled?"disabled":""])},[e.createElementVNode("div",{class:e.normalizeClass(["d-text",i.value?"focused":""])},e.toDisplayString((at=(st=l.post)==null?void 0:st.outside)==null?void 0:at.text),3)],2)):e.createCommentVNode("",!0)]),l.help?(e.openBlock(),e.createElementBlock("div",Nn,e.toDisplayString(l.help),1)):e.createCommentVNode("",!0),s.value?(e.openBlock(),e.createElementBlock("div",Vn,e.toDisplayString(s.value),1)):e.createCommentVNode("",!0)])],2)}}},ue=t=>{typeof t=="string"&&(t={title:"",text:t}),typeof t=="object"&&I.emit("notification-add",t)};ue.close=t=>{I.emit("notification-close",t)};const Mn=()=>({notify:ue}),In={mounted:function(t,o){t.clickOutsideEvent=function(n){t===n.target||t.contains(n.target)||o.value(n,t)},document.addEventListener("click",t.clickOutsideEvent)},unmounted:function(t){document.removeEventListener("click",t.clickOutsideEvent)}},zn={beforeMount(t,o){t._keydownCallback=n=>{n.key===o.arg&&o.value()},document.addEventListener("keydown",t._keydownCallback)},unmounted(t,o){document.removeEventListener("keydown",t._keydownCallback),delete t._keydownCallback}},Rn={beforeMount(t){t.focus()}};function He(t){return t.type.indexOf("mouse")!==-1?t.clientX:t.touches[0].clientX}function Fe(t){return t.type.indexOf("mouse")!==-1?t.clientY:t.touches[0].clientY}var On=function(){var t=!1;try{var o=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,o)}catch{}return t}(),An={disableClick:!1,tapTolerance:10,swipeTolerance:30,touchHoldTolerance:400,longTapTimeInterval:400,touchClass:"",dragFrequency:100,rollOverFrequency:100};function J(t){var o=this.$$touchObj,n=t.type.indexOf("touch")>=0,l=t.type.indexOf("mouse")>=0,s=this;n&&(o.lastTouchStartTime=t.timeStamp),!(l&&o.lastTouchStartTime&&t.timeStamp-o.lastTouchStartTime<350)&&(o.touchStarted||(Xe(this),o.touchStarted=!0,o.touchMoved=!1,o.swipeOutBounded=!1,o.startX=He(t),o.startY=Fe(t),o.currentX=0,o.currentY=0,o.touchStartTime=t.timeStamp,o.hasSwipe=O(this,"swipe")||O(this,"swipe.left")||O(this,"swipe.right")||O(this,"swipe.top")||O(this,"swipe.bottom"),O(this,"hold")&&(o.touchHoldTimer=setTimeout(function(){o.touchHoldTimer=null,F(t,s,"hold")},o.options.touchHoldTolerance)),F(t,this,"press")))}function Q(t){var o=this.$$touchObj,n=He(t),l=Fe(t),s=o.currentX!=n||o.currentY!=l;if(o.currentX=n,o.currentY=l,o.touchMoved){if(o.hasSwipe&&!o.swipeOutBounded){var i=o.options.swipeTolerance;o.swipeOutBounded=Math.abs(o.startX-o.currentX)>i&&Math.abs(o.startY-o.currentY)>i}}else{var a=o.options.tapTolerance;o.touchMoved=Math.abs(o.startX-o.currentX)>a||Math.abs(o.startY-o.currentY)>a,o.touchMoved&&(he(o),F(t,this,"drag.once"))}if(O(this,"rollover")&&s){var c=t.timeStamp,r=o.options.rollOverFrequency;(o.touchRollTime==null||c>o.touchRollTime+r)&&(o.touchRollTime=c,F(t,this,"rollover"))}if(O(this,"drag")&&o.touchStarted&&o.touchMoved&&s){var c=t.timeStamp,r=o.options.dragFrequency;(o.touchDragTime==null||c>o.touchDragTime+r)&&(o.touchDragTime=c,F(t,this,"drag"))}}function Pe(){var t=this.$$touchObj;he(t),fe(this),t.touchStarted=t.touchMoved=!1,t.startX=t.startY=0}function v(t){var o=this.$$touchObj,n=t.type.indexOf("touch")>=0,l=t.type.indexOf("mouse")>=0;n&&(o.lastTouchEndTime=t.timeStamp);var s=n&&!o.touchHoldTimer;if(he(o),o.touchStarted=!1,fe(this),!(l&&o.lastTouchEndTime&&t.timeStamp-o.lastTouchEndTime<350))if(F(t,this,"release"),o.touchMoved){if(o.hasSwipe&&!o.swipeOutBounded){var a=o.options.swipeTolerance,i,c=Math.abs(o.startY-o.currentY),r=Math.abs(o.startX-o.currentX);(c>a||r>a)&&(c>a?i=o.startY>o.currentY?"top":"bottom":i=o.startX>o.currentX?"left":"right",O(this,"swipe."+i)?F(t,this,"swipe."+i,i):F(t,this,"swipe",i))}}else if(O(this,"longtap")&&t.timeStamp-o.touchStartTime>o.options.longTapTimeInterval)t.cancelable&&t.preventDefault(),F(t,this,"longtap");else if(O(this,"hold")&&s){t.cancelable&&t.preventDefault();return}else F(t,this,"tap")}function We(){Xe(this)}function je(){fe(this)}function O(t,o){var n=t.$$touchObj.callbacks[o];return n!=null&&n.length>0}function F(t,o,n,l){var s=o.$$touchObj,a=s.callbacks[n];if(a==null||a.length===0)return null;for(var i=0;i<a.length;i++){var c=a[i];c.modifiers.stop&&t.stopPropagation(),c.modifiers.prevent&&t.preventDefault(),!(c.modifiers.self&&t.target!==t.currentTarget)&&typeof c.value=="function"&&(l?c.value(l,t):c.value(t))}}function Xe(t){var o=t.$$touchObj.options.touchClass;o&&t.classList.add(o)}function fe(t){var o=t.$$touchObj.options.touchClass;o&&t.classList.remove(o)}function he(t){t.touchHoldTimer&&(clearTimeout(t.touchHoldTimer),t.touchHoldTimer=null)}function Hn(t,o){var n=t.$$touchObj||{callbacks:{},hasBindTouchEvents:!1,options:An};return o&&(n.options=Object.assign({},n.options,o)),t.$$touchObj=n,t.$$touchObj}const Fn={beforeMount:function(t,o){const n=Hn(t);let l=On?{passive:!0}:!1;const s=o.arg||"tap";switch(s){case"swipe":let a=o.modifiers;if(a.left||a.right||a.top||a.bottom){for(let i in o.modifiers)if(["left","right","top","bottom"].indexOf(i)>=0){let c="swipe."+i;n.callbacks[c]=n.callbacks[c]||[],n.callbacks[c].push(o)}}else n.callbacks.swipe=n.callbacks.swipe||[],n.callbacks.swipe.push(o);break;case"press":case"drag":o.modifiers.disablePassive&&(l=!1);default:n.callbacks[s]=n.callbacks[s]||[],n.callbacks[s].push(o)}n.hasBindTouchEvents||(t.addEventListener("touchstart",J,l),t.addEventListener("touchmove",Q,l),t.addEventListener("touchcancel",Pe),t.addEventListener("touchend",v),n.options.disableClick||(t.addEventListener("mousedown",J),t.addEventListener("mousemove",Q),t.addEventListener("mouseup",v),t.addEventListener("mouseenter",We),t.addEventListener("mouseleave",je)),n.hasBindTouchEvents=!0)},unmounted:function(t){t.removeEventListener("touchstart",J),t.removeEventListener("touchmove",Q),t.removeEventListener("touchcancel",Pe),t.removeEventListener("touchend",v),t.$$touchObj&&!t.$$touchObj.options.disableClick&&(t.removeEventListener("mousedown",J),t.removeEventListener("mousemove",Q),t.removeEventListener("mouseup",v),t.removeEventListener("mouseenter",We),t.removeEventListener("mouseleave",je)),delete t.$$touchObj}};f.DAccordion=Ft,f.DAlertDialog=Le,f.DBadge=ke,f.DButton=H,f.DCard=go,f.DCheckbox=Po,f.DCollapse=be,f.DConfigProvider=Ut,f.DConfirmDialog=Me,f.DContextMenu=De,f.DDialogProvider=Wo,f.DDrag=Be,f.DDrop=we,f.DDropdown=ro,f.DForm=an,f.DGlobalStore=U,f.DGrid=vo,f.DIcon=Y,f.DIconStore=R,f.DImage=tn,f.DInfoProgress=Oo,f.DInput=$t,f.DInputString=Ln,f.DLayoutAdmin=Yt,f.DLayoutContent=Ne,f.DLayoutFooter=Ee,f.DLayoutHeader=$e,f.DLayoutSidebar=Te,f.DLayoutTab=Ce,f.DMenu=re,f.DModal=ce,f.DNotificationProvider=Lo,f.DPanel=Ie,f.DScroll=Gt,f.DScrollProvider=qt,f.DSelect=Uo,f.DTabs=Jo,f.DTextarea=sn,f.DTransferStore=Z,f.DTree=ie,f.DTreeItem=Se,f.DTreeStore=g,f.Rules=z,f.alert=Ae,f.clickOutside=In,f.confirm=Oe,f.emitter=I,f.eventsBus=xe,f.focus=Rn,f.keydown=zn,f.notify=ue,f.touch=Fn,f.useNotification=Mn,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doph-js",
3
- "version": "0.2.35",
3
+ "version": "0.2.37",
4
4
  "description": "Simple Vue3 component library",
5
5
  "author": "Error202",
6
6
  "license": "MIT",