@opengis/admin 0.1.12 → 0.1.13
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/{add-page-PUKoIJEK.js → add-page-D-5feL0y.js} +2 -3
- package/dist/{admin-interface-DOooQPLl.js → admin-interface-BCKLKiHp.js} +1 -2
- package/dist/{admin-view-pMbPvuzO.js → admin-view-CtkujtDv.js} +1 -1
- package/dist/admin.js +1 -1
- package/dist/admin.umd.cjs +1 -1
- package/dist/{card-page-DTM6Da4H.js → card-page-CzyADTAX.js} +1 -1
- package/dist/{card-view-liYS8py5.js → card-view-pyDKvjtq.js} +1 -1
- package/dist/{edit-page-DDAyXMg3.js → edit-page-BtBLz-_b.js} +27 -27
- package/dist/{import-file-Vd0__RP7.js → import-file-CBAkm6Oe.js} +7 -7
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as m } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as b, a as c } from "./import-file-
|
|
2
|
+
import { _ as b, a as c } from "./import-file-CBAkm6Oe.js";
|
|
3
3
|
import { resolveComponent as h, openBlock as i, createElementBlock as d, createElementVNode as a, createBlock as f, createCommentVNode as p } from "vue";
|
|
4
4
|
const g = {
|
|
5
5
|
data() {
|
|
@@ -38,9 +38,8 @@ const g = {
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
async createObject() {
|
|
41
|
-
var t, e;
|
|
42
41
|
try {
|
|
43
|
-
await this.$refs.form.doValidation(), await c.post(`/api/table/${this.table}`, this.formValues), await this.$router.
|
|
42
|
+
await this.$refs.form.doValidation(), await c.post(`/api/table/${this.table}`, this.formValues), await this.$router.back(), await this.$notify({
|
|
44
43
|
title: "Успішно!",
|
|
45
44
|
message: "Об'єкт успішно створено",
|
|
46
45
|
type: "success"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as b, a as k } from "./import-file-
|
|
1
|
+
import { _ as b, a as k } from "./import-file-CBAkm6Oe.js";
|
|
2
2
|
import { u as B } from "./userMenu-CT1xO2Pt.js";
|
|
3
3
|
import { openBlock as a, createElementBlock as i, createStaticVNode as V, createTextVNode as v, toDisplayString as $, createCommentVNode as F, createElementVNode as l, Fragment as x, resolveComponent as u, createVNode as p, withCtx as y, withModifiers as N, renderList as C, withDirectives as E, vModelCheckbox as R, createBlock as w, vModelText as G, resolveDynamicComponent as W, Transition as J, vShow as K } from "vue";
|
|
4
4
|
const Q = {}, X = {
|
|
@@ -632,7 +632,6 @@ const ue = /* @__PURE__ */ b(oe, [["render", ce]]), de = {
|
|
|
632
632
|
}
|
|
633
633
|
});
|
|
634
634
|
this.tableData = {
|
|
635
|
-
...this.tableData,
|
|
636
635
|
...r,
|
|
637
636
|
...(o == null ? void 0 : o.data) || {}
|
|
638
637
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as d, a as L } from "./import-file-
|
|
1
|
+
import { _ as d, a as L } from "./import-file-CBAkm6Oe.js";
|
|
2
2
|
import { u as b } from "./userMenu-CT1xO2Pt.js";
|
|
3
3
|
import { openBlock as s, createElementBlock as l, createElementVNode as t, createStaticVNode as I, resolveComponent as p, createTextVNode as m, toDisplayString as w, createVNode as c, normalizeClass as v, Transition as Z, withCtx as $, withDirectives as V, Fragment as y, renderList as M, vShow as E, vModelText as j, createCommentVNode as z } from "vue";
|
|
4
4
|
const B = {}, D = {
|
package/dist/admin.js
CHANGED
package/dist/admin.umd.cjs
CHANGED
|
@@ -626,4 +626,4 @@ var Cy;function Je(){return Cy.apply(null,arguments)}function r2(n){Cy=n}functio
|
|
|
626
626
|
[`+b+"] ";for(y in arguments[0])Kt(arguments[0],y)&&(p+=y+": "+arguments[0][y]+", ");p=p.slice(0,-2)}else p=arguments[b];c.push(p)}Iy(n+`
|
|
627
627
|
Arguments: `+Array.prototype.slice.call(c).join("")+`
|
|
628
628
|
`+new Error().stack),o=!1}return i.apply(this,arguments)},i)}var Ay={};function Dy(n,i){Je.deprecationHandler!=null&&Je.deprecationHandler(n,i),Ay[n]||(Iy(i),Ay[n]=!0)}Je.suppressDeprecationWarnings=!1,Je.deprecationHandler=null;function Qr(n){return typeof Function<"u"&&n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function o2(n){var i,o;for(o in n)Kt(n,o)&&(i=n[o],Qr(i)?this[o]=i:this["_"+o]=i);this._config=n,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function gp(n,i){var o=Ys({},n),c;for(c in i)Kt(i,c)&&(Ho(n[c])&&Ho(i[c])?(o[c]={},Ys(o[c],n[c]),Ys(o[c],i[c])):i[c]!=null?o[c]=i[c]:delete o[c]);for(c in n)Kt(n,c)&&!Kt(i,c)&&Ho(n[c])&&(o[c]=Ys({},o[c]));return o}function yp(n){n!=null&&this.set(n)}var _p;Object.keys?_p=Object.keys:_p=function(n){var i,o=[];for(i in n)Kt(n,i)&&o.push(i);return o};var a2={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function l2(n,i,o){var c=this._calendar[n]||this._calendar.sameElse;return Qr(c)?c.call(i,o):c}function es(n,i,o){var c=""+Math.abs(n),p=i-c.length,b=n>=0;return(b?o?"+":"":"-")+Math.pow(10,Math.max(0,p)).toString().substr(1)+c}var xp=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Wh=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,bp={},Oa={};function ft(n,i,o,c){var p=c;typeof c=="string"&&(p=function(){return this[c]()}),n&&(Oa[n]=p),i&&(Oa[i[0]]=function(){return es(p.apply(this,arguments),i[1],i[2])}),o&&(Oa[o]=function(){return this.localeData().ordinal(p.apply(this,arguments),n)})}function c2(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function h2(n){var i=n.match(xp),o,c;for(o=0,c=i.length;o<c;o++)Oa[i[o]]?i[o]=Oa[i[o]]:i[o]=c2(i[o]);return function(p){var b="",y;for(y=0;y<c;y++)b+=Qr(i[y])?i[y].call(p,n):i[y];return b}}function Gh(n,i){return n.isValid()?(i=zy(i,n.localeData()),bp[i]=bp[i]||h2(i),bp[i](n)):n.localeData().invalidDate()}function zy(n,i){var o=5;function c(p){return i.longDateFormat(p)||p}for(Wh.lastIndex=0;o>=0&&Wh.test(n);)n=n.replace(Wh,c),Wh.lastIndex=0,o-=1;return n}var u2={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function d2(n){var i=this._longDateFormat[n],o=this._longDateFormat[n.toUpperCase()];return i||!o?i:(this._longDateFormat[n]=o.match(xp).map(function(c){return c==="MMMM"||c==="MM"||c==="DD"||c==="dddd"?c.slice(1):c}).join(""),this._longDateFormat[n])}var p2="Invalid date";function f2(){return this._invalidDate}var m2="%d",g2=/\d{1,2}/;function y2(n){return this._ordinal.replace("%d",n)}var _2={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function x2(n,i,o,c){var p=this._relativeTime[o];return Qr(p)?p(n,i,o,c):p.replace(/%d/i,n)}function b2(n,i){var o=this._relativeTime[n>0?"future":"past"];return Qr(o)?o(i):o.replace(/%s/i,i)}var Ry={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function br(n){return typeof n=="string"?Ry[n]||Ry[n.toLowerCase()]:void 0}function vp(n){var i={},o,c;for(c in n)Kt(n,c)&&(o=br(c),o&&(i[o]=n[c]));return i}var v2={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function w2(n){var i=[],o;for(o in n)Kt(n,o)&&i.push({unit:o,priority:v2[o]});return i.sort(function(c,p){return c.priority-p.priority}),i}var Ly=/\d/,er=/\d\d/,Oy=/\d{3}/,wp=/\d{4}/,Yh=/[+-]?\d{6}/,bi=/\d\d?/,By=/\d\d\d\d?/,Fy=/\d\d\d\d\d\d?/,Xh=/\d{1,3}/,kp=/\d{1,4}/,Kh=/[+-]?\d{1,6}/,Ba=/\d+/,Jh=/[+-]?\d+/,k2=/Z|[+-]\d\d:?\d\d/gi,Qh=/Z|[+-]\d\d(?::?\d\d)?/gi,S2=/[+-]?\d+(\.\d{1,3})?/,ec=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Fa=/^[1-9]\d?/,Sp=/^([1-9]\d|\d)/,eu;eu={};function st(n,i,o){eu[n]=Qr(i)?i:function(c,p){return c&&o?o:i}}function E2(n,i){return Kt(eu,n)?eu[n](i._strict,i._locale):new RegExp(T2(n))}function T2(n){return xs(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(i,o,c,p,b){return o||c||p||b}))}function xs(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function vr(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function Ut(n){var i=+n,o=0;return i!==0&&isFinite(i)&&(o=vr(i)),o}var Ep={};function di(n,i){var o,c=i,p;for(typeof n=="string"&&(n=[n]),_s(i)&&(c=function(b,y){y[i]=Ut(b)}),p=n.length,o=0;o<p;o++)Ep[n[o]]=c}function tc(n,i){di(n,function(o,c,p,b){p._w=p._w||{},i(o,p._w,p,b)})}function C2(n,i,o){i!=null&&Kt(Ep,n)&&Ep[n](i,o._a,o,n)}function tu(n){return n%4===0&&n%100!==0||n%400===0}var pn=0,bs=1,ts=2,ji=3,Nr=4,vs=5,qo=6,M2=7,P2=8;ft("Y",0,0,function(){var n=this.year();return n<=9999?es(n,4):"+"+n}),ft(0,["YY",2],0,function(){return this.year()%100}),ft(0,["YYYY",4],0,"year"),ft(0,["YYYYY",5],0,"year"),ft(0,["YYYYYY",6,!0],0,"year"),st("Y",Jh),st("YY",bi,er),st("YYYY",kp,wp),st("YYYYY",Kh,Yh),st("YYYYYY",Kh,Yh),di(["YYYYY","YYYYYY"],pn),di("YYYY",function(n,i){i[pn]=n.length===2?Je.parseTwoDigitYear(n):Ut(n)}),di("YY",function(n,i){i[pn]=Je.parseTwoDigitYear(n)}),di("Y",function(n,i){i[pn]=parseInt(n,10)});function ic(n){return tu(n)?366:365}Je.parseTwoDigitYear=function(n){return Ut(n)+(Ut(n)>68?1900:2e3)};var Ny=Na("FullYear",!0);function I2(){return tu(this.year())}function Na(n,i){return function(o){return o!=null?(Vy(this,n,o),Je.updateOffset(this,i),this):nc(this,n)}}function nc(n,i){if(!n.isValid())return NaN;var o=n._d,c=n._isUTC;switch(i){case"Milliseconds":return c?o.getUTCMilliseconds():o.getMilliseconds();case"Seconds":return c?o.getUTCSeconds():o.getSeconds();case"Minutes":return c?o.getUTCMinutes():o.getMinutes();case"Hours":return c?o.getUTCHours():o.getHours();case"Date":return c?o.getUTCDate():o.getDate();case"Day":return c?o.getUTCDay():o.getDay();case"Month":return c?o.getUTCMonth():o.getMonth();case"FullYear":return c?o.getUTCFullYear():o.getFullYear();default:return NaN}}function Vy(n,i,o){var c,p,b,y,h;if(!(!n.isValid()||isNaN(o))){switch(c=n._d,p=n._isUTC,i){case"Milliseconds":return void(p?c.setUTCMilliseconds(o):c.setMilliseconds(o));case"Seconds":return void(p?c.setUTCSeconds(o):c.setSeconds(o));case"Minutes":return void(p?c.setUTCMinutes(o):c.setMinutes(o));case"Hours":return void(p?c.setUTCHours(o):c.setHours(o));case"Date":return void(p?c.setUTCDate(o):c.setDate(o));case"FullYear":break;default:return}b=o,y=n.month(),h=n.date(),h=h===29&&y===1&&!tu(b)?28:h,p?c.setUTCFullYear(b,y,h):c.setFullYear(b,y,h)}}function A2(n){return n=br(n),Qr(this[n])?this[n]():this}function D2(n,i){if(typeof n=="object"){n=vp(n);var o=w2(n),c,p=o.length;for(c=0;c<p;c++)this[o[c].unit](n[o[c].unit])}else if(n=br(n),Qr(this[n]))return this[n](i);return this}function z2(n,i){return(n%i+i)%i}var Li;Array.prototype.indexOf?Li=Array.prototype.indexOf:Li=function(n){var i;for(i=0;i<this.length;++i)if(this[i]===n)return i;return-1};function Tp(n,i){if(isNaN(n)||isNaN(i))return NaN;var o=z2(i,12);return n+=(i-o)/12,o===1?tu(n)?29:28:31-o%7%2}ft("M",["MM",2],"Mo",function(){return this.month()+1}),ft("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)}),ft("MMMM",0,0,function(n){return this.localeData().months(this,n)}),st("M",bi,Fa),st("MM",bi,er),st("MMM",function(n,i){return i.monthsShortRegex(n)}),st("MMMM",function(n,i){return i.monthsRegex(n)}),di(["M","MM"],function(n,i){i[bs]=Ut(n)-1}),di(["MMM","MMMM"],function(n,i,o,c){var p=o._locale.monthsParse(n,c,o._strict);p!=null?i[bs]=p:zt(o).invalidMonth=n});var R2="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),$y="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),jy=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,L2=ec,O2=ec;function B2(n,i){return n?Br(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||jy).test(i)?"format":"standalone"][n.month()]:Br(this._months)?this._months:this._months.standalone}function F2(n,i){return n?Br(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[jy.test(i)?"format":"standalone"][n.month()]:Br(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function N2(n,i,o){var c,p,b,y=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],c=0;c<12;++c)b=Jr([2e3,c]),this._shortMonthsParse[c]=this.monthsShort(b,"").toLocaleLowerCase(),this._longMonthsParse[c]=this.months(b,"").toLocaleLowerCase();return o?i==="MMM"?(p=Li.call(this._shortMonthsParse,y),p!==-1?p:null):(p=Li.call(this._longMonthsParse,y),p!==-1?p:null):i==="MMM"?(p=Li.call(this._shortMonthsParse,y),p!==-1?p:(p=Li.call(this._longMonthsParse,y),p!==-1?p:null)):(p=Li.call(this._longMonthsParse,y),p!==-1?p:(p=Li.call(this._shortMonthsParse,y),p!==-1?p:null))}function V2(n,i,o){var c,p,b;if(this._monthsParseExact)return N2.call(this,n,i,o);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),c=0;c<12;c++){if(p=Jr([2e3,c]),o&&!this._longMonthsParse[c]&&(this._longMonthsParse[c]=new RegExp("^"+this.months(p,"").replace(".","")+"$","i"),this._shortMonthsParse[c]=new RegExp("^"+this.monthsShort(p,"").replace(".","")+"$","i")),!o&&!this._monthsParse[c]&&(b="^"+this.months(p,"")+"|^"+this.monthsShort(p,""),this._monthsParse[c]=new RegExp(b.replace(".",""),"i")),o&&i==="MMMM"&&this._longMonthsParse[c].test(n))return c;if(o&&i==="MMM"&&this._shortMonthsParse[c].test(n))return c;if(!o&&this._monthsParse[c].test(n))return c}}function Uy(n,i){if(!n.isValid())return n;if(typeof i=="string"){if(/^\d+$/.test(i))i=Ut(i);else if(i=n.localeData().monthsParse(i),!_s(i))return n}var o=i,c=n.date();return c=c<29?c:Math.min(c,Tp(n.year(),o)),n._isUTC?n._d.setUTCMonth(o,c):n._d.setMonth(o,c),n}function Hy(n){return n!=null?(Uy(this,n),Je.updateOffset(this,!0),this):nc(this,"Month")}function $2(){return Tp(this.year(),this.month())}function j2(n){return this._monthsParseExact?(Kt(this,"_monthsRegex")||qy.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(Kt(this,"_monthsShortRegex")||(this._monthsShortRegex=L2),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function U2(n){return this._monthsParseExact?(Kt(this,"_monthsRegex")||qy.call(this),n?this._monthsStrictRegex:this._monthsRegex):(Kt(this,"_monthsRegex")||(this._monthsRegex=O2),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function qy(){function n(M,D){return D.length-M.length}var i=[],o=[],c=[],p,b,y,h;for(p=0;p<12;p++)b=Jr([2e3,p]),y=xs(this.monthsShort(b,"")),h=xs(this.months(b,"")),i.push(y),o.push(h),c.push(h),c.push(y);i.sort(n),o.sort(n),c.sort(n),this._monthsRegex=new RegExp("^("+c.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function H2(n,i,o,c,p,b,y){var h;return n<100&&n>=0?(h=new Date(n+400,i,o,c,p,b,y),isFinite(h.getFullYear())&&h.setFullYear(n)):h=new Date(n,i,o,c,p,b,y),h}function rc(n){var i,o;return n<100&&n>=0?(o=Array.prototype.slice.call(arguments),o[0]=n+400,i=new Date(Date.UTC.apply(null,o)),isFinite(i.getUTCFullYear())&&i.setUTCFullYear(n)):i=new Date(Date.UTC.apply(null,arguments)),i}function iu(n,i,o){var c=7+i-o,p=(7+rc(n,0,c).getUTCDay()-i)%7;return-p+c-1}function Zy(n,i,o,c,p){var b=(7+o-c)%7,y=iu(n,c,p),h=1+7*(i-1)+b+y,M,D;return h<=0?(M=n-1,D=ic(M)+h):h>ic(n)?(M=n+1,D=h-ic(n)):(M=n,D=h),{year:M,dayOfYear:D}}function sc(n,i,o){var c=iu(n.year(),i,o),p=Math.floor((n.dayOfYear()-c-1)/7)+1,b,y;return p<1?(y=n.year()-1,b=p+ws(y,i,o)):p>ws(n.year(),i,o)?(b=p-ws(n.year(),i,o),y=n.year()+1):(y=n.year(),b=p),{week:b,year:y}}function ws(n,i,o){var c=iu(n,i,o),p=iu(n+1,i,o);return(ic(n)-c+p)/7}ft("w",["ww",2],"wo","week"),ft("W",["WW",2],"Wo","isoWeek"),st("w",bi,Fa),st("ww",bi,er),st("W",bi,Fa),st("WW",bi,er),tc(["w","ww","W","WW"],function(n,i,o,c){i[c.substr(0,1)]=Ut(n)});function q2(n){return sc(n,this._week.dow,this._week.doy).week}var Z2={dow:0,doy:6};function W2(){return this._week.dow}function G2(){return this._week.doy}function Y2(n){var i=this.localeData().week(this);return n==null?i:this.add((n-i)*7,"d")}function X2(n){var i=sc(this,1,4).week;return n==null?i:this.add((n-i)*7,"d")}ft("d",0,"do","day"),ft("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)}),ft("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)}),ft("dddd",0,0,function(n){return this.localeData().weekdays(this,n)}),ft("e",0,0,"weekday"),ft("E",0,0,"isoWeekday"),st("d",bi),st("e",bi),st("E",bi),st("dd",function(n,i){return i.weekdaysMinRegex(n)}),st("ddd",function(n,i){return i.weekdaysShortRegex(n)}),st("dddd",function(n,i){return i.weekdaysRegex(n)}),tc(["dd","ddd","dddd"],function(n,i,o,c){var p=o._locale.weekdaysParse(n,c,o._strict);p!=null?i.d=p:zt(o).invalidWeekday=n}),tc(["d","e","E"],function(n,i,o,c){i[c]=Ut(n)});function K2(n,i){return typeof n!="string"?n:isNaN(n)?(n=i.weekdaysParse(n),typeof n=="number"?n:null):parseInt(n,10)}function J2(n,i){return typeof n=="string"?i.weekdaysParse(n)%7||7:isNaN(n)?null:n}function Cp(n,i){return n.slice(i,7).concat(n.slice(0,i))}var Q2="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Wy="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ek="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),tk=ec,ik=ec,nk=ec;function rk(n,i){var o=Br(this._weekdays)?this._weekdays:this._weekdays[n&&n!==!0&&this._weekdays.isFormat.test(i)?"format":"standalone"];return n===!0?Cp(o,this._week.dow):n?o[n.day()]:o}function sk(n){return n===!0?Cp(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort}function ok(n){return n===!0?Cp(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin}function ak(n,i,o){var c,p,b,y=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],c=0;c<7;++c)b=Jr([2e3,1]).day(c),this._minWeekdaysParse[c]=this.weekdaysMin(b,"").toLocaleLowerCase(),this._shortWeekdaysParse[c]=this.weekdaysShort(b,"").toLocaleLowerCase(),this._weekdaysParse[c]=this.weekdays(b,"").toLocaleLowerCase();return o?i==="dddd"?(p=Li.call(this._weekdaysParse,y),p!==-1?p:null):i==="ddd"?(p=Li.call(this._shortWeekdaysParse,y),p!==-1?p:null):(p=Li.call(this._minWeekdaysParse,y),p!==-1?p:null):i==="dddd"?(p=Li.call(this._weekdaysParse,y),p!==-1||(p=Li.call(this._shortWeekdaysParse,y),p!==-1)?p:(p=Li.call(this._minWeekdaysParse,y),p!==-1?p:null)):i==="ddd"?(p=Li.call(this._shortWeekdaysParse,y),p!==-1||(p=Li.call(this._weekdaysParse,y),p!==-1)?p:(p=Li.call(this._minWeekdaysParse,y),p!==-1?p:null)):(p=Li.call(this._minWeekdaysParse,y),p!==-1||(p=Li.call(this._weekdaysParse,y),p!==-1)?p:(p=Li.call(this._shortWeekdaysParse,y),p!==-1?p:null))}function lk(n,i,o){var c,p,b;if(this._weekdaysParseExact)return ak.call(this,n,i,o);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),c=0;c<7;c++){if(p=Jr([2e3,1]).day(c),o&&!this._fullWeekdaysParse[c]&&(this._fullWeekdaysParse[c]=new RegExp("^"+this.weekdays(p,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[c]=new RegExp("^"+this.weekdaysShort(p,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[c]=new RegExp("^"+this.weekdaysMin(p,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[c]||(b="^"+this.weekdays(p,"")+"|^"+this.weekdaysShort(p,"")+"|^"+this.weekdaysMin(p,""),this._weekdaysParse[c]=new RegExp(b.replace(".",""),"i")),o&&i==="dddd"&&this._fullWeekdaysParse[c].test(n))return c;if(o&&i==="ddd"&&this._shortWeekdaysParse[c].test(n))return c;if(o&&i==="dd"&&this._minWeekdaysParse[c].test(n))return c;if(!o&&this._weekdaysParse[c].test(n))return c}}function ck(n){if(!this.isValid())return n!=null?this:NaN;var i=nc(this,"Day");return n!=null?(n=K2(n,this.localeData()),this.add(n-i,"d")):i}function hk(n){if(!this.isValid())return n!=null?this:NaN;var i=(this.day()+7-this.localeData()._week.dow)%7;return n==null?i:this.add(n-i,"d")}function uk(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var i=J2(n,this.localeData());return this.day(this.day()%7?i:i-7)}else return this.day()||7}function dk(n){return this._weekdaysParseExact?(Kt(this,"_weekdaysRegex")||Mp.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(Kt(this,"_weekdaysRegex")||(this._weekdaysRegex=tk),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function pk(n){return this._weekdaysParseExact?(Kt(this,"_weekdaysRegex")||Mp.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Kt(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ik),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function fk(n){return this._weekdaysParseExact?(Kt(this,"_weekdaysRegex")||Mp.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Kt(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=nk),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Mp(){function n(A,R){return R.length-A.length}var i=[],o=[],c=[],p=[],b,y,h,M,D;for(b=0;b<7;b++)y=Jr([2e3,1]).day(b),h=xs(this.weekdaysMin(y,"")),M=xs(this.weekdaysShort(y,"")),D=xs(this.weekdays(y,"")),i.push(h),o.push(M),c.push(D),p.push(h),p.push(M),p.push(D);i.sort(n),o.sort(n),c.sort(n),p.sort(n),this._weekdaysRegex=new RegExp("^("+p.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+i.join("|")+")","i")}function Pp(){return this.hours()%12||12}function mk(){return this.hours()||24}ft("H",["HH",2],0,"hour"),ft("h",["hh",2],0,Pp),ft("k",["kk",2],0,mk),ft("hmm",0,0,function(){return""+Pp.apply(this)+es(this.minutes(),2)}),ft("hmmss",0,0,function(){return""+Pp.apply(this)+es(this.minutes(),2)+es(this.seconds(),2)}),ft("Hmm",0,0,function(){return""+this.hours()+es(this.minutes(),2)}),ft("Hmmss",0,0,function(){return""+this.hours()+es(this.minutes(),2)+es(this.seconds(),2)});function Gy(n,i){ft(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),i)})}Gy("a",!0),Gy("A",!1);function Yy(n,i){return i._meridiemParse}st("a",Yy),st("A",Yy),st("H",bi,Sp),st("h",bi,Fa),st("k",bi,Fa),st("HH",bi,er),st("hh",bi,er),st("kk",bi,er),st("hmm",By),st("hmmss",Fy),st("Hmm",By),st("Hmmss",Fy),di(["H","HH"],ji),di(["k","kk"],function(n,i,o){var c=Ut(n);i[ji]=c===24?0:c}),di(["a","A"],function(n,i,o){o._isPm=o._locale.isPM(n),o._meridiem=n}),di(["h","hh"],function(n,i,o){i[ji]=Ut(n),zt(o).bigHour=!0}),di("hmm",function(n,i,o){var c=n.length-2;i[ji]=Ut(n.substr(0,c)),i[Nr]=Ut(n.substr(c)),zt(o).bigHour=!0}),di("hmmss",function(n,i,o){var c=n.length-4,p=n.length-2;i[ji]=Ut(n.substr(0,c)),i[Nr]=Ut(n.substr(c,2)),i[vs]=Ut(n.substr(p)),zt(o).bigHour=!0}),di("Hmm",function(n,i,o){var c=n.length-2;i[ji]=Ut(n.substr(0,c)),i[Nr]=Ut(n.substr(c))}),di("Hmmss",function(n,i,o){var c=n.length-4,p=n.length-2;i[ji]=Ut(n.substr(0,c)),i[Nr]=Ut(n.substr(c,2)),i[vs]=Ut(n.substr(p))});function gk(n){return(n+"").toLowerCase().charAt(0)==="p"}var yk=/[ap]\.?m?\.?/i,_k=Na("Hours",!0);function xk(n,i,o){return n>11?o?"pm":"PM":o?"am":"AM"}var Xy={calendar:a2,longDateFormat:u2,invalidDate:p2,ordinal:m2,dayOfMonthOrdinalParse:g2,relativeTime:_2,months:R2,monthsShort:$y,week:Z2,weekdays:Q2,weekdaysMin:ek,weekdaysShort:Wy,meridiemParse:yk},Ti={},oc={},ac;function bk(n,i){var o,c=Math.min(n.length,i.length);for(o=0;o<c;o+=1)if(n[o]!==i[o])return o;return c}function Ky(n){return n&&n.toLowerCase().replace("_","-")}function vk(n){for(var i=0,o,c,p,b;i<n.length;){for(b=Ky(n[i]).split("-"),o=b.length,c=Ky(n[i+1]),c=c?c.split("-"):null;o>0;){if(p=nu(b.slice(0,o).join("-")),p)return p;if(c&&c.length>=o&&bk(b,c)>=o-1)break;o--}i++}return ac}function wk(n){return!!(n&&n.match("^[^/\\\\]*$"))}function nu(n){var i=null,o;if(Ti[n]===void 0&&typeof module<"u"&&module&&module.exports&&wk(n))try{i=ac._abbr,o=require,o("./locale/"+n),Xs(i)}catch{Ti[n]=null}return Ti[n]}function Xs(n,i){var o;return n&&($n(i)?o=ks(n):o=Ip(n,i),o?ac=o:typeof console<"u"&&console.warn&&console.warn("Locale "+n+" not found. Did you forget to load it?")),ac._abbr}function Ip(n,i){if(i!==null){var o,c=Xy;if(i.abbr=n,Ti[n]!=null)Dy("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),c=Ti[n]._config;else if(i.parentLocale!=null)if(Ti[i.parentLocale]!=null)c=Ti[i.parentLocale]._config;else if(o=nu(i.parentLocale),o!=null)c=o._config;else return oc[i.parentLocale]||(oc[i.parentLocale]=[]),oc[i.parentLocale].push({name:n,config:i}),null;return Ti[n]=new yp(gp(c,i)),oc[n]&&oc[n].forEach(function(p){Ip(p.name,p.config)}),Xs(n),Ti[n]}else return delete Ti[n],null}function kk(n,i){if(i!=null){var o,c,p=Xy;Ti[n]!=null&&Ti[n].parentLocale!=null?Ti[n].set(gp(Ti[n]._config,i)):(c=nu(n),c!=null&&(p=c._config),i=gp(p,i),c==null&&(i.abbr=n),o=new yp(i),o.parentLocale=Ti[n],Ti[n]=o),Xs(n)}else Ti[n]!=null&&(Ti[n].parentLocale!=null?(Ti[n]=Ti[n].parentLocale,n===Xs()&&Xs(n)):Ti[n]!=null&&delete Ti[n]);return Ti[n]}function ks(n){var i;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return ac;if(!Br(n)){if(i=nu(n),i)return i;n=[n]}return vk(n)}function Sk(){return _p(Ti)}function Ap(n){var i,o=n._a;return o&&zt(n).overflow===-2&&(i=o[bs]<0||o[bs]>11?bs:o[ts]<1||o[ts]>Tp(o[pn],o[bs])?ts:o[ji]<0||o[ji]>24||o[ji]===24&&(o[Nr]!==0||o[vs]!==0||o[qo]!==0)?ji:o[Nr]<0||o[Nr]>59?Nr:o[vs]<0||o[vs]>59?vs:o[qo]<0||o[qo]>999?qo:-1,zt(n)._overflowDayOfYear&&(i<pn||i>ts)&&(i=ts),zt(n)._overflowWeeks&&i===-1&&(i=M2),zt(n)._overflowWeekday&&i===-1&&(i=P2),zt(n).overflow=i),n}var Ek=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Tk=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ck=/Z|[+-]\d\d(?::?\d\d)?/,ru=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Dp=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Mk=/^\/?Date\((-?\d+)/i,Pk=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ik={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Jy(n){var i,o,c=n._i,p=Ek.exec(c)||Tk.exec(c),b,y,h,M,D=ru.length,A=Dp.length;if(p){for(zt(n).iso=!0,i=0,o=D;i<o;i++)if(ru[i][1].exec(p[1])){y=ru[i][0],b=ru[i][2]!==!1;break}if(y==null){n._isValid=!1;return}if(p[3]){for(i=0,o=A;i<o;i++)if(Dp[i][1].exec(p[3])){h=(p[2]||" ")+Dp[i][0];break}if(h==null){n._isValid=!1;return}}if(!b&&h!=null){n._isValid=!1;return}if(p[4])if(Ck.exec(p[4]))M="Z";else{n._isValid=!1;return}n._f=y+(h||"")+(M||""),Rp(n)}else n._isValid=!1}function Ak(n,i,o,c,p,b){var y=[Dk(n),$y.indexOf(i),parseInt(o,10),parseInt(c,10),parseInt(p,10)];return b&&y.push(parseInt(b,10)),y}function Dk(n){var i=parseInt(n,10);return i<=49?2e3+i:i<=999?1900+i:i}function zk(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Rk(n,i,o){if(n){var c=Wy.indexOf(n),p=new Date(i[0],i[1],i[2]).getDay();if(c!==p)return zt(o).weekdayMismatch=!0,o._isValid=!1,!1}return!0}function Lk(n,i,o){if(n)return Ik[n];if(i)return 0;var c=parseInt(o,10),p=c%100,b=(c-p)/100;return b*60+p}function Qy(n){var i=Pk.exec(zk(n._i)),o;if(i){if(o=Ak(i[4],i[3],i[2],i[5],i[6],i[7]),!Rk(i[1],o,n))return;n._a=o,n._tzm=Lk(i[8],i[9],i[10]),n._d=rc.apply(null,n._a),n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),zt(n).rfc2822=!0}else n._isValid=!1}function Ok(n){var i=Mk.exec(n._i);if(i!==null){n._d=new Date(+i[1]);return}if(Jy(n),n._isValid===!1)delete n._isValid;else return;if(Qy(n),n._isValid===!1)delete n._isValid;else return;n._strict?n._isValid=!1:Je.createFromInputFallback(n)}Je.createFromInputFallback=xr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});function Va(n,i,o){return n??i??o}function Bk(n){var i=new Date(Je.now());return n._useUTC?[i.getUTCFullYear(),i.getUTCMonth(),i.getUTCDate()]:[i.getFullYear(),i.getMonth(),i.getDate()]}function zp(n){var i,o,c=[],p,b,y;if(!n._d){for(p=Bk(n),n._w&&n._a[ts]==null&&n._a[bs]==null&&Fk(n),n._dayOfYear!=null&&(y=Va(n._a[pn],p[pn]),(n._dayOfYear>ic(y)||n._dayOfYear===0)&&(zt(n)._overflowDayOfYear=!0),o=rc(y,0,n._dayOfYear),n._a[bs]=o.getUTCMonth(),n._a[ts]=o.getUTCDate()),i=0;i<3&&n._a[i]==null;++i)n._a[i]=c[i]=p[i];for(;i<7;i++)n._a[i]=c[i]=n._a[i]==null?i===2?1:0:n._a[i];n._a[ji]===24&&n._a[Nr]===0&&n._a[vs]===0&&n._a[qo]===0&&(n._nextDay=!0,n._a[ji]=0),n._d=(n._useUTC?rc:H2).apply(null,c),b=n._useUTC?n._d.getUTCDay():n._d.getDay(),n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),n._nextDay&&(n._a[ji]=24),n._w&&typeof n._w.d<"u"&&n._w.d!==b&&(zt(n).weekdayMismatch=!0)}}function Fk(n){var i,o,c,p,b,y,h,M,D;i=n._w,i.GG!=null||i.W!=null||i.E!=null?(b=1,y=4,o=Va(i.GG,n._a[pn],sc(vi(),1,4).year),c=Va(i.W,1),p=Va(i.E,1),(p<1||p>7)&&(M=!0)):(b=n._locale._week.dow,y=n._locale._week.doy,D=sc(vi(),b,y),o=Va(i.gg,n._a[pn],D.year),c=Va(i.w,D.week),i.d!=null?(p=i.d,(p<0||p>6)&&(M=!0)):i.e!=null?(p=i.e+b,(i.e<0||i.e>6)&&(M=!0)):p=b),c<1||c>ws(o,b,y)?zt(n)._overflowWeeks=!0:M!=null?zt(n)._overflowWeekday=!0:(h=Zy(o,c,p,b,y),n._a[pn]=h.year,n._dayOfYear=h.dayOfYear)}Je.ISO_8601=function(){},Je.RFC_2822=function(){};function Rp(n){if(n._f===Je.ISO_8601){Jy(n);return}if(n._f===Je.RFC_2822){Qy(n);return}n._a=[],zt(n).empty=!0;var i=""+n._i,o,c,p,b,y,h=i.length,M=0,D,A;for(p=zy(n._f,n._locale).match(xp)||[],A=p.length,o=0;o<A;o++)b=p[o],c=(i.match(E2(b,n))||[])[0],c&&(y=i.substr(0,i.indexOf(c)),y.length>0&&zt(n).unusedInput.push(y),i=i.slice(i.indexOf(c)+c.length),M+=c.length),Oa[b]?(c?zt(n).empty=!1:zt(n).unusedTokens.push(b),C2(b,c,n)):n._strict&&!c&&zt(n).unusedTokens.push(b);zt(n).charsLeftOver=h-M,i.length>0&&zt(n).unusedInput.push(i),n._a[ji]<=12&&zt(n).bigHour===!0&&n._a[ji]>0&&(zt(n).bigHour=void 0),zt(n).parsedDateParts=n._a.slice(0),zt(n).meridiem=n._meridiem,n._a[ji]=Nk(n._locale,n._a[ji],n._meridiem),D=zt(n).era,D!==null&&(n._a[pn]=n._locale.erasConvertYear(D,n._a[pn])),zp(n),Ap(n)}function Nk(n,i,o){var c;return o==null?i:n.meridiemHour!=null?n.meridiemHour(i,o):(n.isPM!=null&&(c=n.isPM(o),c&&i<12&&(i+=12),!c&&i===12&&(i=0)),i)}function Vk(n){var i,o,c,p,b,y,h=!1,M=n._f.length;if(M===0){zt(n).invalidFormat=!0,n._d=new Date(NaN);return}for(p=0;p<M;p++)b=0,y=!1,i=mp({},n),n._useUTC!=null&&(i._useUTC=n._useUTC),i._f=n._f[p],Rp(i),pp(i)&&(y=!0),b+=zt(i).charsLeftOver,b+=zt(i).unusedTokens.length*10,zt(i).score=b,h?b<c&&(c=b,o=i):(c==null||b<c||y)&&(c=b,o=i,y&&(h=!0));Ys(n,o||i)}function $k(n){if(!n._d){var i=vp(n._i),o=i.day===void 0?i.date:i.day;n._a=My([i.year,i.month,o,i.hour,i.minute,i.second,i.millisecond],function(c){return c&&parseInt(c,10)}),zp(n)}}function jk(n){var i=new Ql(Ap(e0(n)));return i._nextDay&&(i.add(1,"d"),i._nextDay=void 0),i}function e0(n){var i=n._i,o=n._f;return n._locale=n._locale||ks(n._l),i===null||o===void 0&&i===""?Zh({nullInput:!0}):(typeof i=="string"&&(n._i=i=n._locale.preparse(i)),Fr(i)?new Ql(Ap(i)):(Jl(i)?n._d=i:Br(o)?Vk(n):o?Rp(n):Uk(n),pp(n)||(n._d=null),n))}function Uk(n){var i=n._i;$n(i)?n._d=new Date(Je.now()):Jl(i)?n._d=new Date(i.valueOf()):typeof i=="string"?Ok(n):Br(i)?(n._a=My(i.slice(0),function(o){return parseInt(o,10)}),zp(n)):Ho(i)?$k(n):_s(i)?n._d=new Date(i):Je.createFromInputFallback(n)}function t0(n,i,o,c,p){var b={};return(i===!0||i===!1)&&(c=i,i=void 0),(o===!0||o===!1)&&(c=o,o=void 0),(Ho(n)&&up(n)||Br(n)&&n.length===0)&&(n=void 0),b._isAMomentObject=!0,b._useUTC=b._isUTC=p,b._l=o,b._i=n,b._f=i,b._strict=c,jk(b)}function vi(n,i,o,c){return t0(n,i,o,c,!1)}var Hk=xr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=vi.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:Zh()}),qk=xr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=vi.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:Zh()});function i0(n,i){var o,c;if(i.length===1&&Br(i[0])&&(i=i[0]),!i.length)return vi();for(o=i[0],c=1;c<i.length;++c)(!i[c].isValid()||i[c][n](o))&&(o=i[c]);return o}function Zk(){var n=[].slice.call(arguments,0);return i0("isBefore",n)}function Wk(){var n=[].slice.call(arguments,0);return i0("isAfter",n)}var Gk=function(){return Date.now?Date.now():+new Date},lc=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Yk(n){var i,o=!1,c,p=lc.length;for(i in n)if(Kt(n,i)&&!(Li.call(lc,i)!==-1&&(n[i]==null||!isNaN(n[i]))))return!1;for(c=0;c<p;++c)if(n[lc[c]]){if(o)return!1;parseFloat(n[lc[c]])!==Ut(n[lc[c]])&&(o=!0)}return!0}function Xk(){return this._isValid}function Kk(){return Vr(NaN)}function su(n){var i=vp(n),o=i.year||0,c=i.quarter||0,p=i.month||0,b=i.week||i.isoWeek||0,y=i.day||0,h=i.hour||0,M=i.minute||0,D=i.second||0,A=i.millisecond||0;this._isValid=Yk(i),this._milliseconds=+A+D*1e3+M*6e4+h*1e3*60*60,this._days=+y+b*7,this._months=+p+c*3+o*12,this._data={},this._locale=ks(),this._bubble()}function ou(n){return n instanceof su}function Lp(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function Jk(n,i,o){var c=Math.min(n.length,i.length),p=Math.abs(n.length-i.length),b=0,y;for(y=0;y<c;y++)Ut(n[y])!==Ut(i[y])&&b++;return b+p}function n0(n,i){ft(n,0,0,function(){var o=this.utcOffset(),c="+";return o<0&&(o=-o,c="-"),c+es(~~(o/60),2)+i+es(~~o%60,2)})}n0("Z",":"),n0("ZZ",""),st("Z",Qh),st("ZZ",Qh),di(["Z","ZZ"],function(n,i,o){o._useUTC=!0,o._tzm=Op(Qh,n)});var Qk=/([\+\-]|\d\d)/gi;function Op(n,i){var o=(i||"").match(n),c,p,b;return o===null?null:(c=o[o.length-1]||[],p=(c+"").match(Qk)||["-",0,0],b=+(p[1]*60)+Ut(p[2]),b===0?0:p[0]==="+"?b:-b)}function Bp(n,i){var o,c;return i._isUTC?(o=i.clone(),c=(Fr(n)||Jl(n)?n.valueOf():vi(n).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+c),Je.updateOffset(o,!1),o):vi(n).local()}function Fp(n){return-Math.round(n._d.getTimezoneOffset())}Je.updateOffset=function(){};function eS(n,i,o){var c=this._offset||0,p;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n=="string"){if(n=Op(Qh,n),n===null)return this}else Math.abs(n)<16&&!o&&(n=n*60);return!this._isUTC&&i&&(p=Fp(this)),this._offset=n,this._isUTC=!0,p!=null&&this.add(p,"m"),c!==n&&(!i||this._changeInProgress?a0(this,Vr(n-c,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Je.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?c:Fp(this)}function tS(n,i){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,i),this):-this.utcOffset()}function iS(n){return this.utcOffset(0,n)}function nS(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(Fp(this),"m")),this}function rS(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var n=Op(k2,this._i);n!=null?this.utcOffset(n):this.utcOffset(0,!0)}return this}function sS(n){return this.isValid()?(n=n?vi(n).utcOffset():0,(this.utcOffset()-n)%60===0):!1}function oS(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function aS(){if(!$n(this._isDSTShifted))return this._isDSTShifted;var n={},i;return mp(n,this),n=e0(n),n._a?(i=n._isUTC?Jr(n._a):vi(n._a),this._isDSTShifted=this.isValid()&&Jk(n._a,i.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function lS(){return this.isValid()?!this._isUTC:!1}function cS(){return this.isValid()?this._isUTC:!1}function r0(){return this.isValid()?this._isUTC&&this._offset===0:!1}var hS=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,uS=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Vr(n,i){var o=n,c=null,p,b,y;return ou(n)?o={ms:n._milliseconds,d:n._days,M:n._months}:_s(n)||!isNaN(+n)?(o={},i?o[i]=+n:o.milliseconds=+n):(c=hS.exec(n))?(p=c[1]==="-"?-1:1,o={y:0,d:Ut(c[ts])*p,h:Ut(c[ji])*p,m:Ut(c[Nr])*p,s:Ut(c[vs])*p,ms:Ut(Lp(c[qo]*1e3))*p}):(c=uS.exec(n))?(p=c[1]==="-"?-1:1,o={y:Zo(c[2],p),M:Zo(c[3],p),w:Zo(c[4],p),d:Zo(c[5],p),h:Zo(c[6],p),m:Zo(c[7],p),s:Zo(c[8],p)}):o==null?o={}:typeof o=="object"&&("from"in o||"to"in o)&&(y=dS(vi(o.from),vi(o.to)),o={},o.ms=y.milliseconds,o.M=y.months),b=new su(o),ou(n)&&Kt(n,"_locale")&&(b._locale=n._locale),ou(n)&&Kt(n,"_isValid")&&(b._isValid=n._isValid),b}Vr.fn=su.prototype,Vr.invalid=Kk;function Zo(n,i){var o=n&&parseFloat(n.replace(",","."));return(isNaN(o)?0:o)*i}function s0(n,i){var o={};return o.months=i.month()-n.month()+(i.year()-n.year())*12,n.clone().add(o.months,"M").isAfter(i)&&--o.months,o.milliseconds=+i-+n.clone().add(o.months,"M"),o}function dS(n,i){var o;return n.isValid()&&i.isValid()?(i=Bp(i,n),n.isBefore(i)?o=s0(n,i):(o=s0(i,n),o.milliseconds=-o.milliseconds,o.months=-o.months),o):{milliseconds:0,months:0}}function o0(n,i){return function(o,c){var p,b;return c!==null&&!isNaN(+c)&&(Dy(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),b=o,o=c,c=b),p=Vr(o,c),a0(this,p,n),this}}function a0(n,i,o,c){var p=i._milliseconds,b=Lp(i._days),y=Lp(i._months);n.isValid()&&(c=c??!0,y&&Uy(n,nc(n,"Month")+y*o),b&&Vy(n,"Date",nc(n,"Date")+b*o),p&&n._d.setTime(n._d.valueOf()+p*o),c&&Je.updateOffset(n,b||y))}var pS=o0(1,"add"),fS=o0(-1,"subtract");function l0(n){return typeof n=="string"||n instanceof String}function mS(n){return Fr(n)||Jl(n)||l0(n)||_s(n)||yS(n)||gS(n)||n===null||n===void 0}function gS(n){var i=Ho(n)&&!up(n),o=!1,c=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],p,b,y=c.length;for(p=0;p<y;p+=1)b=c[p],o=o||Kt(n,b);return i&&o}function yS(n){var i=Br(n),o=!1;return i&&(o=n.filter(function(c){return!_s(c)&&l0(n)}).length===0),i&&o}function _S(n){var i=Ho(n)&&!up(n),o=!1,c=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],p,b;for(p=0;p<c.length;p+=1)b=c[p],o=o||Kt(n,b);return i&&o}function xS(n,i){var o=n.diff(i,"days",!0);return o<-6?"sameElse":o<-1?"lastWeek":o<0?"lastDay":o<1?"sameDay":o<2?"nextDay":o<7?"nextWeek":"sameElse"}function bS(n,i){arguments.length===1&&(arguments[0]?mS(arguments[0])?(n=arguments[0],i=void 0):_S(arguments[0])&&(i=arguments[0],n=void 0):(n=void 0,i=void 0));var o=n||vi(),c=Bp(o,this).startOf("day"),p=Je.calendarFormat(this,c)||"sameElse",b=i&&(Qr(i[p])?i[p].call(this,o):i[p]);return this.format(b||this.localeData().calendar(p,this,vi(o)))}function vS(){return new Ql(this)}function wS(n,i){var o=Fr(n)?n:vi(n);return this.isValid()&&o.isValid()?(i=br(i)||"millisecond",i==="millisecond"?this.valueOf()>o.valueOf():o.valueOf()<this.clone().startOf(i).valueOf()):!1}function kS(n,i){var o=Fr(n)?n:vi(n);return this.isValid()&&o.isValid()?(i=br(i)||"millisecond",i==="millisecond"?this.valueOf()<o.valueOf():this.clone().endOf(i).valueOf()<o.valueOf()):!1}function SS(n,i,o,c){var p=Fr(n)?n:vi(n),b=Fr(i)?i:vi(i);return this.isValid()&&p.isValid()&&b.isValid()?(c=c||"()",(c[0]==="("?this.isAfter(p,o):!this.isBefore(p,o))&&(c[1]===")"?this.isBefore(b,o):!this.isAfter(b,o))):!1}function ES(n,i){var o=Fr(n)?n:vi(n),c;return this.isValid()&&o.isValid()?(i=br(i)||"millisecond",i==="millisecond"?this.valueOf()===o.valueOf():(c=o.valueOf(),this.clone().startOf(i).valueOf()<=c&&c<=this.clone().endOf(i).valueOf())):!1}function TS(n,i){return this.isSame(n,i)||this.isAfter(n,i)}function CS(n,i){return this.isSame(n,i)||this.isBefore(n,i)}function MS(n,i,o){var c,p,b;if(!this.isValid())return NaN;if(c=Bp(n,this),!c.isValid())return NaN;switch(p=(c.utcOffset()-this.utcOffset())*6e4,i=br(i),i){case"year":b=au(this,c)/12;break;case"month":b=au(this,c);break;case"quarter":b=au(this,c)/3;break;case"second":b=(this-c)/1e3;break;case"minute":b=(this-c)/6e4;break;case"hour":b=(this-c)/36e5;break;case"day":b=(this-c-p)/864e5;break;case"week":b=(this-c-p)/6048e5;break;default:b=this-c}return o?b:vr(b)}function au(n,i){if(n.date()<i.date())return-au(i,n);var o=(i.year()-n.year())*12+(i.month()-n.month()),c=n.clone().add(o,"months"),p,b;return i-c<0?(p=n.clone().add(o-1,"months"),b=(i-c)/(c-p)):(p=n.clone().add(o+1,"months"),b=(i-c)/(p-c)),-(o+b)||0}Je.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",Je.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function PS(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function IS(n){if(!this.isValid())return null;var i=n!==!0,o=i?this.clone().utc():this;return o.year()<0||o.year()>9999?Gh(o,i?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Qr(Date.prototype.toISOString)?i?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Gh(o,"Z")):Gh(o,i?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function AS(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n="moment",i="",o,c,p,b;return this.isLocal()||(n=this.utcOffset()===0?"moment.utc":"moment.parseZone",i="Z"),o="["+n+'("]',c=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",p="-MM-DD[T]HH:mm:ss.SSS",b=i+'[")]',this.format(o+c+p+b)}function DS(n){n||(n=this.isUtc()?Je.defaultFormatUtc:Je.defaultFormat);var i=Gh(this,n);return this.localeData().postformat(i)}function zS(n,i){return this.isValid()&&(Fr(n)&&n.isValid()||vi(n).isValid())?Vr({to:this,from:n}).locale(this.locale()).humanize(!i):this.localeData().invalidDate()}function RS(n){return this.from(vi(),n)}function LS(n,i){return this.isValid()&&(Fr(n)&&n.isValid()||vi(n).isValid())?Vr({from:this,to:n}).locale(this.locale()).humanize(!i):this.localeData().invalidDate()}function OS(n){return this.to(vi(),n)}function c0(n){var i;return n===void 0?this._locale._abbr:(i=ks(n),i!=null&&(this._locale=i),this)}var h0=xr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===void 0?this.localeData():this.locale(n)});function u0(){return this._locale}var lu=1e3,$a=60*lu,cu=60*$a,d0=(365*400+97)*24*cu;function ja(n,i){return(n%i+i)%i}function p0(n,i,o){return n<100&&n>=0?new Date(n+400,i,o)-d0:new Date(n,i,o).valueOf()}function f0(n,i,o){return n<100&&n>=0?Date.UTC(n+400,i,o)-d0:Date.UTC(n,i,o)}function BS(n){var i,o;if(n=br(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(o=this._isUTC?f0:p0,n){case"year":i=o(this.year(),0,1);break;case"quarter":i=o(this.year(),this.month()-this.month()%3,1);break;case"month":i=o(this.year(),this.month(),1);break;case"week":i=o(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":i=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":i=o(this.year(),this.month(),this.date());break;case"hour":i=this._d.valueOf(),i-=ja(i+(this._isUTC?0:this.utcOffset()*$a),cu);break;case"minute":i=this._d.valueOf(),i-=ja(i,$a);break;case"second":i=this._d.valueOf(),i-=ja(i,lu);break}return this._d.setTime(i),Je.updateOffset(this,!0),this}function FS(n){var i,o;if(n=br(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(o=this._isUTC?f0:p0,n){case"year":i=o(this.year()+1,0,1)-1;break;case"quarter":i=o(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":i=o(this.year(),this.month()+1,1)-1;break;case"week":i=o(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":i=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":i=o(this.year(),this.month(),this.date()+1)-1;break;case"hour":i=this._d.valueOf(),i+=cu-ja(i+(this._isUTC?0:this.utcOffset()*$a),cu)-1;break;case"minute":i=this._d.valueOf(),i+=$a-ja(i,$a)-1;break;case"second":i=this._d.valueOf(),i+=lu-ja(i,lu)-1;break}return this._d.setTime(i),Je.updateOffset(this,!0),this}function NS(){return this._d.valueOf()-(this._offset||0)*6e4}function VS(){return Math.floor(this.valueOf()/1e3)}function $S(){return new Date(this.valueOf())}function jS(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function US(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function HS(){return this.isValid()?this.toISOString():null}function qS(){return pp(this)}function ZS(){return Ys({},zt(this))}function WS(){return zt(this).overflow}function GS(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ft("N",0,0,"eraAbbr"),ft("NN",0,0,"eraAbbr"),ft("NNN",0,0,"eraAbbr"),ft("NNNN",0,0,"eraName"),ft("NNNNN",0,0,"eraNarrow"),ft("y",["y",1],"yo","eraYear"),ft("y",["yy",2],0,"eraYear"),ft("y",["yyy",3],0,"eraYear"),ft("y",["yyyy",4],0,"eraYear"),st("N",Np),st("NN",Np),st("NNN",Np),st("NNNN",sE),st("NNNNN",oE),di(["N","NN","NNN","NNNN","NNNNN"],function(n,i,o,c){var p=o._locale.erasParse(n,c,o._strict);p?zt(o).era=p:zt(o).invalidEra=n}),st("y",Ba),st("yy",Ba),st("yyy",Ba),st("yyyy",Ba),st("yo",aE),di(["y","yy","yyy","yyyy"],pn),di(["yo"],function(n,i,o,c){var p;o._locale._eraYearOrdinalRegex&&(p=n.match(o._locale._eraYearOrdinalRegex)),o._locale.eraYearOrdinalParse?i[pn]=o._locale.eraYearOrdinalParse(n,p):i[pn]=parseInt(n,10)});function YS(n,i){var o,c,p,b=this._eras||ks("en")._eras;for(o=0,c=b.length;o<c;++o){switch(typeof b[o].since){case"string":p=Je(b[o].since).startOf("day"),b[o].since=p.valueOf();break}switch(typeof b[o].until){case"undefined":b[o].until=1/0;break;case"string":p=Je(b[o].until).startOf("day").valueOf(),b[o].until=p.valueOf();break}}return b}function XS(n,i,o){var c,p,b=this.eras(),y,h,M;for(n=n.toUpperCase(),c=0,p=b.length;c<p;++c)if(y=b[c].name.toUpperCase(),h=b[c].abbr.toUpperCase(),M=b[c].narrow.toUpperCase(),o)switch(i){case"N":case"NN":case"NNN":if(h===n)return b[c];break;case"NNNN":if(y===n)return b[c];break;case"NNNNN":if(M===n)return b[c];break}else if([y,h,M].indexOf(n)>=0)return b[c]}function KS(n,i){var o=n.since<=n.until?1:-1;return i===void 0?Je(n.since).year():Je(n.since).year()+(i-n.offset)*o}function JS(){var n,i,o,c=this.localeData().eras();for(n=0,i=c.length;n<i;++n)if(o=this.clone().startOf("day").valueOf(),c[n].since<=o&&o<=c[n].until||c[n].until<=o&&o<=c[n].since)return c[n].name;return""}function QS(){var n,i,o,c=this.localeData().eras();for(n=0,i=c.length;n<i;++n)if(o=this.clone().startOf("day").valueOf(),c[n].since<=o&&o<=c[n].until||c[n].until<=o&&o<=c[n].since)return c[n].narrow;return""}function eE(){var n,i,o,c=this.localeData().eras();for(n=0,i=c.length;n<i;++n)if(o=this.clone().startOf("day").valueOf(),c[n].since<=o&&o<=c[n].until||c[n].until<=o&&o<=c[n].since)return c[n].abbr;return""}function tE(){var n,i,o,c,p=this.localeData().eras();for(n=0,i=p.length;n<i;++n)if(o=p[n].since<=p[n].until?1:-1,c=this.clone().startOf("day").valueOf(),p[n].since<=c&&c<=p[n].until||p[n].until<=c&&c<=p[n].since)return(this.year()-Je(p[n].since).year())*o+p[n].offset;return this.year()}function iE(n){return Kt(this,"_erasNameRegex")||Vp.call(this),n?this._erasNameRegex:this._erasRegex}function nE(n){return Kt(this,"_erasAbbrRegex")||Vp.call(this),n?this._erasAbbrRegex:this._erasRegex}function rE(n){return Kt(this,"_erasNarrowRegex")||Vp.call(this),n?this._erasNarrowRegex:this._erasRegex}function Np(n,i){return i.erasAbbrRegex(n)}function sE(n,i){return i.erasNameRegex(n)}function oE(n,i){return i.erasNarrowRegex(n)}function aE(n,i){return i._eraYearOrdinalRegex||Ba}function Vp(){var n=[],i=[],o=[],c=[],p,b,y,h,M,D=this.eras();for(p=0,b=D.length;p<b;++p)y=xs(D[p].name),h=xs(D[p].abbr),M=xs(D[p].narrow),i.push(y),n.push(h),o.push(M),c.push(y),c.push(h),c.push(M);this._erasRegex=new RegExp("^("+c.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+i.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}ft(0,["gg",2],0,function(){return this.weekYear()%100}),ft(0,["GG",2],0,function(){return this.isoWeekYear()%100});function hu(n,i){ft(0,[n,n.length],0,i)}hu("gggg","weekYear"),hu("ggggg","weekYear"),hu("GGGG","isoWeekYear"),hu("GGGGG","isoWeekYear"),st("G",Jh),st("g",Jh),st("GG",bi,er),st("gg",bi,er),st("GGGG",kp,wp),st("gggg",kp,wp),st("GGGGG",Kh,Yh),st("ggggg",Kh,Yh),tc(["gggg","ggggg","GGGG","GGGGG"],function(n,i,o,c){i[c.substr(0,2)]=Ut(n)}),tc(["gg","GG"],function(n,i,o,c){i[c]=Je.parseTwoDigitYear(n)});function lE(n){return m0.call(this,n,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function cE(n){return m0.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function hE(){return ws(this.year(),1,4)}function uE(){return ws(this.isoWeekYear(),1,4)}function dE(){var n=this.localeData()._week;return ws(this.year(),n.dow,n.doy)}function pE(){var n=this.localeData()._week;return ws(this.weekYear(),n.dow,n.doy)}function m0(n,i,o,c,p){var b;return n==null?sc(this,c,p).year:(b=ws(n,c,p),i>b&&(i=b),fE.call(this,n,i,o,c,p))}function fE(n,i,o,c,p){var b=Zy(n,i,o,c,p),y=rc(b.year,0,b.dayOfYear);return this.year(y.getUTCFullYear()),this.month(y.getUTCMonth()),this.date(y.getUTCDate()),this}ft("Q",0,"Qo","quarter"),st("Q",Ly),di("Q",function(n,i){i[bs]=(Ut(n)-1)*3});function mE(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}ft("D",["DD",2],"Do","date"),st("D",bi,Fa),st("DD",bi,er),st("Do",function(n,i){return n?i._dayOfMonthOrdinalParse||i._ordinalParse:i._dayOfMonthOrdinalParseLenient}),di(["D","DD"],ts),di("Do",function(n,i){i[ts]=Ut(n.match(bi)[0])});var g0=Na("Date",!0);ft("DDD",["DDDD",3],"DDDo","dayOfYear"),st("DDD",Xh),st("DDDD",Oy),di(["DDD","DDDD"],function(n,i,o){o._dayOfYear=Ut(n)});function gE(n){var i=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?i:this.add(n-i,"d")}ft("m",["mm",2],0,"minute"),st("m",bi,Sp),st("mm",bi,er),di(["m","mm"],Nr);var yE=Na("Minutes",!1);ft("s",["ss",2],0,"second"),st("s",bi,Sp),st("ss",bi,er),di(["s","ss"],vs);var _E=Na("Seconds",!1);ft("S",0,0,function(){return~~(this.millisecond()/100)}),ft(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ft(0,["SSS",3],0,"millisecond"),ft(0,["SSSS",4],0,function(){return this.millisecond()*10}),ft(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ft(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ft(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ft(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ft(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),st("S",Xh,Ly),st("SS",Xh,er),st("SSS",Xh,Oy);var Ks,y0;for(Ks="SSSS";Ks.length<=9;Ks+="S")st(Ks,Ba);function xE(n,i){i[qo]=Ut(("0."+n)*1e3)}for(Ks="S";Ks.length<=9;Ks+="S")di(Ks,xE);y0=Na("Milliseconds",!1),ft("z",0,0,"zoneAbbr"),ft("zz",0,0,"zoneName");function bE(){return this._isUTC?"UTC":""}function vE(){return this._isUTC?"Coordinated Universal Time":""}var ze=Ql.prototype;ze.add=pS,ze.calendar=bS,ze.clone=vS,ze.diff=MS,ze.endOf=FS,ze.format=DS,ze.from=zS,ze.fromNow=RS,ze.to=LS,ze.toNow=OS,ze.get=A2,ze.invalidAt=WS,ze.isAfter=wS,ze.isBefore=kS,ze.isBetween=SS,ze.isSame=ES,ze.isSameOrAfter=TS,ze.isSameOrBefore=CS,ze.isValid=qS,ze.lang=h0,ze.locale=c0,ze.localeData=u0,ze.max=qk,ze.min=Hk,ze.parsingFlags=ZS,ze.set=D2,ze.startOf=BS,ze.subtract=fS,ze.toArray=jS,ze.toObject=US,ze.toDate=$S,ze.toISOString=IS,ze.inspect=AS,typeof Symbol<"u"&&Symbol.for!=null&&(ze[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ze.toJSON=HS,ze.toString=PS,ze.unix=VS,ze.valueOf=NS,ze.creationData=GS,ze.eraName=JS,ze.eraNarrow=QS,ze.eraAbbr=eE,ze.eraYear=tE,ze.year=Ny,ze.isLeapYear=I2,ze.weekYear=lE,ze.isoWeekYear=cE,ze.quarter=ze.quarters=mE,ze.month=Hy,ze.daysInMonth=$2,ze.week=ze.weeks=Y2,ze.isoWeek=ze.isoWeeks=X2,ze.weeksInYear=dE,ze.weeksInWeekYear=pE,ze.isoWeeksInYear=hE,ze.isoWeeksInISOWeekYear=uE,ze.date=g0,ze.day=ze.days=ck,ze.weekday=hk,ze.isoWeekday=uk,ze.dayOfYear=gE,ze.hour=ze.hours=_k,ze.minute=ze.minutes=yE,ze.second=ze.seconds=_E,ze.millisecond=ze.milliseconds=y0,ze.utcOffset=eS,ze.utc=iS,ze.local=nS,ze.parseZone=rS,ze.hasAlignedHourOffset=sS,ze.isDST=oS,ze.isLocal=lS,ze.isUtcOffset=cS,ze.isUtc=r0,ze.isUTC=r0,ze.zoneAbbr=bE,ze.zoneName=vE,ze.dates=xr("dates accessor is deprecated. Use date instead.",g0),ze.months=xr("months accessor is deprecated. Use month instead",Hy),ze.years=xr("years accessor is deprecated. Use year instead",Ny),ze.zone=xr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",tS),ze.isDSTShifted=xr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",aS);function wE(n){return vi(n*1e3)}function kE(){return vi.apply(null,arguments).parseZone()}function _0(n){return n}var Jt=yp.prototype;Jt.calendar=l2,Jt.longDateFormat=d2,Jt.invalidDate=f2,Jt.ordinal=y2,Jt.preparse=_0,Jt.postformat=_0,Jt.relativeTime=x2,Jt.pastFuture=b2,Jt.set=o2,Jt.eras=YS,Jt.erasParse=XS,Jt.erasConvertYear=KS,Jt.erasAbbrRegex=nE,Jt.erasNameRegex=iE,Jt.erasNarrowRegex=rE,Jt.months=B2,Jt.monthsShort=F2,Jt.monthsParse=V2,Jt.monthsRegex=U2,Jt.monthsShortRegex=j2,Jt.week=q2,Jt.firstDayOfYear=G2,Jt.firstDayOfWeek=W2,Jt.weekdays=rk,Jt.weekdaysMin=ok,Jt.weekdaysShort=sk,Jt.weekdaysParse=lk,Jt.weekdaysRegex=dk,Jt.weekdaysShortRegex=pk,Jt.weekdaysMinRegex=fk,Jt.isPM=gk,Jt.meridiem=xk;function uu(n,i,o,c){var p=ks(),b=Jr().set(c,i);return p[o](b,n)}function x0(n,i,o){if(_s(n)&&(i=n,n=void 0),n=n||"",i!=null)return uu(n,i,o,"month");var c,p=[];for(c=0;c<12;c++)p[c]=uu(n,c,o,"month");return p}function $p(n,i,o,c){typeof n=="boolean"?(_s(i)&&(o=i,i=void 0),i=i||""):(i=n,o=i,n=!1,_s(i)&&(o=i,i=void 0),i=i||"");var p=ks(),b=n?p._week.dow:0,y,h=[];if(o!=null)return uu(i,(o+b)%7,c,"day");for(y=0;y<7;y++)h[y]=uu(i,(y+b)%7,c,"day");return h}function SE(n,i){return x0(n,i,"months")}function EE(n,i){return x0(n,i,"monthsShort")}function TE(n,i,o){return $p(n,i,o,"weekdays")}function CE(n,i,o){return $p(n,i,o,"weekdaysShort")}function ME(n,i,o){return $p(n,i,o,"weekdaysMin")}Xs("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var i=n%10,o=Ut(n%100/10)===1?"th":i===1?"st":i===2?"nd":i===3?"rd":"th";return n+o}}),Je.lang=xr("moment.lang is deprecated. Use moment.locale instead.",Xs),Je.langData=xr("moment.langData is deprecated. Use moment.localeData instead.",ks);var Ss=Math.abs;function PE(){var n=this._data;return this._milliseconds=Ss(this._milliseconds),this._days=Ss(this._days),this._months=Ss(this._months),n.milliseconds=Ss(n.milliseconds),n.seconds=Ss(n.seconds),n.minutes=Ss(n.minutes),n.hours=Ss(n.hours),n.months=Ss(n.months),n.years=Ss(n.years),this}function b0(n,i,o,c){var p=Vr(i,o);return n._milliseconds+=c*p._milliseconds,n._days+=c*p._days,n._months+=c*p._months,n._bubble()}function IE(n,i){return b0(this,n,i,1)}function AE(n,i){return b0(this,n,i,-1)}function v0(n){return n<0?Math.floor(n):Math.ceil(n)}function DE(){var n=this._milliseconds,i=this._days,o=this._months,c=this._data,p,b,y,h,M;return n>=0&&i>=0&&o>=0||n<=0&&i<=0&&o<=0||(n+=v0(jp(o)+i)*864e5,i=0,o=0),c.milliseconds=n%1e3,p=vr(n/1e3),c.seconds=p%60,b=vr(p/60),c.minutes=b%60,y=vr(b/60),c.hours=y%24,i+=vr(y/24),M=vr(w0(i)),o+=M,i-=v0(jp(M)),h=vr(o/12),o%=12,c.days=i,c.months=o,c.years=h,this}function w0(n){return n*4800/146097}function jp(n){return n*146097/4800}function zE(n){if(!this.isValid())return NaN;var i,o,c=this._milliseconds;if(n=br(n),n==="month"||n==="quarter"||n==="year")switch(i=this._days+c/864e5,o=this._months+w0(i),n){case"month":return o;case"quarter":return o/3;case"year":return o/12}else switch(i=this._days+Math.round(jp(this._months)),n){case"week":return i/7+c/6048e5;case"day":return i+c/864e5;case"hour":return i*24+c/36e5;case"minute":return i*1440+c/6e4;case"second":return i*86400+c/1e3;case"millisecond":return Math.floor(i*864e5)+c;default:throw new Error("Unknown unit "+n)}}function Es(n){return function(){return this.as(n)}}var k0=Es("ms"),RE=Es("s"),LE=Es("m"),OE=Es("h"),BE=Es("d"),FE=Es("w"),NE=Es("M"),VE=Es("Q"),$E=Es("y"),jE=k0;function UE(){return Vr(this)}function HE(n){return n=br(n),this.isValid()?this[n+"s"]():NaN}function Wo(n){return function(){return this.isValid()?this._data[n]:NaN}}var qE=Wo("milliseconds"),ZE=Wo("seconds"),WE=Wo("minutes"),GE=Wo("hours"),YE=Wo("days"),XE=Wo("months"),KE=Wo("years");function JE(){return vr(this.days()/7)}var Ts=Math.round,Ua={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function QE(n,i,o,c,p){return p.relativeTime(i||1,!!o,n,c)}function eT(n,i,o,c){var p=Vr(n).abs(),b=Ts(p.as("s")),y=Ts(p.as("m")),h=Ts(p.as("h")),M=Ts(p.as("d")),D=Ts(p.as("M")),A=Ts(p.as("w")),R=Ts(p.as("y")),z=b<=o.ss&&["s",b]||b<o.s&&["ss",b]||y<=1&&["m"]||y<o.m&&["mm",y]||h<=1&&["h"]||h<o.h&&["hh",h]||M<=1&&["d"]||M<o.d&&["dd",M];return o.w!=null&&(z=z||A<=1&&["w"]||A<o.w&&["ww",A]),z=z||D<=1&&["M"]||D<o.M&&["MM",D]||R<=1&&["y"]||["yy",R],z[2]=i,z[3]=+n>0,z[4]=c,QE.apply(null,z)}function tT(n){return n===void 0?Ts:typeof n=="function"?(Ts=n,!0):!1}function iT(n,i){return Ua[n]===void 0?!1:i===void 0?Ua[n]:(Ua[n]=i,n==="s"&&(Ua.ss=i-1),!0)}function nT(n,i){if(!this.isValid())return this.localeData().invalidDate();var o=!1,c=Ua,p,b;return typeof n=="object"&&(i=n,n=!1),typeof n=="boolean"&&(o=n),typeof i=="object"&&(c=Object.assign({},Ua,i),i.s!=null&&i.ss==null&&(c.ss=i.s-1)),p=this.localeData(),b=eT(this,!o,c,p),o&&(b=p.pastFuture(+this,b)),p.postformat(b)}var Up=Math.abs;function Ha(n){return(n>0)-(n<0)||+n}function du(){if(!this.isValid())return this.localeData().invalidDate();var n=Up(this._milliseconds)/1e3,i=Up(this._days),o=Up(this._months),c,p,b,y,h=this.asSeconds(),M,D,A,R;return h?(c=vr(n/60),p=vr(c/60),n%=60,c%=60,b=vr(o/12),o%=12,y=n?n.toFixed(3).replace(/\.?0+$/,""):"",M=h<0?"-":"",D=Ha(this._months)!==Ha(h)?"-":"",A=Ha(this._days)!==Ha(h)?"-":"",R=Ha(this._milliseconds)!==Ha(h)?"-":"",M+"P"+(b?D+b+"Y":"")+(o?D+o+"M":"")+(i?A+i+"D":"")+(p||c||n?"T":"")+(p?R+p+"H":"")+(c?R+c+"M":"")+(n?R+y+"S":"")):"P0D"}var Gt=su.prototype;Gt.isValid=Xk,Gt.abs=PE,Gt.add=IE,Gt.subtract=AE,Gt.as=zE,Gt.asMilliseconds=k0,Gt.asSeconds=RE,Gt.asMinutes=LE,Gt.asHours=OE,Gt.asDays=BE,Gt.asWeeks=FE,Gt.asMonths=NE,Gt.asQuarters=VE,Gt.asYears=$E,Gt.valueOf=jE,Gt._bubble=DE,Gt.clone=UE,Gt.get=HE,Gt.milliseconds=qE,Gt.seconds=ZE,Gt.minutes=WE,Gt.hours=GE,Gt.days=YE,Gt.weeks=JE,Gt.months=XE,Gt.years=KE,Gt.humanize=nT,Gt.toISOString=du,Gt.toString=du,Gt.toJSON=du,Gt.locale=c0,Gt.localeData=u0,Gt.toIsoString=xr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",du),Gt.lang=h0,ft("X",0,0,"unix"),ft("x",0,0,"valueOf"),st("x",Jh),st("X",S2),di("X",function(n,i,o){o._d=new Date(parseFloat(n)*1e3)}),di("x",function(n,i,o){o._d=new Date(Ut(n))});//! moment.js
|
|
629
|
-
Je.version="2.30.1",r2(vi),Je.fn=ze,Je.min=Zk,Je.max=Wk,Je.now=Gk,Je.utc=Jr,Je.unix=wE,Je.months=SE,Je.isDate=Jl,Je.locale=Xs,Je.invalid=Zh,Je.duration=Vr,Je.isMoment=Fr,Je.weekdays=TE,Je.parseZone=kE,Je.localeData=ks,Je.isDuration=ou,Je.monthsShort=EE,Je.weekdaysMin=ME,Je.defineLocale=Ip,Je.updateLocale=kk,Je.locales=Sk,Je.weekdaysShort=CE,Je.normalizeUnits=br,Je.relativeTimeRounding=tT,Je.relativeTimeThreshold=iT,Je.calendarFormat=xS,Je.prototype=ze,Je.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const rT=n=>{const i=/(\b\S)?/g,o=n.match(i);return o?o.join("").toUpperCase():""},sT={props:{name:{type:String,default(){return""}},avatar:{type:String,default(){return""}}},computed:{inItials(){return rT(this.name)}}},oT={class:"mr-2"},aT=["src"],lT={key:1,class:"flex flex-shrink-0 items-center justify-center w-6 h-6 bg-gray-500 text-xs text-white rounded-full"},cT={key:0},hT={key:1,class:"text-sm"};function uT(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("div",oT,[o.avatar?(w.openBlock(),w.createElementBlock("img",{key:0,src:o.avatar,alt:"avatar",class:"flex flex-shrink-0 items-center justify-center w-6 h-6 rounded-full"},null,8,aT)):o.name?(w.openBlock(),w.createElementBlock("div",lT,[b.inItials.length?(w.openBlock(),w.createElementBlock("span",cT,w.toDisplayString(b.inItials),1)):(w.openBlock(),w.createElementBlock("span",hT,i[0]||(i[0]=[w.createElementVNode("i",{class:"ti ti-user"},null,-1)])))])):w.createCommentVNode("",!0)])}const dT={components:{VsWidgetCommentsAvatar:kt(sT,[["render",uT]])},props:{comment:{type:Object,default:()=>({})},user:{type:Object,default:()=>({})},id:{type:String,default:""}},data(){return{commentContent:this.comment.body,isCommentActionVisible:!1,isOpen:!1,textareaValue:""}},computed:{isUserAutor(){return this.user.uid===this.comment.uid},createDate(){try{const n=Je(this.comment.cdate,"YYYY-MM-DD");return new Date(n).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}},watch:{isOpen(n){n&&(this.textareaValue=this.comment.body)}},methods:{confirnDeleteComment(){document.body.click(),this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей коментар?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteComment,updateListOnConfirm:!0})},async updateComment(){try{await gt.put(`/api/widget/comment/${this.id}/${this.comment.communication_id}`,{body:this.textareaValue}),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},async deleteComment(){try{await gt.delete(`/api/widget/comment/${this.id}/${this.comment.communication_id}`),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},toggleCommentAction(){this.isCommentActionVisible=!this.isCommentActionVisible}}},pT={class:"p-6 text-base bg-white dark:bg-gray-900"},fT={class:"flex justify-between items-center mb-2"},mT={class:"flex items-center"},gT={class:"inline-flex items-center mr-3 text-sm text-gray-900 dark:text-white font-semibold capitalize"},yT={class:"text-sm text-gray-600 dark:text-gray-400"},_T={class:"text-gray-500 dark:text-gray-400"},xT={class:"flex items-center gap-[4px]"},bT={class:"flex flex-col gap-[8px] text-sm font-medium text-gray-500"},vT={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function wT(n,i,o,c,p,b){const y=w.resolveComponent("VsWidgetCommentsAvatar"),h=w.resolveComponent("VsDialog");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("div",pT,[w.createElementVNode("div",fT,[w.createElementVNode("div",mT,[w.createElementVNode("p",gT,[w.createVNode(y,{name:o.comment.username,avatar:o.comment.avatar},null,8,["name","avatar"]),w.createTextVNode(w.toDisplayString(o.comment.username),1)]),w.createElementVNode("div",yT,w.toDisplayString(b.createDate),1)])]),w.createElementVNode("p",_T,w.toDisplayString(o.comment.body),1),w.createElementVNode("div",xT,[w.createElementVNode("button",{type:"button",class:"block py-2 dark:hover:bg-gray-600 hover:underline dark:hover:text-white text-start duration-300",onClick:i[0]||(i[0]=M=>p.isOpen=!0)}," Редагувати "),w.createElementVNode("button",{type:"button",class:"block py-2 dark:hover:bg-gray-600 hover:underline dark:hover:text-white text-start duration-300",onClick:i[1]||(i[1]=M=>b.confirnDeleteComment())}," Видалити ")])]),w.createVNode(h,{visible:p.isOpen,"onUpdate:visible":i[5]||(i[5]=M=>p.isOpen=M),title:"Редагувати"},{footer:w.withCtx(()=>[w.createElementVNode("div",vT,[w.createElementVNode("button",{onClick:i[3]||(i[3]=M=>p.isOpen=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Відмінити "),w.createElementVNode("button",{onClick:i[4]||(i[4]=(...M)=>b.updateComment&&b.updateComment(...M)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:w.withCtx(()=>[w.createElementVNode("label",bT,[i[6]||(i[6]=w.createTextVNode(" Коментар ")),w.withDirectives(w.createElementVNode("textarea",{"onUpdate:modelValue":i[2]||(i[2]=M=>p.textareaValue=M),placeholder:"Напишіть коментар...",class:"w-full h-[200px] border rounded-lg outline-none resize-none p-[20px] focus:border-[2px] focus:border-blue-600 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},null,512),[[w.vModelText,p.textareaValue]])])]),_:1},8,["visible"])],64)}const kT={components:{VsWidgetCommentsItem:kt(dT,[["render",wT]])},inject:["activeAddFormEditor"],props:{id:{type:String,default:()=>""},prefilledData:{type:Object,default:null}},data(){return{isLoaded:!1,isLoadFailed:!1,comments:[],user:{},modal:{title:"",message:"",cancel:"",confirm:"",cancelButtonText:"",confirmButtonText:""},isModalVisible:!1}},async created(){await this.getComments()},methods:{async getComments(){if(this.prefilledData){this.comments=this.prefilledData.rows,this.isLoaded=!0;return}try{const{data:n}=await gt.get(`/api/widget/comment/${this.id}`);this.comments=n.rows,this.user=n.user}catch(n){this.isLoadFailed=!0,console.error(n)}this.isLoaded=!0,this.$emit("update-comment-count")},prepareModal(n){const i={...n};return n.cancel||(i.cancel=()=>{this.isModalVisible=!1}),n.updateListOnConfirm&&(i.confirm=async()=>{await n.confirm(),this.isModalVisible=!1}),i},handleOpenModal(n){this.modal=this.prepareModal(n),this.isModalVisible=!0}}},ST={class:"flex flex-col divide-y"},ET={key:0,class:"max-h-[300px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},TT={key:1},CT={class:"p-4"},MT={class:"mt-1 text-gray-500 dark:text-neutral-500"},PT={class:"mt-4 flex justify-end gap-x-3"};function IT(n,i,o,c,p,b){const y=w.resolveComponent("VsErrorOnLoading"),h=w.resolveComponent("VsWidgetCommentsItem"),M=w.resolveComponent("VsLoader"),D=w.resolveComponent("VsDialog");return w.openBlock(),w.createElementBlock("div",ST,[p.isLoaded?(w.openBlock(),w.createElementBlock(w.Fragment,{key:0},[p.isLoadFailed?(w.openBlock(),w.createBlock(y,{key:0})):(w.openBlock(),w.createElementBlock(w.Fragment,{key:1},[p.comments.length?(w.openBlock(),w.createElementBlock("div",ET,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(p.comments,(A,R)=>(w.openBlock(),w.createBlock(h,{key:R,comment:A,user:p.user,index:R,id:o.id,onListUpdate:b.getComments,class:"border-top",onOpenModal:i[0]||(i[0]=z=>b.handleOpenModal(z))},null,8,["comment","user","index","id","onListUpdate"]))),128))])):(w.openBlock(),w.createElementBlock("div",TT,i[4]||(i[4]=[w.createElementVNode("p",{class:"pl-3 text-sm font-medium text-gray-600"},"Коментарі відсутні",-1)])))],64))],64)):(w.openBlock(),w.createBlock(M,{key:1,class:"justify-center",text:"Please wait..."})),w.createVNode(D,{title:p.modal.title,size:"small",visible:p.isModalVisible,"onUpdate:visible":i[3]||(i[3]=A=>p.isModalVisible=A)},{default:w.withCtx(()=>[w.createElementVNode("div",CT,[w.createElementVNode("p",MT,w.toDisplayString(p.modal.message),1),w.createElementVNode("div",PT,[w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium 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 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:i[1]||(i[1]=(...A)=>p.modal.cancel&&p.modal.cancel(...A))},w.toDisplayString(p.modal.cancelButtonText),1),w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:i[2]||(i[2]=(...A)=>p.modal.confirm&&p.modal.confirm(...A))},w.toDisplayString(p.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const AT=kt(kT,[["render",IT]]),DT={props:{id:{type:String,default:()=>""},autofocus:{type:Boolean,default:()=>!0}},data(){return{isEditorOpen:!1,commentContent:""}},methods:{async addNewComment(){if(this.commentContent)try{await gt.post(`/api/widget/comment/${this.id}`,{body:this.commentContent}),this.commentContent="",this.$emit("list-update")}catch(n){console.error(n)}},setNewContent(n){this.commentContent=n}}},zT={class:"w-full widget-comment-form"},RT={class:"mb-4 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"};function LT(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("div",zT,[w.createElementVNode("div",RT,[w.withDirectives(w.createElementVNode("textarea",{"onUpdate:modelValue":i[0]||(i[0]=y=>p.commentContent=y),rows:"6",class:"w-full h-[200px] border rounded-lg outline-none resize-none p-[20px] focus:border-[2px] focus:border-blue-600 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",placeholder:"Напишіть коментар..."},null,512),[[w.vModelText,p.commentContent]])]),w.createElementVNode("button",{ref:"buttonAdd",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:i[1]||(i[1]=(...y)=>b.addNewComment&&b.addNewComment(...y))}," Відправити коментар ",512)])}const OT={components:{VsWidgetCommentsList:AT,VsWidgetCommentsAddForm:kt(DT,[["render",LT]])},props:{id:{type:String,default(){return""}},prefilledData:{type:Object,default:null}},data(){return{activeAddFormEditor:"",comments:[],totalComment:"0"}},mounted(){this.comments=this.$refs.commentListRef.comments},watch:{comments(n){this.$emit("count-change",n.length)}},methods:{listUpdate(){this.$refs.commentListRef.getComments()},updateCommentCount(){this.totalComment=this.$refs.commentListRef.comments.length||"0"}}},BT={class:"bg-white-200"},FT={class:"flex justify-between items-center gap-x-2 mb-4"},NT={class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"},VT={key:0,class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"};function $T(n,i,o,c,p,b){const y=w.resolveComponent("VsWidgetCommentsAddForm"),h=w.resolveComponent("VsWidgetCommentsList");return w.openBlock(),w.createElementBlock("div",BT,[w.createElementVNode("div",FT,[w.createElementVNode("h2",NT,[i[2]||(i[2]=w.createTextVNode("Коментарі ")),p.comments?(w.openBlock(),w.createElementBlock("span",VT,"("+w.toDisplayString(p.totalComment)+")",1)):w.createCommentVNode("",!0)])]),w.createVNode(y,{class:"mb-6",id:o.id,onListUpdate:i[0]||(i[0]=M=>b.listUpdate())},null,8,["id"]),w.createVNode(h,{id:o.id,onUpdateCommentCount:i[1]||(i[1]=M=>b.updateCommentCount()),"prefilled-data":o.prefilledData,ref:"commentListRef"},null,8,["id","prefilled-data"])])}const jT={"vs-widget-map":_w,"vs-widget-gallery":n2,"vs-widget-comments":kt(OT,[["render",$T]])},UT={},HT={style:{width:"calc(100vw - 300px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 flex items-center justify-center"},qT={...jT,...UT,"vs-dashboard":{__name:"vs-dashboard",setup(n){return(i,o)=>(w.openBlock(),w.createElementBlock("div",HT,o[0]||(o[0]=[w.createElementVNode("div",{class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"mb-4 xl:mb-8"},[w.createElementVNode("h1",{class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"}," Members "),w.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ")]),w.createElementVNode("div",{class:"space-y-5"},[w.createElementVNode("div",{class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5"},[w.createElementVNode("div",{class:"relative w-full"},[w.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5"},[w.createElementVNode("svg",{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[w.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),w.createElementVNode("path",{d:"m21 21-4.3-4.3"})])]),w.createElementVNode("input",{type:"text",class:"py-2 ps-10 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Search by name or email"}),w.createElementVNode("div",{class:"hidden absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-1"},[w.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-6 rounded-full text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600 dark:text-neutral-500 dark:hover:text-blue-500 dark:focus:text-blue-500","aria-label":"Close"},[w.createElementVNode("span",{class:"sr-only"},"Close"),w.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[w.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),w.createElementVNode("path",{d:"m15 9-6 6"}),w.createElementVNode("path",{d:"m9 9 6 6"})])])])]),w.createElementVNode("div",{class:"flex justify-end items-center gap-x-2"},[w.createElementVNode("button",{type:"button",class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium 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 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[w.createElementVNode("svg",{class:"shrink-0 sm:me-2 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[w.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),w.createElementVNode("polyline",{points:"7 10 12 15 17 10"}),w.createElementVNode("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]),w.createElementVNode("span",{class:"hidden sm:block"}," Download CSV ")]),w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-1 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500","data-hs-overlay":"#hs-pro-dshm"},[w.createElementVNode("span",{class:"hidden sm:block"},"Send"),w.createTextVNode("Invite ")])])]),w.createElementVNode("div",{class:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-4"},[w.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[w.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}),w.createElementVNode("div",{class:"flex items-center -space-x-2"},[w.createElementVNode("img",{class:"shrink-0 size-7 rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"})])]),w.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Admin")]),w.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[w.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 5 "),w.createElementVNode("div",{class:"flex items-center -space-x-2"},[w.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),w.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482634023-2c4fda99ac0c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O ")])]),w.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[w.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Members"),w.createElementVNode("div",{class:"hs-tooltip inline-block"},[w.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[w.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),w.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),w.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(689px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),w.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[w.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 2 "),w.createElementVNode("div",{class:"flex items-center -space-x-2"},[w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," 0 ")])]),w.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[w.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"}," Limited access members "),w.createElementVNode("div",{class:"hs-tooltip inline-block"},[w.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[w.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),w.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),w.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(1198px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),w.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[w.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 0 "),w.createElementVNode("div",{class:"flex items-center -space-x-2"})]),w.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Pending invites")])]),w.createElementVNode("div",{class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[w.createElementVNode("div",{class:"min-w-full inline-block align-middle"},[w.createElementVNode("table",{class:"min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},[w.createElementVNode("thead",null,[w.createElementVNode("tr",null,[w.createElementVNode("th",{scope:"col",class:"min-w-[250px]"},[w.createElementVNode("div",{class:"pe-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Member ")]),w.createElementVNode("th",{scope:"col",class:"min-w-48"},[w.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Role ")]),w.createElementVNode("th",{scope:"col"},[w.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Email ")]),w.createElementVNode("th",{scope:"col",class:"min-w-36"},[w.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Last activity ")]),w.createElementVNode("th",{scope:"col"},[w.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Status ")])])]),w.createElementVNode("tbody",{class:"divide-y divide-gray-200 dark:divide-neutral-700"},[w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Admin ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," james@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),w.createTextVNode(" Active ")])])]),w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," liza@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 2 days ago ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),w.createTextVNode(" Inactive ")])])]),w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1601935111741-ae98b2b230b0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Daniel Hobbs ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," dhobbs@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),w.createTextVNode(" Inactive ")])])]),w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Brian Warner ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," brian@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 1 months ago ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),w.createTextVNode(" Active ")])])]),w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O "),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Ols Shols ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," olsshols@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 6 days ago ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),w.createTextVNode(" Inactive ")])])])])])])])])],-1)])))}}},ZT={install(n,{componentsApp:i={},menu:o=[]}){var b;gt.defaults.baseURL&&(gt.defaults.baseURL=gt.defaults.baseURL);const c=(b=Mg(o))==null?void 0:b.filter(y=>y==null?void 0:y.component).map(y=>({...y,component:i[y==null?void 0:y.component]})),{router:p}=fv(c);Object.entries({...qT,...i}).forEach(([y,h])=>{n.component(y,h)}),n.component("admin",Rb),n.config.globalProperties={...n.config.globalProperties,$componentsConfig:{...Lv,componentsApp:i},$router:p},n.use(p)}},wr=w.ref(null),WT={data(){return{formValues:{},scheme:null,table:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i},async getFormScheme(){var c,p;const n=this.flattenMenu(wr.value);n!=null&&n.length||this.$router.replace("/404");const i=n==null?void 0:n.find(b=>{var y,h;return(b==null?void 0:b.path)==((h=(y=this.$route)==null?void 0:y.query)==null?void 0:h.table)});i||this.$router.replace("/404");const o=i==null?void 0:i.table;this.table=o;try{const{data:{form:b}}=await gt.get(`/api/template/table/${o}`),{data:{rows:y}}=await gt.get(`/api/table-data/${this.table}/${(p=(c=this.$route)==null?void 0:c.query)==null?void 0:p.id}`);this.formValues=y==null?void 0:y[0];const{data:h}=await gt.get(`/api/template/form/${b}`);this.scheme=(h==null?void 0:h.schema)||h}catch{}},async editObject(){var n,i,o,c;try{await this.$refs.form.doValidation(),await gt.put(`/api/table/${this.table}/${(i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.id}`,this.formValues),await this.$router.replace(`/${(c=(o=this.$route)==null?void 0:o.query)==null?void 0:c.table}`),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},GT={style:{width:"calc(100vw - 260px)"}},YT={class:"h-[58px] bg-gray-50 flex items-center justify-between px-[30px]"},XT={class:"flex items-center gap-[6px]"},KT={style:{height:"calc(100vh - 120px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex"},JT={class:"bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function QT(n,i,o,c,p,b){const y=w.resolveComponent("VsForm");return w.openBlock(),w.createElementBlock("div",GT,[w.createElementVNode("div",YT,[i[3]||(i[3]=w.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),w.createElementVNode("div",XT,[w.createElementVNode("button",{onClick:i[0]||(i[0]=h=>n.$router.back()),class:"py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"}," Скасувати "),w.createElementVNode("button",{onClick:i[1]||(i[1]=(...h)=>b.editObject&&b.editObject(...h)),class:"py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"}," Зберегти ")])]),w.createElementVNode("div",KT,[w.createElementVNode("div",JT,[p.scheme?(w.openBlock(),w.createBlock(y,{key:0,ref:"form",scheme:p.scheme,modelValue:p.formValues,"onUpdate:modelValue":i[2]||(i[2]=h=>p.formValues=h),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):w.createCommentVNode("",!0)])])])}const eC=Object.freeze(Object.defineProperty({__proto__:null,default:kt(WT,[["render",QT]])},Symbol.toStringTag,{value:"Module"})),tC={data(){return{formValues:{},scheme:null,table:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i},async getFormScheme(){const n=this.flattenMenu(wr.value);n!=null&&n.length||this.$router.replace("/404");const i=n==null?void 0:n.find(c=>{var p,b;return(c==null?void 0:c.path)==((b=(p=this.$route)==null?void 0:p.query)==null?void 0:b.table)});i||this.$router.replace("/404");const o=i==null?void 0:i.table;this.table=o;try{const{data:{form:c}}=await gt.get(`/api/template/table/${o}`),{data:p}=await gt.get(`/api/template/form/${c}`);this.scheme=(p==null?void 0:p.schema)||p}catch{}},async createObject(){var n,i;try{await this.$refs.form.doValidation(),await gt.post(`/api/table/${this.table}`,this.formValues),await this.$router.replace(`/${(i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.table}`),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},iC={style:{width:"calc(100vw - 260px)"}},nC={class:"h-[58px] bg-gray-50 flex items-center justify-between px-[30px]"},rC={class:"flex items-center gap-[6px]"},sC={style:{height:"calc(100vh - 120px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex"},oC={class:"bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function aC(n,i,o,c,p,b){const y=w.resolveComponent("VsForm");return w.openBlock(),w.createElementBlock("div",iC,[w.createElementVNode("div",nC,[i[3]||(i[3]=w.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),w.createElementVNode("div",rC,[w.createElementVNode("button",{onClick:i[0]||(i[0]=h=>n.$router.back()),class:"py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"}," Скасувати "),w.createElementVNode("button",{onClick:i[1]||(i[1]=(...h)=>b.createObject&&b.createObject(...h)),class:"py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"}," Зберегти ")])]),w.createElementVNode("div",sC,[w.createElementVNode("div",oC,[p.scheme?(w.openBlock(),w.createBlock(y,{key:0,ref:"form",scheme:p.scheme,modelValue:p.formValues,"onUpdate:modelValue":i[2]||(i[2]=h=>p.formValues=h),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):w.createCommentVNode("",!0)])])])}const lC=Object.freeze(Object.defineProperty({__proto__:null,default:kt(tC,[["render",aC]])},Symbol.toStringTag,{value:"Module"})),cC={};function hC(n,i,o,c,p,b){const y=w.resolveComponent("router-view");return w.openBlock(),w.createBlock(y)}const S0=Object.freeze(Object.defineProperty({__proto__:null,default:kt(cC,[["render",hC]])},Symbol.toStringTag,{value:"Module"})),uC={data(){return{objectData:null,component:""}},computed:{getRoute(){const n=this.flattenMenu(wr.value);n!=null&&n.length||this.$router.replace("/404");const i=n==null?void 0:n.find(o=>{var c,p;return(o==null?void 0:o.table)==((p=(c=this.$route)==null?void 0:c.params)==null?void 0:p.table)});return i||this.$router.replace("/404"),i==null?void 0:i.path},getTitle(){var n,i,o,c,p,b,y,h,M,D,A,R,z,N;if((o=(i=(n=this.objectData)==null?void 0:n.rows)==null?void 0:i[0])!=null&&o.name)return((y=(b=(p=(c=this.objectData)==null?void 0:c.rows)==null?void 0:p[0])==null?void 0:b.name)==null?void 0:y.length)<35?(D=(M=(h=this.objectData)==null?void 0:h.rows)==null?void 0:M[0])==null?void 0:D.name:((N=(z=(R=(A=this.objectData)==null?void 0:A.rows)==null?void 0:R[0])==null?void 0:z.name)==null?void 0:N.slice(0,35))+" ..."}},async mounted(){await this.getObjectData(),await this.checkActiveComponent()},watch:{component(n){this.$router.replace({...this.$route,query:{tab:n}})}},methods:{async getObjectData(){var o;const{table:n,id:i}=(o=this.$route)==null?void 0:o.params;(!n||!i)&&this.$router.replace("/404");try{const{data:c}=await gt.get(`/api/table-data/${n}/${i}`);this.objectData=c}catch(c){console.error(c)}},getColClass(n){return`col-span-${n||12}`},getGridClass(){return"grid-cols-12"},checkActiveComponent(){var n,i,o,c,p,b,y;if((i=(n=this.$route)==null?void 0:n.query)!=null&&i.tab)this.component=(c=(o=this.$route)==null?void 0:o.query)==null?void 0:c.tab;else{const h=(b=(p=this.objectData)==null?void 0:p.panels)==null?void 0:b.find(M=>M==null?void 0:M.items);if((h==null?void 0:h.type)==="container")return;this.component=(y=h==null?void 0:h.items[0])==null?void 0:y.component}},flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i}}},dC={style:{width:"calc(100vw - 260px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 overflow-y-auto"},pC={class:"h-[58px] bg-gray-50 flex items-center justify-between px-[30px]"},fC={class:"flex items-center gap-[4px]"},mC={class:"text-xl font-medium text-gray-600"},gC={class:"flex items-center gap-[6px]"},yC={key:0,class:"border rounded-xl bg-white"},_C={class:"p-[10px] pl-[20px] text-xl"},xC=["innerHTML"],bC={key:1},vC={class:"p-[10px] pl-[20px] text-xl"},wC={key:0,class:"p-[20px] border-t"},kC={key:1,class:"p-[20px] border-t"},SC=["innerHTML"],EC={class:"flex space-x-1 w-[1200px] bg-white border rounded-xl h-[60px] items-center pl-[20px]"},TC=["onClick"],CC={key:0,class:"border rounded-xl bg-white mt-[20px]"},MC={class:"p-[10px] pl-[20px] text-xl"},PC={key:0,class:"p-[20px] border-t"},IC={key:1,class:"p-[20px] border-t"},AC=["innerHTML"];function DC(n,i,o,c,p,b){var h,M,D;const y=w.resolveComponent("router-link");return w.openBlock(),w.createElementBlock("div",dC,[w.createElementVNode("div",pC,[w.createElementVNode("div",fC,[w.createElementVNode("button",{onClick:i[0]||(i[0]=A=>n.$router.back()),class:"text-xl font-medium text-gray-600 hover:text-black"}," До таблиці "),i[1]||(i[1]=w.createElementVNode("span",null,"/",-1)),w.createElementVNode("h2",mC,w.toDisplayString(b.getTitle),1)]),w.createElementVNode("div",gC,[w.createVNode(y,{to:`/edit?table=${b.getRoute}&id=${(M=(h=n.$route)==null?void 0:h.params)==null?void 0:M.id}`,class:"py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"},{default:w.withCtx(()=>i[2]||(i[2]=[w.createTextVNode(" Редагувати ")])),_:1},8,["to"])])]),w.createElementVNode("div",{class:w.normalizeClass(["grid gap-[20px]",b.getGridClass()])},[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList((D=p.objectData)==null?void 0:D.panels,(A,R)=>{var z;return w.openBlock(),w.createElementBlock("div",{key:R,class:w.normalizeClass([b.getColClass(A.col),"p-4"])},[A!=null&&A.name?(w.openBlock(),w.createElementBlock("div",yC,[w.createElementVNode("h2",_C,w.toDisplayString((A==null?void 0:A.title)||"Панель"),1),w.createElementVNode("div",{class:"p-[20px] border-t",innerHTML:(z=p.objectData)==null?void 0:z.data[A==null?void 0:A.name]},null,8,xC)])):A.type==="container"?(w.openBlock(),w.createElementBlock("div",bC,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(A.items,(N,Y)=>{var te,ae,he,be,_e;return w.openBlock(),w.createElementBlock("div",{key:Y,class:"border rounded-xl bg-white mb-[20px]"},[w.createElementVNode("h2",vC,w.toDisplayString((N==null?void 0:N.title)||"Панель"),1),N!=null&&N.component?(w.openBlock(),w.createElementBlock("div",wC,[(w.openBlock(),w.createBlock(w.resolveDynamicComponent(N.component),{geometry:(ae=(te=p.objectData)==null?void 0:te.rows[0])==null?void 0:ae.geom,zoom:16,id:(be=(he=n.$route)==null?void 0:he.params)==null?void 0:be.id},null,8,["geometry","id"]))])):w.createCommentVNode("",!0),N!=null&&N.name?(w.openBlock(),w.createElementBlock("div",kC,[w.createElementVNode("div",{innerHTML:(_e=p.objectData)==null?void 0:_e.data[N==null?void 0:N.name]},null,8,SC)])):w.createCommentVNode("",!0)])}),128))])):w.createCommentVNode("",!0),(A==null?void 0:A.type)==="tabs"?(w.openBlock(),w.createElementBlock(w.Fragment,{key:2},[w.createElementVNode("nav",EC,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(A==null?void 0:A.items,N=>(w.openBlock(),w.createElementBlock("button",{onClick:()=>p.component=(N==null?void 0:N.component)||(N==null?void 0:N.name),class:w.normalizeClass(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-[11px] after:inset-x-2.5 after:z-10 after:h-0.5 after:pointer-events-none dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active",{"after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:pointer-events-none after:bg-gray-800":p.component===(N==null?void 0:N.component)||(N==null?void 0:N.name)}])},w.toDisplayString(N==null?void 0:N.title),11,TC))),256))]),(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(A.items,(N,Y)=>{var te,ae,he,be,_e;return w.openBlock(),w.createElementBlock(w.Fragment,{key:Y},[p.component===(N==null?void 0:N.component)||N!=null&&N.name?(w.openBlock(),w.createElementBlock("div",CC,[w.createElementVNode("h2",MC,w.toDisplayString((N==null?void 0:N.title)||"Панель"),1),N!=null&&N.component?(w.openBlock(),w.createElementBlock("div",PC,[(w.openBlock(),w.createBlock(w.resolveDynamicComponent(N.component),{geometry:(ae=(te=p.objectData)==null?void 0:te.rows[0])==null?void 0:ae.geom,zoom:16,id:(be=(he=n.$route)==null?void 0:he.params)==null?void 0:be.id},null,8,["geometry","id"]))])):w.createCommentVNode("",!0),N!=null&&N.name?(w.openBlock(),w.createElementBlock("div",IC,[w.createElementVNode("div",{innerHTML:(_e=p.objectData)==null?void 0:_e.data[N==null?void 0:N.name]},null,8,AC)])):w.createCommentVNode("",!0)])):w.createCommentVNode("",!0)],64)}),128))],64)):w.createCommentVNode("",!0)],2)}),128))],2)])}const zC=Object.freeze(Object.defineProperty({__proto__:null,default:kt(uC,[["render",DC],["__scopeId","data-v-5611fa5f"]])},Symbol.toStringTag,{value:"Module"})),RC={},LC={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-logout"};function OC(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",LC,i[0]||(i[0]=[w.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),w.createElementVNode("path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"},null,-1),w.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),w.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)]))}const BC=kt(RC,[["render",OC]]),FC={},NC={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function VC(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",NC,i[0]||(i[0]=[w.createStaticVNode('<path d="M218.88 96.05C223.55 99.19 228.69 101.56 234.09 103.07V145.42C212.05 151.54 195.83 171.79 195.83 195.75C195.83 200.22 196.41 204.65 197.53 208.94L160.92 230.08C156.82 226.06 152.08 222.73 146.91 220.24V171.62C164.83 163.13 176.59 145.06 176.59 124.48C176.59 123.17 176.54 121.86 176.44 120.56L218.88 96.05ZM220.32 79.09L160.97 113.36C162.04 116.88 162.61 120.61 162.61 124.48C162.61 142.66 149.93 157.87 132.93 161.76V230.05C143.4 232.46 152.23 239.16 157.46 248.21L215 214.99C211.7 209.34 209.81 202.77 209.81 195.75C209.81 174.62 226.94 157.49 248.07 157.49V91.02C237.14 91.02 227.29 86.43 220.32 79.09Z" fill="#CE3936"></path><path d="M161.39 19.13L197.44 39.94C196.39 44.11 195.84 48.42 195.84 52.75C195.84 54.21 195.9 55.65 196.02 57.1L153.9 81.42C145.27 75.5 134.95 72.24 124.36 72.24C113.83 72.24 103.57 75.47 94.96 81.32L52.71 56.93C52.82 55.55 52.88 54.16 52.88 52.76C52.88 48.43 52.34 44.12 51.28 39.95L87.3 19.16C96.98 28.89 110.26 34.58 124.34 34.58C138.42 34.57 151.7 28.87 161.39 19.13ZM157.77 0.919983C151.24 12.66 138.71 20.6 124.33 20.6C109.95 20.6 97.44 12.67 90.9 0.939983L33.9 33.85C37.08 39.43 38.91 45.88 38.91 52.76C38.91 56.71 38.31 60.52 37.2 64.11L96.46 98.32C103.44 90.87 113.36 86.22 124.37 86.22C135.44 86.22 145.41 90.93 152.39 98.44L211.59 64.27C210.45 60.64 209.83 56.78 209.83 52.77C209.83 45.89 211.65 39.44 214.84 33.86L157.77 0.919983Z" fill="#CE3936"></path><path d="M29.97 95.95L72.28 120.38C72.17 121.74 72.12 123.1 72.12 124.47C72.12 145.02 83.86 163.08 101.74 171.58V220.23C96.58 222.71 91.84 226.04 87.75 230.05L51.17 208.93C52.29 204.64 52.87 200.21 52.87 195.74C52.87 171.78 36.65 151.53 14.61 145.41V103.06C20.07 101.55 25.27 99.14 29.97 95.95ZM28.5 78.97C21.52 86.38 11.63 91.02 0.640015 91.02V157.49C21.77 157.49 38.9 174.62 38.9 195.75C38.9 202.77 37 209.33 33.71 214.99L91.2 248.18C96.43 239.14 105.25 232.45 115.71 230.04V161.73C98.74 157.81 86.09 142.62 86.09 124.46C86.09 120.54 86.68 116.75 87.78 113.18L28.5 78.97Z" fill="#CE3936"></path><path d="M498.39 177.5V144.88C498.39 128.55 485.11 115.27 468.78 115.27H343.22C342.69 115.27 342.18 115.32 341.67 115.4H337.19C332.35 115.4 328.42 111.46 328.42 106.63V74C328.42 69.16 332.36 65.23 337.19 65.23H486.33C492.08 65.23 496.75 60.57 496.75 54.81C496.75 49.06 492.08 44.39 486.33 44.39H337.19C320.86 44.39 307.58 57.67 307.58 74V106.62C307.58 122.95 320.86 136.23 337.19 136.23H462.75C463.28 136.23 463.79 136.18 464.3 136.1H468.78C473.62 136.1 477.55 140.04 477.55 144.87V177.49C477.55 182.33 473.61 186.26 468.78 186.26H319.64C313.89 186.26 309.22 190.92 309.22 196.68C309.22 202.43 313.89 207.1 319.64 207.1H468.78C485.11 207.11 498.39 193.83 498.39 177.5Z" fill="#CE3935"></path><path d="M710.7 177.32V75.24C710.7 58.91 697.42 45.63 681.09 45.63H550.05C533.72 45.63 520.44 58.91 520.44 75.24V177.32C520.44 193.65 533.72 206.93 550.05 206.93H681.1C697.42 206.93 710.7 193.65 710.7 177.32ZM541.27 75.24C541.27 70.4 545.21 66.47 550.04 66.47H681.09C685.93 66.47 689.86 70.41 689.86 75.24V177.32C689.86 182.16 685.92 186.09 681.09 186.09H550.05C545.21 186.09 541.28 182.15 541.28 177.32V75.24H541.27Z" fill="#CE3935"></path><path d="M1823 177.32V75.24C1823 58.91 1809.72 45.63 1793.39 45.63H1662.34C1646.01 45.63 1632.73 58.91 1632.73 75.24V177.32C1632.73 193.65 1646.01 206.93 1662.34 206.93H1793.39C1809.72 206.93 1823 193.65 1823 177.32ZM1653.57 75.24C1653.57 70.4 1657.51 66.47 1662.34 66.47H1793.39C1798.23 66.47 1802.16 70.41 1802.16 75.24V177.32C1802.16 182.16 1798.22 186.09 1793.39 186.09H1662.34C1657.5 186.09 1653.57 182.15 1653.57 177.32V75.24Z" fill="#CE3935"></path><path d="M756.76 196.51V152H849.42C855.17 152 859.84 147.34 859.84 141.58C859.84 135.83 855.17 131.16 849.42 131.16H756.76V75.23C756.76 70.39 760.7 66.46 765.53 66.46H893.29C899.04 66.46 903.71 61.8 903.71 56.04C903.71 50.29 899.04 45.62 893.29 45.62H765.53C749.2 45.62 735.92 58.9 735.92 75.23V196.5C735.92 202.25 740.59 206.92 746.34 206.92C752.09 206.93 756.76 202.27 756.76 196.51Z" fill="#CE3935"></path><path d="M933.86 66.47H1006.51V194.32C1006.51 200.07 1011.18 204.74 1016.93 204.74C1022.68 204.74 1027.35 200.07 1027.35 194.32V66.47H1100C1105.75 66.47 1110.42 61.81 1110.42 56.05C1110.42 50.3 1105.76 45.63 1100 45.63H933.86C928.11 45.63 923.44 50.29 923.44 56.05C923.45 61.81 928.11 66.47 933.86 66.47Z" fill="#CE3935"></path><path d="M1218.44 204.19C1224.19 204.19 1228.86 199.53 1228.86 193.77V152H1368.13C1384.46 152 1397.74 138.72 1397.74 122.39V75.24C1397.74 58.91 1384.46 45.63 1368.13 45.63H1237.63C1221.3 45.63 1208.02 58.91 1208.02 75.24V193.77C1208.02 199.53 1212.68 204.19 1218.44 204.19ZM1237.63 66.47H1368.13C1372.97 66.47 1376.9 70.41 1376.9 75.24V122.39C1376.9 127.23 1372.96 131.16 1368.13 131.16H1228.86V75.23C1228.86 70.41 1232.79 66.47 1237.63 66.47Z" fill="#CE3935"></path><path d="M1430.64 204.19C1436.39 204.19 1441.06 199.53 1441.06 193.77V152H1523.95C1524.57 153.18 1525.42 154.26 1526.51 155.17L1581.89 201.23C1583.83 202.85 1586.2 203.64 1588.55 203.64C1591.54 203.64 1594.5 202.36 1596.57 199.88C1600.25 195.46 1599.64 188.89 1595.22 185.21L1555.29 152H1580.33C1596.66 152 1609.94 138.72 1609.94 122.39V75.24C1609.94 58.91 1596.66 45.63 1580.33 45.63H1449.83C1433.5 45.63 1420.22 58.91 1420.22 75.24V193.77C1420.22 199.53 1424.88 204.19 1430.64 204.19ZM1449.83 66.47H1580.33C1585.17 66.47 1589.1 70.41 1589.1 75.24V122.39C1589.1 127.23 1585.17 131.16 1580.33 131.16H1441.06V75.23C1441.05 70.41 1444.99 66.47 1449.83 66.47Z" fill="#CE3935"></path>',10)]))}const $C=kt(FC,[["render",VC]]),jC={},UC={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-chevron-down"};function HC(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",UC,i[0]||(i[0]=[w.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),w.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const qC={components:{IconChevronDown:kt(jC,[["render",HC]])},props:{route:Object},mounted(){var n,i,o;(n=this.route)!=null&&n.menu&&(o=(i=this.route)==null?void 0:i.menu)!=null&&o.some(c=>(c==null?void 0:c.path)===this.$route.path.replace("/",""))&&(this.isOpen=!0)},data(){return{isOpen:!1}}},ZC={key:0,class:""},WC={class:"ml-[30px] before:block before:absolute relative w-[180px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer"},GC={key:1};function YC(n,i,o,c,p,b){var M,D,A,R;const y=w.resolveComponent("IconChevronDown"),h=w.resolveComponent("router-link");return(M=o.route)!=null&&M.menu?(w.openBlock(),w.createElementBlock("div",ZC,[w.createElementVNode("button",{onClick:i[0]||(i[0]=z=>p.isOpen=!p.isOpen),class:"flex cursor-pointer gap-x-3 py-2 px-3 mb-[6px] text-sm text-gray-800 justify-start w-full border-none focus:outline-none text-gray-800 rounded-lg items-center focus:bg-gray-100 hover:bg-gray-100 duration-300"},[w.createTextVNode(w.toDisplayString((D=o.route)==null?void 0:D.ua)+" ",1),w.createVNode(y,{class:w.normalizeClass([[p.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"16",height:"16"},null,8,["class"])]),w.createVNode(w.Transition,{name:"fade"},{default:w.withCtx(()=>{var z;return[w.withDirectives(w.createElementVNode("ul",WC,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList((z=o.route)==null?void 0:z.menu,(N,Y)=>(w.openBlock(),w.createElementBlock("li",{key:Y,class:"w-full mb-[4px]"},[w.createVNode(h,{to:"/"+(N==null?void 0:N.path),class:w.normalizeClass([[(N==null?void 0:N.path)===n.$route.path.replace("/","")&&"bg-gray-100"],"flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])},{default:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(N==null?void 0:N.ua),1)]),_:2},1032,["to","class"])]))),128))],512),[[w.vShow,p.isOpen]])]}),_:1})])):(w.openBlock(),w.createElementBlock("div",GC,[w.createVNode(h,{to:(A=o.route)==null?void 0:A.path,class:w.normalizeClass([[((R=o.route)==null?void 0:R.path)===n.$route.path.replace("/","")&&"bg-gray-100"],"flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])},{default:w.withCtx(()=>{var z;return[w.createTextVNode(w.toDisplayString((z=o.route)==null?void 0:z.ua),1)]}),_:1},8,["to","class"])]))}const XC={components:{IconLogout:BC,NavbarItem:kt(qC,[["render",YC]]),IconLogo:$C},data(){return{activeIndex:null,data:null,searchValue:""}},computed:{data(){var n,i;return(n=this.searchValue)!=null&&n.trim()?(i=this.flattenMenu(wr.value))==null?void 0:i.filter(o=>{var c,p,b;return(b=(c=o==null?void 0:o.ua)==null?void 0:c.toLowerCase())==null?void 0:b.includes((p=this.searchValue)==null?void 0:p.toLowerCase())}):wr.value}},methods:{flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i}}},KC={class:"flex flex-col h-[100vh] border-r w-[300px]"},JC={class:"p-[16px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},QC={class:"pb-3 w-full flex flex-col flex-wrap"},eM={key:0,class:"flex flex-col gap-[6px]"},tM={key:1,class:"text-gray-800 text-lg mt-[20px]"};function iM(n,i,o,c,p,b){var M;const y=w.resolveComponent("IconLogo"),h=w.resolveComponent("NavbarItem");return w.openBlock(),w.createElementBlock("div",KC,[w.createVNode(y,{height:"40",width:"200",class:"my-[20px] ml-[20px]"}),w.withDirectives(w.createElementVNode("input",{type:"text","onUpdate:modelValue":i[0]||(i[0]=D=>p.searchValue=D),placeholder:"Пошук по меню",class:"h-[40px] block rounded-lg border mx-[10px] pl-[10px] focus:border-blue-600 focus:border-[2px] outline-none"},null,512),[[w.vModelText,p.searchValue]]),w.createElementVNode("div",JC,[w.createElementVNode("nav",QC,[(M=b.data)!=null&&M.length?(w.openBlock(),w.createElementBlock("ul",eM,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(b.data,(D,A)=>(w.openBlock(),w.createElementBlock("li",{key:A},[w.createVNode(h,{route:D},null,8,["route"])]))),128))])):(w.openBlock(),w.createElementBlock("div",tM,"Не знайдено"))])])])}const nM=kt(XC,[["render",iM]]),rM={},sM={class:"flex-shrink-0 size-4",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"};function oM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",sM,i[0]||(i[0]=[w.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),w.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),w.createElementVNode("path",{d:"M12 17h.01"},null,-1)]))}const aM=kt(rM,[["render",oM]]),lM={},cM={class:"flex-shrink-0 size-4",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"};function hM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",cM,i[0]||(i[0]=[w.createElementVNode("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},null,-1),w.createElementVNode("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},null,-1)]))}const uM={components:{IconQuestion:aM,IconMessage:kt(lM,[["render",hM]])}},dM={class:"h-[60px] border-b flex justify-end px-[20px]",style:{width:"calc(100vw - 260px)"}},pM={class:"flex items-center gap-[6px]"},fM={href:"docs-softpro.com",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},mM={class:"hs-tooltip [--placement:bottom] inline-block show"},gM={class:"hs-tooltip-toggle relative size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100"};function yM(n,i,o,c,p,b){const y=w.resolveComponent("IconQuestion"),h=w.resolveComponent("IconMessage");return w.openBlock(),w.createElementBlock("div",dM,[w.createElementVNode("div",pM,[w.createElementVNode("a",fM,[w.createVNode(y,{height:"24",width:"24"})]),w.createElementVNode("div",mM,[w.createElementVNode("button",gM,[w.createVNode(h,{height:"24",width:"24"}),i[0]||(i[0]=w.createElementVNode("span",{class:"flex absolute top-0 end-0 z-10 -mt-1.5 -me-1.5"},[w.createElementVNode("span",{class:"animate-ping absolute inline-flex size-full rounded-full bg-red-400 opacity-75 dark:bg-red-600"}),w.createElementVNode("span",{class:"relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1"}," 1 ")],-1))]),i[1]||(i[1]=w.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg dark:bg-neutral-700 hidden",role:"tooltip","data-popper-placement":"bottom",style:{position:"fixed",inset:"0px auto auto 0px",margin:"0px",transform:"translate(1686px, 53px)"}},null,-1))]),i[2]||(i[2]=w.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),i[3]||(i[3]=w.createElementVNode("img",{class:"flex-shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Image Description"},null,-1))])])}const _M={components:{navbar:nM,AdminHeader:kt(uM,[["render",yM]])},mounted(){this.getMenu()},computed:{isMenu(){return wr.value}},methods:{async getMenu(){try{const{data:n}=await gt.get("/api/user-menu");wr.value=n}catch{}}}},xM={class:"admin-wrapper"},bM={class:"flex flex-col"};function vM(n,i,o,c,p,b){const y=w.resolveComponent("navbar"),h=w.resolveComponent("admin-header"),M=w.resolveComponent("router-view");return w.openBlock(),w.createElementBlock("div",xM,[w.createVNode(y),w.createElementVNode("div",bM,[b.isMenu?(w.openBlock(),w.createElementBlock(w.Fragment,{key:0},[w.createVNode(h),w.createVNode(M)],64)):w.createCommentVNode("",!0)])])}const wM=Object.freeze(Object.defineProperty({__proto__:null,default:kt(_M,[["render",vM],["__scopeId","data-v-3d7ecdff"]])},Symbol.toStringTag,{value:"Module"})),kM={},SM={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-adjustments-horizontal"};function EM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",SM,i[0]||(i[0]=[w.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 6l8 0"></path><path d="M16 6l4 0"></path><path d="M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 12l2 0"></path><path d="M10 12l10 0"></path><path d="M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 18l11 0"></path><path d="M19 18l1 0"></path>',10)]))}const TM=kt(kM,[["render",EM]]),CM={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},computed:{label(){var n,i;return((n=this.data)==null?void 0:n.ua)||((i=this.data)==null?void 0:i.label)||this.data.title||"null"},selectedSortParam(){var n,i;return(i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(n){n!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(n){switch(n){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(n){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(n);const i=this.$route.query,{sort:o,...c}=i,p=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...c,...p&&{sort:p}}})},isValueEqualToSelected(n){return`${this.data.name}-${n}`===this.selectedSortParam}}},MM={scope:"col",class:"min-w-[200px] max-w-[300px] text-start"},PM={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},IM={key:0,d:"m7 15 5 5 5-5"},AM={key:1,d:"m7 9 5-5 5 5"},DM={key:1,class:"text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"};function zM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("th",MM,[b.getVisibleIcon?(w.openBlock(),w.createElementBlock("button",{key:0,type:"button",class:"text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",onClick:i[0]||(i[0]=y=>b.handleClickSortBtn(p.currentSort))},[w.createTextVNode(w.toDisplayString(b.label)+" ",1),(w.openBlock(),w.createElementBlock("svg",PM,[p.currentSort==="asc"||p.currentSort===""?(w.openBlock(),w.createElementBlock("path",IM)):w.createCommentVNode("",!0),p.currentSort==="desc"||p.currentSort===""?(w.openBlock(),w.createElementBlock("path",AM)):w.createCommentVNode("",!0)]))])):(w.openBlock(),w.createElementBlock("p",DM,w.toDisplayString(b.label),1))])}const RM=kt(CM,[["render",zM]]),LM={},OM={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-dots-vertical"};function BM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",OM,i[0]||(i[0]=[w.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),w.createElementVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),w.createElementVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),w.createElementVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]))}const FM=kt(LM,[["render",BM]]),NM={},VM={class:"flex-shrink-0 size-3.5",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"};function $M(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",VM,i[0]||(i[0]=[w.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const jM=kt(NM,[["render",$M]]),UM={props:{height:{type:String,default:"16"},width:{type:String,default:"12"},color:{type:String,default:"black"}}},HM={style:{display:"none"}},qM=["height","width","fill"];function ZM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock(w.Fragment,null,[(w.openBlock(),w.createElementBlock("svg",HM,i[0]||(i[0]=[w.createElementVNode("symbol",{id:"icon-pencil",viewBox:"0 0 32 32"},[w.createElementVNode("path",{d:"M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z"})],-1)]))),(w.openBlock(),w.createElementBlock("svg",{height:o.height,width:o.width,fill:o.color},i[1]||(i[1]=[w.createElementVNode("use",{"xlink:href":"#icon-pencil"},null,-1)]),8,qM))],64)}const WM={components:{IconMore:FM,IconDelete:jM,IconEdit:kt(UM,[["render",ZM]])},emits:["updateTable"],props:{item:Object,table:String},data(){return{formVisible:!1,isDeleteConfirm:!1,formValue:{},top:0,left:0}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var n;try{const{data:i}=await gt.get(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`);this.formValue=i}catch(i){console.error(i)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var n;try{gt.delete(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`),this.$notify({title:"Успішно!",message:"Об`єкт успішно видалeно",type:"success"}),await this.$emit("update-table"),this.isDeleteConfirm=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},GM={class:"hs-dropdown [--placement:bottom-right] inline-flex"},YM={id:"hs-pro-dupc1",type:"button",class:"gap-x-2 p-2 rounded-lg hover:border-transparent focus:outline-none text-black hover:bg-gray-50"},XM={class:"pt-[7px] pb-[7px] flex flex-col items-start"},KM={class:"p-4"},JM={class:"mt-4 flex justify-end gap-x-3"};function QM(n,i,o,c,p,b){const y=w.resolveComponent("IconMore"),h=w.resolveComponent("IconEdit"),M=w.resolveComponent("router-link"),D=w.resolveComponent("IconDelete"),A=w.resolveComponent("VsPopover"),R=w.resolveComponent("VsDialog");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("div",GM,[w.createVNode(A,{trigger:"click",placement:"left"},{reference:w.withCtx(()=>[w.createElementVNode("button",YM,[w.createVNode(y,{height:"16",width:"16"})])]),default:w.withCtx(()=>{var z,N,Y;return[w.createElementVNode("div",XM,[w.createVNode(M,{to:`/edit?table=${(N=(z=n.$route)==null?void 0:z.params)==null?void 0:N.catchAll}&id=${(Y=o.item)==null?void 0:Y.id}`,class:"w-[100px] ml-[2px] flex items-center justify-center gap-x-3 rounded-lg text-[13px] text-gray-800"},{default:w.withCtx(()=>[w.createVNode(h,{color:"#000"}),i[4]||(i[4]=w.createTextVNode(" Редагувати "))]),_:1},8,["to"]),i[6]||(i[6]=w.createElementVNode("div",{class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto mt-[10px] mb-[10px]"},null,-1)),w.createElementVNode("button",{onClick:i[0]||(i[0]=w.withModifiers((...te)=>b.openConfirm&&b.openConfirm(...te),["stop"])),type:"button",class:"w-[100px] flex items-center justify-center gap-x-3 rounded-lg text-[14px] text-red-500"},[w.createVNode(D),i[5]||(i[5]=w.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])])]}),_:1})]),w.createVNode(R,{visible:p.isDeleteConfirm,"onUpdate:visible":i[3]||(i[3]=z=>p.isDeleteConfirm=z),title:"Ви впевнені?"},{default:w.withCtx(()=>[w.createElementVNode("div",KM,[i[7]||(i[7]=w.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),w.createElementVNode("div",JM,[w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium 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 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:i[1]||(i[1]=z=>p.isDeleteConfirm=!1)}," Скасувати "),w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:i[2]||(i[2]=(...z)=>b.deleteElement&&b.deleteElement(...z))}," Так, я впевнена/ий ")])])]),_:1},8,["visible"])],64)}const eP=kt(WM,[["render",QM]]),tP={},iP={class:"flex-shrink-0 mt-0.5 size-3.5",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"};function nP(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",iP,i[0]||(i[0]=[w.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),w.createElementVNode("path",{d:"M7 20V4"},null,-1),w.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),w.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const rP=kt(tP,[["render",nP]]),sP={props:{columns:{type:Object,default:()=>{}},table:{type:String,default:()=>""}},data(){return{tableFormats:["json","csv","xlsx"],format:"",cols:[]}},methods:{async exportTable(){try{const n=await gt.get("/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(",")},responseType:"blob"}),i=new Blob([n.data],{type:"application/octet-stream"}),o=window.URL.createObjectURL(i),c=document.createElement("a");c.href=o,c.setAttribute("download",`${this.table.split(".")[0]}.${this.format}`),document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(o),this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"})}catch(n){console.error("Ошибка при экспорте файла:",n),this.$notify({type:"error",title:"Помилка",message:"Не вдалося експортувати файл."})}},selectFormat(n){this.format=n}}},oP={class:"p-4"},aP={class:"pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},lP={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},cP={class:"pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},hP={class:"mt-2 space-y-2"},uP=["id","onChange"],dP=["for"],pP={class:"pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},fP={class:"text-center"};function mP(n,i,o,c,p,b){const y=w.resolveComponent("VsCheckbox");return w.openBlock(),w.createElementBlock(w.Fragment,null,[i[4]||(i[4]=w.createElementVNode("div",{class:"dark:border-neutral-700"},null,-1)),w.createElementVNode("div",oP,[w.createElementVNode("div",aP,[i[2]||(i[2]=w.createElementVNode("label",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Виберіть стовпці таблиці для експорту: ",-1)),w.createElementVNode("div",lP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(o.columns,(h,M)=>(w.openBlock(),w.createElementBlock("div",{class:"flex items-center",key:M,style:{width:"calc((100% - 10px) / 2)"}},[w.createVNode(y,{class:"py-0 shrink-0 border-gray-300 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",modelValue:p.cols,"onUpdate:modelValue":i[0]||(i[0]=D=>p.cols=D),value:h==null?void 0:h.name,label:h==null?void 0:h.ua},null,8,["modelValue","value","label"])]))),128))])]),w.createElementVNode("div",cP,[i[3]||(i[3]=w.createElementVNode("label",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Виберіть формат таблиці: ",-1)),w.createElementVNode("div",hP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(p.tableFormats,(h,M)=>(w.openBlock(),w.createElementBlock("div",{class:"flex items-center",key:M},[w.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"shrink-0 border-gray-300 rounded-full text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:h,onChange:D=>b.selectFormat(h)},null,40,uP),w.createElementVNode("label",{for:h,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+w.toDisplayString(h),9,dP)]))),128))])]),w.createElementVNode("div",pP,[w.createElementVNode("div",fP,[w.createElementVNode("button",{type:"button",class:"p-2 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:i[1]||(i[1]=(...h)=>b.exportTable&&b.exportTable(...h))}," Завантажити таблицю ")])])])],64)}const gP={components:{IconExport:rP,AdminTableExportForm:kt(sP,[["render",mP]])},props:{table:String,columns:Array},data(){return{isOpen:!1}}};function yP(n,i,o,c,p,b){const y=w.resolveComponent("IconExport"),h=w.resolveComponent("AdminTableExportForm"),M=w.resolveComponent("VsDialog");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("button",{onClick:i[0]||(i[0]=D=>p.isOpen=!0),class:"py-2 px-3 relative flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"},[w.createVNode(y,{height:"16",width:"16"}),i[2]||(i[2]=w.createTextVNode(" Експорт "))]),w.createVNode(M,{visible:p.isOpen,"onUpdate:visible":i[1]||(i[1]=D=>p.isOpen=D),title:"Експорт таблиці"},{default:w.withCtx(()=>[w.createVNode(h,{table:o.table,columns:o.columns},null,8,["table","columns"])]),_:1},8,["visible"])],64)}const _P=kt(gP,[["render",yP]]),xP={},bP={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"};function vP(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",bP,i[0]||(i[0]=[w.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>',9)]))}const wP=kt(xP,[["render",vP]]),kP={props:{column:Object},emits:["update-column"],data(){return{value:!1}},watch:{value(n){this.$emit("update-column",{...this.column,hidden:!n})}},mounted(){var n;((n=this.column)==null?void 0:n.hidden)!==!0&&(this.value=!0)}},SP={class:"flex w-full gap-[8px] items-centr"};function EP(n,i,o,c,p,b){var y,h;return w.openBlock(),w.createElementBlock("label",SP,[w.withDirectives(w.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=M=>p.value=M),type:"checkbox"},null,512),[[w.vModelCheckbox,p.value]]),w.createTextVNode(" "+w.toDisplayString(((y=o.column)==null?void 0:y.ua)||((h=o.column)==null?void 0:h.title)),1)])}const TP={components:{IconColumns:wP,AdminTableColumnsHiddenItem:kt(kP,[["render",EP]])},emits:["update-columns"],props:{columns:Array},methods:{updateColumn(n){const i=this.columns.findIndex(c=>(c==null?void 0:c.name)===(n==null?void 0:n.name)),o=this.columns;o[i]=n,this.$emit("update-columns",[...o])}}},CP={class:"py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"},MP={class:"flex flex-col gap-[3px] h-[400px] w-[300px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function PP(n,i,o,c,p,b){const y=w.resolveComponent("IconColumns"),h=w.resolveComponent("AdminTableColumnsHiddenItem"),M=w.resolveComponent("VsPopover");return w.openBlock(),w.createBlock(M,{trigger:"click",placement:"bottom"},{reference:w.withCtx(()=>[w.createElementVNode("button",CP,[w.createVNode(y,{height:"20",width:"16"})])]),default:w.withCtx(()=>[w.createElementVNode("div",null,[i[0]||(i[0]=w.createElementVNode("h2",{class:"text-sm mb-[8px]"},"Оберіть колонки, щоб приховати",-1)),w.createElementVNode("ul",MP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(o.columns,(D,A)=>(w.openBlock(),w.createElementBlock("li",{key:A},[w.createVNode(h,{column:D,onUpdateColumn:b.updateColumn},null,8,["column","onUpdateColumn"])]))),128))])])]),_:1})}const IP=kt(TP,[["render",PP]]),AP={},DP={class:"vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden"};function zP(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("div",DP,i[0]||(i[0]=[w.createStaticVNode('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>',1)]))}const RP={props:{table:String},components:{IconFilter:TM,AdminTableControl:eP,AdminTableExport:_P,AdminTableColumnsHidden:IP,AdminTableColumn:RM,AdminNodata:kt(AP,[["render",zP]])},data(){return{tableData:{},isFilters:!1,filterScheme:[],page:1,searchValue:"",limit:20,filters:null,activeColumn:""}},mounted(){var n,i;this.page=((i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.page)||1,this.getTableData(),this.getFilters()},computed:{defaultPage(){var n,i;return((i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.page)||1},getFilterScheme(){var n;return(n=this.tableData)==null?void 0:n.filters},columns(){var n,i;return(i=(n=this.tableData)==null?void 0:n.columns)==null?void 0:i.filter(o=>(o==null?void 0:o.hidden)!==!0)},isForm(){var n;return(n=this.tableData)==null?void 0:n.form},isNoData(){var n,i;return!((n=this.tableData)!=null&&n.rows)||!((i=this.columns)!=null&&i.length)}},watch:{async table(){await this.getTableData()},searchValue(){this.getTableData()},$route:{handler(n,i){var o,c;((o=n==null?void 0:n.params)==null?void 0:o.catchAll)!==((c=i==null?void 0:i.params)==null?void 0:c.catchAll)&&(this.filterScheme=null,this.getFilters())},deep:!0}},methods:{async getTableData(){var n,i;try{const{data:o}=await gt.get(`/api/template/table/${this.table}`),c=await gt.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.sort)||null}});this.tableData={...this.tableData,...o,...(c==null?void 0:c.data)||{}}}catch{}},async getFilters(){var n;try{const{data:i}=await gt.get(`/api/table-filter/${this.table}`);this.filterScheme=(n=i==null?void 0:i.list)==null?void 0:n.map(o=>({...o,label:(o==null?void 0:o.label)||(o==null?void 0:o.ua)}))}catch{}},async handlePageChange(n){const i=this.$route.query;this.page=n,!(!(i!=null&&i.page)&&n===1||i.page===n)&&(await this.$router.replace({query:{...i,page:n}}),await this.getTableData())},async changeLimit(n){this.limit=await n,this.defaultPage=1,await this.getTableData()},closeFilter({target:n}){this.isFilters&&n.classList.contains("filter-container")&&(this.isFilters=!1)},async filterChange({url:n}){this.filters=n,this.page=1,await this.getTableData()},changeActiveColumn(n){this.activeColumn=n,this.getTableData()}}},LP={class:"w-[calc(100vw - 320px)]"},OP={class:"h-[58px] bg-gray-50 flex items-center justify-between px-[30px]"},BP={class:"text-xl font-medium"},FP={style:{height:"calc(100vh - 120px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex pt-[10px]"},NP={class:"bg-white w-full rounded-xl border p-[20px]"},VP={class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px]"},$P={class:"flex gap-[6px] ml-auto"},jP={class:"space-y-5 flex items-start w-full justify-start"},UP={style:{height:"calc(100vh - 310px)"},class:"overflow-x-auto w-full border-t [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},HP={class:"inline-block w-full align-middle"},qP={key:0,class:"divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"},ZP={class:"sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},WP={class:"border-stone-200 right-0 z-[1]"},GP={class:"divide-y divide-gray-200"},YP={class:"min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600"},XP={class:"text-center sticky right-0 bg-white w-[80px] px-[10px]"},KP={class:"p-[20px] flex justify-end w-full"},JP={class:"filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-[rgba(0,0,0,0.5)] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function QP(n,i,o,c,p,b){var te,ae,he,be,_e,Ie,ot;const y=w.resolveComponent("router-link"),h=w.resolveComponent("AdminTableColumnsHidden"),M=w.resolveComponent("AdminTableExport"),D=w.resolveComponent("IconFilter"),A=w.resolveComponent("AdminTableColumn"),R=w.resolveComponent("AdminTableControl"),z=w.resolveComponent("AdminNodata"),N=w.resolveComponent("VsPagination"),Y=w.resolveComponent("VsFilter");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("div",LP,[w.createElementVNode("div",OP,[w.createElementVNode("h2",BP,w.toDisplayString((te=p.tableData)==null?void 0:te.title),1),b.isForm?(w.openBlock(),w.createBlock(y,{key:0,to:`/add?table=${(he=(ae=n.$route)==null?void 0:ae.params)==null?void 0:he.catchAll}`,class:"py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg bg-blue-500 text-gray-800 shadow-sm hover:bg-blue-700 hover:text-white duration-300"},{default:w.withCtx(()=>i[5]||(i[5]=[w.createTextVNode(" Додати ")])),_:1},8,["to"])):w.createCommentVNode("",!0)]),w.createElementVNode("div",FP,[w.createElementVNode("div",NP,[w.createElementVNode("div",VP,[w.withDirectives(w.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=Qe=>p.searchValue=Qe),class:"py-2 pl-[15px] h-[38px] w-[400px] block w-full border rounded-lg text-sm focus:border-blue-600 focus:border-[2px] outline-none",placeholder:"Пошук..."},null,512),[[w.vModelText,p.searchValue]]),w.createElementVNode("div",$P,[w.createVNode(h,{columns:(be=p.tableData)==null?void 0:be.columns,onUpdateColumns:i[1]||(i[1]=Qe=>p.tableData.columns=Qe)},null,8,["columns"]),w.createVNode(M,{table:o.table,columns:(_e=p.tableData)==null?void 0:_e.columns},null,8,["table","columns"]),w.createElementVNode("button",{onClick:i[2]||(i[2]=Qe=>p.isFilters=!p.isFilters),class:"py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"},[w.createVNode(D,{height:"16",width:"16"}),i[6]||(i[6]=w.createTextVNode(" Фільтри "))])])]),w.createElementVNode("div",jP,[w.createElementVNode("div",UP,[w.createElementVNode("div",HP,[b.isNoData?(w.openBlock(),w.createBlock(z,{key:1})):(w.openBlock(),w.createElementBlock("table",qP,[w.createElementVNode("thead",ZP,[w.createElementVNode("tr",WP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(b.columns,Qe=>(w.openBlock(),w.createBlock(A,{key:Qe.name,data:Qe,activeColumn:p.activeColumn,onChangeActive:b.changeActiveColumn},null,8,["data","activeColumn","onChangeActive"]))),128)),i[7]||(i[7]=w.createElementVNode("th",{class:"w-[70px] sticky right-0 top-0 bg-white"},null,-1))])]),w.createElementVNode("tbody",GP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList((Ie=p.tableData)==null?void 0:Ie.rows,(Qe,Be)=>{var St;return w.openBlock(),w.createElementBlock("tr",{key:Be},[w.createElementVNode("td",YP,[w.createVNode(y,{to:`/card/${o.table}/${Qe==null?void 0:Qe.id}`,class:"text-sm text-green-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline hover:text-green-600"},{default:w.withCtx(()=>{var rt;return[w.createTextVNode(w.toDisplayString(Qe==null?void 0:Qe[(rt=b.columns[0])==null?void 0:rt.name]),1)]}),_:2},1032,["to"])]),(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList((St=b.columns)==null?void 0:St.slice(1),rt=>{var Dt;return w.openBlock(),w.createElementBlock("td",{class:"min-w-[300px] w-full text-start px-[4px] py-3 text-sm text-gray-600",key:rt.name},[(w.openBlock(),w.createBlock(w.resolveDynamicComponent((rt==null?void 0:rt.format)==="custom"?rt==null?void 0:rt.component:n.$componentsConfig[`table-format-${((Dt=rt==null?void 0:rt.format)==null?void 0:Dt.toLowerCase())||n.text}`]),{name:rt==null?void 0:rt.name,data:Qe,value:Qe==null?void 0:Qe[rt==null?void 0:rt.name]},null,8,["name","data","value"]))])}),128)),w.createElementVNode("td",XP,[w.createVNode(R,{item:Qe,table:o.table,onUpdateTable:b.getTableData},null,8,["item","table","onUpdateTable"])])])}),128))])]))])])]),w.createElementVNode("div",KP,[w.createVNode(N,{goTo:!1,class:"justify-end","default-page":b.defaultPage,total:((ot=p.tableData)==null?void 0:ot.total)||0,pageSize:p.limit,onPageChange:b.handlePageChange,pageSizes:[10,16,20],onPageSizeChange:b.changeLimit},null,8,["default-page","total","pageSize","onPageChange","onPageSizeChange"])])])])]),w.createVNode(w.Transition,{name:"fade"},{default:w.withCtx(()=>{var Qe;return[w.withDirectives(w.createElementVNode("div",{onClick:i[4]||(i[4]=(...Be)=>b.closeFilter&&b.closeFilter(...Be)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"},[w.createElementVNode("div",JP,[(Qe=p.filterScheme)!=null&&Qe.length?(w.openBlock(),w.createBlock(Y,{key:0,ref:"filter",scheme:p.filterScheme,layout:"default","apply-vue-router":"",history:"",name:"filter",onFilterChange:b.filterChange,closeFilterBtn:!0,onFilterClose:i[3]||(i[3]=Be=>p.isFilters=!1)},null,8,["scheme","onFilterChange"])):w.createCommentVNode("",!0)])],512),[[w.vShow,p.isFilters]])]}),_:1})],64)}const eI={components:{AdminTable:kt(RP,[["render",QP]])},data(){return{table:!1,interface:"",title:""}},watch:{$route:{async handler(){wr!=null&&wr.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(n){n&&(document.title=n)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i},async getMenu(){try{const{data:n}=await gt.get("/api/user-menu");wr.value=n}catch{}},async checkPageType(){const n=this.flattenMenu(wr.value);n!=null&&n.length||this.$router.replace("/404");const i=n==null?void 0:n.find(c=>{var p,b;return(c==null?void 0:c.path)==((b=(p=this.$route)==null?void 0:p.params)==null?void 0:b.catchAll)});this.title=i==null?void 0:i.ua,i||this.$router.replace("/404");const o=i==null?void 0:i.table;this.table=o||!1,!o&&this.getInterface()},async getInterface(){var n,i;try{const{data:o}=await gt.get(`/api/template/interface/${((i=(n=this.$route)==null?void 0:n.params)==null?void 0:i.catchAll)||""}`);this.interface=o||""}catch{this.interface=""}}}},tI=["innerHTML"];function iI(n,i,o,c,p,b){const y=w.resolveComponent("AdminTable");return p.table?(w.openBlock(),w.createBlock(y,{key:0,table:p.table},null,8,["table"])):(w.openBlock(),w.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:p.interface},null,8,tI))}const nI=Object.freeze(Object.defineProperty({__proto__:null,default:kt(eI,[["render",iI]])},Symbol.toStringTag,{value:"Module"}));return ZT});
|
|
629
|
+
Je.version="2.30.1",r2(vi),Je.fn=ze,Je.min=Zk,Je.max=Wk,Je.now=Gk,Je.utc=Jr,Je.unix=wE,Je.months=SE,Je.isDate=Jl,Je.locale=Xs,Je.invalid=Zh,Je.duration=Vr,Je.isMoment=Fr,Je.weekdays=TE,Je.parseZone=kE,Je.localeData=ks,Je.isDuration=ou,Je.monthsShort=EE,Je.weekdaysMin=ME,Je.defineLocale=Ip,Je.updateLocale=kk,Je.locales=Sk,Je.weekdaysShort=CE,Je.normalizeUnits=br,Je.relativeTimeRounding=tT,Je.relativeTimeThreshold=iT,Je.calendarFormat=xS,Je.prototype=ze,Je.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const rT=n=>{const i=/(\b\S)?/g,o=n.match(i);return o?o.join("").toUpperCase():""},sT={props:{name:{type:String,default(){return""}},avatar:{type:String,default(){return""}}},computed:{inItials(){return rT(this.name)}}},oT={class:"mr-2"},aT=["src"],lT={key:1,class:"flex flex-shrink-0 items-center justify-center w-6 h-6 bg-gray-500 text-xs text-white rounded-full"},cT={key:0},hT={key:1,class:"text-sm"};function uT(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("div",oT,[o.avatar?(w.openBlock(),w.createElementBlock("img",{key:0,src:o.avatar,alt:"avatar",class:"flex flex-shrink-0 items-center justify-center w-6 h-6 rounded-full"},null,8,aT)):o.name?(w.openBlock(),w.createElementBlock("div",lT,[b.inItials.length?(w.openBlock(),w.createElementBlock("span",cT,w.toDisplayString(b.inItials),1)):(w.openBlock(),w.createElementBlock("span",hT,i[0]||(i[0]=[w.createElementVNode("i",{class:"ti ti-user"},null,-1)])))])):w.createCommentVNode("",!0)])}const dT={components:{VsWidgetCommentsAvatar:kt(sT,[["render",uT]])},props:{comment:{type:Object,default:()=>({})},user:{type:Object,default:()=>({})},id:{type:String,default:""}},data(){return{commentContent:this.comment.body,isCommentActionVisible:!1,isOpen:!1,textareaValue:""}},computed:{isUserAutor(){return this.user.uid===this.comment.uid},createDate(){try{const n=Je(this.comment.cdate,"YYYY-MM-DD");return new Date(n).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return""}}},watch:{isOpen(n){n&&(this.textareaValue=this.comment.body)}},methods:{confirnDeleteComment(){document.body.click(),this.$emit("openModal",{title:"Ви впевнені?",message:"Ви впевнені, що хочете видалити цей коментар?",confirmButtonText:"Так, я впевнена/ий",cancelButtonText:"Скасувати",confirm:this.deleteComment,updateListOnConfirm:!0})},async updateComment(){try{await gt.put(`/api/widget/comment/${this.id}/${this.comment.communication_id}`,{body:this.textareaValue}),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},async deleteComment(){try{await gt.delete(`/api/widget/comment/${this.id}/${this.comment.communication_id}`),this.$emit("list-update"),this.isCommentActionVisible=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}},toggleCommentAction(){this.isCommentActionVisible=!this.isCommentActionVisible}}},pT={class:"p-6 text-base bg-white dark:bg-gray-900"},fT={class:"flex justify-between items-center mb-2"},mT={class:"flex items-center"},gT={class:"inline-flex items-center mr-3 text-sm text-gray-900 dark:text-white font-semibold capitalize"},yT={class:"text-sm text-gray-600 dark:text-gray-400"},_T={class:"text-gray-500 dark:text-gray-400"},xT={class:"flex items-center gap-[4px]"},bT={class:"flex flex-col gap-[8px] text-sm font-medium text-gray-500"},vT={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"};function wT(n,i,o,c,p,b){const y=w.resolveComponent("VsWidgetCommentsAvatar"),h=w.resolveComponent("VsDialog");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("div",pT,[w.createElementVNode("div",fT,[w.createElementVNode("div",mT,[w.createElementVNode("p",gT,[w.createVNode(y,{name:o.comment.username,avatar:o.comment.avatar},null,8,["name","avatar"]),w.createTextVNode(w.toDisplayString(o.comment.username),1)]),w.createElementVNode("div",yT,w.toDisplayString(b.createDate),1)])]),w.createElementVNode("p",_T,w.toDisplayString(o.comment.body),1),w.createElementVNode("div",xT,[w.createElementVNode("button",{type:"button",class:"block py-2 dark:hover:bg-gray-600 hover:underline dark:hover:text-white text-start duration-300",onClick:i[0]||(i[0]=M=>p.isOpen=!0)}," Редагувати "),w.createElementVNode("button",{type:"button",class:"block py-2 dark:hover:bg-gray-600 hover:underline dark:hover:text-white text-start duration-300",onClick:i[1]||(i[1]=M=>b.confirnDeleteComment())}," Видалити ")])]),w.createVNode(h,{visible:p.isOpen,"onUpdate:visible":i[5]||(i[5]=M=>p.isOpen=M),title:"Редагувати"},{footer:w.withCtx(()=>[w.createElementVNode("div",vT,[w.createElementVNode("button",{onClick:i[3]||(i[3]=M=>p.isOpen=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"}," Відмінити "),w.createElementVNode("button",{onClick:i[4]||(i[4]=(...M)=>b.updateComment&&b.updateComment(...M)),class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:w.withCtx(()=>[w.createElementVNode("label",bT,[i[6]||(i[6]=w.createTextVNode(" Коментар ")),w.withDirectives(w.createElementVNode("textarea",{"onUpdate:modelValue":i[2]||(i[2]=M=>p.textareaValue=M),placeholder:"Напишіть коментар...",class:"w-full h-[200px] border rounded-lg outline-none resize-none p-[20px] focus:border-[2px] focus:border-blue-600 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},null,512),[[w.vModelText,p.textareaValue]])])]),_:1},8,["visible"])],64)}const kT={components:{VsWidgetCommentsItem:kt(dT,[["render",wT]])},inject:["activeAddFormEditor"],props:{id:{type:String,default:()=>""},prefilledData:{type:Object,default:null}},data(){return{isLoaded:!1,isLoadFailed:!1,comments:[],user:{},modal:{title:"",message:"",cancel:"",confirm:"",cancelButtonText:"",confirmButtonText:""},isModalVisible:!1}},async created(){await this.getComments()},methods:{async getComments(){if(this.prefilledData){this.comments=this.prefilledData.rows,this.isLoaded=!0;return}try{const{data:n}=await gt.get(`/api/widget/comment/${this.id}`);this.comments=n.rows,this.user=n.user}catch(n){this.isLoadFailed=!0,console.error(n)}this.isLoaded=!0,this.$emit("update-comment-count")},prepareModal(n){const i={...n};return n.cancel||(i.cancel=()=>{this.isModalVisible=!1}),n.updateListOnConfirm&&(i.confirm=async()=>{await n.confirm(),this.isModalVisible=!1}),i},handleOpenModal(n){this.modal=this.prepareModal(n),this.isModalVisible=!0}}},ST={class:"flex flex-col divide-y"},ET={key:0,class:"max-h-[300px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},TT={key:1},CT={class:"p-4"},MT={class:"mt-1 text-gray-500 dark:text-neutral-500"},PT={class:"mt-4 flex justify-end gap-x-3"};function IT(n,i,o,c,p,b){const y=w.resolveComponent("VsErrorOnLoading"),h=w.resolveComponent("VsWidgetCommentsItem"),M=w.resolveComponent("VsLoader"),D=w.resolveComponent("VsDialog");return w.openBlock(),w.createElementBlock("div",ST,[p.isLoaded?(w.openBlock(),w.createElementBlock(w.Fragment,{key:0},[p.isLoadFailed?(w.openBlock(),w.createBlock(y,{key:0})):(w.openBlock(),w.createElementBlock(w.Fragment,{key:1},[p.comments.length?(w.openBlock(),w.createElementBlock("div",ET,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(p.comments,(A,R)=>(w.openBlock(),w.createBlock(h,{key:R,comment:A,user:p.user,index:R,id:o.id,onListUpdate:b.getComments,class:"border-top",onOpenModal:i[0]||(i[0]=z=>b.handleOpenModal(z))},null,8,["comment","user","index","id","onListUpdate"]))),128))])):(w.openBlock(),w.createElementBlock("div",TT,i[4]||(i[4]=[w.createElementVNode("p",{class:"pl-3 text-sm font-medium text-gray-600"},"Коментарі відсутні",-1)])))],64))],64)):(w.openBlock(),w.createBlock(M,{key:1,class:"justify-center",text:"Please wait..."})),w.createVNode(D,{title:p.modal.title,size:"small",visible:p.isModalVisible,"onUpdate:visible":i[3]||(i[3]=A=>p.isModalVisible=A)},{default:w.withCtx(()=>[w.createElementVNode("div",CT,[w.createElementVNode("p",MT,w.toDisplayString(p.modal.message),1),w.createElementVNode("div",PT,[w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium 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 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:i[1]||(i[1]=(...A)=>p.modal.cancel&&p.modal.cancel(...A))},w.toDisplayString(p.modal.cancelButtonText),1),w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:i[2]||(i[2]=(...A)=>p.modal.confirm&&p.modal.confirm(...A))},w.toDisplayString(p.modal.confirmButtonText),1)])])]),_:1},8,["title","visible"])])}const AT=kt(kT,[["render",IT]]),DT={props:{id:{type:String,default:()=>""},autofocus:{type:Boolean,default:()=>!0}},data(){return{isEditorOpen:!1,commentContent:""}},methods:{async addNewComment(){if(this.commentContent)try{await gt.post(`/api/widget/comment/${this.id}`,{body:this.commentContent}),this.commentContent="",this.$emit("list-update")}catch(n){console.error(n)}},setNewContent(n){this.commentContent=n}}},zT={class:"w-full widget-comment-form"},RT={class:"mb-4 bg-white border-gray-200 dark:bg-gray-800 dark:border-gray-700"};function LT(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("div",zT,[w.createElementVNode("div",RT,[w.withDirectives(w.createElementVNode("textarea",{"onUpdate:modelValue":i[0]||(i[0]=y=>p.commentContent=y),rows:"6",class:"w-full h-[200px] border rounded-lg outline-none resize-none p-[20px] focus:border-[2px] focus:border-blue-600 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500",placeholder:"Напишіть коментар..."},null,512),[[w.vModelText,p.commentContent]])]),w.createElementVNode("button",{ref:"buttonAdd",class:"py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300",onClick:i[1]||(i[1]=(...y)=>b.addNewComment&&b.addNewComment(...y))}," Відправити коментар ",512)])}const OT={components:{VsWidgetCommentsList:AT,VsWidgetCommentsAddForm:kt(DT,[["render",LT]])},props:{id:{type:String,default(){return""}},prefilledData:{type:Object,default:null}},data(){return{activeAddFormEditor:"",comments:[],totalComment:"0"}},mounted(){this.comments=this.$refs.commentListRef.comments},watch:{comments(n){this.$emit("count-change",n.length)}},methods:{listUpdate(){this.$refs.commentListRef.getComments()},updateCommentCount(){this.totalComment=this.$refs.commentListRef.comments.length||"0"}}},BT={class:"bg-white-200"},FT={class:"flex justify-between items-center gap-x-2 mb-4"},NT={class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"},VT={key:0,class:"inline-block font-semibold text-gray-800 dark:text-neutral-200"};function $T(n,i,o,c,p,b){const y=w.resolveComponent("VsWidgetCommentsAddForm"),h=w.resolveComponent("VsWidgetCommentsList");return w.openBlock(),w.createElementBlock("div",BT,[w.createElementVNode("div",FT,[w.createElementVNode("h2",NT,[i[2]||(i[2]=w.createTextVNode("Коментарі ")),p.comments?(w.openBlock(),w.createElementBlock("span",VT,"("+w.toDisplayString(p.totalComment)+")",1)):w.createCommentVNode("",!0)])]),w.createVNode(y,{class:"mb-6",id:o.id,onListUpdate:i[0]||(i[0]=M=>b.listUpdate())},null,8,["id"]),w.createVNode(h,{id:o.id,onUpdateCommentCount:i[1]||(i[1]=M=>b.updateCommentCount()),"prefilled-data":o.prefilledData,ref:"commentListRef"},null,8,["id","prefilled-data"])])}const jT={"vs-widget-map":_w,"vs-widget-gallery":n2,"vs-widget-comments":kt(OT,[["render",$T]])},UT={},HT={style:{width:"calc(100vw - 300px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 flex items-center justify-center"},qT={...jT,...UT,"vs-dashboard":{__name:"vs-dashboard",setup(n){return(i,o)=>(w.openBlock(),w.createElementBlock("div",HT,o[0]||(o[0]=[w.createElementVNode("div",{class:"p-5 md:p-8 bg-white border border-gray-200 shadow-sm rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"mb-4 xl:mb-8"},[w.createElementVNode("h1",{class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"}," Members "),w.createElementVNode("p",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Manage members and users of your workspace and set their access level. ")]),w.createElementVNode("div",{class:"space-y-5"},[w.createElementVNode("div",{class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5"},[w.createElementVNode("div",{class:"relative w-full"},[w.createElementVNode("div",{class:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5"},[w.createElementVNode("svg",{class:"shrink-0 size-4 text-gray-500 dark:text-neutral-400",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[w.createElementVNode("circle",{cx:"11",cy:"11",r:"8"}),w.createElementVNode("path",{d:"m21 21-4.3-4.3"})])]),w.createElementVNode("input",{type:"text",class:"py-2 ps-10 pe-8 block w-full bg-gray-100 border-transparent rounded-lg text-sm focus:border-blue-500 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:border-transparent dark:text-neutral-400 dark:placeholder:text-neutral-400 dark:focus:ring-neutral-600",placeholder:"Search by name or email"}),w.createElementVNode("div",{class:"hidden absolute inset-y-0 end-0 flex items-center pointer-events-none z-20 pe-1"},[w.createElementVNode("button",{type:"button",class:"inline-flex shrink-0 justify-center items-center size-6 rounded-full text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600 dark:text-neutral-500 dark:hover:text-blue-500 dark:focus:text-blue-500","aria-label":"Close"},[w.createElementVNode("span",{class:"sr-only"},"Close"),w.createElementVNode("svg",{class:"shrink-0 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[w.createElementVNode("circle",{cx:"12",cy:"12",r:"10"}),w.createElementVNode("path",{d:"m15 9-6 6"}),w.createElementVNode("path",{d:"m9 9 6 6"})])])])]),w.createElementVNode("div",{class:"flex justify-end items-center gap-x-2"},[w.createElementVNode("button",{type:"button",class:"p-2.5 sm:py-2 sm:px-3 inline-flex items-center text-sm font-medium 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 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},[w.createElementVNode("svg",{class:"shrink-0 sm:me-2 size-4",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[w.createElementVNode("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),w.createElementVNode("polyline",{points:"7 10 12 15 17 10"}),w.createElementVNode("line",{x1:"12",x2:"12",y1:"15",y2:"3"})]),w.createElementVNode("span",{class:"hidden sm:block"}," Download CSV ")]),w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-1 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500","data-hs-overlay":"#hs-pro-dshm"},[w.createElementVNode("span",{class:"hidden sm:block"},"Send"),w.createTextVNode("Invite ")])])]),w.createElementVNode("div",{class:"grid sm:grid-cols-2 lg:grid-cols-4 gap-2 xl:gap-4"},[w.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[w.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}),w.createElementVNode("div",{class:"flex items-center -space-x-2"},[w.createElementVNode("img",{class:"shrink-0 size-7 rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"})])]),w.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Admin")]),w.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[w.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 5 "),w.createElementVNode("div",{class:"flex items-center -space-x-2"},[w.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),w.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("img",{class:"shrink-0 size-7 shadow-md rounded-full",src:"https://images.unsplash.com/photo-1659482634023-2c4fda99ac0c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O ")])]),w.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[w.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Members"),w.createElementVNode("div",{class:"hs-tooltip inline-block"},[w.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[w.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),w.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),w.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(689px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),w.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[w.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 2 "),w.createElementVNode("div",{class:"flex items-center -space-x-2"},[w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-7 bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," 0 ")])]),w.createElementVNode("div",{class:"inline-flex items-center gap-x-2"},[w.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"}," Limited access members "),w.createElementVNode("div",{class:"hs-tooltip inline-block"},[w.createElementVNode("svg",{class:"hs-tooltip-toggle shrink-0 size-3.5 text-gray-500 dark:text-neutral-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16"},[w.createElementVNode("path",{d:"M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"}),w.createElementVNode("path",{d:"m8.93 6.588-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM9 4.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"})]),w.createElementVNode("div",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 w-60 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded dark:bg-neutral-700",role:"tooltip","data-popper-placement":"top",style:{position:"fixed",inset:"auto auto 0px 0px",margin:"0px",transform:"translate(1198px, -708px)"}}," Limited Access Members can only access the projects, tasks, and messages explicitly shared with them. ")])])]),w.createElementVNode("div",{class:"p-4 flex flex-col bg-white border border-gray-200 rounded-xl dark:bg-neutral-800 dark:border-neutral-700"},[w.createElementVNode("div",{class:"flex justify-between items-center mb-1"},[w.createElementVNode("h2",{class:"text-4xl font-semibold text-gray-800 dark:text-neutral-200"}," 0 "),w.createElementVNode("div",{class:"flex items-center -space-x-2"})]),w.createElementVNode("h3",{class:"text-gray-500 dark:text-neutral-500"},"Pending invites")])]),w.createElementVNode("div",{class:"overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},[w.createElementVNode("div",{class:"min-w-full inline-block align-middle"},[w.createElementVNode("table",{class:"min-w-full divide-y divide-gray-200 dark:divide-neutral-700"},[w.createElementVNode("thead",null,[w.createElementVNode("tr",null,[w.createElementVNode("th",{scope:"col",class:"min-w-[250px]"},[w.createElementVNode("div",{class:"pe-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Member ")]),w.createElementVNode("th",{scope:"col",class:"min-w-48"},[w.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Role ")]),w.createElementVNode("th",{scope:"col"},[w.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Email ")]),w.createElementVNode("th",{scope:"col",class:"min-w-36"},[w.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Last activity ")]),w.createElementVNode("th",{scope:"col"},[w.createElementVNode("div",{class:"px-4 py-3 text-start flex items-center gap-x-1 text-sm font-medium text-gray-800 dark:text-neutral-200"}," Status ")])])]),w.createElementVNode("tbody",{class:"divide-y divide-gray-200 dark:divide-neutral-700"},[w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Admin ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," james@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),w.createTextVNode(" Active ")])])]),w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," L "),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," James Collins ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," liza@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 2 days ago ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),w.createTextVNode(" Inactive ")])])]),w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1601935111741-ae98b2b230b0?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Daniel Hobbs ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," dhobbs@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Today ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),w.createTextVNode(" Inactive ")])])]),w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("img",{class:"shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1679412330254-90cb240038c5?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=2.5&w=320&h=320&q=80",alt:"Avatar"}),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Brian Warner ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can edit ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," brian@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 1 months ago ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-x-1.5 py-1.5 px-2.5 text-xs font-medium bg-teal-100 text-teal-800 rounded-full dark:bg-teal-500/10 dark:text-teal-500"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-200"}),w.createTextVNode(" Active ")])])]),w.createElementVNode("tr",null,[w.createElementVNode("td",{class:"size-px whitespace-nowrap pe-4 py-3"},[w.createElementVNode("div",{class:"w-full flex items-center gap-x-3"},[w.createElementVNode("span",{class:"flex shrink-0 justify-center items-center size-[38px] bg-white border border-gray-200 text-gray-700 text-xs font-medium uppercase rounded-full dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300"}," O "),w.createElementVNode("div",{class:"grow"},[w.createElementVNode("span",{class:"text-sm font-medium text-gray-800 dark:text-neutral-200"}," Ols Shols ")])])]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," Can view ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," olsshols@site.com ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"text-sm text-gray-600 dark:text-neutral-400"}," 6 days ago ")]),w.createElementVNode("td",{class:"size-px whitespace-nowrap px-4 py-3"},[w.createElementVNode("span",{class:"inline-flex items-center gap-1.5 py-1.5 px-2 text-xs font-medium bg-gray-100 text-gray-800 rounded-full dark:bg-neutral-500/20 dark:text-neutral-400"},[w.createElementVNode("span",{class:"size-1.5 inline-block bg-gray-800 rounded-full dark:bg-neutral-400"}),w.createTextVNode(" Inactive ")])])])])])])])])],-1)])))}}},ZT={install(n,{componentsApp:i={},menu:o=[]}){var b;gt.defaults.baseURL&&(gt.defaults.baseURL=gt.defaults.baseURL);const c=(b=Mg(o))==null?void 0:b.filter(y=>y==null?void 0:y.component).map(y=>({...y,component:i[y==null?void 0:y.component]})),{router:p}=fv(c);Object.entries({...qT,...i}).forEach(([y,h])=>{n.component(y,h)}),n.component("admin",Rb),n.config.globalProperties={...n.config.globalProperties,$componentsConfig:{...Lv,componentsApp:i},$router:p},n.use(p)}},wr=w.ref(null),WT={data(){return{formValues:{},scheme:null,table:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i},async getFormScheme(){var c,p;const n=this.flattenMenu(wr.value);n!=null&&n.length||this.$router.replace("/404");const i=n==null?void 0:n.find(b=>{var y,h;return(b==null?void 0:b.path)==((h=(y=this.$route)==null?void 0:y.query)==null?void 0:h.table)});i||this.$router.replace("/404");const o=i==null?void 0:i.table;this.table=o;try{const{data:{form:b}}=await gt.get(`/api/template/table/${o}`),{data:{rows:y}}=await gt.get(`/api/table-data/${this.table}/${(p=(c=this.$route)==null?void 0:c.query)==null?void 0:p.id}`);this.formValues=y==null?void 0:y[0];const{data:h}=await gt.get(`/api/template/form/${b}`);this.scheme=(h==null?void 0:h.schema)||h}catch{}},async editObject(){var n,i;try{await this.$refs.form.doValidation(),await gt.put(`/api/table/${this.table}/${(i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.id}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},GT={style:{width:"calc(100vw - 260px)"}},YT={class:"h-[58px] bg-gray-50 flex items-center justify-between px-[30px]"},XT={class:"flex items-center gap-[6px]"},KT={style:{height:"calc(100vh - 120px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex"},JT={class:"bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function QT(n,i,o,c,p,b){const y=w.resolveComponent("VsForm");return w.openBlock(),w.createElementBlock("div",GT,[w.createElementVNode("div",YT,[i[3]||(i[3]=w.createElementVNode("h2",{class:"text-xl font-medium"},"Редагувати",-1)),w.createElementVNode("div",XT,[w.createElementVNode("button",{onClick:i[0]||(i[0]=h=>n.$router.back()),class:"py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"}," Скасувати "),w.createElementVNode("button",{onClick:i[1]||(i[1]=(...h)=>b.editObject&&b.editObject(...h)),class:"py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"}," Зберегти ")])]),w.createElementVNode("div",KT,[w.createElementVNode("div",JT,[p.scheme?(w.openBlock(),w.createBlock(y,{key:0,ref:"form",scheme:p.scheme,modelValue:p.formValues,"onUpdate:modelValue":i[2]||(i[2]=h=>p.formValues=h),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):w.createCommentVNode("",!0)])])])}const eC=Object.freeze(Object.defineProperty({__proto__:null,default:kt(WT,[["render",QT]])},Symbol.toStringTag,{value:"Module"})),tC={data(){return{formValues:{},scheme:null,table:""}},mounted(){this.getFormScheme()},methods:{flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i},async getFormScheme(){const n=this.flattenMenu(wr.value);n!=null&&n.length||this.$router.replace("/404");const i=n==null?void 0:n.find(c=>{var p,b;return(c==null?void 0:c.path)==((b=(p=this.$route)==null?void 0:p.query)==null?void 0:b.table)});i||this.$router.replace("/404");const o=i==null?void 0:i.table;this.table=o;try{const{data:{form:c}}=await gt.get(`/api/template/table/${o}`),{data:p}=await gt.get(`/api/template/form/${c}`);this.scheme=(p==null?void 0:p.schema)||p}catch{}},async createObject(){try{await this.$refs.form.doValidation(),await gt.post(`/api/table/${this.table}`,this.formValues),await this.$router.back(),await this.$notify({title:"Успішно!",message:"Об'єкт успішно створено",type:"success"})}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},iC={style:{width:"calc(100vw - 260px)"}},nC={class:"h-[58px] bg-gray-50 flex items-center justify-between px-[30px]"},rC={class:"flex items-center gap-[6px]"},sC={style:{height:"calc(100vh - 120px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex"},oC={class:"bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function aC(n,i,o,c,p,b){const y=w.resolveComponent("VsForm");return w.openBlock(),w.createElementBlock("div",iC,[w.createElementVNode("div",nC,[i[3]||(i[3]=w.createElementVNode("h2",{class:"text-xl font-medium"},"Створити",-1)),w.createElementVNode("div",rC,[w.createElementVNode("button",{onClick:i[0]||(i[0]=h=>n.$router.back()),class:"py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"}," Скасувати "),w.createElementVNode("button",{onClick:i[1]||(i[1]=(...h)=>b.createObject&&b.createObject(...h)),class:"py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"}," Зберегти ")])]),w.createElementVNode("div",sC,[w.createElementVNode("div",oC,[p.scheme?(w.openBlock(),w.createBlock(y,{key:0,ref:"form",scheme:p.scheme,modelValue:p.formValues,"onUpdate:modelValue":i[2]||(i[2]=h=>p.formValues=h),class:"p-0 mt-[20px]"},null,8,["scheme","modelValue"])):w.createCommentVNode("",!0)])])])}const lC=Object.freeze(Object.defineProperty({__proto__:null,default:kt(tC,[["render",aC]])},Symbol.toStringTag,{value:"Module"})),cC={};function hC(n,i,o,c,p,b){const y=w.resolveComponent("router-view");return w.openBlock(),w.createBlock(y)}const S0=Object.freeze(Object.defineProperty({__proto__:null,default:kt(cC,[["render",hC]])},Symbol.toStringTag,{value:"Module"})),uC={data(){return{objectData:null,component:""}},computed:{getRoute(){const n=this.flattenMenu(wr.value);n!=null&&n.length||this.$router.replace("/404");const i=n==null?void 0:n.find(o=>{var c,p;return(o==null?void 0:o.table)==((p=(c=this.$route)==null?void 0:c.params)==null?void 0:p.table)});return i||this.$router.replace("/404"),i==null?void 0:i.path},getTitle(){var n,i,o,c,p,b,y,h,M,D,A,R,z,N;if((o=(i=(n=this.objectData)==null?void 0:n.rows)==null?void 0:i[0])!=null&&o.name)return((y=(b=(p=(c=this.objectData)==null?void 0:c.rows)==null?void 0:p[0])==null?void 0:b.name)==null?void 0:y.length)<35?(D=(M=(h=this.objectData)==null?void 0:h.rows)==null?void 0:M[0])==null?void 0:D.name:((N=(z=(R=(A=this.objectData)==null?void 0:A.rows)==null?void 0:R[0])==null?void 0:z.name)==null?void 0:N.slice(0,35))+" ..."}},async mounted(){await this.getObjectData(),await this.checkActiveComponent()},watch:{component(n){this.$router.replace({...this.$route,query:{tab:n}})}},methods:{async getObjectData(){var o;const{table:n,id:i}=(o=this.$route)==null?void 0:o.params;(!n||!i)&&this.$router.replace("/404");try{const{data:c}=await gt.get(`/api/table-data/${n}/${i}`);this.objectData=c}catch(c){console.error(c)}},getColClass(n){return`col-span-${n||12}`},getGridClass(){return"grid-cols-12"},checkActiveComponent(){var n,i,o,c,p,b,y;if((i=(n=this.$route)==null?void 0:n.query)!=null&&i.tab)this.component=(c=(o=this.$route)==null?void 0:o.query)==null?void 0:c.tab;else{const h=(b=(p=this.objectData)==null?void 0:p.panels)==null?void 0:b.find(M=>M==null?void 0:M.items);if((h==null?void 0:h.type)==="container")return;this.component=(y=h==null?void 0:h.items[0])==null?void 0:y.component}},flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i}}},dC={style:{width:"calc(100vw - 260px)",height:"calc(100vh - 60px)"},class:"bg-gray-50 overflow-y-auto"},pC={class:"h-[58px] bg-gray-50 flex items-center justify-between px-[30px]"},fC={class:"flex items-center gap-[4px]"},mC={class:"text-xl font-medium text-gray-600"},gC={class:"flex items-center gap-[6px]"},yC={key:0,class:"border rounded-xl bg-white"},_C={class:"p-[10px] pl-[20px] text-xl"},xC=["innerHTML"],bC={key:1},vC={class:"p-[10px] pl-[20px] text-xl"},wC={key:0,class:"p-[20px] border-t"},kC={key:1,class:"p-[20px] border-t"},SC=["innerHTML"],EC={class:"flex space-x-1 w-[1200px] bg-white border rounded-xl h-[60px] items-center pl-[20px]"},TC=["onClick"],CC={key:0,class:"border rounded-xl bg-white mt-[20px]"},MC={class:"p-[10px] pl-[20px] text-xl"},PC={key:0,class:"p-[20px] border-t"},IC={key:1,class:"p-[20px] border-t"},AC=["innerHTML"];function DC(n,i,o,c,p,b){var h,M,D;const y=w.resolveComponent("router-link");return w.openBlock(),w.createElementBlock("div",dC,[w.createElementVNode("div",pC,[w.createElementVNode("div",fC,[w.createElementVNode("button",{onClick:i[0]||(i[0]=A=>n.$router.back()),class:"text-xl font-medium text-gray-600 hover:text-black"}," До таблиці "),i[1]||(i[1]=w.createElementVNode("span",null,"/",-1)),w.createElementVNode("h2",mC,w.toDisplayString(b.getTitle),1)]),w.createElementVNode("div",gC,[w.createVNode(y,{to:`/edit?table=${b.getRoute}&id=${(M=(h=n.$route)==null?void 0:h.params)==null?void 0:M.id}`,class:"py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"},{default:w.withCtx(()=>i[2]||(i[2]=[w.createTextVNode(" Редагувати ")])),_:1},8,["to"])])]),w.createElementVNode("div",{class:w.normalizeClass(["grid gap-[20px]",b.getGridClass()])},[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList((D=p.objectData)==null?void 0:D.panels,(A,R)=>{var z;return w.openBlock(),w.createElementBlock("div",{key:R,class:w.normalizeClass([b.getColClass(A.col),"p-4"])},[A!=null&&A.name?(w.openBlock(),w.createElementBlock("div",yC,[w.createElementVNode("h2",_C,w.toDisplayString((A==null?void 0:A.title)||"Панель"),1),w.createElementVNode("div",{class:"p-[20px] border-t",innerHTML:(z=p.objectData)==null?void 0:z.data[A==null?void 0:A.name]},null,8,xC)])):A.type==="container"?(w.openBlock(),w.createElementBlock("div",bC,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(A.items,(N,Y)=>{var te,ae,he,be,_e;return w.openBlock(),w.createElementBlock("div",{key:Y,class:"border rounded-xl bg-white mb-[20px]"},[w.createElementVNode("h2",vC,w.toDisplayString((N==null?void 0:N.title)||"Панель"),1),N!=null&&N.component?(w.openBlock(),w.createElementBlock("div",wC,[(w.openBlock(),w.createBlock(w.resolveDynamicComponent(N.component),{geometry:(ae=(te=p.objectData)==null?void 0:te.rows[0])==null?void 0:ae.geom,zoom:16,id:(be=(he=n.$route)==null?void 0:he.params)==null?void 0:be.id},null,8,["geometry","id"]))])):w.createCommentVNode("",!0),N!=null&&N.name?(w.openBlock(),w.createElementBlock("div",kC,[w.createElementVNode("div",{innerHTML:(_e=p.objectData)==null?void 0:_e.data[N==null?void 0:N.name]},null,8,SC)])):w.createCommentVNode("",!0)])}),128))])):w.createCommentVNode("",!0),(A==null?void 0:A.type)==="tabs"?(w.openBlock(),w.createElementBlock(w.Fragment,{key:2},[w.createElementVNode("nav",EC,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(A==null?void 0:A.items,N=>(w.openBlock(),w.createElementBlock("button",{onClick:()=>p.component=(N==null?void 0:N.component)||(N==null?void 0:N.name),class:w.normalizeClass(["px-2.5 h-[30px] py-1.5 relative inline-flex items-center gap-x-2 hover:bg-gray-100 text-gray-500 hover:text-gray-800 text-sm whitespace-nowrap rounded-lg disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 after:absolute after:-bottom-[11px] after:inset-x-2.5 after:z-10 after:h-0.5 after:pointer-events-none dark:text-neutral-500 dark:hover:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700 active",{"after:absolute after:bottom-[-14px] after:left-2.5 after:right-2.5 after:z-10 after:h-0.5 after:pointer-events-none after:bg-gray-800":p.component===(N==null?void 0:N.component)||(N==null?void 0:N.name)}])},w.toDisplayString(N==null?void 0:N.title),11,TC))),256))]),(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(A.items,(N,Y)=>{var te,ae,he,be,_e;return w.openBlock(),w.createElementBlock(w.Fragment,{key:Y},[p.component===(N==null?void 0:N.component)||N!=null&&N.name?(w.openBlock(),w.createElementBlock("div",CC,[w.createElementVNode("h2",MC,w.toDisplayString((N==null?void 0:N.title)||"Панель"),1),N!=null&&N.component?(w.openBlock(),w.createElementBlock("div",PC,[(w.openBlock(),w.createBlock(w.resolveDynamicComponent(N.component),{geometry:(ae=(te=p.objectData)==null?void 0:te.rows[0])==null?void 0:ae.geom,zoom:16,id:(be=(he=n.$route)==null?void 0:he.params)==null?void 0:be.id},null,8,["geometry","id"]))])):w.createCommentVNode("",!0),N!=null&&N.name?(w.openBlock(),w.createElementBlock("div",IC,[w.createElementVNode("div",{innerHTML:(_e=p.objectData)==null?void 0:_e.data[N==null?void 0:N.name]},null,8,AC)])):w.createCommentVNode("",!0)])):w.createCommentVNode("",!0)],64)}),128))],64)):w.createCommentVNode("",!0)],2)}),128))],2)])}const zC=Object.freeze(Object.defineProperty({__proto__:null,default:kt(uC,[["render",DC],["__scopeId","data-v-5611fa5f"]])},Symbol.toStringTag,{value:"Module"})),RC={},LC={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-logout"};function OC(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",LC,i[0]||(i[0]=[w.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),w.createElementVNode("path",{d:"M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2"},null,-1),w.createElementVNode("path",{d:"M9 12h12l-3 -3"},null,-1),w.createElementVNode("path",{d:"M18 15l3 -3"},null,-1)]))}const BC=kt(RC,[["render",OC]]),FC={},NC={viewBox:"0 0 1823 249",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function VC(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",NC,i[0]||(i[0]=[w.createStaticVNode('<path d="M218.88 96.05C223.55 99.19 228.69 101.56 234.09 103.07V145.42C212.05 151.54 195.83 171.79 195.83 195.75C195.83 200.22 196.41 204.65 197.53 208.94L160.92 230.08C156.82 226.06 152.08 222.73 146.91 220.24V171.62C164.83 163.13 176.59 145.06 176.59 124.48C176.59 123.17 176.54 121.86 176.44 120.56L218.88 96.05ZM220.32 79.09L160.97 113.36C162.04 116.88 162.61 120.61 162.61 124.48C162.61 142.66 149.93 157.87 132.93 161.76V230.05C143.4 232.46 152.23 239.16 157.46 248.21L215 214.99C211.7 209.34 209.81 202.77 209.81 195.75C209.81 174.62 226.94 157.49 248.07 157.49V91.02C237.14 91.02 227.29 86.43 220.32 79.09Z" fill="#CE3936"></path><path d="M161.39 19.13L197.44 39.94C196.39 44.11 195.84 48.42 195.84 52.75C195.84 54.21 195.9 55.65 196.02 57.1L153.9 81.42C145.27 75.5 134.95 72.24 124.36 72.24C113.83 72.24 103.57 75.47 94.96 81.32L52.71 56.93C52.82 55.55 52.88 54.16 52.88 52.76C52.88 48.43 52.34 44.12 51.28 39.95L87.3 19.16C96.98 28.89 110.26 34.58 124.34 34.58C138.42 34.57 151.7 28.87 161.39 19.13ZM157.77 0.919983C151.24 12.66 138.71 20.6 124.33 20.6C109.95 20.6 97.44 12.67 90.9 0.939983L33.9 33.85C37.08 39.43 38.91 45.88 38.91 52.76C38.91 56.71 38.31 60.52 37.2 64.11L96.46 98.32C103.44 90.87 113.36 86.22 124.37 86.22C135.44 86.22 145.41 90.93 152.39 98.44L211.59 64.27C210.45 60.64 209.83 56.78 209.83 52.77C209.83 45.89 211.65 39.44 214.84 33.86L157.77 0.919983Z" fill="#CE3936"></path><path d="M29.97 95.95L72.28 120.38C72.17 121.74 72.12 123.1 72.12 124.47C72.12 145.02 83.86 163.08 101.74 171.58V220.23C96.58 222.71 91.84 226.04 87.75 230.05L51.17 208.93C52.29 204.64 52.87 200.21 52.87 195.74C52.87 171.78 36.65 151.53 14.61 145.41V103.06C20.07 101.55 25.27 99.14 29.97 95.95ZM28.5 78.97C21.52 86.38 11.63 91.02 0.640015 91.02V157.49C21.77 157.49 38.9 174.62 38.9 195.75C38.9 202.77 37 209.33 33.71 214.99L91.2 248.18C96.43 239.14 105.25 232.45 115.71 230.04V161.73C98.74 157.81 86.09 142.62 86.09 124.46C86.09 120.54 86.68 116.75 87.78 113.18L28.5 78.97Z" fill="#CE3936"></path><path d="M498.39 177.5V144.88C498.39 128.55 485.11 115.27 468.78 115.27H343.22C342.69 115.27 342.18 115.32 341.67 115.4H337.19C332.35 115.4 328.42 111.46 328.42 106.63V74C328.42 69.16 332.36 65.23 337.19 65.23H486.33C492.08 65.23 496.75 60.57 496.75 54.81C496.75 49.06 492.08 44.39 486.33 44.39H337.19C320.86 44.39 307.58 57.67 307.58 74V106.62C307.58 122.95 320.86 136.23 337.19 136.23H462.75C463.28 136.23 463.79 136.18 464.3 136.1H468.78C473.62 136.1 477.55 140.04 477.55 144.87V177.49C477.55 182.33 473.61 186.26 468.78 186.26H319.64C313.89 186.26 309.22 190.92 309.22 196.68C309.22 202.43 313.89 207.1 319.64 207.1H468.78C485.11 207.11 498.39 193.83 498.39 177.5Z" fill="#CE3935"></path><path d="M710.7 177.32V75.24C710.7 58.91 697.42 45.63 681.09 45.63H550.05C533.72 45.63 520.44 58.91 520.44 75.24V177.32C520.44 193.65 533.72 206.93 550.05 206.93H681.1C697.42 206.93 710.7 193.65 710.7 177.32ZM541.27 75.24C541.27 70.4 545.21 66.47 550.04 66.47H681.09C685.93 66.47 689.86 70.41 689.86 75.24V177.32C689.86 182.16 685.92 186.09 681.09 186.09H550.05C545.21 186.09 541.28 182.15 541.28 177.32V75.24H541.27Z" fill="#CE3935"></path><path d="M1823 177.32V75.24C1823 58.91 1809.72 45.63 1793.39 45.63H1662.34C1646.01 45.63 1632.73 58.91 1632.73 75.24V177.32C1632.73 193.65 1646.01 206.93 1662.34 206.93H1793.39C1809.72 206.93 1823 193.65 1823 177.32ZM1653.57 75.24C1653.57 70.4 1657.51 66.47 1662.34 66.47H1793.39C1798.23 66.47 1802.16 70.41 1802.16 75.24V177.32C1802.16 182.16 1798.22 186.09 1793.39 186.09H1662.34C1657.5 186.09 1653.57 182.15 1653.57 177.32V75.24Z" fill="#CE3935"></path><path d="M756.76 196.51V152H849.42C855.17 152 859.84 147.34 859.84 141.58C859.84 135.83 855.17 131.16 849.42 131.16H756.76V75.23C756.76 70.39 760.7 66.46 765.53 66.46H893.29C899.04 66.46 903.71 61.8 903.71 56.04C903.71 50.29 899.04 45.62 893.29 45.62H765.53C749.2 45.62 735.92 58.9 735.92 75.23V196.5C735.92 202.25 740.59 206.92 746.34 206.92C752.09 206.93 756.76 202.27 756.76 196.51Z" fill="#CE3935"></path><path d="M933.86 66.47H1006.51V194.32C1006.51 200.07 1011.18 204.74 1016.93 204.74C1022.68 204.74 1027.35 200.07 1027.35 194.32V66.47H1100C1105.75 66.47 1110.42 61.81 1110.42 56.05C1110.42 50.3 1105.76 45.63 1100 45.63H933.86C928.11 45.63 923.44 50.29 923.44 56.05C923.45 61.81 928.11 66.47 933.86 66.47Z" fill="#CE3935"></path><path d="M1218.44 204.19C1224.19 204.19 1228.86 199.53 1228.86 193.77V152H1368.13C1384.46 152 1397.74 138.72 1397.74 122.39V75.24C1397.74 58.91 1384.46 45.63 1368.13 45.63H1237.63C1221.3 45.63 1208.02 58.91 1208.02 75.24V193.77C1208.02 199.53 1212.68 204.19 1218.44 204.19ZM1237.63 66.47H1368.13C1372.97 66.47 1376.9 70.41 1376.9 75.24V122.39C1376.9 127.23 1372.96 131.16 1368.13 131.16H1228.86V75.23C1228.86 70.41 1232.79 66.47 1237.63 66.47Z" fill="#CE3935"></path><path d="M1430.64 204.19C1436.39 204.19 1441.06 199.53 1441.06 193.77V152H1523.95C1524.57 153.18 1525.42 154.26 1526.51 155.17L1581.89 201.23C1583.83 202.85 1586.2 203.64 1588.55 203.64C1591.54 203.64 1594.5 202.36 1596.57 199.88C1600.25 195.46 1599.64 188.89 1595.22 185.21L1555.29 152H1580.33C1596.66 152 1609.94 138.72 1609.94 122.39V75.24C1609.94 58.91 1596.66 45.63 1580.33 45.63H1449.83C1433.5 45.63 1420.22 58.91 1420.22 75.24V193.77C1420.22 199.53 1424.88 204.19 1430.64 204.19ZM1449.83 66.47H1580.33C1585.17 66.47 1589.1 70.41 1589.1 75.24V122.39C1589.1 127.23 1585.17 131.16 1580.33 131.16H1441.06V75.23C1441.05 70.41 1444.99 66.47 1449.83 66.47Z" fill="#CE3935"></path>',10)]))}const $C=kt(FC,[["render",VC]]),jC={},UC={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-chevron-down"};function HC(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",UC,i[0]||(i[0]=[w.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),w.createElementVNode("path",{d:"M6 9l6 6l6 -6"},null,-1)]))}const qC={components:{IconChevronDown:kt(jC,[["render",HC]])},props:{route:Object},mounted(){var n,i,o;(n=this.route)!=null&&n.menu&&(o=(i=this.route)==null?void 0:i.menu)!=null&&o.some(c=>(c==null?void 0:c.path)===this.$route.path.replace("/",""))&&(this.isOpen=!0)},data(){return{isOpen:!1}}},ZC={key:0,class:""},WC={class:"ml-[30px] before:block before:absolute relative w-[180px] inline-block before:w-[2px] before:h-[100%] before:bg-gray-100 before:left-[-14px] cursor-pointer"},GC={key:1};function YC(n,i,o,c,p,b){var M,D,A,R;const y=w.resolveComponent("IconChevronDown"),h=w.resolveComponent("router-link");return(M=o.route)!=null&&M.menu?(w.openBlock(),w.createElementBlock("div",ZC,[w.createElementVNode("button",{onClick:i[0]||(i[0]=z=>p.isOpen=!p.isOpen),class:"flex cursor-pointer gap-x-3 py-2 px-3 mb-[6px] text-sm text-gray-800 justify-start w-full border-none focus:outline-none text-gray-800 rounded-lg items-center focus:bg-gray-100 hover:bg-gray-100 duration-300"},[w.createTextVNode(w.toDisplayString((D=o.route)==null?void 0:D.ua)+" ",1),w.createVNode(y,{class:w.normalizeClass([[p.isOpen&&"-rotate-180"],"ml-auto duration-300"]),width:"16",height:"16"},null,8,["class"])]),w.createVNode(w.Transition,{name:"fade"},{default:w.withCtx(()=>{var z;return[w.withDirectives(w.createElementVNode("ul",WC,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList((z=o.route)==null?void 0:z.menu,(N,Y)=>(w.openBlock(),w.createElementBlock("li",{key:Y,class:"w-full mb-[4px]"},[w.createVNode(h,{to:"/"+(N==null?void 0:N.path),class:w.normalizeClass([[(N==null?void 0:N.path)===n.$route.path.replace("/","")&&"bg-gray-100"],"flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])},{default:w.withCtx(()=>[w.createTextVNode(w.toDisplayString(N==null?void 0:N.ua),1)]),_:2},1032,["to","class"])]))),128))],512),[[w.vShow,p.isOpen]])]}),_:1})])):(w.openBlock(),w.createElementBlock("div",GC,[w.createVNode(h,{to:(A=o.route)==null?void 0:A.path,class:w.normalizeClass([[((R=o.route)==null?void 0:R.path)===n.$route.path.replace("/","")&&"bg-gray-100"],"flex gap-x-3 py-2 w-full font-[400] px-3 text-sm text-gray-800 rounded-lg items-center hover:bg-gray-100 duration-300 hover:text-gray-800"])},{default:w.withCtx(()=>{var z;return[w.createTextVNode(w.toDisplayString((z=o.route)==null?void 0:z.ua),1)]}),_:1},8,["to","class"])]))}const XC={components:{IconLogout:BC,NavbarItem:kt(qC,[["render",YC]]),IconLogo:$C},data(){return{activeIndex:null,data:null,searchValue:""}},computed:{data(){var n,i;return(n=this.searchValue)!=null&&n.trim()?(i=this.flattenMenu(wr.value))==null?void 0:i.filter(o=>{var c,p,b;return(b=(c=o==null?void 0:o.ua)==null?void 0:c.toLowerCase())==null?void 0:b.includes((p=this.searchValue)==null?void 0:p.toLowerCase())}):wr.value}},methods:{flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i}}},KC={class:"flex flex-col h-[100vh] border-r w-[300px]"},JC={class:"p-[16px] overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},QC={class:"pb-3 w-full flex flex-col flex-wrap"},eM={key:0,class:"flex flex-col gap-[6px]"},tM={key:1,class:"text-gray-800 text-lg mt-[20px]"};function iM(n,i,o,c,p,b){var M;const y=w.resolveComponent("IconLogo"),h=w.resolveComponent("NavbarItem");return w.openBlock(),w.createElementBlock("div",KC,[w.createVNode(y,{height:"40",width:"200",class:"my-[20px] ml-[20px]"}),w.withDirectives(w.createElementVNode("input",{type:"text","onUpdate:modelValue":i[0]||(i[0]=D=>p.searchValue=D),placeholder:"Пошук по меню",class:"h-[40px] block rounded-lg border mx-[10px] pl-[10px] focus:border-blue-600 focus:border-[2px] outline-none"},null,512),[[w.vModelText,p.searchValue]]),w.createElementVNode("div",JC,[w.createElementVNode("nav",QC,[(M=b.data)!=null&&M.length?(w.openBlock(),w.createElementBlock("ul",eM,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(b.data,(D,A)=>(w.openBlock(),w.createElementBlock("li",{key:A},[w.createVNode(h,{route:D},null,8,["route"])]))),128))])):(w.openBlock(),w.createElementBlock("div",tM,"Не знайдено"))])])])}const nM=kt(XC,[["render",iM]]),rM={},sM={class:"flex-shrink-0 size-4",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"};function oM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",sM,i[0]||(i[0]=[w.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),w.createElementVNode("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"},null,-1),w.createElementVNode("path",{d:"M12 17h.01"},null,-1)]))}const aM=kt(rM,[["render",oM]]),lM={},cM={class:"flex-shrink-0 size-4",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"};function hM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",cM,i[0]||(i[0]=[w.createElementVNode("path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9"},null,-1),w.createElementVNode("path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0"},null,-1)]))}const uM={components:{IconQuestion:aM,IconMessage:kt(lM,[["render",hM]])}},dM={class:"h-[60px] border-b flex justify-end px-[20px]",style:{width:"calc(100vw - 260px)"}},pM={class:"flex items-center gap-[6px]"},fM={href:"docs-softpro.com",class:"size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100 dark:text-neutral-400 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},mM={class:"hs-tooltip [--placement:bottom] inline-block show"},gM={class:"hs-tooltip-toggle relative size-[38px] inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent text-gray-500 hover:bg-gray-100 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-100"};function yM(n,i,o,c,p,b){const y=w.resolveComponent("IconQuestion"),h=w.resolveComponent("IconMessage");return w.openBlock(),w.createElementBlock("div",dM,[w.createElementVNode("div",pM,[w.createElementVNode("a",fM,[w.createVNode(y,{height:"24",width:"24"})]),w.createElementVNode("div",mM,[w.createElementVNode("button",gM,[w.createVNode(h,{height:"24",width:"24"}),i[0]||(i[0]=w.createElementVNode("span",{class:"flex absolute top-0 end-0 z-10 -mt-1.5 -me-1.5"},[w.createElementVNode("span",{class:"animate-ping absolute inline-flex size-full rounded-full bg-red-400 opacity-75 dark:bg-red-600"}),w.createElementVNode("span",{class:"relative min-w-[18px] min-h-[18px] inline-flex justify-center items-center text-[10px] bg-red-500 text-white rounded-full px-1"}," 1 ")],-1))]),i[1]||(i[1]=w.createElementVNode("span",{class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 inline-block absolute invisible z-20 py-1.5 px-2.5 bg-gray-900 text-xs text-white rounded-lg dark:bg-neutral-700 hidden",role:"tooltip","data-popper-placement":"bottom",style:{position:"fixed",inset:"0px auto auto 0px",margin:"0px",transform:"translate(1686px, 53px)"}},null,-1))]),i[2]||(i[2]=w.createElementVNode("div",{class:"h-[30px] w-[1px] bg-gray-200 ml-[10px] mr-[10px]"},null,-1)),i[3]||(i[3]=w.createElementVNode("img",{class:"flex-shrink-0 size-[38px] rounded-full",src:"https://images.unsplash.com/photo-1659482633369-9fe69af50bfb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=facearea&facepad=3&w=320&h=320&q=80",alt:"Image Description"},null,-1))])])}const _M={components:{navbar:nM,AdminHeader:kt(uM,[["render",yM]])},mounted(){this.getMenu()},computed:{isMenu(){return wr.value}},methods:{async getMenu(){try{const{data:n}=await gt.get("/api/user-menu");wr.value=n}catch{}}}},xM={class:"admin-wrapper"},bM={class:"flex flex-col"};function vM(n,i,o,c,p,b){const y=w.resolveComponent("navbar"),h=w.resolveComponent("admin-header"),M=w.resolveComponent("router-view");return w.openBlock(),w.createElementBlock("div",xM,[w.createVNode(y),w.createElementVNode("div",bM,[b.isMenu?(w.openBlock(),w.createElementBlock(w.Fragment,{key:0},[w.createVNode(h),w.createVNode(M)],64)):w.createCommentVNode("",!0)])])}const wM=Object.freeze(Object.defineProperty({__proto__:null,default:kt(_M,[["render",vM],["__scopeId","data-v-3d7ecdff"]])},Symbol.toStringTag,{value:"Module"})),kM={},SM={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-adjustments-horizontal"};function EM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",SM,i[0]||(i[0]=[w.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 6l8 0"></path><path d="M16 6l4 0"></path><path d="M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 12l2 0"></path><path d="M10 12l10 0"></path><path d="M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0"></path><path d="M4 18l11 0"></path><path d="M19 18l1 0"></path>',10)]))}const TM=kt(kM,[["render",EM]]),CM={data(){return{currentSort:""}},props:{data:{type:Object,default:()=>null},activeColumn:{type:String}},computed:{label(){var n,i;return((n=this.data)==null?void 0:n.ua)||((i=this.data)==null?void 0:i.label)||this.data.title||"null"},selectedSortParam(){var n,i;return(i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.sort},getVisibleIcon(){return this.data.format!=="image"&&this.data.format!=="verify"}},watch:{activeColumn(n){n!==this.data.name&&(this.currentSort="")}},methods:{changeCurrentSort(n){switch(n){case"":return"asc";case"asc":return"desc";case"desc":return"";default:return""}},handleClickSortBtn(n){this.$emit("change-active",this.data.name),this.currentSort=this.changeCurrentSort(n);const i=this.$route.query,{sort:o,...c}=i,p=this.currentSort?`${this.data.name}-${this.currentSort}`:"";this.$router.replace({query:{...c,...p&&{sort:p}}})},isValueEqualToSelected(n){return`${this.data.name}-${n}`===this.selectedSortParam}}},MM={scope:"col",class:"min-w-[200px] max-w-[300px] text-start"},PM={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},IM={key:0,d:"m7 15 5 5 5-5"},AM={key:1,d:"m7 9 5-5 5 5"},DM={key:1,class:"text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500"};function zM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("th",MM,[b.getVisibleIcon?(w.openBlock(),w.createElementBlock("button",{key:0,type:"button",class:"text-sm text-gray-800 px-[4px] py-2.5 text-start font-normal text-gray-500 flex items-center gap-[6px]",onClick:i[0]||(i[0]=y=>b.handleClickSortBtn(p.currentSort))},[w.createTextVNode(w.toDisplayString(b.label)+" ",1),(w.openBlock(),w.createElementBlock("svg",PM,[p.currentSort==="asc"||p.currentSort===""?(w.openBlock(),w.createElementBlock("path",IM)):w.createCommentVNode("",!0),p.currentSort==="desc"||p.currentSort===""?(w.openBlock(),w.createElementBlock("path",AM)):w.createCommentVNode("",!0)]))])):(w.openBlock(),w.createElementBlock("p",DM,w.toDisplayString(b.label),1))])}const RM=kt(CM,[["render",zM]]),LM={},OM={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-dots-vertical"};function BM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",OM,i[0]||(i[0]=[w.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),w.createElementVNode("path",{d:"M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),w.createElementVNode("path",{d:"M12 19m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1),w.createElementVNode("path",{d:"M12 5m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0"},null,-1)]))}const FM=kt(LM,[["render",BM]]),NM={},VM={class:"flex-shrink-0 size-3.5",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"};function $M(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",VM,i[0]||(i[0]=[w.createStaticVNode('<path d="M3 6h18"></path><path d="M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"></path><path d="M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"></path><line x1="10" x2="10" y1="11" y2="17"></line><line x1="14" x2="14" y1="11" y2="17"></line>',5)]))}const jM=kt(NM,[["render",$M]]),UM={props:{height:{type:String,default:"16"},width:{type:String,default:"12"},color:{type:String,default:"black"}}},HM={style:{display:"none"}},qM=["height","width","fill"];function ZM(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock(w.Fragment,null,[(w.openBlock(),w.createElementBlock("svg",HM,i[0]||(i[0]=[w.createElementVNode("symbol",{id:"icon-pencil",viewBox:"0 0 32 32"},[w.createElementVNode("path",{d:"M27 0c2.761 0 5 2.239 5 5 0 1.126-0.372 2.164-1 3l-2 2-7-7 2-2c0.836-0.628 1.874-1 3-1zM2 23l-2 9 9-2 18.5-18.5-7-7-18.5 18.5zM22.362 11.362l-14 14-1.724-1.724 14-14 1.724 1.724z"})],-1)]))),(w.openBlock(),w.createElementBlock("svg",{height:o.height,width:o.width,fill:o.color},i[1]||(i[1]=[w.createElementVNode("use",{"xlink:href":"#icon-pencil"},null,-1)]),8,qM))],64)}const WM={components:{IconMore:FM,IconDelete:jM,IconEdit:kt(UM,[["render",ZM]])},emits:["updateTable"],props:{item:Object,table:String},data(){return{formVisible:!1,isDeleteConfirm:!1,formValue:{},top:0,left:0}},methods:{openConfirm(){this.isDeleteConfirm=!0,document.querySelector("body").click()},async getData(){var n;try{const{data:i}=await gt.get(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`);this.formValue=i}catch(i){console.error(i)}},doSomethingOnCancel(){this.formVisible=!1},async deleteElement(){var n;try{gt.delete(`/api/table/${this.table}/${(n=this.item)==null?void 0:n.id}`),this.$notify({title:"Успішно!",message:"Об`єкт успішно видалeно",type:"success"}),await this.$emit("update-table"),this.isDeleteConfirm=!1}catch{this.$notify({title:"Помилка!",message:"Сталася помилка",type:"error"})}}}},GM={class:"hs-dropdown [--placement:bottom-right] inline-flex"},YM={id:"hs-pro-dupc1",type:"button",class:"gap-x-2 p-2 rounded-lg hover:border-transparent focus:outline-none text-black hover:bg-gray-50"},XM={class:"pt-[7px] pb-[7px] flex flex-col items-start"},KM={class:"p-4"},JM={class:"mt-4 flex justify-end gap-x-3"};function QM(n,i,o,c,p,b){const y=w.resolveComponent("IconMore"),h=w.resolveComponent("IconEdit"),M=w.resolveComponent("router-link"),D=w.resolveComponent("IconDelete"),A=w.resolveComponent("VsPopover"),R=w.resolveComponent("VsDialog");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("div",GM,[w.createVNode(A,{trigger:"click",placement:"left"},{reference:w.withCtx(()=>[w.createElementVNode("button",YM,[w.createVNode(y,{height:"16",width:"16"})])]),default:w.withCtx(()=>{var z,N,Y;return[w.createElementVNode("div",XM,[w.createVNode(M,{to:`/edit?table=${(N=(z=n.$route)==null?void 0:z.params)==null?void 0:N.catchAll}&id=${(Y=o.item)==null?void 0:Y.id}`,class:"w-[100px] ml-[2px] flex items-center justify-center gap-x-3 rounded-lg text-[13px] text-gray-800"},{default:w.withCtx(()=>[w.createVNode(h,{color:"#000"}),i[4]||(i[4]=w.createTextVNode(" Редагувати "))]),_:1},8,["to"]),i[6]||(i[6]=w.createElementVNode("div",{class:"h-[1px] w-[80%] bg-gray-200 ml-auto mr-auto mt-[10px] mb-[10px]"},null,-1)),w.createElementVNode("button",{onClick:i[0]||(i[0]=w.withModifiers((...te)=>b.openConfirm&&b.openConfirm(...te),["stop"])),type:"button",class:"w-[100px] flex items-center justify-center gap-x-3 rounded-lg text-[14px] text-red-500"},[w.createVNode(D),i[5]||(i[5]=w.createElementVNode("span",{class:"text-gray-800"},"Видалити",-1))])])]}),_:1})]),w.createVNode(R,{visible:p.isDeleteConfirm,"onUpdate:visible":i[3]||(i[3]=z=>p.isDeleteConfirm=z),title:"Ви впевнені?"},{default:w.withCtx(()=>[w.createElementVNode("div",KM,[i[7]||(i[7]=w.createElementVNode("p",{class:"mt-1 text-gray-500 dark:text-neutral-500"}," Ви впевнені, що хочете видалити цей об'єкт? ",-1)),w.createElementVNode("div",JM,[w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium 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 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",onClick:i[1]||(i[1]=z=>p.isDeleteConfirm=!1)}," Скасувати "),w.createElementVNode("button",{type:"button",class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-semibold rounded-lg border border-transparent bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",onClick:i[2]||(i[2]=(...z)=>b.deleteElement&&b.deleteElement(...z))}," Так, я впевнена/ий ")])])]),_:1},8,["visible"])],64)}const eP=kt(WM,[["render",QM]]),tP={},iP={class:"flex-shrink-0 mt-0.5 size-3.5",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"};function nP(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",iP,i[0]||(i[0]=[w.createElementVNode("path",{d:"m3 16 4 4 4-4"},null,-1),w.createElementVNode("path",{d:"M7 20V4"},null,-1),w.createElementVNode("path",{d:"m21 8-4-4-4 4"},null,-1),w.createElementVNode("path",{d:"M17 4v16"},null,-1)]))}const rP=kt(tP,[["render",nP]]),sP={props:{columns:{type:Object,default:()=>{}},table:{type:String,default:()=>""}},data(){return{tableFormats:["json","csv","xlsx"],format:"",cols:[]}},methods:{async exportTable(){try{const n=await gt.get("/api/export",{params:{table:this.table,format:this.format,cols:this.cols.join(",")},responseType:"blob"}),i=new Blob([n.data],{type:"application/octet-stream"}),o=window.URL.createObjectURL(i),c=document.createElement("a");c.href=o,c.setAttribute("download",`${this.table.split(".")[0]}.${this.format}`),document.body.appendChild(c),c.click(),document.body.removeChild(c),window.URL.revokeObjectURL(o),this.$notify({type:"success",title:"Експорт",message:"Файл успішно експортовано!"})}catch(n){console.error("Ошибка при экспорте файла:",n),this.$notify({type:"error",title:"Помилка",message:"Не вдалося експортувати файл."})}},selectFormat(n){this.format=n}}},oP={class:"p-4"},aP={class:"pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},lP={class:"mt-2 flex row flex-wrap gap-y-[5px] gap-x-[10px]"},cP={class:"pb-5 mb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},hP={class:"mt-2 space-y-2"},uP=["id","onChange"],dP=["for"],pP={class:"pb-5 last:pb-0 last:mb-0 border-b last:border-b-0 border-gray-200 dark:border-neutral-700"},fP={class:"text-center"};function mP(n,i,o,c,p,b){const y=w.resolveComponent("VsCheckbox");return w.openBlock(),w.createElementBlock(w.Fragment,null,[i[4]||(i[4]=w.createElementVNode("div",{class:"dark:border-neutral-700"},null,-1)),w.createElementVNode("div",oP,[w.createElementVNode("div",aP,[i[2]||(i[2]=w.createElementVNode("label",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Виберіть стовпці таблиці для експорту: ",-1)),w.createElementVNode("div",lP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(o.columns,(h,M)=>(w.openBlock(),w.createElementBlock("div",{class:"flex items-center",key:M,style:{width:"calc((100% - 10px) / 2)"}},[w.createVNode(y,{class:"py-0 shrink-0 border-gray-300 rounded text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",modelValue:p.cols,"onUpdate:modelValue":i[0]||(i[0]=D=>p.cols=D),value:h==null?void 0:h.name,label:h==null?void 0:h.ua},null,8,["modelValue","value","label"])]))),128))])]),w.createElementVNode("div",cP,[i[3]||(i[3]=w.createElementVNode("label",{class:"text-sm text-gray-500 dark:text-neutral-500"}," Виберіть формат таблиці: ",-1)),w.createElementVNode("div",hP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(p.tableFormats,(h,M)=>(w.openBlock(),w.createElementBlock("div",{class:"flex items-center",key:M},[w.createElementVNode("input",{type:"radio",name:"hs-pro-duecmfm",class:"shrink-0 border-gray-300 rounded-full text-blue-600 focus:ring-blue-500 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:border-neutral-500 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-800",id:h,onChange:D=>b.selectFormat(h)},null,40,uP),w.createElementVNode("label",{for:h,class:"text-sm text-gray-800 ms-3 dark:text-neutral-400"}," Формат "+w.toDisplayString(h),9,dP)]))),128))])]),w.createElementVNode("div",pP,[w.createElementVNode("div",fP,[w.createElementVNode("button",{type:"button",class:"p-2 inline-flex items-center gap-x-2 text-xs font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:ring-2 focus:ring-blue-500",onClick:i[1]||(i[1]=(...h)=>b.exportTable&&b.exportTable(...h))}," Завантажити таблицю ")])])])],64)}const gP={components:{IconExport:rP,AdminTableExportForm:kt(sP,[["render",mP]])},props:{table:String,columns:Array},data(){return{isOpen:!1}}};function yP(n,i,o,c,p,b){const y=w.resolveComponent("IconExport"),h=w.resolveComponent("AdminTableExportForm"),M=w.resolveComponent("VsDialog");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("button",{onClick:i[0]||(i[0]=D=>p.isOpen=!0),class:"py-2 px-3 relative flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"},[w.createVNode(y,{height:"16",width:"16"}),i[2]||(i[2]=w.createTextVNode(" Експорт "))]),w.createVNode(M,{visible:p.isOpen,"onUpdate:visible":i[1]||(i[1]=D=>p.isOpen=D),title:"Експорт таблиці"},{default:w.withCtx(()=>[w.createVNode(h,{table:o.table,columns:o.columns},null,8,["table","columns"])]),_:1},8,["visible"])],64)}const _P=kt(gP,[["render",yP]]),xP={},bP={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"};function vP(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("svg",bP,i[0]||(i[0]=[w.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 6l5.5 0"></path><path d="M4 10l5.5 0"></path><path d="M4 14l5.5 0"></path><path d="M4 18l5.5 0"></path><path d="M14.5 6l5.5 0"></path><path d="M14.5 10l5.5 0"></path><path d="M14.5 14l5.5 0"></path><path d="M14.5 18l5.5 0"></path>',9)]))}const wP=kt(xP,[["render",vP]]),kP={props:{column:Object},emits:["update-column"],data(){return{value:!1}},watch:{value(n){this.$emit("update-column",{...this.column,hidden:!n})}},mounted(){var n;((n=this.column)==null?void 0:n.hidden)!==!0&&(this.value=!0)}},SP={class:"flex w-full gap-[8px] items-centr"};function EP(n,i,o,c,p,b){var y,h;return w.openBlock(),w.createElementBlock("label",SP,[w.withDirectives(w.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=M=>p.value=M),type:"checkbox"},null,512),[[w.vModelCheckbox,p.value]]),w.createTextVNode(" "+w.toDisplayString(((y=o.column)==null?void 0:y.ua)||((h=o.column)==null?void 0:h.title)),1)])}const TP={components:{IconColumns:wP,AdminTableColumnsHiddenItem:kt(kP,[["render",EP]])},emits:["update-columns"],props:{columns:Array},methods:{updateColumn(n){const i=this.columns.findIndex(c=>(c==null?void 0:c.name)===(n==null?void 0:n.name)),o=this.columns;o[i]=n,this.$emit("update-columns",[...o])}}},CP={class:"py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"},MP={class:"flex flex-col gap-[3px] h-[400px] w-[300px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function PP(n,i,o,c,p,b){const y=w.resolveComponent("IconColumns"),h=w.resolveComponent("AdminTableColumnsHiddenItem"),M=w.resolveComponent("VsPopover");return w.openBlock(),w.createBlock(M,{trigger:"click",placement:"bottom"},{reference:w.withCtx(()=>[w.createElementVNode("button",CP,[w.createVNode(y,{height:"20",width:"16"})])]),default:w.withCtx(()=>[w.createElementVNode("div",null,[i[0]||(i[0]=w.createElementVNode("h2",{class:"text-sm mb-[8px]"},"Оберіть колонки, щоб приховати",-1)),w.createElementVNode("ul",MP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(o.columns,(D,A)=>(w.openBlock(),w.createElementBlock("li",{key:A},[w.createVNode(h,{column:D,onUpdateColumn:b.updateColumn},null,8,["column","onUpdateColumn"])]))),128))])])]),_:1})}const IP=kt(TP,[["render",PP]]),AP={},DP={class:"vs-table-interface__table-wrp w-full rounded h-fit overflow-hidden"};function zP(n,i,o,c,p,b){return w.openBlock(),w.createElementBlock("div",DP,i[0]||(i[0]=[w.createStaticVNode('<div><div class="p-5 min-h-[500px] flex flex-col justify-center items-center text-center"><svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg><div class="max-w-sm mx-auto mt-6"><p class="font-medium text-gray-800 dark:text-neutral-200"> Дані для відображення відсутні </p><p class="mt-2 text-sm text-gray-500 dark:text-neutral-500"> Змініть параметри пошуку або спробуйте пізніше </p></div></div></div>',1)]))}const RP={props:{table:String},components:{IconFilter:TM,AdminTableControl:eP,AdminTableExport:_P,AdminTableColumnsHidden:IP,AdminTableColumn:RM,AdminNodata:kt(AP,[["render",zP]])},data(){return{tableData:{},isFilters:!1,filterScheme:[],page:1,searchValue:"",limit:20,filters:null,activeColumn:""}},mounted(){var n,i;this.page=((i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.page)||1,this.getTableData(),this.getFilters()},computed:{defaultPage(){var n,i;return((i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.page)||1},getFilterScheme(){var n;return(n=this.tableData)==null?void 0:n.filters},columns(){var n,i;return(i=(n=this.tableData)==null?void 0:n.columns)==null?void 0:i.filter(o=>(o==null?void 0:o.hidden)!==!0)},isForm(){var n;return(n=this.tableData)==null?void 0:n.form},isNoData(){var n,i;return!((n=this.tableData)!=null&&n.rows)||!((i=this.columns)!=null&&i.length)}},watch:{async table(){await this.getTableData()},searchValue(){this.getTableData()},$route:{handler(n,i){var o,c;((o=n==null?void 0:n.params)==null?void 0:o.catchAll)!==((c=i==null?void 0:i.params)==null?void 0:c.catchAll)&&(this.filterScheme=null,this.getFilters())},deep:!0}},methods:{async getTableData(){var n,i;try{const{data:o}=await gt.get(`/api/template/table/${this.table}`),c=await gt.get(`/api/table-data/${this.table}`,{params:{page:this.page,search:this.searchValue||null,limit:this.limit,filter:this.filters||null,order:((i=(n=this.$route)==null?void 0:n.query)==null?void 0:i.sort)||null}});this.tableData={...o,...(c==null?void 0:c.data)||{}}}catch{}},async getFilters(){var n;try{const{data:i}=await gt.get(`/api/table-filter/${this.table}`);this.filterScheme=(n=i==null?void 0:i.list)==null?void 0:n.map(o=>({...o,label:(o==null?void 0:o.label)||(o==null?void 0:o.ua)}))}catch{}},async handlePageChange(n){const i=this.$route.query;this.page=n,!(!(i!=null&&i.page)&&n===1||i.page===n)&&(await this.$router.replace({query:{...i,page:n}}),await this.getTableData())},async changeLimit(n){this.limit=await n,this.defaultPage=1,await this.getTableData()},closeFilter({target:n}){this.isFilters&&n.classList.contains("filter-container")&&(this.isFilters=!1)},async filterChange({url:n}){this.filters=n,this.page=1,await this.getTableData()},changeActiveColumn(n){this.activeColumn=n,this.getTableData()}}},LP={class:"w-[calc(100vw - 320px)]"},OP={class:"h-[58px] bg-gray-50 flex items-center justify-between px-[30px]"},BP={class:"text-xl font-medium"},FP={style:{height:"calc(100vh - 120px)",width:"calc(100vw - 260px)"},class:"bg-gray-50 p-[20px] flex pt-[10px]"},NP={class:"bg-white w-full rounded-xl border p-[20px]"},VP={class:"flex sm:grid sm:grid-cols-2 gap-x-2 sm:gap-x-5 mb-[10px]"},$P={class:"flex gap-[6px] ml-auto"},jP={class:"space-y-5 flex items-start w-full justify-start"},UP={style:{height:"calc(100vh - 310px)"},class:"overflow-x-auto w-full border-t [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},HP={class:"inline-block w-full align-middle"},qP={key:0,class:"divide-y divide-gray-200 min-w-full dark:divide-neutral-700 relative table-fixed"},ZP={class:"sticky top-0 bg-white w-full relative after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},WP={class:"border-stone-200 right-0 z-[1]"},GP={class:"divide-y divide-gray-200"},YP={class:"min-w-[200px] text-start pe-4 py-3 text-sm text-gray-600"},XP={class:"text-center sticky right-0 bg-white w-[80px] px-[10px]"},KP={class:"p-[20px] flex justify-end w-full"},JP={class:"filter-content h-screen bg-white w-[400px] p-[20px] pt-[10px] overflow-x-auto bg-[rgba(0,0,0,0.5)] [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"};function QP(n,i,o,c,p,b){var te,ae,he,be,_e,Ie,ot;const y=w.resolveComponent("router-link"),h=w.resolveComponent("AdminTableColumnsHidden"),M=w.resolveComponent("AdminTableExport"),D=w.resolveComponent("IconFilter"),A=w.resolveComponent("AdminTableColumn"),R=w.resolveComponent("AdminTableControl"),z=w.resolveComponent("AdminNodata"),N=w.resolveComponent("VsPagination"),Y=w.resolveComponent("VsFilter");return w.openBlock(),w.createElementBlock(w.Fragment,null,[w.createElementVNode("div",LP,[w.createElementVNode("div",OP,[w.createElementVNode("h2",BP,w.toDisplayString((te=p.tableData)==null?void 0:te.title),1),b.isForm?(w.openBlock(),w.createBlock(y,{key:0,to:`/add?table=${(he=(ae=n.$route)==null?void 0:ae.params)==null?void 0:he.catchAll}`,class:"py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg bg-blue-500 text-gray-800 shadow-sm hover:bg-blue-700 hover:text-white duration-300"},{default:w.withCtx(()=>i[5]||(i[5]=[w.createTextVNode(" Додати ")])),_:1},8,["to"])):w.createCommentVNode("",!0)]),w.createElementVNode("div",FP,[w.createElementVNode("div",NP,[w.createElementVNode("div",VP,[w.withDirectives(w.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=Qe=>p.searchValue=Qe),class:"py-2 pl-[15px] h-[38px] w-[400px] block w-full border rounded-lg text-sm focus:border-blue-600 focus:border-[2px] outline-none",placeholder:"Пошук..."},null,512),[[w.vModelText,p.searchValue]]),w.createElementVNode("div",$P,[w.createVNode(h,{columns:(be=p.tableData)==null?void 0:be.columns,onUpdateColumns:i[1]||(i[1]=Qe=>p.tableData.columns=Qe)},null,8,["columns"]),w.createVNode(M,{table:o.table,columns:(_e=p.tableData)==null?void 0:_e.columns},null,8,["table","columns"]),w.createElementVNode("button",{onClick:i[2]||(i[2]=Qe=>p.isFilters=!p.isFilters),class:"py-2 px-3 flex items-center gap-x-2 text-sm border focus:outline-none border-gray-100 font-medium rounded-lg text-gray-800 hover:border-gray-100 focus:border-gray-100 hover:bg-gray-50 shadow-sm duration-300"},[w.createVNode(D,{height:"16",width:"16"}),i[6]||(i[6]=w.createTextVNode(" Фільтри "))])])]),w.createElementVNode("div",jP,[w.createElementVNode("div",UP,[w.createElementVNode("div",HP,[b.isNoData?(w.openBlock(),w.createBlock(z,{key:1})):(w.openBlock(),w.createElementBlock("table",qP,[w.createElementVNode("thead",ZP,[w.createElementVNode("tr",WP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList(b.columns,Qe=>(w.openBlock(),w.createBlock(A,{key:Qe.name,data:Qe,activeColumn:p.activeColumn,onChangeActive:b.changeActiveColumn},null,8,["data","activeColumn","onChangeActive"]))),128)),i[7]||(i[7]=w.createElementVNode("th",{class:"w-[70px] sticky right-0 top-0 bg-white"},null,-1))])]),w.createElementVNode("tbody",GP,[(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList((Ie=p.tableData)==null?void 0:Ie.rows,(Qe,Be)=>{var St;return w.openBlock(),w.createElementBlock("tr",{key:Be},[w.createElementVNode("td",YP,[w.createVNode(y,{to:`/card/${o.table}/${Qe==null?void 0:Qe.id}`,class:"text-sm text-green-600 decoration-2 hover:underline font-medium focus:outline-none focus:underline hover:text-green-600"},{default:w.withCtx(()=>{var rt;return[w.createTextVNode(w.toDisplayString(Qe==null?void 0:Qe[(rt=b.columns[0])==null?void 0:rt.name]),1)]}),_:2},1032,["to"])]),(w.openBlock(!0),w.createElementBlock(w.Fragment,null,w.renderList((St=b.columns)==null?void 0:St.slice(1),rt=>{var Dt;return w.openBlock(),w.createElementBlock("td",{class:"min-w-[300px] w-full text-start px-[4px] py-3 text-sm text-gray-600",key:rt.name},[(w.openBlock(),w.createBlock(w.resolveDynamicComponent((rt==null?void 0:rt.format)==="custom"?rt==null?void 0:rt.component:n.$componentsConfig[`table-format-${((Dt=rt==null?void 0:rt.format)==null?void 0:Dt.toLowerCase())||n.text}`]),{name:rt==null?void 0:rt.name,data:Qe,value:Qe==null?void 0:Qe[rt==null?void 0:rt.name]},null,8,["name","data","value"]))])}),128)),w.createElementVNode("td",XP,[w.createVNode(R,{item:Qe,table:o.table,onUpdateTable:b.getTableData},null,8,["item","table","onUpdateTable"])])])}),128))])]))])])]),w.createElementVNode("div",KP,[w.createVNode(N,{goTo:!1,class:"justify-end","default-page":b.defaultPage,total:((ot=p.tableData)==null?void 0:ot.total)||0,pageSize:p.limit,onPageChange:b.handlePageChange,pageSizes:[10,16,20],onPageSizeChange:b.changeLimit},null,8,["default-page","total","pageSize","onPageChange","onPageSizeChange"])])])])]),w.createVNode(w.Transition,{name:"fade"},{default:w.withCtx(()=>{var Qe;return[w.withDirectives(w.createElementVNode("div",{onClick:i[4]||(i[4]=(...Be)=>b.closeFilter&&b.closeFilter(...Be)),style:{height:"100vh"},class:"fixed filter-container top-0 flex justify-end items-center z-[2] right-0 left-0 bottom-0 bg-[rgba(0,0,0,0.5)]"},[w.createElementVNode("div",JP,[(Qe=p.filterScheme)!=null&&Qe.length?(w.openBlock(),w.createBlock(Y,{key:0,ref:"filter",scheme:p.filterScheme,layout:"default","apply-vue-router":"",history:"",name:"filter",onFilterChange:b.filterChange,closeFilterBtn:!0,onFilterClose:i[3]||(i[3]=Be=>p.isFilters=!1)},null,8,["scheme","onFilterChange"])):w.createCommentVNode("",!0)])],512),[[w.vShow,p.isFilters]])]}),_:1})],64)}const eI={components:{AdminTable:kt(RP,[["render",QP]])},data(){return{table:!1,interface:"",title:""}},watch:{$route:{async handler(){wr!=null&&wr.value||await this.getMenu(),await this.checkPageType()},deep:!0},title(n){n&&(document.title=n)}},async mounted(){await this.checkPageType()},methods:{flattenMenu(n){const i=[];return n.forEach(o=>{o.menu?i.push(...this.flattenMenu(o.menu)):i.push(o)}),i},async getMenu(){try{const{data:n}=await gt.get("/api/user-menu");wr.value=n}catch{}},async checkPageType(){const n=this.flattenMenu(wr.value);n!=null&&n.length||this.$router.replace("/404");const i=n==null?void 0:n.find(c=>{var p,b;return(c==null?void 0:c.path)==((b=(p=this.$route)==null?void 0:p.params)==null?void 0:b.catchAll)});this.title=i==null?void 0:i.ua,i||this.$router.replace("/404");const o=i==null?void 0:i.table;this.table=o||!1,!o&&this.getInterface()},async getInterface(){var n,i;try{const{data:o}=await gt.get(`/api/template/interface/${((i=(n=this.$route)==null?void 0:n.params)==null?void 0:i.catchAll)||""}`);this.interface=o||""}catch{this.interface=""}}}},tI=["innerHTML"];function iI(n,i,o,c,p,b){const y=w.resolveComponent("AdminTable");return p.table?(w.openBlock(),w.createBlock(y,{key:0,table:p.table},null,8,["table"])):(w.openBlock(),w.createElementBlock("div",{key:1,class:"w-full bg-gray-50",style:{height:"calc(100vh - 120px)"},innerHTML:p.interface},null,8,tI))}const nI=Object.freeze(Object.defineProperty({__proto__:null,default:kt(eI,[["render",iI]])},Symbol.toStringTag,{value:"Module"}));return ZT});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { u as L } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as H, a as V } from "./import-file-
|
|
2
|
+
import { _ as H, a as V } from "./import-file-CBAkm6Oe.js";
|
|
3
3
|
import { resolveComponent as z, openBlock as s, createElementBlock as c, createElementVNode as l, toDisplayString as D, createVNode as N, withCtx as q, createTextVNode as B, normalizeClass as M, Fragment as b, renderList as C, createBlock as $, resolveDynamicComponent as T, createCommentVNode as x } from "vue";
|
|
4
4
|
const E = {
|
|
5
5
|
data() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { u as m } from "./userMenu-CT1xO2Pt.js";
|
|
2
|
-
import { _ as
|
|
3
|
-
import { resolveComponent as
|
|
2
|
+
import { _ as d, a as i } from "./import-file-CBAkm6Oe.js";
|
|
3
|
+
import { resolveComponent as h, openBlock as u, createElementBlock as b, createElementVNode as n, createBlock as f, createCommentVNode as p } from "vue";
|
|
4
4
|
const g = {
|
|
5
5
|
data() {
|
|
6
6
|
return {
|
|
@@ -20,37 +20,37 @@ const g = {
|
|
|
20
20
|
}), e;
|
|
21
21
|
},
|
|
22
22
|
async getFormScheme() {
|
|
23
|
-
var
|
|
23
|
+
var c, l;
|
|
24
24
|
const t = this.flattenMenu(m.value);
|
|
25
25
|
t != null && t.length || this.$router.replace("/404");
|
|
26
|
-
const e = t == null ? void 0 : t.find((
|
|
27
|
-
var
|
|
28
|
-
return (
|
|
26
|
+
const e = t == null ? void 0 : t.find((s) => {
|
|
27
|
+
var a, r;
|
|
28
|
+
return (s == null ? void 0 : s.path) == ((r = (a = this.$route) == null ? void 0 : a.query) == null ? void 0 : r.table);
|
|
29
29
|
});
|
|
30
30
|
e || this.$router.replace("/404");
|
|
31
31
|
const o = e == null ? void 0 : e.table;
|
|
32
32
|
this.table = o;
|
|
33
33
|
try {
|
|
34
34
|
const {
|
|
35
|
-
data: { form:
|
|
36
|
-
} = await
|
|
37
|
-
data: { rows:
|
|
38
|
-
} = await
|
|
39
|
-
`/api/table-data/${this.table}/${(
|
|
35
|
+
data: { form: s }
|
|
36
|
+
} = await i.get(`/api/template/table/${o}`), {
|
|
37
|
+
data: { rows: a }
|
|
38
|
+
} = await i.get(
|
|
39
|
+
`/api/table-data/${this.table}/${(l = (c = this.$route) == null ? void 0 : c.query) == null ? void 0 : l.id}`
|
|
40
40
|
);
|
|
41
|
-
this.formValues =
|
|
42
|
-
const { data: r } = await
|
|
41
|
+
this.formValues = a == null ? void 0 : a[0];
|
|
42
|
+
const { data: r } = await i.get(`/api/template/form/${s}`);
|
|
43
43
|
this.scheme = (r == null ? void 0 : r.schema) || r;
|
|
44
44
|
} catch {
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
async editObject() {
|
|
48
|
-
var t, e
|
|
48
|
+
var t, e;
|
|
49
49
|
try {
|
|
50
|
-
await this.$refs.form.doValidation(), await
|
|
50
|
+
await this.$refs.form.doValidation(), await i.put(
|
|
51
51
|
`/api/table/${this.table}/${(e = (t = this.$route) == null ? void 0 : t.query) == null ? void 0 : e.id}`,
|
|
52
52
|
this.formValues
|
|
53
|
-
), await this.$router.
|
|
53
|
+
), await this.$router.back(), await this.$notify({
|
|
54
54
|
title: "Успішно!",
|
|
55
55
|
message: "Об'єкт успішно створено",
|
|
56
56
|
type: "success"
|
|
@@ -67,9 +67,9 @@ const g = {
|
|
|
67
67
|
}, x = { style: { width: "calc(100vw - 260px)" } }, w = { class: "h-[58px] bg-gray-50 flex items-center justify-between px-[30px]" }, y = { class: "flex items-center gap-[6px]" }, k = {
|
|
68
68
|
style: { height: "calc(100vh - 120px)", width: "calc(100vw - 260px)" },
|
|
69
69
|
class: "bg-gray-50 p-[20px] flex"
|
|
70
|
-
},
|
|
71
|
-
function
|
|
72
|
-
const
|
|
70
|
+
}, v = { class: "bg-white w-full rounded-xl border p-[20px] overflow-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar:horizontal]:h-[8px] [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500" };
|
|
71
|
+
function $(t, e, o, c, l, s) {
|
|
72
|
+
const a = h("VsForm");
|
|
73
73
|
return u(), b("div", x, [
|
|
74
74
|
n("div", w, [
|
|
75
75
|
e[3] || (e[3] = n("h2", { class: "text-xl font-medium" }, "Редагувати", -1)),
|
|
@@ -79,26 +79,26 @@ function v(t, e, o, i, s, a) {
|
|
|
79
79
|
class: "py-2 px-3 flex items-center gap-x-2 text-sm font-medium rounded-lg border bg-white border-gray-100 text-gray-800 shadow focus:outline-none hover:bg-gray-50 hover:border-gray-100 duration-300"
|
|
80
80
|
}, " Скасувати "),
|
|
81
81
|
n("button", {
|
|
82
|
-
onClick: e[1] || (e[1] = (...r) =>
|
|
82
|
+
onClick: e[1] || (e[1] = (...r) => s.editObject && s.editObject(...r)),
|
|
83
83
|
class: "py-2 px-3 flex items-center gap-x-2 text-sm text-white font-medium rounded-lg border-none bg-blue-500 text-gray-800 shadow-sm focus:border-none focus:outline-none hover:bg-blue-700 hover:text-white duration-300"
|
|
84
84
|
}, " Зберегти ")
|
|
85
85
|
])
|
|
86
86
|
]),
|
|
87
87
|
n("div", k, [
|
|
88
|
-
n("div",
|
|
89
|
-
|
|
88
|
+
n("div", v, [
|
|
89
|
+
l.scheme ? (u(), f(a, {
|
|
90
90
|
key: 0,
|
|
91
91
|
ref: "form",
|
|
92
|
-
scheme:
|
|
93
|
-
modelValue:
|
|
94
|
-
"onUpdate:modelValue": e[2] || (e[2] = (r) =>
|
|
92
|
+
scheme: l.scheme,
|
|
93
|
+
modelValue: l.formValues,
|
|
94
|
+
"onUpdate:modelValue": e[2] || (e[2] = (r) => l.formValues = r),
|
|
95
95
|
class: "p-0 mt-[20px]"
|
|
96
96
|
}, null, 8, ["scheme", "modelValue"])) : p("", !0)
|
|
97
97
|
])
|
|
98
98
|
])
|
|
99
99
|
]);
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const C = /* @__PURE__ */ d(g, [["render", $]]);
|
|
102
102
|
export {
|
|
103
|
-
|
|
103
|
+
C as default
|
|
104
104
|
};
|
|
@@ -3577,17 +3577,17 @@ function O2(s, i) {
|
|
|
3577
3577
|
return [a, c, f];
|
|
3578
3578
|
}
|
|
3579
3579
|
const F2 = [
|
|
3580
|
-
{ name: "edit", path: "/edit", component: () => import("./edit-page-
|
|
3581
|
-
{ name: "add", path: "/add", component: () => import("./add-page-
|
|
3580
|
+
{ name: "edit", path: "/edit", component: () => import("./edit-page-BtBLz-_b.js") },
|
|
3581
|
+
{ name: "add", path: "/add", component: () => import("./add-page-D-5feL0y.js") },
|
|
3582
3582
|
{
|
|
3583
3583
|
name: "card-view",
|
|
3584
3584
|
path: "/card",
|
|
3585
|
-
component: () => import("./card-view-
|
|
3585
|
+
component: () => import("./card-view-pyDKvjtq.js"),
|
|
3586
3586
|
children: [{
|
|
3587
3587
|
name: "table",
|
|
3588
3588
|
path: ":table",
|
|
3589
|
-
component: () => import("./card-view-
|
|
3590
|
-
children: [{ name: "card", path: ":id", component: () => import("./card-page-
|
|
3589
|
+
component: () => import("./card-view-pyDKvjtq.js"),
|
|
3590
|
+
children: [{ name: "card", path: ":id", component: () => import("./card-page-CzyADTAX.js") }]
|
|
3591
3591
|
}]
|
|
3592
3592
|
}
|
|
3593
3593
|
], B2 = {}, N2 = { class: "bg-gray-200 w-full px-16 md:px-0 h-screen flex items-center justify-center" }, j2 = { class: "bg-white border border-gray-200 flex flex-col items-center justify-center px-4 md:px-8 lg:px-24 py-8 rounded-lg shadow-2xl" };
|
|
@@ -3635,13 +3635,13 @@ const $2 = /* @__PURE__ */ Xi(B2, [["render", V2]]), U2 = (s) => {
|
|
|
3635
3635
|
{
|
|
3636
3636
|
path: "/",
|
|
3637
3637
|
name: "global",
|
|
3638
|
-
component: () => import("./admin-view-
|
|
3638
|
+
component: () => import("./admin-view-CtkujtDv.js"),
|
|
3639
3639
|
children: [
|
|
3640
3640
|
...i,
|
|
3641
3641
|
...s,
|
|
3642
3642
|
{
|
|
3643
3643
|
path: "/:catchAll(.*)",
|
|
3644
|
-
component: () => import("./admin-interface-
|
|
3644
|
+
component: () => import("./admin-interface-BCKLKiHp.js")
|
|
3645
3645
|
}
|
|
3646
3646
|
]
|
|
3647
3647
|
}
|