prlg-ui 1.8.326 → 1.8.327

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.
@@ -0,0 +1,195 @@
1
+ import { defineComponent as F, useId as x, ref as k, computed as z, onMounted as h, createElementBlock as i, openBlock as t, normalizeClass as p, createCommentVNode as o, createBlock as $, createVNode as I, unref as d, resolveDynamicComponent as M, toDisplayString as _, Teleport as E, Transition as V, withCtx as O, normalizeStyle as T, createElementVNode as m, useTemplateRef as N, Fragment as j } from "vue";
2
+ import { F as D, E as P, W as R, P as W, C, _ as w, a as q } from "./FileIcon-maHE2Nhr.js";
3
+ import { h as B } from "./parseFileSize.util-DTzvlV7u.js";
4
+ import { g as A, u as G } from "./typeFile.util-DerifWNY.js";
5
+ const H = {
6
+ key: 1,
7
+ class: "file__title"
8
+ }, J = {
9
+ key: 2,
10
+ class: "file__info"
11
+ }, K = {
12
+ key: 0,
13
+ class: "file__type"
14
+ }, L = {
15
+ key: 1,
16
+ class: "file__info-separator"
17
+ }, Q = {
18
+ key: 2,
19
+ class: "file__size"
20
+ }, U = /* @__PURE__ */ F({
21
+ __name: "File",
22
+ props: {
23
+ file: {},
24
+ viewName: { type: Boolean, default: !1 },
25
+ outlined: { type: Boolean, default: !0 },
26
+ removable: { type: Boolean }
27
+ },
28
+ emits: ["remove"],
29
+ setup(e, { emit: v }) {
30
+ const u = v, a = x(), l = k(null);
31
+ async function s(r, c = "image") {
32
+ const y = await (await fetch(r)).blob(), b = y.type.split("/")[1] || "", S = b ? `${c}.${b}` : c;
33
+ return new File([y], S, { type: y.type });
34
+ }
35
+ const n = z(() => l.value && l.value.mime ? A(l.value.mime) : null), f = z(() => {
36
+ switch (n.value) {
37
+ case "pdf":
38
+ return W;
39
+ case "word":
40
+ return R;
41
+ case "excel":
42
+ return P;
43
+ case "other":
44
+ default:
45
+ return D;
46
+ }
47
+ });
48
+ return h(async () => {
49
+ if (typeof e.file == "string") {
50
+ const r = await s(e.file);
51
+ l.value = {
52
+ id: a,
53
+ url: e.file,
54
+ name: r.name,
55
+ mime: r.type,
56
+ size: r.size
57
+ };
58
+ } else
59
+ l.value = e.file;
60
+ }), (r, c) => (t(), i("div", {
61
+ class: p(["file", { "file--outlined": e.outlined }])
62
+ }, [
63
+ e.removable && typeof e.file != "string" ? (t(), i("button", {
64
+ key: 0,
65
+ class: "file__remove",
66
+ onClick: c[0] || (c[0] = (g) => u("remove", e.file))
67
+ }, [
68
+ I(d(C))
69
+ ])) : o("", !0),
70
+ (t(), $(M(f.value), { class: "file__icon" })),
71
+ l.value && l.value.name && e.viewName ? (t(), i("div", H, _(l.value ? l.value.name.split(".")[0] : "unknown"), 1)) : o("", !0),
72
+ l.value ? (t(), i("div", J, [
73
+ l.value.mime ? (t(), i("div", K, _(n.value), 1)) : o("", !0),
74
+ l.value.mime && l.value.size ? (t(), i("div", L)) : o("", !0),
75
+ l.value.size ? (t(), i("div", Q, _(l.value ? d(B)(l.value.size) : "0 Б"), 1)) : o("", !0)
76
+ ])) : o("", !0)
77
+ ], 2));
78
+ }
79
+ }), re = /* @__PURE__ */ w(U, [["__scopeId", "data-v-7c3d1c11"]]), X = { class: "image-full-modal__wrapper" }, Y = { class: "image-full-modal__header" }, Z = { class: "image-full-modal__main" }, ee = ["src", "alt"], le = /* @__PURE__ */ F({
80
+ __name: "ImageFullModal",
81
+ props: {
82
+ src: {},
83
+ alt: {}
84
+ },
85
+ setup(e, { expose: v }) {
86
+ const u = k(!1), { zIndex: a } = G("modal");
87
+ return v({
88
+ open: () => {
89
+ u.value = !0;
90
+ },
91
+ close: () => {
92
+ u.value = !1;
93
+ }
94
+ }), (l, s) => (t(), $(E, { to: "body" }, [
95
+ I(V, { name: "fade" }, {
96
+ default: O(() => [
97
+ u.value ? (t(), i("div", {
98
+ key: 0,
99
+ class: "image-full-modal",
100
+ style: T({ zIndex: d(a)?.zIndex })
101
+ }, [
102
+ m("div", {
103
+ class: "image-full-modal__overlay",
104
+ onClick: s[0] || (s[0] = (n) => u.value = !1)
105
+ }),
106
+ m("div", X, [
107
+ m("div", Y, [
108
+ m("button", {
109
+ class: "image-full-modal__close",
110
+ onClick: s[1] || (s[1] = (n) => u.value = !1)
111
+ }, [
112
+ I(d(C))
113
+ ])
114
+ ]),
115
+ m("div", Z, [
116
+ m("img", {
117
+ src: e.src,
118
+ alt: e.alt
119
+ }, null, 8, ee)
120
+ ]),
121
+ s[2] || (s[2] = m("div", { class: "image-full-modal__footer" }, null, -1))
122
+ ])
123
+ ], 4)) : o("", !0)
124
+ ]),
125
+ _: 1
126
+ })
127
+ ]));
128
+ }
129
+ }), te = /* @__PURE__ */ w(le, [["__scopeId", "data-v-26b5c867"]]), ae = ["src", "alt"], ie = {
130
+ key: 1,
131
+ class: "image__info"
132
+ }, se = {
133
+ key: 0,
134
+ class: "image__size"
135
+ }, ne = /* @__PURE__ */ F({
136
+ __name: "Image",
137
+ props: {
138
+ file: {},
139
+ alt: {},
140
+ size: { default: "medium" },
141
+ fullScreen: { type: Boolean },
142
+ viewInfo: { type: Boolean, default: !1 }
143
+ },
144
+ setup(e) {
145
+ const v = x(), u = N("imageFullModal"), a = k(null);
146
+ async function l(n, f = "image") {
147
+ const c = await (await fetch(n)).blob(), g = c.type.split("/")[1] || "", y = g ? `${f}.${g}` : f;
148
+ return new File([c], y, { type: c.type });
149
+ }
150
+ const s = z(() => typeof e.file == "string" ? e.file : e.file.url);
151
+ return h(async () => {
152
+ if (e.viewInfo)
153
+ if (typeof e.file == "string") {
154
+ const n = await l(e.file);
155
+ a.value = {
156
+ id: v,
157
+ url: e.file,
158
+ name: n.name,
159
+ mime: n.type,
160
+ size: n.size
161
+ };
162
+ } else
163
+ a.value = e.file;
164
+ }), (n, f) => (t(), i(j, null, [
165
+ m("div", {
166
+ class: p(["image", `image--${e.size}`, { "image--full-screen": e.fullScreen }])
167
+ }, [
168
+ e.fullScreen ? (t(), i("div", {
169
+ key: 0,
170
+ class: "image__overlay",
171
+ onClick: f[0] || (f[0] = (r) => u.value?.open())
172
+ }, [
173
+ I(d(q))
174
+ ])) : o("", !0),
175
+ m("img", {
176
+ src: s.value,
177
+ alt: e.alt
178
+ }, null, 8, ae),
179
+ e.viewInfo && a.value && (a.value.mime || a.value.size) && e.size === "large" ? (t(), i("div", ie, [
180
+ a.value.size ? (t(), i("div", se, _(a.value ? d(B)(a.value.size) : "0 Б"), 1)) : o("", !0)
181
+ ])) : o("", !0)
182
+ ], 2),
183
+ e.fullScreen ? (t(), $(te, {
184
+ key: 0,
185
+ ref: "imageFullModal",
186
+ src: s.value,
187
+ alt: e.alt
188
+ }, null, 8, ["src", "alt"])) : o("", !0)
189
+ ], 64));
190
+ }
191
+ }), fe = /* @__PURE__ */ w(ne, [["__scopeId", "data-v-903c99cc"]]);
192
+ export {
193
+ re as F,
194
+ fe as I
195
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),i=require("./FileIcon-BE4ItwkK.cjs"),y=require("./parseFileSize.util-0SyKuE4n.cjs"),k=require("./typeFile.util-CwOoIMBz.cjs"),B={key:1,class:"file__title"},p={key:2,class:"file__info"},_={key:0,class:"file__type"},I={key:1,class:"file__info-separator"},V={key:2,class:"file__size"},z=e.defineComponent({__name:"File",props:{file:{},viewName:{type:Boolean,default:!1},outlined:{type:Boolean,default:!0},removable:{type:Boolean}},emits:["remove"],setup(l,{emit:u}){const c=u,o=e.useId(),t=e.ref(null);async function n(r,s="image"){const d=await(await fetch(r)).blob(),v=d.type.split("/")[1]||"",g=v?`${s}.${v}`:s;return new File([d],g,{type:d.type})}const a=e.computed(()=>t.value&&t.value.mime?k.getFileTypeByMime(t.value.mime):null),m=e.computed(()=>{switch(a.value){case"pdf":return i.PdfIcon;case"word":return i.WordIcon;case"excel":return i.ExcelIcon;case"other":default:return i.FileIcon}});return e.onMounted(async()=>{if(typeof l.file=="string"){const r=await n(l.file);t.value={id:o,url:l.file,name:r.name,mime:r.type,size:r.size}}else t.value=l.file}),(r,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["file",{"file--outlined":l.outlined}])},[l.removable&&typeof l.file!="string"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"file__remove",onClick:s[0]||(s[0]=f=>c("remove",l.file))},[e.createVNode(e.unref(i.CloseIcon))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(m.value),{class:"file__icon"})),t.value&&t.value.name&&l.viewName?(e.openBlock(),e.createElementBlock("div",B,e.toDisplayString(t.value?t.value.name.split(".")[0]:"unknown"),1)):e.createCommentVNode("",!0),t.value?(e.openBlock(),e.createElementBlock("div",p,[t.value.mime?(e.openBlock(),e.createElementBlock("div",_,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0),t.value.mime&&t.value.size?(e.openBlock(),e.createElementBlock("div",I)):e.createCommentVNode("",!0),t.value.size?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(t.value?e.unref(y.formatFileSize)(t.value.size):"0 Б"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),C=i._export_sfc(z,[["__scopeId","data-v-7c3d1c11"]]),N={class:"image-full-modal__wrapper"},E={class:"image-full-modal__header"},F={class:"image-full-modal__main"},$=["src","alt"],w=e.defineComponent({__name:"ImageFullModal",props:{src:{},alt:{}},setup(l,{expose:u}){const c=e.ref(!1),{zIndex:o}=k.useOverlay("modal");return u({open:()=>{c.value=!0},close:()=>{c.value=!1}}),(t,n)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-full-modal",style:e.normalizeStyle({zIndex:e.unref(o)?.zIndex})},[e.createElementVNode("div",{class:"image-full-modal__overlay",onClick:n[0]||(n[0]=a=>c.value=!1)}),e.createElementVNode("div",N,[e.createElementVNode("div",E,[e.createElementVNode("button",{class:"image-full-modal__close",onClick:n[1]||(n[1]=a=>c.value=!1)},[e.createVNode(e.unref(i.CloseIcon))])]),e.createElementVNode("div",F,[e.createElementVNode("img",{src:l.src,alt:l.alt},null,8,$)]),n[2]||(n[2]=e.createElementVNode("div",{class:"image-full-modal__footer"},null,-1))])],4)):e.createCommentVNode("",!0)]),_:1})]))}}),b=i._export_sfc(w,[["__scopeId","data-v-26b5c867"]]),x=["src","alt"],S={key:1,class:"image__info"},h={key:0,class:"image__size"},M=e.defineComponent({__name:"Image",props:{file:{},alt:{},size:{default:"medium"},fullScreen:{type:Boolean},viewInfo:{type:Boolean,default:!1}},setup(l){const u=e.useId(),c=e.useTemplateRef("imageFullModal"),o=e.ref(null);async function t(a,m="image"){const s=await(await fetch(a)).blob(),f=s.type.split("/")[1]||"",d=f?`${m}.${f}`:m;return new File([s],d,{type:s.type})}const n=e.computed(()=>typeof l.file=="string"?l.file:l.file.url);return e.onMounted(async()=>{if(l.viewInfo)if(typeof l.file=="string"){const a=await t(l.file);o.value={id:u,url:l.file,name:a.name,mime:a.type,size:a.size}}else o.value=l.file}),(a,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["image",`image--${l.size}`,{"image--full-screen":l.fullScreen}])},[l.fullScreen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image__overlay",onClick:m[0]||(m[0]=r=>c.value?.open())},[e.createVNode(e.unref(i.EyeIcon))])):e.createCommentVNode("",!0),e.createElementVNode("img",{src:n.value,alt:l.alt},null,8,x),l.viewInfo&&o.value&&(o.value.mime||o.value.size)&&l.size==="large"?(e.openBlock(),e.createElementBlock("div",S,[o.value.size?(e.openBlock(),e.createElementBlock("div",h,e.toDisplayString(o.value?e.unref(y.formatFileSize)(o.value.size):"0 Б"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2),l.fullScreen?(e.openBlock(),e.createBlock(b,{key:0,ref:"imageFullModal",src:n.value,alt:l.alt},null,8,["src","alt"])):e.createCommentVNode("",!0)],64))}}),D=i._export_sfc(M,[["__scopeId","data-v-903c99cc"]]);exports.File=C;exports.Image=D;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("../Image-DLJh4B68.cjs"),m=require("../FileIcon-BE4ItwkK.cjs"),p=require("../typeFile.util-CwOoIMBz.cjs"),u=require("../SendIcon-CH6S0QWh.cjs"),_=require("../dayjs.util-w9plG3H0.cjs"),v=require("../uploadFile.util-CCrV2jIp.cjs"),h={class:"chat-file__content"},k=e.defineComponent({__name:"ChatFile",props:{file:{}},emits:["deleteFile"],setup(s,{emit:n}){const i=n,r=e.computed(()=>URL.createObjectURL(s.file));return(t,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-file",{"chat-file--image":e.unref(p.getFileTypeByMime)(t.file.type)==="image"}])},[e.createElementVNode("button",{class:"chat-file__delete",onClick:c[0]||(c[0]=l=>i("deleteFile",t.file))},[e.createVNode(e.unref(m.CloseIcon))]),e.createElementVNode("div",h,[e.unref(p.getFileTypeByMime)(t.file.type)==="image"?(e.openBlock(),e.createBlock(e.unref(f.Image),{key:0,file:r.value,size:"large",fullScreen:""},null,8,["file"])):(e.openBlock(),e.createBlock(e.unref(f.File),{key:1,file:r.value,outlined:!1},null,8,["file"]))])],2))}}),g=m._export_sfc(k,[["__scopeId","data-v-12b8458b"]]),B={class:"chat-field-actions"},y={ref:"overlay",class:"chat-field-actions__overlay"},b=["onClick"],C={class:"chat-field-actions__overlay-item__label"},V=["disabled"],F=e.defineComponent({__name:"ChatFieldActions",props:e.mergeModels({actions:{},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const n=e.useModel(s,"modelValue"),i=e.useTemplateRef("button"),r=e.useTemplateRef("overlay"),t=e.ref(!1),c=e.reactive({image:{icon:e.shallowRef(u.ImageIcon),label:"Добавить изображение"},file:{icon:e.shallowRef(m.FileIcon),label:"Добавить файл"}}),l=a=>{v.openFileDialog({accept:a==="image"?["image"]:["pdf","excel","word"],maxFileSize:"5mb",maxFiles:1}).then(o=>{n.value?n.value=s.multiple?[...n.value,...o]:o:n.value=[...o],t.value=!1})};return e.onMounted(()=>{_.onClickOutside(r.value,()=>{t.value=!1},{ignore:[i.value]})}),(a,o)=>(e.openBlock(),e.createElementBlock("div",B,[e.createVNode(e.Transition,{name:"slide-up"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",y,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.actions,d=>(e.openBlock(),e.createElementBlock("div",{class:"chat-field-actions__overlay-item",key:d,onClick:R=>l(d)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c[d].icon),{class:"chat-field-actions__overlay-item__icon"})),e.createElementVNode("span",C,e.toDisplayString(c[d].label),1)],8,b))),128))],512),[[e.vShow,t.value]])]),_:1}),e.createElementVNode("button",{ref:"button",onClick:o[0]||(o[0]=d=>t.value=!t.value),class:e.normalizeClass(["chat-field-actions__button",{"chat-field-actions__button--active":t.value}]),disabled:a.disabled},[e.createVNode(e.unref(u.PlusRoundedIcon))],10,V)]))}}),E=m._export_sfc(F,[["__scopeId","data-v-62b95e1b"]]),N={class:"chat-field"},M={key:0,class:"chat-field__files"},T={class:"chat-field__wrapper"},$=["maxlength","placeholder"],I={key:1,class:"chat-field__footer"},S={key:1,class:"chat-field__char-count"},w=e.defineComponent({__name:"ChatField",props:e.mergeModels({viewActions:{type:Boolean,default:!1},actions:{default:()=>["file","image"]},placeholder:{default:"Введите сообщение"},maxLength:{},smallText:{},error:{type:Boolean},errorText:{},disabled:{type:Boolean,default:!1}},{message:{required:!0},messageModifiers:{},files:{},filesModifiers:{}}),emits:e.mergeModels(["sendMessage"],["update:message","update:files"]),setup(s,{emit:n}){const i=n,r=e.useModel(s,"message"),t=e.useModel(s,"files"),c=l=>{t.value&&(t.value=t.value.filter(a=>a.name!==l.name))};return(l,a)=>(e.openBlock(),e.createElementBlock("div",N,[t.value&&t.value.length>0?(e.openBlock(),e.createElementBlock("div",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,o=>(e.openBlock(),e.createBlock(g,{key:o.name,file:o,onDeleteFile:c},null,8,["file"]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",T,[l.viewActions&&l.actions.length>0?(e.openBlock(),e.createBlock(E,{key:0,modelValue:t.value,"onUpdate:modelValue":a[0]||(a[0]=o=>t.value=o),actions:l.actions,disabled:l.disabled},null,8,["modelValue","actions","disabled"])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=o=>r.value=o),class:"chat-field__input",maxlength:l.maxLength,placeholder:l.placeholder},null,8,$),[[e.vModelText,r.value]]),e.createElementVNode("button",{class:"chat-field__button",onClick:a[2]||(a[2]=o=>i("sendMessage"))},[e.createVNode(e.unref(u.SendIcon))])]),l.smallText||l.error&&l.errorText||l.maxLength?(e.openBlock(),e.createElementBlock("div",I,[l.smallText||l.error&&l.errorText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["chat-field__small",{"chat-field__small--error":l.error}])},e.toDisplayString(l.error?l.errorText:l.smallText),3)):e.createCommentVNode("",!0),l.maxLength?(e.openBlock(),e.createElementBlock("div",S,e.toDisplayString(r.value.length)+" / "+e.toDisplayString(l.maxLength),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),L={class:"bonus-summary"},D=e.defineComponent({__name:"BonusSummary",setup(s){return(n,i)=>(e.openBlock(),e.createElementBlock("div",L,[e.createVNode(e.unref(u.BonusIcon),{class:"bonus-summary__icon"}),i[0]||(i[0]=e.createElementVNode("div",{class:"bonus-summary__number"},"123",-1))]))}});exports.BonusSummary=D;exports.ChatField=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),f=require("../Image-DyYO6Izz.cjs"),m=require("../FileIcon-BE4ItwkK.cjs"),v=require("../typeFile.util-CwOoIMBz.cjs"),u=require("../SendIcon-CH6S0QWh.cjs"),h=require("../dayjs.util-B2JdCXIm.cjs"),k=require("../uploadFile.util-CbQSY2xi.cjs"),g={class:"chat-file__content"},B=e.defineComponent({__name:"ChatFile",props:{file:{}},emits:["deleteFile"],setup(t,{emit:n}){const i=n,s=e.computed(()=>URL.createObjectURL(t.file));return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["chat-file",{"chat-file--image":e.unref(v.getFileTypeByMime)(t.file.type)==="image"}])},[e.createElementVNode("button",{class:"chat-file__delete",onClick:c[0]||(c[0]=r=>i("deleteFile",t.file))},[e.createVNode(e.unref(m.CloseIcon))]),e.createElementVNode("div",g,[e.unref(v.getFileTypeByMime)(t.file.type)==="image"?(e.openBlock(),e.createBlock(e.unref(f.Image),{key:0,file:s.value,size:"large",fullScreen:""},null,8,["file"])):(e.openBlock(),e.createBlock(e.unref(f.File),{key:1,file:s.value,outlined:!1},null,8,["file"]))])],2))}}),y=m._export_sfc(B,[["__scopeId","data-v-12b8458b"]]),_={class:"chat-field-actions"},b={ref:"overlay",class:"chat-field-actions__overlay"},C=["onClick"],x={class:"chat-field-actions__overlay-item__label"},V=["disabled"],p=e.defineComponent({__name:"ChatFieldActions",props:e.mergeModels({actions:{},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),i=e.useTemplateRef("button"),s=e.useTemplateRef("overlay"),l=e.ref(!1),c=e.reactive({image:{icon:e.shallowRef(u.ImageIcon),label:"Добавить изображение"},file:{icon:e.shallowRef(m.FileIcon),label:"Добавить файл"}}),r=o=>{k.openFileDialog({accept:o==="image"?["image"]:["pdf","excel","word"],maxFileSize:"5mb",maxFiles:1}).then(a=>{n.value?n.value=t.multiple?[...n.value,...a]:a:n.value=[...a],l.value=!1})};return e.onMounted(()=>{h.onClickOutside(s.value,()=>{l.value=!1},{ignore:[i.value]})}),(o,a)=>(e.openBlock(),e.createElementBlock("div",_,[e.createVNode(e.Transition,{name:"slide-up"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",b,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions,d=>(e.openBlock(),e.createElementBlock("div",{class:"chat-field-actions__overlay-item",key:d,onClick:D=>r(d)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c[d].icon),{class:"chat-field-actions__overlay-item__icon"})),e.createElementVNode("span",x,e.toDisplayString(c[d].label),1)],8,C))),128))],512),[[e.vShow,l.value]])]),_:1}),e.createElementVNode("button",{ref:"button",onClick:a[0]||(a[0]=d=>l.value=!l.value),class:e.normalizeClass(["chat-field-actions__button",{"chat-field-actions__button--active":l.value}]),disabled:t.disabled},[e.createVNode(e.unref(u.PlusRoundedIcon))],10,V)]))}}),F=m._export_sfc(p,[["__scopeId","data-v-62b95e1b"]]),E={class:"chat-field"},N={key:0,class:"chat-field__files"},M={class:"chat-field__wrapper"},T=["maxlength","placeholder"],$={key:1,class:"chat-field__footer"},I={key:1,class:"chat-field__char-count"},S=e.defineComponent({__name:"ChatField",props:e.mergeModels({viewActions:{type:Boolean,default:!1},actions:{default:()=>["file","image"]},placeholder:{default:"Введите сообщение"},maxLength:{},smallText:{},error:{type:Boolean},errorText:{},disabled:{type:Boolean,default:!1}},{message:{required:!0},messageModifiers:{},files:{},filesModifiers:{}}),emits:e.mergeModels(["sendMessage"],["update:message","update:files"]),setup(t,{emit:n}){const i=n,s=e.useModel(t,"message"),l=e.useModel(t,"files"),c=r=>{l.value&&(l.value=l.value.filter(o=>o.name!==r.name))};return(r,o)=>(e.openBlock(),e.createElementBlock("div",E,[l.value&&l.value.length>0?(e.openBlock(),e.createElementBlock("div",N,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value,a=>(e.openBlock(),e.createBlock(y,{key:a.name,file:a,onDeleteFile:c},null,8,["file"]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",M,[t.viewActions&&t.actions.length>0?(e.openBlock(),e.createBlock(F,{key:0,modelValue:l.value,"onUpdate:modelValue":o[0]||(o[0]=a=>l.value=a),actions:t.actions,disabled:t.disabled},null,8,["modelValue","actions","disabled"])):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":o[1]||(o[1]=a=>s.value=a),class:"chat-field__input",maxlength:t.maxLength,placeholder:t.placeholder},null,8,T),[[e.vModelText,s.value]]),e.createElementVNode("button",{class:"chat-field__button",onClick:o[2]||(o[2]=a=>i("sendMessage"))},[e.createVNode(e.unref(u.SendIcon))])]),t.smallText||t.error&&t.errorText||t.maxLength?(e.openBlock(),e.createElementBlock("div",$,[t.smallText||t.error&&t.errorText?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["chat-field__small",{"chat-field__small--error":t.error}])},e.toDisplayString(t.error?t.errorText:t.smallText),3)):e.createCommentVNode("",!0),t.maxLength?(e.openBlock(),e.createElementBlock("div",I,e.toDisplayString(s.value.length)+" / "+e.toDisplayString(t.maxLength),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))}}),w={class:"bonus-summary"},L=e.defineComponent({__name:"BonusSummary",setup(t){return(n,i)=>(e.openBlock(),e.createElementBlock("div",w,[e.createVNode(e.unref(u.BonusIcon),{class:"bonus-summary__icon"}),i[0]||(i[0]=e.createElementVNode("div",{class:"bonus-summary__number"},"123",-1))]))}});exports.BonusSummary=L;exports.ChatField=S;
@@ -1,36 +1,36 @@
1
- import { defineComponent as g, computed as V, createElementBlock as o, openBlock as a, normalizeClass as C, unref as c, createElementVNode as n, createVNode as v, createBlock as p, mergeModels as y, useModel as b, useTemplateRef as F, ref as L, reactive as w, shallowRef as k, onMounted as S, Transition as R, withCtx as D, withDirectives as B, Fragment as I, renderList as T, resolveDynamicComponent as U, toDisplayString as h, vShow as z, createCommentVNode as _, vModelText as N } from "vue";
2
- import { I as O, F as x } from "../Image-Ctgju863.js";
1
+ import { defineComponent as y, computed as V, createElementBlock as i, openBlock as l, normalizeClass as C, unref as u, createElementVNode as n, createVNode as h, createBlock as _, mergeModels as b, useModel as x, useTemplateRef as F, ref as L, reactive as w, shallowRef as k, onMounted as S, Transition as R, withCtx as p, withDirectives as B, Fragment as I, renderList as T, resolveDynamicComponent as D, toDisplayString as g, vShow as U, createCommentVNode as v, vModelText as z } from "vue";
2
+ import { I as N, F as O } from "../Image-DxBnhta_.js";
3
3
  import { C as A, _ as M, F as E } from "../FileIcon-maHE2Nhr.js";
4
4
  import { g as $ } from "../typeFile.util-DerifWNY.js";
5
5
  import { I as P, P as j, S as q, B as H } from "../SendIcon-Cqdt2QWN.js";
6
- import { o as G } from "../dayjs.util-BZJcKPbc.js";
7
- import { o as J } from "../uploadFile.util-c_UlO-OQ.js";
8
- const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ g({
6
+ import { o as G } from "../dayjs.util-CgY84kVQ.js";
7
+ import { o as J } from "../uploadFile.util-vM81SK0i.js";
8
+ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ y({
9
9
  __name: "ChatFile",
10
10
  props: {
11
11
  file: {}
12
12
  },
13
13
  emits: ["deleteFile"],
14
- setup(r, { emit: i }) {
15
- const d = i, u = V(() => URL.createObjectURL(r.file));
16
- return (l, m) => (a(), o("div", {
17
- class: C(["chat-file", { "chat-file--image": c($)(l.file.type) === "image" }])
14
+ setup(e, { emit: o }) {
15
+ const c = o, d = V(() => URL.createObjectURL(e.file));
16
+ return (t, r) => (l(), i("div", {
17
+ class: C(["chat-file", { "chat-file--image": u($)(e.file.type) === "image" }])
18
18
  }, [
19
19
  n("button", {
20
20
  class: "chat-file__delete",
21
- onClick: m[0] || (m[0] = (e) => d("deleteFile", l.file))
21
+ onClick: r[0] || (r[0] = (m) => c("deleteFile", e.file))
22
22
  }, [
23
- v(c(A))
23
+ h(u(A))
24
24
  ]),
25
25
  n("div", K, [
26
- c($)(l.file.type) === "image" ? (a(), p(c(O), {
26
+ u($)(e.file.type) === "image" ? (l(), _(u(N), {
27
27
  key: 0,
28
- file: u.value,
28
+ file: d.value,
29
29
  size: "large",
30
30
  fullScreen: ""
31
- }, null, 8, ["file"])) : (a(), p(c(x), {
31
+ }, null, 8, ["file"])) : (l(), _(u(O), {
32
32
  key: 1,
33
- file: u.value,
33
+ file: d.value,
34
34
  outlined: !1
35
35
  }, null, 8, ["file"]))
36
36
  ])
@@ -39,9 +39,9 @@ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ g({
39
39
  }), W = /* @__PURE__ */ M(Q, [["__scopeId", "data-v-12b8458b"]]), X = { class: "chat-field-actions" }, Y = {
40
40
  ref: "overlay",
41
41
  class: "chat-field-actions__overlay"
42
- }, Z = ["onClick"], ee = { class: "chat-field-actions__overlay-item__label" }, le = ["disabled"], ae = /* @__PURE__ */ g({
42
+ }, Z = ["onClick"], ee = { class: "chat-field-actions__overlay-item__label" }, te = ["disabled"], le = /* @__PURE__ */ y({
43
43
  __name: "ChatFieldActions",
44
- props: /* @__PURE__ */ y({
44
+ props: /* @__PURE__ */ b({
45
45
  actions: {},
46
46
  disabled: { type: Boolean, default: !1 },
47
47
  multiple: { type: Boolean, default: !0 }
@@ -50,8 +50,8 @@ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ g({
50
50
  modelModifiers: {}
51
51
  }),
52
52
  emits: ["update:modelValue"],
53
- setup(r) {
54
- const i = b(r, "modelValue"), d = F("button"), u = F("overlay"), l = L(!1), m = w({
53
+ setup(e) {
54
+ const o = x(e, "modelValue"), c = F("button"), d = F("overlay"), t = L(!1), r = w({
55
55
  image: {
56
56
  icon: k(P),
57
57
  label: "Добавить изображение"
@@ -60,59 +60,59 @@ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ g({
60
60
  icon: k(E),
61
61
  label: "Добавить файл"
62
62
  }
63
- }), e = (s) => {
63
+ }), m = (s) => {
64
64
  J({
65
65
  accept: s === "image" ? ["image"] : ["pdf", "excel", "word"],
66
66
  maxFileSize: "5mb",
67
67
  maxFiles: 1
68
- }).then((t) => {
69
- i.value ? i.value = r.multiple ? [...i.value, ...t] : t : i.value = [...t], l.value = !1;
68
+ }).then((a) => {
69
+ o.value ? o.value = e.multiple ? [...o.value, ...a] : a : o.value = [...a], t.value = !1;
70
70
  });
71
71
  };
72
72
  return S(() => {
73
- G(u.value, () => {
74
- l.value = !1;
75
- }, { ignore: [d.value] });
76
- }), (s, t) => (a(), o("div", X, [
77
- v(R, { name: "slide-up" }, {
78
- default: D(() => [
73
+ G(d.value, () => {
74
+ t.value = !1;
75
+ }, { ignore: [c.value] });
76
+ }), (s, a) => (l(), i("div", X, [
77
+ h(R, { name: "slide-up" }, {
78
+ default: p(() => [
79
79
  B(n("div", Y, [
80
- (a(!0), o(I, null, T(s.actions, (f) => (a(), o("div", {
80
+ (l(!0), i(I, null, T(e.actions, (f) => (l(), i("div", {
81
81
  class: "chat-field-actions__overlay-item",
82
82
  key: f,
83
- onClick: (ce) => e(f)
83
+ onClick: (re) => m(f)
84
84
  }, [
85
- (a(), p(U(m[f].icon), { class: "chat-field-actions__overlay-item__icon" })),
86
- n("span", ee, h(m[f].label), 1)
85
+ (l(), _(D(r[f].icon), { class: "chat-field-actions__overlay-item__icon" })),
86
+ n("span", ee, g(r[f].label), 1)
87
87
  ], 8, Z))), 128))
88
88
  ], 512), [
89
- [z, l.value]
89
+ [U, t.value]
90
90
  ])
91
91
  ]),
92
92
  _: 1
93
93
  }),
94
94
  n("button", {
95
95
  ref: "button",
96
- onClick: t[0] || (t[0] = (f) => l.value = !l.value),
97
- class: C(["chat-field-actions__button", { "chat-field-actions__button--active": l.value }]),
98
- disabled: s.disabled
96
+ onClick: a[0] || (a[0] = (f) => t.value = !t.value),
97
+ class: C(["chat-field-actions__button", { "chat-field-actions__button--active": t.value }]),
98
+ disabled: e.disabled
99
99
  }, [
100
- v(c(j))
101
- ], 10, le)
100
+ h(u(j))
101
+ ], 10, te)
102
102
  ]));
103
103
  }
104
- }), te = /* @__PURE__ */ M(ae, [["__scopeId", "data-v-62b95e1b"]]), se = { class: "chat-field" }, oe = {
104
+ }), ae = /* @__PURE__ */ M(le, [["__scopeId", "data-v-62b95e1b"]]), se = { class: "chat-field" }, ie = {
105
105
  key: 0,
106
106
  class: "chat-field__files"
107
- }, ie = { class: "chat-field__wrapper" }, ne = ["maxlength", "placeholder"], re = {
107
+ }, oe = { class: "chat-field__wrapper" }, ne = ["maxlength", "placeholder"], ce = {
108
108
  key: 1,
109
109
  class: "chat-field__footer"
110
110
  }, de = {
111
111
  key: 1,
112
112
  class: "chat-field__char-count"
113
- }, ye = /* @__PURE__ */ g({
113
+ }, be = /* @__PURE__ */ y({
114
114
  __name: "ChatField",
115
- props: /* @__PURE__ */ y({
115
+ props: /* @__PURE__ */ b({
116
116
  viewActions: { type: Boolean, default: !1 },
117
117
  actions: { default: () => ["file", "image"] },
118
118
  placeholder: { default: "Введите сообщение" },
@@ -127,61 +127,61 @@ const K = { class: "chat-file__content" }, Q = /* @__PURE__ */ g({
127
127
  files: {},
128
128
  filesModifiers: {}
129
129
  }),
130
- emits: /* @__PURE__ */ y(["sendMessage"], ["update:message", "update:files"]),
131
- setup(r, { emit: i }) {
132
- const d = i, u = b(r, "message"), l = b(r, "files"), m = (e) => {
133
- l.value && (l.value = l.value.filter((s) => s.name !== e.name));
130
+ emits: /* @__PURE__ */ b(["sendMessage"], ["update:message", "update:files"]),
131
+ setup(e, { emit: o }) {
132
+ const c = o, d = x(e, "message"), t = x(e, "files"), r = (m) => {
133
+ t.value && (t.value = t.value.filter((s) => s.name !== m.name));
134
134
  };
135
- return (e, s) => (a(), o("div", se, [
136
- l.value && l.value.length > 0 ? (a(), o("div", oe, [
137
- (a(!0), o(I, null, T(l.value, (t) => (a(), p(W, {
138
- key: t.name,
139
- file: t,
140
- onDeleteFile: m
135
+ return (m, s) => (l(), i("div", se, [
136
+ t.value && t.value.length > 0 ? (l(), i("div", ie, [
137
+ (l(!0), i(I, null, T(t.value, (a) => (l(), _(W, {
138
+ key: a.name,
139
+ file: a,
140
+ onDeleteFile: r
141
141
  }, null, 8, ["file"]))), 128))
142
- ])) : _("", !0),
143
- n("div", ie, [
144
- e.viewActions && e.actions.length > 0 ? (a(), p(te, {
142
+ ])) : v("", !0),
143
+ n("div", oe, [
144
+ e.viewActions && e.actions.length > 0 ? (l(), _(ae, {
145
145
  key: 0,
146
- modelValue: l.value,
147
- "onUpdate:modelValue": s[0] || (s[0] = (t) => l.value = t),
146
+ modelValue: t.value,
147
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => t.value = a),
148
148
  actions: e.actions,
149
149
  disabled: e.disabled
150
- }, null, 8, ["modelValue", "actions", "disabled"])) : _("", !0),
150
+ }, null, 8, ["modelValue", "actions", "disabled"])) : v("", !0),
151
151
  B(n("input", {
152
- "onUpdate:modelValue": s[1] || (s[1] = (t) => u.value = t),
152
+ "onUpdate:modelValue": s[1] || (s[1] = (a) => d.value = a),
153
153
  class: "chat-field__input",
154
154
  maxlength: e.maxLength,
155
155
  placeholder: e.placeholder
156
156
  }, null, 8, ne), [
157
- [N, u.value]
157
+ [z, d.value]
158
158
  ]),
159
159
  n("button", {
160
160
  class: "chat-field__button",
161
- onClick: s[2] || (s[2] = (t) => d("sendMessage"))
161
+ onClick: s[2] || (s[2] = (a) => c("sendMessage"))
162
162
  }, [
163
- v(c(q))
163
+ h(u(q))
164
164
  ])
165
165
  ]),
166
- e.smallText || e.error && e.errorText || e.maxLength ? (a(), o("div", re, [
167
- e.smallText || e.error && e.errorText ? (a(), o("div", {
166
+ e.smallText || e.error && e.errorText || e.maxLength ? (l(), i("div", ce, [
167
+ e.smallText || e.error && e.errorText ? (l(), i("div", {
168
168
  key: 0,
169
169
  class: C(["chat-field__small", { "chat-field__small--error": e.error }])
170
- }, h(e.error ? e.errorText : e.smallText), 3)) : _("", !0),
171
- e.maxLength ? (a(), o("div", de, h(u.value.length) + " / " + h(e.maxLength), 1)) : _("", !0)
172
- ])) : _("", !0)
170
+ }, g(e.error ? e.errorText : e.smallText), 3)) : v("", !0),
171
+ e.maxLength ? (l(), i("div", de, g(d.value.length) + " / " + g(e.maxLength), 1)) : v("", !0)
172
+ ])) : v("", !0)
173
173
  ]));
174
174
  }
175
- }), ue = { class: "bonus-summary" }, be = /* @__PURE__ */ g({
175
+ }), ue = { class: "bonus-summary" }, xe = /* @__PURE__ */ y({
176
176
  __name: "BonusSummary",
177
- setup(r) {
178
- return (i, d) => (a(), o("div", ue, [
179
- v(c(H), { class: "bonus-summary__icon" }),
180
- d[0] || (d[0] = n("div", { class: "bonus-summary__number" }, "123", -1))
177
+ setup(e) {
178
+ return (o, c) => (l(), i("div", ue, [
179
+ h(u(H), { class: "bonus-summary__icon" }),
180
+ c[0] || (c[0] = n("div", { class: "bonus-summary__number" }, "123", -1))
181
181
  ]));
182
182
  }
183
183
  });
184
184
  export {
185
- be as BonusSummary,
186
- ye as ChatField
185
+ xe as BonusSummary,
186
+ be as ChatField
187
187
  };
@@ -1 +1 @@
1
- "use strict";const l=require("vue"),e=require("./parseFileSize.util-D9hMoJaT.cjs"),u=new WeakMap;function m(n){const o=l.unref(n);return o?.$el??o}function p(n){return typeof n=="string"?document.querySelector(n):m(n)}function g(n,o,f={}){const r=p(n);if(!r)return()=>{};const d=u.get(r);d&&(d(),u.delete(r));const s=a=>{const i=a.target instanceof Node?a.target:null;if(!i)return;const y=(l.toValue(f.ignore)??[]).map(t=>typeof t=="string"?document.querySelector(t):m(t)).filter(t=>t!=null);r.contains(i)||y.some(t=>t.contains(i))||o(a)};document.addEventListener("mousedown",s,{capture:!0}),document.addEventListener("touchstart",s,{capture:!0});const c=()=>{document.removeEventListener("mousedown",s,{capture:!0}),document.removeEventListener("touchstart",s,{capture:!0}),u.delete(r)};return u.set(r,c),c}e.dayjs.extend(e.localizedFormat);e.dayjs.extend(e.relativeTime);e.dayjs.extend(e.isToday);e.dayjs.extend(e.isBetween);e.dayjs.extend(e.isSameOrBefore);e.dayjs.extend(e.isSameOrAfter);e.dayjs.extend(e.duration);e.dayjs.extend(e.customParseFormat);e.dayjs.extend(e.dayOfYear);e.dayjs.locale("ru");exports.onClickOutside=g;
1
+ "use strict";const l=require("vue"),e=require("./parseFileSize.util-0SyKuE4n.cjs"),u=new WeakMap;function m(n){const o=l.unref(n);return o?.$el??o}function p(n){return typeof n=="string"?document.querySelector(n):m(n)}function g(n,o,f={}){const r=p(n);if(!r)return()=>{};const d=u.get(r);d&&(d(),u.delete(r));const s=a=>{const i=a.target instanceof Node?a.target:null;if(!i)return;const y=(l.toValue(f.ignore)??[]).map(t=>typeof t=="string"?document.querySelector(t):m(t)).filter(t=>t!=null);r.contains(i)||y.some(t=>t.contains(i))||o(a)};document.addEventListener("mousedown",s,{capture:!0}),document.addEventListener("touchstart",s,{capture:!0});const c=()=>{document.removeEventListener("mousedown",s,{capture:!0}),document.removeEventListener("touchstart",s,{capture:!0}),u.delete(r)};return u.set(r,c),c}e.dayjs.extend(e.localizedFormat);e.dayjs.extend(e.relativeTime);e.dayjs.extend(e.isToday);e.dayjs.extend(e.isBetween);e.dayjs.extend(e.isSameOrBefore);e.dayjs.extend(e.isSameOrAfter);e.dayjs.extend(e.duration);e.dayjs.extend(e.customParseFormat);e.dayjs.extend(e.dayOfYear);e.dayjs.locale("ru");exports.onClickOutside=g;
@@ -1,5 +1,5 @@
1
1
  import { toValue as p, unref as g } from "vue";
2
- import { d as e, l as x, r as v, i as y, a as E, b as w, c as L, e as O, f as S, g as T } from "./parseFileSize.util-CaHpLGi2.js";
2
+ import { d as e, l as x, r as v, i as y, a as E, b as w, c as L, e as O, f as S, g as T } from "./parseFileSize.util-DTzvlV7u.js";
3
3
  const a = /* @__PURE__ */ new WeakMap();
4
4
  function m(n) {
5
5
  const o = g(n);
@@ -0,0 +1 @@
1
+ "use strict";const l=require("vue");let r=null,c=0;function a(){const e=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${e}px`,()=>{document.body.style.position="",document.body.style.top="",window.scrollTo(0,e)}}const d=()=>{c++,c===1&&!r&&(r=a())},u=()=>{c>0&&c--,c===0&&r&&(r(),r=null)},i=()=>({unlockScroll:u,lockScroll:d}),f=["data-layer"],y=l.defineComponent({__name:"Portal",props:{overlayType:{default:"modal"},teleport:{type:Boolean,default:!0},target:{default:"body"},zIndex:{},show:{type:Boolean,default:!0},parentId:{}},setup(e){const t=e,n=l.computed(()=>{if(t.zIndex)return t.zIndex});return(o,s)=>e.show?(l.openBlock(),l.createBlock(l.Teleport,{key:0,to:e.target,disabled:!e.teleport},[l.createElementVNode("div",{style:l.normalizeStyle({zIndex:n.value,position:"relative",isolation:"isolate"}),"data-layer":e.overlayType},[l.renderSlot(o.$slots,"default")],12,f)],8,["to","disabled"])):l.createCommentVNode("",!0)}});function p(){const e=new Map;return{on(t,n){const o=e.get(t)||[];o.push(n),e.set(t,o)},off(t,n){const o=e.get(t);o&&e.set(t,o.filter(s=>s!==n))},emit(t,n){const o=e.get(t);o&&o.forEach(s=>s(n))},clear(){e.clear()}}}exports.EventBus=p;exports._sfc_main=y;exports.useBodyScroll=i;
@@ -1,19 +1,19 @@
1
- import { defineComponent as a, computed as d, createBlock as c, createCommentVNode as i, openBlock as u, Teleport as p, createElementVNode as f, normalizeStyle as y, renderSlot as m } from "vue";
1
+ import { defineComponent as s, computed as c, createBlock as d, createCommentVNode as i, openBlock as u, Teleport as f, createElementVNode as p, normalizeStyle as y, renderSlot as m } from "vue";
2
2
  let n = null, r = 0;
3
3
  function S() {
4
- const o = window.scrollY;
5
- return document.body.style.position = "fixed", document.body.style.top = `-${o}px`, () => {
6
- document.body.style.position = "", document.body.style.top = "", window.scrollTo(0, o);
4
+ const e = window.scrollY;
5
+ return document.body.style.position = "fixed", document.body.style.top = `-${e}px`, () => {
6
+ document.body.style.position = "", document.body.style.top = "", window.scrollTo(0, e);
7
7
  };
8
8
  }
9
9
  const h = () => {
10
10
  r++, r === 1 && !n && (n = S());
11
11
  }, b = () => {
12
12
  r > 0 && r--, r === 0 && n && (n(), n = null);
13
- }, k = () => ({
13
+ }, x = () => ({
14
14
  unlockScroll: b,
15
15
  lockScroll: h
16
- }), v = ["data-layer"], B = /* @__PURE__ */ a({
16
+ }), v = ["data-layer"], k = /* @__PURE__ */ s({
17
17
  __name: "Portal",
18
18
  props: {
19
19
  overlayType: { default: "modal" },
@@ -23,16 +23,16 @@ const h = () => {
23
23
  show: { type: Boolean, default: !0 },
24
24
  parentId: {}
25
25
  },
26
- setup(o) {
27
- const t = o, l = d(() => {
26
+ setup(e) {
27
+ const t = e, l = c(() => {
28
28
  if (t.zIndex) return t.zIndex;
29
29
  });
30
- return (e, s) => e.show ? (u(), c(p, {
30
+ return (o, a) => e.show ? (u(), d(f, {
31
31
  key: 0,
32
32
  to: e.target,
33
33
  disabled: !e.teleport
34
34
  }, [
35
- f("div", {
35
+ p("div", {
36
36
  style: y({
37
37
  zIndex: l.value,
38
38
  position: "relative",
@@ -40,36 +40,36 @@ const h = () => {
40
40
  }),
41
41
  "data-layer": e.overlayType
42
42
  }, [
43
- m(e.$slots, "default")
43
+ m(o.$slots, "default")
44
44
  ], 12, v)
45
45
  ], 8, ["to", "disabled"])) : i("", !0);
46
46
  }
47
47
  });
48
- function I() {
49
- const o = /* @__PURE__ */ new Map();
48
+ function B() {
49
+ const e = /* @__PURE__ */ new Map();
50
50
  return {
51
51
  on(t, l) {
52
- const e = o.get(t) || [];
53
- e.push(l), o.set(t, e);
52
+ const o = e.get(t) || [];
53
+ o.push(l), e.set(t, o);
54
54
  },
55
55
  off(t, l) {
56
- const e = o.get(t);
57
- e && o.set(
56
+ const o = e.get(t);
57
+ o && e.set(
58
58
  t,
59
- e.filter((s) => s !== l)
59
+ o.filter((a) => a !== l)
60
60
  );
61
61
  },
62
62
  emit(t, l) {
63
- const e = o.get(t);
64
- e && e.forEach((s) => s(l));
63
+ const o = e.get(t);
64
+ o && o.forEach((a) => a(l));
65
65
  },
66
66
  clear() {
67
- o.clear();
67
+ e.clear();
68
68
  }
69
69
  };
70
70
  }
71
71
  export {
72
- I as E,
73
- B as _,
74
- k as u
72
+ B as E,
73
+ k as _,
74
+ x as u
75
75
  };