@opengis/widgets 0.0.22 → 0.0.24
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/index.js +5345 -1233
- package/dist/index.umd.cjs +47 -27
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/getSlotComponent.d.ts +4 -0
- package/dist/utils/getSlotComponent.d.ts.map +1 -0
- package/dist/utils/makeDynamic.d.ts +12 -0
- package/dist/utils/makeDynamic.d.ts.map +1 -0
- package/dist/widgets/card/Card.vue.d.ts +9 -3
- package/dist/widgets/card/Card.vue.d.ts.map +1 -1
- package/dist/widgets/card/CardItem.vue.d.ts +9 -0
- package/dist/widgets/card/CardItem.vue.d.ts.map +1 -1
- package/dist/widgets/table/TableWidget.vue.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,131 +1,151 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(U,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@opengis/core")):typeof define=="function"&&define.amd?define(["exports","vue","@opengis/core"],n):(U=typeof globalThis<"u"?globalThis:U||self,n(U.WidgetLib={},U.Vue,U.OpenGISCore))})(this,function(U,n,Fs){"use strict";function Ps(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const js=Ps(n);/**
|
|
2
2
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const
|
|
6
|
+
*/const un=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zs=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,s,o)=>o?o.toUpperCase():s.toLowerCase()),Hs=e=>{const t=zs(e);return t.charAt(0).toUpperCase()+t.slice(1)},Us=(...e)=>e.filter((t,s,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===s).join(" ").trim();/**
|
|
7
7
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/var
|
|
11
|
+
*/var Je={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
12
12
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
13
13
|
*
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const
|
|
16
|
+
*/const qs=({size:e,strokeWidth:t=2,absoluteStrokeWidth:s,color:o,iconNode:i,name:l,class:r,...c},{slots:a})=>n.h("svg",{...Je,width:e||Je.width,height:e||Je.height,stroke:o||Je.stroke,"stroke-width":s?Number(t)*24/Number(e):t,class:Us("lucide",...l?[`lucide-${un(Hs(l))}-icon`,`lucide-${un(l)}`]:["lucide-icon"]),...c},[...i.map(p=>n.h(...p)),...a.default?[a.default()]:[]]);/**
|
|
17
17
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
18
18
|
*
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const
|
|
21
|
+
*/const j=(e,t)=>(s,{slots:o})=>n.h(qs,{...s,iconNode:t,name:e},o);/**
|
|
22
22
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
23
23
|
*
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const
|
|
26
|
+
*/const Ws=j("archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/**
|
|
27
27
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const
|
|
31
|
+
*/const Ks=j("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
32
32
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const
|
|
36
|
+
*/const Gs=j("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
37
37
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the ISC license.
|
|
40
40
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const
|
|
41
|
+
*/const gn=j("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
|
|
42
42
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const
|
|
46
|
+
*/const Js=j("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
47
47
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const
|
|
51
|
+
*/const we=j("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
52
52
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the ISC license.
|
|
55
55
|
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/const
|
|
56
|
+
*/const Ys=j("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
57
57
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
58
58
|
*
|
|
59
59
|
* This source code is licensed under the ISC license.
|
|
60
60
|
* See the LICENSE file in the root directory of this source tree.
|
|
61
|
-
*/const
|
|
61
|
+
*/const Zs=j("grid-3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
62
62
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/const
|
|
66
|
+
*/const Xs=j("heart",[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]]);/**
|
|
67
67
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
68
68
|
*
|
|
69
69
|
* This source code is licensed under the ISC license.
|
|
70
70
|
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const
|
|
71
|
+
*/const Qs=j("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
72
72
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
73
73
|
*
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const
|
|
76
|
+
*/const yn=j("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
77
77
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const
|
|
81
|
+
*/const Vs=j("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
|
|
82
82
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
83
83
|
*
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const
|
|
86
|
+
*/const vn=j("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
87
87
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
88
88
|
*
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/const
|
|
91
|
+
*/const eo=j("reply",[["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}],["path",{d:"m9 17-5-5 5-5",key:"nvlc11"}]]);/**
|
|
92
92
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
93
93
|
*
|
|
94
94
|
* This source code is licensed under the ISC license.
|
|
95
95
|
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const
|
|
96
|
+
*/const bn=j("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
|
|
97
97
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const
|
|
101
|
+
*/const to=j("sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/**
|
|
102
102
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
103
103
|
*
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const
|
|
106
|
+
*/const no=j("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
|
|
107
107
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
108
108
|
*
|
|
109
109
|
* This source code is licensed under the ISC license.
|
|
110
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const
|
|
111
|
+
*/const Nt=j("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
|
|
112
112
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const
|
|
116
|
+
*/const so=j("user-check",[["path",{d:"m16 11 2 2 4-4",key:"9rsbq5"}],["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);/**
|
|
117
117
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
118
118
|
*
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const
|
|
121
|
+
*/const _t=j("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
122
122
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const
|
|
126
|
+
*/const oo=j("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
127
127
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
128
128
|
*
|
|
129
129
|
* This source code is licensed under the ISC license.
|
|
130
130
|
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const Z=V("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Le={class:"border-t pt-3 mt-4"},De={class:"flex gap-2"},Me={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Se={class:"flex-1 space-y-2"},Te={class:"flex justify-between items-center"},ze={class:"flex gap-2"},Fe=["disabled"],ne=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(r,{emit:l}){const t=e.useModel(r,"isReply"),o=e.ref(""),n=l,g=()=>{o.value.trim()&&(n("sendComment",o.value),o.value="")},a=h=>{(h.ctrlKey||h.metaKey)&&h.key==="Enter"&&(h.preventDefault(),g())};return(h,m)=>(e.openBlock(),e.createElementBlock("div",Le,[e.createElementVNode("div",De,[e.createElementVNode("span",Me,[e.createVNode(e.unref(q),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Se,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":m[0]||(m[0]=x=>o.value=x),onKeydown:a,placeholder:"Add a comment...",class:"w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"},null,544),[[e.vModelText,o.value]]),e.createElementVNode("div",Te,[m[4]||(m[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",ze,[t.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:m[1]||(m[1]=x=>t.value=!1)},[e.createVNode(e.unref(Z),{class:"h-3 w-3"}),m[2]||(m[2]=e.createTextVNode(" Cancel ",-1))])):e.createCommentVNode("",!0),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!o.value.trim(),onClick:g},[e.createVNode(e.unref(oe),{class:"h-3 w-3 mr-1"}),m[3]||(m[3]=e.createTextVNode(" Send ",-1))],8,Fe)])])])])]))}}),je={class:"z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto"},Ie=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(r,{emit:l}){const t=l,o=e.useModel(r,"showMoreOptions"),n=e.ref(),g=e.ref(!0),a=async x=>{o.value&&n.value&&!n.value.contains(x.target)&&!g.value&&(o.value=!1),g.value=!1},h=()=>{o.value=!1,t("edit")},m=()=>{o.value=!1,t("delete")};return e.onMounted(()=>{document.addEventListener("click",a)}),e.onUnmounted(()=>{document.removeEventListener("click",a)}),(x,k)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:n},[e.createElementVNode("div",je,[e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",onClick:h},[e.createVNode(e.unref(Ne),{class:"h-3 w-3 mr-2"}),k[0]||(k[0]=e.createTextVNode(" Edit ",-1))]),e.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",onClick:m},[e.createVNode(e.unref(G),{class:"h-3 w-3 mr-2"}),k[1]||(k[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),Ae={class:"space-y-2"},He={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Oe={class:"flex-1 min-w-0 space-y-1 relative"},Pe={class:"flex items-center gap-2"},We={class:"font-medium text-xs"},Re={class:"text-xs text-gray-500"},Ue={key:0,class:"text-xs text-gray-700 leading-relaxed"},Ge={class:"flex justify-between text-xs"},qe={class:"flex items-center gap-2"},Ze={key:0,class:"flex gap-2"},Ke=["disabled"],Je={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},Xe=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(r,{emit:l}){const t=l,o=r,n=e.ref(o.comment.text),g=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),a=e.ref("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"),h=e.ref(!1),m=e.ref(!1),x=e.ref(!1),k=e.ref(!1),d=s=>{const c=new Date,i=Math.floor((c.getTime()-s.getTime())/(1e3*60*60));return i<1?`${Math.floor((c.getTime()-s.getTime())/6e4)}m`:i<24?`${i}h`:`${Math.floor(i/24)}d`},y=()=>{k.value=!k.value,k.value?t("like",o.comment.id,"add"):t("like",o.comment.id,"delete")},$=()=>{t("edit",o.comment.id,n.value),x.value=!1},u=(s,c)=>{t("like",s,c)},w=(s,c)=>{t("edit",s,c)};return(s,c)=>{const i=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",Ae,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",x.value?"bg-gray-50":""])},[e.createElementVNode("span",He,[e.createVNode(e.unref(q),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",Oe,[e.createElementVNode("div",Pe,[e.createElementVNode("span",We,e.toDisplayString(s.comment?.author),1),e.createElementVNode("span",Re,e.toDisplayString(d(s.comment?.createdAt)),1)]),x.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":c[0]||(c[0]=p=>n.value=p),class:e.normalizeClass(x.value?a.value:g.value)},null,2)),[[e.vModelText,n.value]]):(e.openBlock(),e.createElementBlock("p",Ue,e.toDisplayString(s.comment?.text),1)),e.createElementVNode("div",Ge,[e.createElementVNode("div",qe,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",k.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:c[1]||(c[1]=p=>y())},[e.createVNode(e.unref(_e),{class:e.normalizeClass(["h-3 w-3",k.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(s.comment?.likes),1)],2),s.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:c[2]||(c[2]=p=>m.value=!0)},[e.createVNode(e.unref(Be),{class:"h-3 w-3"})])),e.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:c[3]||(c[3]=p=>h.value=!0)},[e.createVNode(e.unref(be),{class:"h-3 w-3"})])]),x.value?(e.openBlock(),e.createElementBlock("div",Ze,[e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:c[4]||(c[4]=p=>x.value=!1)},[e.createVNode(e.unref(Z),{class:"h-3 w-3"}),c[11]||(c[11]=e.createTextVNode(" Cancel ",-1))]),e.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!n.value.trim(),onClick:c[5]||(c[5]=p=>$())},[e.createVNode(e.unref(oe),{class:"h-3 w-3 mr-1"}),c[12]||(c[12]=e.createTextVNode(" Send ",-1))],8,Ke)])):e.createCommentVNode("",!0)])]),h.value?(e.openBlock(),e.createBlock(Ie,{key:0,showMoreOptions:h.value,"onUpdate:showMoreOptions":c[6]||(c[6]=p=>h.value=p),onEdit:c[7]||(c[7]=p=>x.value=!0),onDelete:c[8]||(c[8]=p=>s.$emit("delete",s.comment?.id)),comment:s.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),s.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Je,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.comment?.replies,p=>(e.openBlock(),e.createBlock(i,{key:p.id,comment:p,isInside:!0,onDelete:_=>s.$emit("delete",p.id),onLike:u,onEdit:w},null,8,["comment","onDelete"]))),128)),m.value&&!s.isInside?(e.openBlock(),e.createBlock(ne,{key:0,onSendComment:c[9]||(c[9]=p=>s.$emit("reply",s.comment?.id,p)),isReply:m.value,"onUpdate:isReply":c[10]||(c[10]=p=>m.value=p)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),Qe=["id"],Ye={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},H=e.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(r,{emit:l}){const t=r,o=l,n=e.ref(t.comments??[]);async function g(){if(!t.id)return;const d=await fetch(`/api/widget/comment/${t.id}`).then(y=>y.json());n.value=d.rows.map(y=>({id:y.communication_id,author:y.username,text:y.body,createdAt:new Date(y.cdate)}))}n.value.length===0&&g();const a=async d=>{t.onAddComment?t.onAddComment(d):t.id&&(await fetch(`/api/widget/comment/${t.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:d})}),await g()),o("add",d)},h=(d,y)=>{t?.onLike?.(d,y),o("like",d,y)},m=(d,y)=>{t.onReply?.(d,y),o("reply",d,y)},x=async(d,y)=>{t.onEdit?t.onEdit(d,y):t.id&&(await fetch(`/api/widget/comment/${t.id}/${d}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:y})}),await g()),o("edit",d,y)},k=async d=>{t.onDelete?t.onDelete(d):t.id&&(await fetch(`/api/widget/comment/${t.id}/${d}`,{method:"DELETE"}),await g()),o("delete",d)};return(d,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",d.className]),id:d.id,style:e.normalizeStyle(d.style)},[d.title?(e.openBlock(),e.createElementBlock("h3",Ye,e.toDisplayString(d.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([d.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:d.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,$=>(e.openBlock(),e.createBlock(Xe,{key:$.id,comment:$,onReply:m,onLike:h,onDelete:y[0]||(y[0]=u=>k(u)),onEdit:x},null,8,["comment"]))),128))],6),e.createVNode(ne,{onSendComment:y[1]||(y[1]=$=>a($))})],14,Qe))}}),le=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:S}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:Ve}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:$e}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:we}]]),ve={class:"mx-auto font-sans"},et={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},tt={class:"relative"},ot={class:"space-y-3"},nt={class:"flex-1 min-w-0 pb-2"},lt={class:"flex items-center gap-1.5 mb-1 mt-0.5"},st={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},at={class:"font-medium text-xs"},rt={class:"text-xs text-gray-500"},it={class:"space-y-1"},ct={class:"text-xs text-gray-700"},dt={class:"capitalize mr-1"},mt={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},pt={key:0,class:"flex items-center gap-1 text-xs"},gt={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},ft={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},O=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(r){const l=r,t=e.ref(Array.isArray(l.data)?l.data:[]);t.value.length===0&&l.id&&o();async function o(){const n=await fetch(`/api/widget/history/${l.id}`);if(!n.ok)return{data:[]};const g=await n.json();g.rows.forEach(a=>{a.timestamp=new Date(a.cdate),a.id=a.entity_id,a.entityType=a.entity_type,a.entityId=a.entity_id,a.action=a.change_type,a.userId=a.change_user_id,a.userName=a.username,a.timestamp=new Date(a.cdate),a.description=a.username,a.status=a.username}),t.value=g.rows}return(n,g)=>(e.openBlock(),e.createElementBlock("div",ve,[n.title?(e.openBlock(),e.createElementBlock("h3",et,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(n.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:n.maxHeight+"px"})},[e.createElementVNode("div",tt,[g[0]||(g[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,a=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:a?.id},[e.createElementVNode("div",{class:e.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${e.unref(le).get(a?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(le).get(a?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",nt,[e.createElementVNode("div",lt,[e.createElementVNode("span",st,[e.createVNode(e.unref(q),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",at,e.toDisplayString(a?.userName),1),e.createElementVNode("span",rt,e.toDisplayString(a?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",it,[e.createElementVNode("div",ct,[e.createElementVNode("span",dt,e.toDisplayString(a?.action),1),a?.entityId?(e.openBlock(),e.createElementBlock("span",mt,e.toDisplayString(a?.entityId),1)):e.createCommentVNode("",!0)]),a?.changes?.[a?.entityId]?(e.openBlock(),e.createElementBlock("div",pt,[a?.changes?.[a?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",gt,e.toDisplayString(a?.changes?.[a?.entityId]?.old),1)):e.createCommentVNode("",!0),a?.changes?.[a?.entityId]?.old&&a?.changes?.[a?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(ye),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),a?.changes?.[a?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",ft,e.toDisplayString(a?.changes?.[a?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),ht={key:0,class:"text-xl font-semibold"},yt={class:"flex gap-1"},kt={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},bt=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(r){const l=e.useModel(r,"modelValue"),t={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(o,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",o.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[o.title?(e.openBlock(),e.createElementBlock("h3",ht,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",yt,[e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",l.value==="list"?t.active:t.inactive]),onClick:n[0]||(n[0]=g=>l.value="list")},[e.createVNode(e.unref(Ee),{class:"h-4 w-4"})],2),e.createElementVNode("button",{class:e.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",l.value==="grid"?t.active:t.inactive]),onClick:n[1]||(n[1]=g=>l.value="grid")},[e.createVNode(e.unref(ue),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:n[2]||(n[2]=g=>o.$emit("onAddFile",g))},null,32),e.createElementVNode("div",kt,[e.createVNode(e.unref(te),{class:"h-4 w-4"}),n[3]||(n[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),K={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:S,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:xe,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:Ce,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:S,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:he,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:ee,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:ee,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:S,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:S,label:"PPT"}};function se(r,l="en"){const t={month:"short",day:"numeric"};return new Intl.DateTimeFormat(l,t).format(r)}function ae(r){if(r===0)return"0 B";const l=1024,t=["B","KB","MB","GB","TB"],o=Math.floor(Math.log(r)/Math.log(l));return`${parseFloat((r/Math.pow(l,o)).toFixed(1))} ${t[o]}`}const xt={class:"space-y-0.5"},ut=["onClick"],_t=["onClick"],wt={class:"flex items-center gap-2"},Et={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},Bt={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},Vt={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},Nt={class:"flex items-center gap-1"},$t=["onClick"],Ct=["onClick"],Lt=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(r){return(l,t)=>(e.openBlock(),e.createElementBlock("div",xt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,o=>(e.openBlock(),e.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:o.id,onClick:e.withModifiers(n=>l.$emit("openLightbox",o),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(K)[o?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(K)[o?.ext]?.icon||e.unref(K).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:n=>l.$emit("openLightbox",o)},[e.createElementVNode("div",wt,[e.createElementVNode("span",Et,e.toDisplayString(o?.uploaded_name||o?.name),1)])],8,_t),e.createElementVNode("div",Bt,e.toDisplayString(e.unref(ae)(o.size)),1),e.createElementVNode("div",Vt,e.toDisplayString(e.unref(se)(o.createdAt)),1),e.createElementVNode("div",Nt,[e.createElementVNode("button",{onClick:e.withModifiers(n=>l.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"},[e.createVNode(e.unref(v),{class:"h-3 w-3"})],8,$t),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",onClick:e.withModifiers(n=>l.$emit("delete",n,o?.file_id),["stop"])},[e.createVNode(e.unref(G),{class:"h-3 w-3"})],8,Ct)])],8,ut))),128))]))}}),Dt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},Mt=["onClick"],St={class:"space-y-2"},Tt={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},zt=["src"],Ft={class:"space-y-1"},jt=["title"],It={class:"text-xs text-gray-500 text-left"},At={class:"absolute top-2 right-1 flex items-center gap-1"},Ht=["onClick"],Ot=["onClick"],Pt=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(r){return(l,t)=>(e.openBlock(),e.createElementBlock("div",Dt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.files,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,onClick:e.withModifiers(n=>l.$emit("openLightbox",o),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[e.createElementVNode("div",St,[e.createElementVNode("div",Tt,[o.ext==="png"||o.ext==="jpg"||o.ext==="jpeg"||o.ext==="gif"||o.ext==="svg"||o.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${o?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,zt)):(e.openBlock(),e.createBlock(e.unref(S),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",Ft,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:o.uploaded_name||o.name},e.toDisplayString(o.uploaded_name||o.name),9,jt),e.createElementVNode("p",It,e.toDisplayString(e.unref(se)(o.createdAt))+", "+e.toDisplayString(e.unref(ae)(o.size)),1)])]),e.createElementVNode("div",At,[e.createElementVNode("button",{onClick:e.withModifiers(n=>l.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"},[e.createVNode(e.unref(v),{class:"h-3 w-3"})],8,Ht),e.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",onClick:e.withModifiers(n=>l.$emit("delete",n,o?.file_id),["stop"])},[e.createVNode(e.unref(G),{class:"h-3 w-3"})],8,Ot)])],8,Mt))),128))]))}}),Wt={class:"mx-auto font-sans"},Rt={key:1},P=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(r,{emit:l}){const t=r,o=e.ref(!1),n=e.ref(null),g=e.ref(!1),a=e.ref(0),h=e.ref(t.files??[]),m=l;h.value.length===0&&c();const x=(_,f)=>{n.value=f,o.value=!0},k=()=>{n.value&&(u(n.value),n.value=null,o.value=!1)},d=e.computed(()=>Array.isArray(h.value)?h.value.map(_=>_?.file_path):[]),y=_=>{const f=d.value.findIndex(B=>B===_.file_path);f!==-1&&(g.value=!0,a.value=f)},$=_=>{t.onAddFile?t.onAddFile(_):i(_),m("add",_)},u=_=>{t.onDelete?t.onDelete(_):p(_),m("delete",_)},w=_=>{const f=document.createElement("a");f.setAttribute("download",_?.uploaded_name||_?.name),f.href=_?.file_path||_?.path,f.click()},s=e.ref("list");async function c(){if(!t.id)return;const _=await fetch(`/api/widget/file/${t.id}`).then(f=>f.json());_.rows.forEach(f=>{f.timestamp=new Date(f.cdate),f.id=f.entity_id,f.entityType=f.entity_type,f.entityId=f.entity_id,f.entityType=f.entity_type,f.action=f.change_type,f.userId=f.change_user_id,f.userName=f.username,f.timestamp=new Date(f.cdate),f.description=f.username,f.status=f.username}),h.value=_.rows}const i=async _=>{if(!(!_.target||!_.target.files||_.target.files.length===0))try{await Promise.all(Array.from(_.target.files).map(async f=>{const B=new FormData;B.append("file",f);const b=`/api/widget/file/${t.id}`,E=await fetch(b,{method:"POST",body:B});if(!E.ok)throw new Error(`HTTP error! status: ${E.status}`);return f})),await c()}catch(f){console.error("Помилка при завантаженні файлів:",f)}},p=async _=>{try{await fetch(`/api/widget/file/${t.id}/${_}`,{method:"DELETE"}),await c()}catch(f){console.error(f)}};return(_,f)=>{const B=e.resolveComponent("MessageBox"),b=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Wt,[e.createVNode(bt,{modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=E=>s.value=E),title:t.title,onOnAddFile:f[1]||(f[1]=E=>$(E))},null,8,["modelValue","title"]),h.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(_.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:_.maxHeight+"px"})},[s.value==="list"?(e.openBlock(),e.createBlock(Lt,{key:0,onDelete:x,onDownload:w,onOpenLightbox:f[2]||(f[2]=E=>y(E)),files:h.value},null,8,["files"])):e.createCommentVNode("",!0),s.value==="grid"?(e.openBlock(),e.createBlock(Pt,{key:1,onDelete:x,onDownload:w,onOpenLightbox:f[3]||(f[3]=E=>y(E)),files:h.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",Rt,[...f[6]||(f[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])]))]),e.createVNode(B,{modelValue:o.value,"onUpdate:modelValue":f[4]||(f[4]=E=>o.value=E),onConfirm:k,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(b,{modelValue:g.value,"onUpdate:modelValue":f[5]||(f[5]=E=>g.value=E),images:d.value,"start-index":a.value},null,8,["modelValue","images","start-index"])],64)}}}),Ut={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},Gt=["onClick"],qt={key:0,rel:"noreferrer",class:"relative block h-full w-full"},Zt=["src"],Kt={key:0,class:"thumb-cover"},Jt=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(r,{emit:l}){const t=l,o=e.ref(!1),n=e.ref(0),g=r,a=e.computed(()=>Array.isArray(g.items)?g.items.map(m=>m?.file_path):[]),h=m=>{const x=a.value.findIndex(k=>k===m.file_path);x!==-1&&(o.value=!0,n.value=x)};return(m,x)=>{const k=e.resolveComponent("Lightbox");return m.items?.length>=1?(e.openBlock(),e.createElementBlock("div",Ut,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.items,(d,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+y,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:y,onClick:e.withModifiers($=>h(d),["stop"])},[y<5?(e.openBlock(),e.createElementBlock("div",qt,[e.createElementVNode("img",{src:`/file/resize?filepath=${d?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",y===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,Zt),y===4&&m.items?.length>5?(e.openBlock(),e.createElementBlock("div",Kt," +"+e.toDisplayString(m.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Gt))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-m.items.length),d=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+d,class:e.normalizeClass(["h-full w-full image"+(m.items.length+d-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(k,{modelValue:o.value,"onUpdate:modelValue":x[0]||(x[0]=d=>o.value=d),images:a.value,"start-index":n.value,delete:"true",download:"true",onDelete:x[1]||(x[1]=d=>t("delete",d))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),Xt={key:0,class:"text-xl font-semibold"},Qt={class:"flex gap-1"},Yt={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},vt=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(r){return(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",l.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[l.title?(e.openBlock(),e.createElementBlock("h3",Xt,e.toDisplayString(l.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Qt,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:t[0]||(t[0]=o=>l.$emit("onAddImage",o))},null,32),e.createElementVNode("div",Yt,[e.createVNode(e.unref(te),{class:"h-4 w-4"}),t[1]||(t[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),eo={class:"w-full mx-auto font-sans",ref:"containerRef"},to={key:1},W=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(r,{emit:l}){const t=r,o=e.ref(t.items??[]),n=l;o.value.length===0&&m();const g=k=>{t.onAddImage?t.onAddImage(k):h(k),n("add",k)},a=k=>{const d=o.value.find(y=>y.file_path===k)?.file_id;d&&(t.onDelete?t.onDelete(d):x(d))},h=async k=>{if(!(!k.target||!k.target.files||k.target.files.length===0))try{await Promise.all(Array.from(k.target.files).map(async d=>{const y=new FormData;y.append("file",d);const $=`/api/widget/file/${t.id}`,u=await fetch($,{method:"POST",body:y});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return d})),await m()}catch(d){console.error("Помилка при завантаженні файлів:",d)}};async function m(){if(!t.id)return;const k=await fetch(`/api/widget/file/${t.id}`).then(d=>d.json());o.value=k.rows}const x=async k=>{try{await fetch(`/api/widget/file/${t.id}/${k}`,{method:"DELETE"}),await m()}catch(d){console.error(d)}};return(k,d)=>(e.openBlock(),e.createElementBlock("div",eo,[e.createVNode(vt,{title:k.title,onOnAddImage:d[0]||(d[0]=y=>g(y))},null,8,["title"]),o.value.length>0?(e.openBlock(),e.createBlock(Jt,{key:0,items:o.value,onDelete:d[1]||(d[1]=y=>a(y))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",to,[...d[2]||(d[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])]))],512))}}),oo={class:"text-value"},no={class:"text-sm text-gray-900"},lo=e.defineComponent({__name:"TextValue",props:{item:{}},setup(r){const l=r,t=e.computed(()=>{const o=l.item.value;return typeof o=="boolean"?o?"Так":"Ні":o==null?"—":String(o)});return(o,n)=>(e.openBlock(),e.createElementBlock("div",oo,[e.createElementVNode("span",no,e.toDisplayString(t.value),1)]))}}),D=(r,l)=>{const t=r.__vccOpts||r;for(const[o,n]of l)t[o]=n;return t},so=D(lo,[["__scopeId","data-v-c14550b7"]]),ao={class:"link-value"},ro=["href"],io=D(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(r){const l=r,t=e.computed(()=>{const o=String(l.item.value);try{const n=new URL(o);return n.hostname+n.pathname}catch{return o}});return(o,n)=>(e.openBlock(),e.createElementBlock("div",ao,[e.createElementVNode("a",{href:String(o.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(t.value)+" ",1),n[0]||(n[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,ro)]))}}),[["__scopeId","data-v-e6eb07a6"]]),co={class:"date-value"},mo={class:"text-sm text-gray-900"},po=D(e.defineComponent({__name:"DateValue",props:{item:{}},setup(r){const l=r,t=e.computed(()=>{const o=l.item.value;if(o instanceof Date)return o.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof o=="string"){const n=new Date(o);if(!isNaN(n.getTime()))return n.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(o)});return(o,n)=>(e.openBlock(),e.createElementBlock("div",co,[e.createElementVNode("span",mo,e.toDisplayString(t.value),1)]))}}),[["__scopeId","data-v-b9600618"]]),go={class:"status-value"},fo={key:0,class:"mr-1"},ho=D(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(r){const l=r,t=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),o=e.computed(()=>{switch(String(l.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(n,g)=>(e.openBlock(),e.createElementBlock("div",go,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",t.value])},[o.value?(e.openBlock(),e.createElementBlock("span",fo,[e.createElementVNode("i",{class:e.normalizeClass(o.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(n.item.value)),1)],2)]))}}),[["__scopeId","data-v-c72e0b01"]]),yo={class:"custom-value"},ko={class:"text-sm text-gray-900"},bo=D(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(r){return(l,t)=>(e.openBlock(),e.createElementBlock("div",yo,[e.renderSlot(l.$slots,"default",{item:l.item,value:l.item.value},()=>[e.createElementVNode("span",ko,e.toDisplayString(String(l.item.value)),1)],!0)]))}}),[["__scopeId","data-v-11a73810"]]),xo=["id"],uo={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},_o={key:1,class:"overflow-x-auto"},wo={class:"min-w-full divide-y divide-gray-200"},Eo={class:"bg-white divide-y divide-gray-200"},Bo={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Vo={class:"flex items-center gap-2"},No=["title"],$o={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},Co={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},Lo={class:"flex items-start gap-3"},Do={key:0,class:"flex-shrink-0"},Mo={class:"flex-1 min-w-0"},So={class:"flex items-center gap-2 mb-2"},To={class:"text-sm font-medium text-gray-900"},zo=["title"],Fo={key:3,class:"overflow-x-auto"},jo={class:"min-w-full divide-y divide-gray-200"},Io={class:"bg-white divide-y divide-gray-200"},Ao={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Ho={class:"flex items-center gap-2"},Oo=["title"],Po={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},J=D(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(r){const l=t=>{switch(t.type){case"link":return io;case"date":return po;case"status":return ho;case"custom":return bo;default:return so}};return(t,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",t.className]),id:t.id,style:e.normalizeStyle(t.style)},[t.title?(e.openBlock(),e.createElementBlock("h3",uo,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.view==="table"?(e.openBlock(),e.createElementBlock("div",_o,[e.createElementVNode("table",wo,[e.createElementVNode("tbody",Eo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,n=>(e.openBlock(),e.createElementBlock("tr",{key:n.id||n.label},[e.createElementVNode("td",Bo,[e.createElementVNode("div",Vo,[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([n.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label)+" ",1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:n.tooltip},[...o[0]||(o[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,No)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",$o,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])]))),128))])])])):t.view==="grid"?(e.openBlock(),e.createElementBlock("div",Co,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,n=>(e.openBlock(),e.createElementBlock("div",{key:n.id||n.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",Lo,[n.icon?(e.openBlock(),e.createElementBlock("div",Do,[e.createElementVNode("i",{class:e.normalizeClass([n.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",Mo,[e.createElementVNode("div",So,[e.createElementVNode("h4",To,e.toDisplayString(n.label),1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:n.tooltip},[...o[1]||(o[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,zo)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",Fo,[e.createElementVNode("table",jo,[e.createElementVNode("tbody",Io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,n=>(e.openBlock(),e.createElementBlock("tr",{key:n.id||n.label},[e.createElementVNode("td",Ao,[e.createElementVNode("div",Ho,[n.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([n.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(n.label)+" ",1),n.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:n.tooltip},[...o[2]||(o[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)])],8,Oo)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",Po,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(n)),{item:n},null,8,["item"]))])]))),128))])])]))],14,xo))}}),[["__scopeId","data-v-36d43e50"]]),Wo={draw:{toolbar:{actions:{title:"Скасувати малювання",text:"Скасувати"},finish:{title:"Завершити малювання",text:"Завершити"},undo:{title:"Видалити останню точку",text:"Видалити останню"},buttons:{polyline:"Намалювати лінію",polygon:"Намалювати полігон",rectangle:"Намалювати прямокутник",circle:"Намалювати коло",marker:"Додати точку",circlemarker:"Додати маркер-коло"}},handlers:{circle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати коло",end:"Відпустіть кнопку миші, щоб завершити"},radius:"Радіус"},circlemarker:{tooltip:{start:"Клацніть на карту, щоб додати маркер-коло"}},marker:{tooltip:{start:"Клацніть на карту, щоб додати точку"}},polygon:{tooltip:{start:"Клацніть, щоб почати малювати полігон",cont:"Клацайте, щоб продовжити малювати полігон",end:"Клацніть першу точку, щоб завершити полігон"}},polyline:{error:"<strong>Помилка:</strong> лінія не може перетинатися сама з собою",tooltip:{start:"Клацніть, щоб почати малювати лінію",cont:"Клацайте, щоб продовжити малювати лінію",end:"Клацніть останню точку, щоб завершити лінію"}},rectangle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати прямокутник",end:"Відпустіть кнопку миші, щоб завершити"}},simpleshape:{tooltip:{end:"Відпустіть кнопку миші, щоб завершити"}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни",text:"Зберегти"},cancel:{title:"Скасувати редагування",text:"Скасувати"},clearAll:{title:"Очистити всі шари",text:"Очистити все"}},buttons:{edit:"Редагувати шари",editDisabled:"Немає шарів для редагування",remove:"Видалити шари",removeDisabled:"Немає шарів для видалення"}},handlers:{edit:{tooltip:{text:"Перетягніть маркери, щоб редагувати шари",subtext:"Натисніть 'Скасувати', щоб повернутися"}},remove:{tooltip:{text:"Клацніть на шари, щоб видалити їх"}}}}};function Ro(r){return r?r.type==="FeatureCollection"||r.type==="Feature"?r:r.geom?{type:"Feature",geometry:{type:r.geom.type,coordinates:r.geom.coordinates},properties:{}}:r.type&&r.coordinates?{type:"Feature",geometry:r,properties:{}}:null:null}const Uo={key:1,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},Go={class:"flex items-center justify-between p-2 border-b"},qo={class:"p-2 border-b"},Zo={class:"flex items-center"},Ko=["value"],Jo={class:"ml-2"},Xo={class:"p-2"},Qo={class:"flex items-center"},Yo={class:"flex items-center"},vo=["onUpdate:modelValue","onChange"],en={class:"ml-2"},R=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},tms:{}},setup(r){const l=e.getCurrentInstance(),t=r,o=e.ref(null);let n,g;const a=f(),h=e.ref(Object.keys(a)[0]);let m;const x=e.ref(!0),k=e.ref(!1),d=e.ref(!1),y=e.ref($());function $(){return t.tms?(Array.isArray(t.tms)?t.tms:t.tms?.split(",")).map((b,E)=>({url:t.pattern?t.pattern.replace("{{id}}",b):b,name:"Шар "+E,visible:!0,i:E})):[]}function u(){return new Promise((B,b)=>{if(window.L&&window.L.Draw)return B(0);const E=M=>{if(Array.from(document.styleSheets).some(F=>F?.href?.includes(M)))return;const T=document.createElement("link");T.rel="stylesheet",T.href=M,document.head.appendChild(T)},C=M=>new Promise((Q,T)=>{const F=Array.from(document.scripts).find(I=>I.src===M);if(F){F.addEventListener("load",()=>Q()),F.addEventListener("error",I=>T(I));return}const j=document.createElement("script");j.src=M,j.async=!0,j.onload=()=>Q(),j.onerror=I=>T(I),document.body.appendChild(j)});E("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),E("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),C("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(()=>C("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(()=>B(0)).catch(b)})}let w=!1;e.onMounted(async()=>{await u(),L.drawLocal=Wo;const B=l?.appContext.config.globalProperties.$settings?.center||[50,30];n=L.map(o.value,{zoomControl:!1}).setView(B,10),n.on("mousemove",E=>{w||(n.invalidateSize(),w=!0)}),L.control.zoom({position:"bottomright"}).addTo(n),m=L.tileLayer(a[h.value].url,{maxZoom:19}).addTo(n),g=new L.FeatureGroup().addTo(n),y.value.length&&_(0);const b=Ro(t.geom);if(b){const E=[];L.geoJSON(b).eachLayer(C=>E.push(C)),E.length&&g.addLayer(E[0]),g.toGeoJSON(),s()}});function s(B=30){const b=g.getLayers();if(!b.length)return;const C=L.featureGroup(b).getBounds();C&&C.isValid()&&n.fitBounds(C,{padding:[B,B],maxZoom:16})}function c(B){m&&m.removeFrom(n);const b=a[B];m=L.tileLayer(b.url,b.options||{}).addTo(n),m.bringToBack(),h.value=B}function i(){c(h.value)}function p(){g&&(x.value?g.addTo(n):g.removeFrom(n))}function _(B){const b=y.value[B];b.layer||(b.layer=L.tileLayer(b.url,{maxZoom:19})),b.visible?b.layer.addTo(n):b.layer.removeFrom(n)}function f(){return l?.appContext.config.globalProperties.$settings?.basemaps?l?.appContext.config.globalProperties.$settings?.basemaps.map((B,b)=>Object.assign(B,{key:`b${b}`,preview:B.preview||B.url.replace("{z}/{x}/{y}.png","13/4790/2762.png")})).reduce((B,b)=>({...B,[b.key]:b}),{}):{topo100:{url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"},orto10:{url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4790/2762.png"},osmb:{url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png",preview:"https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"}}}return e.watch(k,()=>{setTimeout(()=>{n.invalidateSize()},50)}),(B,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(k.value?"fixed inset-0 w-screen h-screen z-[9999] bg-white":"relative min-h-[300px] h-full pb-[3.25rem]")},[e.createElementVNode("div",{ref_key:"mapContainer",ref:o,class:"w-full h-full min-h-[300px]"},null,512),d.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,onClick:b[0]||(b[0]=E=>d.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer layers-button"}," Шари ")),d.value?(e.openBlock(),e.createElementBlock("div",Uo,[e.createElementVNode("div",Go,[b[6]||(b[6]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:b[1]||(b[1]=E=>d.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"},[...b[5]||(b[5]=[e.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),e.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),e.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])]))]),e.createElementVNode("div",qo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(E,C)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("label",Zo,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"base-layer",value:C,"onUpdate:modelValue":b[2]||(b[2]=M=>h.value=M),onChange:i},null,40,Ko),[[e.vModelRadio,h.value]]),e.createElementVNode("span",Jo,e.toDisplayString(E.name||C),1)])]))),256))]),e.createElementVNode("div",Xo,[e.createElementVNode("label",Qo,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":b[3]||(b[3]=E=>x.value=E),onChange:p},null,544),[[e.vModelCheckbox,x.value]]),b[7]||(b[7]=e.createElementVNode("span",{class:"ml-2"}," Геометрія/Межі ",-1))]),t.tms?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(y.value,E=>(e.openBlock(),e.createElementBlock("label",Yo,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":C=>E.visible=C,onChange:C=>_(E.i)},null,40,vo),[[e.vModelCheckbox,E.visible]]),e.createElementVNode("span",en,e.toDisplayString(E.name),1)]))),256)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["absolute z-[500] bg-white p-2 border rounded-lg cursor-pointer fullscreen-button",k.value?"bottom-[100px] right-[7px]":"bottom-[150px] right-[7px]"]),onClick:b[4]||(b[4]=E=>k.value=!k.value)},[...b[8]||(b[8]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 8V4h4M20 8V4h-4M4 16v4h4m12-4v4h-4"})],-1)])],2)],2))}}),tn={class:"flex justify-between items-center mb-[15px]"},on={class:"font-semibold text-[16px]"},nn={class:"overflow-x-auto"},ln={class:"min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600"},sn={class:"text-left font-medium text-gray-700"},an={class:"py-2 min-w-[200px]"},rn={key:0,class:"py-2 min-w-[200px]"},cn={class:"divide-y divide-gray-200"},dn={class:"bg-white odd:bg-gray-50"},mn={class:"py-2 pr-5"},pn=["href"],gn={class:"py-2 pr-5 gap-2 inline-flex"},fn=["onClick"],hn=["onClick"],re=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(r){const l=e.getCurrentInstance(),t=e.ref([]),o=e.ref([]),n=r,g=e.ref([]),a=e.ref(""),h=e.ref("");async function m(){const s=await fetch("/api/data/"+n.token).then(c=>c.json());t.value=s.rows,o.value=s.columns,g.value=s.actions,a.value=s.form,h.value=s.addToken}const{$notify:x=console.log,$confirm:k,$form:d}=l?.appContext?.config?.globalProperties||{};async function y(s){await d({token:s.token}),m()}function $(){d({token:h.value})}function u(s){k({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const c=await fetch(`/api/table/${s.token}`,{method:"DELETE"});if(!c.ok){const{error:i,code:p}=await c.json();x({title:"Помилка",type:"warning",message:i});return}x({title:"Видаленно",message:"Успішно видалено"}),await m()}})}e.onMounted(async()=>{await m()});function w(s,c){return c.format?.toLowerCase()==="text"?s[c.name]:s[c.name+"_data"]??s[c.name+"_text"]??"-"}return(s,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",tn,[e.createElementVNode("div",on,e.toDisplayString(s.title),1),g.value.includes("add")&&h.value?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:$,class:"px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-blue-100 text-blue-500 hover:bg-blue-500 focus:ring-blue-500"},"Додати")):e.createCommentVNode("",!0)]),e.createElementVNode("div",nn,[e.createElementVNode("table",ln,[e.createElementVNode("thead",sn,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>(e.openBlock(),e.createElementBlock("th",an,e.toDisplayString(i.ua),1))),256)),g.value.includes("edit")?(e.openBlock(),e.createElementBlock("th",rn," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",cn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,i=>(e.openBlock(),e.createElementBlock("tr",dn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,p=>(e.openBlock(),e.createElementBlock("td",mn,[p.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:p.link.replace("{{id}}",i.id),class:"font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"},e.toDisplayString(w(i,p)),9,pn)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(w(i,p)),1)],64))]))),256)),e.createElementVNode("td",gn,[i.token?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:p=>y(i),class:"inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"},[...c[0]||(c[0]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12px",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M20,16v4a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4H8",fill:"none",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),e.createElementVNode("polygon",{fill:"none",points:"12.5 15.8 22 6.2 17.8 2 8.3 11.5 8 16 12.5 15.8",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)])],8,fn)):e.createCommentVNode("",!0),i.token?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:p=>u(i),class:"inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"},[...c[1]||(c[1]=[e.createStaticVNode('<svg class="flex-shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg>',1)])],8,hn)):e.createCommentVNode("",!0)])]))),256))])])])]))}}),yn={class:"p-[20px]"},kn={class:"flex gap-[6px] mb-5"},bn={class:"vs-form-text relative bg-white rounded-lg flex-grow"},xn={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},un={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},_n={class:"space-y-8"},wn={key:0},En={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Bn=["onClick"],Vn={class:"md:col-span-2"},Nn={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},$n={class:"text-sm text-gray-500 dark:text-neutral-500"},Cn={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Ln=["checked","onChange"],Dn={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Mn={class:"md:col-span-2"},Sn={class:"font-semibold text-gray-800 dark:text-neutral-200"},Tn=["onClick"],zn={class:"md:col-span-2"},Fn={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},jn={class:"text-sm text-gray-500 dark:text-neutral-500"},In={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},An=["checked","onChange"],U=e.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(r){const l=r,t=e.ref(""),o=["view","add","edit","del"],n=e.ref({});e.onMounted(async()=>{const w=await(await fetch(`/api/access-group/${l.id}?tab=vs-group-interface`)).json();w.routes&&w.routes.forEach(s=>{n.value[s.path]=new Set(s.actions)})});const g=(u,w)=>n.value[u]?.has(w)??!1,a=(u,w)=>{n.value[u]||(n.value[u]=new Set),n.value[u].has(w)?n.value[u].delete(w):n.value[u].add(w)},h=(u,w)=>{u.forEach(s=>{s.path&&(n.value[s.path]||(n.value[s.path]=new Set),n.value[s.path].has(w)?n.value[s.path].delete(w):n.value[s.path].add(w))})},m=e.computed(()=>Object.entries(n.value).map(([u,w])=>({path:u,actions:Array.from(w)})).filter(u=>u.actions.length)),x=async()=>{await fetch(`/api/access-group/${l.id}?tab=vs-group-interface`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({routes:m.value})}),console.log("Saved",m.value),de.notify({title:"Success!",message:"Permissions saved."})},k=()=>{n.value={}},d=u=>{if(!t.value.trim())return u;const w=t.value.toLowerCase();return u.filter(s=>s.ua.toLowerCase().includes(w)||s.path&&s.path.toLowerCase().includes(w))},y=e.computed(()=>d(l.data.routers.filter(u=>!u.menu))),$=e.computed(()=>l.data.routers.filter(u=>u.menu).map(u=>({...u,menu:d(u.menu||[])})).filter(u=>u.menu&&u.menu.length>0));return(u,w)=>(e.openBlock(),e.createElementBlock("div",yn,[e.createElementVNode("div",kn,[e.createElementVNode("div",bn,[w[1]||(w[1]=e.createElementVNode("i",{class:"absolute bottom-2/4 translate-y-2/4 text-gray-500 cursor-pointer ti"},null,-1)),e.withDirectives(e.createElementVNode("input",{type:"text",placeholder:"Пошук","onUpdate:modelValue":w[0]||(w[0]=s=>t.value=s),class:"bg-white h-[38px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,512),[[e.vModelText,t.value]])]),e.createElementVNode("button",{onClick:k,class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100"}," Скинути всі "),e.createElementVNode("button",{onClick:x,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")]),e.createElementVNode("div",xn,[w[2]||(w[2]=e.createElementVNode("div",{class:"self-center col-span-2"},[e.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(s,c)=>e.createElementVNode("div",{class:"col-span-1 text-center",key:c},[e.createElementVNode("h3",un,e.toDisplayString(s),1)])),64))]),e.createElementVNode("div",_n,[y.value.length?(e.openBlock(),e.createElementBlock("div",wn,[e.createElementVNode("ul",En,[w[3]||(w[3]=e.createElementVNode("li",{class:"md:col-span-2"},[e.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Без категорії")],-1)),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(s,c)=>e.createElementVNode("li",{key:c,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:i=>h(y.value,o[c])}," Toggle all ",8,Bn)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(s,c)=>(e.openBlock(),e.createElementBlock("ul",{key:"uncat-"+c,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",Vn,[e.createElementVNode("p",Nn,e.toDisplayString(s.ua),1),e.createElementVNode("p",$n,e.toDisplayString(s.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(i,p)=>e.createElementVNode("li",{key:p,class:"col-span-1"},[e.createElementVNode("div",Cn,[e.createElementVNode("input",{type:"checkbox",checked:g(s.path,i),onChange:_=>a(s.path,i),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Ln)])])),64))]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(s,c)=>(e.openBlock(),e.createElementBlock("div",{key:c,class:"space-y-5"},[e.createElementVNode("ul",Dn,[e.createElementVNode("li",Mn,[e.createElementVNode("h3",Sn,e.toDisplayString(s.ua),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(i,p)=>e.createElementVNode("li",{key:p,class:"md:block md:col-span-1 md:text-center"},[e.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:_=>h(s.menu,o[p])}," Toggle all ",8,Tn)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.menu,(i,p)=>(e.openBlock(),e.createElementBlock("ul",{key:p,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",zn,[e.createElementVNode("p",Fn,e.toDisplayString(i.ua),1),e.createElementVNode("p",jn,e.toDisplayString(i.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(o,(_,f)=>e.createElementVNode("li",{key:f,class:"col-span-1"},[e.createElementVNode("div",In,[e.createElementVNode("input",{type:"checkbox",checked:g(i.path,_),onChange:B=>a(i.path,_),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,An)])])),64))]))),128))]))),128))])]))}}),ie={"vs-widget-map":R,"vs-widget-comments":H,"vs-widget-history":O,"vs-widget-gallery":W,"vs-widget-file":P,"vs-widget-list":J,"vs-widget-table":re,"vs-group-interface":U},Hn={key:0,class:"mb-4 pb-2 border-b border-gray-200"},On={class:"text-lg font-semibold text-gray-900"},Pn=["innerHTML"],Wn={key:0,class:"mb-4 pb-2 border-b border-gray-200"},Rn={class:"text-lg font-semibold text-gray-900"},Un=["innerHTML"],X=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(r){const l=r;console.log(l.data);const t=e.computed(()=>l.col?{[`lg:col-span-${l.col}`]:!0}:{});function o(a){return ie[a]||a}const n=function(a={}){return a.props&&Object.entries(a.props).forEach(([h,m])=>{a[h]=l.data[m]}),a},g=e.computed(()=>{const a={};return l.col&&(a.col=l.col),a});return(a,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full bg-gray-50 rounded-lg p-4 col-span-12",t.value])},[a.title?(e.openBlock(),e.createElementBlock("div",Hn,[e.createElementVNode("h3",On,e.toDisplayString(a.title),1)])):e.createCommentVNode("",!0),a.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:a.html,class:"text-gray-900 leading-relaxed"},null,8,Pn)):a.type?.includes("tabs")?(e.openBlock(),e.createBlock(z,{key:2,view:a.type,panels:a.items,data:a.data},null,8,["view","panels","data"])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:3},e.renderList(a.items,m=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[m.title||m.label?(e.openBlock(),e.createElementBlock("div",Wn,[e.createElementVNode("h3",Rn,e.toDisplayString(m.title||m.label),1)])):e.createCommentVNode("",!0),m.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:m.html,class:"text-gray-900 leading-relaxed"},null,8,Un)):m.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o(m.component)),e.mergeProps({key:2,ref_for:!0},{geom:a.data.geom,id:a.data.id,...g.value,...n(m),data:a.data},{class:"w-full"}),null,16)):e.renderSlot(a.$slots,"default",{key:3})],64))),256))],2))}}),Gn={class:"grid grid-cols-12 gap-[20px]"},qn={key:0,class:"col-span-4"},Zn=["innerHTML"],Kn={key:0,class:"overflow-hidden w-full"},Jn={class:"flex border-b border-gray-200 bg-gray-50 relative"},Xn=["onClick"],Qn={class:"p-1"},Yn=["innerHTML"],vn={key:1,class:"flex w-full"},el={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},tl=["onClick"],ol={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},nl={class:"flex-1 p-4"},ll=["innerHTML"],sl={key:2,class:"p-1 w-full"},al={class:"grid grid-cols-12 gap-4"},z=e.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!0},id:{},className:{},style:{}},setup(r){const l=r,t=e.ref(0),o=e.ref([]);function n(s){return ie[s]||s}function g(s){return s.forEach(c=>{c.type&&(c.view=c.type)}),o.value=s.filter(c=>c.type==="pin"),s.filter(c=>c.type!=="pin")}const a=e.computed(()=>l.panels&&l.panels.length>0?l.normalizeTabs?g(l.panels):l.panels:l.data&&Array.isArray(l.data)?l.data.filter(c=>c.type.includes("tabs"))[0]?.items||[]:[]),h=e.computed(()=>l.panels&&l.panels.length>0?l.normalizeTabs?g(l.panels):l.panels:l.data&&Array.isArray(l.data)?l.data:[]),m=e.computed(()=>({[`view-${l.view}`]:!0})),x=s=>{const c={...s};return l.data&&(c.data=l.data),c},k=e.ref([]),d=e.ref([]),y=e.ref([]);function $(s,c){s&&s instanceof HTMLElement&&(k.value[c]=s)}function u(){d.value=k.value.map(s=>s.offsetWidth),y.value=k.value.map(s=>s.offsetLeft)}let w=null;return e.onMounted(()=>{e.nextTick(()=>{u()}),w=new ResizeObserver(()=>u()),w.observe(document.body)}),e.onBeforeUnmount(()=>{w?.disconnect()}),e.watch(t,()=>{e.nextTick(()=>{u()})}),(s,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(s.classWrapper||m.value)},[e.createElementVNode("div",Gn,[o.value.length!==0?(e.openBlock(),e.createElementBlock("div",qn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value[0].items,(i,p)=>(e.openBlock(),e.createElementBlock("div",{key:i.name||p,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[i.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:i.html,class:"text-gray-900 leading-relaxed"},null,8,Zn)):i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(i.component)),e.mergeProps({key:1,ref_for:!0},i.component==="Card"?i:x(i),{id:s.data.id,class:"w-full h-full"}),null,16,["id"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(o.value.length!==0?"col-span-8":"col-span-12")},[s.view==="tabs"?(e.openBlock(),e.createElementBlock("div",Kn,[e.createElementVNode("div",Jn,[d.value.length?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute bottom-0 h-[2px] bg-blue-600 transition-all duration-300",style:e.normalizeStyle({width:d.value[t.value]+"px",left:y.value[t.value]+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(i,p)=>(e.openBlock(),e.createElementBlock("button",{key:i.name||p,ref_for:!0,ref:_=>$(_,p),onClick:_=>t.value=p,class:e.normalizeClass(["relative px-4 py-3 text-sm font-medium transition-colors duration-300",t.value===p?"text-blue-600":"text-gray-600 hover:text-gray-800"])},e.toDisplayString(i.title||i.label||i.name||`Tab ${p+1}`),11,Xn))),128))]),e.createElementVNode("div",Qn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(i,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:i.name||p,class:e.normalizeClass(["transition-all duration-300 ease-in-out",t.value===p?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",s.classPanel||"w-full border-gray-100 py-2"])},[i.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:i.html,class:"text-gray-900 leading-relaxed"},null,8,Yn)):s.$slots[`tab-${p}`]?e.renderSlot(s.$slots,`tab-${p}`,{key:1,item:i,data:s.data}):i.component||i.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(i.component||i.name)),e.mergeProps({key:2,ref_for:!0},i.component==="Card"?i:x(i),{id:s.data.id,class:"w-full h-full"}),null,16,["id"])):e.renderSlot(s.$slots,i.slot||`tab-${p}`,{key:3,item:i,data:s.data})],2)),[[e.vShow,t.value===p]])),128))])])):s.view==="vertical-tabs"?(e.openBlock(),e.createElementBlock("div",vn,[e.createElementVNode("div",el,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(i,p)=>(e.openBlock(),e.createElementBlock("button",{key:i.name||p,onClick:_=>t.value=p,class:e.normalizeClass(["relative px-4 py-3 text-sm font-medium text-left transition-colors duration-300",t.value===p?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[e.createTextVNode(e.toDisplayString(i.title||i.label||i.name||`Tab ${p+1}`)+" ",1),t.value===p?(e.openBlock(),e.createElementBlock("span",ol,[...c[0]||(c[0]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"remixicon text-blue-600 rounded-full bg-white shadow scale-90 opacity-100 transition ease-out"},[e.createElementVNode("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})],-1)])])):e.createCommentVNode("",!0)],10,tl))),128))]),e.createElementVNode("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(i,p)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:i.name||p,class:e.normalizeClass(["transition-all duration-300 ease-in-out",t.value===p?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",s.classPanel||"w-full border-gray-100 py-2"])},[i.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:i.html,class:"text-gray-900 leading-relaxed"},null,8,ll)):s.$slots[`tab-${p}`]?e.renderSlot(s.$slots,`tab-${p}`,{key:1,item:i,data:s.data}):i.component||i.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(i.component||i.name)),e.mergeProps({key:2,ref_for:!0},i.component==="Card"?i:x(i),{id:s.data.id,class:"w-full h-full"}),null,16,["id"])):e.renderSlot(s.$slots,i.slot||`tab-${p}`,{key:3,item:i,data:s.data})],2)),[[e.vShow,t.value===p]])),128))])])):(e.openBlock(),e.createElementBlock("div",sl,[e.createElementVNode("div",al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(i,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i.name||p},[s.$slots[`panel-${p}`]?e.renderSlot(s.$slots,`panel-${p}`,{key:0,item:i,data:s.data}):i.items||i.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(X),e.mergeProps({key:1,ref_for:!0},x(i),{items:i.items,class:"w-full h-full"}),null,16,["items"])):i.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(i.component)),e.mergeProps({key:2,ref_for:!0},x(i),{class:"w-full h-full"}),null,16)):e.renderSlot(s.$slots,i.slot||`panel-${p}`,{key:3,item:i,data:s.data})],64))),128))])]))],2)])],2))}}),rl=["onClick"],ce=D(e.defineComponent({__name:"CopyNotification",setup(r,{expose:l}){const t=e.ref([]);let o=1;const n=()=>{if(t.value.length>=10){const h=t.value[0];clearTimeout(h.timer),t.value.shift()}const a={id:o++,timer:setTimeout(()=>{g(a.id)},1500)};t.value.push(a)},g=a=>{const h=t.value.findIndex(m=>m.id===a);if(h!==-1){const m=t.value[h];clearTimeout(m.timer),t.value.splice(h,1)}};return l({addNotification:n}),e.onUnmounted(()=>{t.value.forEach(a=>{clearTimeout(a.timer)})}),(a,h)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,m=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[e.createVNode(e.unref(ke),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),h[0]||(h[0]=e.createElementVNode("div",{class:"flex-1"},[e.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),e.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),e.createElementVNode("button",{onClick:x=>g(m.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(Z),{class:"h-4 w-4"})],8,rl)]))),128))]),_:1})]))}}),[["__scopeId","data-v-55903525"]]);z.install=function(r){r.component("vs-widget-file",P),r.component("vs-widget-comments",H),r.component("vs-widget-history",O),r.component("vs-widget-gallery",W),r.component("vs-widget-map",R),r.component("vs-group-interface",U),r.component("CommentsWidget",H),r.component("HistoryWidget",O),r.component("GalleryWidget",W),r.component("FilesWidget",P),r.component("MapWidget",R),r.component("Card",z),r.component("CardItem",X),r.component("DescriptionListWidget",J),r.component("CopyNotification",ce),r.component("GroupInterfaceWidget",U)},N.Card=z,N.CardItem=X,N.CommentsWidget=H,N.CopyNotification=ce,N.DescriptionListWidget=J,N.FilesWidget=P,N.GalleryWidget=W,N.GroupInterfaceWidget=U,N.HistoryWidget=O,N.MapWidget=R,N.TableWidget=re,N.default=z,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
131
|
+
*/const xt=j("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),io={class:"border-t pt-3 mt-4"},ro={class:"flex gap-2"},lo={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},ao={class:"flex-1 space-y-2"},co={class:"flex justify-between items-center"},po={class:"flex gap-2"},fo=["disabled"],kn=n.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:n.mergeModels(["sendComment"],["update:isReply"]),setup(e,{emit:t}){const s=n.useModel(e,"isReply"),o=n.ref(""),i=t,l=()=>{o.value.trim()&&(i("sendComment",o.value),o.value="")},r=c=>{(c.ctrlKey||c.metaKey)&&c.key==="Enter"&&(c.preventDefault(),l())};return(c,a)=>(n.openBlock(),n.createElementBlock("div",io,[n.createElementVNode("div",ro,[n.createElementVNode("span",lo,[n.createVNode(n.unref(_t),{class:"h-3 w-3 text-gray-500"})]),n.createElementVNode("div",ao,[n.withDirectives(n.createElementVNode("textarea",{"onUpdate:modelValue":a[0]||(a[0]=p=>o.value=p),onKeydown:r,placeholder:"Add a comment...",class:"w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"},null,544),[[n.vModelText,o.value]]),n.createElementVNode("div",co,[a[4]||(a[4]=n.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),n.createElementVNode("div",po,[s.value?(n.openBlock(),n.createElementBlock("button",{key:0,class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:a[1]||(a[1]=p=>s.value=!1)},[n.createVNode(n.unref(xt),{class:"h-3 w-3"}),a[2]||(a[2]=n.createTextVNode(" Cancel ",-1))])):n.createCommentVNode("",!0),n.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!o.value.trim(),onClick:l},[n.createVNode(n.unref(bn),{class:"h-3 w-3 mr-1"}),a[3]||(a[3]=n.createTextVNode(" Send ",-1))],8,fo)])])])])]))}}),mo={class:"z-50 min-w-32 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md w-32 outline-none pointer-events-auto"},ho=n.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:n.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(e,{emit:t}){const s=t,o=n.useModel(e,"showMoreOptions"),i=n.ref(),l=n.ref(!0),r=async p=>{o.value&&i.value&&!i.value.contains(p.target)&&!l.value&&(o.value=!1),l.value=!1},c=()=>{o.value=!1,s("edit")},a=()=>{o.value=!1,s("delete")};return n.onMounted(()=>{document.addEventListener("click",r)}),n.onUnmounted(()=>{document.removeEventListener("click",r)}),(p,h)=>(n.openBlock(),n.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:i},[n.createElementVNode("div",mo,[n.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs hover:bg-gray-100 transition-colors duration-300",onClick:c},[n.createVNode(n.unref(no),{class:"h-3 w-3 mr-2"}),h[0]||(h[0]=n.createTextVNode(" Edit ",-1))]),n.createElementVNode("div",{class:"relative cursor-pointer flex select-none items-center gap-2 rounded-sm px-2 py-2 outline-hidden transition-colors disabled:pointer-events-none disabled:opacity-50 text-xs text-red-600 hover:bg-gray-100 transition-colors duration-300",onClick:a},[n.createVNode(n.unref(Nt),{class:"h-3 w-3 mr-2"}),h[1]||(h[1]=n.createTextVNode(" Delete ",-1))])])],512))}}),uo={class:"space-y-2"},go={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},yo={class:"flex-1 min-w-0 space-y-1 relative"},vo={class:"flex items-center gap-2"},bo={class:"font-medium text-xs"},ko={class:"text-xs text-gray-500"},Eo={key:0,class:"text-xs text-gray-700 leading-relaxed"},No={class:"flex justify-between text-xs"},_o={class:"flex items-center gap-2"},xo={key:0,class:"flex gap-2"},wo=["disabled"],So={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},Co=n.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(e,{emit:t}){const s=t,o=e,i=n.ref(o.comment.text),l=n.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),r=n.ref("w-full min-h-[60px] p-2 border border-gray-200 rounded text-xs resize-none focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-transparent"),c=n.ref(!1),a=n.ref(!1),p=n.ref(!1),h=n.ref(!1),d=f=>{const u=new Date,g=Math.floor((u.getTime()-f.getTime())/(1e3*60*60));return g<1?`${Math.floor((u.getTime()-f.getTime())/6e4)}m`:g<24?`${g}h`:`${Math.floor(g/24)}d`},m=()=>{h.value=!h.value,h.value?s("like",o.comment.id,"add"):s("like",o.comment.id,"delete")},k=()=>{s("edit",o.comment.id,i.value),p.value=!1},b=(f,u)=>{s("like",f,u)},y=(f,u)=>{s("edit",f,u)};return(f,u)=>{const g=n.resolveComponent("CommentItem",!0);return n.openBlock(),n.createElementBlock("div",uo,[n.createElementVNode("div",{class:n.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",p.value?"bg-gray-50":""])},[n.createElementVNode("span",go,[n.createVNode(n.unref(_t),{class:"h-3 w-3 text-gray-500"})]),n.createElementVNode("div",yo,[n.createElementVNode("div",vo,[n.createElementVNode("span",bo,n.toDisplayString(f.comment?.author),1),n.createElementVNode("span",ko,n.toDisplayString(d(f.comment?.createdAt)),1)]),p.value?n.withDirectives((n.openBlock(),n.createElementBlock("textarea",{key:1,"onUpdate:modelValue":u[0]||(u[0]=N=>i.value=N),class:n.normalizeClass(p.value?r.value:l.value)},null,2)),[[n.vModelText,i.value]]):(n.openBlock(),n.createElementBlock("p",Eo,n.toDisplayString(f.comment?.text),1)),n.createElementVNode("div",No,[n.createElementVNode("div",_o,[n.createElementVNode("button",{class:n.normalizeClass(["flex items-center gap-1",h.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:u[1]||(u[1]=N=>m())},[n.createVNode(n.unref(Xs),{class:n.normalizeClass(["h-3 w-3",h.value?"fill-blue-600":""])},null,8,["class"]),n.createTextVNode(" "+n.toDisplayString(f.comment?.likes),1)],2),f.isInside?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("button",{key:0,class:"text-gray-500 hover:text-blue-600 transition-colors",onClick:u[2]||(u[2]=N=>a.value=!0)},[n.createVNode(n.unref(eo),{class:"h-3 w-3"})])),n.createElementVNode("button",{class:"text-gray-400 hover:text-gray-600 transition-colors opacity-0 group-hover:opacity-100",type:"button",onClick:u[3]||(u[3]=N=>c.value=!0)},[n.createVNode(n.unref(Js),{class:"h-3 w-3"})])]),p.value?(n.openBlock(),n.createElementBlock("div",xo,[n.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-red-500 hover:bg-opacity-80 rounded-md h-6 text-xs px-2",onClick:u[4]||(u[4]=N=>p.value=!1)},[n.createVNode(n.unref(xt),{class:"h-3 w-3"}),u[11]||(u[11]=n.createTextVNode(" Cancel ",-1))]),n.createElementVNode("button",{class:"inline-flex items-center justify-center gap-2 text-white whitespace-nowrap font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 bg-black text-primary-foreground hover:bg-opacity-80 rounded-md h-6 text-xs px-2",disabled:!i.value.trim(),onClick:u[5]||(u[5]=N=>k())},[n.createVNode(n.unref(bn),{class:"h-3 w-3 mr-1"}),u[12]||(u[12]=n.createTextVNode(" Send ",-1))],8,wo)])):n.createCommentVNode("",!0)])]),c.value?(n.openBlock(),n.createBlock(ho,{key:0,showMoreOptions:c.value,"onUpdate:showMoreOptions":u[6]||(u[6]=N=>c.value=N),onEdit:u[7]||(u[7]=N=>p.value=!0),onDelete:u[8]||(u[8]=N=>f.$emit("delete",f.comment?.id)),comment:f.comment},null,8,["showMoreOptions","comment"])):n.createCommentVNode("",!0)],2),f.isInside?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",So,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.comment?.replies,N=>(n.openBlock(),n.createBlock(g,{key:N.id,comment:N,isInside:!0,onDelete:_=>f.$emit("delete",N.id),onLike:b,onEdit:y},null,8,["comment","onDelete"]))),128)),a.value&&!f.isInside?(n.openBlock(),n.createBlock(kn,{key:0,onSendComment:u[9]||(u[9]=N=>f.$emit("reply",f.comment?.id,N)),isReply:a.value,"onUpdate:isReply":u[10]||(u[10]=N=>a.value=N)},null,8,["isReply"])):n.createCommentVNode("",!0)]))])}}}),Bo=["id"],To={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Ye=n.defineComponent({__name:"CommentsWidget",props:{title:{},comments:{},maxHeight:{},onAddComment:{type:Function},onReply:{type:Function},onLike:{type:Function},onDelete:{type:Function},onEdit:{type:Function},id:{},className:{},style:{}},emits:["add","reply","like","delete","edit"],setup(e,{emit:t}){const s=e,o=t,i=n.ref(s.comments??[]);async function l(){if(!s.id)return;const d=await fetch(`/api/widget/comment/${s.id}`).then(m=>m.json());i.value=d.rows.map(m=>({id:m.communication_id,author:m.username,text:m.body,createdAt:new Date(m.cdate)}))}i.value.length===0&&l();const r=async d=>{s.onAddComment?s.onAddComment(d):s.id&&(await fetch(`/api/widget/comment/${s.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:d})}),await l()),o("add",d)},c=(d,m)=>{s?.onLike?.(d,m),o("like",d,m)},a=(d,m)=>{s.onReply?.(d,m),o("reply",d,m)},p=async(d,m)=>{s.onEdit?s.onEdit(d,m):s.id&&(await fetch(`/api/widget/comment/${s.id}/${d}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:m})}),await l()),o("edit",d,m)},h=async d=>{s.onDelete?s.onDelete(d):s.id&&(await fetch(`/api/widget/comment/${s.id}/${d}`,{method:"DELETE"}),await l()),o("delete",d)};return(d,m)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["mx-auto font-sans",d.className]),id:d.id,style:n.normalizeStyle(d.style)},[d.title?(n.openBlock(),n.createElementBlock("h3",To,n.toDisplayString(d.title),1)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass([d.maxHeight?"overflow-y-auto":"","space-y-3"]),style:n.normalizeStyle({maxHeight:d.maxHeight+"px"})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.value,k=>(n.openBlock(),n.createBlock(Co,{key:k.id,comment:k,onReply:a,onLike:c,onDelete:m[0]||(m[0]=b=>h(b)),onEdit:p},null,8,["comment"]))),128))],6),n.createVNode(kn,{onSendComment:m[1]||(m[1]=k=>r(k))})],14,Bo))}}),En=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:we}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:to}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:so}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:Qs}]]),$o={class:"mx-auto font-sans"},Do={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Oo={class:"relative"},Io={class:"space-y-3"},Ao={class:"flex-1 min-w-0 pb-2"},Mo={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Lo={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Ro={class:"font-medium text-xs"},Fo={class:"text-xs text-gray-500"},Po={class:"space-y-1"},jo={class:"text-xs text-gray-700"},zo={class:"capitalize mr-1"},Ho={key:0,class:"inline-flex items-center rounded-full border py-0.5 font-semibold transition-colors text-foreground text-xs h-4 px-1 capitalize"},Uo={key:0,class:"flex items-center gap-1 text-xs"},qo={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},Wo={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},Ze=n.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(e){const t=e,s=n.ref(Array.isArray(t.data)?t.data:[]);s.value.length===0&&t.id&&o();async function o(){const i=await fetch(`/api/widget/history/${t.id}`);if(!i.ok)return{data:[]};const l=await i.json();l.rows.forEach(r=>{r.timestamp=new Date(r.cdate),r.id=r.entity_id,r.entityType=r.entity_type,r.entityId=r.entity_id,r.action=r.change_type,r.userId=r.change_user_id,r.userName=r.username,r.timestamp=new Date(r.cdate),r.description=r.username,r.status=r.username}),s.value=l.rows}return(i,l)=>(n.openBlock(),n.createElementBlock("div",$o,[i.title?(n.openBlock(),n.createElementBlock("h3",Do,n.toDisplayString(i.title),1)):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(i.maxHeight?"overflow-y-auto":""),style:n.normalizeStyle({maxHeight:i.maxHeight+"px"})},[n.createElementVNode("div",Oo,[l[0]||(l[0]=n.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),n.createElementVNode("div",Io,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,r=>(n.openBlock(),n.createElementBlock("div",{class:"relative flex items-start gap-2",key:r?.id},[n.createElementVNode("div",{class:n.normalizeClass(`flex-shrink-0 w-6 h-6 rounded-full flex items-center justify-center border bg-white relative z-10 ${n.unref(En).get(r?.entityType)?.color}`)},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(En).get(r?.entityType)?.icon),{class:"h-3 w-3"}))],2),n.createElementVNode("div",Ao,[n.createElementVNode("div",Mo,[n.createElementVNode("span",Lo,[n.createVNode(n.unref(_t),{class:"h-3 w-3 text-gray-500"})]),n.createElementVNode("span",Ro,n.toDisplayString(r?.userName),1),n.createElementVNode("span",Fo,n.toDisplayString(r?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),n.createElementVNode("div",Po,[n.createElementVNode("div",jo,[n.createElementVNode("span",zo,n.toDisplayString(r?.action),1),r?.entityId?(n.openBlock(),n.createElementBlock("span",Ho,n.toDisplayString(r?.entityId),1)):n.createCommentVNode("",!0)]),r?.changes?.[r?.entityId]?(n.openBlock(),n.createElementBlock("div",Uo,[r?.changes?.[r?.entityId]?.old?(n.openBlock(),n.createElementBlock("span",qo,n.toDisplayString(r?.changes?.[r?.entityId]?.old),1)):n.createCommentVNode("",!0),r?.changes?.[r?.entityId]?.old&&r?.changes?.[r?.entityId]?.new?(n.openBlock(),n.createBlock(n.unref(Ks),{key:1,class:"h-2 w-2 text-gray-400"})):n.createCommentVNode("",!0),r?.changes?.[r?.entityId]?.new?(n.openBlock(),n.createElementBlock("span",Wo,n.toDisplayString(r?.changes?.[r?.entityId]?.new),1)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Ko={key:0,class:"text-xl font-semibold"},Go={class:"flex gap-1"},Jo={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},Yo=n.defineComponent({__name:"FileHeader",props:n.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:n.mergeModels(["onAddFile"],["update:modelValue"]),setup(e){const t=n.useModel(e,"modelValue"),s={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(o,i)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",o.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[o.title?(n.openBlock(),n.createElementBlock("h3",Ko,n.toDisplayString(o.title),1)):n.createCommentVNode("",!0),n.createElementVNode("div",Go,[n.createElementVNode("button",{class:n.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",t.value==="list"?s.active:s.inactive]),onClick:i[0]||(i[0]=l=>t.value="list")},[n.createVNode(n.unref(Vs),{class:"h-4 w-4"})],2),n.createElementVNode("button",{class:n.normalizeClass(["ring-offset-background inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors border-input border rounded-md text-xs h-7 px-2",t.value==="grid"?s.active:s.inactive]),onClick:i[1]||(i[1]=l=>t.value="grid")},[n.createVNode(n.unref(Zs),{class:"h-4 w-4"})],2),n.createElementVNode("label",null,[n.createElementVNode("input",{type:"file",class:"hidden",onChange:i[2]||(i[2]=l=>o.$emit("onAddFile",l))},null,32),n.createElementVNode("div",Jo,[n.createVNode(n.unref(vn),{class:"h-4 w-4"}),i[3]||(i[3]=n.createTextVNode(" Додати файл ",-1))])])])],2))}}),wt={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:we,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Ys,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:oo,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:we,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Ws,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:yn,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:yn,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:we,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:we,label:"PPT"}};function Nn(e,t="en"){const s={month:"short",day:"numeric"};return new Intl.DateTimeFormat(t,s).format(e)}function _n(e){if(e===0)return"0 B";const t=1024,s=["B","KB","MB","GB","TB"],o=Math.floor(Math.log(e)/Math.log(t));return`${parseFloat((e/Math.pow(t,o)).toFixed(1))} ${s[o]}`}const Zo={class:"space-y-0.5"},Xo=["onClick"],Qo=["onClick"],Vo={class:"flex items-center gap-2"},ei={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},ti={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},ni={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},si={class:"flex items-center gap-1"},oi=["onClick"],ii=["onClick"],ri=n.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(e){return(t,s)=>(n.openBlock(),n.createElementBlock("div",Zo,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.files,o=>(n.openBlock(),n.createElementBlock("div",{class:"flex items-center gap-2 p-1.5 rounded hover:bg-gray-50 group border-b border-gray-100 last:border-b-0",key:o.id,onClick:n.withModifiers(i=>t.$emit("openLightbox",o),["stop"])},[n.createElementVNode("div",{class:n.normalizeClass(["p-1 rounded",n.unref(wt)[o?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(wt)[o?.ext]?.icon||n.unref(wt).pdf.icon),{class:"h-3 w-3"}))],2),n.createElementVNode("div",{class:"flex-1 min-w-0",onClick:i=>t.$emit("openLightbox",o)},[n.createElementVNode("div",Vo,[n.createElementVNode("span",ei,n.toDisplayString(o?.uploaded_name||o?.name),1)])],8,Qo),n.createElementVNode("div",ti,n.toDisplayString(n.unref(_n)(o.size)),1),n.createElementVNode("div",ni,n.toDisplayString(n.unref(Nn)(o.createdAt)),1),n.createElementVNode("div",si,[n.createElementVNode("button",{onClick:n.withModifiers(i=>t.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity"},[n.createVNode(n.unref(gn),{class:"h-3 w-3"})],8,oi),n.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700",onClick:n.withModifiers(i=>t.$emit("delete",i,o?.file_id),["stop"])},[n.createVNode(n.unref(Nt),{class:"h-3 w-3"})],8,ii)])],8,Xo))),128))]))}}),li={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},ai=["onClick"],ci={class:"space-y-2"},di={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},pi=["src"],fi={class:"space-y-1"},mi=["title"],hi={class:"text-xs text-gray-500 text-left"},ui={class:"absolute top-2 right-1 flex items-center gap-1"},gi=["onClick"],yi=["onClick"],vi=n.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(e){return(t,s)=>(n.openBlock(),n.createElementBlock("div",li,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.files,o=>(n.openBlock(),n.createElementBlock("div",{key:o.id,onClick:n.withModifiers(i=>t.$emit("openLightbox",o),["stop"]),class:"group relative border rounded-lg p-2 hover:shadow-md transition-all bg-white hover:bg-gray-50 cursor-pointer"},[n.createElementVNode("div",ci,[n.createElementVNode("div",di,[o.ext==="png"||o.ext==="jpg"||o.ext==="jpeg"||o.ext==="gif"||o.ext==="svg"||o.ext==="webp"?(n.openBlock(),n.createElementBlock("img",{key:0,src:`/file/resize?filepath=${o?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,pi)):(n.openBlock(),n.createBlock(n.unref(we),{key:1,class:"h-10 w-10 text-gray-500"}))]),n.createElementVNode("div",fi,[n.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:o.uploaded_name||o.name},n.toDisplayString(o.uploaded_name||o.name),9,mi),n.createElementVNode("p",hi,n.toDisplayString(n.unref(Nn)(o.createdAt))+", "+n.toDisplayString(n.unref(_n)(o.size)),1)])]),n.createElementVNode("div",ui,[n.createElementVNode("button",{onClick:n.withModifiers(i=>t.$emit("download",o),["stop"]),class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-accent hover:text-accent-foreground rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-50"},[n.createVNode(n.unref(gn),{class:"h-3 w-3"})],8,gi),n.createElementVNode("button",{class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 rounded-md h-6 w-6 p-0 opacity-0 group-hover:opacity-100 transition-opacity text-red-600 hover:text-red-700 hover:bg-red-50",onClick:n.withModifiers(i=>t.$emit("delete",i,o?.file_id),["stop"])},[n.createVNode(n.unref(Nt),{class:"h-3 w-3"})],8,yi)])],8,ai))),128))]))}}),bi={class:"mx-auto font-sans"},ki={key:1},Xe=n.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(e,{emit:t}){const s=e,o=n.ref(!1),i=n.ref(null),l=n.ref(!1),r=n.ref(0),c=n.ref(s.files??[]),a=t;c.value.length===0&&u();const p=(_,v)=>{i.value=v,o.value=!0},h=()=>{i.value&&(b(i.value),i.value=null,o.value=!1)},d=n.computed(()=>Array.isArray(c.value)?c.value.map(_=>_?.file_path):[]),m=_=>{const v=d.value.findIndex(w=>w===_.file_path);v!==-1&&(l.value=!0,r.value=v)},k=_=>{s.onAddFile?s.onAddFile(_):g(_),a("add",_)},b=_=>{s.onDelete?s.onDelete(_):N(_),a("delete",_)},y=_=>{const v=document.createElement("a");v.setAttribute("download",_?.uploaded_name||_?.name),v.href=_?.file_path||_?.path,v.click()},f=n.ref("list");async function u(){if(!s.id)return;const _=await fetch(`/api/widget/file/${s.id}`).then(v=>v.json());_.rows.forEach(v=>{v.timestamp=new Date(v.cdate),v.id=v.entity_id,v.entityType=v.entity_type,v.entityId=v.entity_id,v.entityType=v.entity_type,v.action=v.change_type,v.userId=v.change_user_id,v.userName=v.username,v.timestamp=new Date(v.cdate),v.description=v.username,v.status=v.username}),c.value=_.rows}const g=async _=>{if(!(!_.target||!_.target.files||_.target.files.length===0))try{await Promise.all(Array.from(_.target.files).map(async v=>{const w=new FormData;w.append("file",v);const E=`/api/widget/file/${s.id}`,x=await fetch(E,{method:"POST",body:w});if(!x.ok)throw new Error(`HTTP error! status: ${x.status}`);return v})),await u()}catch(v){console.error("Помилка при завантаженні файлів:",v)}},N=async _=>{try{await fetch(`/api/widget/file/${s.id}/${_}`,{method:"DELETE"}),await u()}catch(v){console.error(v)}};return(_,v)=>{const w=n.resolveComponent("MessageBox"),E=n.resolveComponent("Lightbox");return n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("div",bi,[n.createVNode(Yo,{modelValue:f.value,"onUpdate:modelValue":v[0]||(v[0]=x=>f.value=x),title:s.title,onOnAddFile:v[1]||(v[1]=x=>k(x))},null,8,["modelValue","title"]),c.value.length>0?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(_.maxHeight?"overflow-y-auto":""),style:n.normalizeStyle({maxHeight:_.maxHeight+"px"})},[f.value==="list"?(n.openBlock(),n.createBlock(ri,{key:0,onDelete:p,onDownload:y,onOpenLightbox:v[2]||(v[2]=x=>m(x)),files:c.value},null,8,["files"])):n.createCommentVNode("",!0),f.value==="grid"?(n.openBlock(),n.createBlock(vi,{key:1,onDelete:p,onDownload:y,onOpenLightbox:v[3]||(v[3]=x=>m(x)),files:c.value},null,8,["files"])):n.createCommentVNode("",!0)],6)):(n.openBlock(),n.createElementBlock("div",ki,v[6]||(v[6]=[n.createElementVNode("div",{class:"flex items-center justify-center h-full"},[n.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),n.createVNode(w,{modelValue:o.value,"onUpdate:modelValue":v[4]||(v[4]=x=>o.value=x),onConfirm:h,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),n.createVNode(E,{modelValue:l.value,"onUpdate:modelValue":v[5]||(v[5]=x=>l.value=x),images:d.value,"start-index":r.value},null,8,["modelValue","images","start-index"])],64)}}}),Ei={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},Ni=["onClick"],_i={key:0,rel:"noreferrer",class:"relative block h-full w-full"},xi=["src"],wi={key:0,class:"thumb-cover"},Si=n.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(e,{emit:t}){const s=t,o=n.ref(!1),i=n.ref(0),l=e,r=n.computed(()=>Array.isArray(l.items)?l.items.map(a=>a?.file_path):[]),c=a=>{const p=r.value.findIndex(h=>h===a.file_path);p!==-1&&(o.value=!0,i.value=p)};return(a,p)=>{const h=n.resolveComponent("Lightbox");return a.items?.length>=1?(n.openBlock(),n.createElementBlock("div",Ei,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.items,(d,m)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["h-full w-full image"+m,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:m,onClick:n.withModifiers(k=>c(d),["stop"])},[m<5?(n.openBlock(),n.createElementBlock("div",_i,[n.createElementVNode("img",{src:`/file/resize?filepath=${d?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:n.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",m===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,xi),m===4&&a.items?.length>5?(n.openBlock(),n.createElementBlock("div",wi," +"+n.toDisplayString(a.items?.length-5),1)):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)],10,Ni))),128)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(Math.max(0,5-a.items.length),d=>(n.openBlock(),n.createElementBlock("div",{key:"empty-"+d,class:n.normalizeClass(["h-full w-full image"+(a.items.length+d-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),n.createVNode(h,{modelValue:o.value,"onUpdate:modelValue":p[0]||(p[0]=d=>o.value=d),images:r.value,"start-index":i.value,delete:"true",download:"true",onDelete:p[1]||(p[1]=d=>s("delete",d))},null,8,["modelValue","images","start-index"])])):n.createCommentVNode("",!0)}}}),Ci={key:0,class:"text-xl font-semibold"},Bi={class:"flex gap-1"},Ti={class:"ring-offset-background focus-visible:outline-hidden focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border-input bg-background hover:bg-accent hover:text-accent-foreground border rounded-md text-xs h-7 px-2 cursor-pointer"},$i=n.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(e){return(t,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",t.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[t.title?(n.openBlock(),n.createElementBlock("h3",Ci,n.toDisplayString(t.title),1)):n.createCommentVNode("",!0),n.createElementVNode("div",Bi,[n.createElementVNode("label",null,[n.createElementVNode("input",{type:"file",class:"hidden",onChange:s[0]||(s[0]=o=>t.$emit("onAddImage",o))},null,32),n.createElementVNode("div",Ti,[n.createVNode(n.unref(vn),{class:"h-4 w-4"}),s[1]||(s[1]=n.createTextVNode(" Додати зображення ",-1))])])])],2))}}),Di={class:"w-full mx-auto font-sans",ref:"containerRef"},Oi={key:1},Qe=n.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(e,{emit:t}){const s=e,o=n.ref(s.items??[]),i=t;o.value.length===0&&a();const l=h=>{s.onAddImage?s.onAddImage(h):c(h),i("add",h)},r=h=>{const d=o.value.find(m=>m.file_path===h)?.file_id;d&&(s.onDelete?s.onDelete(d):p(d))},c=async h=>{if(!(!h.target||!h.target.files||h.target.files.length===0))try{await Promise.all(Array.from(h.target.files).map(async d=>{const m=new FormData;m.append("file",d);const k=`/api/widget/file/${s.id}`,b=await fetch(k,{method:"POST",body:m});if(!b.ok)throw new Error(`HTTP error! status: ${b.status}`);return d})),await a()}catch(d){console.error("Помилка при завантаженні файлів:",d)}};async function a(){if(!s.id)return;const h=await fetch(`/api/widget/file/${s.id}`).then(d=>d.json());o.value=h.rows}const p=async h=>{try{await fetch(`/api/widget/file/${s.id}/${h}`,{method:"DELETE"}),await a()}catch(d){console.error(d)}};return(h,d)=>(n.openBlock(),n.createElementBlock("div",Di,[n.createVNode($i,{title:h.title,onOnAddImage:d[0]||(d[0]=m=>l(m))},null,8,["title"]),o.value.length>0?(n.openBlock(),n.createBlock(Si,{key:0,items:o.value,onDelete:d[1]||(d[1]=m=>r(m))},null,8,["items"])):(n.openBlock(),n.createElementBlock("div",Oi,d[2]||(d[2]=[n.createElementVNode("div",{class:"flex items-center justify-center h-full"},[n.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),Ii={class:"text-value"},Ai={class:"text-sm text-gray-900"},Mi=n.defineComponent({__name:"TextValue",props:{item:{}},setup(e){const t=e,s=n.computed(()=>{const o=t.item.value;return typeof o=="boolean"?o?"Так":"Ні":o==null?"—":String(o)});return(o,i)=>(n.openBlock(),n.createElementBlock("div",Ii,[n.createElementVNode("span",Ai,n.toDisplayString(s.value),1)]))}}),ye=(e,t)=>{const s=e.__vccOpts||e;for(const[o,i]of t)s[o]=i;return s},Li=ye(Mi,[["__scopeId","data-v-c14550b7"]]),Ri={class:"link-value"},Fi=["href"],Pi=ye(n.defineComponent({__name:"LinkValue",props:{item:{}},setup(e){const t=e,s=n.computed(()=>{const o=String(t.item.value);try{const i=new URL(o);return i.hostname+i.pathname}catch{return o}});return(o,i)=>(n.openBlock(),n.createElementBlock("div",Ri,[n.createElementVNode("a",{href:String(o.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[n.createTextVNode(n.toDisplayString(s.value)+" ",1),i[0]||(i[0]=n.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,Fi)]))}}),[["__scopeId","data-v-e6eb07a6"]]),ji={class:"date-value"},zi={class:"text-sm text-gray-900"},Hi=ye(n.defineComponent({__name:"DateValue",props:{item:{}},setup(e){const t=e,s=n.computed(()=>{const o=t.item.value;if(o instanceof Date)return o.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof o=="string"){const i=new Date(o);if(!isNaN(i.getTime()))return i.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(o)});return(o,i)=>(n.openBlock(),n.createElementBlock("div",ji,[n.createElementVNode("span",zi,n.toDisplayString(s.value),1)]))}}),[["__scopeId","data-v-b9600618"]]),Ui={class:"status-value"},qi={key:0,class:"mr-1"},Wi=ye(n.defineComponent({__name:"StatusValue",props:{item:{}},setup(e){const t=e,s=n.computed(()=>{switch(String(t.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"bg-green-100 text-green-800";case"inactive":case"неактивний":case"pending":case"очікує":return"bg-yellow-100 text-yellow-800";case"error":case"помилка":case"failed":case"неуспішно":return"bg-red-100 text-red-800";case"draft":case"чернетка":return"bg-gray-100 text-gray-800";default:return"bg-blue-100 text-blue-800"}}),o=n.computed(()=>{switch(String(t.item.value).toLowerCase()){case"active":case"активний":case"успішно":case"success":return"fas fa-check-circle";case"inactive":case"неактивний":case"pending":case"очікує":return"fas fa-clock";case"error":case"помилка":case"failed":case"неуспішно":return"fas fa-exclamation-circle";case"draft":case"чернетка":return"fas fa-edit";default:return"fas fa-info-circle"}});return(i,l)=>(n.openBlock(),n.createElementBlock("div",Ui,[n.createElementVNode("span",{class:n.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",s.value])},[o.value?(n.openBlock(),n.createElementBlock("span",qi,[n.createElementVNode("i",{class:n.normalizeClass(o.value)},null,2)])):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(String(i.item.value)),1)],2)]))}}),[["__scopeId","data-v-c72e0b01"]]),Ki={class:"custom-value"},Gi={class:"text-sm text-gray-900"},Ji=ye(n.defineComponent({__name:"CustomValue",props:{item:{}},setup(e){return(t,s)=>(n.openBlock(),n.createElementBlock("div",Ki,[n.renderSlot(t.$slots,"default",{item:t.item,value:t.item.value},()=>[n.createElementVNode("span",Gi,n.toDisplayString(String(t.item.value)),1)],!0)]))}}),[["__scopeId","data-v-11a73810"]]),Yi=["id"],Zi={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Xi={key:1,class:"overflow-x-auto"},Qi={class:"min-w-full divide-y divide-gray-200"},Vi={class:"bg-white divide-y divide-gray-200"},er={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},tr={class:"flex items-center gap-2"},nr=["title"],sr={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},or={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},ir={class:"flex items-start gap-3"},rr={key:0,class:"flex-shrink-0"},lr={class:"flex-1 min-w-0"},ar={class:"flex items-center gap-2 mb-2"},cr={class:"text-sm font-medium text-gray-900"},dr=["title"],pr={key:3,class:"overflow-x-auto"},fr={class:"min-w-full divide-y divide-gray-200"},mr={class:"bg-white divide-y divide-gray-200"},hr={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},ur={class:"flex items-center gap-2"},gr=["title"],yr={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},St=ye(n.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(e){const t=s=>{switch(s.type){case"link":return Pi;case"date":return Hi;case"status":return Wi;case"custom":return Ji;default:return Li}};return(s,o)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["description-list-widget",s.className]),id:s.id,style:n.normalizeStyle(s.style)},[s.title?(n.openBlock(),n.createElementBlock("h3",Zi,n.toDisplayString(s.title),1)):n.createCommentVNode("",!0),s.view==="table"?(n.openBlock(),n.createElementBlock("div",Xi,[n.createElementVNode("table",Qi,[n.createElementVNode("tbody",Vi,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,i=>(n.openBlock(),n.createElementBlock("tr",{key:i.id||i.label},[n.createElementVNode("td",er,[n.createElementVNode("div",tr,[i.icon?(n.openBlock(),n.createElementBlock("i",{key:0,class:n.normalizeClass([i.icon,"text-gray-500"])},null,2)):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(i.label)+" ",1),i.tooltip?(n.openBlock(),n.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:i.tooltip},o[0]||(o[0]=[n.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,nr)):n.createCommentVNode("",!0)])]),n.createElementVNode("td",sr,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(t(i)),{item:i},null,8,["item"]))])]))),128))])])])):s.view==="grid"?(n.openBlock(),n.createElementBlock("div",or,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,i=>(n.openBlock(),n.createElementBlock("div",{key:i.id||i.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[n.createElementVNode("div",ir,[i.icon?(n.openBlock(),n.createElementBlock("div",rr,[n.createElementVNode("i",{class:n.normalizeClass([i.icon,"text-gray-500 text-lg"])},null,2)])):n.createCommentVNode("",!0),n.createElementVNode("div",lr,[n.createElementVNode("div",ar,[n.createElementVNode("h4",cr,n.toDisplayString(i.label),1),i.tooltip?(n.openBlock(),n.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:i.tooltip},o[1]||(o[1]=[n.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,dr)):n.createCommentVNode("",!0)]),(n.openBlock(),n.createBlock(n.resolveDynamicComponent(t(i)),{item:i},null,8,["item"]))])])]))),128))])):(n.openBlock(),n.createElementBlock("div",pr,[n.createElementVNode("table",fr,[n.createElementVNode("tbody",mr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.items,i=>(n.openBlock(),n.createElementBlock("tr",{key:i.id||i.label},[n.createElementVNode("td",hr,[n.createElementVNode("div",ur,[i.icon?(n.openBlock(),n.createElementBlock("i",{key:0,class:n.normalizeClass([i.icon,"text-gray-500"])},null,2)):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(i.label)+" ",1),i.tooltip?(n.openBlock(),n.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:i.tooltip},o[2]||(o[2]=[n.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,gr)):n.createCommentVNode("",!0)])]),n.createElementVNode("td",yr,[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(t(i)),{item:i},null,8,["item"]))])]))),128))])])]))],14,Yi))}}),[["__scopeId","data-v-36d43e50"]]),vr={draw:{toolbar:{actions:{title:"Скасувати малювання",text:"Скасувати"},finish:{title:"Завершити малювання",text:"Завершити"},undo:{title:"Видалити останню точку",text:"Видалити останню"},buttons:{polyline:"Намалювати лінію",polygon:"Намалювати полігон",rectangle:"Намалювати прямокутник",circle:"Намалювати коло",marker:"Додати точку",circlemarker:"Додати маркер-коло"}},handlers:{circle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати коло",end:"Відпустіть кнопку миші, щоб завершити"},radius:"Радіус"},circlemarker:{tooltip:{start:"Клацніть на карту, щоб додати маркер-коло"}},marker:{tooltip:{start:"Клацніть на карту, щоб додати точку"}},polygon:{tooltip:{start:"Клацніть, щоб почати малювати полігон",cont:"Клацайте, щоб продовжити малювати полігон",end:"Клацніть першу точку, щоб завершити полігон"}},polyline:{error:"<strong>Помилка:</strong> лінія не може перетинатися сама з собою",tooltip:{start:"Клацніть, щоб почати малювати лінію",cont:"Клацайте, щоб продовжити малювати лінію",end:"Клацніть останню точку, щоб завершити лінію"}},rectangle:{tooltip:{start:"Клацніть і тягніть, щоб намалювати прямокутник",end:"Відпустіть кнопку миші, щоб завершити"}},simpleshape:{tooltip:{end:"Відпустіть кнопку миші, щоб завершити"}}}},edit:{toolbar:{actions:{save:{title:"Зберегти зміни",text:"Зберегти"},cancel:{title:"Скасувати редагування",text:"Скасувати"},clearAll:{title:"Очистити всі шари",text:"Очистити все"}},buttons:{edit:"Редагувати шари",editDisabled:"Немає шарів для редагування",remove:"Видалити шари",removeDisabled:"Немає шарів для видалення"}},handlers:{edit:{tooltip:{text:"Перетягніть маркери, щоб редагувати шари",subtext:"Натисніть 'Скасувати', щоб повернутися"}},remove:{tooltip:{text:"Клацніть на шари, щоб видалити їх"}}}}};function br(e){return e?e.type==="FeatureCollection"||e.type==="Feature"?e:e.geom?{type:"Feature",geometry:{type:e.geom.type,coordinates:e.geom.coordinates},properties:{}}:e.type&&e.coordinates?{type:"Feature",geometry:e,properties:{}}:null:null}const kr={key:1,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},Er={class:"flex items-center justify-between p-2 border-b"},Nr={class:"p-2 border-b"},_r={class:"flex items-center"},xr=["value"],wr={class:"ml-2"},Sr={class:"p-2"},Cr={class:"flex items-center"},Br={class:"flex items-center"},Tr=["onUpdate:modelValue","onChange"],$r={class:"ml-2"},Ve=n.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},tms:{}},setup(e){const t=n.getCurrentInstance(),s=e,o=n.ref(null);let i,l;const r=v(),c=n.ref(Object.keys(r)[0]);let a;const p=n.ref(!0),h=n.ref(!1),d=n.ref(!1),m=n.ref(k());function k(){return s.tms?(Array.isArray(s.tms)?s.tms:s.tms?.split(",")).map((E,x)=>({url:s.pattern?s.pattern.replace("{{id}}",E):E,name:"Шар "+x,visible:!0,i:x})):[]}function b(){return new Promise((w,E)=>{if(window.L&&window.L.Draw)return w(0);const x=T=>{if(Array.from(document.styleSheets).some(I=>I?.href?.includes(T)))return;const C=document.createElement("link");C.rel="stylesheet",C.href=T,document.head.appendChild(C)},S=T=>new Promise((O,C)=>{const I=Array.from(document.scripts).find(M=>M.src===T);if(I){I.addEventListener("load",()=>O()),I.addEventListener("error",M=>C(M));return}const R=document.createElement("script");R.src=T,R.async=!0,R.onload=()=>O(),R.onerror=M=>C(M),document.body.appendChild(R)});x("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),x("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css"),S("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").then(()=>S("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js")).then(()=>w(0)).catch(E)})}let y=!1;n.onMounted(async()=>{await b(),L.drawLocal=vr;const w=t?.appContext.config.globalProperties.$settings?.center||[50,30];i=L.map(o.value,{zoomControl:!1}).setView(w,10),i.on("mousemove",x=>{y||(i.invalidateSize(),y=!0)}),L.control.zoom({position:"bottomright"}).addTo(i),a=L.tileLayer(r[c.value].url,{maxZoom:19}).addTo(i),l=new L.FeatureGroup().addTo(i),m.value.length&&_(0);const E=br(s.geom);if(E){const x=[];L.geoJSON(E).eachLayer(S=>x.push(S)),x.length&&l.addLayer(x[0]),l.toGeoJSON(),f()}});function f(w=30){const E=l.getLayers();if(!E.length)return;const S=L.featureGroup(E).getBounds();S&&S.isValid()&&i.fitBounds(S,{padding:[w,w],maxZoom:16})}function u(w){a&&a.removeFrom(i);const E=r[w];a=L.tileLayer(E.url,E.options||{}).addTo(i),a.bringToBack(),c.value=w}function g(){u(c.value)}function N(){l&&(p.value?l.addTo(i):l.removeFrom(i))}function _(w){const E=m.value[w];E.layer||(E.layer=L.tileLayer(E.url,{maxZoom:19})),E.visible?E.layer.addTo(i):E.layer.removeFrom(i)}function v(){return t?.appContext.config.globalProperties.$settings?.basemaps?t?.appContext.config.globalProperties.$settings?.basemaps.map((w,E)=>Object.assign(w,{key:`b${E}`,preview:w.preview||w.url.replace("{z}/{x}/{y}.png","13/4790/2762.png")})).reduce((w,E)=>({...w,[E.key]:E}),{}):{topo100:{url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/voyager/ua/13/4790/2762.png"},orto10:{url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png",preview:"https://data.gki.com.ua/api-user/rtile/orto10/ua/13/4790/2762.png"},osmb:{url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png",preview:"https://tile.openstreetmap.org.ua/styles/osm-bright/13/4790/2762.png"}}}return n.watch(h,()=>{setTimeout(()=>{i.invalidateSize()},50)}),(w,E)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(h.value?"fixed inset-0 w-screen h-screen z-[9999] bg-white":"relative min-h-[300px] h-full pb-[3.25rem]")},[n.createElementVNode("div",{ref_key:"mapContainer",ref:o,class:"w-full h-full min-h-[300px]"},null,512),d.value?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("div",{key:0,onClick:E[0]||(E[0]=x=>d.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer layers-button"}," Шари ")),d.value?(n.openBlock(),n.createElementBlock("div",kr,[n.createElementVNode("div",Er,[E[6]||(E[6]=n.createElementVNode("div",null,"Шари",-1)),(n.openBlock(),n.createElementBlock("svg",{onClick:E[1]||(E[1]=x=>d.value=!1),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-x w-4 h-4"},E[5]||(E[5]=[n.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),n.createElementVNode("path",{d:"M18 6l-12 12"},null,-1),n.createElementVNode("path",{d:"M6 6l12 12"},null,-1)])))]),n.createElementVNode("div",Nr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r),(x,S)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("label",_r,[n.withDirectives(n.createElementVNode("input",{type:"radio",name:"base-layer",value:S,"onUpdate:modelValue":E[2]||(E[2]=T=>c.value=T),onChange:g},null,40,xr),[[n.vModelRadio,c.value]]),n.createElementVNode("span",wr,n.toDisplayString(x.name||S),1)])]))),256))]),n.createElementVNode("div",Sr,[n.createElementVNode("label",Cr,[n.withDirectives(n.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":E[3]||(E[3]=x=>p.value=x),onChange:N},null,544),[[n.vModelCheckbox,p.value]]),E[7]||(E[7]=n.createElementVNode("span",{class:"ml-2"}," Геометрія/Межі ",-1))]),s.tms?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(m.value,x=>(n.openBlock(),n.createElementBlock("label",Br,[n.withDirectives(n.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":S=>x.visible=S,onChange:S=>_(x.i)},null,40,Tr),[[n.vModelCheckbox,x.visible]]),n.createElementVNode("span",$r,n.toDisplayString(x.name),1)]))),256)):n.createCommentVNode("",!0)])])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(["absolute z-[500] bg-white p-2 border rounded-lg cursor-pointer fullscreen-button",h.value?"bottom-[100px] right-[7px]":"bottom-[150px] right-[7px]"]),onClick:E[4]||(E[4]=x=>h.value=!h.value)},E[8]||(E[8]=[n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",class:"w-5 h-5"},[n.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4 8V4h4M20 8V4h-4M4 16v4h4m12-4v4h-4"})],-1)]),2)],2))}});/**
|
|
132
|
+
* @vue/shared v3.5.18
|
|
133
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
134
|
+
* @license MIT
|
|
135
|
+
**//*! #__NO_SIDE_EFFECTS__ */function re(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Dr=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const Ct=()=>{},et=()=>!1,Bt=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),de=Object.assign,le=Array.isArray,W=e=>typeof e=="string",Tt=e=>typeof e=="symbol",Or=e=>e!==null&&typeof e=="object",xn=re(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ir=re("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),$t=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},Ar=/-(\w)/g,pe=$t(e=>e.replace(Ar,(t,s)=>s?s.toUpperCase():"")),Dt=$t(e=>e.charAt(0).toUpperCase()+e.slice(1)),Mr=$t(e=>e?`on${Dt(e)}`:""),Me={1:"TEXT",2:"CLASS",4:"STYLE",8:"PROPS",16:"FULL_PROPS",32:"NEED_HYDRATION",64:"STABLE_FRAGMENT",128:"KEYED_FRAGMENT",256:"UNKEYED_FRAGMENT",512:"NEED_PATCH",1024:"DYNAMIC_SLOTS",2048:"DEV_ROOT_FRAGMENT",[-1]:"CACHED",[-2]:"BAIL"},Lr={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},Rr=/;(?![^(]*\))/g,Fr=/:([^]+)/,Pr=/\/\*[^]*?\*\//g;function jr(e){const t={};return e.replace(Pr,"").split(Rr).forEach(s=>{if(s){const o=s.split(Fr);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}const zr="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",Hr="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Ur="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",qr="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Wr=re(zr),Kr=re(Hr),Gr=re(Ur),Jr=re(qr);/**
|
|
136
|
+
* @vue/compiler-core v3.5.18
|
|
137
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
138
|
+
* @license MIT
|
|
139
|
+
**/const Le=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),Re=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),Ot=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),tt=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),wn=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),ve=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),Sn=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),It=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),At=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),Fe=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),Mt=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),Bn=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),Lt=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),Rt=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),Ft=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),Pt=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),jt=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),zt=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),Tn=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),$n=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),nt=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),st=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),Ht=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),Ut=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),Pe=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),je=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),qt=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),Wt=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),Yr=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),Kt=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),ot=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),Zr=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),Xr=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),Gt=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),Qr=Symbol(process.env.NODE_ENV!=="production"?"unref":""),Vr=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),Jt=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),Dn=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),Se={[Le]:"Fragment",[Re]:"Teleport",[Ot]:"Suspense",[tt]:"KeepAlive",[wn]:"BaseTransition",[ve]:"openBlock",[Sn]:"createBlock",[Cn]:"createElementBlock",[It]:"createVNode",[At]:"createElementVNode",[Fe]:"createCommentVNode",[Mt]:"createTextVNode",[Bn]:"createStaticVNode",[Lt]:"resolveComponent",[Rt]:"resolveDynamicComponent",[Ft]:"resolveDirective",[Pt]:"resolveFilter",[jt]:"withDirectives",[zt]:"renderList",[Tn]:"renderSlot",[$n]:"createSlots",[nt]:"toDisplayString",[st]:"mergeProps",[Ht]:"normalizeClass",[Ut]:"normalizeStyle",[Pe]:"normalizeProps",[je]:"guardReactiveProps",[qt]:"toHandlers",[Wt]:"camelize",[Yr]:"capitalize",[Kt]:"toHandlerKey",[ot]:"setBlockTracking",[Zr]:"pushScopeId",[Xr]:"popScopeId",[Gt]:"withCtx",[Qr]:"unref",[Vr]:"isRef",[Jt]:"withMemo",[Dn]:"isMemoSame"};function el(e){Object.getOwnPropertySymbols(e).forEach(t=>{Se[t]=e[t]})}const ee={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function tl(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ee}}function ze(e,t,s,o,i,l,r,c=!1,a=!1,p=!1,h=ee){return e&&(c?(e.helper(ve),e.helper(Te(e.inSSR,p))):e.helper(Be(e.inSSR,p)),r&&e.helper(jt)),{type:13,tag:t,props:s,children:o,patchFlag:i,dynamicProps:l,directives:r,isBlock:c,disableTracking:a,isComponent:p,loc:h}}function be(e,t=ee){return{type:17,loc:t,elements:e}}function se(e,t=ee){return{type:15,loc:t,properties:e}}function z(e,t){return{type:16,loc:ee,key:W(e)?B(e,!0):e,value:t}}function B(e,t=!1,s=ee,o=0){return{type:4,loc:s,content:e,isStatic:t,constType:t?3:o}}function oe(e,t=ee){return{type:8,loc:t,children:e}}function q(e,t=[],s=ee){return{type:14,loc:s,callee:e,arguments:t}}function Ce(e,t=void 0,s=!1,o=!1,i=ee){return{type:18,params:e,returns:t,newline:s,isSlot:o,loc:i}}function Yt(e,t,s,o=!0){return{type:19,test:e,consequent:t,alternate:s,newline:o,loc:ee}}function nl(e,t,s=!1,o=!1){return{type:20,index:e,value:t,needPauseTracking:s,inVOnce:o,needArraySpread:!1,loc:ee}}function sl(e){return{type:21,body:e,loc:ee}}function Be(e,t){return e||t?It:At}function Te(e,t){return e||t?Sn:Cn}function Zt(e,{helper:t,removeHelper:s,inSSR:o}){e.isBlock||(e.isBlock=!0,s(Be(o,e.isComponent)),t(ve),t(Te(o,e.isComponent)))}const On=new Uint8Array([123,123]),In=new Uint8Array([125,125]);function An(e){return e>=97&&e<=122||e>=65&&e<=90}function te(e){return e===32||e===10||e===9||e===12||e===13}function fe(e){return e===47||e===62||te(e)}function it(e){const t=new Uint8Array(e.length);for(let s=0;s<e.length;s++)t[s]=e.charCodeAt(s);return t}const K={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class ol{constructor(t,s){this.stack=t,this.cbs=s,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=On,this.delimiterClose=In,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=On,this.delimiterClose=In}getPos(t){let s=1,o=t+1;for(let i=this.newlines.length-1;i>=0;i--){const l=this.newlines[i];if(t>l){s=i+2,o=t-l;break}}return{column:o,line:s,offset:t}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(t){t===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t))}stateInterpolationOpen(t){if(t===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const s=this.index+1-this.delimiterOpen.length;s>this.sectionStart&&this.cbs.ontext(this.sectionStart,s),this.state=3,this.sectionStart=s}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(t)):(this.state=1,this.stateText(t))}stateInterpolation(t){t===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(t))}stateInterpolationClose(t){t===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(t))}stateSpecialStartSequence(t){const s=this.sequenceIndex===this.currentSequence.length;if(!(s?fe(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!s){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(t)}stateInRCDATA(t){if(this.sequenceIndex===this.currentSequence.length){if(t===62||te(t)){const s=this.index-this.currentSequence.length;if(this.sectionStart<s){const o=this.index;this.index=s,this.cbs.ontext(this.sectionStart,s),this.index=o}this.sectionStart=s+2,this.stateInClosingTagName(t),this.inRCDATA=!1;return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===K.TitleEnd||this.currentSequence===K.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===60)}stateCDATASequence(t){t===K.Cdata[this.sequenceIndex]?++this.sequenceIndex===K.Cdata.length&&(this.state=28,this.currentSequence=K.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);if(s===10&&this.newlines.push(this.index),s===t)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===K.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(t,s){this.enterRCDATA(t,s),this.state=31}enterRCDATA(t,s){this.inRCDATA=!0,this.currentSequence=t,this.sequenceIndex=s}stateBeforeTagName(t){t===33?(this.state=22,this.sectionStart=this.index+1):t===63?(this.state=24,this.sectionStart=this.index+1):An(t)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:t===116?this.state=30:this.state=t===115?29:6):t===47?this.state=8:(this.state=1,this.stateText(t))}stateInTagName(t){fe(t)&&this.handleTagName(t)}stateInSFCRootTagName(t){if(fe(t)){const s=this.buffer.slice(this.sectionStart,this.index);s!=="template"&&this.enterRCDATA(it("</"+s),0),this.handleTagName(t)}}handleTagName(t){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)}stateBeforeClosingTagName(t){te(t)||(t===62?(process.env.NODE_ENV!=="production"&&this.cbs.onerr(14,this.index),this.state=1,this.sectionStart=this.index+1):(this.state=An(t)?9:27,this.sectionStart=this.index))}stateInClosingTagName(t){(t===62||te(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){t===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(t){t===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):t===47?(this.state=7,process.env.NODE_ENV!=="production"&&this.peek()!==62&&this.cbs.onerr(22,this.index)):t===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):te(t)||(process.env.NODE_ENV!=="production"&&t===61&&this.cbs.onerr(19,this.index),this.handleAttrStart(t))}handleAttrStart(t){t===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):t===46||t===58||t===64||t===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):te(t)||(this.state=11,this.stateBeforeAttrName(t))}stateInAttrName(t){t===61||fe(t)?(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(t)):process.env.NODE_ENV!=="production"&&(t===34||t===39||t===60)&&this.cbs.onerr(17,this.index)}stateInDirName(t){t===61||fe(t)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):t===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(t){t===61||fe(t)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===91?this.state=15:t===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(t){t===93?this.state=14:(t===61||fe(t))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(t),process.env.NODE_ENV!=="production"&&this.cbs.onerr(27,this.index))}stateInDirModifier(t){t===61||fe(t)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(t){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(t)}stateAfterAttrName(t){t===61?this.state=18:t===47||t===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)):te(t)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(t))}stateBeforeAttrValue(t){t===34?(this.state=19,this.sectionStart=this.index+1):t===39?(this.state=20,this.sectionStart=this.index+1):te(t)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(t))}handleInAttrValue(t,s){(t===s||this.fastForwardTo(s))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(s===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(t){this.handleInAttrValue(t,34)}stateInAttrValueSingleQuotes(t){this.handleInAttrValue(t,39)}stateInAttrValueNoQuotes(t){te(t)||t===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(t)):(process.env.NODE_ENV!=="production"&&t===34||t===39||t===60||t===61||t===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(t){t===91?(this.state=26,this.sequenceIndex=0):this.state=t===45?25:23}stateInDeclaration(t){(t===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(t){t===45?(this.state=28,this.currentSequence=K.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(t){(t===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){t===K.ScriptEnd[3]?this.startSpecial(K.ScriptEnd,4):t===K.StyleEnd[3]?this.startSpecial(K.StyleEnd,4):(this.state=6,this.stateInTagName(t))}stateBeforeSpecialT(t){t===K.TitleEnd[3]?this.startSpecial(K.TitleEnd,4):t===K.TextareaEnd[3]?this.startSpecial(K.TextareaEnd,4):(this.state=6,this.stateInTagName(t))}startEntity(){}stateInEntity(){}parse(t){for(this.buffer=t;this.index<this.buffer.length;){const s=this.buffer.charCodeAt(this.index);switch(s===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(s);break}case 2:{this.stateInterpolationOpen(s);break}case 3:{this.stateInterpolation(s);break}case 4:{this.stateInterpolationClose(s);break}case 31:{this.stateSpecialStartSequence(s);break}case 32:{this.stateInRCDATA(s);break}case 26:{this.stateCDATASequence(s);break}case 19:{this.stateInAttrValueDoubleQuotes(s);break}case 12:{this.stateInAttrName(s);break}case 13:{this.stateInDirName(s);break}case 14:{this.stateInDirArg(s);break}case 15:{this.stateInDynamicDirArg(s);break}case 16:{this.stateInDirModifier(s);break}case 28:{this.stateInCommentLike(s);break}case 27:{this.stateInSpecialComment(s);break}case 11:{this.stateBeforeAttrName(s);break}case 6:{this.stateInTagName(s);break}case 34:{this.stateInSFCRootTagName(s);break}case 9:{this.stateInClosingTagName(s);break}case 5:{this.stateBeforeTagName(s);break}case 17:{this.stateAfterAttrName(s);break}case 20:{this.stateInAttrValueSingleQuotes(s);break}case 18:{this.stateBeforeAttrValue(s);break}case 8:{this.stateBeforeClosingTagName(s);break}case 10:{this.stateAfterClosingTagName(s);break}case 29:{this.stateBeforeSpecialS(s);break}case 30:{this.stateBeforeSpecialT(s);break}case 21:{this.stateInAttrValueNoQuotes(s);break}case 7:{this.stateInSelfClosingTag(s);break}case 23:{this.stateInDeclaration(s);break}case 22:{this.stateBeforeDeclaration(s);break}case 25:{this.stateBeforeComment(s);break}case 24:{this.stateInProcessingInstruction(s);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const t=this.buffer.length;this.sectionStart>=t||(this.state===28?this.currentSequence===K.CdataEnd?this.cbs.oncdata(this.sectionStart,t):this.cbs.oncomment(this.sectionStart,t):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,s){}}const il={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Vue 3 unless the "is" value is explicitly prefixed with "vue:".',link:"https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html"},COMPILER_V_BIND_SYNC:{message:e=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${e}.sync\` should be changed to \`v-model:${e}\`.`,link:"https://v3-migration.vuejs.org/breaking-changes/v-model.html"},COMPILER_V_BIND_OBJECT_ORDER:{message:'v-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before v-bind in the case of conflict. To retain 2.x behavior, move v-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://v3-migration.vuejs.org/breaking-changes/v-bind.html"},COMPILER_V_ON_NATIVE:{message:".native modifier for v-on has been removed as is no longer necessary.",link:"https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html"},COMPILER_V_IF_V_FOR_PRECEDENCE:{message:"v-if / v-for precedence when used on the same element has changed in Vue 3: v-if now takes higher precedence and will no longer have access to v-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters v-for data source.",link:"https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Vue 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Vue 3.',link:"https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Vue 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://v3-migration.vuejs.org/breaking-changes/filters.html"}};function Xt(e,{compatConfig:t}){const s=t&&t[e];return e==="MODE"?s||3:s}function me(e,t){const s=Xt("MODE",t),o=Xt(e,t);return s===3?o===!0:o!==!1}function $e(e,t,s,...o){const i=me(e,t);return process.env.NODE_ENV!=="production"&&i&&rt(e,t,s,...o),i}function rt(e,t,s,...o){if(Xt(e,t)==="suppress-warning")return;const{message:l,link:r}=il[e],c=`(deprecation ${e}) ${typeof l=="function"?l(...o):l}${r?`
|
|
140
|
+
Details: ${r}`:""}`,a=new SyntaxError(c);a.code=e,s&&(a.loc=s),t.onWarn(a)}function Qt(e){throw e}function Mn(e){process.env.NODE_ENV!=="production"&&console.warn(`[Vue warn] ${e.message}`)}function A(e,t,s,o){const i=process.env.NODE_ENV!=="production"?(s||rl)[e]+(o||""):`https://vuejs.org/error-reference/#compiler-${e}`,l=new SyntaxError(String(i));return l.code=e,l.loc=t,l}const rl={0:"Illegal comment.",1:"CDATA section is allowed only in XML context.",2:"Duplicate attribute.",3:"End tag cannot have attributes.",4:"Illegal '/' in tags.",5:"Unexpected EOF in tag.",6:"Unexpected EOF in CDATA section.",7:"Unexpected EOF in comment.",8:"Unexpected EOF in script.",9:"Unexpected EOF in tag.",10:"Incorrectly closed comment.",11:"Incorrectly opened comment.",12:"Illegal tag name. Use '<' to print '<'.",13:"Attribute value was expected.",14:"End tag name was expected.",15:"Whitespace was expected.",16:"Unexpected '<!--' in comment.",17:`Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"v-if/v-else-if is missing expression.",29:"v-if/else branches must use unique keys.",30:"v-else/v-else-if has no adjacent v-if or v-else-if.",31:"v-for is missing expression.",32:"v-for has invalid expression.",33:"<template v-for> key should be placed on the <template> tag.",34:"v-bind is missing expression.",52:"v-bind with same-name shorthand only allows static argument.",35:"v-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"v-slot can only be used on components or <template> tags.",41:"v-model is missing expression.",42:"v-model value must be a valid JavaScript member expression.",43:"v-model cannot be used on v-for or v-slot scope variables because they are not writable.",44:`v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
141
|
+
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""},Z=e=>e.type===4&&e.isStatic;function Ln(e){switch(e){case"Teleport":case"teleport":return Re;case"Suspense":case"suspense":return Ot;case"KeepAlive":case"keep-alive":return tt;case"BaseTransition":case"base-transition":return wn}}const ll=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Vt=e=>!ll.test(e),al=/[A-Za-z_$\xA0-\uFFFF]/,cl=/[\.\?\w$\xA0-\uFFFF]/,dl=/\s+[.[]\s*|\s*[.[]\s+/g,Rn=e=>e.type===4?e.content:e.loc.source,Fn=e=>{const t=Rn(e).trim().replace(dl,c=>c.trim());let s=0,o=[],i=0,l=0,r=null;for(let c=0;c<t.length;c++){const a=t.charAt(c);switch(s){case 0:if(a==="[")o.push(s),s=1,i++;else if(a==="(")o.push(s),s=2,l++;else if(!(c===0?al:cl).test(a))return!1;break;case 1:a==="'"||a==='"'||a==="`"?(o.push(s),s=3,r=a):a==="["?i++:a==="]"&&(--i||(s=o.pop()));break;case 2:if(a==="'"||a==='"'||a==="`")o.push(s),s=3,r=a;else if(a==="(")l++;else if(a===")"){if(c===t.length-1)return!1;--l||(s=o.pop())}break;case 3:a===r&&(s=o.pop(),r=null);break}}return!i&&!l},pl=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,fl=e=>pl.test(Rn(e));function Pn(e,t){if(!e)throw new Error(t||"unexpected compiler condition")}function X(e,t,s=!1){for(let o=0;o<e.props.length;o++){const i=e.props[o];if(i.type===7&&(s||i.exp)&&(W(t)?i.name===t:t.test(i.name)))return i}}function He(e,t,s=!1,o=!1){for(let i=0;i<e.props.length;i++){const l=e.props[i];if(l.type===6){if(s)continue;if(l.name===t&&(l.value||o))return l}else if(l.name==="bind"&&(l.exp||o)&&he(l.arg,t))return l}}function he(e,t){return!!(e&&Z(e)&&e.content===t)}function ml(e){return e.props.some(t=>t.type===7&&t.name==="bind"&&(!t.arg||t.arg.type!==4||!t.arg.isStatic))}function en(e){return e.type===5||e.type===2}function jn(e){return e.type===7&&e.name==="pre"}function hl(e){return e.type===7&&e.name==="slot"}function lt(e){return e.type===1&&e.tagType===3}function at(e){return e.type===1&&e.tagType===2}const ul=new Set([Pe,je]);function zn(e,t=[]){if(e&&!W(e)&&e.type===14){const s=e.callee;if(!W(s)&&ul.has(s))return zn(e.arguments[0],t.concat(e))}return[e,t]}function ct(e,t,s){let o,i=e.type===13?e.props:e.arguments[2],l=[],r;if(i&&!W(i)&&i.type===14){const c=zn(i);i=c[0],l=c[1],r=l[l.length-1]}if(i==null||W(i))o=se([t]);else if(i.type===14){const c=i.arguments[0];!W(c)&&c.type===15?Hn(t,c)||c.properties.unshift(t):i.callee===qt?o=q(s.helper(st),[se([t]),i]):i.arguments.unshift(se([t])),!o&&(o=i)}else i.type===15?(Hn(t,i)||i.properties.unshift(t),o=i):(o=q(s.helper(st),[se([t]),i]),r&&r.callee===je&&(r=l[l.length-2]));e.type===13?r?r.arguments[0]=o:e.props=o:r?r.arguments[0]=o:e.arguments[2]=o}function Hn(e,t){let s=!1;if(e.key.type===4){const o=e.key.content;s=t.properties.some(i=>i.key.type===4&&i.key.content===o)}return s}function Ue(e,t){return`_${t}_${e.replace(/[^\w]/g,(s,o)=>s==="-"?"_":e.charCodeAt(o).toString())}`}function gl(e){return e.type===14&&e.callee===Jt?e.arguments[1].returns:e}const yl=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Un={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:et,isPreTag:et,isIgnoreNewlineTag:et,isCustomElement:et,onError:Qt,onWarn:Mn,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let D=Un,qe=null,ae="",J=null,$=null,Q="",ce=-1,ke=-1,tn=0,ue=!1,nn=null;const P=[],F=new ol(P,{onerr:V,ontext(e,t){dt(G(e,t),e,t)},ontextentity(e,t,s){dt(e,t,s)},oninterpolation(e,t){if(ue)return dt(G(e,t),e,t);let s=e+F.delimiterOpen.length,o=t-F.delimiterClose.length;for(;te(ae.charCodeAt(s));)s++;for(;te(ae.charCodeAt(o-1));)o--;let i=G(s,o);i.includes("&")&&(i=D.decodeEntities(i,!1)),sn({type:5,content:ft(i,!1,H(s,o)),loc:H(e,t)})},onopentagname(e,t){const s=G(e,t);J={type:1,tag:s,ns:D.getNamespace(s,P[0],D.ns),tagType:0,props:[],children:[],loc:H(e-1,t),codegenNode:void 0}},onopentagend(e){Wn(e)},onclosetag(e,t){const s=G(e,t);if(!D.isVoidTag(s)){let o=!1;for(let i=0;i<P.length;i++)if(P[i].tag.toLowerCase()===s.toLowerCase()){o=!0,i>0&&V(24,P[0].loc.start.offset);for(let r=0;r<=i;r++){const c=P.shift();pt(c,t,r<i)}break}o||V(23,Kn(e,60))}},onselfclosingtag(e){const t=J.tag;J.isSelfClosing=!0,Wn(e),P[0]&&P[0].tag===t&&pt(P.shift(),e)},onattribname(e,t){$={type:6,name:G(e,t),nameLoc:H(e,t),value:void 0,loc:H(e)}},ondirname(e,t){const s=G(e,t),o=s==="."||s===":"?"bind":s==="@"?"on":s==="#"?"slot":s.slice(2);if(!ue&&o===""&&V(26,e),ue||o==="")$={type:6,name:s,nameLoc:H(e,t),value:void 0,loc:H(e)};else if($={type:7,name:o,rawName:s,exp:void 0,arg:void 0,modifiers:s==="."?[B("prop")]:[],loc:H(e)},o==="pre"){ue=F.inVPre=!0,nn=J;const i=J.props;for(let l=0;l<i.length;l++)i[l].type===7&&(i[l]=Bl(i[l]))}},ondirarg(e,t){if(e===t)return;const s=G(e,t);if(ue&&!jn($))$.name+=s,Ee($.nameLoc,t);else{const o=s[0]!=="[";$.arg=ft(o?s:s.slice(1,-1),o,H(e,t),o?3:0)}},ondirmodifier(e,t){const s=G(e,t);if(ue&&!jn($))$.name+="."+s,Ee($.nameLoc,t);else if($.name==="slot"){const o=$.arg;o&&(o.content+="."+s,Ee(o.loc,t))}else{const o=B(s,!0,H(e,t));$.modifiers.push(o)}},onattribdata(e,t){Q+=G(e,t),ce<0&&(ce=e),ke=t},onattribentity(e,t,s){Q+=e,ce<0&&(ce=t),ke=s},onattribnameend(e){const t=$.loc.start.offset,s=G(t,e);$.type===7&&($.rawName=s),J.props.some(o=>(o.type===7?o.rawName:o.name)===s)&&V(2,t)},onattribend(e,t){if(J&&$){if(Ee($.loc,t),e!==0)if(Q.includes("&")&&(Q=D.decodeEntities(Q,!0)),$.type===6)$.name==="class"&&(Q=Yn(Q).trim()),e===1&&!Q&&V(13,t),$.value={type:2,content:Q,loc:e===1?H(ce,ke):H(ce-1,ke+1)},F.inSFCRoot&&J.tag==="template"&&$.name==="lang"&&Q&&Q!=="html"&&F.enterRCDATA(it("</template"),0);else{let s=0;$.exp=ft(Q,!1,H(ce,ke),0,s),$.name==="for"&&($.forParseResult=bl($.exp));let o=-1;$.name==="bind"&&(o=$.modifiers.findIndex(i=>i.content==="sync"))>-1&&$e("COMPILER_V_BIND_SYNC",D,$.loc,$.arg.loc.source)&&($.name="model",$.modifiers.splice(o,1))}($.type!==7||$.name!=="pre")&&J.props.push($)}Q="",ce=ke=-1},oncomment(e,t){D.comments&&sn({type:3,content:G(e,t),loc:H(e-4,t+3)})},onend(){const e=ae.length;if(process.env.NODE_ENV!=="production"&&F.state!==1)switch(F.state){case 5:case 8:V(5,e);break;case 3:case 4:V(25,F.sectionStart);break;case 28:F.currentSequence===K.CdataEnd?V(6,e):V(7,e);break;case 6:case 7:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:V(9,e);break}for(let t=0;t<P.length;t++)pt(P[t],e-1),V(24,P[t].loc.start.offset)},oncdata(e,t){P[0].ns!==0?dt(G(e,t),e,t):V(1,e-9)},onprocessinginstruction(e){(P[0]?P[0].ns:D.ns)===0&&V(21,e-1)}}),qn=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,vl=/^\(|\)$/g;function bl(e){const t=e.loc,s=e.content,o=s.match(yl);if(!o)return;const[,i,l]=o,r=(d,m,k=!1)=>{const b=t.start.offset+m,y=b+d.length;return ft(d,!1,H(b,y),0,k?1:0)},c={source:r(l.trim(),s.indexOf(l,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let a=i.trim().replace(vl,"").trim();const p=i.indexOf(a),h=a.match(qn);if(h){a=a.replace(qn,"").trim();const d=h[1].trim();let m;if(d&&(m=s.indexOf(d,p+a.length),c.key=r(d,m,!0)),h[2]){const k=h[2].trim();k&&(c.index=r(k,s.indexOf(k,c.key?m+d.length:p+a.length),!0))}}return a&&(c.value=r(a,p,!0)),c}function G(e,t){return ae.slice(e,t)}function Wn(e){F.inSFCRoot&&(J.innerLoc=H(e+1,e+1)),sn(J);const{tag:t,ns:s}=J;s===0&&D.isPreTag(t)&&tn++,D.isVoidTag(t)?pt(J,e):(P.unshift(J),(s===1||s===2)&&(F.inXML=!0)),J=null}function dt(e,t,s){{const l=P[0]&&P[0].tag;l!=="script"&&l!=="style"&&e.includes("&")&&(e=D.decodeEntities(e,!1))}const o=P[0]||qe,i=o.children[o.children.length-1];i&&i.type===2?(i.content+=e,Ee(i.loc,s)):o.children.push({type:2,content:e,loc:H(t,s)})}function pt(e,t,s=!1){s?Ee(e.loc,Kn(t,60)):Ee(e.loc,kl(t,62)+1),F.inSFCRoot&&(e.children.length?e.innerLoc.end=de({},e.children[e.children.length-1].loc.end):e.innerLoc.end=de({},e.innerLoc.start),e.innerLoc.source=G(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:o,ns:i,children:l}=e;if(ue||(o==="slot"?e.tagType=2:Gn(e)?e.tagType=3:Nl(e)&&(e.tagType=1)),F.inRCDATA||(e.children=Jn(l)),i===0&&D.isIgnoreNewlineTag(o)){const r=l[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}i===0&&D.isPreTag(o)&&tn--,nn===e&&(ue=F.inVPre=!1,nn=null),F.inXML&&(P[0]?P[0].ns:D.ns)===0&&(F.inXML=!1);{const r=e.props;if(process.env.NODE_ENV!=="production"&&me("COMPILER_V_IF_V_FOR_PRECEDENCE",D)){let a=!1,p=!1;for(let h=0;h<r.length;h++){const d=r[h];if(d.type===7&&(d.name==="if"?a=!0:d.name==="for"&&(p=!0)),a&&p){rt("COMPILER_V_IF_V_FOR_PRECEDENCE",D,e.loc);break}}}if(!F.inSFCRoot&&me("COMPILER_NATIVE_TEMPLATE",D)&&e.tag==="template"&&!Gn(e)){process.env.NODE_ENV!=="production"&&rt("COMPILER_NATIVE_TEMPLATE",D,e.loc);const a=P[0]||qe,p=a.children.indexOf(e);a.children.splice(p,1,...e.children)}const c=r.find(a=>a.type===6&&a.name==="inline-template");c&&$e("COMPILER_INLINE_TEMPLATE",D,c.loc)&&e.children.length&&(c.value={type:2,content:G(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:c.loc})}}function kl(e,t){let s=e;for(;ae.charCodeAt(s)!==t&&s<ae.length-1;)s++;return s}function Kn(e,t){let s=e;for(;ae.charCodeAt(s)!==t&&s>=0;)s--;return s}const El=new Set(["if","else","else-if","for","slot"]);function Gn({tag:e,props:t}){if(e==="template"){for(let s=0;s<t.length;s++)if(t[s].type===7&&El.has(t[s].name))return!0}return!1}function Nl({tag:e,props:t}){if(D.isCustomElement(e))return!1;if(e==="component"||_l(e.charCodeAt(0))||Ln(e)||D.isBuiltInComponent&&D.isBuiltInComponent(e)||D.isNativeTag&&!D.isNativeTag(e))return!0;for(let s=0;s<t.length;s++){const o=t[s];if(o.type===6){if(o.name==="is"&&o.value){if(o.value.content.startsWith("vue:"))return!0;if($e("COMPILER_IS_ON_ELEMENT",D,o.loc))return!0}}else if(o.name==="bind"&&he(o.arg,"is")&&$e("COMPILER_IS_ON_ELEMENT",D,o.loc))return!0}return!1}function _l(e){return e>64&&e<91}const xl=/\r\n/g;function Jn(e){const t=D.whitespace!=="preserve";let s=!1;for(let o=0;o<e.length;o++){const i=e[o];if(i.type===2)if(tn)i.content=i.content.replace(xl,`
|
|
142
|
+
`);else if(wl(i.content)){const l=e[o-1]&&e[o-1].type,r=e[o+1]&&e[o+1].type;!l||!r||t&&(l===3&&(r===3||r===1)||l===1&&(r===3||r===1&&Sl(i.content)))?(s=!0,e[o]=null):i.content=" "}else t&&(i.content=Yn(i.content))}return s?e.filter(Boolean):e}function wl(e){for(let t=0;t<e.length;t++)if(!te(e.charCodeAt(t)))return!1;return!0}function Sl(e){for(let t=0;t<e.length;t++){const s=e.charCodeAt(t);if(s===10||s===13)return!0}return!1}function Yn(e){let t="",s=!1;for(let o=0;o<e.length;o++)te(e.charCodeAt(o))?s||(t+=" ",s=!0):(t+=e[o],s=!1);return t}function sn(e){(P[0]||qe).children.push(e)}function H(e,t){return{start:F.getPos(e),end:t==null?t:F.getPos(t),source:t==null?t:G(e,t)}}function Cl(e){return H(e.start.offset,e.end.offset)}function Ee(e,t){e.end=F.getPos(t),e.source=G(e.start.offset,t)}function Bl(e){const t={type:6,name:e.rawName,nameLoc:H(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const s=e.exp.loc;s.end.offset<e.loc.end.offset&&(s.start.offset--,s.start.column--,s.end.offset++,s.end.column++),t.value={type:2,content:e.exp.content,loc:s}}return t}function ft(e,t=!1,s,o=0,i=0){return B(e,t,s,o)}function V(e,t,s){D.onError(A(e,H(t,t),void 0,s))}function Tl(){F.reset(),J=null,$=null,Q="",ce=-1,ke=-1,P.length=0}function $l(e,t){if(Tl(),ae=e,D=de({},Un),t){let i;for(i in t)t[i]!=null&&(D[i]=t[i])}if(process.env.NODE_ENV!=="production"&&!D.decodeEntities)throw new Error("[@vue/compiler-core] decodeEntities option is required in browser builds.");F.mode=D.parseMode==="html"?1:D.parseMode==="sfc"?2:0,F.inXML=D.ns===1||D.ns===2;const s=t&&t.delimiters;s&&(F.delimiterOpen=it(s[0]),F.delimiterClose=it(s[1]));const o=qe=tl([],e);return F.parse(ae),o.loc=H(0,e.length),o.children=Jn(o.children),qe=null,o}function Dl(e,t){mt(e,void 0,t,!!Zn(e))}function Zn(e){const t=e.children.filter(s=>s.type!==3);return t.length===1&&t[0].type===1&&!at(t[0])?t[0]:null}function mt(e,t,s,o=!1,i=!1){const{children:l}=e,r=[];for(let d=0;d<l.length;d++){const m=l[d];if(m.type===1&&m.tagType===0){const k=o?0:ne(m,s);if(k>0){if(k>=2){m.codegenNode.patchFlag=-1,r.push(m);continue}}else{const b=m.codegenNode;if(b.type===13){const y=b.patchFlag;if((y===void 0||y===512||y===1)&&Qn(m,s)>=2){const f=Vn(m);f&&(b.props=s.hoist(f))}b.dynamicProps&&(b.dynamicProps=s.hoist(b.dynamicProps))}}}else if(m.type===12&&(o?0:ne(m,s))>=2){m.codegenNode.type===14&&m.codegenNode.arguments.length>0&&m.codegenNode.arguments.push(-1+(process.env.NODE_ENV!=="production"?` /* ${Me[-1]} */`:"")),r.push(m);continue}if(m.type===1){const k=m.tagType===1;k&&s.scopes.vSlot++,mt(m,e,s,!1,i),k&&s.scopes.vSlot--}else if(m.type===11)mt(m,e,s,m.children.length===1,!0);else if(m.type===9)for(let k=0;k<m.branches.length;k++)mt(m.branches[k],e,s,m.branches[k].children.length===1,i)}let c=!1;const a=[];if(r.length===l.length&&e.type===1){if(e.tagType===0&&e.codegenNode&&e.codegenNode.type===13&&le(e.codegenNode.children))e.codegenNode.children=p(be(e.codegenNode.children)),c=!0;else if(e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!le(e.codegenNode.children)&&e.codegenNode.children.type===15){const d=h(e.codegenNode,"default");d&&(a.push(s.cached.length),d.returns=p(be(d.returns)),c=!0)}else if(e.tagType===3&&t&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!le(t.codegenNode.children)&&t.codegenNode.children.type===15){const d=X(e,"slot",!0),m=d&&d.arg&&h(t.codegenNode,d.arg);m&&(a.push(s.cached.length),m.returns=p(be(m.returns)),c=!0)}}if(!c)for(const d of r)a.push(s.cached.length),d.codegenNode=s.cache(d.codegenNode);a.length&&e.type===1&&e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!le(e.codegenNode.children)&&e.codegenNode.children.type===15&&e.codegenNode.children.properties.push(z("__",B(JSON.stringify(a),!1)));function p(d){const m=s.cache(d);return i&&s.hmr&&(m.needArraySpread=!0),m}function h(d,m){if(d.children&&!le(d.children)&&d.children.type===15){const k=d.children.properties.find(b=>b.key===m||b.key.content===m);return k&&k.value}}r.length&&s.transformHoist&&s.transformHoist(l,s,e)}function ne(e,t){const{constantCache:s}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;const o=s.get(e);if(o!==void 0)return o;const i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!=="svg"&&e.tag!=="foreignObject"&&e.tag!=="math")return 0;if(i.patchFlag===void 0){let r=3;const c=Qn(e,t);if(c===0)return s.set(e,0),0;c<r&&(r=c);for(let a=0;a<e.children.length;a++){const p=ne(e.children[a],t);if(p===0)return s.set(e,0),0;p<r&&(r=p)}if(r>1)for(let a=0;a<e.props.length;a++){const p=e.props[a];if(p.type===7&&p.name==="bind"&&p.exp){const h=ne(p.exp,t);if(h===0)return s.set(e,0),0;h<r&&(r=h)}}if(i.isBlock){for(let a=0;a<e.props.length;a++)if(e.props[a].type===7)return s.set(e,0),0;t.removeHelper(ve),t.removeHelper(Te(t.inSSR,i.isComponent)),i.isBlock=!1,t.helper(Be(t.inSSR,i.isComponent))}return s.set(e,r),r}else return s.set(e,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return ne(e.content,t);case 4:return e.constType;case 8:let l=3;for(let r=0;r<e.children.length;r++){const c=e.children[r];if(W(c)||Tt(c))continue;const a=ne(c,t);if(a===0)return 0;a<l&&(l=a)}return l;case 20:return 2;default:return process.env.NODE_ENV,0}}const Ol=new Set([Ht,Ut,Pe,je]);function Xn(e,t){if(e.type===14&&!W(e.callee)&&Ol.has(e.callee)){const s=e.arguments[0];if(s.type===4)return ne(s,t);if(s.type===14)return Xn(s,t)}return 0}function Qn(e,t){let s=3;const o=Vn(e);if(o&&o.type===15){const{properties:i}=o;for(let l=0;l<i.length;l++){const{key:r,value:c}=i[l],a=ne(r,t);if(a===0)return a;a<s&&(s=a);let p;if(c.type===4?p=ne(c,t):c.type===14?p=Xn(c,t):p=0,p===0)return p;p<s&&(s=p)}}return s}function Vn(e){const t=e.codegenNode;if(t.type===13)return t.props}function Il(e,{filename:t="",prefixIdentifiers:s=!1,hoistStatic:o=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:r=[],directiveTransforms:c={},transformHoist:a=null,isBuiltInComponent:p=Ct,isCustomElement:h=Ct,expressionPlugins:d=[],scopeId:m=null,slotted:k=!0,ssr:b=!1,inSSR:y=!1,ssrCssVars:f="",bindingMetadata:u=Dr,inline:g=!1,isTS:N=!1,onError:_=Qt,onWarn:v=Mn,compatConfig:w}){const E=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),x={filename:t,selfName:E&&Dt(pe(E[1])),prefixIdentifiers:s,hoistStatic:o,hmr:i,cacheHandlers:l,nodeTransforms:r,directiveTransforms:c,transformHoist:a,isBuiltInComponent:p,isCustomElement:h,expressionPlugins:d,scopeId:m,slotted:k,ssr:b,inSSR:y,ssrCssVars:f,bindingMetadata:u,inline:g,isTS:N,onError:_,onWarn:v,compatConfig:w,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(S){const T=x.helpers.get(S)||0;return x.helpers.set(S,T+1),S},removeHelper(S){const T=x.helpers.get(S);if(T){const O=T-1;O?x.helpers.set(S,O):x.helpers.delete(S)}},helperString(S){return`_${Se[x.helper(S)]}`},replaceNode(S){if(process.env.NODE_ENV!=="production"){if(!x.currentNode)throw new Error("Node being replaced is already removed.");if(!x.parent)throw new Error("Cannot replace root node.")}x.parent.children[x.childIndex]=x.currentNode=S},removeNode(S){if(process.env.NODE_ENV!=="production"&&!x.parent)throw new Error("Cannot remove root node.");const T=x.parent.children,O=S?T.indexOf(S):x.currentNode?x.childIndex:-1;if(process.env.NODE_ENV!=="production"&&O<0)throw new Error("node being removed is not a child of current parent");!S||S===x.currentNode?(x.currentNode=null,x.onNodeRemoved()):x.childIndex>O&&(x.childIndex--,x.onNodeRemoved()),x.parent.children.splice(O,1)},onNodeRemoved:Ct,addIdentifiers(S){},removeIdentifiers(S){},hoist(S){W(S)&&(S=B(S)),x.hoists.push(S);const T=B(`_hoisted_${x.hoists.length}`,!1,S.loc,2);return T.hoisted=S,T},cache(S,T=!1,O=!1){const C=nl(x.cached.length,S,T,O);return x.cached.push(C),C}};return x.filters=new Set,x}function Al(e,t){const s=Il(e,t);ht(e,s),t.hoistStatic&&Dl(e,s),t.ssr||Ml(e,s),e.helpers=new Set([...s.helpers.keys()]),e.components=[...s.components],e.directives=[...s.directives],e.imports=s.imports,e.hoists=s.hoists,e.temps=s.temps,e.cached=s.cached,e.transformed=!0,e.filters=[...s.filters]}function Ml(e,t){const{helper:s}=t,{children:o}=e;if(o.length===1){const i=Zn(e);if(i&&i.codegenNode){const l=i.codegenNode;l.type===13&&Zt(l,t),e.codegenNode=l}else e.codegenNode=o[0]}else if(o.length>1){let i=64;process.env.NODE_ENV!=="production"&&o.filter(l=>l.type!==3).length===1&&(i|=2048),e.codegenNode=ze(t,s(Le),void 0,e.children,i,void 0,void 0,!0,void 0,!1)}}function Ll(e,t){let s=0;const o=()=>{s--};for(;s<e.children.length;s++){const i=e.children[s];W(i)||(t.grandParent=t.parent,t.parent=e,t.childIndex=s,t.onNodeRemoved=o,ht(i,t))}}function ht(e,t){t.currentNode=e;const{nodeTransforms:s}=t,o=[];for(let l=0;l<s.length;l++){const r=s[l](e,t);if(r&&(le(r)?o.push(...r):o.push(r)),t.currentNode)e=t.currentNode;else return}switch(e.type){case 3:t.ssr||t.helper(Fe);break;case 5:t.ssr||t.helper(nt);break;case 9:for(let l=0;l<e.branches.length;l++)ht(e.branches[l],t);break;case 10:case 11:case 1:case 0:Ll(e,t);break}t.currentNode=e;let i=o.length;for(;i--;)o[i]()}function es(e,t){const s=W(e)?o=>o===e:o=>e.test(o);return(o,i)=>{if(o.type===1){const{props:l}=o;if(o.tagType===3&&l.some(hl))return;const r=[];for(let c=0;c<l.length;c++){const a=l[c];if(a.type===7&&s(a.name)){l.splice(c,1),c--;const p=t(o,a,i);p&&r.push(p)}}return r}}}const ut="/*@__PURE__*/",ts=e=>`${Se[e]}: _${Se[e]}`;function Rl(e,{mode:t="function",prefixIdentifiers:s=t==="module",sourceMap:o=!1,filename:i="template.vue.html",scopeId:l=null,optimizeImports:r=!1,runtimeGlobalName:c="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:p="vue/server-renderer",ssr:h=!1,isTS:d=!1,inSSR:m=!1}){const k={mode:t,prefixIdentifiers:s,sourceMap:o,filename:i,scopeId:l,optimizeImports:r,runtimeGlobalName:c,runtimeModuleName:a,ssrRuntimeModuleName:p,ssr:h,isTS:d,inSSR:m,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(y){return`_${Se[y]}`},push(y,f=-2,u){k.code+=y},indent(){b(++k.indentLevel)},deindent(y=!1){y?--k.indentLevel:b(--k.indentLevel)},newline(){b(k.indentLevel)}};function b(y){k.push(`
|
|
143
|
+
`+" ".repeat(y),0)}return k}function Fl(e,t={}){const s=Rl(e,t);t.onContextCreated&&t.onContextCreated(s);const{mode:o,push:i,prefixIdentifiers:l,indent:r,deindent:c,newline:a,scopeId:p,ssr:h}=s,d=Array.from(e.helpers),m=d.length>0,k=!l&&o!=="module";Pl(e,s);const y=h?"ssrRender":"render",u=(h?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${y}(${u}) {`),r(),k&&(i("with (_ctx) {"),r(),m&&(i(`const { ${d.map(ts).join(", ")} } = _Vue
|
|
144
|
+
`,-1),a())),e.components.length&&(on(e.components,"component",s),(e.directives.length||e.temps>0)&&a()),e.directives.length&&(on(e.directives,"directive",s),e.temps>0&&a()),e.filters&&e.filters.length&&(a(),on(e.filters,"filter",s),a()),e.temps>0){i("let ");for(let g=0;g<e.temps;g++)i(`${g>0?", ":""}_temp${g}`)}return(e.components.length||e.directives.length||e.temps)&&(i(`
|
|
145
|
+
`,0),a()),h||i("return "),e.codegenNode?Y(e.codegenNode,s):i("null"),k&&(c(),i("}")),c(),i("}"),{ast:e,code:s.code,preamble:"",map:s.map?s.map.toJSON():void 0}}function Pl(e,t){const{ssr:s,prefixIdentifiers:o,push:i,newline:l,runtimeModuleName:r,runtimeGlobalName:c,ssrRuntimeModuleName:a}=t,p=c,h=Array.from(e.helpers);if(h.length>0&&(i(`const _Vue = ${p}
|
|
146
|
+
`,-1),e.hoists.length)){const d=[It,At,Fe,Mt,Bn].filter(m=>h.includes(m)).map(ts).join(", ");i(`const { ${d} } = _Vue
|
|
147
|
+
`,-1)}jl(e.hoists,t),l(),i("return ")}function on(e,t,{helper:s,push:o,newline:i,isTS:l}){const r=s(t==="filter"?Pt:t==="component"?Lt:Ft);for(let c=0;c<e.length;c++){let a=e[c];const p=a.endsWith("__self");p&&(a=a.slice(0,-6)),o(`const ${Ue(a,t)} = ${r}(${JSON.stringify(a)}${p?", true":""})${l?"!":""}`),c<e.length-1&&i()}}function jl(e,t){if(!e.length)return;t.pure=!0;const{push:s,newline:o}=t;o();for(let i=0;i<e.length;i++){const l=e[i];l&&(s(`const _hoisted_${i+1} = `),Y(l,t),o())}t.pure=!1}function zl(e){return W(e)||e.type===4||e.type===2||e.type===5||e.type===8}function rn(e,t){const s=e.length>3||process.env.NODE_ENV!=="production"&&e.some(o=>le(o)||!zl(o));t.push("["),s&&t.indent(),We(e,t,s),s&&t.deindent(),t.push("]")}function We(e,t,s=!1,o=!0){const{push:i,newline:l}=t;for(let r=0;r<e.length;r++){const c=e[r];W(c)?i(c,-3):le(c)?rn(c,t):Y(c,t),r<e.length-1&&(s?(o&&i(","),l()):o&&i(", "))}}function Y(e,t){if(W(e)){t.push(e,-3);return}if(Tt(e)){t.push(t.helper(e));return}switch(e.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&Pn(e.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),Y(e.codegenNode,t);break;case 2:Hl(e,t);break;case 4:ns(e,t);break;case 5:Ul(e,t);break;case 12:Y(e.codegenNode,t);break;case 8:ss(e,t);break;case 3:Wl(e,t);break;case 13:Kl(e,t);break;case 14:Jl(e,t);break;case 15:Yl(e,t);break;case 17:Zl(e,t);break;case 18:Xl(e,t);break;case 19:Ql(e,t);break;case 20:Vl(e,t);break;case 21:We(e.body,t,!0,!1);break;case 22:break;case 23:break;case 24:break;case 25:break;case 26:break;case 10:break;default:if(process.env.NODE_ENV!=="production")return Pn(!1,`unhandled codegen node type: ${e.type}`),e}}function Hl(e,t){t.push(JSON.stringify(e.content),-3,e)}function ns(e,t){const{content:s,isStatic:o}=e;t.push(o?JSON.stringify(s):s,-3,e)}function Ul(e,t){const{push:s,helper:o,pure:i}=t;i&&s(ut),s(`${o(nt)}(`),Y(e.content,t),s(")")}function ss(e,t){for(let s=0;s<e.children.length;s++){const o=e.children[s];W(o)?t.push(o,-3):Y(o,t)}}function ql(e,t){const{push:s}=t;if(e.type===8)s("["),ss(e,t),s("]");else if(e.isStatic){const o=Vt(e.content)?e.content:JSON.stringify(e.content);s(o,-2,e)}else s(`[${e.content}]`,-3,e)}function Wl(e,t){const{push:s,helper:o,pure:i}=t;i&&s(ut),s(`${o(Fe)}(${JSON.stringify(e.content)})`,-3,e)}function Kl(e,t){const{push:s,helper:o,pure:i}=t,{tag:l,props:r,children:c,patchFlag:a,dynamicProps:p,directives:h,isBlock:d,disableTracking:m,isComponent:k}=e;let b;if(a)if(process.env.NODE_ENV!=="production")if(a<0)b=a+` /* ${Me[a]} */`;else{const f=Object.keys(Me).map(Number).filter(u=>u>0&&a&u).map(u=>Me[u]).join(", ");b=a+` /* ${f} */`}else b=String(a);h&&s(o(jt)+"("),d&&s(`(${o(ve)}(${m?"true":""}), `),i&&s(ut);const y=d?Te(t.inSSR,k):Be(t.inSSR,k);s(o(y)+"(",-2,e),We(Gl([l,r,c,b,p]),t),s(")"),d&&s(")"),h&&(s(", "),Y(h,t),s(")"))}function Gl(e){let t=e.length;for(;t--&&e[t]==null;);return e.slice(0,t+1).map(s=>s||"null")}function Jl(e,t){const{push:s,helper:o,pure:i}=t,l=W(e.callee)?e.callee:o(e.callee);i&&s(ut),s(l+"(",-2,e),We(e.arguments,t),s(")")}function Yl(e,t){const{push:s,indent:o,deindent:i,newline:l}=t,{properties:r}=e;if(!r.length){s("{}",-2,e);return}const c=r.length>1||process.env.NODE_ENV!=="production"&&r.some(a=>a.value.type!==4);s(c?"{":"{ "),c&&o();for(let a=0;a<r.length;a++){const{key:p,value:h}=r[a];ql(p,t),s(": "),Y(h,t),a<r.length-1&&(s(","),l())}c&&i(),s(c?"}":" }")}function Zl(e,t){rn(e.elements,t)}function Xl(e,t){const{push:s,indent:o,deindent:i}=t,{params:l,returns:r,body:c,newline:a,isSlot:p}=e;p&&s(`_${Se[Gt]}(`),s("(",-2,e),le(l)?We(l,t):l&&Y(l,t),s(") => "),(a||c)&&(s("{"),o()),r?(a&&s("return "),le(r)?rn(r,t):Y(r,t)):c&&Y(c,t),(a||c)&&(i(),s("}")),p&&(e.isNonScopedSlot&&s(", undefined, true"),s(")"))}function Ql(e,t){const{test:s,consequent:o,alternate:i,newline:l}=e,{push:r,indent:c,deindent:a,newline:p}=t;if(s.type===4){const d=!Vt(s.content);d&&r("("),ns(s,t),d&&r(")")}else r("("),Y(s,t),r(")");l&&c(),t.indentLevel++,l||r(" "),r("? "),Y(o,t),t.indentLevel--,l&&p(),l||r(" "),r(": ");const h=i.type===19;h||t.indentLevel++,Y(i,t),h||t.indentLevel--,l&&a(!0)}function Vl(e,t){const{push:s,helper:o,indent:i,deindent:l,newline:r}=t,{needPauseTracking:c,needArraySpread:a}=e;a&&s("[...("),s(`_cache[${e.index}] || (`),c&&(i(),s(`${o(ot)}(-1`),e.inVOnce&&s(", true"),s("),"),r(),s("(")),s(`_cache[${e.index}] = `),Y(e.value,t),c&&(s(`).cacheIndex = ${e.index},`),r(),s(`${o(ot)}(1),`),r(),s(`_cache[${e.index}]`),l()),s(")"),a&&s(")]")}const ea=new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b"),ta=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function Ne(e,t,s=!1,o=!1){const i=e.content;if(i.trim())try{new Function(o?` ${i} `:`return ${s?`(${i}) => {}`:`(${i})`}`)}catch(l){let r=l.message;const c=i.replace(ta,"").match(ea);c&&(r=`avoid using JavaScript keyword as property name: "${c[0]}"`),t.onError(A(45,e.loc,void 0,r))}}const na=(e,t)=>{if(e.type===5)e.content=ln(e.content,t);else if(e.type===1){const s=X(e,"memo");for(let o=0;o<e.props.length;o++){const i=e.props[o];if(i.type===7&&i.name!=="for"){const l=i.exp,r=i.arg;l&&l.type===4&&!(i.name==="on"&&r)&&!(s&&r&&r.type===4&&r.content==="key")&&(i.exp=ln(l,t,i.name==="slot")),r&&r.type===4&&!r.isStatic&&(i.arg=ln(r,t))}}}};function ln(e,t,s=!1,o=!1,i=Object.create(t.identifiers)){return process.env.NODE_ENV!=="production"&&Ne(e,t,s,o),e}const sa=es(/^(if|else|else-if)$/,(e,t,s)=>oa(e,t,s,(o,i,l)=>{const r=s.parent.children;let c=r.indexOf(o),a=0;for(;c-->=0;){const p=r[c];p&&p.type===9&&(a+=p.branches.length)}return()=>{if(l)o.codegenNode=is(i,a,s);else{const p=ra(o.codegenNode);p.alternate=is(i,a+o.branches.length-1,s)}}}));function oa(e,t,s,o){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){const i=t.exp?t.exp.loc:e.loc;s.onError(A(28,t.loc)),t.exp=B("true",!1,i)}if(process.env.NODE_ENV!=="production"&&t.exp&&Ne(t.exp,s),t.name==="if"){const i=os(e,t),l={type:9,loc:Cl(e.loc),branches:[i]};if(s.replaceNode(l),o)return o(l,i,!0)}else{const i=s.parent.children,l=[];let r=i.indexOf(e);for(;r-->=-1;){const c=i[r];if(c&&c.type===3){s.removeNode(c),process.env.NODE_ENV!=="production"&&l.unshift(c);continue}if(c&&c.type===2&&!c.content.trim().length){s.removeNode(c);continue}if(c&&c.type===9){t.name==="else-if"&&c.branches[c.branches.length-1].condition===void 0&&s.onError(A(30,e.loc)),s.removeNode();const a=os(e,t);if(process.env.NODE_ENV!=="production"&&l.length&&!(s.parent&&s.parent.type===1&&(s.parent.tag==="transition"||s.parent.tag==="Transition"))&&(a.children=[...l,...a.children]),process.env.NODE_ENV!=="production"){const h=a.userKey;h&&c.branches.forEach(({userKey:d})=>{ia(d,h)&&s.onError(A(29,a.userKey.loc))})}c.branches.push(a);const p=o&&o(c,a,!1);ht(a,s),p&&p(),s.currentNode=null}else s.onError(A(30,e.loc));break}}}function os(e,t){const s=e.tagType===3;return{type:10,loc:e.loc,condition:t.name==="else"?void 0:t.exp,children:s&&!X(e,"for")?e.children:[e],userKey:He(e,"key"),isTemplateIf:s}}function is(e,t,s){return e.condition?Yt(e.condition,rs(e,t,s),q(s.helper(Fe),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):rs(e,t,s)}function rs(e,t,s){const{helper:o}=s,i=z("key",B(`${t}`,!1,ee,2)),{children:l}=e,r=l[0];if(l.length!==1||r.type!==1)if(l.length===1&&r.type===11){const a=r.codegenNode;return ct(a,i,s),a}else{let a=64;return process.env.NODE_ENV!=="production"&&!e.isTemplateIf&&l.filter(p=>p.type!==3).length===1&&(a|=2048),ze(s,o(Le),se([i]),l,a,void 0,void 0,!0,!1,!1,e.loc)}else{const a=r.codegenNode,p=gl(a);return p.type===13&&Zt(p,s),ct(p,i,s),a}}function ia(e,t){if(!e||e.type!==t.type)return!1;if(e.type===6){if(e.value.content!==t.value.content)return!1}else{const s=e.exp,o=t.exp;if(s.type!==o.type||s.type!==4||s.isStatic!==o.isStatic||s.content!==o.content)return!1}return!0}function ra(e){for(;;)if(e.type===19)if(e.alternate.type===19)e=e.alternate;else return e;else e.type===20&&(e=e.value)}const la=(e,t,s)=>{const{modifiers:o,loc:i}=e,l=e.arg;let{exp:r}=e;if(r&&r.type===4&&!r.content.trim()&&(r=void 0),!r){if(l.type!==4||!l.isStatic)return s.onError(A(52,l.loc)),{props:[z(l,B("",!0,i))]};ls(e),r=e.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),o.some(c=>c.content==="camel")&&(l.type===4?l.isStatic?l.content=pe(l.content):l.content=`${s.helperString(Wt)}(${l.content})`:(l.children.unshift(`${s.helperString(Wt)}(`),l.children.push(")"))),s.inSSR||(o.some(c=>c.content==="prop")&&as(l,"."),o.some(c=>c.content==="attr")&&as(l,"^")),{props:[z(l,r)]}},ls=(e,t)=>{const s=e.arg,o=pe(s.content);e.exp=B(o,!1,s.loc)},as=(e,t)=>{e.type===4?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},aa=es("for",(e,t,s)=>{const{helper:o,removeHelper:i}=s;return ca(e,t,s,l=>{const r=q(o(zt),[l.source]),c=lt(e),a=X(e,"memo"),p=He(e,"key",!1,!0);p&&p.type===7&&!p.exp&&ls(p);let d=p&&(p.type===6?p.value?B(p.value.content,!0):void 0:p.exp);const m=p&&d?z("key",d):null,k=l.source.type===4&&l.source.constType>0,b=k?64:p?128:256;return l.codegenNode=ze(s,o(Le),void 0,r,b,void 0,void 0,!0,!k,!1,e.loc),()=>{let y;const{children:f}=l;process.env.NODE_ENV!=="production"&&c&&e.children.some(N=>{if(N.type===1){const _=He(N,"key");if(_)return s.onError(A(33,_.loc)),!0}});const u=f.length!==1||f[0].type!==1,g=at(e)?e:c&&e.children.length===1&&at(e.children[0])?e.children[0]:null;if(g?(y=g.codegenNode,c&&m&&ct(y,m,s)):u?y=ze(s,o(Le),m?se([m]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(y=f[0].codegenNode,c&&m&&ct(y,m,s),y.isBlock!==!k&&(y.isBlock?(i(ve),i(Te(s.inSSR,y.isComponent))):i(Be(s.inSSR,y.isComponent))),y.isBlock=!k,y.isBlock?(o(ve),o(Te(s.inSSR,y.isComponent))):o(Be(s.inSSR,y.isComponent))),a){const N=Ce(an(l.parseResult,[B("_cached")]));N.body=sl([oe(["const _memo = (",a.exp,")"]),oe(["if (_cached",...d?[" && _cached.key === ",d]:[],` && ${s.helperString(Dn)}(_cached, _memo)) return _cached`]),oe(["const _item = ",y]),B("_item.memo = _memo"),B("return _item")]),r.arguments.push(N,B("_cache"),B(String(s.cached.length))),s.cached.push(null)}else r.arguments.push(Ce(an(l.parseResult),y,!0))}})});function ca(e,t,s,o){if(!t.exp){s.onError(A(31,t.loc));return}const i=t.forParseResult;if(!i){s.onError(A(32,t.loc));return}cs(i,s);const{addIdentifiers:l,removeIdentifiers:r,scopes:c}=s,{source:a,value:p,key:h,index:d}=i,m={type:11,loc:t.loc,source:a,valueAlias:p,keyAlias:h,objectIndexAlias:d,parseResult:i,children:lt(e)?e.children:[e]};s.replaceNode(m),c.vFor++;const k=o&&o(m);return()=>{c.vFor--,k&&k()}}function cs(e,t){e.finalized||(process.env.NODE_ENV!=="production"&&(Ne(e.source,t),e.key&&Ne(e.key,t,!0),e.index&&Ne(e.index,t,!0),e.value&&Ne(e.value,t,!0)),e.finalized=!0)}function an({value:e,key:t,index:s},o=[]){return da([e,t,s,...o])}function da(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((s,o)=>s||B("_".repeat(o+1),!1))}const ds=B("undefined",!1),pa=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){const s=X(e,"slot");if(s)return s.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},fa=(e,t,s,o)=>Ce(e,s,!1,!0,s.length?s[0].loc:o);function ma(e,t,s=fa){t.helper(Gt);const{children:o,loc:i}=e,l=[],r=[];let c=t.scopes.vSlot>0||t.scopes.vFor>0;const a=X(e,"slot",!0);if(a){const{arg:f,exp:u}=a;f&&!Z(f)&&(c=!0),l.push(z(f||B("default",!0),s(u,void 0,o,i)))}let p=!1,h=!1;const d=[],m=new Set;let k=0;for(let f=0;f<o.length;f++){const u=o[f];let g;if(!lt(u)||!(g=X(u,"slot",!0))){u.type!==3&&d.push(u);continue}if(a){t.onError(A(37,g.loc));break}p=!0;const{children:N,loc:_}=u,{arg:v=B("default",!0),exp:w,loc:E}=g;let x;Z(v)?x=v?v.content:"default":c=!0;const S=X(u,"for"),T=s(w,S,N,_);let O,C;if(O=X(u,"if"))c=!0,r.push(Yt(O.exp,gt(v,T,k++),ds));else if(C=X(u,/^else(-if)?$/,!0)){let I=f,R;for(;I--&&(R=o[I],!(R.type!==3&&cn(R))););if(R&<(R)&&X(R,/^(else-)?if$/)){let M=r[r.length-1];for(;M.alternate.type===19;)M=M.alternate;M.alternate=C.exp?Yt(C.exp,gt(v,T,k++),ds):gt(v,T,k++)}else t.onError(A(30,C.loc))}else if(S){c=!0;const I=S.forParseResult;I?(cs(I,t),r.push(q(t.helper(zt),[I.source,Ce(an(I),gt(v,T),!0)]))):t.onError(A(32,S.loc))}else{if(x){if(m.has(x)){t.onError(A(38,E));continue}m.add(x),x==="default"&&(h=!0)}l.push(z(v,T))}}if(!a){const f=(u,g)=>{const N=s(u,void 0,g,i);return t.compatConfig&&(N.isNonScopedSlot=!0),z("default",N)};p?d.length&&d.some(u=>cn(u))&&(h?t.onError(A(39,d[0].loc)):l.push(f(void 0,d))):l.push(f(void 0,o))}const b=c?2:yt(e.children)?3:1;let y=se(l.concat(z("_",B(b+(process.env.NODE_ENV!=="production"?` /* ${Lr[b]} */`:""),!1))),i);return r.length&&(y=q(t.helper($n),[y,be(r)])),{slots:y,hasDynamicSlots:c}}function gt(e,t,s){const o=[z("name",e),z("fn",t)];return s!=null&&o.push(z("key",B(String(s),!0))),se(o)}function yt(e){for(let t=0;t<e.length;t++){const s=e[t];switch(s.type){case 1:if(s.tagType===2||yt(s.children))return!0;break;case 9:if(yt(s.branches))return!0;break;case 10:case 11:if(yt(s.children))return!0;break}}return!1}function cn(e){return e.type!==2&&e.type!==12?!0:e.type===2?!!e.content.trim():cn(e.content)}const ps=new WeakMap,ha=(e,t)=>function(){if(e=t.currentNode,!(e.type===1&&(e.tagType===0||e.tagType===1)))return;const{tag:o,props:i}=e,l=e.tagType===1;let r=l?ua(e,t):`"${o}"`;const c=Or(r)&&r.callee===Rt;let a,p,h=0,d,m,k,b=c||r===Re||r===Ot||!l&&(o==="svg"||o==="foreignObject"||o==="math");if(i.length>0){const y=fs(e,t,void 0,l,c);a=y.props,h=y.patchFlag,m=y.dynamicPropNames;const f=y.directives;k=f&&f.length?be(f.map(u=>ya(u,t))):void 0,y.shouldUseBlock&&(b=!0)}if(e.children.length>0)if(r===tt&&(b=!0,h|=1024,process.env.NODE_ENV!=="production"&&e.children.length>1&&t.onError(A(46,{start:e.children[0].loc.start,end:e.children[e.children.length-1].loc.end,source:""}))),l&&r!==Re&&r!==tt){const{slots:f,hasDynamicSlots:u}=ma(e,t);p=f,u&&(h|=1024)}else if(e.children.length===1&&r!==Re){const f=e.children[0],u=f.type,g=u===5||u===8;g&&ne(f,t)===0&&(h|=1),g||u===2?p=f:p=e.children}else p=e.children;m&&m.length&&(d=va(m)),e.codegenNode=ze(t,r,a,p,h===0?void 0:h,d,k,!!b,!1,l,e.loc)};function ua(e,t,s=!1){let{tag:o}=e;const i=dn(o),l=He(e,"is",!1,!0);if(l)if(i||me("COMPILER_IS_ON_ELEMENT",t)){let c;if(l.type===6?c=l.value&&B(l.value.content,!0):(c=l.exp,c||(c=B("is",!1,l.arg.loc))),c)return q(t.helper(Rt),[c])}else l.type===6&&l.value.content.startsWith("vue:")&&(o=l.value.content.slice(4));const r=Ln(o)||t.isBuiltInComponent(o);return r?(s||t.helper(r),r):(t.helper(Lt),t.components.add(o),Ue(o,"component"))}function fs(e,t,s=e.props,o,i,l=!1){const{tag:r,loc:c,children:a}=e;let p=[];const h=[],d=[],m=a.length>0;let k=!1,b=0,y=!1,f=!1,u=!1,g=!1,N=!1,_=!1;const v=[],w=T=>{p.length&&(h.push(se(ms(p),c)),p=[]),T&&h.push(T)},E=()=>{t.scopes.vFor>0&&p.push(z(B("ref_for",!0),B("true")))},x=({key:T,value:O})=>{if(Z(T)){const C=T.content,I=Bt(C);if(I&&(!o||i)&&C.toLowerCase()!=="onclick"&&C!=="onUpdate:modelValue"&&!xn(C)&&(g=!0),I&&xn(C)&&(_=!0),I&&O.type===14&&(O=O.arguments[0]),O.type===20||(O.type===4||O.type===8)&&ne(O,t)>0)return;C==="ref"?y=!0:C==="class"?f=!0:C==="style"?u=!0:C!=="key"&&!v.includes(C)&&v.push(C),o&&(C==="class"||C==="style")&&!v.includes(C)&&v.push(C)}else N=!0};for(let T=0;T<s.length;T++){const O=s[T];if(O.type===6){const{loc:C,name:I,nameLoc:R,value:M}=O;let ge=!0;if(I==="ref"&&(y=!0,E()),I==="is"&&(dn(r)||M&&M.content.startsWith("vue:")||me("COMPILER_IS_ON_ELEMENT",t)))continue;p.push(z(B(I,!0,R),B(M?M.content:"",ge,M?M.loc:C)))}else{const{name:C,arg:I,exp:R,loc:M,modifiers:ge}=O,xe=C==="bind",Et=C==="on";if(C==="slot"){o||t.onError(A(40,M));continue}if(C==="once"||C==="memo"||C==="is"||xe&&he(I,"is")&&(dn(r)||me("COMPILER_IS_ON_ELEMENT",t))||Et&&l)continue;if((xe&&he(I,"key")||Et&&m&&he(I,"vue:before-update"))&&(k=!0),xe&&he(I,"ref")&&E(),!I&&(xe||Et)){if(N=!0,R)if(xe){if(w(),process.env.NODE_ENV!=="production"&&h.some(Ae=>Ae.type===15?Ae.properties.some(({key:Ge})=>Ge.type!==4||!Ge.isStatic?!0:Ge.content!=="class"&&Ge.content!=="style"&&!Bt(Ge.content)):!0)&&$e("COMPILER_V_BIND_OBJECT_ORDER",t,M),me("COMPILER_V_BIND_OBJECT_ORDER",t)){h.unshift(R);continue}E(),w(),h.push(R)}else w({type:14,loc:M,callee:t.helper(qt),arguments:o?[R]:[R,"true"]});else t.onError(A(xe?34:35,M));continue}xe&&ge.some(Ie=>Ie.content==="prop")&&(b|=32);const Rs=t.directiveTransforms[C];if(Rs){const{props:Ie,needRuntime:Ae}=Rs(O,e,t);!l&&Ie.forEach(x),Et&&I&&!Z(I)?w(se(Ie,c)):p.push(...Ie),Ae&&(d.push(O),Tt(Ae)&&ps.set(O,Ae))}else Ir(C)||(d.push(O),m&&(k=!0))}}let S;if(h.length?(w(),h.length>1?S=q(t.helper(st),h,c):S=h[0]):p.length&&(S=se(ms(p),c)),N?b|=16:(f&&!o&&(b|=2),u&&!o&&(b|=4),v.length&&(b|=8),g&&(b|=32)),!k&&(b===0||b===32)&&(y||_||d.length>0)&&(b|=512),!t.inSSR&&S)switch(S.type){case 15:let T=-1,O=-1,C=!1;for(let M=0;M<S.properties.length;M++){const ge=S.properties[M].key;Z(ge)?ge.content==="class"?T=M:ge.content==="style"&&(O=M):ge.isHandlerKey||(C=!0)}const I=S.properties[T],R=S.properties[O];C?S=q(t.helper(Pe),[S]):(I&&!Z(I.value)&&(I.value=q(t.helper(Ht),[I.value])),R&&(u||R.value.type===4&&R.value.content.trim()[0]==="["||R.value.type===17)&&(R.value=q(t.helper(Ut),[R.value])));break;case 14:break;default:S=q(t.helper(Pe),[q(t.helper(je),[S])]);break}return{props:S,directives:d,patchFlag:b,dynamicPropNames:v,shouldUseBlock:k}}function ms(e){const t=new Map,s=[];for(let o=0;o<e.length;o++){const i=e[o];if(i.key.type===8||!i.key.isStatic){s.push(i);continue}const l=i.key.content,r=t.get(l);r?(l==="style"||l==="class"||Bt(l))&&ga(r,i):(t.set(l,i),s.push(i))}return s}function ga(e,t){e.value.type===17?e.value.elements.push(t.value):e.value=be([e.value,t.value],e.loc)}function ya(e,t){const s=[],o=ps.get(e);o?s.push(t.helperString(o)):(t.helper(Ft),t.directives.add(e.name),s.push(Ue(e.name,"directive")));const{loc:i}=e;if(e.exp&&s.push(e.exp),e.arg&&(e.exp||s.push("void 0"),s.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||s.push("void 0"),s.push("void 0"));const l=B("true",!1,i);s.push(se(e.modifiers.map(r=>z(r,l)),i))}return be(s,e.loc)}function va(e){let t="[";for(let s=0,o=e.length;s<o;s++)t+=JSON.stringify(e[s]),s<o-1&&(t+=", ");return t+"]"}function dn(e){return e==="component"||e==="Component"}const ba=(e,t)=>{if(at(e)){const{children:s,loc:o}=e,{slotName:i,slotProps:l}=ka(e,t),r=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let c=2;l&&(r[2]=l,c=3),s.length&&(r[3]=Ce([],s,!1,!1,o),c=4),t.scopeId&&!t.slotted&&(c=5),r.splice(c),e.codegenNode=q(t.helper(Tn),r,o)}};function ka(e,t){let s='"default"',o;const i=[];for(let l=0;l<e.props.length;l++){const r=e.props[l];if(r.type===6)r.value&&(r.name==="name"?s=JSON.stringify(r.value.content):(r.name=pe(r.name),i.push(r)));else if(r.name==="bind"&&he(r.arg,"name")){if(r.exp)s=r.exp;else if(r.arg&&r.arg.type===4){const c=pe(r.arg.content);s=r.exp=B(c,!1,r.arg.loc)}}else r.name==="bind"&&r.arg&&Z(r.arg)&&(r.arg.content=pe(r.arg.content)),i.push(r)}if(i.length>0){const{props:l,directives:r}=fs(e,t,i,!1,!1);o=l,r.length&&t.onError(A(36,r[0].loc))}return{slotName:s,slotProps:o}}const hs=(e,t,s,o)=>{const{loc:i,modifiers:l,arg:r}=e;!e.exp&&!l.length&&s.onError(A(35,i));let c;if(r.type===4)if(r.isStatic){let d=r.content;process.env.NODE_ENV!=="production"&&d.startsWith("vnode")&&s.onError(A(51,r.loc)),d.startsWith("vue:")&&(d=`vnode-${d.slice(4)}`);const m=t.tagType!==0||d.startsWith("vnode")||!/[A-Z]/.test(d)?Mr(pe(d)):`on:${d}`;c=B(m,!0,r.loc)}else c=oe([`${s.helperString(Kt)}(`,r,")"]);else c=r,c.children.unshift(`${s.helperString(Kt)}(`),c.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let p=s.cacheHandlers&&!a&&!s.inVOnce;if(a){const d=Fn(a),m=!(d||fl(a)),k=a.content.includes(";");process.env.NODE_ENV!=="production"&&Ne(a,s,!1,k),(m||p&&d)&&(a=oe([`${m?"$event":"(...args)"} => ${k?"{":"("}`,a,k?"}":")"]))}let h={props:[z(c,a||B("() => {}",!1,i))]};return o&&(h=o(h)),p&&(h.props[0].value=s.cache(h.props[0].value)),h.props.forEach(d=>d.key.isHandlerKey=!0),h},Ea=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{const s=e.children;let o,i=!1;for(let l=0;l<s.length;l++){const r=s[l];if(en(r)){i=!0;for(let c=l+1;c<s.length;c++){const a=s[c];if(en(a))o||(o=s[l]=oe([r],r.loc)),o.children.push(" + ",a),s.splice(c,1),c--;else{o=void 0;break}}}}if(!(!i||s.length===1&&(e.type===0||e.type===1&&e.tagType===0&&!e.props.find(l=>l.type===7&&!t.directiveTransforms[l.name])&&e.tag!=="template")))for(let l=0;l<s.length;l++){const r=s[l];if(en(r)||r.type===8){const c=[];(r.type!==2||r.content!==" ")&&c.push(r),!t.ssr&&ne(r,t)===0&&c.push(1+(process.env.NODE_ENV!=="production"?` /* ${Me[1]} */`:"")),s[l]={type:12,content:r,loc:r.loc,codegenNode:q(t.helper(Mt),c)}}}}},us=new WeakSet,Na=(e,t)=>{if(e.type===1&&X(e,"once",!0))return us.has(e)||t.inVOnce||t.inSSR?void 0:(us.add(e),t.inVOnce=!0,t.helper(ot),()=>{t.inVOnce=!1;const s=t.currentNode;s.codegenNode&&(s.codegenNode=t.cache(s.codegenNode,!0,!0))})},gs=(e,t,s)=>{const{exp:o,arg:i}=e;if(!o)return s.onError(A(41,e.loc)),vt();const l=o.loc.source.trim(),r=o.type===4?o.content:l,c=s.bindingMetadata[l];if(c==="props"||c==="props-aliased")return s.onError(A(44,o.loc)),vt();if(!r.trim()||!Fn(o))return s.onError(A(42,o.loc)),vt();const a=i||B("modelValue",!0),p=i?Z(i)?`onUpdate:${pe(i.content)}`:oe(['"onUpdate:" + ',i]):"onUpdate:modelValue";let h;const d=s.isTS?"($event: any)":"$event";h=oe([`${d} => ((`,o,") = $event)"]);const m=[z(a,e.exp),z(p,h)];if(e.modifiers.length&&t.tagType===1){const k=e.modifiers.map(y=>y.content).map(y=>(Vt(y)?y:JSON.stringify(y))+": true").join(", "),b=i?Z(i)?`${i.content}Modifiers`:oe([i,' + "Modifiers"']):"modelModifiers";m.push(z(b,B(`{ ${k} }`,!1,e.loc,2)))}return vt(m)};function vt(e=[]){return{props:e}}const _a=/[\w).+\-_$\]]/,xa=(e,t)=>{me("COMPILER_FILTERS",t)&&(e.type===5?bt(e.content,t):e.type===1&&e.props.forEach(s=>{s.type===7&&s.name!=="for"&&s.exp&&bt(s.exp,t)}))};function bt(e,t){if(e.type===4)ys(e,t);else for(let s=0;s<e.children.length;s++){const o=e.children[s];typeof o=="object"&&(o.type===4?ys(o,t):o.type===8?bt(e,t):o.type===5&&bt(o.content,t))}}function ys(e,t){const s=e.content;let o=!1,i=!1,l=!1,r=!1,c=0,a=0,p=0,h=0,d,m,k,b,y=[];for(k=0;k<s.length;k++)if(m=d,d=s.charCodeAt(k),o)d===39&&m!==92&&(o=!1);else if(i)d===34&&m!==92&&(i=!1);else if(l)d===96&&m!==92&&(l=!1);else if(r)d===47&&m!==92&&(r=!1);else if(d===124&&s.charCodeAt(k+1)!==124&&s.charCodeAt(k-1)!==124&&!c&&!a&&!p)b===void 0?(h=k+1,b=s.slice(0,k).trim()):f();else{switch(d){case 34:i=!0;break;case 39:o=!0;break;case 96:l=!0;break;case 40:p++;break;case 41:p--;break;case 91:a++;break;case 93:a--;break;case 123:c++;break;case 125:c--;break}if(d===47){let u=k-1,g;for(;u>=0&&(g=s.charAt(u),g===" ");u--);(!g||!_a.test(g))&&(r=!0)}}b===void 0?b=s.slice(0,k).trim():h!==0&&f();function f(){y.push(s.slice(h,k).trim()),h=k+1}if(y.length){for(process.env.NODE_ENV!=="production"&&rt("COMPILER_FILTERS",t,e.loc),k=0;k<y.length;k++)b=wa(b,y[k],t);e.content=b,e.ast=void 0}}function wa(e,t,s){s.helper(Pt);const o=t.indexOf("(");if(o<0)return s.filters.add(t),`${Ue(t,"filter")}(${e})`;{const i=t.slice(0,o),l=t.slice(o+1);return s.filters.add(i),`${Ue(i,"filter")}(${e}${l!==")"?","+l:l}`}}const vs=new WeakSet,Sa=(e,t)=>{if(e.type===1){const s=X(e,"memo");return!s||vs.has(e)?void 0:(vs.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&o.type===13&&(e.tagType!==1&&Zt(o,t),e.codegenNode=q(t.helper(Jt),[s.exp,Ce(void 0,o),"_cache",String(t.cached.length)]),t.cached.push(null))})}};function Ca(e){return[[Na,sa,Sa,aa,xa,...process.env.NODE_ENV!=="production"?[na]:[],ba,ha,pa,Ea],{on:hs,bind:la,model:gs}]}function Ba(e,t={}){const s=t.onError||Qt,o=t.mode==="module";t.prefixIdentifiers===!0?s(A(47)):o&&s(A(48));const i=!1;t.cacheHandlers&&s(A(49)),t.scopeId&&!o&&s(A(50));const l=de({},t,{prefixIdentifiers:i}),r=W(e)?$l(e,l):e,[c,a]=Ca();return Al(r,de({},l,{nodeTransforms:[...c,...t.nodeTransforms||[]],directiveTransforms:de({},a,t.directiveTransforms||{})})),Fl(r,l)}const Ta=()=>({props:[]});/**
|
|
148
|
+
* @vue/compiler-dom v3.5.18
|
|
149
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
150
|
+
* @license MIT
|
|
151
|
+
**/const bs=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),ks=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),Es=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),Ns=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),pn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),_s=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),xs=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),ws=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),fn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),Ss=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");el({[bs]:"vModelRadio",[ks]:"vModelCheckbox",[Es]:"vModelText",[Ns]:"vModelSelect",[pn]:"vModelDynamic",[_s]:"withModifiers",[xs]:"withKeys",[ws]:"vShow",[fn]:"Transition",[Ss]:"TransitionGroup"});let De;function $a(e,t=!1){return De||(De=document.createElement("div")),t?(De.innerHTML=`<div foo="${e.replace(/"/g,""")}">`,De.children[0].getAttribute("foo")):(De.innerHTML=e,De.textContent)}const Da={parseMode:"html",isVoidTag:Jr,isNativeTag:e=>Wr(e)||Kr(e)||Gr(e),isPreTag:e=>e==="pre",isIgnoreNewlineTag:e=>e==="pre"||e==="textarea",decodeEntities:$a,isBuiltInComponent:e=>{if(e==="Transition"||e==="transition")return fn;if(e==="TransitionGroup"||e==="transition-group")return Ss},getNamespace(e,t,s){let o=t?t.ns:s;if(t&&o===2)if(t.tag==="annotation-xml"){if(e==="svg")return 1;t.props.some(i=>i.type===6&&i.name==="encoding"&&i.value!=null&&(i.value.content==="text/html"||i.value.content==="application/xhtml+xml"))&&(o=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!=="mglyph"&&e!=="malignmark"&&(o=0);else t&&o===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(o=0);if(o===0){if(e==="svg")return 1;if(e==="math")return 2}return o}},Oa=e=>{e.type===1&&e.props.forEach((t,s)=>{t.type===6&&t.name==="style"&&t.value&&(e.props[s]={type:7,name:"bind",arg:B("style",!0,t.loc),exp:Ia(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Ia=(e,t)=>{const s=jr(e);return B(JSON.stringify(s),!1,t,3)};function ie(e,t){return A(e,t,process.env.NODE_ENV!=="production"?Aa:void 0)}const Aa={53:"v-html is missing expression.",54:"v-html will override element children.",55:"v-text is missing expression.",56:"v-text will override element children.",57:"v-model can only be used on <input>, <textarea> and <select> elements.",58:"v-model argument is not supported on plain elements.",59:"v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.",60:"Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.",61:"v-show is missing expression.",62:"<Transition> expects exactly one child element or component.",63:"Tags with side effect (<script> and <style>) are ignored in client component templates."},Ma=(e,t,s)=>{const{exp:o,loc:i}=e;return o||s.onError(ie(53,i)),t.children.length&&(s.onError(ie(54,i)),t.children.length=0),{props:[z(B("innerHTML",!0,i),o||B("",!0))]}},La=(e,t,s)=>{const{exp:o,loc:i}=e;return o||s.onError(ie(55,i)),t.children.length&&(s.onError(ie(56,i)),t.children.length=0),{props:[z(B("textContent",!0),o?ne(o,s)>0?o:q(s.helperString(nt),[o],i):B("",!0))]}},Ra=(e,t,s)=>{const o=gs(e,t,s);if(!o.props.length||t.tagType===1)return o;e.arg&&s.onError(ie(58,e.arg.loc));function i(){const c=X(t,"bind");c&&he(c.arg,"value")&&s.onError(ie(60,c.loc))}const{tag:l}=t,r=s.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||r){let c=Es,a=!1;if(l==="input"||r){const p=He(t,"type");if(p){if(p.type===7)c=pn;else if(p.value)switch(p.value.content){case"radio":c=bs;break;case"checkbox":c=ks;break;case"file":a=!0,s.onError(ie(59,e.loc));break;default:process.env.NODE_ENV!=="production"&&i();break}}else ml(t)?c=pn:process.env.NODE_ENV!=="production"&&i()}else l==="select"?c=Ns:process.env.NODE_ENV!=="production"&&i();a||(o.needRuntime=s.helper(c))}else s.onError(ie(57,e.loc));return o.props=o.props.filter(c=>!(c.key.type===4&&c.key.content==="modelValue")),o},Fa=re("passive,once,capture"),Pa=re("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),ja=re("left,right"),Cs=re("onkeyup,onkeydown,onkeypress"),za=(e,t,s,o)=>{const i=[],l=[],r=[];for(let c=0;c<t.length;c++){const a=t[c].content;a==="native"&&$e("COMPILER_V_ON_NATIVE",s,o)||Fa(a)?r.push(a):ja(a)?Z(e)?Cs(e.content.toLowerCase())?i.push(a):l.push(a):(i.push(a),l.push(a)):Pa(a)?l.push(a):i.push(a)}return{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:r}},Bs=(e,t)=>Z(e)&&e.content.toLowerCase()==="onclick"?B(t,!0):e.type!==4?oe(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Ha=(e,t,s)=>hs(e,t,s,o=>{const{modifiers:i}=e;if(!i.length)return o;let{key:l,value:r}=o.props[0];const{keyModifiers:c,nonKeyModifiers:a,eventOptionModifiers:p}=za(l,i,s,e.loc);if(a.includes("right")&&(l=Bs(l,"onContextmenu")),a.includes("middle")&&(l=Bs(l,"onMouseup")),a.length&&(r=q(s.helper(_s),[r,JSON.stringify(a)])),c.length&&(!Z(l)||Cs(l.content.toLowerCase()))&&(r=q(s.helper(xs),[r,JSON.stringify(c)])),p.length){const h=p.map(Dt).join("");l=Z(l)?B(`${l.content}${h}`,!0):oe(["(",l,`) + "${h}"`])}return{props:[z(l,r)]}}),Ua=(e,t,s)=>{const{exp:o,loc:i}=e;return o||s.onError(ie(61,i)),{props:[],needRuntime:s.helper(ws)}},qa=(e,t)=>{if(e.type===1&&e.tagType===1&&t.isBuiltInComponent(e.tag)===fn)return()=>{if(!e.children.length)return;Ts(e)&&t.onError(ie(62,{start:e.children[0].loc.start,end:e.children[e.children.length-1].loc.end,source:""}));const o=e.children[0];if(o.type===1)for(const i of o.props)i.type===7&&i.name==="show"&&e.props.push({type:6,name:"persisted",nameLoc:e.loc,value:void 0,loc:e.loc})}};function Ts(e){const t=e.children=e.children.filter(o=>o.type!==3&&!(o.type===2&&!o.content.trim())),s=t[0];return t.length!==1||s.type===11||s.type===9&&s.branches.some(Ts)}const Wa=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag==="script"||e.tag==="style")&&(process.env.NODE_ENV!=="production"&&t.onError(ie(63,e.loc)),t.removeNode())};function Ka(e,t){return e==="template"?!0:e in $s?$s[e].has(t):t in Ds?Ds[t].has(e):!(e in Os&&Os[e].has(t)||t in Is&&Is[t].has(e))}const Oe=new Set(["h1","h2","h3","h4","h5","h6"]),_e=new Set([]),$s={head:new Set(["base","basefront","bgsound","link","meta","title","noscript","noframes","style","script","template"]),optgroup:new Set(["option"]),select:new Set(["optgroup","option","hr"]),table:new Set(["caption","colgroup","tbody","tfoot","thead"]),tr:new Set(["td","th"]),colgroup:new Set(["col"]),tbody:new Set(["tr"]),thead:new Set(["tr"]),tfoot:new Set(["tr"]),script:_e,iframe:_e,option:_e,textarea:_e,style:_e,title:_e},Ds={html:_e,body:new Set(["html"]),head:new Set(["html"]),td:new Set(["tr"]),colgroup:new Set(["table"]),caption:new Set(["table"]),tbody:new Set(["table"]),tfoot:new Set(["table"]),col:new Set(["colgroup"]),th:new Set(["tr"]),thead:new Set(["table"]),tr:new Set(["tbody","thead","tfoot"]),dd:new Set(["dl","div"]),dt:new Set(["dl","div"]),figcaption:new Set(["figure"]),summary:new Set(["details"]),area:new Set(["map"])},Os={p:new Set(["address","article","aside","blockquote","center","details","dialog","dir","div","dl","fieldset","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","menu","ol","p","pre","section","table","ul"]),svg:new Set(["b","blockquote","br","code","dd","div","dl","dt","em","embed","h1","h2","h3","h4","h5","h6","hr","i","img","li","menu","meta","ol","p","pre","ruby","s","small","span","strong","sub","sup","table","u","ul","var"])},Is={a:new Set(["a"]),button:new Set(["button"]),dd:new Set(["dd","dt"]),dt:new Set(["dd","dt"]),form:new Set(["form"]),li:new Set(["li"]),h1:Oe,h2:Oe,h3:Oe,h4:Oe,h5:Oe,h6:Oe},Ga=(e,t)=>{if(e.type===1&&e.tagType===0&&t.parent&&t.parent.type===1&&t.parent.tagType===0&&!Ka(t.parent.tag,e.tag)){const s=new SyntaxError(`<${e.tag}> cannot be child of <${t.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);s.loc=e.loc,t.onWarn(s)}},Ja=[Oa,...process.env.NODE_ENV!=="production"?[qa,Ga]:[]],Ya={cloak:Ta,html:Ma,text:La,model:Ra,on:Ha,show:Ua};function Za(e,t={}){return Ba(e,de({},Da,t,{nodeTransforms:[Wa,...Ja,...t.nodeTransforms||[]],directiveTransforms:de({},Ya,t.directiveTransforms||{}),transformHoist:null}))}function Xa(e,t={}){const s=e.trim().startsWith("<")?e:`<span>${e}</span>`,{code:o}=Za(s,{mode:"function"}),i=new Function("Vue",`${o}; return render;`)(js);return n.defineComponent({name:"DynamicFromString",props:t.props??{},emits:t.emits??[],setup(){return t.setup?.()??{}},render:i})}const mn={};function Qa(e){return mn[e]||(mn[e]=Xa(e,{props:{row:{type:Object,default:void 0},value:{type:null,default:void 0},data:{type:Object,default:void 0},column:{type:Object,default:void 0}}})),mn[e]}const Va={class:"flex justify-between items-center mb-[15px]"},ec={class:"font-semibold text-[16px]"},tc={class:"overflow-x-auto"},nc={class:"min-w-full relative divide-y-2 divide-gray-200 bg-white min-w-full overflow-auto divide-y-2 divide-gray-200 bg-white text-[12px] text-gray-600"},sc={class:"text-left font-medium text-gray-700"},oc={class:"py-2 min-w-[100px] max-w-[300px]"},ic={key:0,class:"py-2 min-w-[100px] max-w-[300px]"},rc={class:"divide-y divide-gray-200"},lc={class:"bg-white odd:bg-gray-50"},ac=["href"],cc={key:2},dc={key:3},pc={class:"py-2 pr-5 gap-2 inline-flex"},fc=["onClick"],mc=["onClick"],As=n.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(e){const t=n.getCurrentInstance(),s=n.ref([]),o=n.ref([]),i=e,l=n.ref([]),r=n.ref(""),c=n.ref("");async function a(){const _=await fetch("/api/data/"+i.token).then(v=>v.json());s.value=_.rows,o.value=_.columns,l.value=_.actions,r.value=_.form,c.value=_.addToken}const{$notify:p=console.log,$confirm:h,$form:d}=t?.appContext?.config?.globalProperties||{};async function m(_){await d({token:_.token}),a()}function k(){d({token:c.value})}function b(_){h({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const v=await fetch(`/api/table/${_.token}`,{method:"DELETE"});if(!v.ok){const{error:w,code:E}=await v.json();p({title:"Помилка",type:"warning",message:w});return}p({title:"Видаленно",message:"Успішно видалено"}),await a()}})}n.onMounted(async()=>{await a()});function y(_){return typeof _?.format=="string"?_.format.toLowerCase():""}function f(_,v){const E=_?.[`${v.name}_text`];if(Array.isArray(E))return E.length?E.join(", "):"-";if(E!=null&&E!=="")return E;const x=_?.[v.name];return Array.isArray(x)?x.length?x.join(", "):"-":x??"-"}function u(_,v){const E=_?.[`${v.name}_data`];if(E&&typeof E=="object")return{text:E.text??E.label??E.name??E.title??"-",color:E.color,textColor:E.textColor};const x=_?.[`${v.name}_text`]??_?.[v.name];return{text:(Array.isArray(x)?x.join(", "):x)??"-"}}function g(_,v){const w=u(_,v);return w.color?{backgroundColor:w.color,color:w.textColor??"#ffffff"}:{}}function N(_,v){const w=y(v);if(w==="badge")return u(_,v).text;if(w==="select")return f(_,v);if(w==="slot")return"-";if(w==="text")return _?.[v.name]??"-";const E=_?.[`${v.name}_data`];return E!=null&&typeof E!="object"?E:_?.[`${v.name}_text`]??_?.[v.name]??"-"}return(_,v)=>(n.openBlock(),n.createElementBlock("div",null,[n.createElementVNode("div",Va,[n.createElementVNode("div",ec,n.toDisplayString(_.title),1),l.value.includes("add")&&c.value?(n.openBlock(),n.createElementBlock("button",{key:0,onClick:k,class:"px-2 py-1 inline-flex border-solid justify-center items-center gap-2 rounded-md font-semibold focus:outline-none text-sm transition-all border border-transparent hover:text-white ring-offset-white bg-blue-100 text-blue-500 hover:bg-blue-500 focus:ring-blue-500"},"Додати")):n.createCommentVNode("",!0)]),n.createElementVNode("div",tc,[n.createElementVNode("table",nc,[n.createElementVNode("thead",sc,[n.createElementVNode("tr",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,w=>(n.openBlock(),n.createElementBlock("th",oc,n.toDisplayString(w.ua),1))),256)),l.value.includes("edit")?(n.openBlock(),n.createElementBlock("th",ic," Дії ")):n.createCommentVNode("",!0)])]),n.createElementVNode("tbody",rc,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,w=>(n.openBlock(),n.createElementBlock("tr",lc,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value,E=>(n.openBlock(),n.createElementBlock("td",{class:n.normalizeClass(y(E)==="badge"?"center pr-5":"py-2 pr-5")},[E.link?(n.openBlock(),n.createElementBlock("a",{key:0,href:E.link.replace("{{id}}",w.id),class:"font-medium cursor-pointer text-start text-wrap text-cyan-800 decoration-2 focus:outline-none focus:underline hover:text-cyan-700 hover:underline"},n.toDisplayString(N(w,E)),9,ac)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[y(E)==="slot"&&E.slot?.content?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(n.unref(Qa)(E.slot.content)),{key:0,data:w,row:w,column:E,value:w?.[E.name]},null,8,["data","row","column","value"])):y(E)==="badge"?(n.openBlock(),n.createElementBlock("span",{key:1,class:"items-center px-2 py-1 rounded-full text-xs font-semibold text-center justify-center flex",style:n.normalizeStyle(g(w,E))},n.toDisplayString(u(w,E).text),5)):y(E)==="select"?(n.openBlock(),n.createElementBlock("span",cc,n.toDisplayString(f(w,E)),1)):(n.openBlock(),n.createElementBlock("span",dc,n.toDisplayString(N(w,E)),1))],64))],2))),256)),n.createElementVNode("td",pc,[w.token?(n.openBlock(),n.createElementBlock("button",{key:0,onClick:E=>m(w),class:"inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"},v[0]||(v[0]=[n.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12px",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[n.createElementVNode("path",{d:"M20,16v4a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V6A2,2,0,0,1,4,4H8",fill:"none",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"}),n.createElementVNode("polygon",{fill:"none",points:"12.5 15.8 22 6.2 17.8 2 8.3 11.5 8 16 12.5 15.8",stroke:"#000000","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"})],-1)]),8,fc)):n.createCommentVNode("",!0),w.token?(n.openBlock(),n.createElementBlock("button",{key:1,onClick:E=>b(w),class:"inline-flex items-center justify-center bg-white border rounded-md size-7 gap-x-2 hover:bg-gray-100"},v[1]||(v[1]=[n.createStaticVNode('<svg class="flex-shrink-0 size-3.5" xmlns="http://www.w3.org/2000/svg" width="12px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line></svg>',1)]),8,mc)):n.createCommentVNode("",!0)])]))),256))])])])]))}}),hc={class:"p-[20px]"},uc={class:"flex gap-[6px] mb-5"},gc={class:"vs-form-text relative bg-white rounded-lg flex-grow"},yc={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},vc={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},bc={class:"space-y-8"},kc={key:0},Ec={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Nc=["onClick"],_c={class:"md:col-span-2"},xc={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},wc={class:"text-sm text-gray-500 dark:text-neutral-500"},Sc={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Cc=["checked","onChange"],Bc={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Tc={class:"md:col-span-2"},$c={class:"font-semibold text-gray-800 dark:text-neutral-200"},Dc=["onClick"],Oc={class:"md:col-span-2"},Ic={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Ac={class:"text-sm text-gray-500 dark:text-neutral-500"},Mc={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},Lc=["checked","onChange"],kt=n.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(e){const t=e,s=n.ref(""),o=["view","add","edit","del"],i=n.ref({});n.onMounted(async()=>{const y=await(await fetch(`/api/access-group/${t.id}?tab=vs-group-interface`)).json();y.routes&&y.routes.forEach(f=>{i.value[f.path]=new Set(f.actions)})});const l=(b,y)=>i.value[b]?.has(y)??!1,r=(b,y)=>{i.value[b]||(i.value[b]=new Set),i.value[b].has(y)?i.value[b].delete(y):i.value[b].add(y)},c=(b,y)=>{b.forEach(f=>{f.path&&(i.value[f.path]||(i.value[f.path]=new Set),i.value[f.path].has(y)?i.value[f.path].delete(y):i.value[f.path].add(y))})},a=n.computed(()=>Object.entries(i.value).map(([b,y])=>({path:b,actions:Array.from(y)})).filter(b=>b.actions.length)),p=async()=>{await fetch(`/api/access-group/${t.id}?tab=vs-group-interface`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({routes:a.value})}),console.log("Saved",a.value),Fs.notify({title:"Success!",message:"Permissions saved."})},h=()=>{i.value={}},d=b=>{if(!s.value.trim())return b;const y=s.value.toLowerCase();return b.filter(f=>f.ua.toLowerCase().includes(y)||f.path&&f.path.toLowerCase().includes(y))},m=n.computed(()=>d(t.data.routers.filter(b=>!b.menu))),k=n.computed(()=>t.data.routers.filter(b=>b.menu).map(b=>({...b,menu:d(b.menu||[])})).filter(b=>b.menu&&b.menu.length>0));return(b,y)=>(n.openBlock(),n.createElementBlock("div",hc,[n.createElementVNode("div",uc,[n.createElementVNode("div",gc,[y[1]||(y[1]=n.createElementVNode("i",{class:"absolute bottom-2/4 translate-y-2/4 text-gray-500 cursor-pointer ti"},null,-1)),n.withDirectives(n.createElementVNode("input",{type:"text",placeholder:"Пошук","onUpdate:modelValue":y[0]||(y[0]=f=>s.value=f),class:"bg-white h-[38px] text-sm py-2 px-3 block w-full border border-solid placeholder:text-nowrap border-stone-200 rounded-lg text-sm text-stone-800 placeholder:text-stone-400 focus:outline focus:z-10 focus:border-blue-500 focus:ring-blue-500 focus:outline-blue-500"},null,512),[[n.vModelText,s.value]])]),n.createElementVNode("button",{onClick:h,class:"inline-flex items-center px-3 py-2 text-sm font-medium duration-300 bg-white border rounded-lg gap-x-2 hover:bg-gray-100"}," Скинути всі "),n.createElementVNode("button",{onClick:p,class:"inline-flex items-center px-3 py-2 text-sm font-medium text-white duration-300 bg-blue-600 border border-transparent rounded-lg gap-x-2 hover:bg-blue-700 hover:text-white"}," Зберегти ")]),n.createElementVNode("div",yc,[y[2]||(y[2]=n.createElementVNode("div",{class:"self-center col-span-2"},[n.createElementVNode("h2",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Групи")],-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(o,(f,u)=>n.createElementVNode("div",{class:"col-span-1 text-center",key:u},[n.createElementVNode("h3",vc,n.toDisplayString(f),1)])),64))]),n.createElementVNode("div",bc,[m.value.length?(n.openBlock(),n.createElementBlock("div",kc,[n.createElementVNode("ul",Ec,[y[3]||(y[3]=n.createElementVNode("li",{class:"md:col-span-2"},[n.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200"},"Без категорії")],-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(o,(f,u)=>n.createElementVNode("li",{key:u,class:"md:block md:col-span-1 md:text-center"},[n.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:g=>c(m.value,o[u])}," Toggle all ",8,Nc)])),64))]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(m.value,(f,u)=>(n.openBlock(),n.createElementBlock("ul",{key:"uncat-"+u,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[n.createElementVNode("li",_c,[n.createElementVNode("p",xc,n.toDisplayString(f.ua),1),n.createElementVNode("p",wc,n.toDisplayString(f.path),1)]),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(o,(g,N)=>n.createElementVNode("li",{key:N,class:"col-span-1"},[n.createElementVNode("div",Sc,[n.createElementVNode("input",{type:"checkbox",checked:l(f.path,g),onChange:_=>r(f.path,g),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Cc)])])),64))]))),128))])):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(k.value,(f,u)=>(n.openBlock(),n.createElementBlock("div",{key:u,class:"space-y-5"},[n.createElementVNode("ul",Bc,[n.createElementVNode("li",Tc,[n.createElementVNode("h3",$c,n.toDisplayString(f.ua),1)]),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(o,(g,N)=>n.createElementVNode("li",{key:N,class:"md:block md:col-span-1 md:text-center"},[n.createElementVNode("button",{type:"button",class:"text-xs font-medium text-blue-600 decoration-2 hover:underline",onClick:_=>c(f.menu,o[N])}," Toggle all ",8,Dc)])),64))]),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(f.menu,(g,N)=>(n.openBlock(),n.createElementBlock("ul",{key:N,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[n.createElementVNode("li",Oc,[n.createElementVNode("p",Ic,n.toDisplayString(g.ua),1),n.createElementVNode("p",Ac,n.toDisplayString(g.path),1)]),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(o,(_,v)=>n.createElementVNode("li",{key:v,class:"col-span-1"},[n.createElementVNode("div",Mc,[n.createElementVNode("input",{type:"checkbox",checked:l(g.path,_),onChange:w=>r(g.path,_),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,Lc)])])),64))]))),128))]))),128))])]))}}),Ms={"vs-widget-map":Ve,"vs-widget-comments":Ye,"vs-widget-history":Ze,"vs-widget-gallery":Qe,"vs-widget-file":Xe,"vs-widget-list":St,"vs-widget-table":As,"vs-group-interface":kt},Rc={key:0,class:"mb-4 pb-2 border-b border-gray-200"},Fc={class:"text-lg font-semibold text-gray-900"},Pc=["innerHTML"],jc={key:0,class:"mb-4 pb-2 border-b border-gray-200"},zc={class:"text-lg font-semibold text-gray-900"},Hc=["innerHTML"],hn=n.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},styling:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(e){const t=e,s=n.computed(()=>t.col?{[`lg:col-span-${t.col}`]:!0}:{});function o(r){return Ms[r]||r}const i=function(r={}){return r.props&&Object.entries(r.props).forEach(([c,a])=>{r[c]=t.data[a]}),r},l=n.computed(()=>{const r={};return t.col&&(r.col=t.col),r});return(r,c)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([[s.value,r.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[r.title?(n.openBlock(),n.createElementBlock("div",Rc,[n.createElementVNode("h3",Fc,n.toDisplayString(r.title),1)])):n.createCommentVNode("",!0),r.html?(n.openBlock(),n.createElementBlock("div",{key:1,innerHTML:r.html,class:"text-gray-900 leading-relaxed"},null,8,Pc)):r.type?.includes("tabs")?(n.openBlock(),n.createBlock(Ke,{key:2,view:r.type,panels:r.items,data:r.data,styling:r.styling},null,8,["view","panels","data","styling"])):(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:3},n.renderList(r.items,a=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[a.title||a.label?(n.openBlock(),n.createElementBlock("div",jc,[n.createElementVNode("h3",zc,n.toDisplayString(a.title||a.label),1)])):n.createCommentVNode("",!0),a.html?(n.openBlock(),n.createElementBlock("div",{key:1,innerHTML:a.html,class:"text-gray-900 leading-relaxed"},null,8,Hc)):a.component?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(o(a.component)),n.mergeProps({key:2,ref_for:!0},{geom:r.data.geom,id:r.data.id,...l.value,...i(a),data:r.data},{class:"w-full"}),null,16)):n.renderSlot(r.$slots,"default",{key:3})],64))),256))],2))}}),Uc={class:"grid grid-cols-12 gap-[20px]"},qc={key:0,class:"col-span-4"},Wc=["innerHTML"],Kc=["onClick"],Gc=["innerHTML"],Jc={key:1,class:"flex w-full"},Yc={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},Zc=["onClick"],Xc={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},Qc={class:"flex-1 p-4"},Vc=["innerHTML"],ed={class:"grid grid-cols-12 gap-4"},Ke=n.defineComponent({__name:"Card",props:{panels:{default:()=>[]},data:{default:()=>({})},view:{default:"plain"},styling:{},classWrapper:{default:""},classPanel:{},normalizeTabs:{type:Boolean,default:!0},backgroundClass:{},tabContentWrapperClass:{},tabPanelClass:{},id:{},className:{},style:{}},setup(e){const t=e,s=n.ref(0),o=n.ref([]);function i(f){return Ms[f]||f}function l(f){return f.forEach(u=>{u.type&&(u.view=u.type)}),o.value=f.filter(u=>u.type==="pin"),f.filter(u=>u.type!=="pin")}const r=n.computed(()=>t.panels&&t.panels.length>0?t.normalizeTabs?l(t.panels):t.panels:t.data&&Array.isArray(t.data)?t.data.filter(u=>u.type.includes("tabs"))[0]?.items||[]:[]),c=n.computed(()=>t.panels&&t.panels.length>0?t.normalizeTabs?l(t.panels):t.panels:t.data&&Array.isArray(t.data)?t.data:[]),a=n.computed(()=>({[`view-${t.view}`]:!0})),p=f=>{const u={...f};return t.data&&(u.data=t.data),u},h=n.ref([]),d=n.ref([]),m=n.ref([]);function k(f,u){f&&f instanceof HTMLElement&&(h.value[u]=f)}function b(){d.value=h.value.map(f=>f.offsetWidth),m.value=h.value.map(f=>f.offsetLeft)}let y=null;return n.onMounted(()=>{n.nextTick(()=>{b()}),y=new ResizeObserver(()=>b()),y.observe(document.body)}),n.onBeforeUnmount(()=>{y?.disconnect()}),n.watch(s,()=>{n.nextTick(()=>{b()})}),(f,u)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(f.classWrapper||a.value)},[n.createElementVNode("div",Uc,[o.value.length!==0?(n.openBlock(),n.createElementBlock("div",qc,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.value[0].items,(g,N)=>(n.openBlock(),n.createElementBlock("div",{key:g.name||N,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[g.html?(n.openBlock(),n.createElementBlock("div",{key:0,innerHTML:g.html,class:"text-gray-900 leading-relaxed"},null,8,Wc)):g.component?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i(g.component)),n.mergeProps({key:1,ref_for:!0},g.component==="Card"?g:p(g),{id:f.data.id,class:["w-full h-full",f.styling?.classItem]}),null,16,["id","class"])):n.createCommentVNode("",!0)]))),128))])):n.createCommentVNode("",!0),n.createElementVNode("div",{class:n.normalizeClass(o.value.length!==0?"col-span-8":"col-span-12")},[f.view==="tabs"?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["overflow-hidden w-full",f.styling?.classTabWrapper])},[n.createElementVNode("div",{class:n.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative",f.styling?.classTabHeader])},[d.value.length?(n.openBlock(),n.createElementBlock("div",{key:0,class:"absolute bottom-0 h-[2px] bg-blue-600 transition-all duration-300",style:n.normalizeStyle({width:d.value[s.value]+"px",left:m.value[s.value]+"px"})},null,4)):n.createCommentVNode("",!0),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,(g,N)=>(n.openBlock(),n.createElementBlock("button",{key:g.name||N,ref_for:!0,ref:_=>k(_,N),onClick:_=>s.value=N,class:n.normalizeClass(["relative px-4 py-3 text-sm font-medium transition-colors duration-300",s.value===N?"text-blue-600":"text-gray-600 hover:text-gray-800"])},n.toDisplayString(g.title||g.label||g.name||`Tab ${N+1}`),11,Kc))),128))],2),n.createElementVNode("div",{class:n.normalizeClass([f.styling?.classTabContent,"p-1"])},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,(g,N)=>n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:g.name||N,class:n.normalizeClass(["transition-all duration-300 ease-in-out",s.value===N?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",f.classPanel||"w-full border-gray-100"])},[g.html?(n.openBlock(),n.createElementBlock("div",{key:0,innerHTML:g.html,class:"text-gray-900 leading-relaxed"},null,8,Gc)):f.$slots[`tab-${N}`]?n.renderSlot(f.$slots,`tab-${N}`,{key:1,item:g,data:f.data}):g.component||g.name?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i(g.component||g.name)),n.mergeProps({key:2,ref_for:!0},g.component==="Card"?g:p(g),{styling:f.styling,id:f.data.id,class:["w-full h-full",f.styling?.classItem]}),null,16,["styling","id","class"])):n.renderSlot(f.$slots,g.slot||`tab-${N}`,{key:3,item:g,data:f.data})],2)),[[n.vShow,s.value===N]])),128))],2)],2)):f.view==="vertical-tabs"?(n.openBlock(),n.createElementBlock("div",Jc,[n.createElementVNode("div",Yc,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,(g,N)=>(n.openBlock(),n.createElementBlock("button",{key:g.name||N,onClick:_=>s.value=N,class:n.normalizeClass(["relative px-4 py-3 text-sm font-medium text-left transition-colors duration-300",s.value===N?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[n.createTextVNode(n.toDisplayString(g.title||g.label||g.name||`Tab ${N+1}`)+" ",1),s.value===N?(n.openBlock(),n.createElementBlock("span",Xc,u[0]||(u[0]=[n.createElementVNode("svg",{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"currentColor",class:"remixicon text-blue-600 rounded-full bg-white shadow scale-90 opacity-100 transition ease-out"},[n.createElementVNode("path",{d:"M13.1717 12.0007L8.22192 7.05093L9.63614 5.63672L16.0001 12.0007L9.63614 18.3646L8.22192 16.9504L13.1717 12.0007Z"})],-1)]))):n.createCommentVNode("",!0)],10,Zc))),128))]),n.createElementVNode("div",Qc,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,(g,N)=>n.withDirectives((n.openBlock(),n.createElementBlock("div",{key:g.name||N,class:n.normalizeClass(["transition-all duration-300 ease-in-out",s.value===N?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",f.classPanel||"w-full border-gray-100 py-2"])},[g.html?(n.openBlock(),n.createElementBlock("div",{key:0,innerHTML:g.html,class:"text-gray-900 leading-relaxed"},null,8,Vc)):f.$slots[`tab-${N}`]?n.renderSlot(f.$slots,`tab-${N}`,{key:1,item:g,data:f.data}):g.component||g.name?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i(g.component||g.name)),n.mergeProps({key:2,ref_for:!0},g.component==="Card"?g:p(g),{id:f.data.id,class:["w-full h-full",f.styling?.classItem]}),null,16,["id","class"])):n.renderSlot(f.$slots,g.slot||`tab-${N}`,{key:3,item:g,data:f.data})],2)),[[n.vShow,s.value===N]])),128))])])):(n.openBlock(),n.createElementBlock("div",{key:2,class:n.normalizeClass(f.styling?.classPlain||"p-1 w-full")},[n.createElementVNode("div",ed,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,(g,N)=>(n.openBlock(),n.createElementBlock(n.Fragment,{key:g.name||N},[f.$slots[`panel-${N}`]?n.renderSlot(f.$slots,`panel-${N}`,{key:0,item:g,data:f.data}):g.items||g.html?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(hn),n.mergeProps({key:1,ref_for:!0},p(g),{items:g.items,class:["w-full h-full",f.styling?.classItem],styling:f.styling}),null,16,["items","class","styling"])):g.component?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(i(g.component)),n.mergeProps({key:2,ref_for:!0},p(g),{class:["w-full h-full",f.styling?.classItem],styling:f.styling}),null,16,["class","styling"])):n.renderSlot(f.$slots,g.slot||`panel-${N}`,{key:3,item:g,data:f.data})],64))),128))])],2))],2)])],2))}}),td=["onClick"],Ls=ye(n.defineComponent({__name:"CopyNotification",setup(e,{expose:t}){const s=n.ref([]);let o=1;const i=()=>{if(s.value.length>=10){const c=s.value[0];clearTimeout(c.timer),s.value.shift()}const r={id:o++,timer:setTimeout(()=>{l(r.id)},1500)};s.value.push(r)},l=r=>{const c=s.value.findIndex(a=>a.id===r);if(c!==-1){const a=s.value[c];clearTimeout(a.timer),s.value.splice(c,1)}};return t({addNotification:i}),n.onUnmounted(()=>{s.value.forEach(r=>{clearTimeout(r.timer)})}),(r,c)=>(n.openBlock(),n.createBlock(n.Teleport,{to:"body"},[n.createVNode(n.TransitionGroup,{name:"notification",tag:"div",class:"fixed top-4 right-4 z-50 space-y-2"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.value,a=>(n.openBlock(),n.createElementBlock("div",{key:a.id,class:"bg-green-500 text-white px-4 py-3 rounded-lg shadow-lg flex items-center gap-3 min-w-64 max-w-sm"},[n.createVNode(n.unref(Gs),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),c[0]||(c[0]=n.createElementVNode("div",{class:"flex-1"},[n.createElementVNode("p",{class:"font-medium text-sm"},"Ссылка скопирована!"),n.createElementVNode("p",{class:"text-xs text-green-100 opacity-90"},"Файл добавлен в буфер обмена")],-1)),n.createElementVNode("button",{onClick:p=>l(a.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[n.createVNode(n.unref(xt),{class:"h-4 w-4"})],8,td)]))),128))]),_:1})]))}}),[["__scopeId","data-v-55903525"]]);Ke.install=function(e){e.component("vs-widget-file",Xe),e.component("vs-widget-comments",Ye),e.component("vs-widget-history",Ze),e.component("vs-widget-gallery",Qe),e.component("vs-widget-map",Ve),e.component("vs-group-interface",kt),e.component("CommentsWidget",Ye),e.component("HistoryWidget",Ze),e.component("GalleryWidget",Qe),e.component("FilesWidget",Xe),e.component("MapWidget",Ve),e.component("Card",Ke),e.component("CardItem",hn),e.component("DescriptionListWidget",St),e.component("CopyNotification",Ls),e.component("GroupInterfaceWidget",kt)},U.Card=Ke,U.CardItem=hn,U.CommentsWidget=Ye,U.CopyNotification=Ls,U.DescriptionListWidget=St,U.FilesWidget=Xe,U.GalleryWidget=Qe,U.GroupInterfaceWidget=kt,U.HistoryWidget=Ze,U.MapWidget=Ve,U.TableWidget=As,U.default=Ke,Object.defineProperties(U,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|