@opengis/widgets 0.0.37 → 0.0.39
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 +1840 -1815
- package/dist/index.umd.cjs +13 -13
- package/dist/widgets/map/MapWidget.vue.d.ts +1 -0
- package/dist/widgets/map/MapWidget.vue.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(V,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@opengis/core")):typeof define=="function"&&define.amd?define(["exports","vue","@opengis/core"],e):(V=typeof globalThis<"u"?globalThis:V||self,e(V.WidgetLib={},V.Vue,V.OpenGISCore))})(this,(function(V,e,We){"use strict";function Rs(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const Ps=Rs(e);/**
|
|
2
2
|
* @license lucide-vue-next v0.535.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -48,7 +48,7 @@
|
|
|
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 Ke=Y("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.
|
|
@@ -128,24 +128,24 @@
|
|
|
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 rn=Y("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),or={class:"border-t pt-3 mt-4"},sr={class:"flex gap-2"},rr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},ir={class:"flex-1 space-y-2"},lr={class:"flex justify-between items-center"},ar={class:"flex gap-2"},cr=["disabled"],mo=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(t,{emit:n}){const o=e.useModel(t,"isReply"),s=e.ref(""),r=n,l=()=>{s.value.trim()&&(r("sendComment",s.value),s.value="")},i=a=>{(a.ctrlKey||a.metaKey)&&a.key==="Enter"&&(a.preventDefault(),l())};return(a,c)=>(e.openBlock(),e.createElementBlock("div",or,[e.createElementVNode("div",sr,[e.createElementVNode("span",rr,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",ir,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=p=>s.value=p),onKeydown:i,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,s.value]]),e.createElementVNode("div",lr,[c[4]||(c[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",ar,[o.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:c[1]||(c[1]=p=>o.value=!1)},[e.createVNode(e.unref(rn),{class:"h-3 w-3"}),c[2]||(c[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:!s.value.trim(),onClick:l},[e.createVNode(e.unref(fo),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=e.createTextVNode(" Send ",-1))],8,cr)])])])])]))}}),dr={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"},pr=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(t,{emit:n}){const o=n,s=e.useModel(t,"showMoreOptions"),r=e.ref(),l=e.ref(!0),i=async p=>{s.value&&r.value&&!r.value.contains(p.target)&&!l.value&&(s.value=!1),l.value=!1},a=()=>{s.value=!1,o("edit")},c=()=>{s.value=!1,o("delete")};return e.onMounted(()=>{document.addEventListener("click",i)}),e.onUnmounted(()=>{document.removeEventListener("click",i)}),(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:r},[e.createElementVNode("div",dr,[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:a},[e.createVNode(e.unref(er),{class:"h-3 w-3 mr-2"}),m[0]||(m[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:c},[e.createVNode(e.unref(on),{class:"h-3 w-3 mr-2"}),m[1]||(m[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),fr={class:"space-y-2"},mr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},ur={class:"flex-1 min-w-0 space-y-1 relative"},hr={class:"flex items-center gap-2"},gr={class:"font-medium text-xs"},yr={class:"text-xs text-gray-500"},vr={key:0,class:"text-xs text-gray-700 leading-relaxed"},br={class:"flex justify-between text-xs"},kr={class:"flex items-center gap-2"},Er={key:0,class:"flex gap-2"},wr=["disabled"],Nr={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},xr=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(t,{emit:n}){const o=n,s=t,r=e.ref(s.comment.text),l=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),i=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"),a=e.ref(!1),c=e.ref(!1),p=e.ref(!1),m=e.ref(!1),f=w=>{const C=new Date,R=Math.floor((C.getTime()-w.getTime())/(1e3*60*60));return R<1?`${Math.floor((C.getTime()-w.getTime())/6e4)}m`:R<24?`${R}h`:`${Math.floor(R/24)}d`},u=()=>{m.value=!m.value,m.value?o("like",s.comment.id,"add"):o("like",s.comment.id,"delete")},k=()=>{o("edit",s.comment.id,r.value),p.value=!1},_=(w,C)=>{o("like",w,C)},x=(w,C)=>{o("edit",w,C)};return(w,C)=>{const R=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",fr,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",p.value?"bg-gray-50":""])},[e.createElementVNode("span",mr,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",ur,[e.createElementVNode("div",hr,[e.createElementVNode("span",gr,e.toDisplayString(w.comment?.author),1),e.createElementVNode("span",yr,e.toDisplayString(f(w.comment?.createdAt)),1)]),p.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":C[0]||(C[0]=T=>r.value=T),class:e.normalizeClass(p.value?i.value:l.value)},null,2)),[[e.vModelText,r.value]]):(e.openBlock(),e.createElementBlock("p",vr,e.toDisplayString(w.comment?.text),1)),e.createElementVNode("div",br,[e.createElementVNode("div",kr,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",m.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:C[1]||(C[1]=T=>u())},[e.createVNode(e.unref(Zs),{class:e.normalizeClass(["h-3 w-3",m.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(w.comment?.likes),1)],2),w.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]=T=>c.value=!0)},[e.createVNode(e.unref(Qs),{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]=T=>a.value=!0)},[e.createVNode(e.unref(Ks),{class:"h-3 w-3"})])]),p.value?(e.openBlock(),e.createElementBlock("div",Er,[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]=T=>p.value=!1)},[e.createVNode(e.unref(rn),{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:!r.value.trim(),onClick:C[5]||(C[5]=T=>k())},[e.createVNode(e.unref(fo),{class:"h-3 w-3 mr-1"}),C[12]||(C[12]=e.createTextVNode(" Send ",-1))],8,wr)])):e.createCommentVNode("",!0)])]),a.value?(e.openBlock(),e.createBlock(pr,{key:0,showMoreOptions:a.value,"onUpdate:showMoreOptions":C[6]||(C[6]=T=>a.value=T),onEdit:C[7]||(C[7]=T=>p.value=!0),onDelete:C[8]||(C[8]=T=>w.$emit("delete",w.comment?.id)),comment:w.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),w.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.comment?.replies,T=>(e.openBlock(),e.createBlock(R,{key:T.id,comment:T,isInside:!0,onDelete:D=>w.$emit("delete",T.id),onLike:_,onEdit:x},null,8,["comment","onDelete"]))),128)),c.value&&!w.isInside?(e.openBlock(),e.createBlock(mo,{key:0,onSendComment:C[9]||(C[9]=T=>w.$emit("reply",w.comment?.id,T)),isReply:c.value,"onUpdate:isReply":C[10]||(C[10]=T=>c.value=T)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),_r=["id"],Cr={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},wt=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(t,{emit:n}){const o=t,s=n,r=e.ref(o.comments??[]);async function l(){if(!o.id)return;const f=await fetch(`/api/widget/comment/${o.id}`).then(u=>u.json());r.value=f.rows.map(u=>({id:u.communication_id,author:u.username,text:u.body,createdAt:new Date(u.cdate)}))}r.value.length===0&&l();const i=async f=>{o.onAddComment?o.onAddComment(f):o.id&&(await fetch(`/api/widget/comment/${o.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:f})}),await l()),s("add",f)},a=(f,u)=>{o?.onLike?.(f,u),s("like",f,u)},c=(f,u)=>{o.onReply?.(f,u),s("reply",f,u)},p=async(f,u)=>{o.onEdit?o.onEdit(f,u):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:u})}),await l()),s("edit",f,u)},m=async f=>{o.onDelete?o.onDelete(f):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"DELETE"}),await l()),s("delete",f)};return(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",f.className]),id:f.id,style:e.normalizeStyle(f.style)},[f.title?(e.openBlock(),e.createElementBlock("h3",Cr,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([f.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:f.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,k=>(e.openBlock(),e.createBlock(xr,{key:k.id,comment:k,onReply:c,onLike:a,onDelete:u[0]||(u[0]=_=>m(_)),onEdit:p},null,8,["comment"]))),128))],6),e.createVNode(mo,{onSendComment:u[1]||(u[1]=k=>i(k))})],14,_r))}}),uo=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:Ge}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:Vs}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:tr}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:Ys}]]),Sr={class:"mx-auto font-sans"},Br={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Tr={class:"relative"},$r={class:"space-y-3"},Dr={class:"flex-1 min-w-0 pb-2"},Lr={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Or={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Ar={class:"font-medium text-xs"},Ir={class:"text-xs text-gray-500"},Mr={class:"space-y-1"},Rr={class:"text-xs text-gray-700"},Pr={class:"capitalize mr-1"},Fr={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"},zr={key:0,class:"flex items-center gap-1 text-xs"},jr={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},Hr={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},Nt=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(t){const n=t,o=e.ref(Array.isArray(n.data)?n.data:[]);o.value.length===0&&n.id&&s();async function s(){const r=await fetch(`/api/widget/history/${n.id}`);if(!r.ok)return{data:[]};const l=await r.json();l.rows.forEach(i=>{i.timestamp=new Date(i.cdate),i.id=i.entity_id,i.entityType=i.entity_type,i.entityId=i.entity_id,i.action=i.change_type,i.userId=i.change_user_id,i.userName=i.username,i.timestamp=new Date(i.cdate),i.description=i.username,i.status=i.username}),o.value=l.rows}return(r,l)=>(e.openBlock(),e.createElementBlock("div",Sr,[r.title?(e.openBlock(),e.createElementBlock("h3",Br,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:r.maxHeight+"px"})},[e.createElementVNode("div",Tr,[l[0]||(l[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",$r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:i?.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(uo).get(i?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(uo).get(i?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Dr,[e.createElementVNode("div",Lr,[e.createElementVNode("span",Or,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",Ar,e.toDisplayString(i?.userName),1),e.createElementVNode("span",Ir,e.toDisplayString(i?.timestamp.toLocaleDateString("ua-UA",{day:"2-digit",month:"2-digit",year:"numeric"}))+" "+e.toDisplayString(i?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",Mr,[e.createElementVNode("div",Rr,[e.createElementVNode("span",Pr,e.toDisplayString(i?.action),1),i?.entityId?(e.openBlock(),e.createElementBlock("span",Fr,e.toDisplayString(i?.entityId),1)):e.createCommentVNode("",!0)]),i?.changes?.[i?.entityId]?(e.openBlock(),e.createElementBlock("div",zr,[i?.changes?.[i?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",jr,e.toDisplayString(i?.changes?.[i?.entityId]?.old),1)):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.old&&i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(qs),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",Hr,e.toDisplayString(i?.changes?.[i?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Ur={key:0,class:"text-xl font-semibold"},qr={class:"flex gap-1"},Wr={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"},Kr=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(t){const n=e.useModel(t,"modelValue"),o={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",s.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[s.title?(e.openBlock(),e.createElementBlock("h3",Ur,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",qr,[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",n.value==="list"?o.active:o.inactive]),onClick:r[0]||(r[0]=l=>n.value="list")},[e.createVNode(e.unref(Xs),{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",n.value==="grid"?o.active:o.inactive]),onClick:r[1]||(r[1]=l=>n.value="grid")},[e.createVNode(e.unref(Js),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:r[2]||(r[2]=l=>s.$emit("onAddFile",l))},null,32),e.createElementVNode("div",Wr,[e.createVNode(e.unref(po),{class:"h-4 w-4"}),r[3]||(r[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),ln={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:Ge,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Gs,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:nr,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:Ge,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Us,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:co,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:co,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:Ge,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:Ge,label:"PPT"}};function ho(t,n="en"){const o={month:"short",day:"numeric"};return new Intl.DateTimeFormat(n,o).format(t)}function go(t){if(t===0)return"0 B";const n=1024,o=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,s)).toFixed(1))} ${o[s]}`}const Gr={class:"space-y-0.5"},Jr=["onClick"],Zr=["onClick"],Yr={class:"flex items-center gap-2"},Xr={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},Qr={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},Vr={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},ei={class:"flex items-center gap-1"},ti=["onClick"],ni=["onClick"],oi=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,s=>(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:s.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",s),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(ln)[s?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ln)[s?.ext]?.icon||e.unref(ln).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:r=>n.$emit("openLightbox",s)},[e.createElementVNode("div",Yr,[e.createElementVNode("span",Xr,e.toDisplayString(s?.uploaded_name||s?.name),1)])],8,Zr),e.createElementVNode("div",Qr,e.toDisplayString(e.unref(go)(s.size)),1),e.createElementVNode("div",Vr,e.toDisplayString(e.unref(ho)(s.createdAt)),1),e.createElementVNode("div",ei,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",s),["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(ao),{class:"h-3 w-3"})],8,ti),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(r=>n.$emit("delete",r,s?.file_id),["stop"])},[e.createVNode(e.unref(on),{class:"h-3 w-3"})],8,ni)])],8,Jr))),128))]))}}),si={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},ri=["onClick"],ii={class:"space-y-2"},li={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},ai=["src"],ci={class:"space-y-1"},di=["title"],pi={class:"text-xs text-gray-500 text-left"},fi={class:"absolute top-2 right-1 flex items-center gap-1"},mi=["onClick"],ui=["onClick"],hi=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",s),["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",ii,[e.createElementVNode("div",li,[s.ext==="png"||s.ext==="jpg"||s.ext==="jpeg"||s.ext==="gif"||s.ext==="svg"||s.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${s?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,ai)):(e.openBlock(),e.createBlock(e.unref(Ge),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",ci,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:s.uploaded_name||s.name},e.toDisplayString(s.uploaded_name||s.name),9,di),e.createElementVNode("p",pi,e.toDisplayString(e.unref(ho)(s.createdAt))+", "+e.toDisplayString(e.unref(go)(s.size)),1)])]),e.createElementVNode("div",fi,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",s),["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(ao),{class:"h-3 w-3"})],8,mi),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(r=>n.$emit("delete",r,s?.file_id),["stop"])},[e.createVNode(e.unref(on),{class:"h-3 w-3"})],8,ui)])],8,ri))),128))]))}}),gi={class:"mx-auto font-sans"},yi={key:1},xt=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const o=t,s=e.ref(!1),r=e.ref(null),l=e.ref(!1),i=e.ref(0),a=e.ref(o.files??[]),c=n;a.value.length===0&&C();const p=(D,B)=>{r.value=B,s.value=!0},m=()=>{r.value&&(_(r.value),r.value=null,s.value=!1)},f=e.computed(()=>Array.isArray(a.value)?a.value.map(D=>D?.file_path):[]),u=D=>{const B=f.value.findIndex(H=>H===D.file_path);B!==-1&&(l.value=!0,i.value=B)},k=D=>{o.onAddFile?o.onAddFile(D):R(D),c("add",D)},_=D=>{o.onDelete?o.onDelete(D):T(D),c("delete",D)},x=D=>{const B=document.createElement("a");B.setAttribute("download",D?.uploaded_name||D?.name),B.href=D?.file_path||D?.path,B.click()},w=e.ref("list");async function C(){if(!o.id)return;const D=await fetch(`/api/widget/file/${o.id}`).then(B=>B.json());D.rows.forEach(B=>{B.timestamp=new Date(B.cdate),B.id=B.entity_id,B.entityType=B.entity_type,B.entityId=B.entity_id,B.entityType=B.entity_type,B.action=B.change_type,B.userId=B.change_user_id,B.userName=B.username,B.timestamp=new Date(B.cdate),B.description=B.username,B.status=B.username}),a.value=D.rows}const R=async D=>{if(!(!D.target||!D.target.files||D.target.files.length===0))try{await Promise.all(Array.from(D.target.files).map(async B=>{const H=new FormData;H.append("file",B);const K=`/api/widget/file/${o.id}`,M=await fetch(K,{method:"POST",body:H});if(!M.ok)throw new Error(`HTTP error! status: ${M.status}`);return B})),await C()}catch(B){console.error("Помилка при завантаженні файлів:",B)}},T=async D=>{try{await fetch(`/api/widget/file/${o.id}/${D}`,{method:"DELETE"}),await C()}catch(B){console.error(B)}};return(D,B)=>{const H=e.resolveComponent("MessageBox"),K=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",gi,[e.createVNode(Kr,{modelValue:w.value,"onUpdate:modelValue":B[0]||(B[0]=M=>w.value=M),title:o.title,onOnAddFile:B[1]||(B[1]=M=>k(M))},null,8,["modelValue","title"]),a.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(D.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:D.maxHeight+"px"})},[w.value==="list"?(e.openBlock(),e.createBlock(oi,{key:0,onDelete:p,onDownload:x,onOpenLightbox:B[2]||(B[2]=M=>u(M)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0),w.value==="grid"?(e.openBlock(),e.createBlock(hi,{key:1,onDelete:p,onDownload:x,onOpenLightbox:B[3]||(B[3]=M=>u(M)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",yi,B[6]||(B[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(H,{modelValue:s.value,"onUpdate:modelValue":B[4]||(B[4]=M=>s.value=M),onConfirm:m,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(K,{modelValue:l.value,"onUpdate:modelValue":B[5]||(B[5]=M=>l.value=M),images:f.value,"start-index":i.value},null,8,["modelValue","images","start-index"])],64)}}}),vi={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},bi=["onClick"],ki={key:0,rel:"noreferrer",class:"relative block h-full w-full"},Ei=["src"],wi={key:0,class:"thumb-cover"},Ni=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(t,{emit:n}){const o=n,s=e.ref(!1),r=e.ref(0),l=t,i=e.computed(()=>Array.isArray(l.items)?l.items.map(c=>c?.file_path):[]),a=c=>{const p=i.value.findIndex(m=>m===c.file_path);p!==-1&&(s.value=!0,r.value=p)};return(c,p)=>{const m=e.resolveComponent("Lightbox");return c.items?.length>=1?(e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+u,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:u,onClick:e.withModifiers(k=>a(f),["stop"])},[u<5?(e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("img",{src:`/file/resize?filepath=${f?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",u===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,Ei),u===4&&c.items?.length>5?(e.openBlock(),e.createElementBlock("div",wi," +"+e.toDisplayString(c.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,bi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-c.items.length),f=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+f,class:e.normalizeClass(["h-full w-full image"+(c.items.length+f-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(m,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=f=>s.value=f),images:i.value,"start-index":r.value,delete:"true",download:"true",onDelete:p[1]||(p[1]=f=>o("delete",f))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),xi={key:0,class:"text-xl font-semibold"},_i={class:"flex gap-1"},Ci={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"},Si=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",n.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[n.title?(e.openBlock(),e.createElementBlock("h3",xi,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_i,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:o[0]||(o[0]=s=>n.$emit("onAddImage",s))},null,32),e.createElementVNode("div",Ci,[e.createVNode(e.unref(po),{class:"h-4 w-4"}),o[1]||(o[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),Bi={class:"w-full mx-auto font-sans",ref:"containerRef"},Ti={key:1},_t=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const o=t,s=e.ref(o.items??[]),r=n;s.value.length===0&&c();const l=m=>{o.onAddImage?o.onAddImage(m):a(m),r("add",m)},i=m=>{const f=s.value.find(u=>u.file_path===m)?.file_id;f&&(o.onDelete?o.onDelete(f):p(f))},a=async m=>{if(!(!m.target||!m.target.files||m.target.files.length===0))try{await Promise.all(Array.from(m.target.files).map(async f=>{const u=new FormData;u.append("file",f);const k=`/api/widget/file/${o.id}`,_=await fetch(k,{method:"POST",body:u});if(!_.ok)throw new Error(`HTTP error! status: ${_.status}`);return f})),await c()}catch(f){console.error("Помилка при завантаженні файлів:",f)}};async function c(){if(!o.id)return;const m=await fetch(`/api/widget/file/${o.id}`).then(f=>f.json());s.value=m.rows}const p=async m=>{try{await fetch(`/api/widget/file/${o.id}/${m}`,{method:"DELETE"}),await c()}catch(f){console.error(f)}};return(m,f)=>(e.openBlock(),e.createElementBlock("div",Bi,[e.createVNode(Si,{title:m.title,onOnAddImage:f[0]||(f[0]=u=>l(u))},null,8,["title"]),s.value.length>0?(e.openBlock(),e.createBlock(Ni,{key:0,items:s.value,onDelete:f[1]||(f[1]=u=>i(u))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",Ti,f[2]||(f[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),$i={class:"text-value"},Di={class:"text-sm text-gray-900"},Li=e.defineComponent({__name:"TextValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=n.item.value;return typeof s=="boolean"?s?"Так":"Ні":s==null?"—":String(s)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",$i,[e.createElementVNode("span",Di,e.toDisplayString(o.value),1)]))}}),Re=(t,n)=>{const o=t.__vccOpts||t;for(const[s,r]of n)o[s]=r;return o},Oi=Re(Li,[["__scopeId","data-v-34a76c89"]]),Ai={class:"link-value"},Ii=["href"],Mi=Re(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=String(n.item.value);try{const r=new URL(s);return r.hostname+r.pathname}catch{return s}});return(s,r)=>(e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("a",{href:String(s.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(o.value)+" ",1),r[0]||(r[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,Ii)]))}}),[["__scopeId","data-v-932f028c"]]),Ri={class:"date-value"},Pi={class:"text-sm text-gray-900"},Fi=Re(e.defineComponent({__name:"DateValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=n.item.value;if(s instanceof Date)return s.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof s=="string"){const r=new Date(s);if(!isNaN(r.getTime()))return r.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(s)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",Ri,[e.createElementVNode("span",Pi,e.toDisplayString(o.value),1)]))}}),[["__scopeId","data-v-cd4df08e"]]),zi={class:"status-value"},ji={key:0,class:"mr-1"},Hi=Re(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{switch(String(n.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"}}),s=e.computed(()=>{switch(String(n.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(r,l)=>(e.openBlock(),e.createElementBlock("div",zi,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",o.value])},[s.value?(e.openBlock(),e.createElementBlock("span",ji,[e.createElementVNode("i",{class:e.normalizeClass(s.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(r.item.value)),1)],2)]))}}),[["__scopeId","data-v-aea1f529"]]),Ui={class:"custom-value"},qi={class:"text-sm text-gray-900"},Wi=Re(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Ui,[e.renderSlot(n.$slots,"default",{item:n.item,value:n.item.value},()=>[e.createElementVNode("span",qi,e.toDisplayString(String(n.item.value)),1)],!0)]))}}),[["__scopeId","data-v-12c8b3f3"]]),Ki=["id"],Gi={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Ji={key:1,class:"overflow-x-auto"},Zi={class:"min-w-full divide-y divide-gray-200"},Yi={class:"bg-white divide-y divide-gray-200"},Xi={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Qi={class:"flex items-center gap-2"},Vi=["title"],el={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},tl={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},nl={class:"flex items-start gap-3"},ol={key:0,class:"flex-shrink-0"},sl={class:"flex-1 min-w-0"},rl={class:"flex items-center gap-2 mb-2"},il={class:"text-sm font-medium text-gray-900"},ll=["title"],al={key:3,class:"overflow-x-auto"},cl={class:"min-w-full divide-y divide-gray-200"},dl={class:"bg-white divide-y divide-gray-200"},pl={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},fl={class:"flex items-center gap-2"},ml=["title"],ul={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},an=Re(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(t){const n=o=>{switch(o.type){case"link":return Mi;case"date":return Fi;case"status":return Hi;case"custom":return Wi;default:return Oi}};return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",o.className]),id:o.id,style:e.normalizeStyle(o.style)},[o.title?(e.openBlock(),e.createElementBlock("h3",Gi,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),o.view==="table"?(e.openBlock(),e.createElementBlock("div",Ji,[e.createElementVNode("table",Zi,[e.createElementVNode("tbody",Yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",Xi,[e.createElementVNode("div",Qi,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},s[0]||(s[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Vi)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",el,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])])):o.view==="grid"?(e.openBlock(),e.createElementBlock("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id||r.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",nl,[r.icon?(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("i",{class:e.normalizeClass([r.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",sl,[e.createElementVNode("div",rl,[e.createElementVNode("h4",il,e.toDisplayString(r.label),1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:r.tooltip},s[1]||(s[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,ll)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",al,[e.createElementVNode("table",cl,[e.createElementVNode("tbody",dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",pl,[e.createElementVNode("div",fl,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},s[2]||(s[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,ml)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",ul,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])]))],14,Ki))}}),[["__scopeId","data-v-106790ef"]]),hl={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 yo(t){return t?t.type==="FeatureCollection"||t.type==="Feature"?t:t.geom?{type:"Feature",geometry:{type:t.geom.type,coordinates:t.geom.coordinates},properties:{}}:t.type&&t.coordinates?{type:"Feature",geometry:t,properties:{}}:null:null}const gl={key:0,class:"absolute inset-0 z-[600] flex items-center justify-center pointer-events-none bg-black/20"},yl={class:"bg-black/70 text-white text-xs sm:text-sm px-4 py-2 rounded-md shadow"},vl={class:"bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900"},bl={class:"space-y-0.5"},kl={class:"text-gray-500"},El={class:"text-gray-900 text-right break-all"},wl={key:2,class:"absolute bottom-3 left-3 z-[400] bg-white/90 border border-gray-200 rounded-md shadow px-3 py-2 text-[11px] sm:text-xs space-y-1 max-w-[220px]"},Nl={class:"leading-tight"},xl={key:4,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer"},_l={class:"flex items-center justify-between p-2 border-b"},Cl={class:"p-2 border-b"},Sl={class:"flex items-center"},Bl=["value"],Tl={class:"ml-2"},$l={class:"p-2"},Dl={class:"flex items-center"},Ll=["checked","onChange"],Ol={class:"ml-2"},Ct=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},katottg:{},tms:{},layers:{},title:{},height:{},bounds:{},legend:{}},setup(t){function n(h){let y=h?.parent??null;for(;y;){const S=y.props?.view;if(S==="tabs"||S==="vertical-tabs")return!0;y=y.parent??null}return!1}const o=t,s=e.getCurrentInstance(),r=e.inject("vsCardTabsContext",!1),l=e.computed(()=>(typeof r=="boolean"?r:r.value)?!0:n(s)),i=s?.appContext.config.globalProperties?.$settings??{},a=(()=>{const h=Array.isArray(i.center)?i.center:[],y=Number(h[0]),S=Number(h[1]);return Number.isFinite(y)&&Number.isFinite(S)?[y,S]:[50,30]})(),c=s?.uid??Math.floor(Math.random()*1e4),p=e.ref(null);let m,f,u,k;const _=be(),x=e.ref(Object.keys(_)[0]),w=`base-layer-${c}`;let C;const R=e.ref(!0),T=e.ref(!1),D=e.ref(!1),B=e.ref(!1),H=e.ref("Використовуйте Ctrl + колесо миші для зміни масштабу");let K=null;const M=e.ref([]),I=e.reactive({}),F=e.ref([]),z=e.computed(()=>F.value.map(h=>I[h]).filter(Boolean)),E=e.ref(null),$=e.computed(()=>E.value?.entries??[]),N=e.computed(()=>{if(!E.value)return;const h=12,y=E.value.point.x+h,S=E.value.point.y+h;return{left:`${y}px`,top:`${S}px`}}),L=e.computed(()=>Array.isArray(o.legend)?o.legend.map((h,y)=>{const S=typeof h?.color=="string"?h.color.trim():"",d=typeof h?.label=="string"?h.label.trim():"";return!S||!d?null:{color:S,label:d,key:`${d}-${y}`}}).filter(h=>!!h):[]),J=e.computed(()=>{if(T.value)return"fixed inset-0 w-screen h-screen z-[9999] bg-white";const h=["relative","h-full"];return o.height||h.push("min-h-[300px]"),o.title&&!l.value&&h.push("pb-[3.25rem]"),h.join(" ")}),ae=e.computed(()=>T.value||o.height==null?void 0:{height:typeof o.height=="number"?`${o.height}px`:String(o.height)}),Me=e.computed(()=>{const h=["w-full","h-full"];return!o.height&&!T.value&&h.push("min-h-[300px]"),h.join(" ")});async function Be(){const h=d=>{if(!Array.from(document.styleSheets??[]).some(g=>g?.href?.includes(d))){const g=document.createElement("link");g.rel="stylesheet",g.href=d,document.head.appendChild(g)}};h("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),h("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css");const y=d=>new Promise((v,g)=>{if(Array.from(document.scripts??[]).some(P=>P.src===d))return v();const A=document.createElement("script");A.src=d,A.async=!0,A.onload=()=>v(),A.onerror=P=>g(P),document.body.appendChild(A)});return await y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").catch(()=>{}),await y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js").catch(()=>{}),await y("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>{}),window.L}function be(){const h=y=>y.map((S,d)=>{const v=typeof S?.key=="string"&&S.key?S.key:`b${d}`,g=Ne(S?.url);return g?{...S,key:v,url:g}:null}).filter(S=>!!S).reduce((S,d)=>({...S,[d.key]:d}),{});return Array.isArray(i?.basemaps)&&i.basemaps.length?h(i.basemaps):h([{key:"topo100",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},{key:"orto10",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},{key:"osmb",url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}])}function Ne(h){if(typeof h!="string"||!h.trim())return"";const y=h.trim();if(/^https?:\/\//i.test(y))return y;const S=window.location?.origin??"",d=y.replace(/^\/+/,"");return S?`${S}/${d}`:`/${d}`}function xe(h,y){return h?.id!=null?String(h.id):h?.url?`${h.url}-${y}`:`layer-${y}`}function Xn(h){if(!h||typeof h!="object")return;const y={},S=b=>{if(typeof b=="string"){const O=b.trim().replace(/,+$/,"");return O?/^-?\d+(\.\d+)?$/.test(O)?Number(O):O:void 0}return b},d=()=>(y.colorSet||(y.colorSet={}),y.colorSet),v=(b,O)=>{if(b==null||typeof O!="string")return;const A=O.trim().replace(/,+$/,"");A&&(d()[String(b)]=A)},g=b=>{const O=["color","fill","hex","valueColor","value_color"].map(P=>b[P]).find(P=>typeof P=="string"&&P.trim());if(!O)return!1;const A=["value","key","id","code","status"].map(P=>b[P]).find(P=>P!=null&&P!=="");return A==null?!1:(v(A,O),!0)};return Object.entries(h).forEach(([b,O])=>{if(b==="colorSet"&&O!=null){Array.isArray(O)?O.forEach(P=>{P&&(typeof P=="object"&&g(P)||typeof P=="object"&&Object.entries(P).forEach(([V,ke])=>v(V,typeof ke=="string"?ke:void 0)))}):typeof O=="object"&&(g(O)||Object.entries(O).forEach(([P,V])=>v(P,typeof V=="string"?V:void 0)));return}const A=S(O);if(A!==void 0){if(b==="border"){typeof A=="number"&&y.width==null?y.width=A:typeof A=="string"&&y.stroke==null&&(y.stroke=A);return}y[b]=A}}),y.colorSet&&!Object.keys(y.colorSet).length&&delete y.colorSet,Object.keys(y).length?y:void 0}function Qn(){if(Array.isArray(o.layers)&&o.layers.length)return o.layers.map((y,S)=>{if(!y)return null;const d=xe(y,S),v=y.url||(o.pattern&&d?o.pattern.replace("{{id}}",String(y.id??d)):"");return v?{...y,id:d,url:v,name:y.name||`Шар ${S+1}`,style:Xn(y.style)}:null}).filter(y=>!!y?.url);const h=Array.isArray(o.tms)?o.tms:o.tms?.split(",");return h?h.map((y,S)=>{if(!y)return null;const d=typeof y=="string"?y.trim():`${y}`;if(!d)return null;const v=`legacy-${S}`,g=o.pattern?o.pattern.replace("{{id}}",d):d;return{id:v,name:`Шар ${S+1}`,url:g,visible:!0}}).filter(y=>!!y?.url):[]}function ht(h){const y=(h?.url??"").trim();if(!y)return"";if(/^https?:\/\//i.test(y))return y;const S=window.location?.origin??"",d=y.replace(/^\/+/,"");return`${S}/${d}`}function Zt(h){const y=h.style??{};return S=>{const d=y.colorAttr,v=y.colorSet??{},g=typeof d=="string"?v?.[S?.[d]]??y.color??"#3388ff":y.color??"#3388ff",b=y.stroke??g;return{weight:y.width??1,color:b,opacity:y.opacity??1,fill:y.type?y.type!=="polyline":!0,fillColor:g,fillOpacity:y.opacity??.5}}}function Yt(h,y){if(!m||!y?.latlng||h.popup===!1)return;const S=m.latLngToContainerPoint(y.latlng),d=gt(y),v=Xt(h,d);if(!v.length){tt(h.id);return}E.value={layerId:h.id,title:d?.name??h.name,properties:d,entries:v,point:{x:S.x,y:S.y}}}function tt(h){h&&E.value?.layerId!==h||(E.value=null)}function gt(h){return h?.layer?.properties||h?.layer?.feature?.properties||h?.properties||h?.data||{}}function Xt(h,y={}){const S=d=>d==null||d===""?"—":typeof d=="object"?JSON.stringify(d):String(d);return h.popup&&Array.isArray(h.popup)&&h.popup.length?h.popup.map(d=>({label:d.label||d.field,value:S(y?.[d.field])})):Object.entries(y).map(([d,v])=>({label:d,value:S(v)}))}function Vn(h,y){if(!m||h.popup===!1||!y?.latlng)return;const S=gt(y),d=Xt(h,S);if(!d.length)return;const v=['<div class="map-popup">'];v.push('<div class="map-popup__body">'),d.forEach(g=>{v.push(`<div class="map-popup__row"><span class="map-popup__label">${g.label}: </span><span class="map-popup__value">${g.value}</span></div>`)}),v.push("</div></div>"),k.popup({maxWidth:360}).setLatLng(y.latlng).setContent(v.join("")).openOn(m)}e.onMounted(async()=>{k=await Be(),k.drawLocal={...hl};const h=typeof i?.zoom=="number"&&Number.isFinite(i.zoom)?i.zoom:10;m=k.map(p.value,{zoomControl:!1}).setView(a,h),k.control.zoom({position:"bottomright"}).addTo(m),C=k.tileLayer(_[x.value].url,{maxZoom:19}).addTo(m),f=new k.FeatureGroup().addTo(m),bt(),We(),K=tn();const y=yo(o.geom);if(y){const S=[];k.geoJSON(y).eachLayer(d=>S.push(d)),S.length&&f.addLayer(S[0]),kt()}if(p.value){const S=new ResizeObserver(()=>{m&&m.invalidateSize()});S.observe(p.value),e.onBeforeUnmount(()=>{S.disconnect()})}});function eo(){if(!f)return;f.clearLayers();const h=yo(o.geom);if(!h)return;const y=[];k.geoJSON(h).eachLayer(S=>y.push(S)),y.length&&(y.forEach(S=>f.addLayer(S)),kt())}e.onBeforeUnmount(()=>{K?.(),no(),u&&m?.hasLayer(u)&&m.removeLayer(u)});function Te(h){const y=(h?.service??"").toLowerCase();if(y)return y;const S=(h?.url??"").toLowerCase();return/\.(mvt|pbf|vtile|vmt)(\?|$)/.test(S)?"vtile":/service=wms|request=getmap|\/(wms|ows)(\?|$)/.test(S)?"wms":""}function Qt(h){const y=Te(h),S=ht(h),v={opacity:h?.style?.opacity??1,...h.options??{}},g=!!(h?.style&&Object.keys(h.style).length),b=h.sourceLayer||h.layer||h.service_layer||h.service_key||h.map_key||h.dataset?.layer||h.id;if(y==="vtile"){const O=k?.vectorGrid;if(O?.protobuf&&(g||!k?.maplibreGL)){const A=O.protobuf(S,{interactive:!0,maxNativeZoom:h.maxzoom??19,vectorTileLayerStyles:{[b??"default"]:Zt(h),default:Zt(h)}});return A.on?.("mouseover",P=>Yt(h,P)),A.on?.("mousemove",P=>Yt(h,P)),A.on?.("mouseout",()=>tt(h.id)),A.on?.("click",P=>Vn(h,P)),A}if(!g&&k?.maplibreGL&&window?.maplibregl){const A=S;return k.maplibreGL({style:A,interactive:!1,pane:"overlayPane"})}}if(y==="wms"&&k?.tileLayer?.wms){const O={...h.params??{}};return b&&!O.layers&&(O.layers=b),O.format==null&&(O.format="image/png"),O.transparent==null&&(O.transparent=!0),k.tileLayer.wms(S,{...O,...v})}return k.tileLayer(S,v)}function yt(h){const y=("bounds"in h?h.bounds:void 0)??o.bounds??M.value;if(!Array.isArray(y)||!y.length||!k)return null;const d={color:h.style?.stroke??h.style?.color??"#2563eb",weight:h.style?.width??2,interactive:!1,opacity:h.style?.opacity??.8,dashArray:"4 4"},v=Array.isArray(h.bounds)&&h.bounds.length?h.bounds:y,g=to(v);if(!g.length||!k.polyline)return null;const b=g.map(O=>{if(!O.length)return O;const A=O[0],P=O[O.length-1];return A&&P&&(!P.equals||!P.equals(A))?[...O,A]:O});return k.polyline(b,d)}function to(h){const y=v=>{if(!Array.isArray(v)||v.length<2)return null;const[g,b]=v;return!Number.isFinite(Number(b))||!Number.isFinite(Number(g))?null:k.latLng(Number(b),Number(g))},S=v=>Array.isArray(v)&&v.length>=2&&v.every(g=>Number.isFinite(Number(g))),d=v=>Array.isArray(v)?v.map(y).filter(Boolean):[];if(!Array.isArray(h))return[];if(h.length&&S(h[0])){const v=h.map(y).filter(Boolean);return v.length?[v]:[]}if(h.length&&Array.isArray(h[0])){if(S(h[0][0]))return h.map(g=>d(g)).filter(g=>g.length);if(Array.isArray(h[0][0])&&S(h[0][0][0]))return h.flatMap(g=>Array.isArray(g)?g.map(b=>d(b)).filter(b=>b.length):[]).filter(g=>g.length)}return[]}function no(){Object.values(I).forEach(h=>{h.layer&&m?.hasLayer(h.layer)&&m.removeLayer(h.layer),h.boundsLayer&&m?.hasLayer(h.boundsLayer)&&m.removeLayer(h.boundsLayer),h.layer=null,h.boundsLayer=null}),tt()}function We(){if(!m)return;u&&m.hasLayer(u)&&m.removeLayer(u);const h=yt({id:"global-bounds",bounds:o.bounds,style:{}});h?(u=h,u.addTo(m)):u=null}function vt(){m&&F.value.forEach(h=>{const y=I[h];y&&(y.visible?(y.layer||(y.layer=Qt(y.config)),y.boundsLayer||(y.boundsLayer=yt(y.config)),y.layer&&!m.hasLayer(y.layer)&&y.layer.addTo(m),y.boundsLayer&&!m.hasLayer(y.boundsLayer)&&y.boundsLayer.addTo(m)):(y.layer&&m.hasLayer(y.layer)&&m.removeLayer(y.layer),y.boundsLayer&&m.hasLayer(y.boundsLayer)&&m.removeLayer(y.boundsLayer)))})}function bt(){const h=Qn(),y=[],S=new Set;h.forEach((d,v)=>{const g=xe(d,v);y.push(g),S.add(g);const b=I[g];b&&b.config.url!==d.url&&(b.layer&&m?.hasLayer(b.layer)&&m.removeLayer(b.layer),b.layer=null);const O=b?.visible??d.visible??!1;I[g]={id:g,config:{...d,id:g},visible:O,layer:b?.layer??null,boundsLayer:b?.boundsLayer??null}}),Object.keys(I).forEach(d=>{if(!S.has(d)){const v=I[d];v?.layer&&m?.hasLayer(v.layer)&&m.removeLayer(v.layer),delete I[d]}}),F.value=y,m&&vt()}function oo(h,y){const S=typeof y=="boolean"?y:y.target?.checked;if(S==null)return;const d=I[h];d&&(d.visible=S,d.visible?(d.layer||(d.layer=Qt(d.config)),d.boundsLayer||(d.boundsLayer=yt(d.config)),d.layer&&!m.hasLayer(d.layer)&&d.layer.addTo(m),d.boundsLayer&&!m.hasLayer(d.boundsLayer)&&d.boundsLayer.addTo(m)):(d.layer&&m.hasLayer(d.layer)&&(m.removeLayer(d.layer),tt(h)),d.boundsLayer&&m.hasLayer(d.boundsLayer)&&m.removeLayer(d.boundsLayer)))}function so(h){Vt(h),x.value=h}function Vt(h){if(!m||!_[h])return;C&&C.removeFrom(m);const y=_[h];C=k.tileLayer(y.url,y.options||{}).addTo(m),C.bringToBack()}function en(){!m||!f||R.value&&!m.hasLayer(f)&&f.addTo(m)}function ro(){so(x.value)}function io(){R.value?f.addTo(m):f.removeFrom(m)}function kt(h=30){const y=f.getLayers();if(!y.length)return;const d=k.featureGroup(y).getBounds();d&&d.isValid()&&m.fitBounds(d,{padding:[h,h],maxZoom:16})}function tn(){if(!m||!p.value)return null;m.scrollWheelZoom.disable(),H.value="Використовуйте Ctrl + колесо миші для зміни масштабу";let h;const y=(d=1500)=>{B.value=!0,h&&clearTimeout(h),h=window.setTimeout(()=>B.value=!1,d)},S=d=>{if(!(d.ctrlKey||d.metaKey||d.shiftKey)){y(),m.scrollWheelZoom.disable();return}d.preventDefault(),d.stopPropagation(),m.scrollWheelZoom.enable(),B.value=!1,h&&clearTimeout(h),h=window.setTimeout(()=>m.scrollWheelZoom.disable(),200)};return p.value.addEventListener("wheel",S,{passive:!1}),()=>{m.scrollWheelZoom.enable(),p.value?.removeEventListener("wheel",S),h&&clearTimeout(h),B.value=!1}}return e.watch(T,async()=>{await e.nextTick(),requestAnimationFrame(()=>{m?.invalidateSize(!0),Vt(x.value),en(),vt(),u&&!m?.hasLayer(u)&&u.addTo(m)})}),e.watch(()=>o.layers,()=>bt(),{deep:!0}),e.watch(()=>[o.tms,o.pattern],()=>{o.layers?.length||bt()}),e.watch(()=>o.bounds,()=>We(),{deep:!0}),e.watch(()=>o.geom,()=>eo(),{deep:!0}),e.watch(()=>o.katottg,async h=>{if(M.value=[],!h){We();return}try{const y=await fetch(`https://data.gki.com.ua/api-user/atu/${h}`);if(!y?.ok)return;const d=(await y.json())?.geometry?.coordinates;Array.isArray(d)&&d.length&&(M.value=d)}catch(y){console.error("Failed to fetch KATOTTG bounds",y)}finally{We(),vt()}},{immediate:!0}),(h,y)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(J.value),style:e.normalizeStyle(ae.value)},[e.createElementVNode("div",{ref_key:"mapContainer",ref:p,class:e.normalizeClass(Me.value)},null,2),B.value?(e.openBlock(),e.createElementBlock("div",gl,[e.createElementVNode("div",yl,e.toDisplayString(H.value),1)])):e.createCommentVNode("",!0),$.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"absolute z-[550] pointer-events-none",style:e.normalizeStyle(N.value)},[e.createElementVNode("div",vl,[e.createElementVNode("dl",bl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,S=>(e.openBlock(),e.createElementBlock("div",{key:`${S.label}-${S.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",kl,e.toDisplayString(S.label),1),e.createElementVNode("dd",El,e.toDisplayString(S.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),L.value.length?(e.openBlock(),e.createElementBlock("div",wl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,S=>(e.openBlock(),e.createElementBlock("div",{key:S.key,class:"flex items-center gap-2 text-gray-800"},[e.createElementVNode("span",{class:"w-3.5 h-3.5 rounded-[2px] border border-black/10 shrink-0",style:e.normalizeStyle({backgroundColor:S.color})},null,4),e.createElementVNode("span",Nl,e.toDisplayString(S.label),1)]))),128))])):e.createCommentVNode("",!0),D.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:3,onClick:y[0]||(y[0]=S=>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",xl,[e.createElementVNode("div",_l,[y[5]||(y[5]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:y[1]||(y[1]=S=>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:"w-4 h-4"},y[4]||(y[4]=[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",Cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_),(S,d)=>(e.openBlock(),e.createElementBlock("div",{key:`base-${d}`},[e.createElementVNode("label",Sl,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:w,value:d,"onUpdate:modelValue":y[2]||(y[2]=v=>x.value=v),onChange:ro},null,40,Bl),[[e.vModelRadio,x.value]]),e.createElementVNode("span",Tl,e.toDisplayString(S.name||d),1)])]))),128))]),e.createElementVNode("div",$l,[e.createElementVNode("label",Dl,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":y[3]||(y[3]=S=>R.value=S),onChange:io},null,544),[[e.vModelCheckbox,R.value]]),y[6]||(y[6]=e.createElementVNode("span",{class:"ml-2"},"Геометрія/Межі",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,S=>(e.openBlock(),e.createElementBlock("label",{class:"flex items-center",key:S.id},[e.createElementVNode("input",{type:"checkbox",checked:S.visible,onChange:d=>oo(S.id,d)},null,40,Ll),e.createElementVNode("span",Ol,e.toDisplayString(S.config.name||S.id),1)]))),128))])])):e.createCommentVNode("",!0)],6))}});/**
|
|
131
|
+
*/const rn=Y("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),or={class:"border-t pt-3 mt-4"},sr={class:"flex gap-2"},rr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},ir={class:"flex-1 space-y-2"},lr={class:"flex justify-between items-center"},ar={class:"flex gap-2"},cr=["disabled"],mo=e.defineComponent({__name:"CommentInputZone",props:{isReply:{type:Boolean,required:!1,default:!1},isReplyModifiers:{}},emits:e.mergeModels(["sendComment"],["update:isReply"]),setup(t,{emit:n}){const o=e.useModel(t,"isReply"),s=e.ref(""),r=n,l=()=>{s.value.trim()&&(r("sendComment",s.value),s.value="")},i=a=>{(a.ctrlKey||a.metaKey)&&a.key==="Enter"&&(a.preventDefault(),l())};return(a,c)=>(e.openBlock(),e.createElementBlock("div",or,[e.createElementVNode("div",sr,[e.createElementVNode("span",rr,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",ir,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":c[0]||(c[0]=p=>s.value=p),onKeydown:i,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,s.value]]),e.createElementVNode("div",lr,[c[4]||(c[4]=e.createElementVNode("span",{class:"text-xs text-gray-500 hidden sm:inline"},"Cmd+Enter to send",-1)),e.createElementVNode("div",ar,[o.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:c[1]||(c[1]=p=>o.value=!1)},[e.createVNode(e.unref(rn),{class:"h-3 w-3"}),c[2]||(c[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:!s.value.trim(),onClick:l},[e.createVNode(e.unref(fo),{class:"h-3 w-3 mr-1"}),c[3]||(c[3]=e.createTextVNode(" Send ",-1))],8,cr)])])])])]))}}),dr={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"},pr=e.defineComponent({__name:"CommentDetails",props:{showMoreOptions:{type:Boolean,required:!0,default:!1},showMoreOptionsModifiers:{}},emits:e.mergeModels(["edit","delete"],["update:showMoreOptions"]),setup(t,{emit:n}){const o=n,s=e.useModel(t,"showMoreOptions"),r=e.ref(),l=e.ref(!0),i=async p=>{s.value&&r.value&&!r.value.contains(p.target)&&!l.value&&(s.value=!1),l.value=!1},a=()=>{s.value=!1,o("edit")},c=()=>{s.value=!1,o("delete")};return e.onMounted(()=>{document.addEventListener("click",i)}),e.onUnmounted(()=>{document.removeEventListener("click",i)}),(p,u)=>(e.openBlock(),e.createElementBlock("div",{class:"absolute bg-white left-0 top-full transform min-w-max z-50",ref_key:"moreOptionsRef",ref:r},[e.createElementVNode("div",dr,[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:a},[e.createVNode(e.unref(er),{class:"h-3 w-3 mr-2"}),u[0]||(u[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:c},[e.createVNode(e.unref(on),{class:"h-3 w-3 mr-2"}),u[1]||(u[1]=e.createTextVNode(" Delete ",-1))])])],512))}}),fr={class:"space-y-2"},mr={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},ur={class:"flex-1 min-w-0 space-y-1 relative"},hr={class:"flex items-center gap-2"},gr={class:"font-medium text-xs"},yr={class:"text-xs text-gray-500"},vr={key:0,class:"text-xs text-gray-700 leading-relaxed"},br={class:"flex justify-between text-xs"},kr={class:"flex items-center gap-2"},Er={key:0,class:"flex gap-2"},wr=["disabled"],Nr={key:0,class:"ml-8 space-y-1 border-l-2 border-gray-100 pl-3"},xr=e.defineComponent({__name:"CommentItem",props:{comment:{},isInside:{type:Boolean}},emits:["like","reply","edit","delete"],setup(t,{emit:n}){const o=n,s=t,r=e.ref(s.comment.text),l=e.ref("w-full p-2 rounded text-xs resize-none bg-transparent outline-none"),i=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"),a=e.ref(!1),c=e.ref(!1),p=e.ref(!1),u=e.ref(!1),f=w=>{const C=new Date,M=Math.floor((C.getTime()-w.getTime())/(1e3*60*60));return M<1?`${Math.floor((C.getTime()-w.getTime())/6e4)}m`:M<24?`${M}h`:`${Math.floor(M/24)}d`},h=()=>{u.value=!u.value,u.value?o("like",s.comment.id,"add"):o("like",s.comment.id,"delete")},k=()=>{o("edit",s.comment.id,r.value),p.value=!1},_=(w,C)=>{o("like",w,C)},x=(w,C)=>{o("edit",w,C)};return(w,C)=>{const M=e.resolveComponent("CommentItem",!0);return e.openBlock(),e.createElementBlock("div",fr,[e.createElementVNode("div",{class:e.normalizeClass(["group flex gap-2 p-2 rounded hover:bg-gray-50 transition-colors relative",p.value?"bg-gray-50":""])},[e.createElementVNode("span",mr,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("div",ur,[e.createElementVNode("div",hr,[e.createElementVNode("span",gr,e.toDisplayString(w.comment?.author),1),e.createElementVNode("span",yr,e.toDisplayString(f(w.comment?.createdAt)),1)]),p.value?e.withDirectives((e.openBlock(),e.createElementBlock("textarea",{key:1,"onUpdate:modelValue":C[0]||(C[0]=B=>r.value=B),class:e.normalizeClass(p.value?i.value:l.value)},null,2)),[[e.vModelText,r.value]]):(e.openBlock(),e.createElementBlock("p",vr,e.toDisplayString(w.comment?.text),1)),e.createElementVNode("div",br,[e.createElementVNode("div",kr,[e.createElementVNode("button",{class:e.normalizeClass(["flex items-center gap-1",u.value?"text-blue-600":"text-gray-500 hover:text-blue-600 transition-colors"]),onClick:C[1]||(C[1]=B=>h())},[e.createVNode(e.unref(Zs),{class:e.normalizeClass(["h-3 w-3",u.value?"fill-blue-600":""])},null,8,["class"]),e.createTextVNode(" "+e.toDisplayString(w.comment?.likes),1)],2),w.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]=B=>c.value=!0)},[e.createVNode(e.unref(Qs),{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]=B=>a.value=!0)},[e.createVNode(e.unref(Ks),{class:"h-3 w-3"})])]),p.value?(e.openBlock(),e.createElementBlock("div",Er,[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]=B=>p.value=!1)},[e.createVNode(e.unref(rn),{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:!r.value.trim(),onClick:C[5]||(C[5]=B=>k())},[e.createVNode(e.unref(fo),{class:"h-3 w-3 mr-1"}),C[12]||(C[12]=e.createTextVNode(" Send ",-1))],8,wr)])):e.createCommentVNode("",!0)])]),a.value?(e.openBlock(),e.createBlock(pr,{key:0,showMoreOptions:a.value,"onUpdate:showMoreOptions":C[6]||(C[6]=B=>a.value=B),onEdit:C[7]||(C[7]=B=>p.value=!0),onDelete:C[8]||(C[8]=B=>w.$emit("delete",w.comment?.id)),comment:w.comment},null,8,["showMoreOptions","comment"])):e.createCommentVNode("",!0)],2),w.isInside?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.comment?.replies,B=>(e.openBlock(),e.createBlock(M,{key:B.id,comment:B,isInside:!0,onDelete:$=>w.$emit("delete",B.id),onLike:_,onEdit:x},null,8,["comment","onDelete"]))),128)),c.value&&!w.isInside?(e.openBlock(),e.createBlock(mo,{key:0,onSendComment:C[9]||(C[9]=B=>w.$emit("reply",w.comment?.id,B)),isReply:c.value,"onUpdate:isReply":C[10]||(C[10]=B=>c.value=B)},null,8,["isReply"])):e.createCommentVNode("",!0)]))])}}}),_r=["id"],Cr={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},wt=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(t,{emit:n}){const o=t,s=n,r=e.ref(o.comments??[]);async function l(){if(!o.id)return;const f=await fetch(`/api/widget/comment/${o.id}`).then(h=>h.json());r.value=f.rows.map(h=>({id:h.communication_id,author:h.username,text:h.body,createdAt:new Date(h.cdate)}))}r.value.length===0&&l();const i=async f=>{o.onAddComment?o.onAddComment(f):o.id&&(await fetch(`/api/widget/comment/${o.id}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:f})}),await l()),s("add",f)},a=(f,h)=>{o?.onLike?.(f,h),s("like",f,h)},c=(f,h)=>{o.onReply?.(f,h),s("reply",f,h)},p=async(f,h)=>{o.onEdit?o.onEdit(f,h):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({body:h})}),await l()),s("edit",f,h)},u=async f=>{o.onDelete?o.onDelete(f):o.id&&(await fetch(`/api/widget/comment/${o.id}/${f}`,{method:"DELETE"}),await l()),s("delete",f)};return(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-auto font-sans",f.className]),id:f.id,style:e.normalizeStyle(f.style)},[f.title?(e.openBlock(),e.createElementBlock("h3",Cr,e.toDisplayString(f.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([f.maxHeight?"overflow-y-auto":"","space-y-3"]),style:e.normalizeStyle({maxHeight:f.maxHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,k=>(e.openBlock(),e.createBlock(xr,{key:k.id,comment:k,onReply:c,onLike:a,onDelete:h[0]||(h[0]=_=>u(_)),onEdit:p},null,8,["comment"]))),128))],6),e.createVNode(mo,{onSendComment:h[1]||(h[1]=k=>i(k))})],14,_r))}}),uo=new Map([["file",{name:"File",color:"bg-green-100 text-green-700 border-green-200",icon:Ke}],["post",{name:"Post",color:"bg-blue-100 text-blue-700 border-blue-200",icon:Vs}],["user",{name:"User",color:"bg-purple-100 text-purple-700 border-purple-200",icon:tr}],["custom",{name:"Custom",color:"bg-gray-100 text-gray-700 border-gray-200",icon:Ys}]]),Sr={class:"mx-auto font-sans"},Br={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Tr={class:"relative"},$r={class:"space-y-3"},Dr={class:"flex-1 min-w-0 pb-2"},Lr={class:"flex items-center gap-1.5 mb-1 mt-0.5"},Or={class:"relative flex items-center justify-center shrink-0 overflow-hidden rounded-full h-5 w-5 bg-gray-200"},Ar={class:"font-medium text-xs"},Ir={class:"text-xs text-gray-500"},Mr={class:"space-y-1"},Rr={class:"text-xs text-gray-700"},Pr={class:"capitalize mr-1"},Fr={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"},zr={key:0,class:"flex items-center gap-1 text-xs"},jr={key:0,class:"bg-red-50 text-red-600 px-1.5 py-0.5 rounded text-xs border border-red-200"},Hr={key:2,class:"bg-green-50 text-green-600 px-1.5 py-0.5 rounded text-xs border border-green-200"},Nt=e.defineComponent({__name:"HistoryWidget",props:{data:{},title:{},maxHeight:{},id:{},className:{},style:{}},setup(t){const n=t,o=e.ref(Array.isArray(n.data)?n.data:[]);o.value.length===0&&n.id&&s();async function s(){const r=await fetch(`/api/widget/history/${n.id}`);if(!r.ok)return{data:[]};const l=await r.json();l.rows.forEach(i=>{i.timestamp=new Date(i.cdate),i.id=i.entity_id,i.entityType=i.entity_type,i.entityId=i.entity_id,i.action=i.change_type,i.userId=i.change_user_id,i.userName=i.username,i.timestamp=new Date(i.cdate),i.description=i.username,i.status=i.username}),o.value=l.rows}return(r,l)=>(e.openBlock(),e.createElementBlock("div",Sr,[r.title?(e.openBlock(),e.createElementBlock("h3",Br,e.toDisplayString(r.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:r.maxHeight+"px"})},[e.createElementVNode("div",Tr,[l[0]||(l[0]=e.createElementVNode("div",{class:"absolute left-3 top-0 bottom-0 w-0.5 bg-gray-200"},null,-1)),e.createElementVNode("div",$r,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,i=>(e.openBlock(),e.createElementBlock("div",{class:"relative flex items-start gap-2",key:i?.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(uo).get(i?.entityType)?.color}`)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(uo).get(i?.entityType)?.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",Dr,[e.createElementVNode("div",Lr,[e.createElementVNode("span",Or,[e.createVNode(e.unref(sn),{class:"h-3 w-3 text-gray-500"})]),e.createElementVNode("span",Ar,e.toDisplayString(i?.userName),1),e.createElementVNode("span",Ir,e.toDisplayString(i?.timestamp.toLocaleDateString("ua-UA",{day:"2-digit",month:"2-digit",year:"numeric"}))+" "+e.toDisplayString(i?.timestamp.toLocaleTimeString("ua-UA",{hour:"2-digit",minute:"2-digit"})),1)]),e.createElementVNode("div",Mr,[e.createElementVNode("div",Rr,[e.createElementVNode("span",Pr,e.toDisplayString(i?.action),1),i?.entityId?(e.openBlock(),e.createElementBlock("span",Fr,e.toDisplayString(i?.entityId),1)):e.createCommentVNode("",!0)]),i?.changes?.[i?.entityId]?(e.openBlock(),e.createElementBlock("div",zr,[i?.changes?.[i?.entityId]?.old?(e.openBlock(),e.createElementBlock("span",jr,e.toDisplayString(i?.changes?.[i?.entityId]?.old),1)):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.old&&i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createBlock(e.unref(qs),{key:1,class:"h-2 w-2 text-gray-400"})):e.createCommentVNode("",!0),i?.changes?.[i?.entityId]?.new?(e.openBlock(),e.createElementBlock("span",Hr,e.toDisplayString(i?.changes?.[i?.entityId]?.new),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]))),128))])])],6)]))}}),Ur={key:0,class:"text-xl font-semibold"},qr={class:"flex gap-1"},Wr={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"},Kr=e.defineComponent({__name:"FileHeader",props:e.mergeModels({title:{}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["onAddFile"],["update:modelValue"]),setup(t){const n=e.useModel(t,"modelValue"),o={active:"bg-blue-100 text-black hover:bg-blue-100",inactive:"bg-white text-black hover:bg-blue-100"};return(s,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",s.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[s.title?(e.openBlock(),e.createElementBlock("h3",Ur,e.toDisplayString(s.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",qr,[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",n.value==="list"?o.active:o.inactive]),onClick:r[0]||(r[0]=l=>n.value="list")},[e.createVNode(e.unref(Xs),{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",n.value==="grid"?o.active:o.inactive]),onClick:r[1]||(r[1]=l=>n.value="grid")},[e.createVNode(e.unref(Js),{class:"h-4 w-4"})],2),e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:r[2]||(r[2]=l=>s.$emit("onAddFile",l))},null,32),e.createElementVNode("div",Wr,[e.createVNode(e.unref(po),{class:"h-4 w-4"}),r[3]||(r[3]=e.createTextVNode(" Додати файл ",-1))])])])],2))}}),ln={pdf:{color:"bg-red-100 text-red-700 border-red-200",icon:Ke,label:"PDF"},sketch:{color:"bg-gray-100 text-gray-700 border-gray-200",icon:Gs,label:"SKETCH"},mp4:{color:"bg-purple-100 text-purple-700 border-purple-200",icon:nr,label:"VIDEO"},docx:{color:"bg-blue-100 text-blue-700 border-blue-200",icon:Ke,label:"DOC"},zip:{color:"bg-orange-100 text-orange-700 border-orange-200",icon:Us,label:"ARCHIVE"},png:{color:"bg-green-100 text-green-700 border-green-200",icon:co,label:"IMAGE"},jpg:{color:"bg-green-100 text-green-700 border-green-200",icon:co,label:"IMAGE"},xlsx:{color:"bg-emerald-100 text-emerald-700 border-emerald-200",icon:Ke,label:"EXCEL"},pptx:{color:"bg-amber-100 text-amber-700 border-amber-200",icon:Ke,label:"PPT"}};function ho(t,n="en"){const o={month:"short",day:"numeric"};return new Intl.DateTimeFormat(n,o).format(t)}function go(t){if(t===0)return"0 B";const n=1024,o=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,s)).toFixed(1))} ${o[s]}`}const Gr={class:"space-y-0.5"},Jr=["onClick"],Zr=["onClick"],Yr={class:"flex items-center gap-2"},Xr={class:"font-medium text-xs truncate hover:text-blue-600 cursor-pointer"},Qr={class:"hidden sm:block text-xs text-gray-500 w-16 text-right"},Vr={class:"hidden md:block text-xs text-gray-500 w-12 text-right"},ei={class:"flex items-center gap-1"},ti=["onClick"],ni=["onClick"],oi=e.defineComponent({__name:"FileList",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,s=>(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:s.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",s),["stop"])},[e.createElementVNode("div",{class:e.normalizeClass(["p-1 rounded",e.unref(ln)[s?.ext]?.color||"bg-blue-100 text-blue-700 border-blue-200"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(ln)[s?.ext]?.icon||e.unref(ln).pdf.icon),{class:"h-3 w-3"}))],2),e.createElementVNode("div",{class:"flex-1 min-w-0",onClick:r=>n.$emit("openLightbox",s)},[e.createElementVNode("div",Yr,[e.createElementVNode("span",Xr,e.toDisplayString(s?.uploaded_name||s?.name),1)])],8,Zr),e.createElementVNode("div",Qr,e.toDisplayString(e.unref(go)(s.size)),1),e.createElementVNode("div",Vr,e.toDisplayString(e.unref(ho)(s.createdAt)),1),e.createElementVNode("div",ei,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",s),["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(ao),{class:"h-3 w-3"})],8,ti),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(r=>n.$emit("delete",r,s?.file_id),["stop"])},[e.createVNode(e.unref(on),{class:"h-3 w-3"})],8,ni)])],8,Jr))),128))]))}}),si={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3"},ri=["onClick"],ii={class:"space-y-2"},li={class:"flex justify-center items-center w-full aspect-[4/3] bg-gray-100 rounded overflow-hidden"},ai=["src"],ci={class:"space-y-1"},di=["title"],pi={class:"text-xs text-gray-500 text-left"},fi={class:"absolute top-2 right-1 flex items-center gap-1"},mi=["onClick"],ui=["onClick"],hi=e.defineComponent({__name:"FileGrid",props:{files:{}},emits:["delete","download","openLightbox"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.files,s=>(e.openBlock(),e.createElementBlock("div",{key:s.id,onClick:e.withModifiers(r=>n.$emit("openLightbox",s),["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",ii,[e.createElementVNode("div",li,[s.ext==="png"||s.ext==="jpg"||s.ext==="jpeg"||s.ext==="gif"||s.ext==="svg"||s.ext==="webp"?(e.openBlock(),e.createElementBlock("img",{key:0,src:`/file/resize?filepath=${s?.file_path}&w=500`,alt:"file",class:"w-full h-full object-cover"},null,8,ai)):(e.openBlock(),e.createBlock(e.unref(Ke),{key:1,class:"h-10 w-10 text-gray-500"}))]),e.createElementVNode("div",ci,[e.createElementVNode("h3",{class:"font-medium text-xs leading-tight text-left",title:s.uploaded_name||s.name},e.toDisplayString(s.uploaded_name||s.name),9,di),e.createElementVNode("p",pi,e.toDisplayString(e.unref(ho)(s.createdAt))+", "+e.toDisplayString(e.unref(go)(s.size)),1)])]),e.createElementVNode("div",fi,[e.createElementVNode("button",{onClick:e.withModifiers(r=>n.$emit("download",s),["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(ao),{class:"h-3 w-3"})],8,mi),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(r=>n.$emit("delete",r,s?.file_id),["stop"])},[e.createVNode(e.unref(on),{class:"h-3 w-3"})],8,ui)])],8,ri))),128))]))}}),gi={class:"mx-auto font-sans"},yi={key:1},xt=e.defineComponent({__name:"FilesWidget",props:{title:{},view:{},files:{default:()=>[]},maxHeight:{},onAddFile:{},id:{},className:{},style:{},onDelete:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const o=t,s=e.ref(!1),r=e.ref(null),l=e.ref(!1),i=e.ref(0),a=e.ref(o.files??[]),c=n;a.value.length===0&&C();const p=($,S)=>{r.value=S,s.value=!0},u=()=>{r.value&&(_(r.value),r.value=null,s.value=!1)},f=e.computed(()=>Array.isArray(a.value)?a.value.map($=>$?.file_path):[]),h=$=>{const S=f.value.findIndex(H=>H===$.file_path);S!==-1&&(l.value=!0,i.value=S)},k=$=>{o.onAddFile?o.onAddFile($):M($),c("add",$)},_=$=>{o.onDelete?o.onDelete($):B($),c("delete",$)},x=$=>{const S=document.createElement("a");S.setAttribute("download",$?.uploaded_name||$?.name),S.href=$?.file_path||$?.path,S.click()},w=e.ref("list");async function C(){if(!o.id)return;const $=await fetch(`/api/widget/file/${o.id}`).then(S=>S.json());$.rows.forEach(S=>{S.timestamp=new Date(S.cdate),S.id=S.entity_id,S.entityType=S.entity_type,S.entityId=S.entity_id,S.entityType=S.entity_type,S.action=S.change_type,S.userId=S.change_user_id,S.userName=S.username,S.timestamp=new Date(S.cdate),S.description=S.username,S.status=S.username}),a.value=$.rows}const M=async $=>{if(!(!$.target||!$.target.files||$.target.files.length===0))try{await Promise.all(Array.from($.target.files).map(async S=>{const H=new FormData;H.append("file",S);const K=`/api/widget/file/${o.id}`,I=await fetch(K,{method:"POST",body:H});if(!I.ok)throw new Error(`HTTP error! status: ${I.status}`);return S})),await C()}catch(S){console.error("Помилка при завантаженні файлів:",S)}},B=async $=>{try{await fetch(`/api/widget/file/${o.id}/${$}`,{method:"DELETE"}),await C()}catch(S){console.error(S)}};return($,S)=>{const H=e.resolveComponent("MessageBox"),K=e.resolveComponent("Lightbox");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",gi,[e.createVNode(Kr,{modelValue:w.value,"onUpdate:modelValue":S[0]||(S[0]=I=>w.value=I),title:o.title,onOnAddFile:S[1]||(S[1]=I=>k(I))},null,8,["modelValue","title"]),a.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass($.maxHeight?"overflow-y-auto":""),style:e.normalizeStyle({maxHeight:$.maxHeight+"px"})},[w.value==="list"?(e.openBlock(),e.createBlock(oi,{key:0,onDelete:p,onDownload:x,onOpenLightbox:S[2]||(S[2]=I=>h(I)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0),w.value==="grid"?(e.openBlock(),e.createBlock(hi,{key:1,onDelete:p,onDownload:x,onOpenLightbox:S[3]||(S[3]=I=>h(I)),files:a.value},null,8,["files"])):e.createCommentVNode("",!0)],6)):(e.openBlock(),e.createElementBlock("div",yi,S[6]||(S[6]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Файлів не знайдено")],-1)])))]),e.createVNode(H,{modelValue:s.value,"onUpdate:modelValue":S[4]||(S[4]=I=>s.value=I),onConfirm:u,title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей файл?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати"},null,8,["modelValue"]),e.createVNode(K,{modelValue:l.value,"onUpdate:modelValue":S[5]||(S[5]=I=>l.value=I),images:f.value,"start-index":i.value},null,8,["modelValue","images","start-index"])],64)}}}),vi={key:0,class:"image-wrapper h-full max-h-[400px]",id:"lightbox-gallery"},bi=["onClick"],ki={key:0,rel:"noreferrer",class:"relative block h-full w-full"},Ei=["src"],wi={key:0,class:"thumb-cover"},Ni=e.defineComponent({__name:"GalleryContent",props:{title:{},items:{},columns:{},maxHeight:{},onAddImage:{type:Function},onDelete:{type:Function},id:{},className:{},style:{}},emits:["delete"],setup(t,{emit:n}){const o=n,s=e.ref(!1),r=e.ref(0),l=t,i=e.computed(()=>Array.isArray(l.items)?l.items.map(c=>c?.file_path):[]),a=c=>{const p=i.value.findIndex(u=>u===c.file_path);p!==-1&&(s.value=!0,r.value=p)};return(c,p)=>{const u=e.resolveComponent("Lightbox");return c.items?.length>=1?(e.openBlock(),e.createElementBlock("div",vi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.items,(f,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["h-full w-full image"+h,"cursor-pointer bg-teal-500 rounded-[3px]"]),key:h,onClick:e.withModifiers(k=>a(f),["stop"])},[h<5?(e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("img",{src:`/file/resize?filepath=${f?.file_path}&w=500`,alt:"alt",height:"auto",width:"100%",class:e.normalizeClass(["object-cover h-full w-full bg-gray-200 rounded-[3px]",h===0?"max-h-[411px]":"max-h-[calc((411px-3px)/2)]"])},null,10,Ei),h===4&&c.items?.length>5?(e.openBlock(),e.createElementBlock("div",wi," +"+e.toDisplayString(c.items?.length-5),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,bi))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Math.max(0,5-c.items.length),f=>(e.openBlock(),e.createElementBlock("div",{key:"empty-"+f,class:e.normalizeClass(["h-full w-full image"+(c.items.length+f-1),"bg-gray-300 rounded-[3px]"])},null,2))),128)),e.createVNode(u,{modelValue:s.value,"onUpdate:modelValue":p[0]||(p[0]=f=>s.value=f),images:i.value,"start-index":r.value,delete:"true",download:"true",onDelete:p[1]||(p[1]=f=>o("delete",f))},null,8,["modelValue","images","start-index"])])):e.createCommentVNode("",!0)}}}),xi={key:0,class:"text-xl font-semibold"},_i={class:"flex gap-1"},Ci={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"},Si=e.defineComponent({__name:"widgetHeader",props:{title:{}},emits:["onAddImage"],setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex flex-col sm:flex-row gap-3 mb-4",n.title?"justify-between sm:items-center":"justify-end sm:items-center"])},[n.title?(e.openBlock(),e.createElementBlock("h3",xi,e.toDisplayString(n.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",_i,[e.createElementVNode("label",null,[e.createElementVNode("input",{type:"file",class:"hidden",onChange:o[0]||(o[0]=s=>n.$emit("onAddImage",s))},null,32),e.createElementVNode("div",Ci,[e.createVNode(e.unref(po),{class:"h-4 w-4"}),o[1]||(o[1]=e.createTextVNode(" Додати зображення ",-1))])])])],2))}}),Bi={class:"w-full mx-auto font-sans",ref:"containerRef"},Ti={key:1},_t=e.defineComponent({__name:"GalleryWidget",props:{title:{},items:{default:()=>[]},columns:{},maxHeight:{},onAddImage:{},onDelete:{},id:{},className:{},style:{}},emits:["delete","add","openLightbox"],setup(t,{emit:n}){const o=t,s=e.ref(o.items??[]),r=n;s.value.length===0&&c();const l=u=>{o.onAddImage?o.onAddImage(u):a(u),r("add",u)},i=u=>{const f=s.value.find(h=>h.file_path===u)?.file_id;f&&(o.onDelete?o.onDelete(f):p(f))},a=async u=>{if(!(!u.target||!u.target.files||u.target.files.length===0))try{await Promise.all(Array.from(u.target.files).map(async f=>{const h=new FormData;h.append("file",f);const k=`/api/widget/file/${o.id}`,_=await fetch(k,{method:"POST",body:h});if(!_.ok)throw new Error(`HTTP error! status: ${_.status}`);return f})),await c()}catch(f){console.error("Помилка при завантаженні файлів:",f)}};async function c(){if(!o.id)return;const u=await fetch(`/api/widget/file/${o.id}`).then(f=>f.json());s.value=u.rows}const p=async u=>{try{await fetch(`/api/widget/file/${o.id}/${u}`,{method:"DELETE"}),await c()}catch(f){console.error(f)}};return(u,f)=>(e.openBlock(),e.createElementBlock("div",Bi,[e.createVNode(Si,{title:u.title,onOnAddImage:f[0]||(f[0]=h=>l(h))},null,8,["title"]),s.value.length>0?(e.openBlock(),e.createBlock(Ni,{key:0,items:s.value,onDelete:f[1]||(f[1]=h=>i(h))},null,8,["items"])):(e.openBlock(),e.createElementBlock("div",Ti,f[2]||(f[2]=[e.createElementVNode("div",{class:"flex items-center justify-center h-full"},[e.createElementVNode("p",{class:"text-gray-500 leading-[3]"},"Зображень не знайдено")],-1)])))],512))}}),$i={class:"text-value"},Di={class:"text-sm text-gray-900"},Li=e.defineComponent({__name:"TextValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=n.item.value;return typeof s=="boolean"?s?"Так":"Ні":s==null?"—":String(s)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",$i,[e.createElementVNode("span",Di,e.toDisplayString(o.value),1)]))}}),Me=(t,n)=>{const o=t.__vccOpts||t;for(const[s,r]of n)o[s]=r;return o},Oi=Me(Li,[["__scopeId","data-v-34a76c89"]]),Ai={class:"link-value"},Ii=["href"],Mi=Me(e.defineComponent({__name:"LinkValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=String(n.item.value);try{const r=new URL(s);return r.hostname+r.pathname}catch{return s}});return(s,r)=>(e.openBlock(),e.createElementBlock("div",Ai,[e.createElementVNode("a",{href:String(s.item.value),target:"_blank",rel:"noopener noreferrer",class:"text-blue-600 hover:text-blue-800 underline text-sm"},[e.createTextVNode(e.toDisplayString(o.value)+" ",1),r[0]||(r[0]=e.createElementVNode("i",{class:"fas fa-external-link-alt ml-1 text-xs"},null,-1))],8,Ii)]))}}),[["__scopeId","data-v-932f028c"]]),Ri={class:"date-value"},Pi={class:"text-sm text-gray-900"},Fi=Me(e.defineComponent({__name:"DateValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{const s=n.item.value;if(s instanceof Date)return s.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"});if(typeof s=="string"){const r=new Date(s);if(!isNaN(r.getTime()))return r.toLocaleDateString("uk-UA",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})}return String(s)});return(s,r)=>(e.openBlock(),e.createElementBlock("div",Ri,[e.createElementVNode("span",Pi,e.toDisplayString(o.value),1)]))}}),[["__scopeId","data-v-cd4df08e"]]),zi={class:"status-value"},ji={key:0,class:"mr-1"},Hi=Me(e.defineComponent({__name:"StatusValue",props:{item:{}},setup(t){const n=t,o=e.computed(()=>{switch(String(n.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"}}),s=e.computed(()=>{switch(String(n.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(r,l)=>(e.openBlock(),e.createElementBlock("div",zi,[e.createElementVNode("span",{class:e.normalizeClass(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",o.value])},[s.value?(e.openBlock(),e.createElementBlock("span",ji,[e.createElementVNode("i",{class:e.normalizeClass(s.value)},null,2)])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(String(r.item.value)),1)],2)]))}}),[["__scopeId","data-v-aea1f529"]]),Ui={class:"custom-value"},qi={class:"text-sm text-gray-900"},Wi=Me(e.defineComponent({__name:"CustomValue",props:{item:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",Ui,[e.renderSlot(n.$slots,"default",{item:n.item,value:n.item.value},()=>[e.createElementVNode("span",qi,e.toDisplayString(String(n.item.value)),1)],!0)]))}}),[["__scopeId","data-v-12c8b3f3"]]),Ki=["id"],Gi={key:0,class:"text-xl font-semibold text-gray-900 mb-4"},Ji={key:1,class:"overflow-x-auto"},Zi={class:"min-w-full divide-y divide-gray-200"},Yi={class:"bg-white divide-y divide-gray-200"},Xi={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},Qi={class:"flex items-center gap-2"},Vi=["title"],el={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},tl={key:2,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},nl={class:"flex items-start gap-3"},ol={key:0,class:"flex-shrink-0"},sl={class:"flex-1 min-w-0"},rl={class:"flex items-center gap-2 mb-2"},il={class:"text-sm font-medium text-gray-900"},ll=["title"],al={key:3,class:"overflow-x-auto"},cl={class:"min-w-full divide-y divide-gray-200"},dl={class:"bg-white divide-y divide-gray-200"},pl={class:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900"},fl={class:"flex items-center gap-2"},ml=["title"],ul={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-500"},an=Me(e.defineComponent({__name:"DescriptionListWidget",props:{title:{},items:{},view:{},id:{},className:{},style:{}},setup(t){const n=o=>{switch(o.type){case"link":return Mi;case"date":return Fi;case"status":return Hi;case"custom":return Wi;default:return Oi}};return(o,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["description-list-widget",o.className]),id:o.id,style:e.normalizeStyle(o.style)},[o.title?(e.openBlock(),e.createElementBlock("h3",Gi,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),o.view==="table"?(e.openBlock(),e.createElementBlock("div",Ji,[e.createElementVNode("table",Zi,[e.createElementVNode("tbody",Yi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",Xi,[e.createElementVNode("div",Qi,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},s[0]||(s[0]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,Vi)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",el,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])])):o.view==="grid"?(e.openBlock(),e.createElementBlock("div",tl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("div",{key:r.id||r.label,class:"description-item-card bg-white border border-gray-200 rounded-lg p-4"},[e.createElementVNode("div",nl,[r.icon?(e.openBlock(),e.createElementBlock("div",ol,[e.createElementVNode("i",{class:e.normalizeClass([r.icon,"text-gray-500 text-lg"])},null,2)])):e.createCommentVNode("",!0),e.createElementVNode("div",sl,[e.createElementVNode("div",rl,[e.createElementVNode("h4",il,e.toDisplayString(r.label),1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:0,class:"text-gray-400 cursor-help",title:r.tooltip},s[1]||(s[1]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,ll)):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])])]))),128))])):(e.openBlock(),e.createElementBlock("div",al,[e.createElementVNode("table",cl,[e.createElementVNode("tbody",dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.items,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.id||r.label},[e.createElementVNode("td",pl,[e.createElementVNode("div",fl,[r.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass([r.icon,"text-gray-500"])},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(r.label)+" ",1),r.tooltip?(e.openBlock(),e.createElementBlock("span",{key:1,class:"text-gray-400 cursor-help",title:r.tooltip},s[2]||(s[2]=[e.createElementVNode("i",{class:"fas fa-info-circle text-xs"},null,-1)]),8,ml)):e.createCommentVNode("",!0)])]),e.createElementVNode("td",ul,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n(r)),{item:r},null,8,["item"]))])]))),128))])])]))],14,Ki))}}),[["__scopeId","data-v-106790ef"]]),hl={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 yo(t){return t?t.type==="FeatureCollection"||t.type==="Feature"?t:t.geom?{type:"Feature",geometry:{type:t.geom.type,coordinates:t.geom.coordinates},properties:{}}:t.type&&t.coordinates?{type:"Feature",geometry:t,properties:{}}:null:null}const gl={key:0,class:"absolute inset-0 z-[600] flex items-center justify-center pointer-events-none bg-black/20"},yl={class:"bg-black/70 text-white text-xs sm:text-sm px-4 py-2 rounded-md shadow"},vl={class:"bg-white/95 border border-gray-200 rounded-md shadow-xl px-3 py-2 max-w-[240px] text-[11px] sm:text-xs text-gray-900"},bl={class:"space-y-0.5"},kl={class:"text-gray-500"},El={class:"text-gray-900 text-right break-all"},wl={key:2,class:"absolute bottom-3 left-3 z-[400] bg-white/90 border border-gray-200 rounded-md shadow px-3 py-2 text-[11px] sm:text-xs space-y-1 max-w-[220px]"},Nl={class:"leading-tight"},xl={key:4,class:"bg-white absolute top-[10px] right-[10px] z-[500] border rounded-lg cursor-pointer max-w-[400px]"},_l={class:"flex items-center justify-between p-2 border-b"},Cl={class:"p-2 border-b"},Sl={class:"flex items-center"},Bl=["value"],Tl={class:"ml-2"},$l={class:"p-2"},Dl={class:"flex items-center"},Ll=["checked","onChange"],Ol={class:"ml-2"},Ct=e.defineComponent({__name:"MapWidget",props:{pattern:{},geom:{},id:{},katottg:{},tms:{},layers:{},title:{},height:{},bounds:{},legend:{},ctrlZoom:{type:Boolean}},setup(t){function n(y){let v=y?.parent??null;for(;v;){const d=v.props?.view;if(d==="tabs"||d==="vertical-tabs")return!0;v=v.parent??null}return!1}const o=t,s=e.getCurrentInstance(),r=e.inject("vsCardTabsContext",!1),l=e.computed(()=>(typeof r=="boolean"?r:r.value)?!0:n(s)),i=s?.appContext.config.globalProperties?.$settings??{},a=(()=>{const y=Array.isArray(i.center)?i.center:[],v=Number(y[0]),d=Number(y[1]);return Number.isFinite(v)&&Number.isFinite(d)?[v,d]:[50,30]})(),c=s?.uid??Math.floor(Math.random()*1e4),p=e.ref(null);let u,f,h,k;const _=ke(),x=e.ref(Object.keys(_)[0]),w=`base-layer-${c}`;let C;const M=e.ref(!0),B=e.ref(!1),$=e.ref(!1),S=e.ref(!1),H=e.ref("Використовуйте Ctrl + колесо миші для зміни масштабу");let K=null;const I=e.ref([]),A=e.reactive({}),F=e.ref([]),z=e.computed(()=>F.value.map(y=>A[y]).filter(Boolean)),E=e.ref(null),T=e.computed(()=>E.value?.entries??[]),N=e.computed(()=>{if(!E.value)return;const y=12,v=E.value.point.x+y,d=E.value.point.y+y;return{left:`${v}px`,top:`${d}px`}}),D=e.computed(()=>Array.isArray(o.legend)?o.legend.map((y,v)=>{const d=typeof y?.color=="string"?y.color.trim():"",m=typeof y?.label=="string"?y.label.trim():"";return!d||!m?null:{color:d,label:m,key:`${m}-${v}`}}).filter(y=>!!y):[]),J=e.computed(()=>{if(B.value)return"fixed inset-0 w-screen h-screen z-[9999] bg-white";const y=["relative","h-full"];return o.height||y.push("min-h-[300px]"),o.title&&!l.value&&y.push("pb-[3.25rem]"),y.join(" ")}),le=e.computed(()=>B.value||o.height==null?void 0:{height:typeof o.height=="number"?`${o.height}px`:String(o.height)}),Ie=e.computed(()=>{const y=["w-full","h-full"];return!o.height&&!B.value&&y.push("min-h-[300px]"),y.join(" ")});async function Se(){const y=m=>{if(!Array.from(document.styleSheets??[]).some(b=>b?.href?.includes(m))){const b=document.createElement("link");b.rel="stylesheet",b.href=m,document.head.appendChild(b)}};y("https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"),y("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.css");const v=m=>new Promise((g,b)=>{if(Array.from(document.scripts??[]).some(P=>P.src===m))return g();const R=document.createElement("script");R.src=m,R.async=!0,R.onload=()=>g(),R.onerror=P=>b(P),document.body.appendChild(R)});return await v("https://unpkg.com/leaflet@1.9.4/dist/leaflet.js").catch(()=>{}),await v("https://unpkg.com/leaflet-draw@1.0.4/dist/leaflet.draw.js").catch(()=>{}),await v("https://unpkg.com/leaflet.vectorgrid@1.3.0/dist/Leaflet.VectorGrid.bundled.js").catch(()=>{}),window.L}function ke(){const y=v=>v.map((d,m)=>{const g=typeof d?.key=="string"&&d.key?d.key:`b${m}`,b=Ne(d?.url);return b?{...d,key:g,url:b}:null}).filter(d=>!!d).reduce((d,m)=>({...d,[m.key]:m}),{});return Array.isArray(i?.basemaps)&&i.basemaps.length?y(i.basemaps):y([{key:"topo100",url:"https://data.gki.com.ua/api-user/rtile/voyager/ua/{z}/{x}/{y}.png"},{key:"orto10",url:"https://data.gki.com.ua/api-user/rtile/orto10/ua/{z}/{x}/{y}.png"},{key:"osmb",url:"https://tile.openstreetmap.org.ua/styles/osm-bright/{z}/{x}/{y}.png"}])}function Ne(y){if(typeof y!="string"||!y.trim())return"";const v=y.trim();if(/^https?:\/\//i.test(v))return v;const d=window.location?.origin??"",m=v.replace(/^\/+/,"");return d?`${d}/${m}`:`/${m}`}function xe(y,v){return y?.id!=null?String(y.id):y?.url?`${y.url}-${v}`:`layer-${v}`}function Xn(y){if(!y||typeof y!="object")return;const v={},d=O=>{if(typeof O=="string"){const L=O.trim().replace(/,+$/,"");return L?/^-?\d+(\.\d+)?$/.test(L)?Number(L):L:void 0}return O},m=()=>(v.colorSet||(v.colorSet={}),v.colorSet),g=(O,L)=>{if(O==null||typeof L!="string")return;const R=L.trim().replace(/,+$/,"");R&&(m()[String(O)]=R)},b=O=>{const L=["color","fill","hex","valueColor","value_color"].map(P=>O[P]).find(P=>typeof P=="string"&&P.trim());if(!L)return!1;const R=["value","key","id","code","status"].map(P=>O[P]).find(P=>P!=null&&P!=="");return R==null?!1:(g(R,L),!0)};return Object.entries(y).forEach(([O,L])=>{if(O==="colorSet"&&L!=null){Array.isArray(L)?L.forEach(P=>{P&&(typeof P=="object"&&b(P)||typeof P=="object"&&Object.entries(P).forEach(([he,ge])=>g(he,typeof ge=="string"?ge:void 0)))}):typeof L=="object"&&(b(L)||Object.entries(L).forEach(([P,he])=>g(P,typeof he=="string"?he:void 0)));return}const R=d(L);if(R!==void 0){if(O==="border"){typeof R=="number"&&v.width==null?v.width=R:typeof R=="string"&&v.stroke==null&&(v.stroke=R);return}v[O]=R}}),v.colorSet&&!Object.keys(v.colorSet).length&&delete v.colorSet,Object.keys(v).length?v:void 0}function Qn(){if(Array.isArray(o.layers)&&o.layers.length)return o.layers.map((v,d)=>{if(!v)return null;const m=xe(v,d),g=v.url||(o.pattern&&m?o.pattern.replace("{{id}}",String(v.id??m)):"");return g?{...v,id:m,url:g,name:v.name||`Шар ${d+1}`,style:Xn(v.style)}:null}).filter(v=>!!v?.url);const y=Array.isArray(o.tms)?o.tms:o.tms?.split(",");return y?y.map((v,d)=>{if(!v)return null;const m=typeof v=="string"?v.trim():`${v}`;if(!m)return null;const g=`legacy-${d}`,b=o.pattern?o.pattern.replace("{{id}}",m):m;return{id:g,name:`Шар ${d+1}`,url:b,visible:!0}}).filter(v=>!!v?.url):[]}function ut(y){const v=(y?.url??"").trim();if(!v)return"";if(/^https?:\/\//i.test(v))return v;const d=window.location?.origin??"",m=v.replace(/^\/+/,"");return`${d}/${m}`}function Zt(y){const v=y.style??{};return d=>{const m=v.colorAttr,g=v.colorSet??{},b=typeof m=="string"?g?.[d?.[m]]??v.color??"#3388ff":v.color??"#3388ff",O=v.stroke??b;return{weight:v.width??1,color:O,opacity:v.opacity??1,fill:v.type?v.type!=="polyline":!0,fillColor:b,fillOpacity:v.opacity??.5}}}function Yt(y,v){if(!u||!v?.latlng||y.popup===!1)return;const d=u.latLngToContainerPoint(v.latlng),m=ht(v),g=Xt(y,m);if(!g.length){et(y.id);return}E.value={layerId:y.id,title:m?.name??y.name,properties:m,entries:g,point:{x:d.x,y:d.y}}}function et(y){y&&E.value?.layerId!==y||(E.value=null)}function ht(y){return y?.layer?.properties||y?.layer?.feature?.properties||y?.properties||y?.data||{}}function Xt(y,v={}){const d=m=>m==null||m===""?"—":typeof m=="object"?JSON.stringify(m):String(m);return y.popup&&Array.isArray(y.popup)&&y.popup.length?y.popup.map(m=>({label:m.label||m.field,value:d(v?.[m.field])})):Object.entries(v).map(([m,g])=>({label:m,value:d(g)}))}function Vn(y,v){if(!u||y.popup===!1||!v?.latlng)return;const d=ht(v),m=Xt(y,d);if(!m.length)return;const g=['<div class="map-popup">'];g.push('<div class="map-popup__body">'),m.forEach(b=>{g.push(`<div class="map-popup__row"><span class="map-popup__label">${b.label}: </span><span class="map-popup__value">${b.value}</span></div>`)}),g.push("</div></div>"),k.popup({maxWidth:360}).setLatLng(v.latlng).setContent(g.join("")).openOn(u)}e.onMounted(async()=>{k=await Se(),k.drawLocal={...hl};const y=typeof i?.zoom=="number"&&Number.isFinite(i.zoom)?i.zoom:10;u=k.map(p.value,{zoomControl:!1}).setView(a,y),k.control.zoom({position:"bottomright"}).addTo(u),C=k.tileLayer(_[x.value].url,{maxZoom:19}).addTo(u),f=new k.FeatureGroup().addTo(u),vt(),qe(),o.ctrlZoom&&(K=kt());const v=yo(o.geom);if(v){const d=[];k.geoJSON(v).eachLayer(m=>d.push(m)),d.length&&f.addLayer(d[0]),bt()}if(p.value){const d=new ResizeObserver(()=>{u&&u.invalidateSize()});d.observe(p.value),e.onBeforeUnmount(()=>{d.disconnect()})}});function eo(){if(!f)return;f.clearLayers();const y=yo(o.geom);if(!y)return;const v=[];k.geoJSON(y).eachLayer(d=>v.push(d)),v.length&&(v.forEach(d=>f.addLayer(d)),bt())}e.onBeforeUnmount(()=>{K?.(),no(),h&&u?.hasLayer(h)&&u.removeLayer(h)});function Be(y){const v=(y?.service??"").toLowerCase();if(v)return v;const d=(y?.url??"").toLowerCase();return/\.(mvt|pbf|vtile|vmt)(\?|$)/.test(d)?"vtile":/service=wms|request=getmap|\/(wms|ows)(\?|$)/.test(d)?"wms":""}function Qt(y){const v=Be(y),d=ut(y),g={opacity:y?.style?.opacity??1,...y.options??{}},b=!!(y?.style&&Object.keys(y.style).length),O=y.sourceLayer||y.layer||y.service_layer||y.service_key||y.map_key||y.dataset?.layer||y.id;if(v==="vtile"){const L=k?.vectorGrid;if(L?.protobuf&&(b||!k?.maplibreGL)){const R=L.protobuf(d,{interactive:!0,maxNativeZoom:y.maxzoom??19,vectorTileLayerStyles:{[O??"default"]:Zt(y),default:Zt(y)}});return R.on?.("mouseover",P=>Yt(y,P)),R.on?.("mousemove",P=>Yt(y,P)),R.on?.("mouseout",()=>et(y.id)),R.on?.("click",P=>Vn(y,P)),R}if(!b&&k?.maplibreGL&&window?.maplibregl){const R=d;return k.maplibreGL({style:R,interactive:!1,pane:"overlayPane"})}}if(v==="wms"&&k?.tileLayer?.wms){const L={...y.params??{}};return O&&!L.layers&&(L.layers=O),L.format==null&&(L.format="image/png"),L.transparent==null&&(L.transparent=!0),k.tileLayer.wms(d,{...L,...g})}return k.tileLayer(d,g)}function gt(y){const v=("bounds"in y?y.bounds:void 0)??o.bounds??I.value;if(!Array.isArray(v)||!v.length||!k)return null;const m={color:y.style?.stroke??y.style?.color??"#2563eb",weight:y.style?.width??2,interactive:!1,opacity:y.style?.opacity??.8,dashArray:"4 4"},g=Array.isArray(y.bounds)&&y.bounds.length?y.bounds:v,b=to(g);if(!b.length||!k.polyline)return null;const O=b.map(L=>{if(!L.length)return L;const R=L[0],P=L[L.length-1];return R&&P&&(!P.equals||!P.equals(R))?[...L,R]:L});return k.polyline(O,m)}function to(y){const v=g=>{if(!Array.isArray(g)||g.length<2)return null;const[b,O]=g;return!Number.isFinite(Number(O))||!Number.isFinite(Number(b))?null:k.latLng(Number(O),Number(b))},d=g=>Array.isArray(g)&&g.length>=2&&g.every(b=>Number.isFinite(Number(b))),m=g=>Array.isArray(g)?g.map(v).filter(Boolean):[];if(!Array.isArray(y))return[];if(y.length&&d(y[0])){const g=y.map(v).filter(Boolean);return g.length?[g]:[]}if(y.length&&Array.isArray(y[0])){if(d(y[0][0]))return y.map(b=>m(b)).filter(b=>b.length);if(Array.isArray(y[0][0])&&d(y[0][0][0]))return y.flatMap(b=>Array.isArray(b)?b.map(O=>m(O)).filter(O=>O.length):[]).filter(b=>b.length)}return[]}function no(){Object.values(A).forEach(y=>{y.layer&&u?.hasLayer(y.layer)&&u.removeLayer(y.layer),y.boundsLayer&&u?.hasLayer(y.boundsLayer)&&u.removeLayer(y.boundsLayer),y.layer=null,y.boundsLayer=null}),et()}function qe(){if(!u)return;h&&u.hasLayer(h)&&u.removeLayer(h);const y=gt({id:"global-bounds",bounds:o.bounds,style:{}});y?(h=y,h.addTo(u)):h=null}function yt(){u&&F.value.forEach(y=>{const v=A[y];v&&(v.visible?(v.layer||(v.layer=Qt(v.config)),v.boundsLayer||(v.boundsLayer=gt(v.config)),v.layer&&!u.hasLayer(v.layer)&&v.layer.addTo(u),v.boundsLayer&&!u.hasLayer(v.boundsLayer)&&v.boundsLayer.addTo(u)):(v.layer&&u.hasLayer(v.layer)&&u.removeLayer(v.layer),v.boundsLayer&&u.hasLayer(v.boundsLayer)&&u.removeLayer(v.boundsLayer)))})}function vt(){const y=Qn(),v=[],d=new Set;y.forEach((m,g)=>{const b=xe(m,g);v.push(b),d.add(b);const O=A[b];O&&O.config.url!==m.url&&(O.layer&&u?.hasLayer(O.layer)&&u.removeLayer(O.layer),O.layer=null);const L=O?.visible??m.visible??!1;A[b]={id:b,config:{...m,id:b},visible:L,layer:O?.layer??null,boundsLayer:O?.boundsLayer??null}}),Object.keys(A).forEach(m=>{if(!d.has(m)){const g=A[m];g?.layer&&u?.hasLayer(g.layer)&&u.removeLayer(g.layer),delete A[m]}}),F.value=v,u&&yt()}function oo(y,v){const d=typeof v=="boolean"?v:v.target?.checked;if(d==null)return;const m=A[y];m&&(m.visible=d,m.visible?(m.layer||(m.layer=Qt(m.config)),m.boundsLayer||(m.boundsLayer=gt(m.config)),m.layer&&!u.hasLayer(m.layer)&&m.layer.addTo(u),m.boundsLayer&&!u.hasLayer(m.boundsLayer)&&m.boundsLayer.addTo(u)):(m.layer&&u.hasLayer(m.layer)&&(u.removeLayer(m.layer),et(y)),m.boundsLayer&&u.hasLayer(m.boundsLayer)&&u.removeLayer(m.boundsLayer)))}function so(y){Vt(y),x.value=y}function Vt(y){if(!u||!_[y])return;C&&C.removeFrom(u);const v=_[y];C=k.tileLayer(v.url,v.options||{}).addTo(u),C.bringToBack()}function en(){!u||!f||M.value&&!u.hasLayer(f)&&f.addTo(u)}function ro(){so(x.value)}function io(){M.value?f.addTo(u):f.removeFrom(u)}function tn(){B.value=!B.value}function bt(y=30){const v=f.getLayers();if(!v.length)return;const m=k.featureGroup(v).getBounds();m&&m.isValid()&&u.fitBounds(m,{padding:[y,y],maxZoom:16})}function kt(){if(!u||!p.value)return null;u.scrollWheelZoom.disable(),H.value="Використовуйте Ctrl + колесо миші для зміни масштабу";let y;const v=(m=1500)=>{S.value=!0,y&&clearTimeout(y),y=window.setTimeout(()=>S.value=!1,m)},d=m=>{if(!(m.ctrlKey||m.metaKey||m.shiftKey)){v(),u.scrollWheelZoom.disable();return}m.preventDefault(),m.stopPropagation(),u.scrollWheelZoom.enable(),S.value=!1,y&&clearTimeout(y),y=window.setTimeout(()=>u.scrollWheelZoom.disable(),200)};return p.value.addEventListener("wheel",d,{passive:!1}),()=>{u.scrollWheelZoom.enable(),p.value?.removeEventListener("wheel",d),y&&clearTimeout(y),S.value=!1}}return e.watch(B,async()=>{await e.nextTick(),requestAnimationFrame(()=>{u?.invalidateSize(!0),Vt(x.value),en(),yt(),h&&!u?.hasLayer(h)&&h.addTo(u)})}),e.watch(()=>o.layers,()=>vt(),{deep:!0}),e.watch(()=>[o.tms,o.pattern],()=>{o.layers?.length||vt()}),e.watch(()=>o.bounds,()=>qe(),{deep:!0}),e.watch(()=>o.geom,()=>eo(),{deep:!0}),e.watch(()=>o.katottg,async y=>{if(I.value=[],!y){qe();return}try{const v=await fetch(`https://data.gki.com.ua/api-user/atu/${y}`);if(!v?.ok)return;const m=(await v.json())?.geometry?.coordinates;Array.isArray(m)&&m.length&&(I.value=m)}catch(v){console.error("Failed to fetch KATOTTG bounds",v)}finally{qe(),yt()}},{immediate:!0}),(y,v)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(J.value),style:e.normalizeStyle(le.value)},[e.createElementVNode("div",{ref_key:"mapContainer",ref:p,class:e.normalizeClass(Ie.value)},null,2),S.value?(e.openBlock(),e.createElementBlock("div",gl,[e.createElementVNode("div",yl,e.toDisplayString(H.value),1)])):e.createCommentVNode("",!0),T.value.length?(e.openBlock(),e.createElementBlock("div",{key:1,class:"absolute z-[550] pointer-events-none",style:e.normalizeStyle(N.value)},[e.createElementVNode("div",vl,[e.createElementVNode("dl",bl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,d=>(e.openBlock(),e.createElementBlock("div",{key:`${d.label}-${d.value}`,class:"flex justify-between gap-2"},[e.createElementVNode("dt",kl,e.toDisplayString(d.label),1),e.createElementVNode("dd",El,e.toDisplayString(d.value),1)]))),128))])])],4)):e.createCommentVNode("",!0),D.value.length?(e.openBlock(),e.createElementBlock("div",wl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,d=>(e.openBlock(),e.createElementBlock("div",{key:d.key,class:"flex items-center gap-2 text-gray-800"},[e.createElementVNode("span",{class:"w-3.5 h-3.5 rounded-[2px] border border-black/10 shrink-0",style:e.normalizeStyle({backgroundColor:d.color})},null,4),e.createElementVNode("span",Nl,e.toDisplayString(d.label),1)]))),128))])):e.createCommentVNode("",!0),$.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:3,onClick:v[0]||(v[0]=d=>$.value=!0),class:"z-[500] bg-white absolute top-[10px] right-[10px] p-2 border rounded-lg cursor-pointer layers-button"}," Шари ")),$.value?(e.openBlock(),e.createElementBlock("div",xl,[e.createElementVNode("div",_l,[v[5]||(v[5]=e.createElementVNode("div",null,"Шари",-1)),(e.openBlock(),e.createElementBlock("svg",{onClick:v[1]||(v[1]=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:"w-4 h-4"},v[4]||(v[4]=[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",Cl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_),(d,m)=>(e.openBlock(),e.createElementBlock("div",{key:`base-${m}`},[e.createElementVNode("label",Sl,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:w,value:m,"onUpdate:modelValue":v[2]||(v[2]=g=>x.value=g),onChange:ro},null,40,Bl),[[e.vModelRadio,x.value]]),e.createElementVNode("span",Tl,e.toDisplayString(d.name||m),1)])]))),128))]),e.createElementVNode("div",$l,[e.createElementVNode("label",Dl,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":v[3]||(v[3]=d=>M.value=d),onChange:io},null,544),[[e.vModelCheckbox,M.value]]),v[6]||(v[6]=e.createElementVNode("span",{class:"ml-2"},"Геометрія/Межі",-1))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,d=>(e.openBlock(),e.createElementBlock("label",{class:"flex items-center",key:d.id},[e.createElementVNode("input",{type:"checkbox",checked:d.visible,onChange:m=>oo(d.id,m)},null,40,Ll),e.createElementVNode("span",Ol,e.toDisplayString(d.config.name||d.id),1)]))),128))])])):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"absolute z-[500] bg-white p-2 border rounded-lg cursor-pointer fullscreen-button bottom-[100px] right-[7px]",onClick:tn,"aria-label":"Toggle fullscreen"},v[7]||(v[7]=[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)]))],6))}});/**
|
|
132
132
|
* @vue/shared v3.5.18
|
|
133
133
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
134
134
|
* @license MIT
|
|
135
|
-
**//*! #__NO_SIDE_EFFECTS__ */function Ee(t){const n=Object.create(null);for(const o of t.split(","))n[o]=1;return o=>o in n}const Al=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const cn=()=>{},St=()=>!1,dn=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97)
|
|
135
|
+
**//*! #__NO_SIDE_EFFECTS__ */function Ee(t){const n=Object.create(null);for(const o of t.split(","))n[o]=1;return o=>o in n}const Al=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const cn=()=>{},St=()=>!1,dn=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Te=Object.assign,we=Array.isArray,te=t=>typeof t=="string",pn=t=>typeof t=="symbol",Il=t=>t!==null&&typeof t=="object",vo=Ee(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ml=Ee("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),fn=t=>{const n=Object.create(null);return o=>n[o]||(n[o]=t(o))},Rl=/-(\w)/g,$e=fn(t=>t.replace(Rl,(n,o)=>o?o.toUpperCase():"")),mn=fn(t=>t.charAt(0).toUpperCase()+t.slice(1)),Pl=fn(t=>t?`on${mn(t)}`:""),tt={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"},Fl={1:"STABLE",2:"DYNAMIC",3:"FORWARDED"},zl=/;(?![^(]*\))/g,jl=/:([^]+)/,Hl=/\/\*[^]*?\*\//g;function Ul(t){const n={};return t.replace(Hl,"").split(zl).forEach(o=>{if(o){const s=o.split(jl);s.length>1&&(n[s[0].trim()]=s[1].trim())}}),n}const ql="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",Wl="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",Kl="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",Gl="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Jl=Ee(ql),Zl=Ee(Wl),Yl=Ee(Kl),Xl=Ee(Gl);/**
|
|
136
136
|
* @vue/compiler-core v3.5.18
|
|
137
137
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
138
138
|
* @license MIT
|
|
139
|
-
**/const ot=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),st=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),un=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),Bt=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),bo=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),Pe=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),ko=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),Eo=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),hn=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),gn=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),rt=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),yn=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),wo=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),vn=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),bn=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),kn=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),En=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),wn=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),No=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),xo=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),Tt=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),$t=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),xn=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),_n=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),it=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),lt=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),Sn=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),Ql=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),Bn=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),Dt=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),Vl=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),ea=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),Tn=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),ta=Symbol(process.env.NODE_ENV!=="production"?"unref":""),na=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),$n=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),_o=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),Je={[ot]:"Fragment",[st]:"Teleport",[un]:"Suspense",[Bt]:"KeepAlive",[bo]:"BaseTransition",[Pe]:"openBlock",[ko]:"createBlock",[Eo]:"createElementBlock",[hn]:"createVNode",[gn]:"createElementVNode",[rt]:"createCommentVNode",[yn]:"createTextVNode",[wo]:"createStaticVNode",[vn]:"resolveComponent",[bn]:"resolveDynamicComponent",[kn]:"resolveDirective",[En]:"resolveFilter",[wn]:"withDirectives",[Nn]:"renderList",[No]:"renderSlot",[xo]:"createSlots",[Tt]:"toDisplayString",[$t]:"mergeProps",[xn]:"normalizeClass",[_n]:"normalizeStyle",[it]:"normalizeProps",[lt]:"guardReactiveProps",[Cn]:"toHandlers",[Sn]:"camelize",[Ql]:"capitalize",[Bn]:"toHandlerKey",[Dt]:"setBlockTracking",[Vl]:"pushScopeId",[ea]:"popScopeId",[Tn]:"withCtx",[ta]:"unref",[na]:"isRef",[$n]:"withMemo",[_o]:"isMemoSame"};function oa(t){Object.getOwnPropertySymbols(t).forEach(n=>{Je[n]=t[n]})}const me={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function sa(t,n=""){return{type:0,source:n,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:me}}function at(t,n,o,s,r,l,i,a=!1,c=!1,p=!1,m=me){return t&&(a?(t.helper(Pe),t.helper(Xe(t.inSSR,p))):t.helper(Ye(t.inSSR,p)),i&&t.helper(wn)),{type:13,tag:n,props:o,children:s,patchFlag:r,dynamicProps:l,directives:i,isBlock:a,disableTracking:c,isComponent:p,loc:m}}function Fe(t,n=me){return{type:17,loc:n,elements:t}}function ge(t,n=me){return{type:15,loc:n,properties:t}}function X(t,n){return{type:16,loc:me,key:ne(t)?j(t,!0):t,value:n}}function j(t,n=!1,o=me,s=0){return{type:4,loc:o,content:t,isStatic:n,constType:n?3:s}}function ye(t,n=me){return{type:8,loc:n,children:t}}function te(t,n=[],o=me){return{type:14,loc:o,callee:t,arguments:n}}function Ze(t,n=void 0,o=!1,s=!1,r=me){return{type:18,params:t,returns:n,newline:o,isSlot:s,loc:r}}function Dn(t,n,o,s=!0){return{type:19,test:t,consequent:n,alternate:o,newline:s,loc:me}}function ra(t,n,o=!1,s=!1){return{type:20,index:t,value:n,needPauseTracking:o,inVOnce:s,needArraySpread:!1,loc:me}}function ia(t){return{type:21,body:t,loc:me}}function Ye(t,n){return t||n?hn:gn}function Xe(t,n){return t||n?ko:Eo}function Ln(t,{helper:n,removeHelper:o,inSSR:s}){t.isBlock||(t.isBlock=!0,o(Ye(s,t.isComponent)),n(Pe),n(Xe(s,t.isComponent)))}const Co=new Uint8Array([123,123]),So=new Uint8Array([125,125]);function Bo(t){return t>=97&&t<=122||t>=65&&t<=90}function ue(t){return t===32||t===10||t===9||t===12||t===13}function Le(t){return t===47||t===62||ue(t)}function Lt(t){const n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}const oe={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 la{constructor(n,o){this.stack=n,this.cbs=o,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=Co,this.delimiterClose=So,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=Co,this.delimiterClose=So}getPos(n){let o=1,s=n+1;for(let r=this.newlines.length-1;r>=0;r--){const l=this.newlines[r];if(n>l){o=r+2,s=n-l;break}}return{column:s,line:o,offset:n}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(n){n===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n))}stateInterpolationOpen(n){if(n===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const o=this.index+1-this.delimiterOpen.length;o>this.sectionStart&&this.cbs.ontext(this.sectionStart,o),this.state=3,this.sectionStart=o}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(n)):(this.state=1,this.stateText(n))}stateInterpolation(n){n===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(n))}stateInterpolationClose(n){n===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(n))}stateSpecialStartSequence(n){const o=this.sequenceIndex===this.currentSequence.length;if(!(o?Le(n):(n|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!o){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(n)}stateInRCDATA(n){if(this.sequenceIndex===this.currentSequence.length){if(n===62||ue(n)){const o=this.index-this.currentSequence.length;if(this.sectionStart<o){const s=this.index;this.index=o,this.cbs.ontext(this.sectionStart,o),this.index=s}this.sectionStart=o+2,this.stateInClosingTagName(n),this.inRCDATA=!1;return}this.sequenceIndex=0}(n|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===oe.TitleEnd||this.currentSequence===oe.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(n===60)}stateCDATASequence(n){n===oe.Cdata[this.sequenceIndex]?++this.sequenceIndex===oe.Cdata.length&&(this.state=28,this.currentSequence=oe.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(n))}fastForwardTo(n){for(;++this.index<this.buffer.length;){const o=this.buffer.charCodeAt(this.index);if(o===10&&this.newlines.push(this.index),o===n)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(n){n===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===oe.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):n!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(n,o){this.enterRCDATA(n,o),this.state=31}enterRCDATA(n,o){this.inRCDATA=!0,this.currentSequence=n,this.sequenceIndex=o}stateBeforeTagName(n){n===33?(this.state=22,this.sectionStart=this.index+1):n===63?(this.state=24,this.sectionStart=this.index+1):Bo(n)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:n===116?this.state=30:this.state=n===115?29:6):n===47?this.state=8:(this.state=1,this.stateText(n))}stateInTagName(n){Le(n)&&this.handleTagName(n)}stateInSFCRootTagName(n){if(Le(n)){const o=this.buffer.slice(this.sectionStart,this.index);o!=="template"&&this.enterRCDATA(Lt("</"+o),0),this.handleTagName(n)}}handleTagName(n){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)}stateBeforeClosingTagName(n){ue(n)||(n===62?(process.env.NODE_ENV!=="production"&&this.cbs.onerr(14,this.index),this.state=1,this.sectionStart=this.index+1):(this.state=Bo(n)?9:27,this.sectionStart=this.index))}stateInClosingTagName(n){(n===62||ue(n))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(n))}stateAfterClosingTagName(n){n===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(n){n===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):n===47?(this.state=7,process.env.NODE_ENV!=="production"&&this.peek()!==62&&this.cbs.onerr(22,this.index)):n===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):ue(n)||(process.env.NODE_ENV!=="production"&&n===61&&this.cbs.onerr(19,this.index),this.handleAttrStart(n))}handleAttrStart(n){n===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):n===46||n===58||n===64||n===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(n){n===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):ue(n)||(this.state=11,this.stateBeforeAttrName(n))}stateInAttrName(n){n===61||Le(n)?(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):process.env.NODE_ENV!=="production"&&(n===34||n===39||n===60)&&this.cbs.onerr(17,this.index)}stateInDirName(n){n===61||Le(n)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):n===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(n){n===61||Le(n)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===91?this.state=15:n===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(n){n===93?this.state=14:(n===61||Le(n))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(n),process.env.NODE_ENV!=="production"&&this.cbs.onerr(27,this.index))}stateInDirModifier(n){n===61||Le(n)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(n){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(n)}stateAfterAttrName(n){n===61?this.state=18:n===47||n===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)):ue(n)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(n))}stateBeforeAttrValue(n){n===34?(this.state=19,this.sectionStart=this.index+1):n===39?(this.state=20,this.sectionStart=this.index+1):ue(n)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(n))}handleInAttrValue(n,o){(n===o||this.fastForwardTo(o))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(n){this.handleInAttrValue(n,34)}stateInAttrValueSingleQuotes(n){this.handleInAttrValue(n,39)}stateInAttrValueNoQuotes(n){ue(n)||n===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(n)):(process.env.NODE_ENV!=="production"&&n===34||n===39||n===60||n===61||n===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(n){n===91?(this.state=26,this.sequenceIndex=0):this.state=n===45?25:23}stateInDeclaration(n){(n===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(n){(n===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(n){n===45?(this.state=28,this.currentSequence=oe.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(n){(n===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(n){n===oe.ScriptEnd[3]?this.startSpecial(oe.ScriptEnd,4):n===oe.StyleEnd[3]?this.startSpecial(oe.StyleEnd,4):(this.state=6,this.stateInTagName(n))}stateBeforeSpecialT(n){n===oe.TitleEnd[3]?this.startSpecial(oe.TitleEnd,4):n===oe.TextareaEnd[3]?this.startSpecial(oe.TextareaEnd,4):(this.state=6,this.stateInTagName(n))}startEntity(){}stateInEntity(){}parse(n){for(this.buffer=n;this.index<this.buffer.length;){const o=this.buffer.charCodeAt(this.index);switch(o===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(o);break}case 2:{this.stateInterpolationOpen(o);break}case 3:{this.stateInterpolation(o);break}case 4:{this.stateInterpolationClose(o);break}case 31:{this.stateSpecialStartSequence(o);break}case 32:{this.stateInRCDATA(o);break}case 26:{this.stateCDATASequence(o);break}case 19:{this.stateInAttrValueDoubleQuotes(o);break}case 12:{this.stateInAttrName(o);break}case 13:{this.stateInDirName(o);break}case 14:{this.stateInDirArg(o);break}case 15:{this.stateInDynamicDirArg(o);break}case 16:{this.stateInDirModifier(o);break}case 28:{this.stateInCommentLike(o);break}case 27:{this.stateInSpecialComment(o);break}case 11:{this.stateBeforeAttrName(o);break}case 6:{this.stateInTagName(o);break}case 34:{this.stateInSFCRootTagName(o);break}case 9:{this.stateInClosingTagName(o);break}case 5:{this.stateBeforeTagName(o);break}case 17:{this.stateAfterAttrName(o);break}case 20:{this.stateInAttrValueSingleQuotes(o);break}case 18:{this.stateBeforeAttrValue(o);break}case 8:{this.stateBeforeClosingTagName(o);break}case 10:{this.stateAfterClosingTagName(o);break}case 29:{this.stateBeforeSpecialS(o);break}case 30:{this.stateBeforeSpecialT(o);break}case 21:{this.stateInAttrValueNoQuotes(o);break}case 7:{this.stateInSelfClosingTag(o);break}case 23:{this.stateInDeclaration(o);break}case 22:{this.stateBeforeDeclaration(o);break}case 25:{this.stateBeforeComment(o);break}case 24:{this.stateInProcessingInstruction(o);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 n=this.buffer.length;this.sectionStart>=n||(this.state===28?this.currentSequence===oe.CdataEnd?this.cbs.oncdata(this.sectionStart,n):this.cbs.oncomment(this.sectionStart,n):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,n))}emitCodePoint(n,o){}}const aa={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:t=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t}\`.`,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 On(t,{compatConfig:n}){const o=n&&n[t];return t==="MODE"?o||3:o}function Oe(t,n){const o=On("MODE",n),s=On(t,n);return o===3?s===!0:s!==!1}function Qe(t,n,o,...s){const r=Oe(t,n);return process.env.NODE_ENV!=="production"&&r&&Ot(t,n,o,...s),r}function Ot(t,n,o,...s){if(On(t,n)==="suppress-warning")return;const{message:l,link:i}=aa[t],a=`(deprecation ${t}) ${typeof l=="function"?l(...s):l}${i?`
|
|
139
|
+
**/const nt=Symbol(process.env.NODE_ENV!=="production"?"Fragment":""),ot=Symbol(process.env.NODE_ENV!=="production"?"Teleport":""),un=Symbol(process.env.NODE_ENV!=="production"?"Suspense":""),Bt=Symbol(process.env.NODE_ENV!=="production"?"KeepAlive":""),bo=Symbol(process.env.NODE_ENV!=="production"?"BaseTransition":""),Re=Symbol(process.env.NODE_ENV!=="production"?"openBlock":""),ko=Symbol(process.env.NODE_ENV!=="production"?"createBlock":""),Eo=Symbol(process.env.NODE_ENV!=="production"?"createElementBlock":""),hn=Symbol(process.env.NODE_ENV!=="production"?"createVNode":""),gn=Symbol(process.env.NODE_ENV!=="production"?"createElementVNode":""),st=Symbol(process.env.NODE_ENV!=="production"?"createCommentVNode":""),yn=Symbol(process.env.NODE_ENV!=="production"?"createTextVNode":""),wo=Symbol(process.env.NODE_ENV!=="production"?"createStaticVNode":""),vn=Symbol(process.env.NODE_ENV!=="production"?"resolveComponent":""),bn=Symbol(process.env.NODE_ENV!=="production"?"resolveDynamicComponent":""),kn=Symbol(process.env.NODE_ENV!=="production"?"resolveDirective":""),En=Symbol(process.env.NODE_ENV!=="production"?"resolveFilter":""),wn=Symbol(process.env.NODE_ENV!=="production"?"withDirectives":""),Nn=Symbol(process.env.NODE_ENV!=="production"?"renderList":""),No=Symbol(process.env.NODE_ENV!=="production"?"renderSlot":""),xo=Symbol(process.env.NODE_ENV!=="production"?"createSlots":""),Tt=Symbol(process.env.NODE_ENV!=="production"?"toDisplayString":""),$t=Symbol(process.env.NODE_ENV!=="production"?"mergeProps":""),xn=Symbol(process.env.NODE_ENV!=="production"?"normalizeClass":""),_n=Symbol(process.env.NODE_ENV!=="production"?"normalizeStyle":""),rt=Symbol(process.env.NODE_ENV!=="production"?"normalizeProps":""),it=Symbol(process.env.NODE_ENV!=="production"?"guardReactiveProps":""),Cn=Symbol(process.env.NODE_ENV!=="production"?"toHandlers":""),Sn=Symbol(process.env.NODE_ENV!=="production"?"camelize":""),Ql=Symbol(process.env.NODE_ENV!=="production"?"capitalize":""),Bn=Symbol(process.env.NODE_ENV!=="production"?"toHandlerKey":""),Dt=Symbol(process.env.NODE_ENV!=="production"?"setBlockTracking":""),Vl=Symbol(process.env.NODE_ENV!=="production"?"pushScopeId":""),ea=Symbol(process.env.NODE_ENV!=="production"?"popScopeId":""),Tn=Symbol(process.env.NODE_ENV!=="production"?"withCtx":""),ta=Symbol(process.env.NODE_ENV!=="production"?"unref":""),na=Symbol(process.env.NODE_ENV!=="production"?"isRef":""),$n=Symbol(process.env.NODE_ENV!=="production"?"withMemo":""),_o=Symbol(process.env.NODE_ENV!=="production"?"isMemoSame":""),Ge={[nt]:"Fragment",[ot]:"Teleport",[un]:"Suspense",[Bt]:"KeepAlive",[bo]:"BaseTransition",[Re]:"openBlock",[ko]:"createBlock",[Eo]:"createElementBlock",[hn]:"createVNode",[gn]:"createElementVNode",[st]:"createCommentVNode",[yn]:"createTextVNode",[wo]:"createStaticVNode",[vn]:"resolveComponent",[bn]:"resolveDynamicComponent",[kn]:"resolveDirective",[En]:"resolveFilter",[wn]:"withDirectives",[Nn]:"renderList",[No]:"renderSlot",[xo]:"createSlots",[Tt]:"toDisplayString",[$t]:"mergeProps",[xn]:"normalizeClass",[_n]:"normalizeStyle",[rt]:"normalizeProps",[it]:"guardReactiveProps",[Cn]:"toHandlers",[Sn]:"camelize",[Ql]:"capitalize",[Bn]:"toHandlerKey",[Dt]:"setBlockTracking",[Vl]:"pushScopeId",[ea]:"popScopeId",[Tn]:"withCtx",[ta]:"unref",[na]:"isRef",[$n]:"withMemo",[_o]:"isMemoSame"};function oa(t){Object.getOwnPropertySymbols(t).forEach(n=>{Ge[n]=t[n]})}const fe={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function sa(t,n=""){return{type:0,source:n,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:fe}}function lt(t,n,o,s,r,l,i,a=!1,c=!1,p=!1,u=fe){return t&&(a?(t.helper(Re),t.helper(Ye(t.inSSR,p))):t.helper(Ze(t.inSSR,p)),i&&t.helper(wn)),{type:13,tag:n,props:o,children:s,patchFlag:r,dynamicProps:l,directives:i,isBlock:a,disableTracking:c,isComponent:p,loc:u}}function Pe(t,n=fe){return{type:17,loc:n,elements:t}}function ye(t,n=fe){return{type:15,loc:n,properties:t}}function X(t,n){return{type:16,loc:fe,key:te(t)?j(t,!0):t,value:n}}function j(t,n=!1,o=fe,s=0){return{type:4,loc:o,content:t,isStatic:n,constType:n?3:s}}function ve(t,n=fe){return{type:8,loc:n,children:t}}function ee(t,n=[],o=fe){return{type:14,loc:o,callee:t,arguments:n}}function Je(t,n=void 0,o=!1,s=!1,r=fe){return{type:18,params:t,returns:n,newline:o,isSlot:s,loc:r}}function Dn(t,n,o,s=!0){return{type:19,test:t,consequent:n,alternate:o,newline:s,loc:fe}}function ra(t,n,o=!1,s=!1){return{type:20,index:t,value:n,needPauseTracking:o,inVOnce:s,needArraySpread:!1,loc:fe}}function ia(t){return{type:21,body:t,loc:fe}}function Ze(t,n){return t||n?hn:gn}function Ye(t,n){return t||n?ko:Eo}function Ln(t,{helper:n,removeHelper:o,inSSR:s}){t.isBlock||(t.isBlock=!0,o(Ze(s,t.isComponent)),n(Re),n(Ye(s,t.isComponent)))}const Co=new Uint8Array([123,123]),So=new Uint8Array([125,125]);function Bo(t){return t>=97&&t<=122||t>=65&&t<=90}function me(t){return t===32||t===10||t===9||t===12||t===13}function De(t){return t===47||t===62||me(t)}function Lt(t){const n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}const ne={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 la{constructor(n,o){this.stack=n,this.cbs=o,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=Co,this.delimiterClose=So,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=Co,this.delimiterClose=So}getPos(n){let o=1,s=n+1;for(let r=this.newlines.length-1;r>=0;r--){const l=this.newlines[r];if(n>l){o=r+2,s=n-l;break}}return{column:s,line:o,offset:n}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(n){n===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n))}stateInterpolationOpen(n){if(n===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const o=this.index+1-this.delimiterOpen.length;o>this.sectionStart&&this.cbs.ontext(this.sectionStart,o),this.state=3,this.sectionStart=o}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(n)):(this.state=1,this.stateText(n))}stateInterpolation(n){n===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(n))}stateInterpolationClose(n){n===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(n))}stateSpecialStartSequence(n){const o=this.sequenceIndex===this.currentSequence.length;if(!(o?De(n):(n|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!o){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(n)}stateInRCDATA(n){if(this.sequenceIndex===this.currentSequence.length){if(n===62||me(n)){const o=this.index-this.currentSequence.length;if(this.sectionStart<o){const s=this.index;this.index=o,this.cbs.ontext(this.sectionStart,o),this.index=s}this.sectionStart=o+2,this.stateInClosingTagName(n),this.inRCDATA=!1;return}this.sequenceIndex=0}(n|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===ne.TitleEnd||this.currentSequence===ne.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&n===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(n)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(n===60)}stateCDATASequence(n){n===ne.Cdata[this.sequenceIndex]?++this.sequenceIndex===ne.Cdata.length&&(this.state=28,this.currentSequence=ne.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(n))}fastForwardTo(n){for(;++this.index<this.buffer.length;){const o=this.buffer.charCodeAt(this.index);if(o===10&&this.newlines.push(this.index),o===n)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(n){n===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===ne.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):n!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(n,o){this.enterRCDATA(n,o),this.state=31}enterRCDATA(n,o){this.inRCDATA=!0,this.currentSequence=n,this.sequenceIndex=o}stateBeforeTagName(n){n===33?(this.state=22,this.sectionStart=this.index+1):n===63?(this.state=24,this.sectionStart=this.index+1):Bo(n)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:n===116?this.state=30:this.state=n===115?29:6):n===47?this.state=8:(this.state=1,this.stateText(n))}stateInTagName(n){De(n)&&this.handleTagName(n)}stateInSFCRootTagName(n){if(De(n)){const o=this.buffer.slice(this.sectionStart,this.index);o!=="template"&&this.enterRCDATA(Lt("</"+o),0),this.handleTagName(n)}}handleTagName(n){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)}stateBeforeClosingTagName(n){me(n)||(n===62?(process.env.NODE_ENV!=="production"&&this.cbs.onerr(14,this.index),this.state=1,this.sectionStart=this.index+1):(this.state=Bo(n)?9:27,this.sectionStart=this.index))}stateInClosingTagName(n){(n===62||me(n))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(n))}stateAfterClosingTagName(n){n===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(n){n===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):n===47?(this.state=7,process.env.NODE_ENV!=="production"&&this.peek()!==62&&this.cbs.onerr(22,this.index)):n===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):me(n)||(process.env.NODE_ENV!=="production"&&n===61&&this.cbs.onerr(19,this.index),this.handleAttrStart(n))}handleAttrStart(n){n===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):n===46||n===58||n===64||n===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(n){n===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):me(n)||(this.state=11,this.stateBeforeAttrName(n))}stateInAttrName(n){n===61||De(n)?(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):process.env.NODE_ENV!=="production"&&(n===34||n===39||n===60)&&this.cbs.onerr(17,this.index)}stateInDirName(n){n===61||De(n)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):n===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(n){n===61||De(n)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===91?this.state=15:n===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(n){n===93?this.state=14:(n===61||De(n))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(n),process.env.NODE_ENV!=="production"&&this.cbs.onerr(27,this.index))}stateInDirModifier(n){n===61||De(n)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(n)):n===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(n){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(n)}stateAfterAttrName(n){n===61?this.state=18:n===47||n===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(n)):me(n)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(n))}stateBeforeAttrValue(n){n===34?(this.state=19,this.sectionStart=this.index+1):n===39?(this.state=20,this.sectionStart=this.index+1):me(n)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(n))}handleInAttrValue(n,o){(n===o||this.fastForwardTo(o))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(n){this.handleInAttrValue(n,34)}stateInAttrValueSingleQuotes(n){this.handleInAttrValue(n,39)}stateInAttrValueNoQuotes(n){me(n)||n===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(n)):(process.env.NODE_ENV!=="production"&&n===34||n===39||n===60||n===61||n===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(n){n===91?(this.state=26,this.sequenceIndex=0):this.state=n===45?25:23}stateInDeclaration(n){(n===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(n){(n===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(n){n===45?(this.state=28,this.currentSequence=ne.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(n){(n===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(n){n===ne.ScriptEnd[3]?this.startSpecial(ne.ScriptEnd,4):n===ne.StyleEnd[3]?this.startSpecial(ne.StyleEnd,4):(this.state=6,this.stateInTagName(n))}stateBeforeSpecialT(n){n===ne.TitleEnd[3]?this.startSpecial(ne.TitleEnd,4):n===ne.TextareaEnd[3]?this.startSpecial(ne.TextareaEnd,4):(this.state=6,this.stateInTagName(n))}startEntity(){}stateInEntity(){}parse(n){for(this.buffer=n;this.index<this.buffer.length;){const o=this.buffer.charCodeAt(this.index);switch(o===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(o);break}case 2:{this.stateInterpolationOpen(o);break}case 3:{this.stateInterpolation(o);break}case 4:{this.stateInterpolationClose(o);break}case 31:{this.stateSpecialStartSequence(o);break}case 32:{this.stateInRCDATA(o);break}case 26:{this.stateCDATASequence(o);break}case 19:{this.stateInAttrValueDoubleQuotes(o);break}case 12:{this.stateInAttrName(o);break}case 13:{this.stateInDirName(o);break}case 14:{this.stateInDirArg(o);break}case 15:{this.stateInDynamicDirArg(o);break}case 16:{this.stateInDirModifier(o);break}case 28:{this.stateInCommentLike(o);break}case 27:{this.stateInSpecialComment(o);break}case 11:{this.stateBeforeAttrName(o);break}case 6:{this.stateInTagName(o);break}case 34:{this.stateInSFCRootTagName(o);break}case 9:{this.stateInClosingTagName(o);break}case 5:{this.stateBeforeTagName(o);break}case 17:{this.stateAfterAttrName(o);break}case 20:{this.stateInAttrValueSingleQuotes(o);break}case 18:{this.stateBeforeAttrValue(o);break}case 8:{this.stateBeforeClosingTagName(o);break}case 10:{this.stateAfterClosingTagName(o);break}case 29:{this.stateBeforeSpecialS(o);break}case 30:{this.stateBeforeSpecialT(o);break}case 21:{this.stateInAttrValueNoQuotes(o);break}case 7:{this.stateInSelfClosingTag(o);break}case 23:{this.stateInDeclaration(o);break}case 22:{this.stateBeforeDeclaration(o);break}case 25:{this.stateBeforeComment(o);break}case 24:{this.stateInProcessingInstruction(o);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 n=this.buffer.length;this.sectionStart>=n||(this.state===28?this.currentSequence===ne.CdataEnd?this.cbs.oncdata(this.sectionStart,n):this.cbs.oncomment(this.sectionStart,n):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,n))}emitCodePoint(n,o){}}const aa={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:t=>`.sync modifier for v-bind has been removed. Use v-model with argument instead. \`v-bind:${t}.sync\` should be changed to \`v-model:${t}\`.`,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 On(t,{compatConfig:n}){const o=n&&n[t];return t==="MODE"?o||3:o}function Le(t,n){const o=On("MODE",n),s=On(t,n);return o===3?s===!0:s!==!1}function Xe(t,n,o,...s){const r=Le(t,n);return process.env.NODE_ENV!=="production"&&r&&Ot(t,n,o,...s),r}function Ot(t,n,o,...s){if(On(t,n)==="suppress-warning")return;const{message:l,link:i}=aa[t],a=`(deprecation ${t}) ${typeof l=="function"?l(...s):l}${i?`
|
|
140
140
|
Details: ${i}`:""}`,c=new SyntaxError(a);c.code=t,o&&(c.loc=o),n.onWarn(c)}function An(t){throw t}function To(t){process.env.NODE_ENV!=="production"&&console.warn(`[Vue warn] ${t.message}`)}function W(t,n,o,s){const r=process.env.NODE_ENV!=="production"?(o||ca)[t]+(s||""):`https://vuejs.org/error-reference/#compiler-${t}`,l=new SyntaxError(String(r));return l.code=t,l.loc=n,l}const ca={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:""},ce=t=>t.type===4&&t.isStatic;function $o(t){switch(t){case"Teleport":case"teleport":return st;case"Suspense":case"suspense":return un;case"KeepAlive":case"keep-alive":return Bt;case"BaseTransition":case"base-transition":return bo}}const da=/^$|^\d|[^\$\w\xA0-\uFFFF]/,In=t=>!da.test(t),pa=/[A-Za-z_$\xA0-\uFFFF]/,fa=/[\.\?\w$\xA0-\uFFFF]/,ma=/\s+[.[]\s*|\s*[.[]\s+/g,Do=t=>t.type===4?t.content:t.loc.source,Lo=t=>{const n=Do(t).trim().replace(ma,a=>a.trim());let o=0,s=[],r=0,l=0,i=null;for(let a=0;a<n.length;a++){const c=n.charAt(a);switch(o){case 0:if(c==="[")s.push(o),o=1,r++;else if(c==="(")s.push(o),o=2,l++;else if(!(a===0?pa:fa).test(c))return!1;break;case 1:c==="'"||c==='"'||c==="`"?(s.push(o),o=3,i=c):c==="["?r++:c==="]"&&(--r||(o=s.pop()));break;case 2:if(c==="'"||c==='"'||c==="`")s.push(o),o=3,i=c;else if(c==="(")l++;else if(c===")"){if(a===n.length-1)return!1;--l||(o=s.pop())}break;case 3:c===i&&(o=s.pop(),i=null);break}}return!r&&!l},ua=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ha=t=>ua.test(Do(t));function Oo(t,n){if(!t)throw new Error(n||"unexpected compiler condition")}function de(t,n,o=!1){for(let s=0;s<t.props.length;s++){const r=t.props[s];if(r.type===7&&(o||r.exp)&&(ne(n)?r.name===n:n.test(r.name)))return r}}function ct(t,n,o=!1,s=!1){for(let r=0;r<t.props.length;r++){const l=t.props[r];if(l.type===6){if(o)continue;if(l.name===n&&(l.value||s))return l}else if(l.name==="bind"&&(l.exp||s)&&Ae(l.arg,n))return l}}function Ae(t,n){return!!(t&&ce(t)&&t.content===n)}function ga(t){return t.props.some(n=>n.type===7&&n.name==="bind"&&(!n.arg||n.arg.type!==4||!n.arg.isStatic))}function Mn(t){return t.type===5||t.type===2}function Ao(t){return t.type===7&&t.name==="pre"}function ya(t){return t.type===7&&t.name==="slot"}function At(t){return t.type===1&&t.tagType===3}function It(t){return t.type===1&&t.tagType===2}const va=new Set([it,lt]);function Io(t,n=[]){if(t&&!ne(t)&&t.type===14){const o=t.callee;if(!ne(o)&&va.has(o))return Io(t.arguments[0],n.concat(t))}return[t,n]}function Mt(t,n,o){let s,r=t.type===13?t.props:t.arguments[2],l=[],i;if(r&&!ne(r)&&r.type===14){const a=Io(r);r=a[0],l=a[1],i=l[l.length-1]}if(r==null||ne(r))s=ge([n]);else if(r.type===14){const a=r.arguments[0];!ne(a)&&a.type===15?Mo(n,a)||a.properties.unshift(n):r.callee===Cn?s=te(o.helper($t),[ge([n]),r]):r.arguments.unshift(ge([n])),!s&&(s=r)}else r.type===15?(Mo(n,r)||r.properties.unshift(n),s=r):(s=te(o.helper($t),[ge([n]),r]),i&&i.callee===lt&&(i=l[l.length-2]));t.type===13?i?i.arguments[0]=s:t.props=s:i?i.arguments[0]=s:t.arguments[2]=s}function Mo(t,n){let o=!1;if(t.key.type===4){const s=t.key.content;o=n.properties.some(r=>r.key.type===4&&r.key.content===s)}return o}function dt(t,n){return`_${n}_${t.replace(/[^\w]/g,(o,s)=>o==="-"?"_":t.charCodeAt(s).toString())}`}function ba(t){return t.type===14&&t.callee===$n?t.arguments[1].returns:t}const ka=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Ro={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:St,isPreTag:St,isIgnoreNewlineTag:St,isCustomElement:St,onError:An,onWarn:To,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let q=Ro,pt=null,Ce="",re=null,U=null,pe="",Se=-1,ze=-1,Rn=0,Ie=!1,Pn=null;const Z=[],G=new la(Z,{onerr:fe,ontext(t,n){Rt(se(t,n),t,n)},ontextentity(t,n,o){Rt(t,n,o)},oninterpolation(t,n){if(Ie)return Rt(se(t,n),t,n);let o=t+G.delimiterOpen.length,s=n-G.delimiterClose.length;for(;ue(Ce.charCodeAt(o));)o++;for(;ue(Ce.charCodeAt(s-1));)s--;let r=se(o,s);r.includes("&")&&(r=q.decodeEntities(r,!1)),Fn({type:5,content:Ft(r,!1,Q(o,s)),loc:Q(t,n)})},onopentagname(t,n){const o=se(t,n);re={type:1,tag:o,ns:q.getNamespace(o,Z[0],q.ns),tagType:0,props:[],children:[],loc:Q(t-1,n),codegenNode:void 0}},onopentagend(t){Fo(t)},onclosetag(t,n){const o=se(t,n);if(!q.isVoidTag(o)){let s=!1;for(let r=0;r<Z.length;r++)if(Z[r].tag.toLowerCase()===o.toLowerCase()){s=!0,r>0&&fe(24,Z[0].loc.start.offset);for(let i=0;i<=r;i++){const a=Z.shift();Pt(a,n,i<r)}break}s||fe(23,zo(t,60))}},onselfclosingtag(t){const n=re.tag;re.isSelfClosing=!0,Fo(t),Z[0]&&Z[0].tag===n&&Pt(Z.shift(),t)},onattribname(t,n){U={type:6,name:se(t,n),nameLoc:Q(t,n),value:void 0,loc:Q(t)}},ondirname(t,n){const o=se(t,n),s=o==="."||o===":"?"bind":o==="@"?"on":o==="#"?"slot":o.slice(2);if(!Ie&&s===""&&fe(26,t),Ie||s==="")U={type:6,name:o,nameLoc:Q(t,n),value:void 0,loc:Q(t)};else if(U={type:7,name:s,rawName:o,exp:void 0,arg:void 0,modifiers:o==="."?[j("prop")]:[],loc:Q(t)},s==="pre"){Ie=G.inVPre=!0,Pn=re;const r=re.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=Da(r[l]))}},ondirarg(t,n){if(t===n)return;const o=se(t,n);if(Ie&&!Ao(U))U.name+=o,je(U.nameLoc,n);else{const s=o[0]!=="[";U.arg=Ft(s?o:o.slice(1,-1),s,Q(t,n),s?3:0)}},ondirmodifier(t,n){const o=se(t,n);if(Ie&&!Ao(U))U.name+="."+o,je(U.nameLoc,n);else if(U.name==="slot"){const s=U.arg;s&&(s.content+="."+o,je(s.loc,n))}else{const s=j(o,!0,Q(t,n));U.modifiers.push(s)}},onattribdata(t,n){pe+=se(t,n),Se<0&&(Se=t),ze=n},onattribentity(t,n,o){pe+=t,Se<0&&(Se=n),ze=o},onattribnameend(t){const n=U.loc.start.offset,o=se(n,t);U.type===7&&(U.rawName=o),re.props.some(s=>(s.type===7?s.rawName:s.name)===o)&&fe(2,n)},onattribend(t,n){if(re&&U){if(je(U.loc,n),t!==0)if(pe.includes("&")&&(pe=q.decodeEntities(pe,!0)),U.type===6)U.name==="class"&&(pe=Uo(pe).trim()),t===1&&!pe&&fe(13,n),U.value={type:2,content:pe,loc:t===1?Q(Se,ze):Q(Se-1,ze+1)},G.inSFCRoot&&re.tag==="template"&&U.name==="lang"&&pe&&pe!=="html"&&G.enterRCDATA(Lt("</template"),0);else{let o=0;U.exp=Ft(pe,!1,Q(Se,ze),0,o),U.name==="for"&&(U.forParseResult=wa(U.exp));let s=-1;U.name==="bind"&&(s=U.modifiers.findIndex(r=>r.content==="sync"))>-1&&Qe("COMPILER_V_BIND_SYNC",q,U.loc,U.arg.loc.source)&&(U.name="model",U.modifiers.splice(s,1))}(U.type!==7||U.name!=="pre")&&re.props.push(U)}pe="",Se=ze=-1},oncomment(t,n){q.comments&&Fn({type:3,content:se(t,n),loc:Q(t-4,n+3)})},onend(){const t=Ce.length;if(process.env.NODE_ENV!=="production"&&G.state!==1)switch(G.state){case 5:case 8:fe(5,t);break;case 3:case 4:fe(25,G.sectionStart);break;case 28:G.currentSequence===oe.CdataEnd?fe(6,t):fe(7,t);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:fe(9,t);break}for(let n=0;n<Z.length;n++)Pt(Z[n],t-1),fe(24,Z[n].loc.start.offset)},oncdata(t,n){Z[0].ns!==0?Rt(se(t,n),t,n):fe(1,t-9)},onprocessinginstruction(t){(Z[0]?Z[0].ns:q.ns)===0&&fe(21,t-1)}}),Po=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ea=/^\(|\)$/g;function wa(t){const n=t.loc,o=t.content,s=o.match(ka);if(!s)return;const[,r,l]=s,i=(f,u,k=!1)=>{const _=n.start.offset+u,x=_+f.length;return Ft(f,!1,Q(_,x),0,k?1:0)},a={source:i(l.trim(),o.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(Ea,"").trim();const p=r.indexOf(c),m=c.match(Po);if(m){c=c.replace(Po,"").trim();const f=m[1].trim();let u;if(f&&(u=o.indexOf(f,p+c.length),a.key=i(f,u,!0)),m[2]){const k=m[2].trim();k&&(a.index=i(k,o.indexOf(k,a.key?u+f.length:p+c.length),!0))}}return c&&(a.value=i(c,p,!0)),a}function se(t,n){return Ce.slice(t,n)}function Fo(t){G.inSFCRoot&&(re.innerLoc=Q(t+1,t+1)),Fn(re);const{tag:n,ns:o}=re;o===0&&q.isPreTag(n)&&Rn++,q.isVoidTag(n)?Pt(re,t):(Z.unshift(re),(o===1||o===2)&&(G.inXML=!0)),re=null}function Rt(t,n,o){{const l=Z[0]&&Z[0].tag;l!=="script"&&l!=="style"&&t.includes("&")&&(t=q.decodeEntities(t,!1))}const s=Z[0]||pt,r=s.children[s.children.length-1];r&&r.type===2?(r.content+=t,je(r.loc,o)):s.children.push({type:2,content:t,loc:Q(n,o)})}function Pt(t,n,o=!1){o?je(t.loc,zo(n,60)):je(t.loc,Na(n,62)+1),G.inSFCRoot&&(t.children.length?t.innerLoc.end=$e({},t.children[t.children.length-1].loc.end):t.innerLoc.end=$e({},t.innerLoc.start),t.innerLoc.source=se(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:s,ns:r,children:l}=t;if(Ie||(s==="slot"?t.tagType=2:jo(t)?t.tagType=3:_a(t)&&(t.tagType=1)),G.inRCDATA||(t.children=Ho(l)),r===0&&q.isIgnoreNewlineTag(s)){const i=l[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}r===0&&q.isPreTag(s)&&Rn--,Pn===t&&(Ie=G.inVPre=!1,Pn=null),G.inXML&&(Z[0]?Z[0].ns:q.ns)===0&&(G.inXML=!1);{const i=t.props;if(process.env.NODE_ENV!=="production"&&Oe("COMPILER_V_IF_V_FOR_PRECEDENCE",q)){let c=!1,p=!1;for(let m=0;m<i.length;m++){const f=i[m];if(f.type===7&&(f.name==="if"?c=!0:f.name==="for"&&(p=!0)),c&&p){Ot("COMPILER_V_IF_V_FOR_PRECEDENCE",q,t.loc);break}}}if(!G.inSFCRoot&&Oe("COMPILER_NATIVE_TEMPLATE",q)&&t.tag==="template"&&!jo(t)){process.env.NODE_ENV!=="production"&&Ot("COMPILER_NATIVE_TEMPLATE",q,t.loc);const c=Z[0]||pt,p=c.children.indexOf(t);c.children.splice(p,1,...t.children)}const a=i.find(c=>c.type===6&&c.name==="inline-template");a&&Qe("COMPILER_INLINE_TEMPLATE",q,a.loc)&&t.children.length&&(a.value={type:2,content:se(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function Na(t,n){let o=t;for(;Ce.charCodeAt(o)!==n&&o<Ce.length-1;)o++;return o}function zo(t,n){let o=t;for(;Ce.charCodeAt(o)!==n&&o>=0;)o--;return o}const xa=new Set(["if","else","else-if","for","slot"]);function jo({tag:t,props:n}){if(t==="template"){for(let o=0;o<n.length;o++)if(n[o].type===7&&xa.has(n[o].name))return!0}return!1}function _a({tag:t,props:n}){if(q.isCustomElement(t))return!1;if(t==="component"||Ca(t.charCodeAt(0))||$o(t)||q.isBuiltInComponent&&q.isBuiltInComponent(t)||q.isNativeTag&&!q.isNativeTag(t))return!0;for(let o=0;o<n.length;o++){const s=n[o];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Qe("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}}else if(s.name==="bind"&&Ae(s.arg,"is")&&Qe("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}return!1}function Ca(t){return t>64&&t<91}const Sa=/\r\n/g;function Ho(t){const n=q.whitespace!=="preserve";let o=!1;for(let s=0;s<t.length;s++){const r=t[s];if(r.type===2)if(Rn)r.content=r.content.replace(Sa,`
|
|
142
|
-
`);else if(Ba(r.content)){const l=t[s-1]&&t[s-1].type,i=t[s+1]&&t[s+1].type;!l||!i||n&&(l===3&&(i===3||i===1)||l===1&&(i===3||i===1&&Ta(r.content)))?(o=!0,t[s]=null):r.content=" "}else n&&(r.content=Uo(r.content))}return o?t.filter(Boolean):t}function Ba(t){for(let n=0;n<t.length;n++)if(!ue(t.charCodeAt(n)))return!1;return!0}function Ta(t){for(let n=0;n<t.length;n++){const o=t.charCodeAt(n);if(o===10||o===13)return!0}return!1}function Uo(t){let n="",o=!1;for(let s=0;s<t.length;s++)ue(t.charCodeAt(s))?o||(n+=" ",o=!0):(n+=t[s],o=!1);return n}function Fn(t){(Z[0]||pt).children.push(t)}function Q(t,n){return{start:G.getPos(t),end:n==null?n:G.getPos(n),source:n==null?n:se(t,n)}}function $a(t){return Q(t.start.offset,t.end.offset)}function je(t,n){t.end=G.getPos(n),t.source=se(t.start.offset,n)}function Da(t){const n={type:6,name:t.rawName,nameLoc:Q(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const o=t.exp.loc;o.end.offset<t.loc.end.offset&&(o.start.offset--,o.start.column--,o.end.offset++,o.end.column++),n.value={type:2,content:t.exp.content,loc:o}}return n}function Ft(t,n=!1,o,s=0,r=0){return j(t,n,o,s)}function fe(t,n,o){q.onError(W(t,Q(n,n),void 0,o))}function La(){G.reset(),re=null,U=null,pe="",Se=-1,ze=-1,Z.length=0}function Oa(t,n){if(La(),Ce=t,q=$e({},Ro),n){let r;for(r in n)n[r]!=null&&(q[r]=n[r])}if(process.env.NODE_ENV!=="production"&&!q.decodeEntities)throw new Error("[@vue/compiler-core] decodeEntities option is required in browser builds.");G.mode=q.parseMode==="html"?1:q.parseMode==="sfc"?2:0,G.inXML=q.ns===1||q.ns===2;const o=n&&n.delimiters;o&&(G.delimiterOpen=Lt(o[0]),G.delimiterClose=Lt(o[1]));const s=pt=sa([],t);return G.parse(Ce),s.loc=Q(0,t.length),s.children=Ho(s.children),pt=null,s}function Aa(t,n){zt(t,void 0,n,!!qo(t))}function qo(t){const n=t.children.filter(o=>o.type!==3);return n.length===1&&n[0].type===1&&!It(n[0])?n[0]:null}function zt(t,n,o,s=!1,r=!1){const{children:l}=t,i=[];for(let f=0;f<l.length;f++){const u=l[f];if(u.type===1&&u.tagType===0){const k=s?0:he(u,o);if(k>0){if(k>=2){u.codegenNode.patchFlag=-1,i.push(u);continue}}else{const _=u.codegenNode;if(_.type===13){const x=_.patchFlag;if((x===void 0||x===512||x===1)&&Ko(u,o)>=2){const w=Go(u);w&&(_.props=o.hoist(w))}_.dynamicProps&&(_.dynamicProps=o.hoist(_.dynamicProps))}}}else if(u.type===12&&(s?0:he(u,o))>=2){u.codegenNode.type===14&&u.codegenNode.arguments.length>0&&u.codegenNode.arguments.push(-1+(process.env.NODE_ENV!=="production"?` /* ${nt[-1]} */`:"")),i.push(u);continue}if(u.type===1){const k=u.tagType===1;k&&o.scopes.vSlot++,zt(u,t,o,!1,r),k&&o.scopes.vSlot--}else if(u.type===11)zt(u,t,o,u.children.length===1,!0);else if(u.type===9)for(let k=0;k<u.branches.length;k++)zt(u.branches[k],t,o,u.branches[k].children.length===1,r)}let a=!1;const c=[];if(i.length===l.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&we(t.codegenNode.children))t.codegenNode.children=p(Fe(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!we(t.codegenNode.children)&&t.codegenNode.children.type===15){const f=m(t.codegenNode,"default");f&&(c.push(o.cached.length),f.returns=p(Fe(f.returns)),a=!0)}else if(t.tagType===3&&n&&n.type===1&&n.tagType===1&&n.codegenNode&&n.codegenNode.type===13&&n.codegenNode.children&&!we(n.codegenNode.children)&&n.codegenNode.children.type===15){const f=de(t,"slot",!0),u=f&&f.arg&&m(n.codegenNode,f.arg);u&&(c.push(o.cached.length),u.returns=p(Fe(u.returns)),a=!0)}}if(!a)for(const f of i)c.push(o.cached.length),f.codegenNode=o.cache(f.codegenNode);c.length&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!we(t.codegenNode.children)&&t.codegenNode.children.type===15&&t.codegenNode.children.properties.push(X("__",j(JSON.stringify(c),!1)));function p(f){const u=o.cache(f);return r&&o.hmr&&(u.needArraySpread=!0),u}function m(f,u){if(f.children&&!we(f.children)&&f.children.type===15){const k=f.children.properties.find(_=>_.key===u||_.key.content===u);return k&&k.value}}i.length&&o.transformHoist&&o.transformHoist(l,o,t)}function he(t,n){const{constantCache:o}=n;switch(t.type){case 1:if(t.tagType!==0)return 0;const s=o.get(t);if(s!==void 0)return s;const r=t.codegenNode;if(r.type!==13||r.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(r.patchFlag===void 0){let i=3;const a=Ko(t,n);if(a===0)return o.set(t,0),0;a<i&&(i=a);for(let c=0;c<t.children.length;c++){const p=he(t.children[c],n);if(p===0)return o.set(t,0),0;p<i&&(i=p)}if(i>1)for(let c=0;c<t.props.length;c++){const p=t.props[c];if(p.type===7&&p.name==="bind"&&p.exp){const m=he(p.exp,n);if(m===0)return o.set(t,0),0;m<i&&(i=m)}}if(r.isBlock){for(let c=0;c<t.props.length;c++)if(t.props[c].type===7)return o.set(t,0),0;n.removeHelper(Pe),n.removeHelper(Xe(n.inSSR,r.isComponent)),r.isBlock=!1,n.helper(Ye(n.inSSR,r.isComponent))}return o.set(t,i),i}else return o.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return he(t.content,n);case 4:return t.constType;case 8:let l=3;for(let i=0;i<t.children.length;i++){const a=t.children[i];if(ne(a)||pn(a))continue;const c=he(a,n);if(c===0)return 0;c<l&&(l=c)}return l;case 20:return 2;default:return process.env.NODE_ENV,0}}const Ia=new Set([xn,_n,it,lt]);function Wo(t,n){if(t.type===14&&!ne(t.callee)&&Ia.has(t.callee)){const o=t.arguments[0];if(o.type===4)return he(o,n);if(o.type===14)return Wo(o,n)}return 0}function Ko(t,n){let o=3;const s=Go(t);if(s&&s.type===15){const{properties:r}=s;for(let l=0;l<r.length;l++){const{key:i,value:a}=r[l],c=he(i,n);if(c===0)return c;c<o&&(o=c);let p;if(a.type===4?p=he(a,n):a.type===14?p=Wo(a,n):p=0,p===0)return p;p<o&&(o=p)}}return o}function Go(t){const n=t.codegenNode;if(n.type===13)return n.props}function Ma(t,{filename:n="",prefixIdentifiers:o=!1,hoistStatic:s=!1,hmr:r=!1,cacheHandlers:l=!1,nodeTransforms:i=[],directiveTransforms:a={},transformHoist:c=null,isBuiltInComponent:p=cn,isCustomElement:m=cn,expressionPlugins:f=[],scopeId:u=null,slotted:k=!0,ssr:_=!1,inSSR:x=!1,ssrCssVars:w="",bindingMetadata:C=Al,inline:R=!1,isTS:T=!1,onError:D=An,onWarn:B=To,compatConfig:H}){const K=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),M={filename:n,selfName:K&&mn(De(K[1])),prefixIdentifiers:o,hoistStatic:s,hmr:r,cacheHandlers:l,nodeTransforms:i,directiveTransforms:a,transformHoist:c,isBuiltInComponent:p,isCustomElement:m,expressionPlugins:f,scopeId:u,slotted:k,ssr:_,inSSR:x,ssrCssVars:w,bindingMetadata:C,inline:R,isTS:T,onError:D,onWarn:B,compatConfig:H,root:t,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:t,childIndex:0,inVOnce:!1,helper(I){const F=M.helpers.get(I)||0;return M.helpers.set(I,F+1),I},removeHelper(I){const F=M.helpers.get(I);if(F){const z=F-1;z?M.helpers.set(I,z):M.helpers.delete(I)}},helperString(I){return`_${Je[M.helper(I)]}`},replaceNode(I){if(process.env.NODE_ENV!=="production"){if(!M.currentNode)throw new Error("Node being replaced is already removed.");if(!M.parent)throw new Error("Cannot replace root node.")}M.parent.children[M.childIndex]=M.currentNode=I},removeNode(I){if(process.env.NODE_ENV!=="production"&&!M.parent)throw new Error("Cannot remove root node.");const F=M.parent.children,z=I?F.indexOf(I):M.currentNode?M.childIndex:-1;if(process.env.NODE_ENV!=="production"&&z<0)throw new Error("node being removed is not a child of current parent");!I||I===M.currentNode?(M.currentNode=null,M.onNodeRemoved()):M.childIndex>z&&(M.childIndex--,M.onNodeRemoved()),M.parent.children.splice(z,1)},onNodeRemoved:cn,addIdentifiers(I){},removeIdentifiers(I){},hoist(I){ne(I)&&(I=j(I)),M.hoists.push(I);const F=j(`_hoisted_${M.hoists.length}`,!1,I.loc,2);return F.hoisted=I,F},cache(I,F=!1,z=!1){const E=ra(M.cached.length,I,F,z);return M.cached.push(E),E}};return M.filters=new Set,M}function Ra(t,n){const o=Ma(t,n);jt(t,o),n.hoistStatic&&Aa(t,o),n.ssr||Pa(t,o),t.helpers=new Set([...o.helpers.keys()]),t.components=[...o.components],t.directives=[...o.directives],t.imports=o.imports,t.hoists=o.hoists,t.temps=o.temps,t.cached=o.cached,t.transformed=!0,t.filters=[...o.filters]}function Pa(t,n){const{helper:o}=n,{children:s}=t;if(s.length===1){const r=qo(t);if(r&&r.codegenNode){const l=r.codegenNode;l.type===13&&Ln(l,n),t.codegenNode=l}else t.codegenNode=s[0]}else if(s.length>1){let r=64;process.env.NODE_ENV!=="production"&&s.filter(l=>l.type!==3).length===1&&(r|=2048),t.codegenNode=at(n,o(ot),void 0,t.children,r,void 0,void 0,!0,void 0,!1)}}function Fa(t,n){let o=0;const s=()=>{o--};for(;o<t.children.length;o++){const r=t.children[o];ne(r)||(n.grandParent=n.parent,n.parent=t,n.childIndex=o,n.onNodeRemoved=s,jt(r,n))}}function jt(t,n){n.currentNode=t;const{nodeTransforms:o}=n,s=[];for(let l=0;l<o.length;l++){const i=o[l](t,n);if(i&&(we(i)?s.push(...i):s.push(i)),n.currentNode)t=n.currentNode;else return}switch(t.type){case 3:n.ssr||n.helper(rt);break;case 5:n.ssr||n.helper(Tt);break;case 9:for(let l=0;l<t.branches.length;l++)jt(t.branches[l],n);break;case 10:case 11:case 1:case 0:Fa(t,n);break}n.currentNode=t;let r=s.length;for(;r--;)s[r]()}function Jo(t,n){const o=ne(t)?s=>s===t:s=>t.test(s);return(s,r)=>{if(s.type===1){const{props:l}=s;if(s.tagType===3&&l.some(ya))return;const i=[];for(let a=0;a<l.length;a++){const c=l[a];if(c.type===7&&o(c.name)){l.splice(a,1),a--;const p=n(s,c,r);p&&i.push(p)}}return i}}}const Ht="/*@__PURE__*/",Zo=t=>`${Je[t]}: _${Je[t]}`;function za(t,{mode:n="function",prefixIdentifiers:o=n==="module",sourceMap:s=!1,filename:r="template.vue.html",scopeId:l=null,optimizeImports:i=!1,runtimeGlobalName:a="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:p="vue/server-renderer",ssr:m=!1,isTS:f=!1,inSSR:u=!1}){const k={mode:n,prefixIdentifiers:o,sourceMap:s,filename:r,scopeId:l,optimizeImports:i,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:p,ssr:m,isTS:f,inSSR:u,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(x){return`_${Je[x]}`},push(x,w=-2,C){k.code+=x},indent(){_(++k.indentLevel)},deindent(x=!1){x?--k.indentLevel:_(--k.indentLevel)},newline(){_(k.indentLevel)}};function _(x){k.push(`
|
|
143
|
-
`+" ".repeat(x),0)}return k}function ja(t,n={}){const o=za(t,n);n.onContextCreated&&n.onContextCreated(o);const{mode:s,push:r,prefixIdentifiers:l,indent:i,deindent:a,newline:c,scopeId:p,ssr:
|
|
144
|
-
`,-1),c())),t.components.length&&(zn(t.components,"component",o),(t.directives.length||t.temps>0)&&c()),t.directives.length&&(zn(t.directives,"directive",o),t.temps>0&&c()),t.filters&&t.filters.length&&(c(),zn(t.filters,"filter",o),c()),t.temps>0){r("let ");for(let
|
|
145
|
-
`,0),c()),
|
|
146
|
-
`,-1),t.hoists.length)){const f=[hn,gn,
|
|
147
|
-
`,-1)}Ua(t.hoists,n),l(),r("return ")}function zn(t,n,{helper:o,push:s,newline:r,isTS:l}){const i=o(n==="filter"?En:n==="component"?vn:kn);for(let a=0;a<t.length;a++){let c=t[a];const p=c.endsWith("__self");p&&(c=c.slice(0,-6)),s(`const ${dt(c,n)} = ${i}(${JSON.stringify(c)}${p?", true":""})${l?"!":""}`),a<t.length-1&&r()}}function Ua(t,n){if(!t.length)return;n.pure=!0;const{push:o,newline:s}=n;s();for(let r=0;r<t.length;r++){const l=t[r];l&&(o(`const _hoisted_${r+1} = `),ie(l,n),s())}n.pure=!1}function qa(t){return ne(t)||t.type===4||t.type===2||t.type===5||t.type===8}function jn(t,n){const o=t.length>3||process.env.NODE_ENV!=="production"&&t.some(s=>we(s)||!qa(s));n.push("["),o&&n.indent(),ft(t,n,o),o&&n.deindent(),n.push("]")}function ft(t,n,o=!1,s=!0){const{push:r,newline:l}=n;for(let i=0;i<t.length;i++){const a=t[i];ne(a)?r(a,-3):we(a)?jn(a,n):ie(a,n),i<t.length-1&&(o?(s&&r(","),l()):s&&r(", "))}}function ie(t,n){if(ne(t)){n.push(t,-3);return}if(pn(t)){n.push(n.helper(t));return}switch(t.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&Oo(t.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),ie(t.codegenNode,n);break;case 2:Wa(t,n);break;case 4:Yo(t,n);break;case 5:Ka(t,n);break;case 12:ie(t.codegenNode,n);break;case 8:Xo(t,n);break;case 3:Ja(t,n);break;case 13:Za(t,n);break;case 14:Xa(t,n);break;case 15:Qa(t,n);break;case 17:Va(t,n);break;case 18:ec(t,n);break;case 19:tc(t,n);break;case 20:nc(t,n);break;case 21:ft(t.body,n,!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 Oo(!1,`unhandled codegen node type: ${t.type}`),t}}function Wa(t,n){n.push(JSON.stringify(t.content),-3,t)}function Yo(t,n){const{content:o,isStatic:s}=t;n.push(s?JSON.stringify(o):o,-3,t)}function Ka(t,n){const{push:o,helper:s,pure:r}=n;r&&o(Ht),o(`${s(Tt)}(`),ie(t.content,n),o(")")}function Xo(t,n){for(let o=0;o<t.children.length;o++){const s=t.children[o];ne(s)?n.push(s,-3):ie(s,n)}}function Ga(t,n){const{push:o}=n;if(t.type===8)o("["),Xo(t,n),o("]");else if(t.isStatic){const s=In(t.content)?t.content:JSON.stringify(t.content);o(s,-2,t)}else o(`[${t.content}]`,-3,t)}function Ja(t,n){const{push:o,helper:s,pure:r}=n;r&&o(Ht),o(`${s(rt)}(${JSON.stringify(t.content)})`,-3,t)}function Za(t,n){const{push:o,helper:s,pure:r}=n,{tag:l,props:i,children:a,patchFlag:c,dynamicProps:p,directives:m,isBlock:f,disableTracking:u,isComponent:k}=t;let _;if(c)if(process.env.NODE_ENV!=="production")if(c<0)_=c+` /* ${nt[c]} */`;else{const w=Object.keys(nt).map(Number).filter(C=>C>0&&c&C).map(C=>nt[C]).join(", ");_=c+` /* ${w} */`}else _=String(c);m&&o(s(wn)+"("),f&&o(`(${s(Pe)}(${u?"true":""}), `),r&&o(Ht);const x=f?Xe(n.inSSR,k):Ye(n.inSSR,k);o(s(x)+"(",-2,t),ft(Ya([l,i,a,_,p]),n),o(")"),f&&o(")"),m&&(o(", "),ie(m,n),o(")"))}function Ya(t){let n=t.length;for(;n--&&t[n]==null;);return t.slice(0,n+1).map(o=>o||"null")}function Xa(t,n){const{push:o,helper:s,pure:r}=n,l=ne(t.callee)?t.callee:s(t.callee);r&&o(Ht),o(l+"(",-2,t),ft(t.arguments,n),o(")")}function Qa(t,n){const{push:o,indent:s,deindent:r,newline:l}=n,{properties:i}=t;if(!i.length){o("{}",-2,t);return}const a=i.length>1||process.env.NODE_ENV!=="production"&&i.some(c=>c.value.type!==4);o(a?"{":"{ "),a&&s();for(let c=0;c<i.length;c++){const{key:p,value:m}=i[c];Ga(p,n),o(": "),ie(m,n),c<i.length-1&&(o(","),l())}a&&r(),o(a?"}":" }")}function Va(t,n){jn(t.elements,n)}function ec(t,n){const{push:o,indent:s,deindent:r}=n,{params:l,returns:i,body:a,newline:c,isSlot:p}=t;p&&o(`_${Je[Tn]}(`),o("(",-2,t),we(l)?ft(l,n):l&&ie(l,n),o(") => "),(c||a)&&(o("{"),s()),i?(c&&o("return "),we(i)?jn(i,n):ie(i,n)):a&&ie(a,n),(c||a)&&(r(),o("}")),p&&(t.isNonScopedSlot&&o(", undefined, true"),o(")"))}function tc(t,n){const{test:o,consequent:s,alternate:r,newline:l}=t,{push:i,indent:a,deindent:c,newline:p}=n;if(o.type===4){const f=!In(o.content);f&&i("("),Yo(o,n),f&&i(")")}else i("("),ie(o,n),i(")");l&&a(),n.indentLevel++,l||i(" "),i("? "),ie(s,n),n.indentLevel--,l&&p(),l||i(" "),i(": ");const m=r.type===19;m||n.indentLevel++,ie(r,n),m||n.indentLevel--,l&&c(!0)}function nc(t,n){const{push:o,helper:s,indent:r,deindent:l,newline:i}=n,{needPauseTracking:a,needArraySpread:c}=t;c&&o("[...("),o(`_cache[${t.index}] || (`),a&&(r(),o(`${s(Dt)}(-1`),t.inVOnce&&o(", true"),o("),"),i(),o("(")),o(`_cache[${t.index}] = `),ie(t.value,n),a&&(o(`).cacheIndex = ${t.index},`),i(),o(`${s(Dt)}(1),`),i(),o(`_cache[${t.index}]`),l()),o(")"),c&&o(")]")}const oc=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"),sc=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function He(t,n,o=!1,s=!1){const r=t.content;if(r.trim())try{new Function(s?` ${r} `:`return ${o?`(${r}) => {}`:`(${r})`}`)}catch(l){let i=l.message;const a=r.replace(sc,"").match(oc);a&&(i=`avoid using JavaScript keyword as property name: "${a[0]}"`),n.onError(W(45,t.loc,void 0,i))}}const rc=(t,n)=>{if(t.type===5)t.content=Hn(t.content,n);else if(t.type===1){const o=de(t,"memo");for(let s=0;s<t.props.length;s++){const r=t.props[s];if(r.type===7&&r.name!=="for"){const l=r.exp,i=r.arg;l&&l.type===4&&!(r.name==="on"&&i)&&!(o&&i&&i.type===4&&i.content==="key")&&(r.exp=Hn(l,n,r.name==="slot")),i&&i.type===4&&!i.isStatic&&(r.arg=Hn(i,n))}}}};function Hn(t,n,o=!1,s=!1,r=Object.create(n.identifiers)){return process.env.NODE_ENV!=="production"&&He(t,n,o,s),t}const ic=Jo(/^(if|else|else-if)$/,(t,n,o)=>lc(t,n,o,(s,r,l)=>{const i=o.parent.children;let a=i.indexOf(s),c=0;for(;a-->=0;){const p=i[a];p&&p.type===9&&(c+=p.branches.length)}return()=>{if(l)s.codegenNode=Vo(r,c,o);else{const p=cc(s.codegenNode);p.alternate=Vo(r,c+s.branches.length-1,o)}}}));function lc(t,n,o,s){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const r=n.exp?n.exp.loc:t.loc;o.onError(W(28,n.loc)),n.exp=j("true",!1,r)}if(process.env.NODE_ENV!=="production"&&n.exp&&He(n.exp,o),n.name==="if"){const r=Qo(t,n),l={type:9,loc:$a(t.loc),branches:[r]};if(o.replaceNode(l),s)return s(l,r,!0)}else{const r=o.parent.children,l=[];let i=r.indexOf(t);for(;i-->=-1;){const a=r[i];if(a&&a.type===3){o.removeNode(a),process.env.NODE_ENV!=="production"&&l.unshift(a);continue}if(a&&a.type===2&&!a.content.trim().length){o.removeNode(a);continue}if(a&&a.type===9){n.name==="else-if"&&a.branches[a.branches.length-1].condition===void 0&&o.onError(W(30,t.loc)),o.removeNode();const c=Qo(t,n);if(process.env.NODE_ENV!=="production"&&l.length&&!(o.parent&&o.parent.type===1&&(o.parent.tag==="transition"||o.parent.tag==="Transition"))&&(c.children=[...l,...c.children]),process.env.NODE_ENV!=="production"){const m=c.userKey;m&&a.branches.forEach(({userKey:f})=>{ac(f,m)&&o.onError(W(29,c.userKey.loc))})}a.branches.push(c);const p=s&&s(a,c,!1);jt(c,o),p&&p(),o.currentNode=null}else o.onError(W(30,t.loc));break}}}function Qo(t,n){const o=t.tagType===3;return{type:10,loc:t.loc,condition:n.name==="else"?void 0:n.exp,children:o&&!de(t,"for")?t.children:[t],userKey:ct(t,"key"),isTemplateIf:o}}function Vo(t,n,o){return t.condition?Dn(t.condition,es(t,n,o),te(o.helper(rt),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):es(t,n,o)}function es(t,n,o){const{helper:s}=o,r=X("key",j(`${n}`,!1,me,2)),{children:l}=t,i=l[0];if(l.length!==1||i.type!==1)if(l.length===1&&i.type===11){const c=i.codegenNode;return Mt(c,r,o),c}else{let c=64;return process.env.NODE_ENV!=="production"&&!t.isTemplateIf&&l.filter(p=>p.type!==3).length===1&&(c|=2048),at(o,s(ot),ge([r]),l,c,void 0,void 0,!0,!1,!1,t.loc)}else{const c=i.codegenNode,p=ba(c);return p.type===13&&Ln(p,o),Mt(p,r,o),c}}function ac(t,n){if(!t||t.type!==n.type)return!1;if(t.type===6){if(t.value.content!==n.value.content)return!1}else{const o=t.exp,s=n.exp;if(o.type!==s.type||o.type!==4||o.isStatic!==s.isStatic||o.content!==s.content)return!1}return!0}function cc(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const dc=(t,n,o)=>{const{modifiers:s,loc:r}=t,l=t.arg;let{exp:i}=t;if(i&&i.type===4&&!i.content.trim()&&(i=void 0),!i){if(l.type!==4||!l.isStatic)return o.onError(W(52,l.loc)),{props:[X(l,j("",!0,r))]};ts(t),i=t.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),s.some(a=>a.content==="camel")&&(l.type===4?l.isStatic?l.content=De(l.content):l.content=`${o.helperString(Sn)}(${l.content})`:(l.children.unshift(`${o.helperString(Sn)}(`),l.children.push(")"))),o.inSSR||(s.some(a=>a.content==="prop")&&ns(l,"."),s.some(a=>a.content==="attr")&&ns(l,"^")),{props:[X(l,i)]}},ts=(t,n)=>{const o=t.arg,s=De(o.content);t.exp=j(s,!1,o.loc)},ns=(t,n)=>{t.type===4?t.isStatic?t.content=n+t.content:t.content=`\`${n}\${${t.content}}\``:(t.children.unshift(`'${n}' + (`),t.children.push(")"))},pc=Jo("for",(t,n,o)=>{const{helper:s,removeHelper:r}=o;return fc(t,n,o,l=>{const i=te(s(Nn),[l.source]),a=At(t),c=de(t,"memo"),p=ct(t,"key",!1,!0);p&&p.type===7&&!p.exp&&ts(p);let f=p&&(p.type===6?p.value?j(p.value.content,!0):void 0:p.exp);const u=p&&f?X("key",f):null,k=l.source.type===4&&l.source.constType>0,_=k?64:p?128:256;return l.codegenNode=at(o,s(ot),void 0,i,_,void 0,void 0,!0,!k,!1,t.loc),()=>{let x;const{children:w}=l;process.env.NODE_ENV!=="production"&&a&&t.children.some(T=>{if(T.type===1){const D=ct(T,"key");if(D)return o.onError(W(33,D.loc)),!0}});const C=w.length!==1||w[0].type!==1,R=It(t)?t:a&&t.children.length===1&&It(t.children[0])?t.children[0]:null;if(R?(x=R.codegenNode,a&&u&&Mt(x,u,o)):C?x=at(o,s(ot),u?ge([u]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(x=w[0].codegenNode,a&&u&&Mt(x,u,o),x.isBlock!==!k&&(x.isBlock?(r(Pe),r(Xe(o.inSSR,x.isComponent))):r(Ye(o.inSSR,x.isComponent))),x.isBlock=!k,x.isBlock?(s(Pe),s(Xe(o.inSSR,x.isComponent))):s(Ye(o.inSSR,x.isComponent))),c){const T=Ze(Un(l.parseResult,[j("_cached")]));T.body=ia([ye(["const _memo = (",c.exp,")"]),ye(["if (_cached",...f?[" && _cached.key === ",f]:[],` && ${o.helperString(_o)}(_cached, _memo)) return _cached`]),ye(["const _item = ",x]),j("_item.memo = _memo"),j("return _item")]),i.arguments.push(T,j("_cache"),j(String(o.cached.length))),o.cached.push(null)}else i.arguments.push(Ze(Un(l.parseResult),x,!0))}})});function fc(t,n,o,s){if(!n.exp){o.onError(W(31,n.loc));return}const r=n.forParseResult;if(!r){o.onError(W(32,n.loc));return}os(r,o);const{addIdentifiers:l,removeIdentifiers:i,scopes:a}=o,{source:c,value:p,key:m,index:f}=r,u={type:11,loc:n.loc,source:c,valueAlias:p,keyAlias:m,objectIndexAlias:f,parseResult:r,children:At(t)?t.children:[t]};o.replaceNode(u),a.vFor++;const k=s&&s(u);return()=>{a.vFor--,k&&k()}}function os(t,n){t.finalized||(process.env.NODE_ENV!=="production"&&(He(t.source,n),t.key&&He(t.key,n,!0),t.index&&He(t.index,n,!0),t.value&&He(t.value,n,!0)),t.finalized=!0)}function Un({value:t,key:n,index:o},s=[]){return mc([t,n,o,...s])}function mc(t){let n=t.length;for(;n--&&!t[n];);return t.slice(0,n+1).map((o,s)=>o||j("_".repeat(s+1),!1))}const ss=j("undefined",!1),uc=(t,n)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const o=de(t,"slot");if(o)return o.exp,n.scopes.vSlot++,()=>{n.scopes.vSlot--}}},hc=(t,n,o,s)=>Ze(t,o,!1,!0,o.length?o[0].loc:s);function gc(t,n,o=hc){n.helper(Tn);const{children:s,loc:r}=t,l=[],i=[];let a=n.scopes.vSlot>0||n.scopes.vFor>0;const c=de(t,"slot",!0);if(c){const{arg:w,exp:C}=c;w&&!ce(w)&&(a=!0),l.push(X(w||j("default",!0),o(C,void 0,s,r)))}let p=!1,m=!1;const f=[],u=new Set;let k=0;for(let w=0;w<s.length;w++){const C=s[w];let R;if(!At(C)||!(R=de(C,"slot",!0))){C.type!==3&&f.push(C);continue}if(c){n.onError(W(37,R.loc));break}p=!0;const{children:T,loc:D}=C,{arg:B=j("default",!0),exp:H,loc:K}=R;let M;ce(B)?M=B?B.content:"default":a=!0;const I=de(C,"for"),F=o(H,I,T,D);let z,E;if(z=de(C,"if"))a=!0,i.push(Dn(z.exp,Ut(B,F,k++),ss));else if(E=de(C,/^else(-if)?$/,!0)){let $=w,N;for(;$--&&(N=s[$],!(N.type!==3&&qn(N))););if(N&&At(N)&&de(N,/^(else-)?if$/)){let L=i[i.length-1];for(;L.alternate.type===19;)L=L.alternate;L.alternate=E.exp?Dn(E.exp,Ut(B,F,k++),ss):Ut(B,F,k++)}else n.onError(W(30,E.loc))}else if(I){a=!0;const $=I.forParseResult;$?(os($,n),i.push(te(n.helper(Nn),[$.source,Ze(Un($),Ut(B,F),!0)]))):n.onError(W(32,I.loc))}else{if(M){if(u.has(M)){n.onError(W(38,K));continue}u.add(M),M==="default"&&(m=!0)}l.push(X(B,F))}}if(!c){const w=(C,R)=>{const T=o(C,void 0,R,r);return n.compatConfig&&(T.isNonScopedSlot=!0),X("default",T)};p?f.length&&f.some(C=>qn(C))&&(m?n.onError(W(39,f[0].loc)):l.push(w(void 0,f))):l.push(w(void 0,s))}const _=a?2:qt(t.children)?3:1;let x=ge(l.concat(X("_",j(_+(process.env.NODE_ENV!=="production"?` /* ${Fl[_]} */`:""),!1))),r);return i.length&&(x=te(n.helper(xo),[x,Fe(i)])),{slots:x,hasDynamicSlots:a}}function Ut(t,n,o){const s=[X("name",t),X("fn",n)];return o!=null&&s.push(X("key",j(String(o),!0))),ge(s)}function qt(t){for(let n=0;n<t.length;n++){const o=t[n];switch(o.type){case 1:if(o.tagType===2||qt(o.children))return!0;break;case 9:if(qt(o.branches))return!0;break;case 10:case 11:if(qt(o.children))return!0;break}}return!1}function qn(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():qn(t.content)}const rs=new WeakMap,yc=(t,n)=>function(){if(t=n.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:s,props:r}=t,l=t.tagType===1;let i=l?vc(t,n):`"${s}"`;const a=Il(i)&&i.callee===bn;let c,p,m=0,f,u,k,_=a||i===st||i===un||!l&&(s==="svg"||s==="foreignObject"||s==="math");if(r.length>0){const x=is(t,n,void 0,l,a);c=x.props,m=x.patchFlag,u=x.dynamicPropNames;const w=x.directives;k=w&&w.length?Fe(w.map(C=>kc(C,n))):void 0,x.shouldUseBlock&&(_=!0)}if(t.children.length>0)if(i===Bt&&(_=!0,m|=1024,process.env.NODE_ENV!=="production"&&t.children.length>1&&n.onError(W(46,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}))),l&&i!==st&&i!==Bt){const{slots:w,hasDynamicSlots:C}=gc(t,n);p=w,C&&(m|=1024)}else if(t.children.length===1&&i!==st){const w=t.children[0],C=w.type,R=C===5||C===8;R&&he(w,n)===0&&(m|=1),R||C===2?p=w:p=t.children}else p=t.children;u&&u.length&&(f=Ec(u)),t.codegenNode=at(n,i,c,p,m===0?void 0:m,f,k,!!_,!1,l,t.loc)};function vc(t,n,o=!1){let{tag:s}=t;const r=Wn(s),l=ct(t,"is",!1,!0);if(l)if(r||Oe("COMPILER_IS_ON_ELEMENT",n)){let a;if(l.type===6?a=l.value&&j(l.value.content,!0):(a=l.exp,a||(a=j("is",!1,l.arg.loc))),a)return te(n.helper(bn),[a])}else l.type===6&&l.value.content.startsWith("vue:")&&(s=l.value.content.slice(4));const i=$o(s)||n.isBuiltInComponent(s);return i?(o||n.helper(i),i):(n.helper(vn),n.components.add(s),dt(s,"component"))}function is(t,n,o=t.props,s,r,l=!1){const{tag:i,loc:a,children:c}=t;let p=[];const m=[],f=[],u=c.length>0;let k=!1,_=0,x=!1,w=!1,C=!1,R=!1,T=!1,D=!1;const B=[],H=F=>{p.length&&(m.push(ge(ls(p),a)),p=[]),F&&m.push(F)},K=()=>{n.scopes.vFor>0&&p.push(X(j("ref_for",!0),j("true")))},M=({key:F,value:z})=>{if(ce(F)){const E=F.content,$=dn(E);if($&&(!s||r)&&E.toLowerCase()!=="onclick"&&E!=="onUpdate:modelValue"&&!vo(E)&&(R=!0),$&&vo(E)&&(D=!0),$&&z.type===14&&(z=z.arguments[0]),z.type===20||(z.type===4||z.type===8)&&he(z,n)>0)return;E==="ref"?x=!0:E==="class"?w=!0:E==="style"?C=!0:E!=="key"&&!B.includes(E)&&B.push(E),s&&(E==="class"||E==="style")&&!B.includes(E)&&B.push(E)}else T=!0};for(let F=0;F<o.length;F++){const z=o[F];if(z.type===6){const{loc:E,name:$,nameLoc:N,value:L}=z;let J=!0;if($==="ref"&&(x=!0,K()),$==="is"&&(Wn(i)||L&&L.content.startsWith("vue:")||Oe("COMPILER_IS_ON_ELEMENT",n)))continue;p.push(X(j($,!0,N),j(L?L.content:"",J,L?L.loc:E)))}else{const{name:E,arg:$,exp:N,loc:L,modifiers:J}=z,ae=E==="bind",Me=E==="on";if(E==="slot"){s||n.onError(W(40,L));continue}if(E==="once"||E==="memo"||E==="is"||ae&&Ae($,"is")&&(Wn(i)||Oe("COMPILER_IS_ON_ELEMENT",n))||Me&&l)continue;if((ae&&Ae($,"key")||Me&&u&&Ae($,"vue:before-update"))&&(k=!0),ae&&Ae($,"ref")&&K(),!$&&(ae||Me)){if(T=!0,N)if(ae){if(H(),process.env.NODE_ENV!=="production"&&m.some(Ne=>Ne.type===15?Ne.properties.some(({key:xe})=>xe.type!==4||!xe.isStatic?!0:xe.content!=="class"&&xe.content!=="style"&&!dn(xe.content)):!0)&&Qe("COMPILER_V_BIND_OBJECT_ORDER",n,L),Oe("COMPILER_V_BIND_OBJECT_ORDER",n)){m.unshift(N);continue}K(),H(),m.push(N)}else H({type:14,loc:L,callee:n.helper(Cn),arguments:s?[N]:[N,"true"]});else n.onError(W(ae?34:35,L));continue}ae&&J.some(be=>be.content==="prop")&&(_|=32);const Be=n.directiveTransforms[E];if(Be){const{props:be,needRuntime:Ne}=Be(z,t,n);!l&&be.forEach(M),Me&&$&&!ce($)?H(ge(be,a)):p.push(...be),Ne&&(f.push(z),pn(Ne)&&rs.set(z,Ne))}else Ml(E)||(f.push(z),u&&(k=!0))}}let I;if(m.length?(H(),m.length>1?I=te(n.helper($t),m,a):I=m[0]):p.length&&(I=ge(ls(p),a)),T?_|=16:(w&&!s&&(_|=2),C&&!s&&(_|=4),B.length&&(_|=8),R&&(_|=32)),!k&&(_===0||_===32)&&(x||D||f.length>0)&&(_|=512),!n.inSSR&&I)switch(I.type){case 15:let F=-1,z=-1,E=!1;for(let L=0;L<I.properties.length;L++){const J=I.properties[L].key;ce(J)?J.content==="class"?F=L:J.content==="style"&&(z=L):J.isHandlerKey||(E=!0)}const $=I.properties[F],N=I.properties[z];E?I=te(n.helper(it),[I]):($&&!ce($.value)&&($.value=te(n.helper(xn),[$.value])),N&&(C||N.value.type===4&&N.value.content.trim()[0]==="["||N.value.type===17)&&(N.value=te(n.helper(_n),[N.value])));break;case 14:break;default:I=te(n.helper(it),[te(n.helper(lt),[I])]);break}return{props:I,directives:f,patchFlag:_,dynamicPropNames:B,shouldUseBlock:k}}function ls(t){const n=new Map,o=[];for(let s=0;s<t.length;s++){const r=t[s];if(r.key.type===8||!r.key.isStatic){o.push(r);continue}const l=r.key.content,i=n.get(l);i?(l==="style"||l==="class"||dn(l))&&bc(i,r):(n.set(l,r),o.push(r))}return o}function bc(t,n){t.value.type===17?t.value.elements.push(n.value):t.value=Fe([t.value,n.value],t.loc)}function kc(t,n){const o=[],s=rs.get(t);s?o.push(n.helperString(s)):(n.helper(kn),n.directives.add(t.name),o.push(dt(t.name,"directive")));const{loc:r}=t;if(t.exp&&o.push(t.exp),t.arg&&(t.exp||o.push("void 0"),o.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||o.push("void 0"),o.push("void 0"));const l=j("true",!1,r);o.push(ge(t.modifiers.map(i=>X(i,l)),r))}return Fe(o,t.loc)}function Ec(t){let n="[";for(let o=0,s=t.length;o<s;o++)n+=JSON.stringify(t[o]),o<s-1&&(n+=", ");return n+"]"}function Wn(t){return t==="component"||t==="Component"}const wc=(t,n)=>{if(It(t)){const{children:o,loc:s}=t,{slotName:r,slotProps:l}=Nc(t,n),i=[n.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let a=2;l&&(i[2]=l,a=3),o.length&&(i[3]=Ze([],o,!1,!1,s),a=4),n.scopeId&&!n.slotted&&(a=5),i.splice(a),t.codegenNode=te(n.helper(No),i,s)}};function Nc(t,n){let o='"default"',s;const r=[];for(let l=0;l<t.props.length;l++){const i=t.props[l];if(i.type===6)i.value&&(i.name==="name"?o=JSON.stringify(i.value.content):(i.name=De(i.name),r.push(i)));else if(i.name==="bind"&&Ae(i.arg,"name")){if(i.exp)o=i.exp;else if(i.arg&&i.arg.type===4){const a=De(i.arg.content);o=i.exp=j(a,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&ce(i.arg)&&(i.arg.content=De(i.arg.content)),r.push(i)}if(r.length>0){const{props:l,directives:i}=is(t,n,r,!1,!1);s=l,i.length&&n.onError(W(36,i[0].loc))}return{slotName:o,slotProps:s}}const as=(t,n,o,s)=>{const{loc:r,modifiers:l,arg:i}=t;!t.exp&&!l.length&&o.onError(W(35,r));let a;if(i.type===4)if(i.isStatic){let f=i.content;process.env.NODE_ENV!=="production"&&f.startsWith("vnode")&&o.onError(W(51,i.loc)),f.startsWith("vue:")&&(f=`vnode-${f.slice(4)}`);const u=n.tagType!==0||f.startsWith("vnode")||!/[A-Z]/.test(f)?Pl(De(f)):`on:${f}`;a=j(u,!0,i.loc)}else a=ye([`${o.helperString(Bn)}(`,i,")"]);else a=i,a.children.unshift(`${o.helperString(Bn)}(`),a.children.push(")");let c=t.exp;c&&!c.content.trim()&&(c=void 0);let p=o.cacheHandlers&&!c&&!o.inVOnce;if(c){const f=Lo(c),u=!(f||ha(c)),k=c.content.includes(";");process.env.NODE_ENV!=="production"&&He(c,o,!1,k),(u||p&&f)&&(c=ye([`${u?"$event":"(...args)"} => ${k?"{":"("}`,c,k?"}":")"]))}let m={props:[X(a,c||j("() => {}",!1,r))]};return s&&(m=s(m)),p&&(m.props[0].value=o.cache(m.props[0].value)),m.props.forEach(f=>f.key.isHandlerKey=!0),m},xc=(t,n)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const o=t.children;let s,r=!1;for(let l=0;l<o.length;l++){const i=o[l];if(Mn(i)){r=!0;for(let a=l+1;a<o.length;a++){const c=o[a];if(Mn(c))s||(s=o[l]=ye([i],i.loc)),s.children.push(" + ",c),o.splice(a,1),a--;else{s=void 0;break}}}}if(!(!r||o.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(l=>l.type===7&&!n.directiveTransforms[l.name])&&t.tag!=="template")))for(let l=0;l<o.length;l++){const i=o[l];if(Mn(i)||i.type===8){const a=[];(i.type!==2||i.content!==" ")&&a.push(i),!n.ssr&&he(i,n)===0&&a.push(1+(process.env.NODE_ENV!=="production"?` /* ${nt[1]} */`:"")),o[l]={type:12,content:i,loc:i.loc,codegenNode:te(n.helper(yn),a)}}}}},cs=new WeakSet,_c=(t,n)=>{if(t.type===1&&de(t,"once",!0))return cs.has(t)||n.inVOnce||n.inSSR?void 0:(cs.add(t),n.inVOnce=!0,n.helper(Dt),()=>{n.inVOnce=!1;const o=n.currentNode;o.codegenNode&&(o.codegenNode=n.cache(o.codegenNode,!0,!0))})},ds=(t,n,o)=>{const{exp:s,arg:r}=t;if(!s)return o.onError(W(41,t.loc)),Wt();const l=s.loc.source.trim(),i=s.type===4?s.content:l,a=o.bindingMetadata[l];if(a==="props"||a==="props-aliased")return o.onError(W(44,s.loc)),Wt();if(!i.trim()||!Lo(s))return o.onError(W(42,s.loc)),Wt();const c=r||j("modelValue",!0),p=r?ce(r)?`onUpdate:${De(r.content)}`:ye(['"onUpdate:" + ',r]):"onUpdate:modelValue";let m;const f=o.isTS?"($event: any)":"$event";m=ye([`${f} => ((`,s,") = $event)"]);const u=[X(c,t.exp),X(p,m)];if(t.modifiers.length&&n.tagType===1){const k=t.modifiers.map(x=>x.content).map(x=>(In(x)?x:JSON.stringify(x))+": true").join(", "),_=r?ce(r)?`${r.content}Modifiers`:ye([r,' + "Modifiers"']):"modelModifiers";u.push(X(_,j(`{ ${k} }`,!1,t.loc,2)))}return Wt(u)};function Wt(t=[]){return{props:t}}const Cc=/[\w).+\-_$\]]/,Sc=(t,n)=>{Oe("COMPILER_FILTERS",n)&&(t.type===5?Kt(t.content,n):t.type===1&&t.props.forEach(o=>{o.type===7&&o.name!=="for"&&o.exp&&Kt(o.exp,n)}))};function Kt(t,n){if(t.type===4)ps(t,n);else for(let o=0;o<t.children.length;o++){const s=t.children[o];typeof s=="object"&&(s.type===4?ps(s,n):s.type===8?Kt(t,n):s.type===5&&Kt(s.content,n))}}function ps(t,n){const o=t.content;let s=!1,r=!1,l=!1,i=!1,a=0,c=0,p=0,m=0,f,u,k,_,x=[];for(k=0;k<o.length;k++)if(u=f,f=o.charCodeAt(k),s)f===39&&u!==92&&(s=!1);else if(r)f===34&&u!==92&&(r=!1);else if(l)f===96&&u!==92&&(l=!1);else if(i)f===47&&u!==92&&(i=!1);else if(f===124&&o.charCodeAt(k+1)!==124&&o.charCodeAt(k-1)!==124&&!a&&!c&&!p)_===void 0?(m=k+1,_=o.slice(0,k).trim()):w();else{switch(f){case 34:r=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:p++;break;case 41:p--;break;case 91:c++;break;case 93:c--;break;case 123:a++;break;case 125:a--;break}if(f===47){let C=k-1,R;for(;C>=0&&(R=o.charAt(C),R===" ");C--);(!R||!Cc.test(R))&&(i=!0)}}_===void 0?_=o.slice(0,k).trim():m!==0&&w();function w(){x.push(o.slice(m,k).trim()),m=k+1}if(x.length){for(process.env.NODE_ENV!=="production"&&Ot("COMPILER_FILTERS",n,t.loc),k=0;k<x.length;k++)_=Bc(_,x[k],n);t.content=_,t.ast=void 0}}function Bc(t,n,o){o.helper(En);const s=n.indexOf("(");if(s<0)return o.filters.add(n),`${dt(n,"filter")}(${t})`;{const r=n.slice(0,s),l=n.slice(s+1);return o.filters.add(r),`${dt(r,"filter")}(${t}${l!==")"?","+l:l}`}}const fs=new WeakSet,Tc=(t,n)=>{if(t.type===1){const o=de(t,"memo");return!o||fs.has(t)?void 0:(fs.add(t),()=>{const s=t.codegenNode||n.currentNode.codegenNode;s&&s.type===13&&(t.tagType!==1&&Ln(s,n),t.codegenNode=te(n.helper($n),[o.exp,Ze(void 0,s),"_cache",String(n.cached.length)]),n.cached.push(null))})}};function $c(t){return[[_c,ic,Tc,pc,Sc,...process.env.NODE_ENV!=="production"?[rc]:[],wc,yc,uc,xc],{on:as,bind:dc,model:ds}]}function Dc(t,n={}){const o=n.onError||An,s=n.mode==="module";n.prefixIdentifiers===!0?o(W(47)):s&&o(W(48));const r=!1;n.cacheHandlers&&o(W(49)),n.scopeId&&!s&&o(W(50));const l=$e({},n,{prefixIdentifiers:r}),i=ne(t)?Oa(t,l):t,[a,c]=$c();return Ra(i,$e({},l,{nodeTransforms:[...a,...n.nodeTransforms||[]],directiveTransforms:$e({},c,n.directiveTransforms||{})})),ja(i,l)}const Lc=()=>({props:[]});/**
|
|
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:""},ae=t=>t.type===4&&t.isStatic;function $o(t){switch(t){case"Teleport":case"teleport":return ot;case"Suspense":case"suspense":return un;case"KeepAlive":case"keep-alive":return Bt;case"BaseTransition":case"base-transition":return bo}}const da=/^$|^\d|[^\$\w\xA0-\uFFFF]/,In=t=>!da.test(t),pa=/[A-Za-z_$\xA0-\uFFFF]/,fa=/[\.\?\w$\xA0-\uFFFF]/,ma=/\s+[.[]\s*|\s*[.[]\s+/g,Do=t=>t.type===4?t.content:t.loc.source,Lo=t=>{const n=Do(t).trim().replace(ma,a=>a.trim());let o=0,s=[],r=0,l=0,i=null;for(let a=0;a<n.length;a++){const c=n.charAt(a);switch(o){case 0:if(c==="[")s.push(o),o=1,r++;else if(c==="(")s.push(o),o=2,l++;else if(!(a===0?pa:fa).test(c))return!1;break;case 1:c==="'"||c==='"'||c==="`"?(s.push(o),o=3,i=c):c==="["?r++:c==="]"&&(--r||(o=s.pop()));break;case 2:if(c==="'"||c==='"'||c==="`")s.push(o),o=3,i=c;else if(c==="(")l++;else if(c===")"){if(a===n.length-1)return!1;--l||(o=s.pop())}break;case 3:c===i&&(o=s.pop(),i=null);break}}return!r&&!l},ua=/^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ha=t=>ua.test(Do(t));function Oo(t,n){if(!t)throw new Error(n||"unexpected compiler condition")}function ce(t,n,o=!1){for(let s=0;s<t.props.length;s++){const r=t.props[s];if(r.type===7&&(o||r.exp)&&(te(n)?r.name===n:n.test(r.name)))return r}}function at(t,n,o=!1,s=!1){for(let r=0;r<t.props.length;r++){const l=t.props[r];if(l.type===6){if(o)continue;if(l.name===n&&(l.value||s))return l}else if(l.name==="bind"&&(l.exp||s)&&Oe(l.arg,n))return l}}function Oe(t,n){return!!(t&&ae(t)&&t.content===n)}function ga(t){return t.props.some(n=>n.type===7&&n.name==="bind"&&(!n.arg||n.arg.type!==4||!n.arg.isStatic))}function Mn(t){return t.type===5||t.type===2}function Ao(t){return t.type===7&&t.name==="pre"}function ya(t){return t.type===7&&t.name==="slot"}function At(t){return t.type===1&&t.tagType===3}function It(t){return t.type===1&&t.tagType===2}const va=new Set([rt,it]);function Io(t,n=[]){if(t&&!te(t)&&t.type===14){const o=t.callee;if(!te(o)&&va.has(o))return Io(t.arguments[0],n.concat(t))}return[t,n]}function Mt(t,n,o){let s,r=t.type===13?t.props:t.arguments[2],l=[],i;if(r&&!te(r)&&r.type===14){const a=Io(r);r=a[0],l=a[1],i=l[l.length-1]}if(r==null||te(r))s=ye([n]);else if(r.type===14){const a=r.arguments[0];!te(a)&&a.type===15?Mo(n,a)||a.properties.unshift(n):r.callee===Cn?s=ee(o.helper($t),[ye([n]),r]):r.arguments.unshift(ye([n])),!s&&(s=r)}else r.type===15?(Mo(n,r)||r.properties.unshift(n),s=r):(s=ee(o.helper($t),[ye([n]),r]),i&&i.callee===it&&(i=l[l.length-2]));t.type===13?i?i.arguments[0]=s:t.props=s:i?i.arguments[0]=s:t.arguments[2]=s}function Mo(t,n){let o=!1;if(t.key.type===4){const s=t.key.content;o=n.properties.some(r=>r.key.type===4&&r.key.content===s)}return o}function ct(t,n){return`_${n}_${t.replace(/[^\w]/g,(o,s)=>o==="-"?"_":t.charCodeAt(s).toString())}`}function ba(t){return t.type===14&&t.callee===$n?t.arguments[1].returns:t}const ka=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Ro={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:St,isPreTag:St,isIgnoreNewlineTag:St,isCustomElement:St,onError:An,onWarn:To,comments:process.env.NODE_ENV!=="production",prefixIdentifiers:!1};let q=Ro,dt=null,_e="",se=null,U=null,de="",Ce=-1,Fe=-1,Rn=0,Ae=!1,Pn=null;const Z=[],G=new la(Z,{onerr:pe,ontext(t,n){Rt(oe(t,n),t,n)},ontextentity(t,n,o){Rt(t,n,o)},oninterpolation(t,n){if(Ae)return Rt(oe(t,n),t,n);let o=t+G.delimiterOpen.length,s=n-G.delimiterClose.length;for(;me(_e.charCodeAt(o));)o++;for(;me(_e.charCodeAt(s-1));)s--;let r=oe(o,s);r.includes("&")&&(r=q.decodeEntities(r,!1)),Fn({type:5,content:Ft(r,!1,Q(o,s)),loc:Q(t,n)})},onopentagname(t,n){const o=oe(t,n);se={type:1,tag:o,ns:q.getNamespace(o,Z[0],q.ns),tagType:0,props:[],children:[],loc:Q(t-1,n),codegenNode:void 0}},onopentagend(t){Fo(t)},onclosetag(t,n){const o=oe(t,n);if(!q.isVoidTag(o)){let s=!1;for(let r=0;r<Z.length;r++)if(Z[r].tag.toLowerCase()===o.toLowerCase()){s=!0,r>0&&pe(24,Z[0].loc.start.offset);for(let i=0;i<=r;i++){const a=Z.shift();Pt(a,n,i<r)}break}s||pe(23,zo(t,60))}},onselfclosingtag(t){const n=se.tag;se.isSelfClosing=!0,Fo(t),Z[0]&&Z[0].tag===n&&Pt(Z.shift(),t)},onattribname(t,n){U={type:6,name:oe(t,n),nameLoc:Q(t,n),value:void 0,loc:Q(t)}},ondirname(t,n){const o=oe(t,n),s=o==="."||o===":"?"bind":o==="@"?"on":o==="#"?"slot":o.slice(2);if(!Ae&&s===""&&pe(26,t),Ae||s==="")U={type:6,name:o,nameLoc:Q(t,n),value:void 0,loc:Q(t)};else if(U={type:7,name:s,rawName:o,exp:void 0,arg:void 0,modifiers:o==="."?[j("prop")]:[],loc:Q(t)},s==="pre"){Ae=G.inVPre=!0,Pn=se;const r=se.props;for(let l=0;l<r.length;l++)r[l].type===7&&(r[l]=Da(r[l]))}},ondirarg(t,n){if(t===n)return;const o=oe(t,n);if(Ae&&!Ao(U))U.name+=o,ze(U.nameLoc,n);else{const s=o[0]!=="[";U.arg=Ft(s?o:o.slice(1,-1),s,Q(t,n),s?3:0)}},ondirmodifier(t,n){const o=oe(t,n);if(Ae&&!Ao(U))U.name+="."+o,ze(U.nameLoc,n);else if(U.name==="slot"){const s=U.arg;s&&(s.content+="."+o,ze(s.loc,n))}else{const s=j(o,!0,Q(t,n));U.modifiers.push(s)}},onattribdata(t,n){de+=oe(t,n),Ce<0&&(Ce=t),Fe=n},onattribentity(t,n,o){de+=t,Ce<0&&(Ce=n),Fe=o},onattribnameend(t){const n=U.loc.start.offset,o=oe(n,t);U.type===7&&(U.rawName=o),se.props.some(s=>(s.type===7?s.rawName:s.name)===o)&&pe(2,n)},onattribend(t,n){if(se&&U){if(ze(U.loc,n),t!==0)if(de.includes("&")&&(de=q.decodeEntities(de,!0)),U.type===6)U.name==="class"&&(de=Uo(de).trim()),t===1&&!de&&pe(13,n),U.value={type:2,content:de,loc:t===1?Q(Ce,Fe):Q(Ce-1,Fe+1)},G.inSFCRoot&&se.tag==="template"&&U.name==="lang"&&de&&de!=="html"&&G.enterRCDATA(Lt("</template"),0);else{let o=0;U.exp=Ft(de,!1,Q(Ce,Fe),0,o),U.name==="for"&&(U.forParseResult=wa(U.exp));let s=-1;U.name==="bind"&&(s=U.modifiers.findIndex(r=>r.content==="sync"))>-1&&Xe("COMPILER_V_BIND_SYNC",q,U.loc,U.arg.loc.source)&&(U.name="model",U.modifiers.splice(s,1))}(U.type!==7||U.name!=="pre")&&se.props.push(U)}de="",Ce=Fe=-1},oncomment(t,n){q.comments&&Fn({type:3,content:oe(t,n),loc:Q(t-4,n+3)})},onend(){const t=_e.length;if(process.env.NODE_ENV!=="production"&&G.state!==1)switch(G.state){case 5:case 8:pe(5,t);break;case 3:case 4:pe(25,G.sectionStart);break;case 28:G.currentSequence===ne.CdataEnd?pe(6,t):pe(7,t);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:pe(9,t);break}for(let n=0;n<Z.length;n++)Pt(Z[n],t-1),pe(24,Z[n].loc.start.offset)},oncdata(t,n){Z[0].ns!==0?Rt(oe(t,n),t,n):pe(1,t-9)},onprocessinginstruction(t){(Z[0]?Z[0].ns:q.ns)===0&&pe(21,t-1)}}),Po=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Ea=/^\(|\)$/g;function wa(t){const n=t.loc,o=t.content,s=o.match(ka);if(!s)return;const[,r,l]=s,i=(f,h,k=!1)=>{const _=n.start.offset+h,x=_+f.length;return Ft(f,!1,Q(_,x),0,k?1:0)},a={source:i(l.trim(),o.indexOf(l,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(Ea,"").trim();const p=r.indexOf(c),u=c.match(Po);if(u){c=c.replace(Po,"").trim();const f=u[1].trim();let h;if(f&&(h=o.indexOf(f,p+c.length),a.key=i(f,h,!0)),u[2]){const k=u[2].trim();k&&(a.index=i(k,o.indexOf(k,a.key?h+f.length:p+c.length),!0))}}return c&&(a.value=i(c,p,!0)),a}function oe(t,n){return _e.slice(t,n)}function Fo(t){G.inSFCRoot&&(se.innerLoc=Q(t+1,t+1)),Fn(se);const{tag:n,ns:o}=se;o===0&&q.isPreTag(n)&&Rn++,q.isVoidTag(n)?Pt(se,t):(Z.unshift(se),(o===1||o===2)&&(G.inXML=!0)),se=null}function Rt(t,n,o){{const l=Z[0]&&Z[0].tag;l!=="script"&&l!=="style"&&t.includes("&")&&(t=q.decodeEntities(t,!1))}const s=Z[0]||dt,r=s.children[s.children.length-1];r&&r.type===2?(r.content+=t,ze(r.loc,o)):s.children.push({type:2,content:t,loc:Q(n,o)})}function Pt(t,n,o=!1){o?ze(t.loc,zo(n,60)):ze(t.loc,Na(n,62)+1),G.inSFCRoot&&(t.children.length?t.innerLoc.end=Te({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Te({},t.innerLoc.start),t.innerLoc.source=oe(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:s,ns:r,children:l}=t;if(Ae||(s==="slot"?t.tagType=2:jo(t)?t.tagType=3:_a(t)&&(t.tagType=1)),G.inRCDATA||(t.children=Ho(l)),r===0&&q.isIgnoreNewlineTag(s)){const i=l[0];i&&i.type===2&&(i.content=i.content.replace(/^\r?\n/,""))}r===0&&q.isPreTag(s)&&Rn--,Pn===t&&(Ae=G.inVPre=!1,Pn=null),G.inXML&&(Z[0]?Z[0].ns:q.ns)===0&&(G.inXML=!1);{const i=t.props;if(process.env.NODE_ENV!=="production"&&Le("COMPILER_V_IF_V_FOR_PRECEDENCE",q)){let c=!1,p=!1;for(let u=0;u<i.length;u++){const f=i[u];if(f.type===7&&(f.name==="if"?c=!0:f.name==="for"&&(p=!0)),c&&p){Ot("COMPILER_V_IF_V_FOR_PRECEDENCE",q,t.loc);break}}}if(!G.inSFCRoot&&Le("COMPILER_NATIVE_TEMPLATE",q)&&t.tag==="template"&&!jo(t)){process.env.NODE_ENV!=="production"&&Ot("COMPILER_NATIVE_TEMPLATE",q,t.loc);const c=Z[0]||dt,p=c.children.indexOf(t);c.children.splice(p,1,...t.children)}const a=i.find(c=>c.type===6&&c.name==="inline-template");a&&Xe("COMPILER_INLINE_TEMPLATE",q,a.loc)&&t.children.length&&(a.value={type:2,content:oe(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function Na(t,n){let o=t;for(;_e.charCodeAt(o)!==n&&o<_e.length-1;)o++;return o}function zo(t,n){let o=t;for(;_e.charCodeAt(o)!==n&&o>=0;)o--;return o}const xa=new Set(["if","else","else-if","for","slot"]);function jo({tag:t,props:n}){if(t==="template"){for(let o=0;o<n.length;o++)if(n[o].type===7&&xa.has(n[o].name))return!0}return!1}function _a({tag:t,props:n}){if(q.isCustomElement(t))return!1;if(t==="component"||Ca(t.charCodeAt(0))||$o(t)||q.isBuiltInComponent&&q.isBuiltInComponent(t)||q.isNativeTag&&!q.isNativeTag(t))return!0;for(let o=0;o<n.length;o++){const s=n[o];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Xe("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}}else if(s.name==="bind"&&Oe(s.arg,"is")&&Xe("COMPILER_IS_ON_ELEMENT",q,s.loc))return!0}return!1}function Ca(t){return t>64&&t<91}const Sa=/\r\n/g;function Ho(t){const n=q.whitespace!=="preserve";let o=!1;for(let s=0;s<t.length;s++){const r=t[s];if(r.type===2)if(Rn)r.content=r.content.replace(Sa,`
|
|
142
|
+
`);else if(Ba(r.content)){const l=t[s-1]&&t[s-1].type,i=t[s+1]&&t[s+1].type;!l||!i||n&&(l===3&&(i===3||i===1)||l===1&&(i===3||i===1&&Ta(r.content)))?(o=!0,t[s]=null):r.content=" "}else n&&(r.content=Uo(r.content))}return o?t.filter(Boolean):t}function Ba(t){for(let n=0;n<t.length;n++)if(!me(t.charCodeAt(n)))return!1;return!0}function Ta(t){for(let n=0;n<t.length;n++){const o=t.charCodeAt(n);if(o===10||o===13)return!0}return!1}function Uo(t){let n="",o=!1;for(let s=0;s<t.length;s++)me(t.charCodeAt(s))?o||(n+=" ",o=!0):(n+=t[s],o=!1);return n}function Fn(t){(Z[0]||dt).children.push(t)}function Q(t,n){return{start:G.getPos(t),end:n==null?n:G.getPos(n),source:n==null?n:oe(t,n)}}function $a(t){return Q(t.start.offset,t.end.offset)}function ze(t,n){t.end=G.getPos(n),t.source=oe(t.start.offset,n)}function Da(t){const n={type:6,name:t.rawName,nameLoc:Q(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const o=t.exp.loc;o.end.offset<t.loc.end.offset&&(o.start.offset--,o.start.column--,o.end.offset++,o.end.column++),n.value={type:2,content:t.exp.content,loc:o}}return n}function Ft(t,n=!1,o,s=0,r=0){return j(t,n,o,s)}function pe(t,n,o){q.onError(W(t,Q(n,n),void 0,o))}function La(){G.reset(),se=null,U=null,de="",Ce=-1,Fe=-1,Z.length=0}function Oa(t,n){if(La(),_e=t,q=Te({},Ro),n){let r;for(r in n)n[r]!=null&&(q[r]=n[r])}if(process.env.NODE_ENV!=="production"&&!q.decodeEntities)throw new Error("[@vue/compiler-core] decodeEntities option is required in browser builds.");G.mode=q.parseMode==="html"?1:q.parseMode==="sfc"?2:0,G.inXML=q.ns===1||q.ns===2;const o=n&&n.delimiters;o&&(G.delimiterOpen=Lt(o[0]),G.delimiterClose=Lt(o[1]));const s=dt=sa([],t);return G.parse(_e),s.loc=Q(0,t.length),s.children=Ho(s.children),dt=null,s}function Aa(t,n){zt(t,void 0,n,!!qo(t))}function qo(t){const n=t.children.filter(o=>o.type!==3);return n.length===1&&n[0].type===1&&!It(n[0])?n[0]:null}function zt(t,n,o,s=!1,r=!1){const{children:l}=t,i=[];for(let f=0;f<l.length;f++){const h=l[f];if(h.type===1&&h.tagType===0){const k=s?0:ue(h,o);if(k>0){if(k>=2){h.codegenNode.patchFlag=-1,i.push(h);continue}}else{const _=h.codegenNode;if(_.type===13){const x=_.patchFlag;if((x===void 0||x===512||x===1)&&Ko(h,o)>=2){const w=Go(h);w&&(_.props=o.hoist(w))}_.dynamicProps&&(_.dynamicProps=o.hoist(_.dynamicProps))}}}else if(h.type===12&&(s?0:ue(h,o))>=2){h.codegenNode.type===14&&h.codegenNode.arguments.length>0&&h.codegenNode.arguments.push(-1+(process.env.NODE_ENV!=="production"?` /* ${tt[-1]} */`:"")),i.push(h);continue}if(h.type===1){const k=h.tagType===1;k&&o.scopes.vSlot++,zt(h,t,o,!1,r),k&&o.scopes.vSlot--}else if(h.type===11)zt(h,t,o,h.children.length===1,!0);else if(h.type===9)for(let k=0;k<h.branches.length;k++)zt(h.branches[k],t,o,h.branches[k].children.length===1,r)}let a=!1;const c=[];if(i.length===l.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&we(t.codegenNode.children))t.codegenNode.children=p(Pe(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!we(t.codegenNode.children)&&t.codegenNode.children.type===15){const f=u(t.codegenNode,"default");f&&(c.push(o.cached.length),f.returns=p(Pe(f.returns)),a=!0)}else if(t.tagType===3&&n&&n.type===1&&n.tagType===1&&n.codegenNode&&n.codegenNode.type===13&&n.codegenNode.children&&!we(n.codegenNode.children)&&n.codegenNode.children.type===15){const f=ce(t,"slot",!0),h=f&&f.arg&&u(n.codegenNode,f.arg);h&&(c.push(o.cached.length),h.returns=p(Pe(h.returns)),a=!0)}}if(!a)for(const f of i)c.push(o.cached.length),f.codegenNode=o.cache(f.codegenNode);c.length&&t.type===1&&t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!we(t.codegenNode.children)&&t.codegenNode.children.type===15&&t.codegenNode.children.properties.push(X("__",j(JSON.stringify(c),!1)));function p(f){const h=o.cache(f);return r&&o.hmr&&(h.needArraySpread=!0),h}function u(f,h){if(f.children&&!we(f.children)&&f.children.type===15){const k=f.children.properties.find(_=>_.key===h||_.key.content===h);return k&&k.value}}i.length&&o.transformHoist&&o.transformHoist(l,o,t)}function ue(t,n){const{constantCache:o}=n;switch(t.type){case 1:if(t.tagType!==0)return 0;const s=o.get(t);if(s!==void 0)return s;const r=t.codegenNode;if(r.type!==13||r.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(r.patchFlag===void 0){let i=3;const a=Ko(t,n);if(a===0)return o.set(t,0),0;a<i&&(i=a);for(let c=0;c<t.children.length;c++){const p=ue(t.children[c],n);if(p===0)return o.set(t,0),0;p<i&&(i=p)}if(i>1)for(let c=0;c<t.props.length;c++){const p=t.props[c];if(p.type===7&&p.name==="bind"&&p.exp){const u=ue(p.exp,n);if(u===0)return o.set(t,0),0;u<i&&(i=u)}}if(r.isBlock){for(let c=0;c<t.props.length;c++)if(t.props[c].type===7)return o.set(t,0),0;n.removeHelper(Re),n.removeHelper(Ye(n.inSSR,r.isComponent)),r.isBlock=!1,n.helper(Ze(n.inSSR,r.isComponent))}return o.set(t,i),i}else return o.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return ue(t.content,n);case 4:return t.constType;case 8:let l=3;for(let i=0;i<t.children.length;i++){const a=t.children[i];if(te(a)||pn(a))continue;const c=ue(a,n);if(c===0)return 0;c<l&&(l=c)}return l;case 20:return 2;default:return process.env.NODE_ENV,0}}const Ia=new Set([xn,_n,rt,it]);function Wo(t,n){if(t.type===14&&!te(t.callee)&&Ia.has(t.callee)){const o=t.arguments[0];if(o.type===4)return ue(o,n);if(o.type===14)return Wo(o,n)}return 0}function Ko(t,n){let o=3;const s=Go(t);if(s&&s.type===15){const{properties:r}=s;for(let l=0;l<r.length;l++){const{key:i,value:a}=r[l],c=ue(i,n);if(c===0)return c;c<o&&(o=c);let p;if(a.type===4?p=ue(a,n):a.type===14?p=Wo(a,n):p=0,p===0)return p;p<o&&(o=p)}}return o}function Go(t){const n=t.codegenNode;if(n.type===13)return n.props}function Ma(t,{filename:n="",prefixIdentifiers:o=!1,hoistStatic:s=!1,hmr:r=!1,cacheHandlers:l=!1,nodeTransforms:i=[],directiveTransforms:a={},transformHoist:c=null,isBuiltInComponent:p=cn,isCustomElement:u=cn,expressionPlugins:f=[],scopeId:h=null,slotted:k=!0,ssr:_=!1,inSSR:x=!1,ssrCssVars:w="",bindingMetadata:C=Al,inline:M=!1,isTS:B=!1,onError:$=An,onWarn:S=To,compatConfig:H}){const K=n.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),I={filename:n,selfName:K&&mn($e(K[1])),prefixIdentifiers:o,hoistStatic:s,hmr:r,cacheHandlers:l,nodeTransforms:i,directiveTransforms:a,transformHoist:c,isBuiltInComponent:p,isCustomElement:u,expressionPlugins:f,scopeId:h,slotted:k,ssr:_,inSSR:x,ssrCssVars:w,bindingMetadata:C,inline:M,isTS:B,onError:$,onWarn:S,compatConfig:H,root:t,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:t,childIndex:0,inVOnce:!1,helper(A){const F=I.helpers.get(A)||0;return I.helpers.set(A,F+1),A},removeHelper(A){const F=I.helpers.get(A);if(F){const z=F-1;z?I.helpers.set(A,z):I.helpers.delete(A)}},helperString(A){return`_${Ge[I.helper(A)]}`},replaceNode(A){if(process.env.NODE_ENV!=="production"){if(!I.currentNode)throw new Error("Node being replaced is already removed.");if(!I.parent)throw new Error("Cannot replace root node.")}I.parent.children[I.childIndex]=I.currentNode=A},removeNode(A){if(process.env.NODE_ENV!=="production"&&!I.parent)throw new Error("Cannot remove root node.");const F=I.parent.children,z=A?F.indexOf(A):I.currentNode?I.childIndex:-1;if(process.env.NODE_ENV!=="production"&&z<0)throw new Error("node being removed is not a child of current parent");!A||A===I.currentNode?(I.currentNode=null,I.onNodeRemoved()):I.childIndex>z&&(I.childIndex--,I.onNodeRemoved()),I.parent.children.splice(z,1)},onNodeRemoved:cn,addIdentifiers(A){},removeIdentifiers(A){},hoist(A){te(A)&&(A=j(A)),I.hoists.push(A);const F=j(`_hoisted_${I.hoists.length}`,!1,A.loc,2);return F.hoisted=A,F},cache(A,F=!1,z=!1){const E=ra(I.cached.length,A,F,z);return I.cached.push(E),E}};return I.filters=new Set,I}function Ra(t,n){const o=Ma(t,n);jt(t,o),n.hoistStatic&&Aa(t,o),n.ssr||Pa(t,o),t.helpers=new Set([...o.helpers.keys()]),t.components=[...o.components],t.directives=[...o.directives],t.imports=o.imports,t.hoists=o.hoists,t.temps=o.temps,t.cached=o.cached,t.transformed=!0,t.filters=[...o.filters]}function Pa(t,n){const{helper:o}=n,{children:s}=t;if(s.length===1){const r=qo(t);if(r&&r.codegenNode){const l=r.codegenNode;l.type===13&&Ln(l,n),t.codegenNode=l}else t.codegenNode=s[0]}else if(s.length>1){let r=64;process.env.NODE_ENV!=="production"&&s.filter(l=>l.type!==3).length===1&&(r|=2048),t.codegenNode=lt(n,o(nt),void 0,t.children,r,void 0,void 0,!0,void 0,!1)}}function Fa(t,n){let o=0;const s=()=>{o--};for(;o<t.children.length;o++){const r=t.children[o];te(r)||(n.grandParent=n.parent,n.parent=t,n.childIndex=o,n.onNodeRemoved=s,jt(r,n))}}function jt(t,n){n.currentNode=t;const{nodeTransforms:o}=n,s=[];for(let l=0;l<o.length;l++){const i=o[l](t,n);if(i&&(we(i)?s.push(...i):s.push(i)),n.currentNode)t=n.currentNode;else return}switch(t.type){case 3:n.ssr||n.helper(st);break;case 5:n.ssr||n.helper(Tt);break;case 9:for(let l=0;l<t.branches.length;l++)jt(t.branches[l],n);break;case 10:case 11:case 1:case 0:Fa(t,n);break}n.currentNode=t;let r=s.length;for(;r--;)s[r]()}function Jo(t,n){const o=te(t)?s=>s===t:s=>t.test(s);return(s,r)=>{if(s.type===1){const{props:l}=s;if(s.tagType===3&&l.some(ya))return;const i=[];for(let a=0;a<l.length;a++){const c=l[a];if(c.type===7&&o(c.name)){l.splice(a,1),a--;const p=n(s,c,r);p&&i.push(p)}}return i}}}const Ht="/*@__PURE__*/",Zo=t=>`${Ge[t]}: _${Ge[t]}`;function za(t,{mode:n="function",prefixIdentifiers:o=n==="module",sourceMap:s=!1,filename:r="template.vue.html",scopeId:l=null,optimizeImports:i=!1,runtimeGlobalName:a="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:p="vue/server-renderer",ssr:u=!1,isTS:f=!1,inSSR:h=!1}){const k={mode:n,prefixIdentifiers:o,sourceMap:s,filename:r,scopeId:l,optimizeImports:i,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:p,ssr:u,isTS:f,inSSR:h,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(x){return`_${Ge[x]}`},push(x,w=-2,C){k.code+=x},indent(){_(++k.indentLevel)},deindent(x=!1){x?--k.indentLevel:_(--k.indentLevel)},newline(){_(k.indentLevel)}};function _(x){k.push(`
|
|
143
|
+
`+" ".repeat(x),0)}return k}function ja(t,n={}){const o=za(t,n);n.onContextCreated&&n.onContextCreated(o);const{mode:s,push:r,prefixIdentifiers:l,indent:i,deindent:a,newline:c,scopeId:p,ssr:u}=o,f=Array.from(t.helpers),h=f.length>0,k=!l&&s!=="module";Ha(t,o);const x=u?"ssrRender":"render",C=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(r(`function ${x}(${C}) {`),i(),k&&(r("with (_ctx) {"),i(),h&&(r(`const { ${f.map(Zo).join(", ")} } = _Vue
|
|
144
|
+
`,-1),c())),t.components.length&&(zn(t.components,"component",o),(t.directives.length||t.temps>0)&&c()),t.directives.length&&(zn(t.directives,"directive",o),t.temps>0&&c()),t.filters&&t.filters.length&&(c(),zn(t.filters,"filter",o),c()),t.temps>0){r("let ");for(let M=0;M<t.temps;M++)r(`${M>0?", ":""}_temp${M}`)}return(t.components.length||t.directives.length||t.temps)&&(r(`
|
|
145
|
+
`,0),c()),u||r("return "),t.codegenNode?re(t.codegenNode,o):r("null"),k&&(a(),r("}")),a(),r("}"),{ast:t,code:o.code,preamble:"",map:o.map?o.map.toJSON():void 0}}function Ha(t,n){const{ssr:o,prefixIdentifiers:s,push:r,newline:l,runtimeModuleName:i,runtimeGlobalName:a,ssrRuntimeModuleName:c}=n,p=a,u=Array.from(t.helpers);if(u.length>0&&(r(`const _Vue = ${p}
|
|
146
|
+
`,-1),t.hoists.length)){const f=[hn,gn,st,yn,wo].filter(h=>u.includes(h)).map(Zo).join(", ");r(`const { ${f} } = _Vue
|
|
147
|
+
`,-1)}Ua(t.hoists,n),l(),r("return ")}function zn(t,n,{helper:o,push:s,newline:r,isTS:l}){const i=o(n==="filter"?En:n==="component"?vn:kn);for(let a=0;a<t.length;a++){let c=t[a];const p=c.endsWith("__self");p&&(c=c.slice(0,-6)),s(`const ${ct(c,n)} = ${i}(${JSON.stringify(c)}${p?", true":""})${l?"!":""}`),a<t.length-1&&r()}}function Ua(t,n){if(!t.length)return;n.pure=!0;const{push:o,newline:s}=n;s();for(let r=0;r<t.length;r++){const l=t[r];l&&(o(`const _hoisted_${r+1} = `),re(l,n),s())}n.pure=!1}function qa(t){return te(t)||t.type===4||t.type===2||t.type===5||t.type===8}function jn(t,n){const o=t.length>3||process.env.NODE_ENV!=="production"&&t.some(s=>we(s)||!qa(s));n.push("["),o&&n.indent(),pt(t,n,o),o&&n.deindent(),n.push("]")}function pt(t,n,o=!1,s=!0){const{push:r,newline:l}=n;for(let i=0;i<t.length;i++){const a=t[i];te(a)?r(a,-3):we(a)?jn(a,n):re(a,n),i<t.length-1&&(o?(s&&r(","),l()):s&&r(", "))}}function re(t,n){if(te(t)){n.push(t,-3);return}if(pn(t)){n.push(n.helper(t));return}switch(t.type){case 1:case 9:case 11:process.env.NODE_ENV!=="production"&&Oo(t.codegenNode!=null,"Codegen node is missing for element/if/for node. Apply appropriate transforms first."),re(t.codegenNode,n);break;case 2:Wa(t,n);break;case 4:Yo(t,n);break;case 5:Ka(t,n);break;case 12:re(t.codegenNode,n);break;case 8:Xo(t,n);break;case 3:Ja(t,n);break;case 13:Za(t,n);break;case 14:Xa(t,n);break;case 15:Qa(t,n);break;case 17:Va(t,n);break;case 18:ec(t,n);break;case 19:tc(t,n);break;case 20:nc(t,n);break;case 21:pt(t.body,n,!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 Oo(!1,`unhandled codegen node type: ${t.type}`),t}}function Wa(t,n){n.push(JSON.stringify(t.content),-3,t)}function Yo(t,n){const{content:o,isStatic:s}=t;n.push(s?JSON.stringify(o):o,-3,t)}function Ka(t,n){const{push:o,helper:s,pure:r}=n;r&&o(Ht),o(`${s(Tt)}(`),re(t.content,n),o(")")}function Xo(t,n){for(let o=0;o<t.children.length;o++){const s=t.children[o];te(s)?n.push(s,-3):re(s,n)}}function Ga(t,n){const{push:o}=n;if(t.type===8)o("["),Xo(t,n),o("]");else if(t.isStatic){const s=In(t.content)?t.content:JSON.stringify(t.content);o(s,-2,t)}else o(`[${t.content}]`,-3,t)}function Ja(t,n){const{push:o,helper:s,pure:r}=n;r&&o(Ht),o(`${s(st)}(${JSON.stringify(t.content)})`,-3,t)}function Za(t,n){const{push:o,helper:s,pure:r}=n,{tag:l,props:i,children:a,patchFlag:c,dynamicProps:p,directives:u,isBlock:f,disableTracking:h,isComponent:k}=t;let _;if(c)if(process.env.NODE_ENV!=="production")if(c<0)_=c+` /* ${tt[c]} */`;else{const w=Object.keys(tt).map(Number).filter(C=>C>0&&c&C).map(C=>tt[C]).join(", ");_=c+` /* ${w} */`}else _=String(c);u&&o(s(wn)+"("),f&&o(`(${s(Re)}(${h?"true":""}), `),r&&o(Ht);const x=f?Ye(n.inSSR,k):Ze(n.inSSR,k);o(s(x)+"(",-2,t),pt(Ya([l,i,a,_,p]),n),o(")"),f&&o(")"),u&&(o(", "),re(u,n),o(")"))}function Ya(t){let n=t.length;for(;n--&&t[n]==null;);return t.slice(0,n+1).map(o=>o||"null")}function Xa(t,n){const{push:o,helper:s,pure:r}=n,l=te(t.callee)?t.callee:s(t.callee);r&&o(Ht),o(l+"(",-2,t),pt(t.arguments,n),o(")")}function Qa(t,n){const{push:o,indent:s,deindent:r,newline:l}=n,{properties:i}=t;if(!i.length){o("{}",-2,t);return}const a=i.length>1||process.env.NODE_ENV!=="production"&&i.some(c=>c.value.type!==4);o(a?"{":"{ "),a&&s();for(let c=0;c<i.length;c++){const{key:p,value:u}=i[c];Ga(p,n),o(": "),re(u,n),c<i.length-1&&(o(","),l())}a&&r(),o(a?"}":" }")}function Va(t,n){jn(t.elements,n)}function ec(t,n){const{push:o,indent:s,deindent:r}=n,{params:l,returns:i,body:a,newline:c,isSlot:p}=t;p&&o(`_${Ge[Tn]}(`),o("(",-2,t),we(l)?pt(l,n):l&&re(l,n),o(") => "),(c||a)&&(o("{"),s()),i?(c&&o("return "),we(i)?jn(i,n):re(i,n)):a&&re(a,n),(c||a)&&(r(),o("}")),p&&(t.isNonScopedSlot&&o(", undefined, true"),o(")"))}function tc(t,n){const{test:o,consequent:s,alternate:r,newline:l}=t,{push:i,indent:a,deindent:c,newline:p}=n;if(o.type===4){const f=!In(o.content);f&&i("("),Yo(o,n),f&&i(")")}else i("("),re(o,n),i(")");l&&a(),n.indentLevel++,l||i(" "),i("? "),re(s,n),n.indentLevel--,l&&p(),l||i(" "),i(": ");const u=r.type===19;u||n.indentLevel++,re(r,n),u||n.indentLevel--,l&&c(!0)}function nc(t,n){const{push:o,helper:s,indent:r,deindent:l,newline:i}=n,{needPauseTracking:a,needArraySpread:c}=t;c&&o("[...("),o(`_cache[${t.index}] || (`),a&&(r(),o(`${s(Dt)}(-1`),t.inVOnce&&o(", true"),o("),"),i(),o("(")),o(`_cache[${t.index}] = `),re(t.value,n),a&&(o(`).cacheIndex = ${t.index},`),i(),o(`${s(Dt)}(1),`),i(),o(`_cache[${t.index}]`),l()),o(")"),c&&o(")]")}const oc=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"),sc=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;function je(t,n,o=!1,s=!1){const r=t.content;if(r.trim())try{new Function(s?` ${r} `:`return ${o?`(${r}) => {}`:`(${r})`}`)}catch(l){let i=l.message;const a=r.replace(sc,"").match(oc);a&&(i=`avoid using JavaScript keyword as property name: "${a[0]}"`),n.onError(W(45,t.loc,void 0,i))}}const rc=(t,n)=>{if(t.type===5)t.content=Hn(t.content,n);else if(t.type===1){const o=ce(t,"memo");for(let s=0;s<t.props.length;s++){const r=t.props[s];if(r.type===7&&r.name!=="for"){const l=r.exp,i=r.arg;l&&l.type===4&&!(r.name==="on"&&i)&&!(o&&i&&i.type===4&&i.content==="key")&&(r.exp=Hn(l,n,r.name==="slot")),i&&i.type===4&&!i.isStatic&&(r.arg=Hn(i,n))}}}};function Hn(t,n,o=!1,s=!1,r=Object.create(n.identifiers)){return process.env.NODE_ENV!=="production"&&je(t,n,o,s),t}const ic=Jo(/^(if|else|else-if)$/,(t,n,o)=>lc(t,n,o,(s,r,l)=>{const i=o.parent.children;let a=i.indexOf(s),c=0;for(;a-->=0;){const p=i[a];p&&p.type===9&&(c+=p.branches.length)}return()=>{if(l)s.codegenNode=Vo(r,c,o);else{const p=cc(s.codegenNode);p.alternate=Vo(r,c+s.branches.length-1,o)}}}));function lc(t,n,o,s){if(n.name!=="else"&&(!n.exp||!n.exp.content.trim())){const r=n.exp?n.exp.loc:t.loc;o.onError(W(28,n.loc)),n.exp=j("true",!1,r)}if(process.env.NODE_ENV!=="production"&&n.exp&&je(n.exp,o),n.name==="if"){const r=Qo(t,n),l={type:9,loc:$a(t.loc),branches:[r]};if(o.replaceNode(l),s)return s(l,r,!0)}else{const r=o.parent.children,l=[];let i=r.indexOf(t);for(;i-->=-1;){const a=r[i];if(a&&a.type===3){o.removeNode(a),process.env.NODE_ENV!=="production"&&l.unshift(a);continue}if(a&&a.type===2&&!a.content.trim().length){o.removeNode(a);continue}if(a&&a.type===9){n.name==="else-if"&&a.branches[a.branches.length-1].condition===void 0&&o.onError(W(30,t.loc)),o.removeNode();const c=Qo(t,n);if(process.env.NODE_ENV!=="production"&&l.length&&!(o.parent&&o.parent.type===1&&(o.parent.tag==="transition"||o.parent.tag==="Transition"))&&(c.children=[...l,...c.children]),process.env.NODE_ENV!=="production"){const u=c.userKey;u&&a.branches.forEach(({userKey:f})=>{ac(f,u)&&o.onError(W(29,c.userKey.loc))})}a.branches.push(c);const p=s&&s(a,c,!1);jt(c,o),p&&p(),o.currentNode=null}else o.onError(W(30,t.loc));break}}}function Qo(t,n){const o=t.tagType===3;return{type:10,loc:t.loc,condition:n.name==="else"?void 0:n.exp,children:o&&!ce(t,"for")?t.children:[t],userKey:at(t,"key"),isTemplateIf:o}}function Vo(t,n,o){return t.condition?Dn(t.condition,es(t,n,o),ee(o.helper(st),[process.env.NODE_ENV!=="production"?'"v-if"':'""',"true"])):es(t,n,o)}function es(t,n,o){const{helper:s}=o,r=X("key",j(`${n}`,!1,fe,2)),{children:l}=t,i=l[0];if(l.length!==1||i.type!==1)if(l.length===1&&i.type===11){const c=i.codegenNode;return Mt(c,r,o),c}else{let c=64;return process.env.NODE_ENV!=="production"&&!t.isTemplateIf&&l.filter(p=>p.type!==3).length===1&&(c|=2048),lt(o,s(nt),ye([r]),l,c,void 0,void 0,!0,!1,!1,t.loc)}else{const c=i.codegenNode,p=ba(c);return p.type===13&&Ln(p,o),Mt(p,r,o),c}}function ac(t,n){if(!t||t.type!==n.type)return!1;if(t.type===6){if(t.value.content!==n.value.content)return!1}else{const o=t.exp,s=n.exp;if(o.type!==s.type||o.type!==4||o.isStatic!==s.isStatic||o.content!==s.content)return!1}return!0}function cc(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const dc=(t,n,o)=>{const{modifiers:s,loc:r}=t,l=t.arg;let{exp:i}=t;if(i&&i.type===4&&!i.content.trim()&&(i=void 0),!i){if(l.type!==4||!l.isStatic)return o.onError(W(52,l.loc)),{props:[X(l,j("",!0,r))]};ts(t),i=t.exp}return l.type!==4?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=l.content?`${l.content} || ""`:'""'),s.some(a=>a.content==="camel")&&(l.type===4?l.isStatic?l.content=$e(l.content):l.content=`${o.helperString(Sn)}(${l.content})`:(l.children.unshift(`${o.helperString(Sn)}(`),l.children.push(")"))),o.inSSR||(s.some(a=>a.content==="prop")&&ns(l,"."),s.some(a=>a.content==="attr")&&ns(l,"^")),{props:[X(l,i)]}},ts=(t,n)=>{const o=t.arg,s=$e(o.content);t.exp=j(s,!1,o.loc)},ns=(t,n)=>{t.type===4?t.isStatic?t.content=n+t.content:t.content=`\`${n}\${${t.content}}\``:(t.children.unshift(`'${n}' + (`),t.children.push(")"))},pc=Jo("for",(t,n,o)=>{const{helper:s,removeHelper:r}=o;return fc(t,n,o,l=>{const i=ee(s(Nn),[l.source]),a=At(t),c=ce(t,"memo"),p=at(t,"key",!1,!0);p&&p.type===7&&!p.exp&&ts(p);let f=p&&(p.type===6?p.value?j(p.value.content,!0):void 0:p.exp);const h=p&&f?X("key",f):null,k=l.source.type===4&&l.source.constType>0,_=k?64:p?128:256;return l.codegenNode=lt(o,s(nt),void 0,i,_,void 0,void 0,!0,!k,!1,t.loc),()=>{let x;const{children:w}=l;process.env.NODE_ENV!=="production"&&a&&t.children.some(B=>{if(B.type===1){const $=at(B,"key");if($)return o.onError(W(33,$.loc)),!0}});const C=w.length!==1||w[0].type!==1,M=It(t)?t:a&&t.children.length===1&&It(t.children[0])?t.children[0]:null;if(M?(x=M.codegenNode,a&&h&&Mt(x,h,o)):C?x=lt(o,s(nt),h?ye([h]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(x=w[0].codegenNode,a&&h&&Mt(x,h,o),x.isBlock!==!k&&(x.isBlock?(r(Re),r(Ye(o.inSSR,x.isComponent))):r(Ze(o.inSSR,x.isComponent))),x.isBlock=!k,x.isBlock?(s(Re),s(Ye(o.inSSR,x.isComponent))):s(Ze(o.inSSR,x.isComponent))),c){const B=Je(Un(l.parseResult,[j("_cached")]));B.body=ia([ve(["const _memo = (",c.exp,")"]),ve(["if (_cached",...f?[" && _cached.key === ",f]:[],` && ${o.helperString(_o)}(_cached, _memo)) return _cached`]),ve(["const _item = ",x]),j("_item.memo = _memo"),j("return _item")]),i.arguments.push(B,j("_cache"),j(String(o.cached.length))),o.cached.push(null)}else i.arguments.push(Je(Un(l.parseResult),x,!0))}})});function fc(t,n,o,s){if(!n.exp){o.onError(W(31,n.loc));return}const r=n.forParseResult;if(!r){o.onError(W(32,n.loc));return}os(r,o);const{addIdentifiers:l,removeIdentifiers:i,scopes:a}=o,{source:c,value:p,key:u,index:f}=r,h={type:11,loc:n.loc,source:c,valueAlias:p,keyAlias:u,objectIndexAlias:f,parseResult:r,children:At(t)?t.children:[t]};o.replaceNode(h),a.vFor++;const k=s&&s(h);return()=>{a.vFor--,k&&k()}}function os(t,n){t.finalized||(process.env.NODE_ENV!=="production"&&(je(t.source,n),t.key&&je(t.key,n,!0),t.index&&je(t.index,n,!0),t.value&&je(t.value,n,!0)),t.finalized=!0)}function Un({value:t,key:n,index:o},s=[]){return mc([t,n,o,...s])}function mc(t){let n=t.length;for(;n--&&!t[n];);return t.slice(0,n+1).map((o,s)=>o||j("_".repeat(s+1),!1))}const ss=j("undefined",!1),uc=(t,n)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const o=ce(t,"slot");if(o)return o.exp,n.scopes.vSlot++,()=>{n.scopes.vSlot--}}},hc=(t,n,o,s)=>Je(t,o,!1,!0,o.length?o[0].loc:s);function gc(t,n,o=hc){n.helper(Tn);const{children:s,loc:r}=t,l=[],i=[];let a=n.scopes.vSlot>0||n.scopes.vFor>0;const c=ce(t,"slot",!0);if(c){const{arg:w,exp:C}=c;w&&!ae(w)&&(a=!0),l.push(X(w||j("default",!0),o(C,void 0,s,r)))}let p=!1,u=!1;const f=[],h=new Set;let k=0;for(let w=0;w<s.length;w++){const C=s[w];let M;if(!At(C)||!(M=ce(C,"slot",!0))){C.type!==3&&f.push(C);continue}if(c){n.onError(W(37,M.loc));break}p=!0;const{children:B,loc:$}=C,{arg:S=j("default",!0),exp:H,loc:K}=M;let I;ae(S)?I=S?S.content:"default":a=!0;const A=ce(C,"for"),F=o(H,A,B,$);let z,E;if(z=ce(C,"if"))a=!0,i.push(Dn(z.exp,Ut(S,F,k++),ss));else if(E=ce(C,/^else(-if)?$/,!0)){let T=w,N;for(;T--&&(N=s[T],!(N.type!==3&&qn(N))););if(N&&At(N)&&ce(N,/^(else-)?if$/)){let D=i[i.length-1];for(;D.alternate.type===19;)D=D.alternate;D.alternate=E.exp?Dn(E.exp,Ut(S,F,k++),ss):Ut(S,F,k++)}else n.onError(W(30,E.loc))}else if(A){a=!0;const T=A.forParseResult;T?(os(T,n),i.push(ee(n.helper(Nn),[T.source,Je(Un(T),Ut(S,F),!0)]))):n.onError(W(32,A.loc))}else{if(I){if(h.has(I)){n.onError(W(38,K));continue}h.add(I),I==="default"&&(u=!0)}l.push(X(S,F))}}if(!c){const w=(C,M)=>{const B=o(C,void 0,M,r);return n.compatConfig&&(B.isNonScopedSlot=!0),X("default",B)};p?f.length&&f.some(C=>qn(C))&&(u?n.onError(W(39,f[0].loc)):l.push(w(void 0,f))):l.push(w(void 0,s))}const _=a?2:qt(t.children)?3:1;let x=ye(l.concat(X("_",j(_+(process.env.NODE_ENV!=="production"?` /* ${Fl[_]} */`:""),!1))),r);return i.length&&(x=ee(n.helper(xo),[x,Pe(i)])),{slots:x,hasDynamicSlots:a}}function Ut(t,n,o){const s=[X("name",t),X("fn",n)];return o!=null&&s.push(X("key",j(String(o),!0))),ye(s)}function qt(t){for(let n=0;n<t.length;n++){const o=t[n];switch(o.type){case 1:if(o.tagType===2||qt(o.children))return!0;break;case 9:if(qt(o.branches))return!0;break;case 10:case 11:if(qt(o.children))return!0;break}}return!1}function qn(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():qn(t.content)}const rs=new WeakMap,yc=(t,n)=>function(){if(t=n.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:s,props:r}=t,l=t.tagType===1;let i=l?vc(t,n):`"${s}"`;const a=Il(i)&&i.callee===bn;let c,p,u=0,f,h,k,_=a||i===ot||i===un||!l&&(s==="svg"||s==="foreignObject"||s==="math");if(r.length>0){const x=is(t,n,void 0,l,a);c=x.props,u=x.patchFlag,h=x.dynamicPropNames;const w=x.directives;k=w&&w.length?Pe(w.map(C=>kc(C,n))):void 0,x.shouldUseBlock&&(_=!0)}if(t.children.length>0)if(i===Bt&&(_=!0,u|=1024,process.env.NODE_ENV!=="production"&&t.children.length>1&&n.onError(W(46,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}))),l&&i!==ot&&i!==Bt){const{slots:w,hasDynamicSlots:C}=gc(t,n);p=w,C&&(u|=1024)}else if(t.children.length===1&&i!==ot){const w=t.children[0],C=w.type,M=C===5||C===8;M&&ue(w,n)===0&&(u|=1),M||C===2?p=w:p=t.children}else p=t.children;h&&h.length&&(f=Ec(h)),t.codegenNode=lt(n,i,c,p,u===0?void 0:u,f,k,!!_,!1,l,t.loc)};function vc(t,n,o=!1){let{tag:s}=t;const r=Wn(s),l=at(t,"is",!1,!0);if(l)if(r||Le("COMPILER_IS_ON_ELEMENT",n)){let a;if(l.type===6?a=l.value&&j(l.value.content,!0):(a=l.exp,a||(a=j("is",!1,l.arg.loc))),a)return ee(n.helper(bn),[a])}else l.type===6&&l.value.content.startsWith("vue:")&&(s=l.value.content.slice(4));const i=$o(s)||n.isBuiltInComponent(s);return i?(o||n.helper(i),i):(n.helper(vn),n.components.add(s),ct(s,"component"))}function is(t,n,o=t.props,s,r,l=!1){const{tag:i,loc:a,children:c}=t;let p=[];const u=[],f=[],h=c.length>0;let k=!1,_=0,x=!1,w=!1,C=!1,M=!1,B=!1,$=!1;const S=[],H=F=>{p.length&&(u.push(ye(ls(p),a)),p=[]),F&&u.push(F)},K=()=>{n.scopes.vFor>0&&p.push(X(j("ref_for",!0),j("true")))},I=({key:F,value:z})=>{if(ae(F)){const E=F.content,T=dn(E);if(T&&(!s||r)&&E.toLowerCase()!=="onclick"&&E!=="onUpdate:modelValue"&&!vo(E)&&(M=!0),T&&vo(E)&&($=!0),T&&z.type===14&&(z=z.arguments[0]),z.type===20||(z.type===4||z.type===8)&&ue(z,n)>0)return;E==="ref"?x=!0:E==="class"?w=!0:E==="style"?C=!0:E!=="key"&&!S.includes(E)&&S.push(E),s&&(E==="class"||E==="style")&&!S.includes(E)&&S.push(E)}else B=!0};for(let F=0;F<o.length;F++){const z=o[F];if(z.type===6){const{loc:E,name:T,nameLoc:N,value:D}=z;let J=!0;if(T==="ref"&&(x=!0,K()),T==="is"&&(Wn(i)||D&&D.content.startsWith("vue:")||Le("COMPILER_IS_ON_ELEMENT",n)))continue;p.push(X(j(T,!0,N),j(D?D.content:"",J,D?D.loc:E)))}else{const{name:E,arg:T,exp:N,loc:D,modifiers:J}=z,le=E==="bind",Ie=E==="on";if(E==="slot"){s||n.onError(W(40,D));continue}if(E==="once"||E==="memo"||E==="is"||le&&Oe(T,"is")&&(Wn(i)||Le("COMPILER_IS_ON_ELEMENT",n))||Ie&&l)continue;if((le&&Oe(T,"key")||Ie&&h&&Oe(T,"vue:before-update"))&&(k=!0),le&&Oe(T,"ref")&&K(),!T&&(le||Ie)){if(B=!0,N)if(le){if(H(),process.env.NODE_ENV!=="production"&&u.some(Ne=>Ne.type===15?Ne.properties.some(({key:xe})=>xe.type!==4||!xe.isStatic?!0:xe.content!=="class"&&xe.content!=="style"&&!dn(xe.content)):!0)&&Xe("COMPILER_V_BIND_OBJECT_ORDER",n,D),Le("COMPILER_V_BIND_OBJECT_ORDER",n)){u.unshift(N);continue}K(),H(),u.push(N)}else H({type:14,loc:D,callee:n.helper(Cn),arguments:s?[N]:[N,"true"]});else n.onError(W(le?34:35,D));continue}le&&J.some(ke=>ke.content==="prop")&&(_|=32);const Se=n.directiveTransforms[E];if(Se){const{props:ke,needRuntime:Ne}=Se(z,t,n);!l&&ke.forEach(I),Ie&&T&&!ae(T)?H(ye(ke,a)):p.push(...ke),Ne&&(f.push(z),pn(Ne)&&rs.set(z,Ne))}else Ml(E)||(f.push(z),h&&(k=!0))}}let A;if(u.length?(H(),u.length>1?A=ee(n.helper($t),u,a):A=u[0]):p.length&&(A=ye(ls(p),a)),B?_|=16:(w&&!s&&(_|=2),C&&!s&&(_|=4),S.length&&(_|=8),M&&(_|=32)),!k&&(_===0||_===32)&&(x||$||f.length>0)&&(_|=512),!n.inSSR&&A)switch(A.type){case 15:let F=-1,z=-1,E=!1;for(let D=0;D<A.properties.length;D++){const J=A.properties[D].key;ae(J)?J.content==="class"?F=D:J.content==="style"&&(z=D):J.isHandlerKey||(E=!0)}const T=A.properties[F],N=A.properties[z];E?A=ee(n.helper(rt),[A]):(T&&!ae(T.value)&&(T.value=ee(n.helper(xn),[T.value])),N&&(C||N.value.type===4&&N.value.content.trim()[0]==="["||N.value.type===17)&&(N.value=ee(n.helper(_n),[N.value])));break;case 14:break;default:A=ee(n.helper(rt),[ee(n.helper(it),[A])]);break}return{props:A,directives:f,patchFlag:_,dynamicPropNames:S,shouldUseBlock:k}}function ls(t){const n=new Map,o=[];for(let s=0;s<t.length;s++){const r=t[s];if(r.key.type===8||!r.key.isStatic){o.push(r);continue}const l=r.key.content,i=n.get(l);i?(l==="style"||l==="class"||dn(l))&&bc(i,r):(n.set(l,r),o.push(r))}return o}function bc(t,n){t.value.type===17?t.value.elements.push(n.value):t.value=Pe([t.value,n.value],t.loc)}function kc(t,n){const o=[],s=rs.get(t);s?o.push(n.helperString(s)):(n.helper(kn),n.directives.add(t.name),o.push(ct(t.name,"directive")));const{loc:r}=t;if(t.exp&&o.push(t.exp),t.arg&&(t.exp||o.push("void 0"),o.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||o.push("void 0"),o.push("void 0"));const l=j("true",!1,r);o.push(ye(t.modifiers.map(i=>X(i,l)),r))}return Pe(o,t.loc)}function Ec(t){let n="[";for(let o=0,s=t.length;o<s;o++)n+=JSON.stringify(t[o]),o<s-1&&(n+=", ");return n+"]"}function Wn(t){return t==="component"||t==="Component"}const wc=(t,n)=>{if(It(t)){const{children:o,loc:s}=t,{slotName:r,slotProps:l}=Nc(t,n),i=[n.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let a=2;l&&(i[2]=l,a=3),o.length&&(i[3]=Je([],o,!1,!1,s),a=4),n.scopeId&&!n.slotted&&(a=5),i.splice(a),t.codegenNode=ee(n.helper(No),i,s)}};function Nc(t,n){let o='"default"',s;const r=[];for(let l=0;l<t.props.length;l++){const i=t.props[l];if(i.type===6)i.value&&(i.name==="name"?o=JSON.stringify(i.value.content):(i.name=$e(i.name),r.push(i)));else if(i.name==="bind"&&Oe(i.arg,"name")){if(i.exp)o=i.exp;else if(i.arg&&i.arg.type===4){const a=$e(i.arg.content);o=i.exp=j(a,!1,i.arg.loc)}}else i.name==="bind"&&i.arg&&ae(i.arg)&&(i.arg.content=$e(i.arg.content)),r.push(i)}if(r.length>0){const{props:l,directives:i}=is(t,n,r,!1,!1);s=l,i.length&&n.onError(W(36,i[0].loc))}return{slotName:o,slotProps:s}}const as=(t,n,o,s)=>{const{loc:r,modifiers:l,arg:i}=t;!t.exp&&!l.length&&o.onError(W(35,r));let a;if(i.type===4)if(i.isStatic){let f=i.content;process.env.NODE_ENV!=="production"&&f.startsWith("vnode")&&o.onError(W(51,i.loc)),f.startsWith("vue:")&&(f=`vnode-${f.slice(4)}`);const h=n.tagType!==0||f.startsWith("vnode")||!/[A-Z]/.test(f)?Pl($e(f)):`on:${f}`;a=j(h,!0,i.loc)}else a=ve([`${o.helperString(Bn)}(`,i,")"]);else a=i,a.children.unshift(`${o.helperString(Bn)}(`),a.children.push(")");let c=t.exp;c&&!c.content.trim()&&(c=void 0);let p=o.cacheHandlers&&!c&&!o.inVOnce;if(c){const f=Lo(c),h=!(f||ha(c)),k=c.content.includes(";");process.env.NODE_ENV!=="production"&&je(c,o,!1,k),(h||p&&f)&&(c=ve([`${h?"$event":"(...args)"} => ${k?"{":"("}`,c,k?"}":")"]))}let u={props:[X(a,c||j("() => {}",!1,r))]};return s&&(u=s(u)),p&&(u.props[0].value=o.cache(u.props[0].value)),u.props.forEach(f=>f.key.isHandlerKey=!0),u},xc=(t,n)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const o=t.children;let s,r=!1;for(let l=0;l<o.length;l++){const i=o[l];if(Mn(i)){r=!0;for(let a=l+1;a<o.length;a++){const c=o[a];if(Mn(c))s||(s=o[l]=ve([i],i.loc)),s.children.push(" + ",c),o.splice(a,1),a--;else{s=void 0;break}}}}if(!(!r||o.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(l=>l.type===7&&!n.directiveTransforms[l.name])&&t.tag!=="template")))for(let l=0;l<o.length;l++){const i=o[l];if(Mn(i)||i.type===8){const a=[];(i.type!==2||i.content!==" ")&&a.push(i),!n.ssr&&ue(i,n)===0&&a.push(1+(process.env.NODE_ENV!=="production"?` /* ${tt[1]} */`:"")),o[l]={type:12,content:i,loc:i.loc,codegenNode:ee(n.helper(yn),a)}}}}},cs=new WeakSet,_c=(t,n)=>{if(t.type===1&&ce(t,"once",!0))return cs.has(t)||n.inVOnce||n.inSSR?void 0:(cs.add(t),n.inVOnce=!0,n.helper(Dt),()=>{n.inVOnce=!1;const o=n.currentNode;o.codegenNode&&(o.codegenNode=n.cache(o.codegenNode,!0,!0))})},ds=(t,n,o)=>{const{exp:s,arg:r}=t;if(!s)return o.onError(W(41,t.loc)),Wt();const l=s.loc.source.trim(),i=s.type===4?s.content:l,a=o.bindingMetadata[l];if(a==="props"||a==="props-aliased")return o.onError(W(44,s.loc)),Wt();if(!i.trim()||!Lo(s))return o.onError(W(42,s.loc)),Wt();const c=r||j("modelValue",!0),p=r?ae(r)?`onUpdate:${$e(r.content)}`:ve(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;const f=o.isTS?"($event: any)":"$event";u=ve([`${f} => ((`,s,") = $event)"]);const h=[X(c,t.exp),X(p,u)];if(t.modifiers.length&&n.tagType===1){const k=t.modifiers.map(x=>x.content).map(x=>(In(x)?x:JSON.stringify(x))+": true").join(", "),_=r?ae(r)?`${r.content}Modifiers`:ve([r,' + "Modifiers"']):"modelModifiers";h.push(X(_,j(`{ ${k} }`,!1,t.loc,2)))}return Wt(h)};function Wt(t=[]){return{props:t}}const Cc=/[\w).+\-_$\]]/,Sc=(t,n)=>{Le("COMPILER_FILTERS",n)&&(t.type===5?Kt(t.content,n):t.type===1&&t.props.forEach(o=>{o.type===7&&o.name!=="for"&&o.exp&&Kt(o.exp,n)}))};function Kt(t,n){if(t.type===4)ps(t,n);else for(let o=0;o<t.children.length;o++){const s=t.children[o];typeof s=="object"&&(s.type===4?ps(s,n):s.type===8?Kt(t,n):s.type===5&&Kt(s.content,n))}}function ps(t,n){const o=t.content;let s=!1,r=!1,l=!1,i=!1,a=0,c=0,p=0,u=0,f,h,k,_,x=[];for(k=0;k<o.length;k++)if(h=f,f=o.charCodeAt(k),s)f===39&&h!==92&&(s=!1);else if(r)f===34&&h!==92&&(r=!1);else if(l)f===96&&h!==92&&(l=!1);else if(i)f===47&&h!==92&&(i=!1);else if(f===124&&o.charCodeAt(k+1)!==124&&o.charCodeAt(k-1)!==124&&!a&&!c&&!p)_===void 0?(u=k+1,_=o.slice(0,k).trim()):w();else{switch(f){case 34:r=!0;break;case 39:s=!0;break;case 96:l=!0;break;case 40:p++;break;case 41:p--;break;case 91:c++;break;case 93:c--;break;case 123:a++;break;case 125:a--;break}if(f===47){let C=k-1,M;for(;C>=0&&(M=o.charAt(C),M===" ");C--);(!M||!Cc.test(M))&&(i=!0)}}_===void 0?_=o.slice(0,k).trim():u!==0&&w();function w(){x.push(o.slice(u,k).trim()),u=k+1}if(x.length){for(process.env.NODE_ENV!=="production"&&Ot("COMPILER_FILTERS",n,t.loc),k=0;k<x.length;k++)_=Bc(_,x[k],n);t.content=_,t.ast=void 0}}function Bc(t,n,o){o.helper(En);const s=n.indexOf("(");if(s<0)return o.filters.add(n),`${ct(n,"filter")}(${t})`;{const r=n.slice(0,s),l=n.slice(s+1);return o.filters.add(r),`${ct(r,"filter")}(${t}${l!==")"?","+l:l}`}}const fs=new WeakSet,Tc=(t,n)=>{if(t.type===1){const o=ce(t,"memo");return!o||fs.has(t)?void 0:(fs.add(t),()=>{const s=t.codegenNode||n.currentNode.codegenNode;s&&s.type===13&&(t.tagType!==1&&Ln(s,n),t.codegenNode=ee(n.helper($n),[o.exp,Je(void 0,s),"_cache",String(n.cached.length)]),n.cached.push(null))})}};function $c(t){return[[_c,ic,Tc,pc,Sc,...process.env.NODE_ENV!=="production"?[rc]:[],wc,yc,uc,xc],{on:as,bind:dc,model:ds}]}function Dc(t,n={}){const o=n.onError||An,s=n.mode==="module";n.prefixIdentifiers===!0?o(W(47)):s&&o(W(48));const r=!1;n.cacheHandlers&&o(W(49)),n.scopeId&&!s&&o(W(50));const l=Te({},n,{prefixIdentifiers:r}),i=te(t)?Oa(t,l):t,[a,c]=$c();return Ra(i,Te({},l,{nodeTransforms:[...a,...n.nodeTransforms||[]],directiveTransforms:Te({},c,n.directiveTransforms||{})})),ja(i,l)}const Lc=()=>({props:[]});/**
|
|
148
148
|
* @vue/compiler-dom v3.5.18
|
|
149
149
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
150
150
|
* @license MIT
|
|
151
|
-
**/const ms=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),us=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),hs=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),gs=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),Kn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),ys=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),vs=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),bs=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),Gn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),ks=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");oa({[ms]:"vModelRadio",[us]:"vModelCheckbox",[hs]:"vModelText",[gs]:"vModelSelect",[Kn]:"vModelDynamic",[ys]:"withModifiers",[vs]:"withKeys",[bs]:"vShow",[Gn]:"Transition",[ks]:"TransitionGroup"});let Ve;function Oc(t,n=!1){return Ve||(Ve=document.createElement("div")),n?(Ve.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,Ve.children[0].getAttribute("foo")):(Ve.innerHTML=t,Ve.textContent)}const Ac={parseMode:"html",isVoidTag:Xl,isNativeTag:t=>Jl(t)||Zl(t)||Yl(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:Oc,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return Gn;if(t==="TransitionGroup"||t==="transition-group")return ks},getNamespace(t,n,o){let s=n?n.ns:o;if(n&&s===2)if(n.tag==="annotation-xml"){if(t==="svg")return 1;n.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(s=0)}else/^m(?:[ions]|text)$/.test(n.tag)&&t!=="mglyph"&&t!=="malignmark"&&(s=0);else n&&s===1&&(n.tag==="foreignObject"||n.tag==="desc"||n.tag==="title")&&(s=0);if(s===0){if(t==="svg")return 1;if(t==="math")return 2}return s}},Ic=t=>{t.type===1&&t.props.forEach((n,o)=>{n.type===6&&n.name==="style"&&n.value&&(t.props[o]={type:7,name:"bind",arg:j("style",!0,n.loc),exp:Mc(n.value.content,n.loc),modifiers:[],loc:n.loc})})},Mc=(t,n)=>{const o=Ul(t);return j(JSON.stringify(o),!1,n,3)};function ve(t,n){return W(t,n,process.env.NODE_ENV!=="production"?Rc:void 0)}const Rc={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."},Pc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(ve(53,r)),n.children.length&&(o.onError(ve(54,r)),n.children.length=0),{props:[X(j("innerHTML",!0,r),s||j("",!0))]}},Fc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(ve(55,r)),n.children.length&&(o.onError(ve(56,r)),n.children.length=0),{props:[X(j("textContent",!0),s?he(s,o)>0?s:te(o.helperString(Tt),[s],r):j("",!0))]}},zc=(t,n,o)=>{const s=ds(t,n,o);if(!s.props.length||n.tagType===1)return s;t.arg&&o.onError(ve(58,t.arg.loc));function r(){const a=de(n,"bind");a&&Ae(a.arg,"value")&&o.onError(ve(60,a.loc))}const{tag:l}=n,i=o.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||i){let a=hs,c=!1;if(l==="input"||i){const p=ct(n,"type");if(p){if(p.type===7)a=Kn;else if(p.value)switch(p.value.content){case"radio":a=ms;break;case"checkbox":a=us;break;case"file":c=!0,o.onError(ve(59,t.loc));break;default:process.env.NODE_ENV!=="production"&&r();break}}else ga(n)?a=Kn:process.env.NODE_ENV!=="production"&&r()}else l==="select"?a=gs:process.env.NODE_ENV!=="production"&&r();c||(s.needRuntime=o.helper(a))}else o.onError(ve(57,t.loc));return s.props=s.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),s},jc=Ee("passive,once,capture"),Hc=Ee("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Uc=Ee("left,right"),Es=Ee("onkeyup,onkeydown,onkeypress"),qc=(t,n,o,s)=>{const r=[],l=[],i=[];for(let a=0;a<n.length;a++){const c=n[a].content;c==="native"&&Qe("COMPILER_V_ON_NATIVE",o,s)||jc(c)?i.push(c):Uc(c)?ce(t)?Es(t.content.toLowerCase())?r.push(c):l.push(c):(r.push(c),l.push(c)):Hc(c)?l.push(c):r.push(c)}return{keyModifiers:r,nonKeyModifiers:l,eventOptionModifiers:i}},ws=(t,n)=>ce(t)&&t.content.toLowerCase()==="onclick"?j(n,!0):t.type!==4?ye(["(",t,`) === "onClick" ? "${n}" : (`,t,")"]):t,Wc=(t,n,o)=>as(t,n,o,s=>{const{modifiers:r}=t;if(!r.length)return s;let{key:l,value:i}=s.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:p}=qc(l,r,o,t.loc);if(c.includes("right")&&(l=ws(l,"onContextmenu")),c.includes("middle")&&(l=ws(l,"onMouseup")),c.length&&(i=te(o.helper(ys),[i,JSON.stringify(c)])),a.length&&(!ce(l)||Es(l.content.toLowerCase()))&&(i=te(o.helper(vs),[i,JSON.stringify(a)])),p.length){const m=p.map(mn).join("");l=ce(l)?j(`${l.content}${m}`,!0):ye(["(",l,`) + "${m}"`])}return{props:[X(l,i)]}}),Kc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(ve(61,r)),{props:[],needRuntime:o.helper(bs)}},Gc=(t,n)=>{if(t.type===1&&t.tagType===1&&n.isBuiltInComponent(t.tag)===Gn)return()=>{if(!t.children.length)return;Ns(t)&&n.onError(ve(62,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}));const s=t.children[0];if(s.type===1)for(const r of s.props)r.type===7&&r.name==="show"&&t.props.push({type:6,name:"persisted",nameLoc:t.loc,value:void 0,loc:t.loc})}};function Ns(t){const n=t.children=t.children.filter(s=>s.type!==3&&!(s.type===2&&!s.content.trim())),o=n[0];return n.length!==1||o.type===11||o.type===9&&o.branches.some(Ns)}const Jc=(t,n)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&(process.env.NODE_ENV!=="production"&&n.onError(ve(63,t.loc)),n.removeNode())};function Zc(t,n){return t==="template"?!0:t in xs?xs[t].has(n):n in _s?_s[n].has(t):!(t in Cs&&Cs[t].has(n)||n in Ss&&Ss[n].has(t))}const et=new Set(["h1","h2","h3","h4","h5","h6"]),Ue=new Set([]),xs={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:Ue,iframe:Ue,option:Ue,textarea:Ue,style:Ue,title:Ue},_s={html:Ue,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"])},Cs={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"])},Ss={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:et,h2:et,h3:et,h4:et,h5:et,h6:et},Yc=(t,n)=>{if(t.type===1&&t.tagType===0&&n.parent&&n.parent.type===1&&n.parent.tagType===0&&!Zc(n.parent.tag,t.tag)){const o=new SyntaxError(`<${t.tag}> cannot be child of <${n.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);o.loc=t.loc,n.onWarn(o)}},Xc=[Ic,...process.env.NODE_ENV!=="production"?[Gc,Yc]:[]],Qc={cloak:Lc,html:Pc,text:Fc,model:zc,on:Wc,show:Kc};function Vc(t,n={}){return Dc(t,$e({},Ac,n,{nodeTransforms:[Jc,...Xc,...n.nodeTransforms||[]],directiveTransforms:$e({},Qc,n.directiveTransforms||{}),transformHoist:null}))}function ed(t,n={}){const o=t.trim().startsWith("<")?t:`<span>${t}</span>`,{code:s}=Vc(o,{mode:"function"}),r=new Function("Vue",`${s}; return render;`)(Ps);return e.defineComponent({name:"DynamicFromString",props:n.props??{},emits:n.emits??[],setup(){return n.setup?.()??{}},render:r})}const Jn={};function td(t){return Jn[t]||(Jn[t]=ed(t,{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}}})),Jn[t]}const nd={class:"mt-4 flex flex-wrap items-center justify-between gap-3 text-sm text-gray-600"},od={class:"flex items-center gap-2"},sd=["disabled"],rd={class:"text-sm"},id=["disabled"],ld=e.defineComponent({__name:"TablePagination",props:{currentPage:{},totalPages:{},label:{}},setup(t){const n=t,o=e.computed(()=>n.currentPage<=1),s=e.computed(()=>n.currentPage>=n.totalPages);return(r,l)=>(e.openBlock(),e.createElementBlock("div",nd,[e.createElementVNode("div",null,e.toDisplayString(r.label),1),e.createElementVNode("div",od,[e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:o.value,onClick:l[0]||(l[0]=i=>r.$emit("previous"))}," Назад ",8,sd),e.createElementVNode("span",rd,"Сторінка "+e.toDisplayString(r.currentPage)+" з "+e.toDisplayString(r.totalPages),1),e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:s.value,onClick:l[1]||(l[1]=i=>r.$emit("next"))}," Далі ",8,id)])]))}}),ad={class:"relative inline-flex"},cd=["aria-label"],dd={class:"px-3 pb-2"},pd={class:"px-3 pb-3 max-h-64 overflow-y-auto"},fd=["onClick"],md={class:"truncate"},ud={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},hd="inline-flex items-center justify-center size-8 rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",gd=e.defineComponent({__name:"TableColumnSettings",props:{columns:{}},emits:["update:columns"],setup(t,{emit:n}){const o=t,s=n,r=e.useAttrs(),l=e.ref(!1),i=e.ref(""),a=e.ref([...o.columns]),c=e.ref(null),p=e.ref(null),m=e.ref(null),f=e.ref({top:0,left:0}),u=e.computed(()=>{if(!i.value)return a.value;const T=i.value.toLowerCase();return a.value.filter(D=>k(D).toLowerCase().includes(T))});e.watch(()=>o.columns,T=>{if(!T){a.value=[];return}const D=JSON.stringify(T),B=JSON.stringify(a.value);D!==B&&(a.value=[...T])},{deep:!0}),e.watch(a,T=>{s("update:columns",T)},{deep:!0});function k(T){return T.ua||T.label||T.name||"Колонка"}function _(T){const D=!T.hidden;D&&a.value.filter(B=>!B.hidden).length<=1||(T.hidden=D)}function x(){l.value=!l.value,l.value&&e.nextTick(()=>{m.value?.focus(),w()})}function w(){if(!c.value)return;const T=c.value.getBoundingClientRect();f.value={top:T.bottom+window.scrollY+6,left:T.left+window.scrollX-200}}function C(T){if(!l.value)return;const D=T.target;D&&(p.value?.contains(D)||c.value?.contains(D)||(l.value=!1))}function R(T){T.key==="Escape"&&(l.value=!1)}return e.onMounted(()=>{document.addEventListener("click",C,!0),document.addEventListener("keydown",R)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C,!0),document.removeEventListener("keydown",R)}),(T,D)=>(e.openBlock(),e.createElementBlock("div",ad,[e.createElementVNode("button",{ref_key:"buttonRef",ref:c,type:"button",onClick:x,class:e.normalizeClass([hd,e.unref(r).class]),"aria-label":e.unref(r)["aria-label"]??"Налаштування колонок",title:"Налаштування колонок"},D[2]||(D[2]=[e.createStaticVNode('<svg 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-columns" height="18" width="18" aria-hidden="true"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6h5.5"></path><path d="M4 10h5.5"></path><path d="M4 14h5.5"></path><path d="M4 18h5.5"></path><path d="M14.5 6h5.5"></path><path d="M14.5 10h5.5"></path><path d="M14.5 14h5.5"></path><path d="M14.5 18h5.5"></path></svg>',1)]),10,cd),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:p,class:"fixed z-50 w-64 bg-white rounded-xl shadow-lg border border-gray-200 dark:bg-neutral-900 dark:border-neutral-700",style:e.normalizeStyle({top:`${f.value.top}px`,left:`${f.value.left}px`})},[D[5]||(D[5]=e.createElementVNode("div",{class:"flex items-center justify-between h-12 px-4 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Налаштування колонок ",-1)),e.createElementVNode("div",dd,[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:m,"onUpdate:modelValue":D[0]||(D[0]=B=>i.value=B),type:"text",class:"w-full rounded-md border border-gray-200 px-3 py-2 text-sm text-gray-800 placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200",placeholder:"Пошук колонок"},null,512),[[e.vModelText,i.value]])]),e.createElementVNode("div",pd,[D[4]||(D[4]=e.createElementVNode("p",{class:"px-1 pb-2 text-xs text-gray-500 uppercase tracking-wide"},"Виберіть колонки",-1)),e.createElementVNode("ul",{class:"space-y-1",onClick:D[1]||(D[1]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,B=>(e.openBlock(),e.createElementBlock("li",{key:B.name,class:"flex items-center justify-between rounded-lg px-3 py-2 text-sm text-gray-800 hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-800 cursor-pointer",onClick:H=>_(B)},[e.createElementVNode("span",md,e.toDisplayString(k(B)),1),e.createElementVNode("span",{class:e.normalizeClass(["flex items-center justify-center size-4 rounded border border-gray-300 text-white",B.hidden?"bg-white text-transparent":"bg-blue-600 border-blue-600"])},[B.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",ud,D[3]||(D[3]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])))],2)],8,fd))),128))])])],4)):e.createCommentVNode("",!0)]))]))}}),yd=["data-action-key"],vd=["onClick"],bd={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},kd={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Ed={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},wd={key:3,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Nd=e.defineComponent({__name:"RowActionsButton",props:{row:{},actions:{},isOpen:{type:Boolean},actionKey:{}},emits:["toggle"],setup(t,{emit:n}){const o=t,s=n,r=e.ref(null),l=e.computed(()=>!!o.actions?.length),i=e.ref({scrollX:0,scrollY:0,width:0,height:0}),a=e.ref(!1);function c(){s("toggle")}function p(_){_.handler?.(o.row)}const m=e.computed(()=>{if(!o.isOpen)return{};const _=r.value;if(!_)return{};const x=_.getBoundingClientRect(),w=8,C=160,D=(o.actions?.length??0)*36+w*2,B=i.value.height||(typeof window<"u"?window.innerHeight:0),H=i.value.width||(typeof window<"u"?window.innerWidth:0),K=i.value.scrollX||(typeof window<"u"?window.scrollX:0),M=i.value.scrollY||(typeof window<"u"?window.scrollY:0);let I=x.bottom+M+w,F=x.right+K-C;const z=K+H-C-w;return F>z&&(F=z),F<K+w&&(F=K+w),I+D>M+B-w&&(I=x.top+M-D-w),I<M+w&&(I=M+w),{top:`${I}px`,left:`${F}px`,width:"auto"}});function f(){typeof window>"u"||(i.value={scrollX:window.scrollX,scrollY:window.scrollY,width:window.innerWidth,height:window.innerHeight})}function u(){typeof window>"u"||a.value||(a.value=!0,f(),window.addEventListener("scroll",f,{passive:!0}),window.addEventListener("resize",f))}function k(){typeof window>"u"||!a.value||(a.value=!1,window.removeEventListener("scroll",f),window.removeEventListener("resize",f))}return e.watch(()=>o.isOpen,_=>{_?u():k()},{immediate:!0}),e.onMounted(()=>{o.isOpen&&u()}),e.onBeforeUnmount(()=>{k()}),(_,x)=>l.value&&_.actionKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative inline-flex","data-action-key":_.actionKey,ref_key:"anchorRef",ref:r},[e.createElementVNode("button",{type:"button",class:"inline-flex size-7 items-center justify-center rounded-md border border-gray-200 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:e.withModifiers(c,["stop"])},x[1]||(x[1]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[_.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed z-50 w-40 overflow-hidden rounded-lg border border-gray-200 bg-white py-1 shadow-lg",style:e.normalizeStyle(m.value),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.actions,w=>(e.openBlock(),e.createElementBlock("button",{key:w.type,type:"button",class:e.normalizeClass(["flex w-full items-center gap-2 px-4 py-2 text-sm transition-colors",w.variant==="danger"?"text-red-600 hover:bg-red-50":"text-gray-700 hover:bg-gray-50"]),onClick:C=>p(w)},[e.renderSlot(_.$slots,"icon",{action:w},()=>[w.type==="view"?(e.openBlock(),e.createElementBlock("svg",bd,x[2]||(x[2]=[e.createElementVNode("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))):w.type==="edit"?(e.openBlock(),e.createElementBlock("svg",kd,x[3]||(x[3]=[e.createElementVNode("path",{d:"M18 2a2.828 2.828 0 1 1 4 4L7 21l-4 1 1-4Z"},null,-1)]))):w.type==="delete"?(e.openBlock(),e.createElementBlock("svg",Ed,x[4]||(x[4]=[e.createElementVNode("path",{d:"M3 6h18"},null,-1),e.createElementVNode("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"},null,-1),e.createElementVNode("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"},null,-1),e.createElementVNode("line",{x1:"10",x2:"10",y1:"11",y2:"17"},null,-1),e.createElementVNode("line",{x1:"14",x2:"14",y1:"11",y2:"17"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",wd,x[5]||(x[5]=[e.createElementVNode("path",{d:"M12 8v8"},null,-1),e.createElementVNode("path",{d:"M8 12h8"},null,-1)])))]),e.createTextVNode(" "+e.toDisplayString(w.label),1)],10,vd))),128))],4)):e.createCommentVNode("",!0)]))],8,yd)):e.createCommentVNode("",!0)}}),Bs=typeof window<"u",Ts=typeof document<"u";function xd(t){if(!Ts)throw new Error("Tooltip requires document to be defined");const n=document.createElement("div");return n.className="fixed z-[9999] p-2 bg-gray-900 text-white text-xs rounded-lg shadow-lg pointer-events-none transition-opacity duration-150",n.style.opacity="0",n.style.visibility="hidden",n.style.maxWidth="240px",n.style.whiteSpace="normal",n.style.wordBreak="break-word",document.body.appendChild(n),n}function $s(t){if(!t)return null;if(typeof t=="string"){const o=t.trim();return o?{text:o,wrap:!0}:null}const n=typeof t.text=="string"&&t.text.trim()?t.text.trim():void 0;return n?{text:n,wrap:t.wrap!==!1}:null}function Zn(t,n){if(!Ts||!Bs)return;const o=xd(n.wrap),s={options:n,tooltipEl:o,show:r=>{if(!s.options.text||!Bs)return;o.textContent=s.options.text;const i=(r.currentTarget??t).getBoundingClientRect(),a=o.getBoundingClientRect(),c=window.innerWidth-a.width-12,p=Math.max(12,Math.min(i.left,c));o.style.left=`${p}px`,o.style.top=`${i.bottom+4}px`,o.style.opacity="1",o.style.visibility="visible"},hide:()=>{o.style.opacity="0",o.style.visibility="hidden"}};t.addEventListener("mouseenter",s.show),t.addEventListener("mouseleave",s.hide),t.addEventListener("focus",s.show),t.addEventListener("blur",s.hide),t.__tooltipState__=s}function Yn(t){const n=t.__tooltipState__;n&&(t.removeEventListener("mouseenter",n.show),t.removeEventListener("mouseleave",n.hide),t.removeEventListener("focus",n.show),t.removeEventListener("blur",n.hide),n.tooltipEl.remove(),delete t.__tooltipState__)}const _d={mounted(t,n){const o=$s(n.value);o&&Zn(t,o)},updated(t,n){const o=$s(n.value),s=t;if(!o){Yn(s);return}const r=s.__tooltipState__;if(!r){Zn(s,o);return}if(r.options.wrap!==o.wrap){Yn(s),Zn(s,o);return}r.options=o},unmounted(t){Yn(t)}},Cd={class:"flex flex-col gap-4 mb-[15px]"},Sd={class:"flex flex-wrap items-center gap-4"},Bd={class:"relative"},Td={class:"ml-auto flex items-center gap-2"},$d={class:"overflow-x-auto"},Dd={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"},Ld={class:"text-left font-medium text-gray-700"},Od={key:0,class:"py-2 pr-4 min-w-[80px] max-w-[120px] text-right"},Ad={class:"divide-y divide-gray-200"},Id=["href"],Md={key:2},Rd={key:3},Pd={key:0,class:"py-2 pr-4 text-right"},Fd={key:0},zd={key:0},jd=["colspan"],Ds=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},path:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(t){const n=e.getCurrentInstance(),o=e.ref([]),s=e.ref([]),r=_d,l=t,i=e.ref([]),a=e.ref(""),c=e.ref(""),p=e.ref(""),m=e.ref(1),f=e.ref(10),u=e.ref(0),k=e.ref(0),_=e.ref("id"),x=e.ref("");let w=null,C=0;const R=e.ref(null);async function T(){const d=m.value,v=++C,g=new URLSearchParams,b=p.value.trim();b&&g.set("search",b),g.set("page",String(d)),g.set("limit",String(f.value));const O=`/api/data/${l.token}${g.toString()?`?${g.toString()}`:""}`;let A;try{const le=await fetch(O);if(!le.ok)throw new Error(`Request failed with status ${le.status}`);A=await le.json()}catch(le){v===C&&(o.value=[],k.value=0,u.value=0),console.error("Failed to load table data",le);return}if(v!==C)return;o.value=Array.isArray(A?.rows)?A.rows:[],s.value=E(A?.columns||[]),i.value=Array.isArray(A?.actions)?A.actions:[],a.value=A?.form,c.value=A?.addToken,_.value=typeof A?.pk=="string"&&A.pk?A.pk:_.value,typeof A?.form=="string"&&A.form&&(x.value=A.form.replace(/\.form$/,".table")),Te();const P=Number(A?.total??A?.count??A?.totalCount),V=Number(A?.filtered??A?.filteredCount);u.value=Number.isFinite(P)&&P>0?P:o.value.length,k.value=Number.isFinite(V)&&V>0?V:Math.max(o.value.length,u.value);const ke=Math.max(1,Math.ceil((k.value||o.value.length||1)/f.value));let _e=d;typeof A?.page=="number"&&A.page>0&&(_e=A.page),_e>ke&&(_e=ke),_e<1&&(_e=1);const nn=_e!==d;if(m.value=_e,nn&&k.value>0)return T()}const{$notify:D,$confirm:B,$form:H}=n?.appContext?.config?.globalProperties||{};function K(){if(Ke.emitter?.emit){Ke.emitter.emit("updateCard");return}if(typeof window<"u"&&typeof window.location?.reload=="function"){window.location.reload();return}T()}async function M(d){typeof H=="function"&&(await H({token:d.token}),K())}async function I(){typeof H=="function"&&(await H({token:c.value}),K())}function F(d){B({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const v=await fetch(`/api/table/${d.token}`,{method:"DELETE"});if(!v.ok){const{error:g}=await v.json();D({title:"Помилка",type:"warning",message:g});return}D({title:"Видаленно",message:"Успішно видалено"}),await T()}})}e.onMounted(async()=>{await T(),Ke.emitter?.on?.("updateCard",T)}),e.onBeforeUnmount(()=>{Ke.emitter?.off?.("updateCard",T)});function z(d){return typeof d?.format=="string"?d.format.toLowerCase():""}function E(d){const v=new Map;s.value.forEach(b=>{b?.name&&v.set(b.name,!!b.hidden)});const g=d.map(b=>{const O=v.has(b.name)?v.get(b.name):!!b.hidden;return{...b,hidden:O}});return g.length&&!g.some(b=>!b.hidden)&&(g[0].hidden=!1),g}const $=e.computed(()=>{const d=s.value.filter(v=>!v.hidden);return d.length?d:s.value}),N=e.computed(()=>{const d=[],v=new Set;for(const g of i.value){if(typeof g=="string"){if(g==="view"){const b="row:view";v.has(b)||(d.push({key:b,type:"view",label:"Переглянути",scope:"row",handler:io}),v.add(b));continue}if(g==="edit"){const b="row:edit";v.has(b)||(d.push({key:b,type:"edit",label:"Редагувати",scope:"row",handler:yt}),v.add(b));continue}if(g==="delete"||g==="del"){const b="row:delete";v.has(b)||(d.push({key:b,type:"delete",label:"Видалити",scope:"row",handler:to,variant:"danger"}),v.add(b));continue}if(g==="add"){const b="toolbar:add";v.has(b)||(d.push({key:b,type:"add",label:"Додати",scope:"toolbar"}),v.add(b))}continue}if(g&&typeof g=="object"){const b=String(g.name??g.type??"action"),O=String(g.label??g.title??b),A=g.scope==="toolbar"?"toolbar":"row",P=`${A}:${b}`;if(v.has(P))continue;v.add(P),d.push({key:P,type:b,label:O,scope:A,handler:A==="row"?V=>no(g,V):void 0,variant:g.variant==="danger"?"danger":"default",original:g})}}return d}),L=e.computed(()=>N.value.filter(d=>d.scope==="row"&&typeof d.handler=="function")),J=e.computed(()=>N.value.filter(d=>d.scope==="toolbar")),ae=e.computed(()=>L.value.length>0),Me=e.computed(()=>J.value.some(d=>d.type==="add")),Be=e.computed(()=>o.value),be=e.computed(()=>{const d=k.value||Be.value.length,v=Math.ceil(d/f.value);return v>0?v:1}),Ne=e.computed(()=>{const d=Be.value.length,v=k.value||d,g=u.value||v;return`Показано ${d} з ${v} (усього ${g})`});function xe(){m.value<be.value&&(m.value+=1,T())}function Xn(){m.value>1&&(m.value-=1,T())}e.watch(s,d=>{d?.length&&(d.some(v=>!v.hidden)||(d[0].hidden=!1))},{deep:!0});function Qn(){w&&clearTimeout(w),Te(),w=setTimeout(()=>{m.value=1,T()},300)}function ht(d){const v=_.value||"id",g=d?.token??d?.[v]??d?.id;return g?String(g):""}function Zt(d){const v=$.value[d],g=["py-2",...gt(v)];d===0&&g.push("pl-4");const b=d===$.value.length-1&&!ae.value;return g.push(b?"pr-4":"pr-5"),g.join(" ")}function Yt(d,v){const g=["py-2",...gt(v)];z(v)==="badge"&&g.push("center"),tt(v)==="wrap"?g.push("whitespace-normal","break-words"):g.push("truncate"),d===0&&g.push("pl-4");const b=d===$.value.length-1&&!ae.value;return g.push(b?"pr-4":"pr-5"),g.join(" ")}function tt(d){return(typeof d?.overflow=="string"?d.overflow.toLowerCase():"")==="wrap"?"wrap":"clip"}function gt(d){const v=[],g=P=>{if(P==null||P==="")return;const V=Number(P);return Number.isFinite(V)&&V>0?`${V}px`:String(P).replace(/\s+/g,"")},b=g(d?.width),O=g(d?.minWidth),A=g(d?.maxWidth);return b?(v.push(`min-w-[${b}]`,`max-w-[${b}]`),v):(v.push(`min-w-[${O??"100px"}]`),v.push(`max-w-[${A??"350px"}]`),v)}function Xt(d){if(!L.value.length)return!1;const v=_.value||"id";return!!(d?.token||d?.[v]||d?.id)}function Vn(d){return R.value===ht(d)}function eo(d){const v=ht(d);v&&(R.value=R.value===v?null:v)}function Te(){R.value=null}function Qt(d,v){const g=v?.tooltip;if(!g)return;const b=S(d,v);let O,A=v?.tooltipWrap!==!1;if(typeof g=="string"){const P=g.trim();if(!P)return;const V=P.toLowerCase();if(["true","1","yes"].includes(V))O=typeof b=="string"?b:String(b??"");else{if(["false","0","no"].includes(V))return;O=P}}else g===!0?O=b:typeof g=="object"&&(typeof g.text=="string"&&(O=g.text.trim()),typeof g.wrap=="boolean"&&(A=g.wrap!==!1));if(!O){if(b==null||b==="")return;O=String(b)}if(O.trim())return A?{text:O,wrap:!0}:O}function yt(d){Te(),M(d)}function to(d){Te(),F(d)}async function no(d,v){Te();const g=_.value||"id",b=d.isId?v?.[g]??v?.id:v?.token??v?.[g]??v?.id;if(!b){console.warn("Cannot execute action without identifier",d);return}if(d.form&&typeof d.api=="string"&&d.api&&typeof H=="function"){await so(d,v,b);return}if(d.form&&typeof H=="function"){const O=await vt(d.form,b),A={form:d.form,token:O?.token??v?.token??b,schema:O?.schema,mode:O?.mode??"edit"};O?.data!==void 0&&(A.defaultValue=O.data);try{await H(A),K()}catch(P){console.error("Failed to execute form action",P)}return}if(typeof d.api=="string"&&d.api){const O=We(d.api,b);window.location.href=O;return}v?.token&&typeof H=="function"&&(await H({token:v.token}),K())}function We(d,v){return`${d.endsWith("/")?d:`${d}/`}${v}`}async function vt(d,v){const g=`/api/form/${d}/${v}`;try{const b=await fetch(g);if(!b.ok)throw new Error(`Request failed with status ${b.status}`);return await b.json()}catch(b){console.error("Failed to load form config",b),D({title:"Помилка",type:"warning",message:"Не вдалося отримати дані форми."});return}}async function bt(d){const v=`/api/template/form/${d}`;try{const g=await fetch(v);if(!g.ok)throw new Error(`Request failed with status ${g.status}`);return(await g.json())?.schema}catch(g){console.error("Failed to load form template",g);return}}function oo(d){if(d!=null){if(d?.data!==void 0)return d.data;if(d?.defaultValue!==void 0)return d.defaultValue;if(d?.values!==void 0)return d.values;if(typeof d=="object"&&!Array.isArray(d)){const{schema:v,token:g,mode:b,message:O,successMessage:A,...P}=d;if(Object.keys(P).length)return P}}}async function so(d,v,g){const b=We(d.api,g),O=(typeof d.method=="string"?d.method:"PUT").toUpperCase();let A;try{const le=await fetch(b);if(!le.ok)throw new Error(`Request failed with status ${le.status}`);A=await le.json()}catch(le){console.error("Failed to load action data",le),en("Не вдалося отримати дані форми.");return}const P=typeof d.form=="string"?d.form.replace(/\.table$/,".form"):void 0,V=A?.schema??(P?await bt(P):void 0),ke={mode:A?.mode??"edit"};P&&(ke.form=P),V&&(ke.schema=V);const _e=oo(A);_e!==void 0&&(ke.defaultValue=_e);const nn=await H(ke);if(nn)try{const le=await fetch(b,{method:O,headers:{"Content-Type":"application/json"},body:JSON.stringify(nn)});if(!le.ok){const Ms=await Vt(le),Lp=Ms?.error??Ms?.message??"Не вдалося зберегти дані.";throw new Error(Lp)}ro(`Дані успішно ${ke.value==="add"?"збережено":"оновлено"}`),K()}catch(le){console.error("Failed to submit action data",le),en("Не вдалося зберегти дані.")}}async function Vt(d){try{return await d.json()}catch{return}}function en(d){D({title:"Помилка",type:"error",message:d})}function ro(d){D({title:"Успіх",type:"success",message:d})}function io(d){Te();const v=x.value||(a.value?String(a.value).replace(/\.form$/,".table"):""),g=_.value||"id",b=d?.[g]??d?.id??d?.token;if(v&&b){const O=`/card/${v}/${b}`;window.location.href=O;return}if(d?.token&&typeof H=="function"){H({token:d.token,readonly:!0,mode:"view"});return}d?.token&&M(d)}function kt(d){if(!R.value)return;const v=d.target;if(!v)return;const g=v.closest("[data-action-key]");g&&g.getAttribute("data-action-key")===R.value||Te()}e.onMounted(()=>{document.addEventListener("click",kt,!0)}),e.onBeforeUnmount(()=>{w&&clearTimeout(w),document.removeEventListener("click",kt,!0),Ke.emitter?.off?.("updateCard",T)});function tn(d,v){const b=d?.[`${v.name}_text`];if(Array.isArray(b))return b.length?b.join(", "):"-";if(b!=null&&b!=="")return b;const O=d?.[v.name];return Array.isArray(O)?O.length?O.join(", "):"-":O??"-"}function h(d,v){const b=d?.[`${v.name}_data`];if(b&&typeof b=="object")return{text:b.text??b.label??b.name??b.title??"-",color:b.color,textColor:b.textColor};const O=d?.[`${v.name}_text`]??d?.[v.name];return{text:(Array.isArray(O)?O.join(", "):O)??"-"}}function y(d,v){const g=h(d,v);return g.color?{backgroundColor:g.color,color:g.textColor??"#ffffff"}:{}}function S(d,v){const g=z(v);if(g==="badge")return h(d,v).text;if(g==="select")return tn(d,v);if(g==="slot")return"-";if(g==="text")return d?.[v.name]??"-";const b=d?.[`${v.name}_data`];return b!=null&&typeof b!="object"?b:d?.[`${v.name}_text`]??d?.[v.name]??"-"}return(d,v)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Cd,[e.createElementVNode("div",Sd,[e.createElementVNode("div",Bd,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":v[0]||(v[0]=g=>p.value=g),type:"text",class:"w-52 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",onInput:Qn},null,544),[[e.vModelText,p.value]])]),e.createElementVNode("div",Td,[e.createVNode(gd,{columns:s.value,"onUpdate:columns":v[1]||(v[1]=g=>s.value=g)},null,8,["columns"]),Me.value&&c.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:I,class:"inline-flex size-8 items-center justify-center rounded-lg bg-blue-500 text-white shadow-sm transition-colors hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",title:"Додати запис","aria-label":"Додати запис"},v[2]||(v[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)]))):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",$d,[e.createElementVNode("table",Dd,[e.createElementVNode("thead",Ld,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(g,b)=>(e.openBlock(),e.createElementBlock("th",{key:g.name,class:e.normalizeClass(Zt(b))},e.toDisplayString(g.ua),3))),128)),ae.value?(e.openBlock(),e.createElementBlock("th",Od," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",Ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Be.value,g=>(e.openBlock(),e.createElementBlock("tr",{class:"bg-white odd:bg-gray-50",key:g.id??JSON.stringify(g)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,(b,O)=>e.withDirectives((e.openBlock(),e.createElementBlock("td",{key:b.name,class:e.normalizeClass(Yt(O,b))},[b.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:b.link.replace("{{id}}",g.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(S(g,b)),9,Id)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[z(b)==="slot"&&b.slot?.content?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(td)(b.slot.content)),{key:0,data:g,row:g,column:b,value:g?.[b.name]},null,8,["data","row","column","value"])):z(b)==="badge"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"items-center px-2 py-1 rounded-full text-xs font-semibold text-center justify-center flex",style:e.normalizeStyle(y(g,b))},e.toDisplayString(h(g,b).text),5)):z(b)==="select"?(e.openBlock(),e.createElementBlock("span",Md,e.toDisplayString(tn(g,b)),1)):(e.openBlock(),e.createElementBlock("span",Rd,e.toDisplayString(S(g,b)),1))],64))],2)),[[e.unref(r),Qt(g,b)]])),128)),ae.value?(e.openBlock(),e.createElementBlock("td",Pd,[Xt(g)?(e.openBlock(),e.createElementBlock("div",Fd,[e.createVNode(Nd,{row:g,actions:L.value,"is-open":Vn(g),"action-key":ht(g),onToggle:b=>eo(g)},null,8,["row","actions","is-open","action-key","onToggle"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),128)),Be.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",zd,[e.createElementVNode("td",{colspan:$.value.length+(ae.value?1:0),class:"py-6 text-center text-gray-500"}," Немає записів для відображення ",8,jd)]))])])]),e.createVNode(ld,{"current-page":m.value,"total-pages":be.value,label:Ne.value,onPrevious:Xn,onNext:xe},null,8,["current-page","total-pages","label"])]))}}),Hd={class:"p-[20px]"},Ud={class:"flex gap-[6px] mb-5"},qd={class:"vs-form-text relative bg-white rounded-lg flex-grow"},Wd={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},Kd={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Gd={class:"space-y-8"},Jd={key:0},Zd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Yd=["onClick"],Xd={class:"md:col-span-2"},Qd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Vd={class:"text-sm text-gray-500 dark:text-neutral-500"},ep={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},tp=["checked","onChange"],np={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},op={class:"md:col-span-2"},sp={class:"font-semibold text-gray-800 dark:text-neutral-200"},rp=["onClick"],ip={class:"md:col-span-2"},lp={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},ap={class:"text-sm text-gray-500 dark:text-neutral-500"},cp={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},dp=["checked","onChange"],Gt=e.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(t){const n=t,o=e.ref(""),s=["view","add","edit","del"],r=e.ref({});e.onMounted(async()=>{const x=await(await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`)).json();x.routes&&x.routes.forEach(w=>{r.value[w.path]=new Set(w.actions)})});const l=(_,x)=>r.value[_]?.has(x)??!1,i=(_,x)=>{r.value[_]||(r.value[_]=new Set),r.value[_].has(x)?r.value[_].delete(x):r.value[_].add(x)},a=(_,x)=>{_.forEach(w=>{w.path&&(r.value[w.path]||(r.value[w.path]=new Set),r.value[w.path].has(x)?r.value[w.path].delete(x):r.value[w.path].add(x))})},c=e.computed(()=>Object.entries(r.value).map(([_,x])=>({path:_,actions:Array.from(x)})).filter(_=>_.actions.length)),p=async()=>{await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({routes:c.value})}),Ke.notify({title:"Success!",message:"Permissions saved."})},m=()=>{r.value={}},f=_=>{if(!o.value.trim())return _;const x=o.value.toLowerCase();return _.filter(w=>w.ua.toLowerCase().includes(x)||w.path&&w.path.toLowerCase().includes(x))},u=e.computed(()=>f(n.data.routers.filter(_=>!_.menu))),k=e.computed(()=>n.data.routers.filter(_=>_.menu).map(_=>({..._,menu:f(_.menu||[])})).filter(_=>_.menu&&_.menu.length>0));return(_,x)=>(e.openBlock(),e.createElementBlock("div",Hd,[e.createElementVNode("div",Ud,[e.createElementVNode("div",qd,[x[1]||(x[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":x[0]||(x[0]=w=>o.value=w),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,o.value]])]),e.createElementVNode("button",{onClick:m,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: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"}," Зберегти ")]),e.createElementVNode("div",Wd,[x[2]||(x[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(s,(w,C)=>e.createElementVNode("div",{class:"col-span-1 text-center",key:C},[e.createElementVNode("h3",Kd,e.toDisplayString(w),1)])),64))]),e.createElementVNode("div",Gd,[u.value.length?(e.openBlock(),e.createElementBlock("div",Jd,[e.createElementVNode("ul",Zd,[x[3]||(x[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(s,(w,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:R=>a(u.value,s[C])}," Toggle all ",8,Yd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,(w,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",Xd,[e.createElementVNode("p",Qd,e.toDisplayString(w.ua),1),e.createElementVNode("p",Vd,e.toDisplayString(w.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(R,T)=>e.createElementVNode("li",{key:T,class:"col-span-1"},[e.createElementVNode("div",ep,[e.createElementVNode("input",{type:"checkbox",checked:l(w.path,R),onChange:D=>i(w.path,R),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,tp)])])),64))]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(w,C)=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"space-y-5"},[e.createElementVNode("ul",np,[e.createElementVNode("li",op,[e.createElementVNode("h3",sp,e.toDisplayString(w.ua),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(R,T)=>e.createElementVNode("li",{key:T,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:D=>a(w.menu,s[T])}," Toggle all ",8,rp)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.menu,(R,T)=>(e.openBlock(),e.createElementBlock("ul",{key:T,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",ip,[e.createElementVNode("p",lp,e.toDisplayString(R.ua),1),e.createElementVNode("p",ap,e.toDisplayString(R.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(D,B)=>e.createElementVNode("li",{key:B,class:"col-span-1"},[e.createElementVNode("div",cp,[e.createElementVNode("input",{type:"checkbox",checked:l(R.path,D),onChange:H=>i(R.path,D),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,dp)])])),64))]))),128))]))),128))])]))}}),qe={"vs-widget-map":Ct,"vs-widget-comments":wt,"vs-widget-history":Nt,"vs-widget-gallery":_t,"vs-widget-file":xt,"vs-widget-list":an,"vs-widget-table":Ds,"vs-group-interface":Gt};function Ls(t){if(t==null)return null;const n=Number(t);return Number.isFinite(n)?Math.max(1,Math.min(12,Math.floor(n))):null}function Os(t){const n={...t};return Array.isArray(t.items)&&(n.items=t.items.map(o=>Os(o))),n}function pp(t,n=12){if(!t.length)return;const o=[],s=[];t.forEach(c=>{const p=Ls(c.col);p?(c.col=p,o.push({item:c,span:p})):s.push(c)});const r=o.reduce((c,p)=>c+p.span,0);let l=n-r;if(s.length===0)return;l<=0&&(l=n);const i=Math.max(1,Math.floor(l/s.length));let a=Math.max(0,l-i*s.length);s.forEach(c=>{let p=i;a>0&&(p+=1,a-=1),c.col=Math.max(1,Math.min(12,p))})}function Jt(t,n=12){if(!Array.isArray(t)||!t.length)return[];const o=t.map(s=>Os(s));return o.forEach(s=>{Array.isArray(s.items)&&s.items.length&&(s.items=Jt(s.items,12))}),pp(o,n),o}function As(t){const n=Ls(t);return n?n>=12?["md:col-span-12","lg:col-span-12"]:[`md:col-span-${n}`,`lg:col-span-${n}`]:[]}const fp={class:"text-lg font-semibold text-gray-900"},mp=["innerHTML"],up={key:0,class:"grid grid-cols-12 gap-4"},hp={key:0,class:"mb-4 pb-2 border-b border-gray-200"},gp={class:"text-lg font-semibold text-gray-900"},yp=["innerHTML"],mt=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},hideTitle:{type:Boolean},styling:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(t){const n=t,o=e.computed(()=>{if(!n.col)return{};const p=Math.max(1,Math.min(12,Number(n.col)));return{[`md:col-span-${p}`]:!0,[`lg:col-span-${p}`]:!0}}),s=e.computed(()=>Jt(n.items));function r(p){const m=["col-span-12"],f=As(p.col);return f.length&&m.push(...f),m}function l(p){return qe[p]||p}function i(p,m){if(!p||typeof m!="string"||!m)return{found:!1,value:void 0};const f=m.split(".");let u=p;for(const k of f){if(u==null||typeof u!="object"&&!Array.isArray(u))return{found:!1,value:void 0};if(!(k in u))return{found:!1,value:void 0};u=u[k]}return{found:!0,value:u}}const a=function(p={}){const m={...p};return Object.entries(m).forEach(([f,u])=>{if(f!=="props"&&typeof u=="string"){const k=i(n.data,u);k.found&&(m[f]=k.value)}}),p.props&&typeof p.props=="object"&&Object.entries(p.props).forEach(([f,u])=>{if(typeof u=="string"){const k=i(n.data,u);m[f]=k.found?k.value:u}else m[f]=u}),delete m.props,m},c=e.computed(()=>{const p={};return n.col&&(p.col=n.col),p});return(p,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[o.value,p.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[!p.hideTitle&&p.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mb-4 pb-2 border-b border-gray-200",p.styling?.classItemTitle])},[e.createElementVNode("h3",fp,e.toDisplayString(p.title),1)],2)):e.createCommentVNode("",!0),p.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:p.html,class:"text-gray-900 leading-relaxed"},null,8,mp)):p.type?.includes("tabs")?(e.openBlock(),e.createBlock(ut,{key:2,view:p.type,panels:p.items,data:p.data,styling:p.styling},null,8,["view","panels","data","styling"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[s.value.length?(e.openBlock(),e.createElementBlock("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(f,u)=>(e.openBlock(),e.createElementBlock("div",{key:f.name||f.component||u,class:e.normalizeClass(r(f))},[f.title||f.label?(e.openBlock(),e.createElementBlock("div",hp,[e.createElementVNode("h3",gp,e.toDisplayString(f.title||f.label),1)])):e.createCommentVNode("",!0),f.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:f.html,class:"text-gray-900 leading-relaxed"},null,8,yp)):f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(f.component)),e.mergeProps({key:2,ref_for:!0},{geom:p.data.geom,id:p.data.id,...c.value,...a(f),data:p.data},{class:"w-full"}),null,16)):e.renderSlot(p.$slots,"default",{key:3})],2))),128))])):e.createCommentVNode("",!0)],64))],2))}}),vp={class:"grid grid-cols-12 gap-[20px]"},bp={key:0,class:"col-span-4"},kp=["innerHTML"],Ep=["onClick"],wp=["innerHTML"],Np={key:1,class:"flex w-full"},xp={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},_p=["onClick"],Cp={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},Sp={class:"flex-1 p-4"},Bp=["innerHTML"],Tp={class:"grid grid-cols-12 gap-4"},$p={key:3,class:"w-full h-full"},ut=e.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(t){const n=t;function o(){const E=typeof window<"u"?window:globalThis,$="__vsCardAnonymousCounter__",N=E[$]??0;return E[$]=N+1,N===0?"tab":`tab${N}`}const s=e.ref(0),r=e.ref([]);let l=!1;const i=e.ref(n.id??o());e.watch(()=>n.id,E=>{E&&(i.value=E)});const a=new Map,c=e.computed(()=>n.view==="tabs"||n.view==="vertical-tabs");e.provide("vsCardTabsContext",c);function p(E,$){const N=$?.path;return N?(a.has(N)||a.set(N,e.defineAsyncComponent(()=>import(N))),a.get(N)):typeof E=="string"&&qe[E]?qe[E]:$?.component&&qe[$.component]?qe[$.component]:$?.name&&qe[$.name]?qe[$.name]:E}function m(E){return E.forEach($=>{$.type&&($.view=$.type)}),r.value=E.filter($=>$.type==="pin"),E.filter($=>$.type!=="pin")}const f=e.computed(()=>{let E;return n.panels&&n.panels.length>0?E=n.normalizeTabs?m(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(E=n.data.filter(N=>N.type.includes("tabs"))[0]?.items),Jt(E,12)}),u=e.computed(()=>i.value),k=e.computed(()=>{let E;return n.panels&&n.panels.length>0?E=n.normalizeTabs?m(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(E=n.data),Jt(E,12)}),_=e.computed(()=>({[`view-${n.view}`]:!0}));function x(E,$){if(!E||typeof $!="string"||!$)return{found:!1,value:void 0};const N=$.split(".");let L=E;for(const J of N){if(L==null||typeof L!="object"&&!Array.isArray(L))return{found:!1,value:void 0};if(!(J in L))return{found:!1,value:void 0};L=L[J]}return{found:!0,value:L}}const w=E=>{const $={...E};return Object.entries($).forEach(([N,L])=>{if(N!=="props"&&typeof L=="string"){const J=x(n.data,L);J.found&&($[N]=J.value)}}),E.props&&typeof E.props=="object"&&Object.entries(E.props).forEach(([N,L])=>{if(typeof L=="string"){const J=x(n.data,L);$[N]=J.found?J.value:L}else $[N]=L}),delete $.props,n.data&&($.data=n.data),$};function C(E){const $=["col-span-12"],N=As(E.col);return N.length&&$.push(...N),$}const R=e.ref([]),T=e.ref([]),D=e.ref([]);function B(E,$){E&&E instanceof HTMLElement&&(R.value[$]=E)}function H(){T.value=R.value.map(E=>E.offsetWidth),D.value=R.value.map(E=>E.offsetLeft)}function K(){if(typeof window>"u")return null;const E=u.value;if(!E)return null;const N=new URL(window.location.href).searchParams.get(E);if(N===null)return null;const L=Number.parseInt(N,10);return Number.isNaN(L)?null:L}function M(E){if(typeof window>"u")return;const $=u.value;if(!$)return;const N=new URL(window.location.href);E<=0?N.searchParams.delete($):N.searchParams.set($,String(E));const L=window.history.state??{};window.history.replaceState(L,document.title,N)}function I(){if(l)return;const E=K();if(E===null||!f.value.length)return;const $=Math.min(Math.max(E,0),f.value.length-1);$!==E&&M($),$!==s.value&&(s.value=$),l=!0}function F(){l=!1,I()}let z=null;return e.onMounted(()=>{e.nextTick(()=>{I(),H()}),typeof window<"u"&&window.addEventListener("popstate",F),z=new ResizeObserver(()=>H()),z.observe(document.body)}),e.onBeforeUnmount(()=>{z?.disconnect(),typeof window<"u"&&window.removeEventListener("popstate",F)}),e.watch(s,E=>{e.nextTick(()=>{H()}),M(E)}),e.watch(f,()=>{l=!1,I()}),(E,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(E.classWrapper||_.value)},[e.createElementVNode("div",vp,[r.value.length!==0?(e.openBlock(),e.createElementBlock("div",bp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[0].items,(N,L)=>(e.openBlock(),e.createElementBlock("div",{key:N.name||L,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,kp)):N.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component,N)),e.mergeProps({key:1,ref_for:!0},N.component==="Card"?N:w(N),{id:E.data.id,class:["w-full h-full",E.styling?.classItem]}),null,16,["id","class"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.value.length!==0?"col-span-8":"col-span-12")},[E.view==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full",E.styling?.classTabWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative gap-4 my-6",E.styling?.classTabHeader])},[T.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:T.value[s.value]+"px",left:D.value[s.value]+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,L)=>(e.openBlock(),e.createElementBlock("button",{key:N.name||L,ref_for:!0,ref:J=>B(J,L),onClick:J=>s.value=L,class:e.normalizeClass(["px-1 py-2 text-sm font-medium transition-colors",s.value===L?"text-blue-600 border-blue-600 border-b-2 ":"text-gray-600 hover:text-gray-800"])},e.toDisplayString(N.title||N.label||N.name||`Tab ${L+1}`),11,Ep))),128))],2),e.createElementVNode("div",{class:e.normalizeClass([E.styling?.classTabContent,"p-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,L)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:N.name||L,class:e.normalizeClass(["transition-all duration-300 ease-in-out",s.value===L?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",E.classPanel||"w-full border-gray-100"])},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,wp)):E.$slots[`tab-${L}`]?e.renderSlot(E.$slots,`tab-${L}`,{key:1,item:N,data:E.data}):N.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(mt),e.mergeProps({key:2,ref_for:!0},w(N),{items:N.items,"hide-title":!0,class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component||N.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component||N.name,N)),e.mergeProps({key:3,ref_for:!0},N.component==="Card"?N:w(N),{styling:E.styling,id:E.data.id,class:["w-full h-full",E.styling?.classItem]}),null,16,["styling","id","class"])):e.renderSlot(E.$slots,N.slot||`tab-${L}`,{key:4,item:N,data:E.data})],2)),[[e.vShow,s.value===L]])),128))],2)],2)):E.view==="vertical-tabs"?(e.openBlock(),e.createElementBlock("div",Np,[e.createElementVNode("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,L)=>(e.openBlock(),e.createElementBlock("button",{key:N.name||L,onClick:J=>s.value=L,class:e.normalizeClass(["relative px-1 py-4 text-sm font-medium text-left transition-colors duration-300",s.value===L?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[e.createTextVNode(e.toDisplayString(N.title||N.label||N.name||`Tab ${L+1}`)+" ",1),s.value===L?(e.openBlock(),e.createElementBlock("span",Cp,$[0]||($[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,_p))),128))]),e.createElementVNode("div",Sp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,L)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:N.name||L,class:e.normalizeClass(["transition-all duration-300 ease-in-out",s.value===L?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",E.classPanel||"w-full border-gray-100 py-2"])},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,Bp)):E.$slots[`tab-${L}`]?e.renderSlot(E.$slots,`tab-${L}`,{key:1,item:N,data:E.data}):N.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(mt),e.mergeProps({key:2,ref_for:!0},w(N),{items:N.items,"hide-title":!0,class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component||N.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component||N.name,N)),e.mergeProps({key:3,ref_for:!0},N.component==="Card"?N:w(N),{id:E.data.id,class:["w-full h-full",E.styling?.classItem]}),null,16,["id","class"])):e.renderSlot(E.$slots,N.slot||`tab-${L}`,{key:4,item:N,data:E.data})],2)),[[e.vShow,s.value===L]])),128))])])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(E.styling?.classPlain||"p-1 w-full")},[e.createElementVNode("div",Tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(N,L)=>(e.openBlock(),e.createElementBlock("div",{key:N.name||N.component||L,class:e.normalizeClass(C(N))},[E.$slots[`panel-${L}`]?e.renderSlot(E.$slots,`panel-${L}`,{key:0,item:N,data:E.data}):N.items||N.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(mt),e.mergeProps({key:1,ref_for:!0},w(N),{items:N.items||[],class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component,N)),e.mergeProps({key:2,ref_for:!0},w(N),{class:["w-full h-full",[E.styling?.classItem]],styling:E.styling}),null,16,["class","styling"])):(e.openBlock(),e.createElementBlock("div",$p,[e.renderSlot(E.$slots,N.slot||`panel-${L}`,{item:N,data:E.data})]))],2))),128))])],2))],2)])],2))}}),Dp=["onClick"],Is=Re(e.defineComponent({__name:"CopyNotification",setup(t,{expose:n}){const o=e.ref([]);let s=1;const r=()=>{if(o.value.length>=10){const a=o.value[0];clearTimeout(a.timer),o.value.shift()}const i={id:s++,timer:setTimeout(()=>{l(i.id)},1500)};o.value.push(i)},l=i=>{const a=o.value.findIndex(c=>c.id===i);if(a!==-1){const c=o.value[a];clearTimeout(c.timer),o.value.splice(a,1)}};return n({addNotification:r}),e.onUnmounted(()=>{o.value.forEach(i=>{clearTimeout(i.timer)})}),(i,a)=>(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(o.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.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(Ws),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),a[0]||(a[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:p=>l(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(rn),{class:"h-4 w-4"})],8,Dp)]))),128))]),_:1})]))}}),[["__scopeId","data-v-d1ac6329"]]);ut.install=function(t){t.component("vs-widget-file",xt),t.component("vs-widget-comments",wt),t.component("vs-widget-history",Nt),t.component("vs-widget-gallery",_t),t.component("vs-widget-map",Ct),t.component("vs-group-interface",Gt),t.component("CommentsWidget",wt),t.component("HistoryWidget",Nt),t.component("GalleryWidget",_t),t.component("FilesWidget",xt),t.component("MapWidget",Ct),t.component("Card",ut),t.component("CardItem",mt),t.component("DescriptionListWidget",an),t.component("CopyNotification",Is),t.component("GroupInterfaceWidget",Gt)},ee.Card=ut,ee.CardItem=mt,ee.CommentsWidget=wt,ee.CopyNotification=Is,ee.DescriptionListWidget=an,ee.FilesWidget=xt,ee.GalleryWidget=_t,ee.GroupInterfaceWidget=Gt,ee.HistoryWidget=Nt,ee.MapWidget=Ct,ee.TableWidget=Ds,ee.default=ut,Object.defineProperties(ee,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|
|
151
|
+
**/const ms=Symbol(process.env.NODE_ENV!=="production"?"vModelRadio":""),us=Symbol(process.env.NODE_ENV!=="production"?"vModelCheckbox":""),hs=Symbol(process.env.NODE_ENV!=="production"?"vModelText":""),gs=Symbol(process.env.NODE_ENV!=="production"?"vModelSelect":""),Kn=Symbol(process.env.NODE_ENV!=="production"?"vModelDynamic":""),ys=Symbol(process.env.NODE_ENV!=="production"?"vOnModifiersGuard":""),vs=Symbol(process.env.NODE_ENV!=="production"?"vOnKeysGuard":""),bs=Symbol(process.env.NODE_ENV!=="production"?"vShow":""),Gn=Symbol(process.env.NODE_ENV!=="production"?"Transition":""),ks=Symbol(process.env.NODE_ENV!=="production"?"TransitionGroup":"");oa({[ms]:"vModelRadio",[us]:"vModelCheckbox",[hs]:"vModelText",[gs]:"vModelSelect",[Kn]:"vModelDynamic",[ys]:"withModifiers",[vs]:"withKeys",[bs]:"vShow",[Gn]:"Transition",[ks]:"TransitionGroup"});let Qe;function Oc(t,n=!1){return Qe||(Qe=document.createElement("div")),n?(Qe.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,Qe.children[0].getAttribute("foo")):(Qe.innerHTML=t,Qe.textContent)}const Ac={parseMode:"html",isVoidTag:Xl,isNativeTag:t=>Jl(t)||Zl(t)||Yl(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:Oc,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return Gn;if(t==="TransitionGroup"||t==="transition-group")return ks},getNamespace(t,n,o){let s=n?n.ns:o;if(n&&s===2)if(n.tag==="annotation-xml"){if(t==="svg")return 1;n.props.some(r=>r.type===6&&r.name==="encoding"&&r.value!=null&&(r.value.content==="text/html"||r.value.content==="application/xhtml+xml"))&&(s=0)}else/^m(?:[ions]|text)$/.test(n.tag)&&t!=="mglyph"&&t!=="malignmark"&&(s=0);else n&&s===1&&(n.tag==="foreignObject"||n.tag==="desc"||n.tag==="title")&&(s=0);if(s===0){if(t==="svg")return 1;if(t==="math")return 2}return s}},Ic=t=>{t.type===1&&t.props.forEach((n,o)=>{n.type===6&&n.name==="style"&&n.value&&(t.props[o]={type:7,name:"bind",arg:j("style",!0,n.loc),exp:Mc(n.value.content,n.loc),modifiers:[],loc:n.loc})})},Mc=(t,n)=>{const o=Ul(t);return j(JSON.stringify(o),!1,n,3)};function be(t,n){return W(t,n,process.env.NODE_ENV!=="production"?Rc:void 0)}const Rc={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."},Pc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(be(53,r)),n.children.length&&(o.onError(be(54,r)),n.children.length=0),{props:[X(j("innerHTML",!0,r),s||j("",!0))]}},Fc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(be(55,r)),n.children.length&&(o.onError(be(56,r)),n.children.length=0),{props:[X(j("textContent",!0),s?ue(s,o)>0?s:ee(o.helperString(Tt),[s],r):j("",!0))]}},zc=(t,n,o)=>{const s=ds(t,n,o);if(!s.props.length||n.tagType===1)return s;t.arg&&o.onError(be(58,t.arg.loc));function r(){const a=ce(n,"bind");a&&Oe(a.arg,"value")&&o.onError(be(60,a.loc))}const{tag:l}=n,i=o.isCustomElement(l);if(l==="input"||l==="textarea"||l==="select"||i){let a=hs,c=!1;if(l==="input"||i){const p=at(n,"type");if(p){if(p.type===7)a=Kn;else if(p.value)switch(p.value.content){case"radio":a=ms;break;case"checkbox":a=us;break;case"file":c=!0,o.onError(be(59,t.loc));break;default:process.env.NODE_ENV!=="production"&&r();break}}else ga(n)?a=Kn:process.env.NODE_ENV!=="production"&&r()}else l==="select"?a=gs:process.env.NODE_ENV!=="production"&&r();c||(s.needRuntime=o.helper(a))}else o.onError(be(57,t.loc));return s.props=s.props.filter(a=>!(a.key.type===4&&a.key.content==="modelValue")),s},jc=Ee("passive,once,capture"),Hc=Ee("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Uc=Ee("left,right"),Es=Ee("onkeyup,onkeydown,onkeypress"),qc=(t,n,o,s)=>{const r=[],l=[],i=[];for(let a=0;a<n.length;a++){const c=n[a].content;c==="native"&&Xe("COMPILER_V_ON_NATIVE",o,s)||jc(c)?i.push(c):Uc(c)?ae(t)?Es(t.content.toLowerCase())?r.push(c):l.push(c):(r.push(c),l.push(c)):Hc(c)?l.push(c):r.push(c)}return{keyModifiers:r,nonKeyModifiers:l,eventOptionModifiers:i}},ws=(t,n)=>ae(t)&&t.content.toLowerCase()==="onclick"?j(n,!0):t.type!==4?ve(["(",t,`) === "onClick" ? "${n}" : (`,t,")"]):t,Wc=(t,n,o)=>as(t,n,o,s=>{const{modifiers:r}=t;if(!r.length)return s;let{key:l,value:i}=s.props[0];const{keyModifiers:a,nonKeyModifiers:c,eventOptionModifiers:p}=qc(l,r,o,t.loc);if(c.includes("right")&&(l=ws(l,"onContextmenu")),c.includes("middle")&&(l=ws(l,"onMouseup")),c.length&&(i=ee(o.helper(ys),[i,JSON.stringify(c)])),a.length&&(!ae(l)||Es(l.content.toLowerCase()))&&(i=ee(o.helper(vs),[i,JSON.stringify(a)])),p.length){const u=p.map(mn).join("");l=ae(l)?j(`${l.content}${u}`,!0):ve(["(",l,`) + "${u}"`])}return{props:[X(l,i)]}}),Kc=(t,n,o)=>{const{exp:s,loc:r}=t;return s||o.onError(be(61,r)),{props:[],needRuntime:o.helper(bs)}},Gc=(t,n)=>{if(t.type===1&&t.tagType===1&&n.isBuiltInComponent(t.tag)===Gn)return()=>{if(!t.children.length)return;Ns(t)&&n.onError(be(62,{start:t.children[0].loc.start,end:t.children[t.children.length-1].loc.end,source:""}));const s=t.children[0];if(s.type===1)for(const r of s.props)r.type===7&&r.name==="show"&&t.props.push({type:6,name:"persisted",nameLoc:t.loc,value:void 0,loc:t.loc})}};function Ns(t){const n=t.children=t.children.filter(s=>s.type!==3&&!(s.type===2&&!s.content.trim())),o=n[0];return n.length!==1||o.type===11||o.type===9&&o.branches.some(Ns)}const Jc=(t,n)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&(process.env.NODE_ENV!=="production"&&n.onError(be(63,t.loc)),n.removeNode())};function Zc(t,n){return t==="template"?!0:t in xs?xs[t].has(n):n in _s?_s[n].has(t):!(t in Cs&&Cs[t].has(n)||n in Ss&&Ss[n].has(t))}const Ve=new Set(["h1","h2","h3","h4","h5","h6"]),He=new Set([]),xs={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:He,iframe:He,option:He,textarea:He,style:He,title:He},_s={html:He,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"])},Cs={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"])},Ss={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:Ve,h2:Ve,h3:Ve,h4:Ve,h5:Ve,h6:Ve},Yc=(t,n)=>{if(t.type===1&&t.tagType===0&&n.parent&&n.parent.type===1&&n.parent.tagType===0&&!Zc(n.parent.tag,t.tag)){const o=new SyntaxError(`<${t.tag}> cannot be child of <${n.parent.tag}>, according to HTML specifications. This can cause hydration errors or potentially disrupt future functionality.`);o.loc=t.loc,n.onWarn(o)}},Xc=[Ic,...process.env.NODE_ENV!=="production"?[Gc,Yc]:[]],Qc={cloak:Lc,html:Pc,text:Fc,model:zc,on:Wc,show:Kc};function Vc(t,n={}){return Dc(t,Te({},Ac,n,{nodeTransforms:[Jc,...Xc,...n.nodeTransforms||[]],directiveTransforms:Te({},Qc,n.directiveTransforms||{}),transformHoist:null}))}function ed(t,n={}){const o=t.trim().startsWith("<")?t:`<span>${t}</span>`,{code:s}=Vc(o,{mode:"function"}),r=new Function("Vue",`${s}; return render;`)(Ps);return e.defineComponent({name:"DynamicFromString",props:n.props??{},emits:n.emits??[],setup(){return n.setup?.()??{}},render:r})}const Jn={};function td(t){return Jn[t]||(Jn[t]=ed(t,{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}}})),Jn[t]}const nd={class:"mt-4 flex flex-wrap items-center justify-between gap-3 text-sm text-gray-600"},od={class:"flex items-center gap-2"},sd=["disabled"],rd={class:"text-sm"},id=["disabled"],ld=e.defineComponent({__name:"TablePagination",props:{currentPage:{},totalPages:{},label:{}},setup(t){const n=t,o=e.computed(()=>n.currentPage<=1),s=e.computed(()=>n.currentPage>=n.totalPages);return(r,l)=>(e.openBlock(),e.createElementBlock("div",nd,[e.createElementVNode("div",null,e.toDisplayString(r.label),1),e.createElementVNode("div",od,[e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:o.value,onClick:l[0]||(l[0]=i=>r.$emit("previous"))}," Назад ",8,sd),e.createElementVNode("span",rd,"Сторінка "+e.toDisplayString(r.currentPage)+" з "+e.toDisplayString(r.totalPages),1),e.createElementVNode("button",{class:"rounded-md border border-gray-300 px-3 py-1 text-sm transition-colors hover:bg-gray-100 disabled:cursor-not-allowed disabled:text-gray-400",disabled:s.value,onClick:l[1]||(l[1]=i=>r.$emit("next"))}," Далі ",8,id)])]))}}),ad={class:"relative inline-flex"},cd=["aria-label"],dd={class:"px-3 pb-2"},pd={class:"px-3 pb-3 max-h-64 overflow-y-auto"},fd=["onClick"],md={class:"truncate"},ud={key:0,xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},hd="inline-flex items-center justify-center size-8 rounded-lg border border-gray-200 bg-white text-gray-800 shadow-sm hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50",gd=e.defineComponent({__name:"TableColumnSettings",props:{columns:{}},emits:["update:columns"],setup(t,{emit:n}){const o=t,s=n,r=e.useAttrs(),l=e.ref(!1),i=e.ref(""),a=e.ref([...o.columns]),c=e.ref(null),p=e.ref(null),u=e.ref(null),f=e.ref({top:0,left:0}),h=e.computed(()=>{if(!i.value)return a.value;const B=i.value.toLowerCase();return a.value.filter($=>k($).toLowerCase().includes(B))});e.watch(()=>o.columns,B=>{if(!B){a.value=[];return}const $=JSON.stringify(B),S=JSON.stringify(a.value);$!==S&&(a.value=[...B])},{deep:!0}),e.watch(a,B=>{s("update:columns",B)},{deep:!0});function k(B){return B.ua||B.label||B.name||"Колонка"}function _(B){const $=!B.hidden;$&&a.value.filter(S=>!S.hidden).length<=1||(B.hidden=$)}function x(){l.value=!l.value,l.value&&e.nextTick(()=>{u.value?.focus(),w()})}function w(){if(!c.value)return;const B=c.value.getBoundingClientRect();f.value={top:B.bottom+window.scrollY+6,left:B.left+window.scrollX-200}}function C(B){if(!l.value)return;const $=B.target;$&&(p.value?.contains($)||c.value?.contains($)||(l.value=!1))}function M(B){B.key==="Escape"&&(l.value=!1)}return e.onMounted(()=>{document.addEventListener("click",C,!0),document.addEventListener("keydown",M)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C,!0),document.removeEventListener("keydown",M)}),(B,$)=>(e.openBlock(),e.createElementBlock("div",ad,[e.createElementVNode("button",{ref_key:"buttonRef",ref:c,type:"button",onClick:x,class:e.normalizeClass([hd,e.unref(r).class]),"aria-label":e.unref(r)["aria-label"]??"Налаштування колонок",title:"Налаштування колонок"},$[2]||($[2]=[e.createStaticVNode('<svg 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-columns" height="18" width="18" aria-hidden="true"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6h5.5"></path><path d="M4 10h5.5"></path><path d="M4 14h5.5"></path><path d="M4 18h5.5"></path><path d="M14.5 6h5.5"></path><path d="M14.5 10h5.5"></path><path d="M14.5 14h5.5"></path><path d="M14.5 18h5.5"></path></svg>',1)]),10,cd),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"modalRef",ref:p,class:"fixed z-50 w-64 bg-white rounded-xl shadow-lg border border-gray-200 dark:bg-neutral-900 dark:border-neutral-700",style:e.normalizeStyle({top:`${f.value.top}px`,left:`${f.value.left}px`})},[$[5]||($[5]=e.createElementVNode("div",{class:"flex items-center justify-between h-12 px-4 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Налаштування колонок ",-1)),e.createElementVNode("div",dd,[e.withDirectives(e.createElementVNode("input",{ref_key:"searchInput",ref:u,"onUpdate:modelValue":$[0]||($[0]=S=>i.value=S),type:"text",class:"w-full rounded-md border border-gray-200 px-3 py-2 text-sm text-gray-800 placeholder:text-gray-500 focus:outline-none focus:ring-1 focus:ring-blue-500 focus:border-blue-500 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200",placeholder:"Пошук колонок"},null,512),[[e.vModelText,i.value]])]),e.createElementVNode("div",pd,[$[4]||($[4]=e.createElementVNode("p",{class:"px-1 pb-2 text-xs text-gray-500 uppercase tracking-wide"},"Виберіть колонки",-1)),e.createElementVNode("ul",{class:"space-y-1",onClick:$[1]||($[1]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,S=>(e.openBlock(),e.createElementBlock("li",{key:S.name,class:"flex items-center justify-between rounded-lg px-3 py-2 text-sm text-gray-800 hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-800 cursor-pointer",onClick:H=>_(S)},[e.createElementVNode("span",md,e.toDisplayString(k(S)),1),e.createElementVNode("span",{class:e.normalizeClass(["flex items-center justify-center size-4 rounded border border-gray-300 text-white",S.hidden?"bg-white text-transparent":"bg-blue-600 border-blue-600"])},[S.hidden?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("svg",ud,$[3]||($[3]=[e.createElementVNode("path",{d:"M20 6 9 17l-5-5"},null,-1)])))],2)],8,fd))),128))])])],4)):e.createCommentVNode("",!0)]))]))}}),yd=["data-action-key"],vd=["onClick"],bd={key:0,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},kd={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Ed={key:2,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},wd={key:3,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},Nd=e.defineComponent({__name:"RowActionsButton",props:{row:{},actions:{},isOpen:{type:Boolean},actionKey:{}},emits:["toggle"],setup(t,{emit:n}){const o=t,s=n,r=e.ref(null),l=e.computed(()=>!!o.actions?.length),i=e.ref({scrollX:0,scrollY:0,width:0,height:0}),a=e.ref(!1);function c(){s("toggle")}function p(_){_.handler?.(o.row)}const u=e.computed(()=>{if(!o.isOpen)return{};const _=r.value;if(!_)return{};const x=_.getBoundingClientRect(),w=8,C=160,$=(o.actions?.length??0)*36+w*2,S=i.value.height||(typeof window<"u"?window.innerHeight:0),H=i.value.width||(typeof window<"u"?window.innerWidth:0),K=i.value.scrollX||(typeof window<"u"?window.scrollX:0),I=i.value.scrollY||(typeof window<"u"?window.scrollY:0);let A=x.bottom+I+w,F=x.right+K-C;const z=K+H-C-w;return F>z&&(F=z),F<K+w&&(F=K+w),A+$>I+S-w&&(A=x.top+I-$-w),A<I+w&&(A=I+w),{top:`${A}px`,left:`${F}px`,width:"auto"}});function f(){typeof window>"u"||(i.value={scrollX:window.scrollX,scrollY:window.scrollY,width:window.innerWidth,height:window.innerHeight})}function h(){typeof window>"u"||a.value||(a.value=!0,f(),window.addEventListener("scroll",f,{passive:!0}),window.addEventListener("resize",f))}function k(){typeof window>"u"||!a.value||(a.value=!1,window.removeEventListener("scroll",f),window.removeEventListener("resize",f))}return e.watch(()=>o.isOpen,_=>{_?h():k()},{immediate:!0}),e.onMounted(()=>{o.isOpen&&h()}),e.onBeforeUnmount(()=>{k()}),(_,x)=>l.value&&_.actionKey?(e.openBlock(),e.createElementBlock("div",{key:0,class:"relative inline-flex","data-action-key":_.actionKey,ref_key:"anchorRef",ref:r},[e.createElementVNode("button",{type:"button",class:"inline-flex size-7 items-center justify-center rounded-md border border-gray-200 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700 focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:e.withModifiers(c,["stop"])},x[1]||(x[1]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("circle",{cx:"12",cy:"12",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"5",r:"1"}),e.createElementVNode("circle",{cx:"12",cy:"19",r:"1"})],-1)])),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[_.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed z-50 w-40 overflow-hidden rounded-lg border border-gray-200 bg-white py-1 shadow-lg",style:e.normalizeStyle(u.value),onClick:x[0]||(x[0]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.actions,w=>(e.openBlock(),e.createElementBlock("button",{key:w.type,type:"button",class:e.normalizeClass(["flex w-full items-center gap-2 px-4 py-2 text-sm transition-colors",w.variant==="danger"?"text-red-600 hover:bg-red-50":"text-gray-700 hover:bg-gray-50"]),onClick:C=>p(w)},[e.renderSlot(_.$slots,"icon",{action:w},()=>[w.type==="view"?(e.openBlock(),e.createElementBlock("svg",bd,x[2]||(x[2]=[e.createElementVNode("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"12",r:"3"},null,-1)]))):w.type==="edit"?(e.openBlock(),e.createElementBlock("svg",kd,x[3]||(x[3]=[e.createElementVNode("path",{d:"M18 2a2.828 2.828 0 1 1 4 4L7 21l-4 1 1-4Z"},null,-1)]))):w.type==="delete"?(e.openBlock(),e.createElementBlock("svg",Ed,x[4]||(x[4]=[e.createElementVNode("path",{d:"M3 6h18"},null,-1),e.createElementVNode("path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"},null,-1),e.createElementVNode("path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"},null,-1),e.createElementVNode("line",{x1:"10",x2:"10",y1:"11",y2:"17"},null,-1),e.createElementVNode("line",{x1:"14",x2:"14",y1:"11",y2:"17"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",wd,x[5]||(x[5]=[e.createElementVNode("path",{d:"M12 8v8"},null,-1),e.createElementVNode("path",{d:"M8 12h8"},null,-1)])))]),e.createTextVNode(" "+e.toDisplayString(w.label),1)],10,vd))),128))],4)):e.createCommentVNode("",!0)]))],8,yd)):e.createCommentVNode("",!0)}}),Bs=typeof window<"u",Ts=typeof document<"u";function xd(t){if(!Ts)throw new Error("Tooltip requires document to be defined");const n=document.createElement("div");return n.className="fixed z-[9999] p-2 bg-gray-900 text-white text-xs rounded-lg shadow-lg pointer-events-none transition-opacity duration-150",n.style.opacity="0",n.style.visibility="hidden",n.style.maxWidth="240px",n.style.whiteSpace="normal",n.style.wordBreak="break-word",document.body.appendChild(n),n}function $s(t){if(!t)return null;if(typeof t=="string"){const o=t.trim();return o?{text:o,wrap:!0}:null}const n=typeof t.text=="string"&&t.text.trim()?t.text.trim():void 0;return n?{text:n,wrap:t.wrap!==!1}:null}function Zn(t,n){if(!Ts||!Bs)return;const o=xd(n.wrap),s={options:n,tooltipEl:o,show:r=>{if(!s.options.text||!Bs)return;o.textContent=s.options.text;const i=(r.currentTarget??t).getBoundingClientRect(),a=o.getBoundingClientRect(),c=window.innerWidth-a.width-12,p=Math.max(12,Math.min(i.left,c));o.style.left=`${p}px`,o.style.top=`${i.bottom+4}px`,o.style.opacity="1",o.style.visibility="visible"},hide:()=>{o.style.opacity="0",o.style.visibility="hidden"}};t.addEventListener("mouseenter",s.show),t.addEventListener("mouseleave",s.hide),t.addEventListener("focus",s.show),t.addEventListener("blur",s.hide),t.__tooltipState__=s}function Yn(t){const n=t.__tooltipState__;n&&(t.removeEventListener("mouseenter",n.show),t.removeEventListener("mouseleave",n.hide),t.removeEventListener("focus",n.show),t.removeEventListener("blur",n.hide),n.tooltipEl.remove(),delete t.__tooltipState__)}const _d={mounted(t,n){const o=$s(n.value);o&&Zn(t,o)},updated(t,n){const o=$s(n.value),s=t;if(!o){Yn(s);return}const r=s.__tooltipState__;if(!r){Zn(s,o);return}if(r.options.wrap!==o.wrap){Yn(s),Zn(s,o);return}r.options=o},unmounted(t){Yn(t)}},Cd={class:"flex flex-col gap-4 mb-[15px]"},Sd={class:"flex flex-wrap items-center gap-4"},Bd={class:"relative"},Td={class:"ml-auto flex items-center gap-2"},$d={class:"overflow-x-auto"},Dd={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"},Ld={class:"text-left font-medium text-gray-700"},Od={key:0,class:"py-2 pr-4 min-w-[80px] max-w-[120px] text-right"},Ad={class:"divide-y divide-gray-200"},Id=["href"],Md={key:2},Rd={key:3},Pd={key:0,class:"py-2 pr-4 text-right"},Fd={key:0},zd={key:0},jd=["colspan"],Ds=e.defineComponent({__name:"TableWidget",props:{name:{},label:{},component:{},path:{},slot:{},col:{},width:{},html:{},title:{},type:{},token:{},count:{},props:{},items:{}},setup(t){const n=e.getCurrentInstance(),o=e.ref([]),s=e.ref([]),r=_d,l=t,i=e.ref([]),a=e.ref(""),c=e.ref(""),p=e.ref(""),u=e.ref(1),f=e.ref(10),h=e.ref(0),k=e.ref(0),_=e.ref("id"),x=e.ref("");let w=null,C=0;const M=e.ref(null);async function B(){const d=u.value,m=++C,g=new URLSearchParams,b=p.value.trim();b&&g.set("search",b),g.set("page",String(d)),g.set("limit",String(f.value));const O=`/api/data/${l.token}${g.toString()?`?${g.toString()}`:""}`;let L;try{const ie=await fetch(O);if(!ie.ok)throw new Error(`Request failed with status ${ie.status}`);L=await ie.json()}catch(ie){m===C&&(o.value=[],k.value=0,h.value=0),console.error("Failed to load table data",ie);return}if(m!==C)return;o.value=Array.isArray(L?.rows)?L.rows:[],s.value=E(L?.columns||[]),i.value=Array.isArray(L?.actions)?L.actions:[],a.value=L?.form,c.value=L?.addToken,_.value=typeof L?.pk=="string"&&L.pk?L.pk:_.value,typeof L?.form=="string"&&L.form&&(x.value=L.form.replace(/\.form$/,".table")),Be();const R=Number(L?.total??L?.count??L?.totalCount),P=Number(L?.filtered??L?.filteredCount);h.value=Number.isFinite(R)&&R>0?R:o.value.length,k.value=Number.isFinite(P)&&P>0?P:Math.max(o.value.length,h.value);const he=Math.max(1,Math.ceil((k.value||o.value.length||1)/f.value));let ge=d;typeof L?.page=="number"&&L.page>0&&(ge=L.page),ge>he&&(ge=he),ge<1&&(ge=1);const nn=ge!==d;if(u.value=ge,nn&&k.value>0)return B()}const{$notify:$,$confirm:S,$form:H}=n?.appContext?.config?.globalProperties||{};function K(){if(We.emitter?.emit){We.emitter.emit("updateCard");return}if(typeof window<"u"&&typeof window.location?.reload=="function"){window.location.reload();return}B()}async function I(d){typeof H=="function"&&(await H({token:d.token}),K())}async function A(){typeof H=="function"&&(await H({token:c.value}),K())}function F(d){S({title:"Підтвердіть дію",type:"error",message:"Ви впевненні що бажаєте видалити даний рядок?",onConfirm:async()=>{const m=await fetch(`/api/table/${d.token}`,{method:"DELETE"});if(!m.ok){const{error:g}=await m.json();$({title:"Помилка",type:"warning",message:g});return}$({title:"Видаленно",message:"Успішно видалено"}),await B()}})}e.onMounted(async()=>{await B(),We.emitter?.on?.("updateCard",B)}),e.onBeforeUnmount(()=>{We.emitter?.off?.("updateCard",B)});function z(d){return typeof d?.format=="string"?d.format.toLowerCase():""}function E(d){const m=new Map;s.value.forEach(b=>{b?.name&&m.set(b.name,!!b.hidden)});const g=d.map(b=>{const O=m.has(b.name)?m.get(b.name):!!b.hidden;return{...b,hidden:O}});return g.length&&!g.some(b=>!b.hidden)&&(g[0].hidden=!1),g}const T=e.computed(()=>{const d=s.value.filter(m=>!m.hidden);return d.length?d:s.value}),N=e.computed(()=>{const d=[],m=new Set;for(const g of i.value){if(typeof g=="string"){if(g==="view"){const b="row:view";m.has(b)||(d.push({key:b,type:"view",label:"Переглянути",scope:"row",handler:io}),m.add(b));continue}if(g==="edit"){const b="row:edit";m.has(b)||(d.push({key:b,type:"edit",label:"Редагувати",scope:"row",handler:gt}),m.add(b));continue}if(g==="delete"||g==="del"){const b="row:delete";m.has(b)||(d.push({key:b,type:"delete",label:"Видалити",scope:"row",handler:to,variant:"danger"}),m.add(b));continue}if(g==="add"){const b="toolbar:add";m.has(b)||(d.push({key:b,type:"add",label:"Додати",scope:"toolbar"}),m.add(b))}continue}if(g&&typeof g=="object"){const b=String(g.name??g.type??"action"),O=String(g.label??g.title??b),L=g.scope==="toolbar"?"toolbar":"row",R=`${L}:${b}`;if(m.has(R))continue;m.add(R),d.push({key:R,type:b,label:O,scope:L,handler:L==="row"?P=>no(g,P):void 0,variant:g.variant==="danger"?"danger":"default",original:g})}}return d}),D=e.computed(()=>N.value.filter(d=>d.scope==="row"&&typeof d.handler=="function")),J=e.computed(()=>N.value.filter(d=>d.scope==="toolbar")),le=e.computed(()=>D.value.length>0),Ie=e.computed(()=>J.value.some(d=>d.type==="add")),Se=e.computed(()=>o.value),ke=e.computed(()=>{const d=k.value||Se.value.length,m=Math.ceil(d/f.value);return m>0?m:1}),Ne=e.computed(()=>{const d=Se.value.length,m=k.value||d,g=h.value||m;return`Показано ${d} з ${m} (усього ${g})`});function xe(){u.value<ke.value&&(u.value+=1,B())}function Xn(){u.value>1&&(u.value-=1,B())}e.watch(s,d=>{d?.length&&(d.some(m=>!m.hidden)||(d[0].hidden=!1))},{deep:!0});function Qn(){w&&clearTimeout(w),Be(),w=setTimeout(()=>{u.value=1,B()},300)}function ut(d){const m=_.value||"id",g=d?.token??d?.[m]??d?.id;return g?String(g):""}function Zt(d){const m=T.value[d],g=["py-2",...ht(m)];d===0&&g.push("pl-4");const b=d===T.value.length-1&&!le.value;return g.push(b?"pr-4":"pr-5"),g.join(" ")}function Yt(d,m){const g=["py-2",...ht(m)];z(m)==="badge"&&g.push("center"),et(m)==="wrap"?g.push("whitespace-normal","break-words"):g.push("truncate"),d===0&&g.push("pl-4");const b=d===T.value.length-1&&!le.value;return g.push(b?"pr-4":"pr-5"),g.join(" ")}function et(d){return(typeof d?.overflow=="string"?d.overflow.toLowerCase():"")==="wrap"?"wrap":"clip"}function ht(d){const m=[],g=R=>{if(R==null||R==="")return;const P=Number(R);return Number.isFinite(P)&&P>0?`${P}px`:String(R).replace(/\s+/g,"")},b=g(d?.width),O=g(d?.minWidth),L=g(d?.maxWidth);return b?(m.push(`min-w-[${b}]`,`max-w-[${b}]`),m):(m.push(`min-w-[${O??"100px"}]`),m.push(`max-w-[${L??"350px"}]`),m)}function Xt(d){if(!D.value.length)return!1;const m=_.value||"id";return!!(d?.token||d?.[m]||d?.id)}function Vn(d){return M.value===ut(d)}function eo(d){const m=ut(d);m&&(M.value=M.value===m?null:m)}function Be(){M.value=null}function Qt(d,m){const g=m?.tooltip;if(!g)return;const b=v(d,m);let O,L=m?.tooltipWrap!==!1;if(typeof g=="string"){const R=g.trim();if(!R)return;const P=R.toLowerCase();if(["true","1","yes"].includes(P))O=typeof b=="string"?b:String(b??"");else{if(["false","0","no"].includes(P))return;O=R}}else g===!0?O=b:typeof g=="object"&&(typeof g.text=="string"&&(O=g.text.trim()),typeof g.wrap=="boolean"&&(L=g.wrap!==!1));if(!O){if(b==null||b==="")return;O=String(b)}if(O.trim())return L?{text:O,wrap:!0}:O}function gt(d){Be(),I(d)}function to(d){Be(),F(d)}async function no(d,m){Be();const g=_.value||"id",b=d.isId?m?.[g]??m?.id:m?.token??m?.[g]??m?.id;if(!b){console.warn("Cannot execute action without identifier",d);return}if(d.form&&typeof d.api=="string"&&d.api&&typeof H=="function"){await so(d,m,b);return}if(d.form&&typeof H=="function"){const O=await yt(d.form,b),L={form:d.form,token:O?.token??m?.token??b,schema:O?.schema,mode:O?.mode??"edit"};O?.data!==void 0&&(L.defaultValue=O.data);try{await H(L),K()}catch(R){console.error("Failed to execute form action",R)}return}if(typeof d.api=="string"&&d.api){const O=qe(d.api,b);window.location.href=O;return}m?.token&&typeof H=="function"&&(await H({token:m.token}),K())}function qe(d,m){return`${d.endsWith("/")?d:`${d}/`}${m}`}async function yt(d,m){const g=`/api/form/${d}/${m}`;try{const b=await fetch(g);if(!b.ok)throw new Error(`Request failed with status ${b.status}`);return await b.json()}catch(b){console.error("Failed to load form config",b),$({title:"Помилка",type:"warning",message:"Не вдалося отримати дані форми."});return}}async function vt(d){const m=`/api/template/form/${d}`;try{const g=await fetch(m);if(!g.ok)throw new Error(`Request failed with status ${g.status}`);return(await g.json())?.schema}catch(g){console.error("Failed to load form template",g);return}}function oo(d){if(d!=null){if(d?.data!==void 0)return d.data;if(d?.defaultValue!==void 0)return d.defaultValue;if(d?.values!==void 0)return d.values;if(typeof d=="object"&&!Array.isArray(d)){const{schema:m,token:g,mode:b,message:O,successMessage:L,...R}=d;if(Object.keys(R).length)return R}}}async function so(d,m,g){const b=qe(d.api,g),O=(typeof d.method=="string"?d.method:"PUT").toUpperCase();let L;try{const ie=await fetch(b);if(!ie.ok)throw new Error(`Request failed with status ${ie.status}`);L=await ie.json()}catch(ie){console.error("Failed to load action data",ie),en("Не вдалося отримати дані форми.");return}const R=typeof d.form=="string"?d.form.replace(/\.table$/,".form"):void 0,P=L?.schema??(R?await vt(R):void 0),he={mode:L?.mode??"edit"};R&&(he.form=R),P&&(he.schema=P);const ge=oo(L);ge!==void 0&&(he.defaultValue=ge);const nn=await H(he);if(nn)try{const ie=await fetch(b,{method:O,headers:{"Content-Type":"application/json"},body:JSON.stringify(nn)});if(!ie.ok){const Ms=await Vt(ie),Lp=Ms?.error??Ms?.message??"Не вдалося зберегти дані.";throw new Error(Lp)}ro(`Дані успішно ${he.value==="add"?"збережено":"оновлено"}`),K()}catch(ie){console.error("Failed to submit action data",ie),en("Не вдалося зберегти дані.")}}async function Vt(d){try{return await d.json()}catch{return}}function en(d){$({title:"Помилка",type:"error",message:d})}function ro(d){$({title:"Успіх",type:"success",message:d})}function io(d){Be();const m=x.value||(a.value?String(a.value).replace(/\.form$/,".table"):""),g=_.value||"id",b=d?.[g]??d?.id??d?.token;if(m&&b){const O=`/card/${m}/${b}`;window.location.href=O;return}if(d?.token&&typeof H=="function"){H({token:d.token,readonly:!0,mode:"view"});return}d?.token&&I(d)}function tn(d){if(!M.value)return;const m=d.target;if(!m)return;const g=m.closest("[data-action-key]");g&&g.getAttribute("data-action-key")===M.value||Be()}e.onMounted(()=>{document.addEventListener("click",tn,!0)}),e.onBeforeUnmount(()=>{w&&clearTimeout(w),document.removeEventListener("click",tn,!0),We.emitter?.off?.("updateCard",B)});function bt(d,m){const b=d?.[`${m.name}_text`];if(Array.isArray(b))return b.length?b.join(", "):"-";if(b!=null&&b!=="")return b;const O=d?.[m.name];return Array.isArray(O)?O.length?O.join(", "):"-":O??"-"}function kt(d,m){const b=d?.[`${m.name}_data`];if(b&&typeof b=="object")return{text:b.text??b.label??b.name??b.title??"-",color:b.color,textColor:b.textColor};const O=d?.[`${m.name}_text`]??d?.[m.name];return{text:(Array.isArray(O)?O.join(", "):O)??"-"}}function y(d,m){const g=kt(d,m);return g.color?{backgroundColor:g.color,color:g.textColor??"#ffffff"}:{}}function v(d,m){const g=z(m);if(g==="badge")return kt(d,m).text;if(g==="select")return bt(d,m);if(g==="slot")return"-";if(g==="text")return d?.[m.name]??"-";const b=d?.[`${m.name}_data`];return b!=null&&typeof b!="object"?b:d?.[`${m.name}_text`]??d?.[m.name]??"-"}return(d,m)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Cd,[e.createElementVNode("div",Sd,[e.createElementVNode("div",Bd,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":m[0]||(m[0]=g=>p.value=g),type:"text",class:"w-52 rounded-md border border-gray-300 px-3 py-2 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Пошук",onInput:Qn},null,544),[[e.vModelText,p.value]])]),e.createElementVNode("div",Td,[e.createVNode(gd,{columns:s.value,"onUpdate:columns":m[1]||(m[1]=g=>s.value=g)},null,8,["columns"]),Ie.value&&c.value?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",onClick:A,class:"inline-flex size-8 items-center justify-center rounded-lg bg-blue-500 text-white shadow-sm transition-colors hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",title:"Додати запис","aria-label":"Додати запис"},m[2]||(m[2]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M5 12h14"}),e.createElementVNode("path",{d:"M12 5v14"})],-1)]))):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",$d,[e.createElementVNode("table",Dd,[e.createElementVNode("thead",Ld,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(g,b)=>(e.openBlock(),e.createElementBlock("th",{key:g.name,class:e.normalizeClass(Zt(b))},e.toDisplayString(g.ua),3))),128)),le.value?(e.openBlock(),e.createElementBlock("th",Od," Дії ")):e.createCommentVNode("",!0)])]),e.createElementVNode("tbody",Ad,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Se.value,g=>(e.openBlock(),e.createElementBlock("tr",{class:"bg-white odd:bg-gray-50",key:g.id??JSON.stringify(g)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,(b,O)=>e.withDirectives((e.openBlock(),e.createElementBlock("td",{key:b.name,class:e.normalizeClass(Yt(O,b))},[b.link?(e.openBlock(),e.createElementBlock("a",{key:0,href:b.link.replace("{{id}}",g.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(v(g,b)),9,Id)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[z(b)==="slot"&&b.slot?.content?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(td)(b.slot.content)),{key:0,data:g,row:g,column:b,value:g?.[b.name]},null,8,["data","row","column","value"])):z(b)==="badge"?(e.openBlock(),e.createElementBlock("span",{key:1,class:"items-center px-2 py-1 rounded-full text-xs font-semibold text-center justify-center flex",style:e.normalizeStyle(y(g,b))},e.toDisplayString(kt(g,b).text),5)):z(b)==="select"?(e.openBlock(),e.createElementBlock("span",Md,e.toDisplayString(bt(g,b)),1)):(e.openBlock(),e.createElementBlock("span",Rd,e.toDisplayString(v(g,b)),1))],64))],2)),[[e.unref(r),Qt(g,b)]])),128)),le.value?(e.openBlock(),e.createElementBlock("td",Pd,[Xt(g)?(e.openBlock(),e.createElementBlock("div",Fd,[e.createVNode(Nd,{row:g,actions:D.value,"is-open":Vn(g),"action-key":ut(g),onToggle:b=>eo(g)},null,8,["row","actions","is-open","action-key","onToggle"])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]))),128)),Se.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",zd,[e.createElementVNode("td",{colspan:T.value.length+(le.value?1:0),class:"py-6 text-center text-gray-500"}," Немає записів для відображення ",8,jd)]))])])]),e.createVNode(ld,{"current-page":u.value,"total-pages":ke.value,label:Ne.value,onPrevious:Xn,onNext:xe},null,8,["current-page","total-pages","label"])]))}}),Hd={class:"p-[20px]"},Ud={class:"flex gap-[6px] mb-5"},qd={class:"vs-form-text relative bg-white rounded-lg flex-grow"},Wd={class:"grid p-3 lg:gap-x-3 md:gap-x-6 md:p-5 grid-cols-6"},Kd={class:"mt-2 text-sm font-medium text-gray-800 dark:text-neutral-200"},Gd={class:"space-y-8"},Jd={key:0},Zd={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},Yd=["onClick"],Xd={class:"md:col-span-2"},Qd={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},Vd={class:"text-sm text-gray-500 dark:text-neutral-500"},ep={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},tp=["checked","onChange"],np={class:"grid p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5 dark:bg-neutral-700 grid-cols-6"},op={class:"md:col-span-2"},sp={class:"font-semibold text-gray-800 dark:text-neutral-200"},rp=["onClick"],ip={class:"md:col-span-2"},lp={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},ap={class:"text-sm text-gray-500 dark:text-neutral-500"},cp={class:"grid items-center grid-cols-2 md:block text-end md:text-center"},dp=["checked","onChange"],Gt=e.defineComponent({__name:"GroupInterfaceWidget",props:{data:{},id:{}},setup(t){const n=t,o=e.ref(""),s=["view","add","edit","del"],r=e.ref({});e.onMounted(async()=>{const x=await(await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`)).json();x.routes&&x.routes.forEach(w=>{r.value[w.path]=new Set(w.actions)})});const l=(_,x)=>r.value[_]?.has(x)??!1,i=(_,x)=>{r.value[_]||(r.value[_]=new Set),r.value[_].has(x)?r.value[_].delete(x):r.value[_].add(x)},a=(_,x)=>{_.forEach(w=>{w.path&&(r.value[w.path]||(r.value[w.path]=new Set),r.value[w.path].has(x)?r.value[w.path].delete(x):r.value[w.path].add(x))})},c=e.computed(()=>Object.entries(r.value).map(([_,x])=>({path:_,actions:Array.from(x)})).filter(_=>_.actions.length)),p=async()=>{await fetch(`/api/access-group/${n.id}?tab=vs-group-interface`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({routes:c.value})}),We.notify({title:"Success!",message:"Permissions saved."})},u=()=>{r.value={}},f=_=>{if(!o.value.trim())return _;const x=o.value.toLowerCase();return _.filter(w=>w.ua.toLowerCase().includes(x)||w.path&&w.path.toLowerCase().includes(x))},h=e.computed(()=>f(n.data.routers.filter(_=>!_.menu))),k=e.computed(()=>n.data.routers.filter(_=>_.menu).map(_=>({..._,menu:f(_.menu||[])})).filter(_=>_.menu&&_.menu.length>0));return(_,x)=>(e.openBlock(),e.createElementBlock("div",Hd,[e.createElementVNode("div",Ud,[e.createElementVNode("div",qd,[x[1]||(x[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":x[0]||(x[0]=w=>o.value=w),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,o.value]])]),e.createElementVNode("button",{onClick:u,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: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"}," Зберегти ")]),e.createElementVNode("div",Wd,[x[2]||(x[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(s,(w,C)=>e.createElementVNode("div",{class:"col-span-1 text-center",key:C},[e.createElementVNode("h3",Kd,e.toDisplayString(w),1)])),64))]),e.createElementVNode("div",Gd,[h.value.length?(e.openBlock(),e.createElementBlock("div",Jd,[e.createElementVNode("ul",Zd,[x[3]||(x[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(s,(w,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:M=>a(h.value,s[C])}," Toggle all ",8,Yd)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(w,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",Xd,[e.createElementVNode("p",Qd,e.toDisplayString(w.ua),1),e.createElementVNode("p",Vd,e.toDisplayString(w.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(M,B)=>e.createElementVNode("li",{key:B,class:"col-span-1"},[e.createElementVNode("div",ep,[e.createElementVNode("input",{type:"checkbox",checked:l(w.path,M),onChange:$=>i(w.path,M),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,tp)])])),64))]))),128))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(w,C)=>(e.openBlock(),e.createElementBlock("div",{key:C,class:"space-y-5"},[e.createElementVNode("ul",np,[e.createElementVNode("li",op,[e.createElementVNode("h3",sp,e.toDisplayString(w.ua),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,(M,B)=>e.createElementVNode("li",{key:B,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:$=>a(w.menu,s[B])}," Toggle all ",8,rp)])),64))]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(w.menu,(M,B)=>(e.openBlock(),e.createElementBlock("ul",{key:B,class:"grid md:items-center gap-1.5 md:gap-6 px-3 md:px-5 mt-3 grid-cols-6"},[e.createElementVNode("li",ip,[e.createElementVNode("p",lp,e.toDisplayString(M.ua),1),e.createElementVNode("p",ap,e.toDisplayString(M.path),1)]),(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(s,($,S)=>e.createElementVNode("li",{key:S,class:"col-span-1"},[e.createElementVNode("div",cp,[e.createElementVNode("input",{type:"checkbox",checked:l(M.path,$),onChange:H=>i(M.path,$),class:"text-blue-600 border-gray-300 rounded shrink-0 focus:ring-blue-500"},null,40,dp)])])),64))]))),128))]))),128))])]))}}),Ue={"vs-widget-map":Ct,"vs-widget-comments":wt,"vs-widget-history":Nt,"vs-widget-gallery":_t,"vs-widget-file":xt,"vs-widget-list":an,"vs-widget-table":Ds,"vs-group-interface":Gt};function Ls(t){if(t==null)return null;const n=Number(t);return Number.isFinite(n)?Math.max(1,Math.min(12,Math.floor(n))):null}function Os(t){const n={...t};return Array.isArray(t.items)&&(n.items=t.items.map(o=>Os(o))),n}function pp(t,n=12){if(!t.length)return;const o=[],s=[];t.forEach(c=>{const p=Ls(c.col);p?(c.col=p,o.push({item:c,span:p})):s.push(c)});const r=o.reduce((c,p)=>c+p.span,0);let l=n-r;if(s.length===0)return;l<=0&&(l=n);const i=Math.max(1,Math.floor(l/s.length));let a=Math.max(0,l-i*s.length);s.forEach(c=>{let p=i;a>0&&(p+=1,a-=1),c.col=Math.max(1,Math.min(12,p))})}function Jt(t,n=12){if(!Array.isArray(t)||!t.length)return[];const o=t.map(s=>Os(s));return o.forEach(s=>{Array.isArray(s.items)&&s.items.length&&(s.items=Jt(s.items,12))}),pp(o,n),o}function As(t){const n=Ls(t);return n?n>=12?["md:col-span-12","lg:col-span-12"]:[`md:col-span-${n}`,`lg:col-span-${n}`]:[]}const fp={class:"text-lg font-semibold text-gray-900"},mp=["innerHTML"],up={key:0,class:"grid grid-cols-12 gap-4"},hp={key:0,class:"mb-4 pb-2 border-b border-gray-200"},gp={class:"text-lg font-semibold text-gray-900"},yp=["innerHTML"],ft=e.defineComponent({__name:"CardItem",props:{items:{},type:{},col:{},data:{},html:{},title:{},hideTitle:{type:Boolean},styling:{},name:{},label:{},component:{},slot:{},id:{},className:{},style:{}},setup(t){const n=t,o=e.computed(()=>{if(!n.col)return{};const p=Math.max(1,Math.min(12,Number(n.col)));return{[`md:col-span-${p}`]:!0,[`lg:col-span-${p}`]:!0}}),s=e.computed(()=>Jt(n.items));function r(p){const u=["col-span-12"],f=As(p.col);return f.length&&u.push(...f),u}function l(p){return Ue[p]||p}function i(p,u){if(!p||typeof u!="string"||!u)return{found:!1,value:void 0};const f=u.split(".");let h=p;for(const k of f){if(h==null||typeof h!="object"&&!Array.isArray(h))return{found:!1,value:void 0};if(!(k in h))return{found:!1,value:void 0};h=h[k]}return{found:!0,value:h}}const a=function(p={}){const u={...p};return Object.entries(u).forEach(([f,h])=>{if(f!=="props"&&typeof h=="string"){const k=i(n.data,h);k.found&&(u[f]=k.value)}}),p.props&&typeof p.props=="object"&&Object.entries(p.props).forEach(([f,h])=>{if(typeof h=="string"){const k=i(n.data,h);u[f]=k.found?k.value:h}else u[f]=h}),delete u.props,u},c=e.computed(()=>{const p={};return n.col&&(p.col=n.col),p});return(p,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([[o.value,p.styling?.classItem],"w-full bg-gray-50 rounded-lg p-4 col-span-12"])},[!p.hideTitle&&p.title?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["mb-4 pb-2 border-b border-gray-200",p.styling?.classItemTitle])},[e.createElementVNode("h3",fp,e.toDisplayString(p.title),1)],2)):e.createCommentVNode("",!0),p.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:p.html,class:"text-gray-900 leading-relaxed"},null,8,mp)):p.type?.includes("tabs")?(e.openBlock(),e.createBlock(mt,{key:2,view:p.type,panels:p.items,data:p.data,styling:p.styling},null,8,["view","panels","data","styling"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[s.value.length?(e.openBlock(),e.createElementBlock("div",up,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(f,h)=>(e.openBlock(),e.createElementBlock("div",{key:f.name||f.component||h,class:e.normalizeClass(r(f))},[f.title||f.label?(e.openBlock(),e.createElementBlock("div",hp,[e.createElementVNode("h3",gp,e.toDisplayString(f.title||f.label),1)])):e.createCommentVNode("",!0),f.html?(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:f.html,class:"text-gray-900 leading-relaxed"},null,8,yp)):f.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l(f.component)),e.mergeProps({key:2,ref_for:!0},{geom:p.data.geom,id:p.data.id,...c.value,...a(f),data:p.data},{class:"w-full"}),null,16)):e.renderSlot(p.$slots,"default",{key:3})],2))),128))])):e.createCommentVNode("",!0)],64))],2))}}),vp={class:"grid grid-cols-12 gap-[20px]"},bp={key:0,class:"col-span-4"},kp=["innerHTML"],Ep=["onClick"],wp=["innerHTML"],Np={key:1,class:"flex w-full"},xp={class:"flex flex-col w-56 border-r border-gray-200 bg-gray-50 relative"},_p=["onClick"],Cp={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 transition-all duration-300"},Sp={class:"flex-1 p-4"},Bp=["innerHTML"],Tp={class:"grid grid-cols-12 gap-4"},$p={key:3,class:"w-full h-full"},mt=e.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(t){const n=t;function o(){const E=typeof window<"u"?window:globalThis,T="__vsCardAnonymousCounter__",N=E[T]??0;return E[T]=N+1,N===0?"tab":`tab${N}`}const s=e.ref(0),r=e.ref([]);let l=!1;const i=e.ref(n.id??o());e.watch(()=>n.id,E=>{E&&(i.value=E)});const a=new Map,c=e.computed(()=>n.view==="tabs"||n.view==="vertical-tabs");e.provide("vsCardTabsContext",c);function p(E,T){const N=T?.path;return N?(a.has(N)||a.set(N,e.defineAsyncComponent(()=>import(N))),a.get(N)):typeof E=="string"&&Ue[E]?Ue[E]:T?.component&&Ue[T.component]?Ue[T.component]:T?.name&&Ue[T.name]?Ue[T.name]:E}function u(E){return E.forEach(T=>{T.type&&(T.view=T.type)}),r.value=E.filter(T=>T.type==="pin"),E.filter(T=>T.type!=="pin")}const f=e.computed(()=>{let E;return n.panels&&n.panels.length>0?E=n.normalizeTabs?u(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(E=n.data.filter(N=>N.type.includes("tabs"))[0]?.items),Jt(E,12)}),h=e.computed(()=>i.value),k=e.computed(()=>{let E;return n.panels&&n.panels.length>0?E=n.normalizeTabs?u(n.panels):n.panels:n.data&&Array.isArray(n.data)&&(E=n.data),Jt(E,12)}),_=e.computed(()=>({[`view-${n.view}`]:!0}));function x(E,T){if(!E||typeof T!="string"||!T)return{found:!1,value:void 0};const N=T.split(".");let D=E;for(const J of N){if(D==null||typeof D!="object"&&!Array.isArray(D))return{found:!1,value:void 0};if(!(J in D))return{found:!1,value:void 0};D=D[J]}return{found:!0,value:D}}const w=E=>{const T={...E};return Object.entries(T).forEach(([N,D])=>{if(N!=="props"&&typeof D=="string"){const J=x(n.data,D);J.found&&(T[N]=J.value)}}),E.props&&typeof E.props=="object"&&Object.entries(E.props).forEach(([N,D])=>{if(typeof D=="string"){const J=x(n.data,D);T[N]=J.found?J.value:D}else T[N]=D}),delete T.props,n.data&&(T.data=n.data),T};function C(E){const T=["col-span-12"],N=As(E.col);return N.length&&T.push(...N),T}const M=e.ref([]),B=e.ref([]),$=e.ref([]);function S(E,T){E&&E instanceof HTMLElement&&(M.value[T]=E)}function H(){B.value=M.value.map(E=>E.offsetWidth),$.value=M.value.map(E=>E.offsetLeft)}function K(){if(typeof window>"u")return null;const E=h.value;if(!E)return null;const N=new URL(window.location.href).searchParams.get(E);if(N===null)return null;const D=Number.parseInt(N,10);return Number.isNaN(D)?null:D}function I(E){if(typeof window>"u")return;const T=h.value;if(!T)return;const N=new URL(window.location.href);E<=0?N.searchParams.delete(T):N.searchParams.set(T,String(E));const D=window.history.state??{};window.history.replaceState(D,document.title,N)}function A(){if(l)return;const E=K();if(E===null||!f.value.length)return;const T=Math.min(Math.max(E,0),f.value.length-1);T!==E&&I(T),T!==s.value&&(s.value=T),l=!0}function F(){l=!1,A()}let z=null;return e.onMounted(()=>{e.nextTick(()=>{A(),H()}),typeof window<"u"&&window.addEventListener("popstate",F),z=new ResizeObserver(()=>H()),z.observe(document.body)}),e.onBeforeUnmount(()=>{z?.disconnect(),typeof window<"u"&&window.removeEventListener("popstate",F)}),e.watch(s,E=>{e.nextTick(()=>{H()}),I(E)}),e.watch(f,()=>{l=!1,A()}),(E,T)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(E.classWrapper||_.value)},[e.createElementVNode("div",vp,[r.value.length!==0?(e.openBlock(),e.createElementBlock("div",bp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value[0].items,(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:N.name||D,class:"w-full bg-gray-50 rounded-lg p-4 col-span-12 m-1 mb-3"},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,kp)):N.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component,N)),e.mergeProps({key:1,ref_for:!0},N.component==="Card"?N:w(N),{id:E.data.id,class:["w-full h-full",E.styling?.classItem]}),null,16,["id","class"])):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(r.value.length!==0?"col-span-8":"col-span-12")},[E.view==="tabs"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["overflow-hidden w-full",E.styling?.classTabWrapper])},[e.createElementVNode("div",{class:e.normalizeClass(["flex border-b border-gray-200 bg-gray-50 relative gap-4 my-6",E.styling?.classTabHeader])},[B.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:B.value[s.value]+"px",left:$.value[s.value]+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,D)=>(e.openBlock(),e.createElementBlock("button",{key:N.name||D,ref_for:!0,ref:J=>S(J,D),onClick:J=>s.value=D,class:e.normalizeClass(["px-1 py-2 text-sm font-medium transition-colors",s.value===D?"text-blue-600 border-blue-600 border-b-2 ":"text-gray-600 hover:text-gray-800"])},e.toDisplayString(N.title||N.label||N.name||`Tab ${D+1}`),11,Ep))),128))],2),e.createElementVNode("div",{class:e.normalizeClass([E.styling?.classTabContent,"p-1"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:N.name||D,class:e.normalizeClass(["transition-all duration-300 ease-in-out",s.value===D?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",E.classPanel||"w-full border-gray-100"])},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,wp)):E.$slots[`tab-${D}`]?e.renderSlot(E.$slots,`tab-${D}`,{key:1,item:N,data:E.data}):N.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:2,ref_for:!0},w(N),{items:N.items,"hide-title":!0,class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component||N.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component||N.name,N)),e.mergeProps({key:3,ref_for:!0},N.component==="Card"?N:w(N),{styling:E.styling,id:E.data.id,class:["w-full h-full",E.styling?.classItem]}),null,16,["styling","id","class"])):e.renderSlot(E.$slots,N.slot||`tab-${D}`,{key:4,item:N,data:E.data})],2)),[[e.vShow,s.value===D]])),128))],2)],2)):E.view==="vertical-tabs"?(e.openBlock(),e.createElementBlock("div",Np,[e.createElementVNode("div",xp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,D)=>(e.openBlock(),e.createElementBlock("button",{key:N.name||D,onClick:J=>s.value=D,class:e.normalizeClass(["relative px-1 py-4 text-sm font-medium text-left transition-colors duration-300",s.value===D?"text-blue-600 bg-white":"text-gray-600 hover:text-gray-800 hover:bg-gray-100"])},[e.createTextVNode(e.toDisplayString(N.title||N.label||N.name||`Tab ${D+1}`)+" ",1),s.value===D?(e.openBlock(),e.createElementBlock("span",Cp,T[0]||(T[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,_p))),128))]),e.createElementVNode("div",Sp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(N,D)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:N.name||D,class:e.normalizeClass(["transition-all duration-300 ease-in-out",s.value===D?"opacity-100 translate-y-0":"opacity-0 -translate-y-2",E.classPanel||"w-full border-gray-100 py-2"])},[N.html?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:N.html,class:"text-gray-900 leading-relaxed"},null,8,Bp)):E.$slots[`tab-${D}`]?e.renderSlot(E.$slots,`tab-${D}`,{key:1,item:N,data:E.data}):N.items?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:2,ref_for:!0},w(N),{items:N.items,"hide-title":!0,class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component||N.name?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component||N.name,N)),e.mergeProps({key:3,ref_for:!0},N.component==="Card"?N:w(N),{id:E.data.id,class:["w-full h-full",E.styling?.classItem]}),null,16,["id","class"])):e.renderSlot(E.$slots,N.slot||`tab-${D}`,{key:4,item:N,data:E.data})],2)),[[e.vShow,s.value===D]])),128))])])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(E.styling?.classPlain||"p-1 w-full")},[e.createElementVNode("div",Tp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:N.name||N.component||D,class:e.normalizeClass(C(N))},[E.$slots[`panel-${D}`]?e.renderSlot(E.$slots,`panel-${D}`,{key:0,item:N,data:E.data}):N.items||N.html?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ft),e.mergeProps({key:1,ref_for:!0},w(N),{items:N.items||[],class:["w-full h-full",E.styling?.classItem],styling:E.styling}),null,16,["items","class","styling"])):N.component?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(p(N.component,N)),e.mergeProps({key:2,ref_for:!0},w(N),{class:["w-full h-full",[E.styling?.classItem]],styling:E.styling}),null,16,["class","styling"])):(e.openBlock(),e.createElementBlock("div",$p,[e.renderSlot(E.$slots,N.slot||`panel-${D}`,{item:N,data:E.data})]))],2))),128))])],2))],2)])],2))}}),Dp=["onClick"],Is=Me(e.defineComponent({__name:"CopyNotification",setup(t,{expose:n}){const o=e.ref([]);let s=1;const r=()=>{if(o.value.length>=10){const a=o.value[0];clearTimeout(a.timer),o.value.shift()}const i={id:s++,timer:setTimeout(()=>{l(i.id)},1500)};o.value.push(i)},l=i=>{const a=o.value.findIndex(c=>c.id===i);if(a!==-1){const c=o.value[a];clearTimeout(c.timer),o.value.splice(a,1)}};return n({addNotification:r}),e.onUnmounted(()=>{o.value.forEach(i=>{clearTimeout(i.timer)})}),(i,a)=>(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(o.value,c=>(e.openBlock(),e.createElementBlock("div",{key:c.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(Ws),{class:"h-5 w-5 text-green-100 flex-shrink-0"}),a[0]||(a[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:p=>l(c.id),class:"text-green-100 hover:text-white transition-colors flex-shrink-0"},[e.createVNode(e.unref(rn),{class:"h-4 w-4"})],8,Dp)]))),128))]),_:1})]))}}),[["__scopeId","data-v-d1ac6329"]]);mt.install=function(t){t.component("vs-widget-file",xt),t.component("vs-widget-comments",wt),t.component("vs-widget-history",Nt),t.component("vs-widget-gallery",_t),t.component("vs-widget-map",Ct),t.component("vs-group-interface",Gt),t.component("CommentsWidget",wt),t.component("HistoryWidget",Nt),t.component("GalleryWidget",_t),t.component("FilesWidget",xt),t.component("MapWidget",Ct),t.component("Card",mt),t.component("CardItem",ft),t.component("DescriptionListWidget",an),t.component("CopyNotification",Is),t.component("GroupInterfaceWidget",Gt)},V.Card=mt,V.CardItem=ft,V.CommentsWidget=wt,V.CopyNotification=Is,V.DescriptionListWidget=an,V.FilesWidget=xt,V.GalleryWidget=_t,V.GroupInterfaceWidget=Gt,V.HistoryWidget=Nt,V.MapWidget=Ct,V.TableWidget=Ds,V.default=mt,Object.defineProperties(V,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|